]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/contribs/ng_assembly/compiler/ast_type_lemmas.ma
freescale porting, work in progress
[helm.git] / helm / software / matita / contribs / ng_assembly / compiler / ast_type_lemmas.ma
index 99f0f1b1224bf5b14b5490f62eb1f11ac71f7900..d7948c38690ddb735c2e402644ccacbc15fc3321 100755 (executable)
@@ -41,17 +41,17 @@ ndefinition astbasetype_destruct : astbasetype_destruct_aux.
  nnormalize;
  #H;
  ##[ ##1,5,9: napply (λx:P.x)
- ##| ##2,3: napply (False_ind ??);
+ ##| ##2,3: napply (False_ind (λ_.?) ?);
             nchange with (match AST_BASE_TYPE_BYTE8 with [ AST_BASE_TYPE_BYTE8 ⇒ False | _ ⇒ True]);
             nrewrite > H;
             nnormalize;
             napply I
- ##| ##4,6: napply (False_ind ??);
+ ##| ##4,6: napply (False_ind (λ_.?) ?);
             nchange with (match AST_BASE_TYPE_WORD16 with [ AST_BASE_TYPE_WORD16 ⇒ False | _ ⇒ True]);
             nrewrite > H;
             nnormalize;
             napply I
- ##| ##7,8: napply (False_ind ??);
+ ##| ##7,8: napply (False_ind (λ_.?) ?);
             nchange with (match AST_BASE_TYPE_WORD32 with [ AST_BASE_TYPE_WORD32 ⇒ False | _ ⇒ True]);
             nrewrite > H;
             nnormalize;
@@ -132,7 +132,7 @@ ndefinition asttype_destruct : asttype_destruct_aux.
           ##| ##2: #t; #n; #b; nnormalize; #H
           ##| ##3: #l; #b; nnormalize; #H
           ##]
-          napply (False_ind ??);
+          napply (False_ind (λ_.?) ?);
           nchange with (match AST_TYPE_BASE b with [ AST_TYPE_BASE _ ⇒ False | _ ⇒ True ]);
           nrewrite > H; nnormalize; napply I
  ##| ##2: ncases b2;
@@ -140,7 +140,7 @@ ndefinition asttype_destruct : asttype_destruct_aux.
           ##| ##1: #b; #t; #n; nnormalize; #H
           ##| ##3: #l; #t; #n; nnormalize; #H
           ##]
-          napply (False_ind ??);
+          napply (False_ind (λ_.?) ?);
           nchange with (match AST_TYPE_ARRAY t n with [ AST_TYPE_ARRAY _ _ ⇒ False | _ ⇒ True ]);
           nrewrite > H; nnormalize; napply I
  ##| ##3: ncases b2;
@@ -148,13 +148,63 @@ ndefinition asttype_destruct : asttype_destruct_aux.
           ##| ##1: #b; #l; nnormalize; #H
           ##| ##2: #t; #n; #l; nnormalize; #H
           ##]
-          napply (False_ind ??);
+          napply (False_ind (λ_.?) ?);
           nchange with (match AST_TYPE_STRUCT l with [ AST_TYPE_STRUCT _ ⇒ False | _ ⇒ True ]);
           nrewrite > H; nnormalize; napply I
  ##]
 nqed.
 
-(* eq_ast lemmas missing *)
+nlemma symmetric_eqasttype_aux1
+ : ∀nl1,nl2.
+  (eq_ast_type (AST_TYPE_STRUCT nl1) (AST_TYPE_STRUCT nl2)) = (eq_ast_type (AST_TYPE_STRUCT nl2) (AST_TYPE_STRUCT nl1)) →
+  (bfold_right_neList2 ? (λx,y.eq_ast_type x y) nl1 nl2) = (bfold_right_neList2 ? (λx,y.eq_ast_type x y) nl2 nl1).
+ #nl1; #nl2; #H;
+ napply H.
+nqed.
+
+nlemma symmetric_eqasttype : symmetricT ast_type bool eq_ast_type.
+ #t1; napply (ast_type_index ????? t1);
+ ##[ ##1: #b1; #t2; ncases t2;
+          ##[ ##1: #b2; nchange with ((eq_ast_base_type b1 b2) = (eq_ast_base_type b2 b1));
+                   nrewrite > (symmetric_eqastbasetype b1 b2);
+                   napply (refl_eq ??)
+          ##| ##2: #st2; #n2; nnormalize; napply (refl_eq ??)
+          ##| ##3: #nl2; nnormalize; napply (refl_eq ??)
+          ##]
+ ##| ##2: #st1; #n1; #H; #t2; ncases t2;
+          ##[ ##2: #st2; #n2; nchange with (((eq_ast_type st1 st2)⊗(eq_nat n1 n2)) = ((eq_ast_type st2 st1)⊗(eq_nat n2 n1)));
+                   nrewrite > (symmetric_eqnat n1 n2);
+                   nrewrite > (H st2);
+                   napply (refl_eq ??)
+          ##| ##1: #b2; nnormalize; napply (refl_eq ??)
+          ##| ##3: #nl2; nnormalize; napply (refl_eq ??)
+          ##]
+ ##| ##3: #hh1; #H; #t2; ncases t2;
+          ##[ ##3: #nl2; ncases nl2;
+                   ##[ ##1: #hh2; nchange with ((eq_ast_type hh1 hh2) = (eq_ast_type hh2 hh1));
+                            nrewrite > (H hh2);
+                            napply (refl_eq ??)
+                   ##| ##2: #hh2; #ll2; nnormalize; napply (refl_eq ??)
+                   ##]
+          ##| ##1: #b2; nnormalize; napply (refl_eq ??)
+          ##| ##2: #st2; #n2; nnormalize; napply (refl_eq ??)
+          ##]
+ ##| ##4: #hh1; #ll1; #H; #H1; #t2; ncases t2;
+          ##[ ##3: #nl2; ncases nl2;
+                   ##[ ##1: #hh2; nnormalize; napply (refl_eq ??)
+                   ##| ##2: #hh2; #ll2; nnormalize;
+                            nrewrite > (H hh2);
+                            nrewrite > (symmetric_eqasttype_aux1 ll1 ll2 (H1 (AST_TYPE_STRUCT ll2)));
+                            napply (refl_eq ??)
+                   ##]
+          ##| ##1: #b2; nnormalize; napply (refl_eq ??)
+          ##| ##2: #st2; #n2; nnormalize; napply (refl_eq ??)
+          ##]
+ ##]
+nqed.
+
+...
+
 
 nlemma isbastbasetype_to_isastbasetype : ∀ast.isb_ast_base_type ast = true → is_ast_base_type ast.
  #ast;