(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* DEFINIZIONE ASCII MINIMALE *)
(* ************************** *)
+(*
ndefinition ascii_destruct_aux ≝
Πc1,c2.ΠP:Prop.c1 = c2 →
match eq_ascii c1 c2 with [ true ⇒ P → P | false ⇒ P ].
nnormalize;
napply (λx.x).
nqed.
+*)
nlemma eq_to_eqascii : ∀n1,n2.n1 = n2 → eq_ascii n1 n2 = true.
#n1; #n2; #H;
##]
nqed.
-nlemma eqascii_to_eq1 : ∀a2.eq_ascii ch_0 a2 = true → ch_0 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##1: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq2 : ∀a2.eq_ascii ch_1 a2 = true → ch_1 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##2: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq3 : ∀a2.eq_ascii ch_2 a2 = true → ch_2 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##3: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq4 : ∀a2.eq_ascii ch_3 a2 = true → ch_3 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##4: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq5 : ∀a2.eq_ascii ch_4 a2 = true → ch_4 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##5: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq6 : ∀a2.eq_ascii ch_5 a2 = true → ch_5 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##6: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq7 : ∀a2.eq_ascii ch_6 a2 = true → ch_6 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##7: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq8 : ∀a2.eq_ascii ch_7 a2 = true → ch_7 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##8: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq9 : ∀a2.eq_ascii ch_8 a2 = true → ch_8 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##9: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq10 : ∀a2.eq_ascii ch_9 a2 = true → ch_9 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##10: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq11 : ∀a2.eq_ascii ch__ a2 = true → ch__ = a2. #a2; ncases a2; nnormalize; #H; ##[ ##11: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq12 : ∀a2.eq_ascii ch_A a2 = true → ch_A = a2. #a2; ncases a2; nnormalize; #H; ##[ ##12: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq13 : ∀a2.eq_ascii ch_B a2 = true → ch_B = a2. #a2; ncases a2; nnormalize; #H; ##[ ##13: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq14 : ∀a2.eq_ascii ch_C a2 = true → ch_C = a2. #a2; ncases a2; nnormalize; #H; ##[ ##14: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq15 : ∀a2.eq_ascii ch_D a2 = true → ch_D = a2. #a2; ncases a2; nnormalize; #H; ##[ ##15: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq16 : ∀a2.eq_ascii ch_E a2 = true → ch_E = a2. #a2; ncases a2; nnormalize; #H; ##[ ##16: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq17 : ∀a2.eq_ascii ch_F a2 = true → ch_F = a2. #a2; ncases a2; nnormalize; #H; ##[ ##17: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq18 : ∀a2.eq_ascii ch_G a2 = true → ch_G = a2. #a2; ncases a2; nnormalize; #H; ##[ ##18: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq19 : ∀a2.eq_ascii ch_H a2 = true → ch_H = a2. #a2; ncases a2; nnormalize; #H; ##[ ##19: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq20 : ∀a2.eq_ascii ch_I a2 = true → ch_I = a2. #a2; ncases a2; nnormalize; #H; ##[ ##20: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq21 : ∀a2.eq_ascii ch_J a2 = true → ch_J = a2. #a2; ncases a2; nnormalize; #H; ##[ ##21: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq22 : ∀a2.eq_ascii ch_K a2 = true → ch_K = a2. #a2; ncases a2; nnormalize; #H; ##[ ##22: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq23 : ∀a2.eq_ascii ch_L a2 = true → ch_L = a2. #a2; ncases a2; nnormalize; #H; ##[ ##23: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq24 : ∀a2.eq_ascii ch_M a2 = true → ch_M = a2. #a2; ncases a2; nnormalize; #H; ##[ ##24: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq25 : ∀a2.eq_ascii ch_N a2 = true → ch_N = a2. #a2; ncases a2; nnormalize; #H; ##[ ##25: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq26 : ∀a2.eq_ascii ch_O a2 = true → ch_O = a2. #a2; ncases a2; nnormalize; #H; ##[ ##26: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq27 : ∀a2.eq_ascii ch_P a2 = true → ch_P = a2. #a2; ncases a2; nnormalize; #H; ##[ ##27: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq28 : ∀a2.eq_ascii ch_Q a2 = true → ch_Q = a2. #a2; ncases a2; nnormalize; #H; ##[ ##28: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq29 : ∀a2.eq_ascii ch_R a2 = true → ch_R = a2. #a2; ncases a2; nnormalize; #H; ##[ ##29: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq30 : ∀a2.eq_ascii ch_S a2 = true → ch_S = a2. #a2; ncases a2; nnormalize; #H; ##[ ##30: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq31 : ∀a2.eq_ascii ch_T a2 = true → ch_T = a2. #a2; ncases a2; nnormalize; #H; ##[ ##31: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq32 : ∀a2.eq_ascii ch_U a2 = true → ch_U = a2. #a2; ncases a2; nnormalize; #H; ##[ ##32: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq33 : ∀a2.eq_ascii ch_V a2 = true → ch_V = a2. #a2; ncases a2; nnormalize; #H; ##[ ##33: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq34 : ∀a2.eq_ascii ch_W a2 = true → ch_W = a2. #a2; ncases a2; nnormalize; #H; ##[ ##34: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq35 : ∀a2.eq_ascii ch_X a2 = true → ch_X = a2. #a2; ncases a2; nnormalize; #H; ##[ ##35: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq36 : ∀a2.eq_ascii ch_Y a2 = true → ch_Y = a2. #a2; ncases a2; nnormalize; #H; ##[ ##36: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq37 : ∀a2.eq_ascii ch_Z a2 = true → ch_Z = a2. #a2; ncases a2; nnormalize; #H; ##[ ##37: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq38 : ∀a2.eq_ascii ch_a a2 = true → ch_a = a2. #a2; ncases a2; nnormalize; #H; ##[ ##38: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq39 : ∀a2.eq_ascii ch_b a2 = true → ch_b = a2. #a2; ncases a2; nnormalize; #H; ##[ ##39: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq40 : ∀a2.eq_ascii ch_c a2 = true → ch_c = a2. #a2; ncases a2; nnormalize; #H; ##[ ##40: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq41 : ∀a2.eq_ascii ch_d a2 = true → ch_d = a2. #a2; ncases a2; nnormalize; #H; ##[ ##41: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq42 : ∀a2.eq_ascii ch_e a2 = true → ch_e = a2. #a2; ncases a2; nnormalize; #H; ##[ ##42: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq43 : ∀a2.eq_ascii ch_f a2 = true → ch_f = a2. #a2; ncases a2; nnormalize; #H; ##[ ##43: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq44 : ∀a2.eq_ascii ch_g a2 = true → ch_g = a2. #a2; ncases a2; nnormalize; #H; ##[ ##44: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq45 : ∀a2.eq_ascii ch_h a2 = true → ch_h = a2. #a2; ncases a2; nnormalize; #H; ##[ ##45: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq46 : ∀a2.eq_ascii ch_i a2 = true → ch_i = a2. #a2; ncases a2; nnormalize; #H; ##[ ##46: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq47 : ∀a2.eq_ascii ch_j a2 = true → ch_j = a2. #a2; ncases a2; nnormalize; #H; ##[ ##47: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq48 : ∀a2.eq_ascii ch_k a2 = true → ch_k = a2. #a2; ncases a2; nnormalize; #H; ##[ ##48: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq49 : ∀a2.eq_ascii ch_l a2 = true → ch_l = a2. #a2; ncases a2; nnormalize; #H; ##[ ##49: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq50 : ∀a2.eq_ascii ch_m a2 = true → ch_m = a2. #a2; ncases a2; nnormalize; #H; ##[ ##50: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq51 : ∀a2.eq_ascii ch_n a2 = true → ch_n = a2. #a2; ncases a2; nnormalize; #H; ##[ ##51: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq52 : ∀a2.eq_ascii ch_o a2 = true → ch_o = a2. #a2; ncases a2; nnormalize; #H; ##[ ##52: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq53 : ∀a2.eq_ascii ch_p a2 = true → ch_p = a2. #a2; ncases a2; nnormalize; #H; ##[ ##53: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq54 : ∀a2.eq_ascii ch_q a2 = true → ch_q = a2. #a2; ncases a2; nnormalize; #H; ##[ ##54: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq55 : ∀a2.eq_ascii ch_r a2 = true → ch_r = a2. #a2; ncases a2; nnormalize; #H; ##[ ##55: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq56 : ∀a2.eq_ascii ch_s a2 = true → ch_s = a2. #a2; ncases a2; nnormalize; #H; ##[ ##56: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq57 : ∀a2.eq_ascii ch_t a2 = true → ch_t = a2. #a2; ncases a2; nnormalize; #H; ##[ ##57: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq58 : ∀a2.eq_ascii ch_u a2 = true → ch_u = a2. #a2; ncases a2; nnormalize; #H; ##[ ##58: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq59 : ∀a2.eq_ascii ch_v a2 = true → ch_v = a2. #a2; ncases a2; nnormalize; #H; ##[ ##59: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq60 : ∀a2.eq_ascii ch_w a2 = true → ch_w = a2. #a2; ncases a2; nnormalize; #H; ##[ ##60: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq61 : ∀a2.eq_ascii ch_x a2 = true → ch_x = a2. #a2; ncases a2; nnormalize; #H; ##[ ##61: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq62 : ∀a2.eq_ascii ch_y a2 = true → ch_y = a2. #a2; ncases a2; nnormalize; #H; ##[ ##62: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqascii_to_eq63 : ∀a2.eq_ascii ch_z a2 = true → ch_z = a2. #a2; ncases a2; nnormalize; #H; ##[ ##63: napply refl_eq | ##*: napply (bool_destruct … H) ##] nqed.
+nlemma eqascii_to_eq1 : ∀a2.eq_ascii ch_0 a2 = true → ch_0 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##1: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq2 : ∀a2.eq_ascii ch_1 a2 = true → ch_1 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##2: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq3 : ∀a2.eq_ascii ch_2 a2 = true → ch_2 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##3: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq4 : ∀a2.eq_ascii ch_3 a2 = true → ch_3 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##4: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq5 : ∀a2.eq_ascii ch_4 a2 = true → ch_4 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##5: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq6 : ∀a2.eq_ascii ch_5 a2 = true → ch_5 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##6: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq7 : ∀a2.eq_ascii ch_6 a2 = true → ch_6 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##7: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq8 : ∀a2.eq_ascii ch_7 a2 = true → ch_7 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##8: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq9 : ∀a2.eq_ascii ch_8 a2 = true → ch_8 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##9: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq10 : ∀a2.eq_ascii ch_9 a2 = true → ch_9 = a2. #a2; ncases a2; nnormalize; #H; ##[ ##10: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq11 : ∀a2.eq_ascii ch__ a2 = true → ch__ = a2. #a2; ncases a2; nnormalize; #H; ##[ ##11: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq12 : ∀a2.eq_ascii ch_A a2 = true → ch_A = a2. #a2; ncases a2; nnormalize; #H; ##[ ##12: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq13 : ∀a2.eq_ascii ch_B a2 = true → ch_B = a2. #a2; ncases a2; nnormalize; #H; ##[ ##13: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq14 : ∀a2.eq_ascii ch_C a2 = true → ch_C = a2. #a2; ncases a2; nnormalize; #H; ##[ ##14: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq15 : ∀a2.eq_ascii ch_D a2 = true → ch_D = a2. #a2; ncases a2; nnormalize; #H; ##[ ##15: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq16 : ∀a2.eq_ascii ch_E a2 = true → ch_E = a2. #a2; ncases a2; nnormalize; #H; ##[ ##16: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq17 : ∀a2.eq_ascii ch_F a2 = true → ch_F = a2. #a2; ncases a2; nnormalize; #H; ##[ ##17: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq18 : ∀a2.eq_ascii ch_G a2 = true → ch_G = a2. #a2; ncases a2; nnormalize; #H; ##[ ##18: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq19 : ∀a2.eq_ascii ch_H a2 = true → ch_H = a2. #a2; ncases a2; nnormalize; #H; ##[ ##19: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq20 : ∀a2.eq_ascii ch_I a2 = true → ch_I = a2. #a2; ncases a2; nnormalize; #H; ##[ ##20: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq21 : ∀a2.eq_ascii ch_J a2 = true → ch_J = a2. #a2; ncases a2; nnormalize; #H; ##[ ##21: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq22 : ∀a2.eq_ascii ch_K a2 = true → ch_K = a2. #a2; ncases a2; nnormalize; #H; ##[ ##22: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq23 : ∀a2.eq_ascii ch_L a2 = true → ch_L = a2. #a2; ncases a2; nnormalize; #H; ##[ ##23: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq24 : ∀a2.eq_ascii ch_M a2 = true → ch_M = a2. #a2; ncases a2; nnormalize; #H; ##[ ##24: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq25 : ∀a2.eq_ascii ch_N a2 = true → ch_N = a2. #a2; ncases a2; nnormalize; #H; ##[ ##25: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq26 : ∀a2.eq_ascii ch_O a2 = true → ch_O = a2. #a2; ncases a2; nnormalize; #H; ##[ ##26: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq27 : ∀a2.eq_ascii ch_P a2 = true → ch_P = a2. #a2; ncases a2; nnormalize; #H; ##[ ##27: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq28 : ∀a2.eq_ascii ch_Q a2 = true → ch_Q = a2. #a2; ncases a2; nnormalize; #H; ##[ ##28: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq29 : ∀a2.eq_ascii ch_R a2 = true → ch_R = a2. #a2; ncases a2; nnormalize; #H; ##[ ##29: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq30 : ∀a2.eq_ascii ch_S a2 = true → ch_S = a2. #a2; ncases a2; nnormalize; #H; ##[ ##30: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq31 : ∀a2.eq_ascii ch_T a2 = true → ch_T = a2. #a2; ncases a2; nnormalize; #H; ##[ ##31: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq32 : ∀a2.eq_ascii ch_U a2 = true → ch_U = a2. #a2; ncases a2; nnormalize; #H; ##[ ##32: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq33 : ∀a2.eq_ascii ch_V a2 = true → ch_V = a2. #a2; ncases a2; nnormalize; #H; ##[ ##33: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq34 : ∀a2.eq_ascii ch_W a2 = true → ch_W = a2. #a2; ncases a2; nnormalize; #H; ##[ ##34: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq35 : ∀a2.eq_ascii ch_X a2 = true → ch_X = a2. #a2; ncases a2; nnormalize; #H; ##[ ##35: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq36 : ∀a2.eq_ascii ch_Y a2 = true → ch_Y = a2. #a2; ncases a2; nnormalize; #H; ##[ ##36: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq37 : ∀a2.eq_ascii ch_Z a2 = true → ch_Z = a2. #a2; ncases a2; nnormalize; #H; ##[ ##37: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq38 : ∀a2.eq_ascii ch_a a2 = true → ch_a = a2. #a2; ncases a2; nnormalize; #H; ##[ ##38: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq39 : ∀a2.eq_ascii ch_b a2 = true → ch_b = a2. #a2; ncases a2; nnormalize; #H; ##[ ##39: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq40 : ∀a2.eq_ascii ch_c a2 = true → ch_c = a2. #a2; ncases a2; nnormalize; #H; ##[ ##40: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq41 : ∀a2.eq_ascii ch_d a2 = true → ch_d = a2. #a2; ncases a2; nnormalize; #H; ##[ ##41: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq42 : ∀a2.eq_ascii ch_e a2 = true → ch_e = a2. #a2; ncases a2; nnormalize; #H; ##[ ##42: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq43 : ∀a2.eq_ascii ch_f a2 = true → ch_f = a2. #a2; ncases a2; nnormalize; #H; ##[ ##43: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq44 : ∀a2.eq_ascii ch_g a2 = true → ch_g = a2. #a2; ncases a2; nnormalize; #H; ##[ ##44: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq45 : ∀a2.eq_ascii ch_h a2 = true → ch_h = a2. #a2; ncases a2; nnormalize; #H; ##[ ##45: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq46 : ∀a2.eq_ascii ch_i a2 = true → ch_i = a2. #a2; ncases a2; nnormalize; #H; ##[ ##46: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq47 : ∀a2.eq_ascii ch_j a2 = true → ch_j = a2. #a2; ncases a2; nnormalize; #H; ##[ ##47: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq48 : ∀a2.eq_ascii ch_k a2 = true → ch_k = a2. #a2; ncases a2; nnormalize; #H; ##[ ##48: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq49 : ∀a2.eq_ascii ch_l a2 = true → ch_l = a2. #a2; ncases a2; nnormalize; #H; ##[ ##49: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq50 : ∀a2.eq_ascii ch_m a2 = true → ch_m = a2. #a2; ncases a2; nnormalize; #H; ##[ ##50: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq51 : ∀a2.eq_ascii ch_n a2 = true → ch_n = a2. #a2; ncases a2; nnormalize; #H; ##[ ##51: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq52 : ∀a2.eq_ascii ch_o a2 = true → ch_o = a2. #a2; ncases a2; nnormalize; #H; ##[ ##52: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq53 : ∀a2.eq_ascii ch_p a2 = true → ch_p = a2. #a2; ncases a2; nnormalize; #H; ##[ ##53: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq54 : ∀a2.eq_ascii ch_q a2 = true → ch_q = a2. #a2; ncases a2; nnormalize; #H; ##[ ##54: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq55 : ∀a2.eq_ascii ch_r a2 = true → ch_r = a2. #a2; ncases a2; nnormalize; #H; ##[ ##55: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq56 : ∀a2.eq_ascii ch_s a2 = true → ch_s = a2. #a2; ncases a2; nnormalize; #H; ##[ ##56: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq57 : ∀a2.eq_ascii ch_t a2 = true → ch_t = a2. #a2; ncases a2; nnormalize; #H; ##[ ##57: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq58 : ∀a2.eq_ascii ch_u a2 = true → ch_u = a2. #a2; ncases a2; nnormalize; #H; ##[ ##58: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq59 : ∀a2.eq_ascii ch_v a2 = true → ch_v = a2. #a2; ncases a2; nnormalize; #H; ##[ ##59: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq60 : ∀a2.eq_ascii ch_w a2 = true → ch_w = a2. #a2; ncases a2; nnormalize; #H; ##[ ##60: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq61 : ∀a2.eq_ascii ch_x a2 = true → ch_x = a2. #a2; ncases a2; nnormalize; #H; ##[ ##61: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq62 : ∀a2.eq_ascii ch_y a2 = true → ch_y = a2. #a2; ncases a2; nnormalize; #H; ##[ ##62: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqascii_to_eq63 : ∀a2.eq_ascii ch_z a2 = true → ch_z = a2. #a2; ncases a2; nnormalize; #H; ##[ ##63: napply refl_eq | ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
nlemma eqascii_to_eq : ∀c1,c2.eq_ascii c1 c2 = true → c1 = c2.
#c1; ncases c1;
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
napply refl_eq.
nqed.
+(* !!! da togliere *)
nlemma list_destruct_cons_nil : ∀T.∀x:T.∀y:list T.cons T x y = nil T → False.
#T; #x; #y; #H;
nchange with (match cons T x y with [ nil ⇒ True | cons a b ⇒ False ]);
napply I.
nqed.
+(* !!! da togliere *)
nlemma list_destruct_nil_cons : ∀T.∀x:T.∀y:list T.nil T = cons T x y → False.
#T; #x; #y; #H;
nchange with (match cons T x y with [ nil ⇒ True | cons a b ⇒ False ]);
napply refl_eq.
nqed.
+(* !!! da togliere *)
nlemma nelist_destruct_cons_nil : ∀T.∀x1,x2:T.∀y1:ne_list T.ne_cons T x1 y1 = ne_nil T x2 → False.
#T; #x1; #x2; #y1; #H;
nchange with (match ne_cons T x1 y1 with [ ne_nil _ ⇒ True | ne_cons a b ⇒ False ]);
napply I.
nqed.
+(* !!! da togliere *)
nlemma nelist_destruct_nil_cons : ∀T.∀x1,x2:T.∀y2:ne_list T.ne_nil T x1 = ne_cons T x2 y2 → False.
#T; #x1; #x2; #y2; #H;
nchange with (match ne_cons T x2 y2 with [ ne_nil _ ⇒ True | ne_cons a b ⇒ False ]);
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
#T; #h; #t;
nnormalize;
#H;
- napply (nat_destruct_0_S ? H).
+ ndestruct (*napply (nat_destruct_0_S ? H)*).
nqed.
nlemma fold_right_list2_aux2 :
#T; #h; #t;
nnormalize;
#H;
- napply (nat_destruct_S_0 ? H).
+ ndestruct (*napply (nat_destruct_S_0 ? H)*).
nqed.
nlemma fold_right_list2_aux3 :
##[ ##1: nnormalize; #H; napply refl_eq
##| ##2: #a; #l'; #H; #H1;
nchange in H1:(%) with ((S O) = (S (S (len_list T l'))));
- nelim (nat_destruct_0_S ? (nat_destruct_S_S … H1))
+ ndestruct (*nelim (nat_destruct_0_S ? (nat_destruct_S_S … H1))*)
##| ##3: #a; #l'; #H; #H1;
nchange in H1:(%) with ((S (S (len_list T l'))) = (S O));
- nelim (nat_destruct_S_0 ? (nat_destruct_S_S … H1))
+ ndestruct (*nelim (nat_destruct_S_0 ? (nat_destruct_S_S … H1))*)
##| ##4: #a; #l; #H; #a1; #l1; #H1; #H2;
nchange in H2:(%) with ((S (S (len_list T l1))) = (S (S (len_list T l))));
nchange with ((S (len_list T l1)) = (S (len_list T l)));
(* abs elem *)
ndefinition abs_list_aux1 : ∀T:Type.∀n.((len_list T []) > n) = true → False.
- #T; nnormalize; #n; #H; napply (bool_destruct … H). nqed.
+ #T; nnormalize; #n; #H; ndestruct (*napply (bool_destruct … H)*). nqed.
ndefinition abs_list_aux2 : ∀T:Type.∀h:T.∀t:list T.∀n.((len_list T (h::t)) > (S n) = true) → ((len_list T t) > n) = true.
#T; #h; #t; #n; nnormalize; #H; napply H. nqed.
nnormalize;
ncases t';
nnormalize;
- ##[ ##1: #x; #H; nelim (nat_destruct_0_S ? (nat_destruct_S_S … H))
- ##| ##2: #x; #l; #H; nelim (nat_destruct_0_S ? (nat_destruct_S_S … H))
+ ##[ ##1: #x; #H; ndestruct (*nelim (nat_destruct_0_S ? (nat_destruct_S_S … H))*)
+ ##| ##2: #x; #l; #H; ndestruct (*nelim (nat_destruct_0_S ? (nat_destruct_S_S … H))*)
##]
nqed.
nnormalize;
ncases t;
nnormalize;
- ##[ ##1: #x; #H; nelim (nat_destruct_S_0 ? (nat_destruct_S_S … H))
- ##| ##2: #x; #l; #H; nelim (nat_destruct_S_0 ? (nat_destruct_S_S … H))
+ ##[ ##1: #x; #H; ndestruct (*nelim (nat_destruct_S_0 ? (nat_destruct_S_S … H))*)
+ ##| ##2: #x; #l; #H; ndestruct (*nelim (nat_destruct_S_0 ? (nat_destruct_S_S … H))*)
##]
nqed.
(* abs elem *)
ndefinition abs_neList_aux1 : ∀T:Type.∀h:T.∀n.((len_neList T («£h»)) > (S n)) = true → False.
- #T; #h; #n; nnormalize; #H; napply (bool_destruct … H). nqed.
+ #T; #h; #n; nnormalize; #H; ndestruct (*napply (bool_destruct … H)*). nqed.
ndefinition abs_neList_aux2 : ∀T:Type.∀h:T.∀t:ne_list T.∀n.((len_neList T (h§§t)) > (S n) = true) → ((len_neList T t) > n) = true.
#T; #h; #t; #n; nnormalize; #H; napply H. nqed.
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
nelim l1;
##[ ##1: #l2; ncases l2; nnormalize;
##[ ##1: #H; napply refl_eq
- ##| ##2: #h; #t; #H; nelim (nat_destruct_0_S ? H)
+ ##| ##2: #h; #t; #H; ndestruct (*nelim (nat_destruct_0_S ? H)*)
##]
##| ##2: #h; #l2; ncases l2; nnormalize;
##[ ##1: #H; #l; #H1; nrewrite < H1; napply refl_eq
##[ ##1: nnormalize; #H1; #H2; #H3; napply refl_eq
##| ##2: #h; #l; #H1; #H2; #H3;
nchange in H1:(%) with (O = (S (len_list ? l)));
- nelim (nat_destruct_0_S ? H1)
+ ndestruct (*nelim (nat_destruct_0_S ? H1)*)
##]
##| ##2: #h3; #l3; #H; #l2; ncases l2;
##[ ##1: #H1; #H2; #H3; nchange in H1:(%) with ((S (len_list ? l3)) = O);
- nelim (nat_destruct_S_0 ? H1)
+ ndestruct (*nelim (nat_destruct_S_0 ? H1)*)
##| ##2: #h4; #l4; #H1; #H2; #H3;
nchange in H1:(%) with ((S (len_list ? l3)) = (S (len_list ? l4)));
nchange in H2:(%) with ((S (len_list ? l4)) = (S (len_list ? l3)));
nelim l1;
##[ ##1: #l2; ncases l2;
##[ ##1: #H; #H1; napply refl_eq
- ##| ##2: #hh2; #ll2; #H; nnormalize; #H1; napply (bool_destruct … H1)
+ ##| ##2: #hh2; #ll2; #H; nnormalize; #H1;
+ ndestruct (*napply (bool_destruct … H1)*)
##]
##| ##2: #hh1; #ll1; #H; #l2; ncases l2;
- ##[ ##1: #H1; nnormalize; #H2; napply (bool_destruct … H2)
+ ##[ ##1: #H1; nnormalize; #H2;
+ ndestruct (*napply (bool_destruct … H2)*)
##| ##2: #hh2; #ll2; #H1; #H2;
nchange in H2:(%) with (((f hh1 hh2)⊗(bfold_right_list2 T f ll1 ll2)) = true);
nrewrite > (H1 hh1 hh2 (andb_true_true_l … H2));
nelim l1;
##[ ##1: #l2; ncases l2;
##[ ##1: #H; #H1; nnormalize; napply refl_eq
- ##| ##2: #hh2; #ll2; #H; #H1; nelim (list_destruct_nil_cons ??? H1)
+ ##| ##2: #hh2; #ll2; #H; #H1;
+ (* !!! ndestruct: assert false *)
+ nelim (list_destruct_nil_cons ??? H1)
##]
##| ##2: #hh1; #ll1; #H; #l2; ncases l2;
- ##[ ##1: #H1; #H2; nelim (list_destruct_cons_nil ??? H2)
+ ##[ ##1: #H1; #H2;
+ (* !!! ndestruct: assert false *)
+ nelim (list_destruct_cons_nil ??? H2)
##| ##2: #hh2; #ll2; #H1; #H2; nnormalize;
nrewrite > (list_destruct_1 … H2);
nrewrite > (H1 hh2 hh2 (refl_eq …));
nelim l1;
##[ ##1: #l2; ncases l2;
##[ ##1: nnormalize; #H; napply refl_eq
- ##| ##2: nnormalize; #hh; #tt; #H; napply (bool_destruct … H)
+ ##| ##2: nnormalize; #hh; #tt; #H;
+ ndestruct (*napply (bool_destruct … H)*)
##]
##| ##2: #hh; #tt; #H; #l2; ncases l2;
- ##[ ##1: nnormalize; #H1; napply (bool_destruct … H1)
+ ##[ ##1: nnormalize; #H1;
+ ndestruct (*napply (bool_destruct … H1)*)
##| ##2: #hh1; #tt1; #H1; nnormalize;
nrewrite > (H tt1 ?);
##[ ##1: napply refl_eq
##[ ##1: #y; ncases y;
##[ ##1: nnormalize; napply (or2_intro1 (? = ?) (? ≠ ?) (refl_eq …))
##| ##2: #hh2; #tt2; nnormalize; napply (or2_intro2 (? = ?) (? ≠ ?) ?);
- nnormalize; #H1; napply (list_destruct_nil_cons T … H1)
+ nnormalize; #H1;
+ (* !!! ndestruct: assert false *)
+ napply (list_destruct_nil_cons T … H1)
##]
##| ##2: #hh1; #tt1; #H1; #y; ncases y;
##[ ##1: nnormalize; napply (or2_intro2 (? = ?) (? ≠ ?) ?);
- nnormalize; #H2; napply (list_destruct_cons_nil T … H2)
+ nnormalize; #H2;
+ (* !!! ndestruct: assert false *)
+ napply (list_destruct_cons_nil T … H2)
##| ##2: #hh2; #tt2; nnormalize; napply (or2_elim (hh1 = hh2) (hh1 ≠ hh2) ? (H …));
##[ ##2: #H2; napply (or2_intro2 (? = ?) (? ≠ ?) ?);
nnormalize; #H3; napply (H2 (list_destruct_1 T … H3))
#T; #f; #l1;
nelim l1;
##[ ##1: #l2; ncases l2;
- ##[ ##1: #H; nnormalize; #H1; napply (bool_destruct … H1)
- ##| ##2: #hh2; #ll2; #H; #H1; nnormalize; #H2; napply (list_destruct_nil_cons T … H2)
+ ##[ ##1: #H; nnormalize; #H1;
+ ndestruct (*napply (bool_destruct … H1)*)
+ ##| ##2: #hh2; #ll2; #H; #H1; nnormalize; #H2;
+ (* !!! ndestruct: assert false *)
+ napply (list_destruct_nil_cons T … H2)
##]
##| ##2: #hh1; #ll1; #H; #l2; ncases l2;
- ##[ ##1: #H1; #H2; nnormalize; #H3; napply (list_destruct_cons_nil T … H3)
+ ##[ ##1: #H1; #H2; nnormalize; #H3;
+ (* !!! ndestruct: assert false *)
+ napply (list_destruct_cons_nil T … H3)
##| ##2: #hh2; #ll2; #H1; #H2; nnormalize; #H3;
nchange in H2:(%) with (((f hh1 hh2)⊗(bfold_right_list2 T f ll1 ll2)) = false);
napply (H ll2 H1 ? (list_destruct_2 T … H3));
nnormalize; #H2; nrewrite > H2 in H1:(%);
nnormalize; #H1; napply (H1 (refl_eq …))
##| ##2: #hh2; #ll2; #H1; napply (or2_intro2 (h1 ≠ h2) ([] ≠ (hh2::ll2)) …);
- nnormalize; #H2; napply (list_destruct_nil_cons T … H2)
+ nnormalize; #H2;
+ (* !!! ndestruct: assert false *)
+ napply (list_destruct_nil_cons T … H2)
##]
##| ##2: #hh1; #ll1; #H1; #l2; ncases l2;
##[ ##1: #H2; napply (or2_intro2 (h1 ≠ h2) ((hh1::ll1) ≠ []) …);
- nnormalize; #H3; napply (list_destruct_cons_nil T … H3)
+ nnormalize; #H3;
+ (* !!! ndestruct: assert false *)
+ napply (list_destruct_cons_nil T … H3)
##| ##2: #hh2; #ll2; #H2;
napply (or2_elim (h1 = h2) (h1 ≠ h2) ? (H h1 h2) …);
##[ ##2: #H3; napply (or2_intro1 (h1 ≠ h2) ((hh1::ll1) ≠ (hh2::ll2)) H3)
ncases l;
nnormalize;
##[ ##1: #H; napply I
- ##| ##2: #x; #l; #H; napply (bool_destruct … H)
+ ##| ##2: #x; #l; #H; ndestruct (*napply (bool_destruct … H)*)
##]
nqed.
#T; #l;
ncases l;
nnormalize;
- ##[ ##1: #H; napply (bool_destruct … H)
+ ##[ ##1: #H; ndestruct (*napply (bool_destruct … H)*)
##| ##2: #x; #l; #H; napply I
##]
nqed.
##| ##2: #h1; #l; ncases l;
##[ ##1: #h3; #H1; #H2; #H3;
nchange in H1:(%) with ((S O) = (S (S O)));
+ (* !!! ndestruct: si inceppa su un'ipotesi che non e' H1 *)
nelim (nat_destruct_0_S ? (nat_destruct_S_S … H1))
##| ##2: #h3; #l3; #H1; #H2; #H3;
nchange in H1:(%) with ((S O) = (S (S (len_neList ? l3))));
+ (* !!! ndestruct: si inceppa su un'ipotesi che non e' H1 *)
nelim (nat_destruct_0_S ? (nat_destruct_S_S … H1))
##]
##]
##[ ##1: #h4; ncases l3;
##[ ##1: #h5; #H1; #H2; #H3;
nchange in H1:(%) with ((S (S O)) = (S O));
+ (* !!! ndestruct: si inceppa su un'ipotesi che non e' H1 *)
nelim (nat_destruct_S_0 ? (nat_destruct_S_S … H1))
##| ##2: #h5; #l5; #H1; #H2; #H3;
nchange in H1:(%) with ((S (S (len_neList ? l5))) = (S O));
+ (* !!! ndestruct: si inceppa su un'ipotesi che non e' H1 *)
nelim (nat_destruct_S_0 ? (nat_destruct_S_S … H1))
##]
##| ##2: #h4; #l4; #H1; #H2; #H3;
nelim l1;
##[ ##1: #hh1; #l2; ncases l2;
##[ ##1: #hh2; #H; #H1; nnormalize in H1:(%); nrewrite > (H hh1 hh2 H1); napply refl_eq
- ##| ##2: #hh2; #ll2; #H; nnormalize; #H1; napply (bool_destruct … H1)
+ ##| ##2: #hh2; #ll2; #H; nnormalize; #H1; ndestruct (*napply (bool_destruct … H1)*)
##]
##| ##2: #hh1; #ll1; #H; #l2; ncases l2;
- ##[ ##1: #hh2; #H1; nnormalize; #H2; napply (bool_destruct … H2)
+ ##[ ##1: #hh2; #H1; nnormalize; #H2; ndestruct (*napply (bool_destruct … H2)*)
##| ##2: #hh2; #ll2; #H1; #H2;
nchange in H2:(%) with (((f hh1 hh2)⊗(bfold_right_neList2 T f ll1 ll2)) = true);
nrewrite > (H1 hh1 hh2 (andb_true_true_l … H2));
##[ ##1: #hh2; #H; #H1; nnormalize;
nrewrite > (H hh1 hh2 (nelist_destruct_nil_nil … H1));
napply refl_eq
- ##| ##2: #hh2; #ll2; #H; #H1; nelim (nelist_destruct_nil_cons ???? H1)
+ ##| ##2: #hh2; #ll2; #H; #H1;
+ (* !!! ndestruct: assert false *)
+ nelim (nelist_destruct_nil_cons ???? H1)
##]
##| ##2: #hh1; #ll1; #H; #l2; ncases l2;
- ##[ ##1: #hh2; #H1; #H2; nelim (nelist_destruct_cons_nil ???? H2)
+ ##[ ##1: #hh2; #H1; #H2;
+ (* !!! ndestruct: assert false *)
+ nelim (nelist_destruct_cons_nil ???? H2)
##| ##2: #hh2; #ll2; #H1; #H2; nnormalize;
nrewrite > (nelist_destruct_cons_cons_1 … H2);
nrewrite > (H1 hh2 hh2 (refl_eq …));
nelim l1;
##[ ##1: #hh1; #l2; ncases l2;
##[ ##1: nnormalize; #hh2; #H; napply refl_eq
- ##| ##2: nnormalize; #hh2; #tt2; #H; napply (bool_destruct … H)
+ ##| ##2: nnormalize; #hh2; #tt2; #H; ndestruct (*napply (bool_destruct … H)*)
##]
##| ##2: #hh1; #tt1; #H; #l2; ncases l2;
- ##[ ##1: nnormalize; #hh2; #H1; napply (bool_destruct … H1)
+ ##[ ##1: nnormalize; #hh2; #H1; ndestruct (*napply (bool_destruct … H1)*)
##| ##2: #hh2; #tt2; #H1; nnormalize;
nrewrite > (H tt2 ?);
##[ ##1: napply refl_eq
#H2; napply (H1 (nelist_destruct_nil_nil T … H2))
##]
##| ##2: #hh2; #tt2; nnormalize; napply (or2_intro2 (? = ?) (? ≠ ?) ?);
- nnormalize; #H1; napply (nelist_destruct_nil_cons T … H1)
+ nnormalize; #H1;
+ (* !!! ndestruct: assert false *)
+ napply (nelist_destruct_nil_cons T … H1)
##]
##| ##2: #hh1; #tt1; #H1; #y; ncases y;
##[ ##1: #hh1; nnormalize; napply (or2_intro2 (? = ?) (? ≠ ?) ?);
- nnormalize; #H2; napply (nelist_destruct_cons_nil T … H2)
+ nnormalize; #H2;
+ (* !!! ndestruct: assert false *)
+ napply (nelist_destruct_cons_nil T … H2)
##| ##2: #hh2; #tt2; nnormalize; napply (or2_elim (hh1 = hh2) (hh1 ≠ hh2) ? (H …));
##[ ##2: #H2; napply (or2_intro2 (? = ?) (? ≠ ?) ?);
nnormalize; #H3; napply (H2 (nelist_destruct_cons_cons_1 T … H3))
nelim l1;
##[ ##1: #hh1; #l2; ncases l2;
##[ ##1: #hh2; #H; nnormalize; #H1; #H2; napply (H hh1 hh2 H1 (nelist_destruct_nil_nil T … H2))
- ##| ##2: #hh2; #ll2; #H; #H1; nnormalize; #H2; napply (nelist_destruct_nil_cons T … H2)
+ ##| ##2: #hh2; #ll2; #H; #H1; nnormalize; #H2;
+ (* !!! ndestruct: assert false *)
+ napply (nelist_destruct_nil_cons T … H2)
##]
##| ##2: #hh1; #ll1; #H; #l2; ncases l2;
- ##[ ##1: #hh2; #H1; #H2; nnormalize; #H3; napply (nelist_destruct_cons_nil T … H3)
+ ##[ ##1: #hh2; #H1; #H2; nnormalize; #H3;
+ (* !!! ndestruct: assert false *)
+ napply (nelist_destruct_cons_nil T … H3)
##| ##2: #hh2; #ll2; #H1; #H2; nnormalize; #H3;
nchange in H2:(%) with (((f hh1 hh2)⊗(bfold_right_neList2 T f ll1 ll2)) = false);
napply (H ll2 H1 ? (nelist_destruct_cons_cons_2 T … H3));
##]
##]
##| ##2: #hh2; #ll2; #H1; napply (or2_intro2 (h1 ≠ h2) («£hh1» ≠ (hh2§§ll2)) …);
- nnormalize; #H2; napply (nelist_destruct_nil_cons T … H2)
+ nnormalize; #H2;
+ (* !!! ndestruct: assert false *)
+ napply (nelist_destruct_nil_cons T … H2)
##]
##| ##2: #hh1; #ll1; #H1; #l2; ncases l2;
##[ ##1: #hh2; #H2; napply (or2_intro2 (h1 ≠ h2) ((hh1§§ll1) ≠ «£hh2») …);
- nnormalize; #H3; napply (nelist_destruct_cons_nil T … H3)
+ nnormalize; #H3;
+ (* !!! ndestruct: assert false *)
+ napply (nelist_destruct_cons_nil T … H3)
##| ##2: #hh2; #ll2; #H2;
napply (or2_elim (h1 = h2) (h1 ≠ h2) ? (H h1 h2) …);
##[ ##2: #H3; napply (or2_intro1 (h1 ≠ h2) ((hh1§§ll1) ≠ (hh2§§ll2)) H3)
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
napply refl_eq.
nqed.
+(* !!! da togliere *)
nlemma nat_destruct_0_S : ∀n:nat.O = S n → False.
#n; #H;
nchange with (match S n with [ O ⇒ True | S a ⇒ False ]);
napply I.
nqed.
+(* !!! da togliere *)
nlemma nat_destruct_S_0 : ∀n:nat.S n = O → False.
#n; #H;
nchange with (match S n with [ O ⇒ True | S a ⇒ False ]);
nelim n2;
nnormalize;
##[ ##1: #H; napply refl_eq
- ##| ##2: #n3; #H; #H1; nelim (nat_destruct_0_S ? H1)
+ ##| ##2: #n3; #H; #H1; ndestruct (*nelim (nat_destruct_0_S ? H1)*)
##]
##| ##2: #n2; #H; #n3; #H1;
ncases n3 in H1:(%) ⊢ %;
nnormalize;
- ##[ ##1: #H1; nelim (nat_destruct_S_0 ? H1)
+ ##[ ##1: #H1; ndestruct (*nelim (nat_destruct_S_0 ? H1)*)
##| ##2: #n4; #H1;
napply (H n4 (nat_destruct_S_S … H1))
##]
nelim n2;
nnormalize;
##[ ##1: #H; napply refl_eq
- ##| ##2: #n3; #H; #H1; napply (bool_destruct … (O = S n3) H1)
+ ##| ##2: #n3; #H; #H1; ndestruct (*napply (bool_destruct … (O = S n3) H1)*)
##]
##| ##2: #n2; #H; #n3; #H1;
ncases n3 in H1:(%) ⊢ %;
nnormalize;
- ##[ ##1: #H1; napply (bool_destruct … (S n2 = O) H1)
+ ##[ ##1: #H1; ndestruct (*napply (bool_destruct … (S n2 = O) H1)*)
##| ##2: #n4; #H1;
nrewrite > (H n4 H1);
napply refl_eq
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
napply refl_eq.
nqed.
+(* !!! da togliere *)
nlemma option_destruct_some_none : ∀T.∀x:T.Some T x = None T → False.
#T; #x; #H;
nchange with (match Some T x with [ None ⇒ True | Some a ⇒ False ]);
napply I.
nqed.
+(* !!! da togliere *)
nlemma option_destruct_none_some : ∀T.∀x:T.None T = Some T x → False.
#T; #x; #H;
nchange with (match Some T x with [ None ⇒ True | Some a ⇒ False ]);
nelim op2;
nnormalize;
##[ ##1: #H1; napply refl_eq
- ##| ##2: #a; #H1; nelim (option_destruct_none_some ?? H1)
- ##| ##3: #a; #H1; nelim (option_destruct_some_none ?? H1)
+ ##| ##2: #a; #H1;
+ (* !!! ndestruct: assert false *)
+ nelim (option_destruct_none_some ?? H1)
+ ##| ##3: #a; #H1;
+ (* !!! ndestruct: assert false *)
+ nelim (option_destruct_some_none ?? H1)
##| ##4: #a; #a0; #H1;
nrewrite > (H … (option_destruct_some_some … H1));
napply refl_eq
nelim op2;
nnormalize;
##[ ##1: #H1; napply refl_eq
- ##| ##2,3: #a; #H1; napply (bool_destruct … H1)
+ ##| ##2,3: #a; #H1; ndestruct (*napply (bool_destruct … H1)*)
##| ##4: #a; #a0; #H1;
nrewrite > (H … H1);
napply refl_eq
##[ ##1: #y; ncases y;
##[ ##1: nnormalize; napply (or2_intro1 (? = ?) (? ≠ ?) (refl_eq …))
##| ##2: #yy; nnormalize; napply (or2_intro2 (? = ?) (? ≠ ?) ?);
- nnormalize; #H1; napply (option_destruct_none_some T … H1)
+ nnormalize; #H1;
+ (* !!! ndestruct: assert false *)
+ napply (option_destruct_none_some T … H1)
##]
##| ##2: #xx; #y; ncases y;
##[ ##1: nnormalize; napply (or2_intro2 (? = ?) (? ≠ ?) ?);
- nnormalize; #H2; napply (option_destruct_some_none T … H2)
+ nnormalize; #H2;
+ (* !!! ndestruct: assert false *)
+ napply (option_destruct_some_none T … H2)
##| ##2: #yy; nnormalize; napply (or2_elim (xx = yy) (xx ≠ yy) ? (H …));
##[ ##2: #H1; napply (or2_intro2 (? = ?) (? ≠ ?) ?);
- nnormalize; #H2; napply (H1 (option_destruct_some_some T … H2))
+ nnormalize; #H2;
+ napply (H1 (option_destruct_some_some T … H2))
##| ##1: #H1; napply (or2_intro1 (? = ?) (? ≠ ?) ?);
nrewrite > H1; napply refl_eq
##]
(eq_option T op1 op2 f = false → op1 ≠ op2).
#T; #op1; nelim op1;
##[ ##1: #op2; ncases op2;
- ##[ ##1: nnormalize; #f; #H; #H1; napply (bool_destruct … H1)
- ##| ##2: #yy; #f; #H; nnormalize; #H1; #H2; napply (option_destruct_none_some T … H2)
+ ##[ ##1: nnormalize; #f; #H; #H1;
+ ndestruct (*napply (bool_destruct … H1)*)
+ ##| ##2: #yy; #f; #H; nnormalize; #H1; #H2;
+ (* !!! ndestruct: assert false *)
+ napply (option_destruct_none_some T … H2)
##]
##| ##2: #xx; #op2; ncases op2;
- ##[ ##1: nnormalize; #f; #H; #H1; #H2; napply (option_destruct_some_none T … H2)
+ ##[ ##1: nnormalize; #f; #H; #H1; #H2;
+ (* !!! ndestruct: assert false *)
+ napply (option_destruct_some_none T … H2)
##| ##2: #yy; #f; #H; nnormalize; #H1; #H2; napply (H xx yy H1 ?);
napply (option_destruct_some_some T … H2)
##]
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
ndefinition eq_pair ≝
λT1,T2:Type.λp1,p2:ProdT T1 T2.
λf1:T1 → T1 → bool.λf2:T2 → T2 → bool.
- match p1 with [ pair x1 y1 ⇒
- match p2 with [ pair x2 y2 ⇒
- (f1 x1 x2) ⊗ (f2 y1 y2) ]].
+ (f1 (fst … p1) (fst … p2)) ⊗
+ (f2 (snd … p1) (snd … p2)).
ninductive Prod3T (T1:Type) (T2:Type) (T3:Type) : Type ≝
triple : T1 → T2 → T3 → Prod3T T1 T2 T3.
ndefinition eq_triple ≝
λT1,T2,T3:Type.λp1,p2:Prod3T T1 T2 T3.
λf1:T1 → T1 → bool.λf2:T2 → T2 → bool.λf3:T3 → T3 → bool.
- match p1 with [ triple x1 y1 z1 ⇒
- match p2 with [ triple x2 y2 z2 ⇒
- (f1 x1 x2) ⊗ (f2 y1 y2) ⊗ (f3 z1 z2) ]].
+ (f1 (fst3T … p1) (fst3T … p2)) ⊗
+ (f2 (snd3T … p1) (snd3T … p2)) ⊗
+ (f3 (thd3T … p1) (thd3T … p2)).
ninductive Prod4T (T1:Type) (T2:Type) (T3:Type) (T4:Type) : Type ≝
quadruple : T1 → T2 → T3 → T4 → Prod4T T1 T2 T3 T4.
ndefinition eq_quadruple ≝
λT1,T2,T3,T4:Type.λp1,p2:Prod4T T1 T2 T3 T4.
λf1:T1 → T1 → bool.λf2:T2 → T2 → bool.λf3:T3 → T3 → bool.λf4:T4 → T4 → bool.
- match p1 with [ quadruple x1 y1 z1 w1 ⇒
- match p2 with [ quadruple x2 y2 z2 w2 ⇒
- (f1 x1 x2) ⊗ (f2 y1 y2) ⊗ (f3 z1 z2) ⊗ (f4 w1 w2) ]].
+ (f1 (fst4T … p1) (fst4T … p2)) ⊗
+ (f2 (snd4T … p1) (snd4T … p2)) ⊗
+ (f3 (thd4T … p1) (thd4T … p2)) ⊗
+ (f4 (fth4T … p1) (fth4T … p2)).
ninductive Prod5T (T1:Type) (T2:Type) (T3:Type) (T4:Type) (T5:Type) : Type ≝
quintuple : T1 → T2 → T3 → T4 → T5 → Prod5T T1 T2 T3 T4 T5.
ndefinition thd5T ≝
λT1.λT2.λT3.λT4.λT5.λp:Prod5T T1 T2 T3 T4 T5.match p with [ quintuple _ _ x _ _ ⇒ x ].
-ndefinition frth5T ≝
+ndefinition fth5T ≝
λT1.λT2.λT3.λT4.λT5.λp:Prod5T T1 T2 T3 T4 T5.match p with [ quintuple _ _ _ x _ ⇒ x ].
-ndefinition ffth5T ≝
+ndefinition fft5T ≝
λT1.λT2.λT3.λT4.λT5.λp:Prod5T T1 T2 T3 T4 T5.match p with [ quintuple _ _ _ _ x ⇒ x ].
ndefinition eq_quintuple ≝
λT1,T2,T3,T4,T5:Type.λp1,p2:Prod5T T1 T2 T3 T4 T5.
λf1:T1 → T1 → bool.λf2:T2 → T2 → bool.λf3:T3 → T3 → bool.λf4:T4 → T4 → bool.λf5:T5 → T5 → bool.
- match p1 with [ quintuple x1 y1 z1 w1 v1 ⇒
- match p2 with [ quintuple x2 y2 z2 w2 v2 ⇒
- (f1 x1 x2) ⊗ (f2 y1 y2) ⊗ (f3 z1 z2) ⊗ (f4 w1 w2) ⊗ (f5 v1 v2) ]].
+ (f1 (fst5T … p1) (fst5T … p2)) ⊗
+ (f2 (snd5T … p1) (snd5T … p2)) ⊗
+ (f3 (thd5T … p1) (thd5T … p2)) ⊗
+ (f4 (fth5T … p1) (fth5T … p2)) ⊗
+ (f5 (fft5T … p1) (fft5T … p2)).
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
ncases (f1 x1 x2) in H:(%) K:(%);
nnormalize;
#H3;
- ##[ ##2: napply (bool_destruct … H3) ##]
+ ##[ ##2: ndestruct (*napply (bool_destruct … H3)*) ##]
#H4;
nrewrite > (H4 (refl_eq …));
nrewrite > (H2 y1 y2 H3);
nletin K ≝ (H1 x1 x2);
ncases (f1 x1 x2) in H:(%) K:(%);
nnormalize;
- ##[ ##2: #H4; napply (bool_destruct … H4) ##]
+ ##[ ##2: #H4; ndestruct (*napply (bool_destruct … H4)*) ##]
nletin K1 ≝ (H2 y1 y2);
ncases (f2 y1 y2) in K1:(%) ⊢ %;
nnormalize;
- ##[ ##2: #H4; #H5; napply (bool_destruct … H5) ##]
+ ##[ ##2: #H4; #H5; ndestruct (*napply (bool_destruct … H5)*) ##]
#H4; #H5; #H6;
nrewrite > (H4 (refl_eq …));
nrewrite > (H6 (refl_eq …));
nletin K ≝ (H1 x1 x2);
ncases (f1 x1 x2) in H:(%) K:(%);
nnormalize;
- ##[ ##2: #H5; napply (bool_destruct … H5) ##]
+ ##[ ##2: #H5; ndestruct (*napply (bool_destruct … H5)*) ##]
nletin K1 ≝ (H2 y1 y2);
ncases (f2 y1 y2) in K1:(%) ⊢ %;
nnormalize;
- ##[ ##2: #H5; #H6; napply (bool_destruct … H6) ##]
+ ##[ ##2: #H5; #H6; ndestruct (*napply (bool_destruct … H6)*) ##]
nletin K2 ≝ (H3 z1 z2);
ncases (f3 z1 z2) in K2:(%) ⊢ %;
nnormalize;
- ##[ ##2: #H5; #H6; #H7; napply (bool_destruct … H7) ##]
+ ##[ ##2: #H5; #H6; #H7; ndestruct (*napply (bool_destruct … H7)*) ##]
#H5; #H6; #H7; #H8;
nrewrite > (H5 (refl_eq …));
nrewrite > (H6 (refl_eq …));
nletin K ≝ (H1 x1 x2);
ncases (f1 x1 x2) in H:(%) K:(%);
nnormalize;
- ##[ ##2: #H6; napply (bool_destruct … H6) ##]
+ ##[ ##2: #H6; ndestruct (*napply (bool_destruct … H6)*) ##]
nletin K1 ≝ (H2 y1 y2);
ncases (f2 y1 y2) in K1:(%) ⊢ %;
nnormalize;
- ##[ ##2: #H6; #H7; napply (bool_destruct … H7) ##]
+ ##[ ##2: #H6; #H7; ndestruct (*napply (bool_destruct … H7)*) ##]
nletin K2 ≝ (H3 z1 z2);
ncases (f3 z1 z2) in K2:(%) ⊢ %;
nnormalize;
- ##[ ##2: #H6; #H7; #H8; napply (bool_destruct … H8) ##]
+ ##[ ##2: #H6; #H7; #H8; ndestruct (*napply (bool_destruct … H8)*) ##]
nletin K3 ≝ (H4 v1 v2);
ncases (f4 v1 v2) in K3:(%) ⊢ %;
nnormalize;
- ##[ ##2: #H6; #H7; #H8; #H9; napply (bool_destruct … H9) ##]
+ ##[ ##2: #H6; #H7; #H8; #H9; ndestruct (*napply (bool_destruct … H9)*) ##]
#H6; #H7; #H8; #H9; #H10;
nrewrite > (H6 (refl_eq …));
nrewrite > (H7 (refl_eq …));
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
+include "common/theory.ma".
+
(* coppia dipendente *)
-inductive sigma (A:Type) (P:A → Type) : Type ≝
+ninductive sigma (A:Type) (P:A → Type) : Type ≝
sigma_intro: ∀x:A.P x → sigma A P.
notation < "hvbox(\Sigma ident i opt (: tx) break . p)"
interpretation "sigma" 'Sigma \eta.x = (sigma ? x).
-definition sigmaFst ≝
+ndefinition sigmaFst ≝
λT:Type.λf:T → Type.λs:sigma T f.match s with [ sigma_intro x _ ⇒ x ].
-definition sigmaSnd ≝
+ndefinition sigmaSnd ≝
λT:Type.λf:T → Type.λs:sigma T f.match s return λs.f (sigmaFst ?? s) with [ sigma_intro _ x ⇒ x ].
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
universe constraint Type[0] < Type[1].
universe constraint Type[1] < Type[2].
universe constraint Type[2] < Type[3].
+universe constraint Type[3] < Type[4].
(* ********************************** *)
(* SOTTOINSIEME MINIMALE DELLA TEORIA *)
interpretation "logical not" 'not x = (Not x).
-(*
nlemma absurd : ∀A,C:Prop.A → ¬A → C.
#A; #C; #H;
nnormalize;
interpretation "logical or" 'or x y = (Or2 x y).
+ndefinition decidable ≝ λA:Prop.A ∨ (¬A).
+
nlemma or2_elim
: ∀P1,P2,Q:Prop.Or2 P1 P2 → ∀f1:P1 → Q.∀f2:P2 → Q.Q.
#P1; #P2; #Q; #H; #f1; #f2;
ninductive ex2 (A:Type) (Q,R:A → Prop) : Prop ≝
ex_intro2: ∀x:A.Q x → R x → ex2 A Q R.
-*)
(* higher_order_defs/relations *)
ndefinition relation : Type → Type ≝
-λA:Type.A → A → Prop.
+λA.A → A → Prop.
-(*
ndefinition reflexive : ∀A:Type.∀R:relation A.Prop ≝
λA.λR.∀x:A.R x x.
-*)
ndefinition symmetric : ∀A:Type.∀R:relation A.Prop ≝
λA.λR.∀x,y:A.R x y → R y x.
-(*
ndefinition transitive : ∀A:Type.∀R:relation A.Prop ≝
λA.λR.∀x,y,z:A.R x y → R y z → R x z.
ndefinition antisymmetric : ∀A:Type.∀R:relation A.Prop ≝
λA.λR.∀x,y:A.R x y → ¬ (R y x).
-*)
(* logic/equality.ma *)
ninductive eq (A:Type) (x:A) : A → Prop ≝
refl_eq : eq A x x.
+ndefinition refl ≝ refl_eq.
+
interpretation "leibnitz's equality" 'eq t x y = (eq t x y).
interpretation "leibnitz's non-equality" 'neq t x y = (Not (eq t x y)).
-(*
nlemma eq_f : ∀T1,T2:Type.∀x,y:T1.∀f:T1 → T2.x = y → (f x) = (f y).
#T1; #T2; #x; #y; #f; #H;
nrewrite < H;
nnormalize; #H; #H1;
napply (H (eq_f … H1)).
nqed.
-*)
nlemma symmetric_eq: ∀A:Type. symmetric A (eq A).
#A;
napply refl_eq.
nqed.
-nlemma eq_ind_r: ∀A:Type.∀x:A.∀P:A → Prop.P x → ∀y:A.y=x → P y.
+nlemma eq_ind_r: ∀A:Type[0].∀x:A.∀P:A → Prop.P x → ∀y:A.y=x → P y.
#A; #x; #P; #H; #y; #H1;
nrewrite < (symmetric_eq … H1);
napply H.
nqed.
-(*
+ndefinition R0 ≝ λT:Type[0].λt:T.t.
+
+ndefinition R1 ≝ eq_rect_Type0.
+
+ndefinition R2 :
+ ∀T0:Type[0].
+ ∀a0:T0.
+ ∀T1:∀x0:T0. a0=x0 → Type[0].
+ ∀a1:T1 a0 (refl_eq ? a0).
+ ∀T2:∀x0:T0. ∀p0:a0=x0. ∀x1:T1 x0 p0. R1 ?? T1 a1 ? p0 = x1 → Type[0].
+ ∀a2:T2 a0 (refl_eq ? a0) a1 (refl_eq ? a1).
+ ∀b0:T0.
+ ∀e0:a0 = b0.
+ ∀b1: T1 b0 e0.
+ ∀e1:R1 ?? T1 a1 ? e0 = b1.
+ T2 b0 e0 b1 e1.
+ #T0;#a0;#T1;#a1;#T2;#a2;#b0;#e0;#b1;#e1;
+ napply (eq_rect_Type0 ????? e1);
+ napply (R1 ?? ? ?? e0);
+ napply a2;
+nqed.
+
+ndefinition R3 :
+ ∀T0:Type[0].
+ ∀a0:T0.
+ ∀T1:∀x0:T0. a0=x0 → Type[0].
+ ∀a1:T1 a0 (refl_eq ? a0).
+ ∀T2:∀x0:T0. ∀p0:a0=x0. ∀x1:T1 x0 p0. R1 ?? T1 a1 ? p0 = x1 → Type[0].
+ ∀a2:T2 a0 (refl_eq ? a0) a1 (refl_eq ? a1).
+ ∀T3:∀x0:T0. ∀p0:a0=x0. ∀x1:T1 x0 p0.∀p1:R1 ?? T1 a1 ? p0 = x1.
+ ∀x2:T2 x0 p0 x1 p1.R2 ???? T2 a2 x0 p0 ? p1 = x2 → Type[0].
+ ∀a3:T3 a0 (refl_eq ? a0) a1 (refl_eq ? a1) a2 (refl_eq ? a2).
+ ∀b0:T0.
+ ∀e0:a0 = b0.
+ ∀b1: T1 b0 e0.
+ ∀e1:R1 ?? T1 a1 ? e0 = b1.
+ ∀b2: T2 b0 e0 b1 e1.
+ ∀e2:R2 ???? T2 a2 b0 e0 ? e1 = b2.
+ T3 b0 e0 b1 e1 b2 e2.
+ #T0;#a0;#T1;#a1;#T2;#a2;#T3;#a3;#b0;#e0;#b1;#e1;#b2;#e2;
+ napply (eq_rect_Type0 ????? e2);
+ napply (R2 ?? ? ???? e0 ? e1);
+ napply a3;
+nqed.
+
+ndefinition R4 :
+ ∀T0:Type[0].
+ ∀a0:T0.
+ ∀T1:∀x0:T0. eq T0 a0 x0 → Type[0].
+ ∀a1:T1 a0 (refl_eq T0 a0).
+ ∀T2:∀x0:T0. ∀p0:eq (T0 …) a0 x0. ∀x1:T1 x0 p0.eq (T1 …) (R1 T0 a0 T1 a1 x0 p0) x1 → Type[0].
+ ∀a2:T2 a0 (refl_eq T0 a0) a1 (refl_eq (T1 a0 (refl_eq T0 a0)) a1).
+ ∀T3:∀x0:T0. ∀p0:eq (T0 …) a0 x0. ∀x1:T1 x0 p0.∀p1:eq (T1 …) (R1 T0 a0 T1 a1 x0 p0) x1.
+ ∀x2:T2 x0 p0 x1 p1.eq (T2 …) (R2 T0 a0 T1 a1 T2 a2 x0 p0 x1 p1) x2 → Type[0].
+ ∀a3:T3 a0 (refl_eq T0 a0) a1 (refl_eq (T1 a0 (refl_eq T0 a0)) a1)
+ a2 (refl_eq (T2 a0 (refl_eq T0 a0) a1 (refl_eq (T1 a0 (refl_eq T0 a0)) a1)) a2).
+ ∀T4:∀x0:T0. ∀p0:eq (T0 …) a0 x0. ∀x1:T1 x0 p0.∀p1:eq (T1 …) (R1 T0 a0 T1 a1 x0 p0) x1.
+ ∀x2:T2 x0 p0 x1 p1.∀p2:eq (T2 …) (R2 T0 a0 T1 a1 T2 a2 x0 p0 x1 p1) x2.
+ ∀x3:T3 x0 p0 x1 p1 x2 p2.∀p3:eq (T3 …) (R3 T0 a0 T1 a1 T2 a2 T3 a3 x0 p0 x1 p1 x2 p2) x3.
+ Type[0].
+ ∀a4:T4 a0 (refl_eq T0 a0) a1 (refl_eq (T1 a0 (refl_eq T0 a0)) a1)
+ a2 (refl_eq (T2 a0 (refl_eq T0 a0) a1 (refl_eq (T1 a0 (refl_eq T0 a0)) a1)) a2)
+ a3 (refl_eq (T3 a0 (refl_eq T0 a0) a1 (refl_eq (T1 a0 (refl_eq T0 a0)) a1)
+ a2 (refl_eq (T2 a0 (refl_eq T0 a0) a1 (refl_eq (T1 a0 (refl_eq T0 a0)) a1)) a2))
+ a3).
+ ∀b0:T0.
+ ∀e0:eq (T0 …) a0 b0.
+ ∀b1: T1 b0 e0.
+ ∀e1:eq (T1 …) (R1 T0 a0 T1 a1 b0 e0) b1.
+ ∀b2: T2 b0 e0 b1 e1.
+ ∀e2:eq (T2 …) (R2 T0 a0 T1 a1 T2 a2 b0 e0 b1 e1) b2.
+ ∀b3: T3 b0 e0 b1 e1 b2 e2.
+ ∀e3:eq (T3 …) (R3 T0 a0 T1 a1 T2 a2 T3 a3 b0 e0 b1 e1 b2 e2) b3.
+ T4 b0 e0 b1 e1 b2 e2 b3 e3.
+ #T0;#a0;#T1;#a1;#T2;#a2;#T3;#a3;#T4;#a4;#b0;#e0;#b1;#e1;#b2;#e2;#b3;#e3;
+ napply (eq_rect_Type0 ????? e3);
+ napply (R3 ????????? e0 ? e1 ? e2);
+ napply a4;
+nqed.
+
nlemma symmetric_neq : ∀T:Type.∀x,y:T.x ≠ y → y ≠ x.
#T; #x; #y;
nnormalize;
ndefinition associative : ∀A:Type.∀R:relationT A A.Prop ≝
λA.λR.∀x,y,z:A.R (R x y) z = R x (R y z).
-*)
-
-ninductive bool : Type ≝
- true : bool |
- false : bool.
-
-nlemma pippo : (true = false) → (false = true).
- #H; ndestruct.
-nqed.
num/byte8_lemmas.ma num/byte8.ma num/exadecim_lemmas.ma
freescale/opcode_base_lemmas_opcode.ma freescale/opcode_base.ma num/bool_lemmas.ma
freescale_tests/micro_tests4.ma freescale/multivm.ma freescale/status_lemmas.ma freescale_tests/micro_tests_tools.ma
-common/sigma.ma
+common/sigma.ma common/theory.ma
common/list_lemmas.ma common/list.ma
universe/universe.ma common/list.ma common/nat_lemmas.ma common/prod.ma
num/bitrigesim.ma num/bool.ma
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* BITRIGESIMALI *)
(* ************* *)
+(*
ndefinition bitrigesim_destruct_aux ≝
Πt1,t2:bitrigesim.ΠP:Prop.t1 = t2 →
match eq_bit t1 t2 with [ true ⇒ P → P | false ⇒ P ].
nnormalize;
napply (λx.x).
nqed.
+*)
nlemma eq_to_eqbit : ∀n1,n2.n1 = n2 → eq_bit n1 n2 = true.
#n1; #n2; #H;
##]
nqed.
-nlemma eqbit_to_eq1 : ∀t2.eq_bit t00 t2 = true → t00 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##1: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq2 : ∀t2.eq_bit t01 t2 = true → t01 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##2: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq3 : ∀t2.eq_bit t02 t2 = true → t02 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##3: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq4 : ∀t2.eq_bit t03 t2 = true → t03 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##4: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq5 : ∀t2.eq_bit t04 t2 = true → t04 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##5: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq6 : ∀t2.eq_bit t05 t2 = true → t05 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##6: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq7 : ∀t2.eq_bit t06 t2 = true → t06 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##7: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq8 : ∀t2.eq_bit t07 t2 = true → t07 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##8: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq9 : ∀t2.eq_bit t08 t2 = true → t08 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##9: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq10 : ∀t2.eq_bit t09 t2 = true → t09 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##10: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq11 : ∀t2.eq_bit t0A t2 = true → t0A = t2. #t2; ncases t2; nnormalize; #H; ##[ ##11: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq12 : ∀t2.eq_bit t0B t2 = true → t0B = t2. #t2; ncases t2; nnormalize; #H; ##[ ##12: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq13 : ∀t2.eq_bit t0C t2 = true → t0C = t2. #t2; ncases t2; nnormalize; #H; ##[ ##13: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq14 : ∀t2.eq_bit t0D t2 = true → t0D = t2. #t2; ncases t2; nnormalize; #H; ##[ ##14: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq15 : ∀t2.eq_bit t0E t2 = true → t0E = t2. #t2; ncases t2; nnormalize; #H; ##[ ##15: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq16 : ∀t2.eq_bit t0F t2 = true → t0F = t2. #t2; ncases t2; nnormalize; #H; ##[ ##16: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq17 : ∀t2.eq_bit t10 t2 = true → t10 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##17: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq18 : ∀t2.eq_bit t11 t2 = true → t11 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##18: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq19 : ∀t2.eq_bit t12 t2 = true → t12 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##19: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq20 : ∀t2.eq_bit t13 t2 = true → t13 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##20: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq21 : ∀t2.eq_bit t14 t2 = true → t14 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##21: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq22 : ∀t2.eq_bit t15 t2 = true → t15 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##22: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq23 : ∀t2.eq_bit t16 t2 = true → t16 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##23: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq24 : ∀t2.eq_bit t17 t2 = true → t17 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##24: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq25 : ∀t2.eq_bit t18 t2 = true → t18 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##25: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq26 : ∀t2.eq_bit t19 t2 = true → t19 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##26: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq27 : ∀t2.eq_bit t1A t2 = true → t1A = t2. #t2; ncases t2; nnormalize; #H; ##[ ##27: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq28 : ∀t2.eq_bit t1B t2 = true → t1B = t2. #t2; ncases t2; nnormalize; #H; ##[ ##28: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq29 : ∀t2.eq_bit t1C t2 = true → t1C = t2. #t2; ncases t2; nnormalize; #H; ##[ ##29: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq30 : ∀t2.eq_bit t1D t2 = true → t1D = t2. #t2; ncases t2; nnormalize; #H; ##[ ##30: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq31 : ∀t2.eq_bit t1E t2 = true → t1E = t2. #t2; ncases t2; nnormalize; #H; ##[ ##31: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
-nlemma eqbit_to_eq32 : ∀t2.eq_bit t1F t2 = true → t1F = t2. #t2; ncases t2; nnormalize; #H; ##[ ##32: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] nqed.
+nlemma eqbit_to_eq1 : ∀t2.eq_bit t00 t2 = true → t00 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##1: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq2 : ∀t2.eq_bit t01 t2 = true → t01 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##2: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq3 : ∀t2.eq_bit t02 t2 = true → t02 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##3: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq4 : ∀t2.eq_bit t03 t2 = true → t03 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##4: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq5 : ∀t2.eq_bit t04 t2 = true → t04 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##5: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq6 : ∀t2.eq_bit t05 t2 = true → t05 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##6: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq7 : ∀t2.eq_bit t06 t2 = true → t06 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##7: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq8 : ∀t2.eq_bit t07 t2 = true → t07 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##8: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq9 : ∀t2.eq_bit t08 t2 = true → t08 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##9: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq10 : ∀t2.eq_bit t09 t2 = true → t09 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##10: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq11 : ∀t2.eq_bit t0A t2 = true → t0A = t2. #t2; ncases t2; nnormalize; #H; ##[ ##11: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq12 : ∀t2.eq_bit t0B t2 = true → t0B = t2. #t2; ncases t2; nnormalize; #H; ##[ ##12: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq13 : ∀t2.eq_bit t0C t2 = true → t0C = t2. #t2; ncases t2; nnormalize; #H; ##[ ##13: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq14 : ∀t2.eq_bit t0D t2 = true → t0D = t2. #t2; ncases t2; nnormalize; #H; ##[ ##14: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq15 : ∀t2.eq_bit t0E t2 = true → t0E = t2. #t2; ncases t2; nnormalize; #H; ##[ ##15: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq16 : ∀t2.eq_bit t0F t2 = true → t0F = t2. #t2; ncases t2; nnormalize; #H; ##[ ##16: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq17 : ∀t2.eq_bit t10 t2 = true → t10 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##17: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq18 : ∀t2.eq_bit t11 t2 = true → t11 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##18: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq19 : ∀t2.eq_bit t12 t2 = true → t12 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##19: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq20 : ∀t2.eq_bit t13 t2 = true → t13 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##20: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq21 : ∀t2.eq_bit t14 t2 = true → t14 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##21: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq22 : ∀t2.eq_bit t15 t2 = true → t15 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##22: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq23 : ∀t2.eq_bit t16 t2 = true → t16 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##23: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq24 : ∀t2.eq_bit t17 t2 = true → t17 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##24: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq25 : ∀t2.eq_bit t18 t2 = true → t18 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##25: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq26 : ∀t2.eq_bit t19 t2 = true → t19 = t2. #t2; ncases t2; nnormalize; #H; ##[ ##26: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq27 : ∀t2.eq_bit t1A t2 = true → t1A = t2. #t2; ncases t2; nnormalize; #H; ##[ ##27: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq28 : ∀t2.eq_bit t1B t2 = true → t1B = t2. #t2; ncases t2; nnormalize; #H; ##[ ##28: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq29 : ∀t2.eq_bit t1C t2 = true → t1C = t2. #t2; ncases t2; nnormalize; #H; ##[ ##29: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq30 : ∀t2.eq_bit t1D t2 = true → t1D = t2. #t2; ncases t2; nnormalize; #H; ##[ ##30: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq31 : ∀t2.eq_bit t1E t2 = true → t1E = t2. #t2; ncases t2; nnormalize; #H; ##[ ##31: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
+nlemma eqbit_to_eq32 : ∀t2.eq_bit t1F t2 = true → t1F = t2. #t2; ncases t2; nnormalize; #H; ##[ ##32: napply refl_eq ##| ##*: ndestruct (*napply (bool_destruct … H)*) ##] nqed.
nlemma eqbit_to_eq : ∀t1,t2.eq_bit t1 t2 = true → t1 = t2.
#t1; ncases t1;
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* BOOLEANI *)
(* ******** *)
-(*ndefinition bool_destruct_aux ≝
+(*
+ndefinition bool_destruct_aux ≝
Πb1,b2:bool.ΠP:Prop.b1 = b2 →
match eq_bool b1 b2 with [ true ⇒ P → P | false ⇒ P ].
nelim b1;
nnormalize;
napply (λx.x).
-nqed.*)
+nqed.
+*)
nlemma symmetric_eqbool : symmetricT bool bool eq_bool.
#b1; #b2;
ncases b2;
nnormalize;
##[ ##1,4: #H; napply refl_eq
- ##| ##*: #H; napply (bool_destruct … H)
+ ##| ##*: #H; ndestruct (*napply (bool_destruct … H)*)
##]
nqed.
##| ##*: napply (or2_intro2 (? = ?) (? ≠ ?) …);
nnormalize; #H;
napply False_ind;
- napply (bool_destruct … H)
+ ndestruct (*napply (bool_destruct … H)*)
##]
nqed.
ncases b1;
ncases b2;
nnormalize;
- ##[ ##1,4: #H; napply (bool_destruct … H)
- ##| ##*: #H; #H1; napply (bool_destruct … H1)
+ ##[ ##1,4: #H; ndestruct (*napply (bool_destruct … H)*)
+ ##| ##*: #H; #H1; ndestruct (*napply (bool_destruct … H1)*)
##]
nqed.
nlemma eqfalse_to_neqtrue : ∀x.x = false → x ≠ true.
#x; nelim x;
- ##[ ##1: #H; napply (bool_destruct … H)
- ##| ##2: #H; nnormalize; #H1; napply (bool_destruct … H1)
+ ##[ ##1: #H; ndestruct (*napply (bool_destruct … H)*)
+ ##| ##2: #H; nnormalize; #H1; ndestruct (*napply (bool_destruct … H1)*)
##]
nqed.
nlemma eqtrue_to_neqfalse : ∀x.x = true → x ≠ false.
#x; nelim x;
- ##[ ##1: #H; nnormalize; #H1; napply (bool_destruct … H1)
- ##| ##2: #H; napply (bool_destruct … H)
+ ##[ ##1: #H; nnormalize; #H1; ndestruct (*napply (bool_destruct … H1)*)
+ ##| ##2: #H; ndestruct (*napply (bool_destruct … H)*)
##]
nqed.
ncases b2;
nnormalize;
##[ ##1,2: #H; napply refl_eq
- ##| ##*: #H; napply (bool_destruct … H)
+ ##| ##*: #H; ndestruct (*napply (bool_destruct … H)*)
##]
nqed.
ncases b2;
nnormalize;
##[ ##1,3: #H; napply refl_eq
- ##| ##*: #H; napply (bool_destruct … H)
+ ##| ##*: #H; ndestruct (*napply (bool_destruct … H)*)
##]
nqed.
ncases b1;
ncases b2;
nnormalize;
- ##[ ##1: #H; napply (bool_destruct … H)
+ ##[ ##1: #H; ndestruct (*napply (bool_destruct … H)*)
##| ##2,4: #H; napply (or2_intro2 … H)
##| ##3: #H; napply (or2_intro1 … H)
##]
ncases b2;
ncases b3;
nnormalize;
- ##[ ##1: #H; napply (bool_destruct … H)
+ ##[ ##1: #H; ndestruct (*napply (bool_destruct … H)*)
##| ##5,6,7,8: #H; napply (or3_intro1 … H)
##| ##2,4: #H; napply (or3_intro3 … H)
##| ##3: #H; napply (or3_intro2 … H)
ncases b3;
ncases b4;
nnormalize;
- ##[ ##1: #H; napply (bool_destruct … H)
+ ##[ ##1: #H; ndestruct (*napply (bool_destruct … H)*)
##| ##9,10,11,12,13,14,15,16: #H; napply (or4_intro1 … H)
##| ##5,6,7,8: #H; napply (or4_intro2 … H)
##| ##3,4: #H; napply (or4_intro3 … H)
ncases b4;
ncases b5;
nnormalize;
- ##[ ##1: #H; napply (bool_destruct … H)
+ ##[ ##1: #H; ndestruct (*napply (bool_destruct … H)*)
##| ##17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32: #H; napply (or5_intro1 … H)
##| ##9,10,11,12,13,14,15,16: #H; napply (or5_intro2 … H)
##| ##5,6,7,8: #H; napply (or5_intro3 … H)
ncases b2;
nnormalize;
##[ ##4: #H; napply refl_eq
- ##| ##*: #H; napply (bool_destruct … H)
+ ##| ##*: #H; ndestruct (*napply (bool_destruct … H)*)
##]
nqed.
ncases b2;
nnormalize;
##[ ##4: #H; napply refl_eq
- ##| ##*: #H; napply (bool_destruct … H)
+ ##| ##*: #H; ndestruct (*napply (bool_destruct … H)*)
##]
nqed.
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* ESADECIMALI *)
(* *********** *)
+(*
ndefinition exadecim_destruct_aux ≝
Πe1,e2.ΠP:Prop.ΠH:e1 = e2.
match eq_ex e1 e2 with [ true ⇒ P → P | false ⇒ P ].
nnormalize;
napply (λx.x).
nqed.
+*)
nlemma symmetric_andex : symmetricT exadecim exadecim and_ex.
#e1; #e2;
ncases n2;
nnormalize;
##[ ##1,18,35,52,69,86,103,120,137,154,171,188,205,222,239,256: #H; napply refl_eq
- ##| ##*: #H; napply (bool_destruct … H)
+ ##| ##*: #H; ndestruct (*napply (bool_destruct … H)*)
##]
nqed.
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* OTTALI *)
(* ****** *)
+(*
ndefinition oct_destruct_aux ≝
Πn1,n2:oct.ΠP:Prop.n1 = n2 →
match eq_oct n1 n2 with [ true ⇒ P → P | false ⇒ P ].
nnormalize;
napply (λx.x).
nqed.
+*)
nlemma eq_to_eqoct : ∀n1,n2.n1 = n2 → eq_oct n1 n2 = true.
#n1; #n2; #H;
ncases n2;
nnormalize;
##[ ##1,10,19,28,37,46,55,64: #H; napply refl_eq
- ##| ##*: #H; napply (bool_destruct … H)
+ ##| ##*: #H; ndestruct (*napply (bool_destruct … H)*)
##]
nqed.
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* QUATERNARI *)
(* ********** *)
+(*
ndefinition quatern_destruct_aux ≝
Πn1,n2:quatern.ΠP:Prop.n1 = n2 →
match eq_qu n1 n2 with [ true ⇒ P → P | false ⇒ P ].
nnormalize;
napply (λx.x).
nqed.
+*)
nlemma eq_to_eqqu : ∀n1,n2.n1 = n2 → eq_qu n1 n2 = true.
#n1; #n2; #H;
ncases n2;
nnormalize;
##[ ##1,6,11,16: #H; napply refl_eq
- ##| ##*: #H; napply (bool_destruct … H)
+ ##| ##*: #H; ndestruct (*napply (bool_destruct … H)*)
##]
nqed.
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)
(* Progetto FreeScale *)
(* *)
(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
-(* Ultima modifica: 05/08/2009 *)
+(* Sviluppo: 2008-2010 *)
(* *)
(* ********************************************************************** *)