]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/contribs/ng_assembly/num/bitrigesim_lemmas.ma
freescale porting, work in progress
[helm.git] / helm / software / matita / contribs / ng_assembly / num / bitrigesim_lemmas.ma
index 812f31a9d7e83ac2d63ba7d01d79e96274444974..9d9a95cbb844df10a98d6f520175a7af110bf716 100755 (executable)
@@ -27,431 +27,16 @@ include "num/bool_lemmas.ma".
 (* BITRIGESIMALI *)
 (* ************* *)
 
-ndefinition bitrigesim_destruct1 :
-Πt2:bitrigesim.ΠP:Prop.t00 = t2 → match t2 with [ t00 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##1: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t00 with [ t00 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct2 :
-Πt2:bitrigesim.ΠP:Prop.t01 = t2 → match t2 with [ t01 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##2: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t01 with [ t01 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct3 :
-Πt2:bitrigesim.ΠP:Prop.t02 = t2 → match t2 with [ t02 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##3: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t02 with [ t02 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct4 :
-Πt2:bitrigesim.ΠP:Prop.t03 = t2 → match t2 with [ t03 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##4: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t03 with [ t03 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct5 :
-Πt2:bitrigesim.ΠP:Prop.t04 = t2 → match t2 with [ t04 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##5: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t04 with [ t04 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct6 :
-Πt2:bitrigesim.ΠP:Prop.t05 = t2 → match t2 with [ t05 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##6: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t05 with [ t05 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct7 :
-Πt2:bitrigesim.ΠP:Prop.t06 = t2 → match t2 with [ t06 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##7: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t06 with [ t06 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct8 :
-Πt2:bitrigesim.ΠP:Prop.t07 = t2 → match t2 with [ t07 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##8: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t07 with [ t07 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct9 :
-Πt2:bitrigesim.ΠP:Prop.t08 = t2 → match t2 with [ t08 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##9: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t08 with [ t08 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct10 :
-Πt2:bitrigesim.ΠP:Prop.t09 = t2 → match t2 with [ t09 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##10: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t09 with [ t09 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct11 :
-Πt2:bitrigesim.ΠP:Prop.t0A = t2 → match t2 with [ t0A ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##11: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t0A with [ t0A ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct12 :
-Πt2:bitrigesim.ΠP:Prop.t0B = t2 → match t2 with [ t0B ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##12: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t0B with [ t0B ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct13 :
-Πt2:bitrigesim.ΠP:Prop.t0C = t2 → match t2 with [ t0C ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##13: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t0C with [ t0C ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct14 :
-Πt2:bitrigesim.ΠP:Prop.t0D = t2 → match t2 with [ t0D ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##14: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t0D with [ t0D ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct15 :
-Πt2:bitrigesim.ΠP:Prop.t0E = t2 → match t2 with [ t0E ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##15: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t0E with [ t0E ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct16 :
-Πt2:bitrigesim.ΠP:Prop.t0F = t2 → match t2 with [ t0F ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##16: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t0F with [ t0F ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct17 :
-Πt2:bitrigesim.ΠP:Prop.t10 = t2 → match t2 with [ t10 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##17: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t10 with [ t10 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct18 :
-Πt2:bitrigesim.ΠP:Prop.t11 = t2 → match t2 with [ t11 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##18: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t11 with [ t11 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct19 :
-Πt2:bitrigesim.ΠP:Prop.t12 = t2 → match t2 with [ t12 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##19: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t12 with [ t12 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct20 :
-Πt2:bitrigesim.ΠP:Prop.t13 = t2 → match t2 with [ t13 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##20: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t13 with [ t13 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct21 :
-Πt2:bitrigesim.ΠP:Prop.t14 = t2 → match t2 with [ t14 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##21: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t14 with [ t14 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct22 :
-Πt2:bitrigesim.ΠP:Prop.t15 = t2 → match t2 with [ t15 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##22: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t15 with [ t15 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct23 :
-Πt2:bitrigesim.ΠP:Prop.t16 = t2 → match t2 with [ t16 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##23: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t16 with [ t16 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct24 :
-Πt2:bitrigesim.ΠP:Prop.t17 = t2 → match t2 with [ t17 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##24: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t17 with [ t17 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct25 :
-Πt2:bitrigesim.ΠP:Prop.t18 = t2 → match t2 with [ t18 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##25: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t18 with [ t18 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct26 :
-Πt2:bitrigesim.ΠP:Prop.t19 = t2 → match t2 with [ t19 ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##26: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t19 with [ t19 ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct27 :
-Πt2:bitrigesim.ΠP:Prop.t1A = t2 → match t2 with [ t1A ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##27: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t1A with [ t1A ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct28 :
-Πt2:bitrigesim.ΠP:Prop.t1B = t2 → match t2 with [ t1B ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##28: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t1B with [ t1B ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct29 :
-Πt2:bitrigesim.ΠP:Prop.t1C = t2 → match t2 with [ t1C ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##29: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t1C with [ t1C ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct30 :
-Πt2:bitrigesim.ΠP:Prop.t1D = t2 → match t2 with [ t1D ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##30: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t1D with [ t1D ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct31 :
-Πt2:bitrigesim.ΠP:Prop.t1E = t2 → match t2 with [ t1E ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##31: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t1E with [ t1E ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
-ndefinition bitrigesim_destruct32 :
-Πt2:bitrigesim.ΠP:Prop.t1F = t2 → match t2 with [ t1F ⇒ P → P | _ ⇒ P ].
- #t2; #P;
- ncases t2;
- nnormalize; #H;
- ##[ ##32: napply (λx:P.x)
- ##| ##*: napply False_ind;
-          nchange with (match t1F with [ t1F ⇒ False | _ ⇒ True ]);
-          nrewrite > H; nnormalize; napply I
- ##]
-nqed.
-
 ndefinition bitrigesim_destruct_aux ≝
 Πt1,t2:bitrigesim.ΠP:Prop.t1 = t2 →
- match t1 with
-  [ t00 ⇒ match t2 with [ t00 ⇒ P → P | _ ⇒ P ] | t01 ⇒ match t2 with [ t01 ⇒ P → P | _ ⇒ P ]
-  | t02 ⇒ match t2 with [ t02 ⇒ P → P | _ ⇒ P ] | t03 ⇒ match t2 with [ t03 ⇒ P → P | _ ⇒ P ]
-  | t04 ⇒ match t2 with [ t04 ⇒ P → P | _ ⇒ P ] | t05 ⇒ match t2 with [ t05 ⇒ P → P | _ ⇒ P ]
-  | t06 ⇒ match t2 with [ t06 ⇒ P → P | _ ⇒ P ] | t07 ⇒ match t2 with [ t07 ⇒ P → P | _ ⇒ P ]
-  | t08 ⇒ match t2 with [ t08 ⇒ P → P | _ ⇒ P ] | t09 ⇒ match t2 with [ t09 ⇒ P → P | _ ⇒ P ]
-  | t0A ⇒ match t2 with [ t0A ⇒ P → P | _ ⇒ P ] | t0B ⇒ match t2 with [ t0B ⇒ P → P | _ ⇒ P ]
-  | t0C ⇒ match t2 with [ t0C ⇒ P → P | _ ⇒ P ] | t0D ⇒ match t2 with [ t0D ⇒ P → P | _ ⇒ P ]
-  | t0E ⇒ match t2 with [ t0E ⇒ P → P | _ ⇒ P ] | t0F ⇒ match t2 with [ t0F ⇒ P → P | _ ⇒ P ]
-  | t10 ⇒ match t2 with [ t10 ⇒ P → P | _ ⇒ P ] | t11 ⇒ match t2 with [ t11 ⇒ P → P | _ ⇒ P ]
-  | t12 ⇒ match t2 with [ t12 ⇒ P → P | _ ⇒ P ] | t13 ⇒ match t2 with [ t13 ⇒ P → P | _ ⇒ P ]
-  | t14 ⇒ match t2 with [ t14 ⇒ P → P | _ ⇒ P ] | t15 ⇒ match t2 with [ t15 ⇒ P → P | _ ⇒ P ]
-  | t16 ⇒ match t2 with [ t16 ⇒ P → P | _ ⇒ P ] | t17 ⇒ match t2 with [ t17 ⇒ P → P | _ ⇒ P ]
-  | t18 ⇒ match t2 with [ t18 ⇒ P → P | _ ⇒ P ] | t19 ⇒ match t2 with [ t19 ⇒ P → P | _ ⇒ P ]
-  | t1A ⇒ match t2 with [ t1A ⇒ P → P | _ ⇒ P ] | t1B ⇒ match t2 with [ t1B ⇒ P → P | _ ⇒ P ]
-  | t1C ⇒ match t2 with [ t1C ⇒ P → P | _ ⇒ P ] | t1D ⇒ match t2 with [ t1D ⇒ P → P | _ ⇒ P ]
-  | t1E ⇒ match t2 with [ t1E ⇒ P → P | _ ⇒ P ] | t1F ⇒ match t2 with [ t1F ⇒ P → P | _ ⇒ P ]
-  ].
+ match eq_bit t1 t2 with [ true ⇒ P → P | false ⇒ P ].
 
 ndefinition bitrigesim_destruct : bitrigesim_destruct_aux.
- #t1;
- ncases t1;
- ##[ ##1: napply bitrigesim_destruct1 ##| ##2: napply bitrigesim_destruct2
- ##| ##3: napply bitrigesim_destruct3 ##| ##4: napply bitrigesim_destruct4
- ##| ##5: napply bitrigesim_destruct5 ##| ##6: napply bitrigesim_destruct6
- ##| ##7: napply bitrigesim_destruct7 ##| ##8: napply bitrigesim_destruct8
- ##| ##9: napply bitrigesim_destruct9 ##| ##10: napply bitrigesim_destruct10
- ##| ##11: napply bitrigesim_destruct11 ##| ##12: napply bitrigesim_destruct12
- ##| ##13: napply bitrigesim_destruct13 ##| ##14: napply bitrigesim_destruct14
- ##| ##15: napply bitrigesim_destruct15 ##| ##16: napply bitrigesim_destruct16
- ##| ##17: napply bitrigesim_destruct17 ##| ##18: napply bitrigesim_destruct18
- ##| ##19: napply bitrigesim_destruct19 ##| ##20: napply bitrigesim_destruct20
- ##| ##21: napply bitrigesim_destruct21 ##| ##22: napply bitrigesim_destruct22
- ##| ##23: napply bitrigesim_destruct23 ##| ##24: napply bitrigesim_destruct24
- ##| ##25: napply bitrigesim_destruct25 ##| ##26: napply bitrigesim_destruct26
- ##| ##27: napply bitrigesim_destruct27 ##| ##28: napply bitrigesim_destruct28
- ##| ##29: napply bitrigesim_destruct29 ##| ##30: napply bitrigesim_destruct30
- ##| ##31: napply bitrigesim_destruct31 ##| ##32: napply bitrigesim_destruct32
- ##]
+ #t1; #t2; #P; #H;
+ nrewrite < H;
+ nelim t1;
+ nnormalize;
+ napply (λx.x).
 nqed.
 
 nlemma symmetric_eqbit : symmetricT bitrigesim bool eq_bit.