From 869417c848f0b4dac21ead718149ed36c2fa560f Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Mon, 12 Dec 2011 22:41:13 +0000 Subject: [PATCH] Added elimination principles for destructuring let-ins. --- matita/matita/lib/basics/types.ma | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/matita/matita/lib/basics/types.ma b/matita/matita/lib/basics/types.ma index 0cf9aeadd..697cf10a4 100644 --- a/matita/matita/lib/basics/types.ma +++ b/matita/matita/lib/basics/types.ma @@ -131,8 +131,17 @@ lemma breakup_pair : ∀A,B,C:Type[0].∀x. ∀R:C → Prop. ∀P:A → B → C. #A #B #C *; normalize /2/ qed. -(* Is this necessary? -axiom pair_elim'': +lemma pair_elim: + ∀A,B,C: Type[0]. + ∀T: A → B → C. + ∀p. + ∀P: A×B → C → Prop. + (∀lft, rgt. p = 〈lft,rgt〉 → P 〈lft,rgt〉 (T lft rgt)) → + P p (let 〈lft, rgt〉 ≝ p in T lft rgt). + #A #B #C #T * /2/ +qed. + +lemma pair_elim2: ∀A,B,C,C': Type[0]. ∀T: A → B → C. ∀T': A → B → C'. @@ -140,7 +149,8 @@ axiom pair_elim'': ∀P: A×B → C → C' → Prop. (∀lft, rgt. p = 〈lft,rgt〉 → P 〈lft,rgt〉 (T lft rgt) (T' lft rgt)) → P p (let 〈lft, rgt〉 ≝ p in T lft rgt) (let 〈lft, rgt〉 ≝ p in T' lft rgt). -*) + #A #B #C #C' #T #T' * /2/ +qed. (* Useful for avoiding destruct's full normalization. *) lemma pair_eq1: ∀A,B. ∀a1,a2:A. ∀b1,b2:B. 〈a1,b1〉 = 〈a2,b2〉 → a1 = a2. @@ -159,4 +169,4 @@ qed. lemma pair_destruct_2: ∀A,B.∀a:A.∀b:B.∀c. 〈a,b〉 = c → b = \snd c. #A #B #a #b *; /2/ -qed. \ No newline at end of file +qed. -- 2.39.2