]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/contribs/ng_assembly/num/quatern_lemmas.ma
freescale porting, work in progress
[helm.git] / helm / software / matita / contribs / ng_assembly / num / quatern_lemmas.ma
index 00e559ed4b1b44b292fbcf0cb2cf777c51432278..339d4f701484e529cf85a24927c921e4bc319e62 100755 (executable)
@@ -29,41 +29,14 @@ include "num/bool_lemmas.ma".
 
 ndefinition quatern_destruct_aux ≝
 Πn1,n2:quatern.ΠP:Prop.n1 = n2 →
- match n1 with
-  [ q0 ⇒ match n2 with [ q0 ⇒ P → P | _ ⇒ P ]
-  | q1 ⇒ match n2 with [ q1 ⇒ P → P | _ ⇒ P ]
-  | q2 ⇒ match n2 with [ q2 ⇒ P → P | _ ⇒ P ]
-  | q3 ⇒ match n2 with [ q3 ⇒ P → P | _ ⇒ P ]
-  ].
+ match eq_qu n1 n2 with [ true ⇒ P → P | false ⇒ P ].
 
 ndefinition quatern_destruct : quatern_destruct_aux.
- #n1; #n2; #P;
+ #n1; #n2; #P; #H;
+ nrewrite < H;
  nelim n1;
- ##[ ##1: nelim n2; nnormalize; #H;
-          ##[ ##1: napply (λx:P.x)
-          ##| ##*: napply False_ind;
-                   nchange with (match q0 with [ q0 ⇒ False | _ ⇒ True ]);
-                   nrewrite > H; nnormalize; napply I
-          ##]
- ##| ##2: nelim n2; nnormalize; #H;
-          ##[ ##2: napply (λx:P.x)
-          ##| ##*: napply False_ind;
-                   nchange with (match q1 with [ q1 ⇒ False | _ ⇒ True ]);
-                   nrewrite > H; nnormalize; napply I
-          ##]
- ##| ##3: nelim n2; nnormalize; #H;
-          ##[ ##3: napply (λx:P.x)
-          ##| ##*: napply False_ind;
-                   nchange with (match q2 with [ q2 ⇒ False | _ ⇒ True ]);
-                   nrewrite > H; nnormalize; napply I
-          ##]
- ##| ##4: nelim n2; nnormalize; #H;
-          ##[ ##4: napply (λx:P.x)
-          ##| ##*: napply False_ind;
-                   nchange with (match q3 with [ q3 ⇒ False | _ ⇒ True ]);
-                   nrewrite > H; nnormalize; napply I
-          ##]
- ##]
+ nnormalize;
+ napply (λx.x).
 nqed.
 
 nlemma symmetric_eqqu : symmetricT quatern bool eq_qu.
@@ -100,7 +73,10 @@ nlemma decidable_qu : ∀x,y:quatern.decidable (x = y).
  nelim x;
  nelim y;
  ##[ ##1,6,11,16: napply (or2_intro1 (? = ?) (? ≠ ?) …); napply refl_eq
- ##| ##*: napply (or2_intro2 (? = ?) (? ≠ ?) …); nnormalize; #H; napply False_ind; napply (quatern_destruct … H)
+ ##| ##*: napply (or2_intro2 (? = ?) (? ≠ ?) …);
+          nnormalize; #H;
+          napply False_ind;
+          napply (quatern_destruct … H)
  ##]
 nqed.