]> matita.cs.unibo.it Git - helm.git/commitdiff
freescale porting
authorCosimo Oliboni <??>
Thu, 28 Jan 2010 00:42:24 +0000 (00:42 +0000)
committerCosimo Oliboni <??>
Thu, 28 Jan 2010 00:42:24 +0000 (00:42 +0000)
26 files changed:
helm/software/matita/contribs/ng_assembly/common/ascii_lemmas.ma
helm/software/matita/contribs/ng_assembly/depends
helm/software/matita/contribs/ng_assembly/emulator/memory/memory_struct_lemmas.ma [new file with mode: 0755]
helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC05_instr_mode_lemmas.ma [new file with mode: 0755]
helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC05_opcode_lemmas.ma [new file with mode: 0755]
helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC05_table_tests.ma
helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC08_instr_mode_lemmas.ma [new file with mode: 0755]
helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC08_opcode_lemmas.ma [new file with mode: 0755]
helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC08_table_tests.ma
helm/software/matita/contribs/ng_assembly/emulator/opcodes/HCS08_opcode_lemmas.ma [new file with mode: 0755]
helm/software/matita/contribs/ng_assembly/emulator/opcodes/HCS08_table_tests.ma
helm/software/matita/contribs/ng_assembly/emulator/opcodes/IP2022_instr_mode_lemmas.ma [new file with mode: 0755]
helm/software/matita/contribs/ng_assembly/emulator/opcodes/IP2022_opcode_lemmas.ma [new file with mode: 0755]
helm/software/matita/contribs/ng_assembly/emulator/opcodes/IP2022_table_tests.ma
helm/software/matita/contribs/ng_assembly/emulator/opcodes/RS08_instr_mode_lemmas.ma [new file with mode: 0755]
helm/software/matita/contribs/ng_assembly/emulator/opcodes/RS08_opcode_lemmas.ma [new file with mode: 0755]
helm/software/matita/contribs/ng_assembly/emulator/opcodes/RS08_table_tests.ma
helm/software/matita/contribs/ng_assembly/emulator/opcodes/opcode_lemmas.ma [new file with mode: 0755]
helm/software/matita/contribs/ng_assembly/emulator/status/HC05_status_lemmas.ma [new file with mode: 0755]
helm/software/matita/contribs/ng_assembly/emulator/status/HC08_status_lemmas.ma [new file with mode: 0755]
helm/software/matita/contribs/ng_assembly/emulator/status/IP2022_status_lemmas.ma [new file with mode: 0755]
helm/software/matita/contribs/ng_assembly/emulator/status/RS08_status_lemmas.ma [new file with mode: 0755]
helm/software/matita/contribs/ng_assembly/emulator/status/status.ma
helm/software/matita/contribs/ng_assembly/emulator/status/status_lemmas.ma [new file with mode: 0755]
helm/software/matita/contribs/ng_assembly/num/bitrigesim_lemmas.ma
helm/software/matita/contribs/ng_assembly/num/word24_lemmas.ma [new file with mode: 0755]

index dd1eec486cf43a36f58fa6f4a465fe9e5398b510..fff2c748b89b841cf740b299b2ceac0a9809bb2a 100755 (executable)
@@ -57,105 +57,8 @@ nlemma neqascii_to_neq : ∀n1,n2.eq_ascii n1 n2 = false → n1 ≠ n2.
  ##]
 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;
- ##[ ##1: napply eqascii_to_eq1 ##| ##2: napply eqascii_to_eq2
- ##| ##3: napply eqascii_to_eq3 ##| ##4: napply eqascii_to_eq4
- ##| ##5: napply eqascii_to_eq5 ##| ##6: napply eqascii_to_eq6
- ##| ##7: napply eqascii_to_eq7 ##| ##8: napply eqascii_to_eq8 
- ##| ##9: napply eqascii_to_eq9 ##| ##10: napply eqascii_to_eq10
- ##| ##11: napply eqascii_to_eq11 ##| ##12: napply eqascii_to_eq12 
- ##| ##13: napply eqascii_to_eq13 ##| ##14: napply eqascii_to_eq14 
- ##| ##15: napply eqascii_to_eq15 ##| ##16: napply eqascii_to_eq16 
- ##| ##17: napply eqascii_to_eq17 ##| ##18: napply eqascii_to_eq18
- ##| ##19: napply eqascii_to_eq19 ##| ##20: napply eqascii_to_eq20 
- ##| ##21: napply eqascii_to_eq21 ##| ##22: napply eqascii_to_eq22 
- ##| ##23: napply eqascii_to_eq23 ##| ##24: napply eqascii_to_eq24 
- ##| ##25: napply eqascii_to_eq25 ##| ##26: napply eqascii_to_eq26
- ##| ##27: napply eqascii_to_eq27 ##| ##28: napply eqascii_to_eq28
- ##| ##29: napply eqascii_to_eq29 ##| ##30: napply eqascii_to_eq30 
- ##| ##31: napply eqascii_to_eq31 ##| ##32: napply eqascii_to_eq32 
- ##| ##33: napply eqascii_to_eq33 ##| ##34: napply eqascii_to_eq34
- ##| ##35: napply eqascii_to_eq35 ##| ##36: napply eqascii_to_eq36
- ##| ##37: napply eqascii_to_eq37 ##| ##38: napply eqascii_to_eq38
- ##| ##39: napply eqascii_to_eq39 ##| ##40: napply eqascii_to_eq40
- ##| ##41: napply eqascii_to_eq41 ##| ##42: napply eqascii_to_eq42
- ##| ##43: napply eqascii_to_eq43 ##| ##44: napply eqascii_to_eq44 
- ##| ##45: napply eqascii_to_eq45 ##| ##46: napply eqascii_to_eq46
- ##| ##47: napply eqascii_to_eq47 ##| ##48: napply eqascii_to_eq48 
- ##| ##49: napply eqascii_to_eq49 ##| ##50: napply eqascii_to_eq50
- ##| ##51: napply eqascii_to_eq51 ##| ##52: napply eqascii_to_eq52
- ##| ##53: napply eqascii_to_eq53 ##| ##54: napply eqascii_to_eq54 
- ##| ##55: napply eqascii_to_eq55 ##| ##56: napply eqascii_to_eq56
- ##| ##57: napply eqascii_to_eq57 ##| ##58: napply eqascii_to_eq58
- ##| ##59: napply eqascii_to_eq59 ##| ##60: napply eqascii_to_eq60 
- ##| ##61: napply eqascii_to_eq61 ##| ##62: napply eqascii_to_eq62 
- ##| ##63: napply eqascii_to_eq63 ##]
-nqed.
+(* !!! per brevita... *)
+naxiom eqascii_to_eq : ∀c1,c2.eq_ascii c1 c2 = true → c1 = c2.
 
 nlemma neq_to_neqascii : ∀n1,n2.n1 ≠ n2 → eq_ascii n1 n2 = false.
  #n1; #n2; #H;
index 4a375a0204b69b041d32205c82f4d493096d5861..32007179e547355b4c5ad7f99f18d47ea2aea4e5 100644 (file)
@@ -1,27 +1,35 @@
+num/word24_lemmas.ma num/byte8_lemmas.ma num/word24.ma
 emulator/model/HCS08_model.ma emulator/status/status.ma
 common/prod_lemmas.ma common/prod.ma num/bool_lemmas.ma
 emulator/opcodes/HC05_table_tests.ma emulator/opcodes/HC05_table.ma emulator/opcodes/opcode.ma
 num/bool.ma common/theory.ma
 compiler/preast_tree.ma common/string.ma compiler/ast_type.ma num/word32.ma
+emulator/status/RS08_status_lemmas.ma emulator/status/RS08_status.ma num/word16_lemmas.ma
 emulator/status/HC08_status.ma num/word16.ma
 common/nat.ma num/bool.ma
 common/nat_to_num.ma common/nat.ma num/word32.ma
 common/string_lemmas.ma common/ascii_lemmas.ma common/list_utility_lemmas.ma common/string.ma
 compiler/ast_type_lemmas.ma common/list_utility_lemmas.ma compiler/ast_type.ma
+emulator/memory/memory_struct_lemmas.ma emulator/memory/memory_struct.ma num/bool_lemmas.ma
 num/quatern.ma num/bool.ma
 num/exadecim.ma common/prod.ma num/bool.ma num/oct.ma num/quatern.ma
+emulator/status/IP2022_status_lemmas.ma emulator/memory/memory_struct_lemmas.ma emulator/status/IP2022_status.ma num/oct_lemmas.ma num/word16_lemmas.ma num/word24_lemmas.ma
 num/bitrigesim_lemmas.ma num/bitrigesim.ma num/bool_lemmas.ma
+emulator/status/status_lemmas.ma emulator/status/HC05_status_lemmas.ma emulator/status/HC08_status_lemmas.ma emulator/status/IP2022_status_lemmas.ma emulator/status/RS08_status_lemmas.ma
 emulator/status/status.ma emulator/memory/memory_abs.ma emulator/opcodes/opcode.ma emulator/status/HC05_status.ma emulator/status/HC08_status.ma emulator/status/IP2022_status.ma emulator/status/RS08_status.ma
 num/byte8.ma common/nat.ma num/bitrigesim.ma num/comp_num.ma num/exadecim.ma
 emulator/model/model.ma emulator/model/HC05_model.ma emulator/model/HC08_model.ma emulator/model/HCS08_model.ma emulator/model/IP2022_model.ma emulator/model/RS08_model.ma
 emulator/opcodes/HC08_table.ma common/list.ma emulator/opcodes/HC08_instr_mode.ma emulator/opcodes/HC08_opcode.ma emulator/opcodes/byte_or_word.ma
 common/nat_lemmas.ma common/nat.ma num/bool_lemmas.ma
+emulator/opcodes/RS08_opcode_lemmas.ma emulator/opcodes/RS08_opcode.ma num/bool_lemmas.ma
 emulator/opcodes/HC05_table.ma common/list.ma emulator/opcodes/HC05_instr_mode.ma emulator/opcodes/HC05_opcode.ma emulator/opcodes/byte_or_word.ma
 common/list_utility_lemmas.ma common/list_lemmas.ma common/list_utility.ma
 emulator/translation/HCS08_translation.ma emulator/translation/translation_base.ma
 emulator/memory/memory_trees.ma common/list.ma common/option.ma emulator/memory/memory_struct.ma num/word32.ma
 emulator/opcodes/IP2022_opcode.ma num/bool.ma
+emulator/opcodes/HCS08_opcode_lemmas.ma emulator/opcodes/HCS08_opcode.ma num/bool_lemmas.ma
 num/word32_lemmas.ma num/word16_lemmas.ma num/word32.ma
+emulator/opcodes/HC08_opcode_lemmas.ma emulator/opcodes/HC08_opcode.ma num/bool_lemmas.ma
 emulator/opcodes/RS08_table_tests.ma emulator/opcodes/RS08_table.ma emulator/opcodes/opcode.ma
 test_errori.ma 
 compiler/environment.ma common/string.ma compiler/ast_type.ma
@@ -35,22 +43,26 @@ common/string.ma common/ascii.ma common/list_utility.ma
 emulator/opcodes/byte_or_word.ma num/word16.ma
 compiler/ast_type.ma common/list_utility.ma
 num/word16.ma num/byte8.ma
-emulator/opcodes/IP2022_instr_mode.ma num/word16.ma
-emulator/translation/HC08_translation.ma emulator/translation/translation_base.ma
 common/prod.ma num/bool.ma
+emulator/translation/HC08_translation.ma emulator/translation/translation_base.ma
+emulator/opcodes/IP2022_instr_mode.ma num/word16.ma
 emulator/opcodes/HCS08_opcode.ma num/bool.ma
 emulator/opcodes/HC08_opcode.ma num/bool.ma
 num/exadecim_lemmas.ma num/bool_lemmas.ma num/exadecim.ma
 num/word16_lemmas.ma num/byte8_lemmas.ma num/word16.ma
+emulator/status/HC05_status_lemmas.ma emulator/status/HC05_status.ma num/word16_lemmas.ma
 emulator/status/status_getter.ma emulator/status/status_setter.ma
+emulator/opcodes/opcode_lemmas.ma emulator/opcodes/HC05_instr_mode_lemmas.ma emulator/opcodes/HC05_opcode_lemmas.ma emulator/opcodes/HC08_instr_mode_lemmas.ma emulator/opcodes/HC08_opcode_lemmas.ma emulator/opcodes/HCS08_opcode_lemmas.ma emulator/opcodes/IP2022_instr_mode_lemmas.ma emulator/opcodes/IP2022_opcode_lemmas.ma emulator/opcodes/RS08_instr_mode_lemmas.ma emulator/opcodes/RS08_opcode_lemmas.ma emulator/opcodes/opcode.ma
 num/word24.ma num/byte8.ma
 num/bool_lemmas.ma num/bool.ma
+emulator/opcodes/HC08_instr_mode_lemmas.ma emulator/opcodes/HC08_instr_mode.ma num/bool_lemmas.ma num/oct_lemmas.ma
 emulator/model/HC08_model.ma emulator/status/status.ma
 emulator/memory/memory_abs.ma emulator/memory/memory_bits.ma emulator/memory/memory_func.ma emulator/memory/memory_trees.ma
 emulator/opcodes/RS08_opcode.ma num/bool.ma
 num/oct_lemmas.ma num/bool_lemmas.ma num/oct.ma
-emulator/memory/memory_struct.ma num/byte8.ma num/oct.ma
 emulator/translation/RS08_translation.ma emulator/translation/translation_base.ma
+emulator/memory/memory_struct.ma num/byte8.ma num/oct.ma
+emulator/opcodes/HC05_instr_mode_lemmas.ma emulator/opcodes/HC05_instr_mode.ma num/bool_lemmas.ma num/oct_lemmas.ma
 emulator/model/HC05_model.ma emulator/status/status.ma
 emulator/status/status_setter.ma emulator/status/status.ma
 emulator/translation/HC05_translation.ma emulator/translation/translation_base.ma
@@ -66,23 +78,28 @@ emulator/memory/memory_func.ma common/list.ma common/option.ma emulator/memory/m
 emulator/opcodes/RS08_instr_mode.ma num/word16.ma
 num/comp_num_lemmas.ma num/bool_lemmas.ma num/comp_num.ma
 emulator/status/RS08_status.ma num/word16.ma
+emulator/opcodes/HC05_opcode_lemmas.ma emulator/opcodes/HC05_opcode.ma num/bool_lemmas.ma
 emulator/opcodes/HC08_instr_mode.ma num/word16.ma
 emulator/opcodes/opcode.ma common/list.ma emulator/opcodes/HC05_instr_mode.ma emulator/opcodes/HC05_opcode.ma emulator/opcodes/HC08_instr_mode.ma emulator/opcodes/HC08_opcode.ma emulator/opcodes/HCS08_opcode.ma emulator/opcodes/IP2022_instr_mode.ma emulator/opcodes/IP2022_opcode.ma emulator/opcodes/RS08_instr_mode.ma emulator/opcodes/RS08_opcode.ma emulator/opcodes/byte_or_word.ma
-common/option.ma num/bool.ma
 common/option_lemmas.ma common/option.ma num/bool_lemmas.ma
+common/option.ma num/bool.ma
 num/byte8_lemmas.ma num/byte8.ma num/comp_num_lemmas.ma num/exadecim_lemmas.ma
-emulator/opcodes/RS08_table.ma common/list.ma emulator/opcodes/RS08_instr_mode.ma emulator/opcodes/RS08_opcode.ma emulator/opcodes/byte_or_word.ma
 emulator/model/RS08_model.ma emulator/status/status.ma
+emulator/opcodes/IP2022_opcode_lemmas.ma emulator/opcodes/IP2022_opcode.ma num/bool_lemmas.ma
+emulator/opcodes/RS08_table.ma common/list.ma emulator/opcodes/RS08_instr_mode.ma emulator/opcodes/RS08_opcode.ma emulator/opcodes/byte_or_word.ma
 num/comp_num.ma num/exadecim.ma
 common/sigma.ma common/theory.ma
 common/list_lemmas.ma common/list.ma
+emulator/status/HC08_status_lemmas.ma emulator/status/HC08_status.ma num/word16_lemmas.ma
 emulator/opcodes/HCS08_table.ma common/list.ma emulator/opcodes/HC08_instr_mode.ma emulator/opcodes/HCS08_opcode.ma emulator/opcodes/byte_or_word.ma
 emulator/translation/IP2022_translation.ma emulator/translation/translation_base.ma
 universe/universe.ma common/list.ma common/nat_lemmas.ma common/prod.ma
 num/bitrigesim.ma num/bool.ma
 common/list_utility.ma common/list.ma common/nat_lemmas.ma common/option.ma
 emulator/translation/translation.ma emulator/translation/HC05_translation.ma emulator/translation/HC08_translation.ma emulator/translation/HCS08_translation.ma emulator/translation/IP2022_translation.ma emulator/translation/RS08_translation.ma
+emulator/opcodes/IP2022_instr_mode_lemmas.ma emulator/opcodes/IP2022_instr_mode.ma num/bitrigesim_lemmas.ma num/bool_lemmas.ma num/oct_lemmas.ma
 num/oct.ma num/bool.ma
 common/list.ma common/theory.ma
+emulator/opcodes/RS08_instr_mode_lemmas.ma emulator/opcodes/RS08_instr_mode.ma num/bitrigesim_lemmas.ma num/bool_lemmas.ma num/exadecim_lemmas.ma num/oct_lemmas.ma
 emulator/opcodes/HC08_table_tests.ma emulator/opcodes/HC08_table.ma emulator/opcodes/opcode.ma
 emulator/opcodes/HC05_opcode.ma num/bool.ma
diff --git a/helm/software/matita/contribs/ng_assembly/emulator/memory/memory_struct_lemmas.ma b/helm/software/matita/contribs/ng_assembly/emulator/memory/memory_struct_lemmas.ma
new file mode 100755 (executable)
index 0000000..92b4ccc
--- /dev/null
@@ -0,0 +1,980 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* ********************************************************************** *)
+(*                          Progetto FreeScale                            *)
+(*                                                                        *)
+(*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
+(*   Sviluppo: 2008-2010                                                  *)
+(*                                                                        *)
+(* ********************************************************************** *)
+
+include "emulator/memory/memory_struct.ma".
+include "num/bool_lemmas.ma".
+
+(* **************** *)
+(* TIPO ARRAY DA 16 *)
+(* **************** *)
+
+nlemma ar16_destruct_1 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x1 = y1.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_Array16T a _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ⇒ x1 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar16_destruct_2 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x2 = y2.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_Array16T _ a _ _ _ _ _ _ _ _ _ _ _ _ _ _ ⇒ x2 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar16_destruct_3 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x3 = y3.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_Array16T _ _ a _ _ _ _ _ _ _ _ _ _ _ _ _ ⇒ x3 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar16_destruct_4 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x4 = y4.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_Array16T _ _ _ a _ _ _ _ _ _ _ _ _ _ _ _ ⇒ x4 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar16_destruct_5 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x5 = y5.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_Array16T _ _ _ _ a _ _ _ _ _ _ _ _ _ _ _ ⇒ x5 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar16_destruct_6 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x6 = y6.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_Array16T _ _ _ _ _ a _ _ _ _ _ _ _ _ _ _ ⇒ x6 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar16_destruct_7 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x7 = y7.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_Array16T _ _ _ _ _ _ a _ _ _ _ _ _ _ _ _ ⇒ x7 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar16_destruct_8 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x8 = y8.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_Array16T _ _ _ _ _ _ _ a _ _ _ _ _ _ _ _ ⇒ x8 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar16_destruct_9 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x9 = y9.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_Array16T _ _ _ _ _ _ _ _ a _ _ _ _ _ _ _ ⇒ x9 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar16_destruct_10 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x10 = y10.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_Array16T _ _ _ _ _ _ _ _ _ a _ _ _ _ _ _ ⇒ x10 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar16_destruct_11 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x11 = y11.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_Array16T _ _ _ _ _ _ _ _ _ _ a _ _ _ _ _ ⇒ x11 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar16_destruct_12 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x12 = y12.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_Array16T _ _ _ _ _ _ _ _ _ _ _ a _ _ _ _ ⇒ x12 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar16_destruct_13 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x13 = y13.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_Array16T _ _ _ _ _ _ _ _ _ _ _ _ a _ _ _ ⇒ x13 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar16_destruct_14 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x14 = y14.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_Array16T _ _ _ _ _ _ _ _ _ _ _ _ _ a _ _ ⇒ x14 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar16_destruct_15 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x15 = y15.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_Array16T _ _ _ _ _ _ _ _ _ _ _ _ _ _ a _ ⇒ x15 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar16_destruct_16 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x16 = y16.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_Array16T _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ a ⇒ x16 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma symmetric_eqar16 :
+∀T.∀f:T → T → bool.
+ (symmetricT T bool f) →
+ (symmetricT (Array16T T) bool (eq_ar16 T f)).
+ #T; #f; #H;
+ #alu1; ncases alu1;
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #alu2; ncases alu2;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nchange with (
+  ((f x1 y1) ⊗ (f x2 y2) ⊗ (f x3 y3) ⊗ (f x4 y4) ⊗
+   (f x5 y5) ⊗ (f x6 y6) ⊗ (f x7 y7) ⊗ (f x8 y8) ⊗
+   (f x9 y9) ⊗ (f x10 y10) ⊗ (f x11 y11) ⊗ (f x12 y12) ⊗
+   (f x13 y13) ⊗ (f x14 y14) ⊗ (f x15 y15) ⊗ (f x16 y16)) =
+  ((f y1 x1) ⊗ (f y2 x2) ⊗ (f y3 x3) ⊗ (f y4 x4) ⊗
+   (f y5 x5) ⊗ (f y6 x6) ⊗ (f y7 x7) ⊗ (f y8 x8) ⊗
+   (f y9 x9) ⊗ (f y10 x10) ⊗ (f y11 x11) ⊗ (f y12 x12) ⊗
+   (f y13 x13) ⊗ (f y14 x14) ⊗ (f y15 x15) ⊗ (f y16 x16)));
+ nrewrite > (H x1 y1);
+ nrewrite > (H x2 y2);
+ nrewrite > (H x3 y3);
+ nrewrite > (H x4 y4);
+ nrewrite > (H x5 y5);
+ nrewrite > (H x6 y6);
+ nrewrite > (H x7 y7);
+ nrewrite > (H x8 y8);
+ nrewrite > (H x9 y9);
+ nrewrite > (H x10 y10);
+ nrewrite > (H x11 y11);
+ nrewrite > (H x12 y12);
+ nrewrite > (H x13 y13);
+ nrewrite > (H x14 y14);
+ nrewrite > (H x15 y15);
+ nrewrite > (H x16 y16);
+ napply refl_eq.
+nqed.
+
+nlemma eqar16_to_eq :
+∀T.∀f:T → T → bool.
+ (∀x,y.(f x y = true) → (x = y)) →
+ (∀a1,a2:Array16T T.(eq_ar16 T f a1 a2 = true) → (a1 = a2)).
+ #T; #f; #H;
+ #alu1; ncases alu1;
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #alu2; ncases alu2;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H1;
+ nchange in H1:(%) with (
+  ((f x1 y1) ⊗ (f x2 y2) ⊗ (f x3 y3) ⊗ (f x4 y4) ⊗
+   (f x5 y5) ⊗ (f x6 y6) ⊗ (f x7 y7) ⊗ (f x8 y8) ⊗
+   (f x9 y9) ⊗ (f x10 y10) ⊗ (f x11 y11) ⊗ (f x12 y12) ⊗
+   (f x13 y13) ⊗ (f x14 y14) ⊗ (f x15 y15) ⊗ (f x16 y16)) = true);
+ nrewrite > (H … (andb_true_true_r … H1));
+ nletin H2 ≝ (andb_true_true_l … H1);
+ nrewrite > (H … (andb_true_true_r … H2));
+ nletin H3 ≝ (andb_true_true_l … H2);
+ nrewrite > (H … (andb_true_true_r … H3));
+ nletin H4 ≝ (andb_true_true_l … H3);
+ nrewrite > (H … (andb_true_true_r … H4));
+ nletin H5 ≝ (andb_true_true_l … H4);
+ nrewrite > (H … (andb_true_true_r … H5));
+ nletin H6 ≝ (andb_true_true_l … H5);
+ nrewrite > (H … (andb_true_true_r … H6));
+ nletin H7 ≝ (andb_true_true_l … H6);
+ nrewrite > (H … (andb_true_true_r … H7));
+ nletin H8 ≝ (andb_true_true_l … H7);
+ nrewrite > (H … (andb_true_true_r … H8));
+ nletin H9 ≝ (andb_true_true_l … H8);
+ nrewrite > (H … (andb_true_true_r … H9));
+ nletin H10 ≝ (andb_true_true_l … H9);
+ nrewrite > (H … (andb_true_true_r … H10));
+ nletin H11 ≝ (andb_true_true_l … H10);
+ nrewrite > (H … (andb_true_true_r … H11));
+ nletin H12 ≝ (andb_true_true_l … H11);
+ nrewrite > (H … (andb_true_true_r … H12));
+ nletin H13 ≝ (andb_true_true_l … H12);
+ nrewrite > (H … (andb_true_true_r … H13));
+ nletin H14 ≝ (andb_true_true_l … H13);
+ nrewrite > (H … (andb_true_true_r … H14));
+ nletin H15 ≝ (andb_true_true_l … H14);
+ nrewrite > (H … (andb_true_true_r … H15));
+ nrewrite > (H … (andb_true_true_l … H15));
+ napply refl_eq.
+nqed.
+
+nlemma eq_to_eqar16 :
+∀T.∀f:T → T → bool.
+ (∀x,y.(x = y) → (f x y = true)) →
+ (∀a1,a2:Array16T T.(a1 = a2) → (eq_ar16 T f a1 a2 = true)).
+ #T; #f; #H;
+ #alu1; ncases alu1;
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #alu2; ncases alu2;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H1;
+ nrewrite > (ar16_destruct_1 … H1);
+ nrewrite > (ar16_destruct_2 … H1);
+ nrewrite > (ar16_destruct_3 … H1);
+ nrewrite > (ar16_destruct_4 … H1);
+ nrewrite > (ar16_destruct_5 … H1);
+ nrewrite > (ar16_destruct_6 … H1);
+ nrewrite > (ar16_destruct_7 … H1);
+ nrewrite > (ar16_destruct_8 … H1);
+ nrewrite > (ar16_destruct_9 … H1);
+ nrewrite > (ar16_destruct_10 … H1);
+ nrewrite > (ar16_destruct_11 … H1);
+ nrewrite > (ar16_destruct_12 … H1);
+ nrewrite > (ar16_destruct_13 … H1);
+ nrewrite > (ar16_destruct_14 … H1);
+ nrewrite > (ar16_destruct_15 … H1);
+ nrewrite > (ar16_destruct_16 … H1);
+ nchange with (
+  ((f y1 y1) ⊗ (f y2 y2) ⊗ (f y3 y3) ⊗ (f y4 y4) ⊗
+   (f y5 y5) ⊗ (f y6 y6) ⊗ (f y7 y7) ⊗ (f y8 y8) ⊗
+   (f y9 y9) ⊗ (f y10 y10) ⊗ (f y11 y11) ⊗ (f y12 y12) ⊗
+   (f y13 y13) ⊗ (f y14 y14) ⊗ (f y15 y15) ⊗ (f y16 y16)) = true);
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ napply refl_eq.
+nqed.
+
+nlemma decidable_ar16_aux1 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ (x1 ≠ y1) →
+ (mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (ar16_destruct_1 … H1)).
+nqed.
+
+nlemma decidable_ar16_aux2 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ (x2 ≠ y2) →
+ (mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (ar16_destruct_2 … H1)).
+nqed.
+
+nlemma decidable_ar16_aux3 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ (x3 ≠ y3) →
+ (mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (ar16_destruct_3 … H1)).
+nqed.
+
+nlemma decidable_ar16_aux4 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ (x4 ≠ y4) →
+ (mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (ar16_destruct_4 … H1)).
+nqed.
+
+nlemma decidable_ar16_aux5 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ (x5 ≠ y5) →
+ (mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (ar16_destruct_5 … H1)).
+nqed.
+
+nlemma decidable_ar16_aux6 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ (x6 ≠ y6) →
+ (mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (ar16_destruct_6 … H1)).
+nqed.
+
+nlemma decidable_ar16_aux7 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ (x7 ≠ y7) →
+ (mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (ar16_destruct_7 … H1)).
+nqed.
+
+nlemma decidable_ar16_aux8 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ (x8 ≠ y8) →
+ (mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (ar16_destruct_8 … H1)).
+nqed.
+
+nlemma decidable_ar16_aux9 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ (x9 ≠ y9) →
+ (mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (ar16_destruct_9 … H1)).
+nqed.
+
+nlemma decidable_ar16_aux10 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ (x10 ≠ y10) →
+ (mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (ar16_destruct_10 … H1)).
+nqed.
+
+nlemma decidable_ar16_aux11 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ (x11 ≠ y11) →
+ (mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (ar16_destruct_11 … H1)).
+nqed.
+
+nlemma decidable_ar16_aux12 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ (x12 ≠ y12) →
+ (mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (ar16_destruct_12 … H1)).
+nqed.
+
+nlemma decidable_ar16_aux13 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ (x13 ≠ y13) →
+ (mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (ar16_destruct_13 … H1)).
+nqed.
+
+nlemma decidable_ar16_aux14 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ (x14 ≠ y14) →
+ (mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (ar16_destruct_14 … H1)).
+nqed.
+
+nlemma decidable_ar16_aux15 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ (x15 ≠ y15) →
+ (mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (ar16_destruct_15 … H1)).
+nqed.
+
+nlemma decidable_ar16_aux16 :
+∀T.
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:T.
+∀y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16:T.
+ (x16 ≠ y16) →
+ (mk_Array16T T x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_Array16T T y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (ar16_destruct_16 … H1)).
+nqed.
+
+nlemma decidable_ar16 :
+∀T.(∀x,y:T.decidable (x = y)) →
+   (∀a1,a2:Array16T T.decidable (a1 = a2)).
+ #T; #H;
+ #x; nelim x; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y; nelim y; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize;
+ napply (or2_elim (? = ?) (? ≠ ?) ? (H x1 y1) …);
+ ##[ ##2: #H1; napply (or2_intro2 … (decidable_ar16_aux1 T … H1))
+ ##| ##1: #H1; napply (or2_elim (? = ?) (? ≠ ?) ? (H x2 y2) …);
+  ##[ ##2: #H2; napply (or2_intro2 … (decidable_ar16_aux2 T … H2))
+  ##| ##1: #H2; napply (or2_elim (? = ?) (? ≠ ?) ? (H x3 y3) …);
+   ##[ ##2: #H3; napply (or2_intro2 … (decidable_ar16_aux3 T … H3))
+   ##| ##1: #H3; napply (or2_elim (? = ?) (? ≠ ?) ? (H x4 y4) …);
+    ##[ ##2: #H4; napply (or2_intro2 … (decidable_ar16_aux4 T … H4))
+    ##| ##1: #H4; napply (or2_elim (? = ?) (? ≠ ?) ? (H x5 y5) …);
+     ##[ ##2: #H5; napply (or2_intro2 … (decidable_ar16_aux5 T … H5))
+     ##| ##1: #H5; napply (or2_elim (? = ?) (? ≠ ?) ? (H x6 y6) …);
+      ##[ ##2: #H6; napply (or2_intro2 … (decidable_ar16_aux6 T … H6))
+      ##| ##1: #H6; napply (or2_elim (? = ?) (? ≠ ?) ? (H x7 y7) …);
+       ##[ ##2: #H7; napply (or2_intro2 … (decidable_ar16_aux7 T … H7))
+       ##| ##1: #H7; napply (or2_elim (? = ?) (? ≠ ?) ? (H x8 y8) …);
+        ##[ ##2: #H8; napply (or2_intro2 … (decidable_ar16_aux8 T … H8))
+        ##| ##1: #H8; napply (or2_elim (? = ?) (? ≠ ?) ? (H x9 y9) …);
+         ##[ ##2: #H9; napply (or2_intro2 … (decidable_ar16_aux9 T … H9))
+         ##| ##1: #H9; napply (or2_elim (? = ?) (? ≠ ?) ? (H x10 y10) …);
+          ##[ ##2: #H10; napply (or2_intro2 … (decidable_ar16_aux10 T … H10))
+          ##| ##1: #H10; napply (or2_elim (? = ?) (? ≠ ?) ? (H x11 y11) …);
+           ##[ ##2: #H11; napply (or2_intro2 … (decidable_ar16_aux11 T … H11))
+           ##| ##1: #H11; napply (or2_elim (? = ?) (? ≠ ?) ? (H x12 y12) …);
+            ##[ ##2: #H12; napply (or2_intro2 … (decidable_ar16_aux12 T … H12))
+            ##| ##1: #H12; napply (or2_elim (? = ?) (? ≠ ?) ? (H x13 y13) …);
+             ##[ ##2: #H13; napply (or2_intro2 … (decidable_ar16_aux13 T … H13))
+             ##| ##1: #H13; napply (or2_elim (? = ?) (? ≠ ?) ? (H x14 y14) …);
+              ##[ ##2: #H14; napply (or2_intro2 … (decidable_ar16_aux14 T … H14))
+              ##| ##1: #H14; napply (or2_elim (? = ?) (? ≠ ?) ? (H x15 y15) …);
+               ##[ ##2: #H15; napply (or2_intro2 … (decidable_ar16_aux15 T … H15))
+               ##| ##1: #H15; napply (or2_elim (? = ?) (? ≠ ?) ? (H x16 y16) …);
+                ##[ ##2: #H16; napply (or2_intro2 … (decidable_ar16_aux16 T … H16))
+                ##| ##1: #H16; nrewrite > H1; nrewrite > H2; nrewrite > H3; nrewrite > H4;
+                      nrewrite > H5; nrewrite > H6; nrewrite > H7; nrewrite > H8;
+                      nrewrite > H9; nrewrite > H10; nrewrite > H11; nrewrite > H12;
+                      nrewrite > H13; nrewrite > H14; nrewrite > H15; nrewrite > H16;
+                      napply (or2_intro1 (? = ?) (? ≠ ?) (refl_eq …))
+                ##]
+               ##]
+              ##]
+             ##]
+            ##]
+           ##]
+          ##]
+         ##]
+        ##]
+       ##]
+      ##]
+     ##]
+    ##]
+   ##]
+  ##]
+ ##]
+nqed.
+
+(* *************** *)
+(* TIPO ARRAY DA 8 *)
+(* *************** *)
+
+nlemma ar8_destruct_1 :
+∀T.∀x1,x2,x3,x4,x5,x6,x7,x8:T.∀y1,y2,y3,y4,y5,y6,y7,y8:T.
+ mk_Array8T T x1 x2 x3 x4 x5 x6 x7 x8 = mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8  →
+ x1 = y1.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H;
+ nchange with (match mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8
+                with [ mk_Array8T a _ _ _ _ _ _ _ ⇒ x1 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar8_destruct_2 :
+∀T.∀x1,x2,x3,x4,x5,x6,x7,x8:T.∀y1,y2,y3,y4,y5,y6,y7,y8:T.
+ mk_Array8T T x1 x2 x3 x4 x5 x6 x7 x8 = mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8  →
+ x2 = y2.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H;
+ nchange with (match mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8
+                with [ mk_Array8T _ a _ _ _ _ _ _ ⇒ x2 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar8_destruct_3 :
+∀T.∀x1,x2,x3,x4,x5,x6,x7,x8:T.∀y1,y2,y3,y4,y5,y6,y7,y8:T.
+ mk_Array8T T x1 x2 x3 x4 x5 x6 x7 x8 = mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8  →
+ x3 = y3.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H;
+ nchange with (match mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8
+                with [ mk_Array8T _ _ a _ _ _ _ _ ⇒ x3 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar8_destruct_4 :
+∀T.∀x1,x2,x3,x4,x5,x6,x7,x8:T.∀y1,y2,y3,y4,y5,y6,y7,y8:T.
+ mk_Array8T T x1 x2 x3 x4 x5 x6 x7 x8 = mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8  →
+ x4 = y4.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H;
+ nchange with (match mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8
+                with [ mk_Array8T _ _ _ a _ _ _ _ ⇒ x4 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar8_destruct_5 :
+∀T.∀x1,x2,x3,x4,x5,x6,x7,x8:T.∀y1,y2,y3,y4,y5,y6,y7,y8:T.
+ mk_Array8T T x1 x2 x3 x4 x5 x6 x7 x8 = mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8  →
+ x5 = y5.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H;
+ nchange with (match mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8
+                with [ mk_Array8T _ _ _ _ a _ _ _ ⇒ x5 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar8_destruct_6 :
+∀T.∀x1,x2,x3,x4,x5,x6,x7,x8:T.∀y1,y2,y3,y4,y5,y6,y7,y8:T.
+ mk_Array8T T x1 x2 x3 x4 x5 x6 x7 x8 = mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8  →
+ x6 = y6.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H;
+ nchange with (match mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8
+                with [ mk_Array8T _ _ _ _ _ a _ _ ⇒ x6 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar8_destruct_7 :
+∀T.∀x1,x2,x3,x4,x5,x6,x7,x8:T.∀y1,y2,y3,y4,y5,y6,y7,y8:T.
+ mk_Array8T T x1 x2 x3 x4 x5 x6 x7 x8 = mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8  →
+ x7 = y7.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H;
+ nchange with (match mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8
+                with [ mk_Array8T _ _ _ _ _ _ a _ ⇒ x7 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma ar8_destruct_8 :
+∀T.∀x1,x2,x3,x4,x5,x6,x7,x8:T.∀y1,y2,y3,y4,y5,y6,y7,y8:T.
+ mk_Array8T T x1 x2 x3 x4 x5 x6 x7 x8 = mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8  →
+ x8 = y8.
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H;
+ nchange with (match mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8
+                with [ mk_Array8T _ _ _ _ _ _ _ a ⇒ x8 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma symmetric_eqar8 :
+∀T.∀f:T → T → bool.
+ (symmetricT T bool f) →
+ (symmetricT (Array8T T) bool (eq_ar8 T f)).
+ #T; #f; #H;
+ #alu1; ncases alu1;
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #alu2; ncases alu2;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8;
+ nchange with (
+  ((f x1 y1) ⊗ (f x2 y2) ⊗ (f x3 y3) ⊗ (f x4 y4) ⊗
+   (f x5 y5) ⊗ (f x6 y6) ⊗ (f x7 y7) ⊗ (f x8 y8)) =
+  ((f y1 x1) ⊗ (f y2 x2) ⊗ (f y3 x3) ⊗ (f y4 x4) ⊗
+   (f y5 x5) ⊗ (f y6 x6) ⊗ (f y7 x7) ⊗ (f y8 x8)));
+ nrewrite > (H x1 y1);
+ nrewrite > (H x2 y2);
+ nrewrite > (H x3 y3);
+ nrewrite > (H x4 y4);
+ nrewrite > (H x5 y5);
+ nrewrite > (H x6 y6);
+ nrewrite > (H x7 y7);
+ nrewrite > (H x8 y8);
+ napply refl_eq.
+nqed.
+
+nlemma eqar8_to_eq :
+∀T.∀f:T → T → bool.
+ (∀x,y.(f x y = true) → (x = y)) →
+ (∀a1,a2:Array8T T.(eq_ar8 T f a1 a2 = true) → (a1 = a2)).
+ #T; #f; #H;
+ #alu1; ncases alu1;
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #alu2; ncases alu2;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H1;
+ nchange in H1:(%) with (
+  ((f x1 y1) ⊗ (f x2 y2) ⊗ (f x3 y3) ⊗ (f x4 y4) ⊗
+   (f x5 y5) ⊗ (f x6 y6) ⊗ (f x7 y7) ⊗ (f x8 y8)) = true);
+ nrewrite > (H … (andb_true_true_r … H1));
+ nletin H2 ≝ (andb_true_true_l … H1);
+ nrewrite > (H … (andb_true_true_r … H2));
+ nletin H3 ≝ (andb_true_true_l … H2);
+ nrewrite > (H … (andb_true_true_r … H3));
+ nletin H4 ≝ (andb_true_true_l … H3);
+ nrewrite > (H … (andb_true_true_r … H4));
+ nletin H5 ≝ (andb_true_true_l … H4);
+ nrewrite > (H … (andb_true_true_r … H5));
+ nletin H6 ≝ (andb_true_true_l … H5);
+ nrewrite > (H … (andb_true_true_r … H6));
+ nletin H7 ≝ (andb_true_true_l … H6);
+ nrewrite > (H … (andb_true_true_r … H7));
+ nrewrite > (H … (andb_true_true_l … H7));
+ napply refl_eq.
+nqed.
+
+nlemma eq_to_eqar8 :
+∀T.∀f:T → T → bool.
+ (∀x,y.(x = y) → (f x y = true)) →
+ (∀a1,a2:Array8T T.(a1 = a2) → (eq_ar8 T f a1 a2 = true)).
+ #T; #f; #H;
+ #alu1; ncases alu1;
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #alu2; ncases alu2;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H1;
+ nrewrite > (ar8_destruct_1 … H1);
+ nrewrite > (ar8_destruct_2 … H1);
+ nrewrite > (ar8_destruct_3 … H1);
+ nrewrite > (ar8_destruct_4 … H1);
+ nrewrite > (ar8_destruct_5 … H1);
+ nrewrite > (ar8_destruct_6 … H1);
+ nrewrite > (ar8_destruct_7 … H1);
+ nrewrite > (ar8_destruct_8 … H1);
+ nchange with (
+  ((f y1 y1) ⊗ (f y2 y2) ⊗ (f y3 y3) ⊗ (f y4 y4) ⊗
+   (f y5 y5) ⊗ (f y6 y6) ⊗ (f y7 y7) ⊗ (f y8 y8)) = true);
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ nrewrite > (H … (refl_eq …));
+ napply refl_eq.
+nqed.
+
+nlemma decidable_ar8_aux1 :
+∀T.∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8:T.
+ (x1 ≠ y1) →
+ (mk_Array8T T x1 x2 x3 x4 x5 x6 x7 x8) ≠ (mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; 
+ nnormalize; #H; #H1;
+ napply (H (ar8_destruct_1 … H1)).
+nqed.
+
+nlemma decidable_ar8_aux2 :
+∀T.∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8:T.
+ (x2 ≠ y2) →
+ (mk_Array8T T x1 x2 x3 x4 x5 x6 x7 x8) ≠ (mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; 
+ nnormalize; #H; #H1;
+ napply (H (ar8_destruct_2 … H1)).
+nqed.
+
+nlemma decidable_ar8_aux3 :
+∀T.∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8:T.
+ (x3 ≠ y3) →
+ (mk_Array8T T x1 x2 x3 x4 x5 x6 x7 x8) ≠ (mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; 
+ nnormalize; #H; #H1;
+ napply (H (ar8_destruct_3 … H1)).
+nqed.
+
+nlemma decidable_ar8_aux4 :
+∀T.∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8:T.
+ (x4 ≠ y4) →
+ (mk_Array8T T x1 x2 x3 x4 x5 x6 x7 x8) ≠ (mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; 
+ nnormalize; #H; #H1;
+ napply (H (ar8_destruct_4 … H1)).
+nqed.
+
+nlemma decidable_ar8_aux5 :
+∀T.∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8:T.
+ (x5 ≠ y5) →
+ (mk_Array8T T x1 x2 x3 x4 x5 x6 x7 x8) ≠ (mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; 
+ nnormalize; #H; #H1;
+ napply (H (ar8_destruct_5 … H1)).
+nqed.
+
+nlemma decidable_ar8_aux6 :
+∀T.∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8:T.
+ (x6 ≠ y6) →
+ (mk_Array8T T x1 x2 x3 x4 x5 x6 x7 x8) ≠ (mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; 
+ nnormalize; #H; #H1;
+ napply (H (ar8_destruct_6 … H1)).
+nqed.
+
+nlemma decidable_ar8_aux7 :
+∀T.∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8:T.
+ (x7 ≠ y7) →
+ (mk_Array8T T x1 x2 x3 x4 x5 x6 x7 x8) ≠ (mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; 
+ nnormalize; #H; #H1;
+ napply (H (ar8_destruct_7 … H1)).
+nqed.
+
+nlemma decidable_ar8_aux8 :
+∀T.∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8:T.
+ (x8 ≠ y8) →
+ (mk_Array8T T x1 x2 x3 x4 x5 x6 x7 x8) ≠ (mk_Array8T T y1 y2 y3 y4 y5 y6 y7 y8).
+ #T; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; 
+ nnormalize; #H; #H1;
+ napply (H (ar8_destruct_8 … H1)).
+nqed.
+
+nlemma decidable_ar8 :
+∀T.(∀x,y:T.decidable (x = y)) →
+   (∀a1,a2:Array8T T.decidable (a1 = a2)).
+ #T; #H;
+ #x; nelim x; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #y; nelim y; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8;
+ nnormalize;
+ napply (or2_elim (? = ?) (? ≠ ?) ? (H x1 y1) …);
+ ##[ ##2: #H1; napply (or2_intro2 … (decidable_ar8_aux1 T … H1))
+ ##| ##1: #H1; napply (or2_elim (? = ?) (? ≠ ?) ? (H x2 y2) …);
+  ##[ ##2: #H2; napply (or2_intro2 … (decidable_ar8_aux2 T … H2))
+  ##| ##1: #H2; napply (or2_elim (? = ?) (? ≠ ?) ? (H x3 y3) …);
+   ##[ ##2: #H3; napply (or2_intro2 … (decidable_ar8_aux3 T … H3))
+   ##| ##1: #H3; napply (or2_elim (? = ?) (? ≠ ?) ? (H x4 y4) …);
+    ##[ ##2: #H4; napply (or2_intro2 … (decidable_ar8_aux4 T … H4))
+    ##| ##1: #H4; napply (or2_elim (? = ?) (? ≠ ?) ? (H x5 y5) …);
+     ##[ ##2: #H5; napply (or2_intro2 … (decidable_ar8_aux5 T … H5))
+     ##| ##1: #H5; napply (or2_elim (? = ?) (? ≠ ?) ? (H x6 y6) …);
+      ##[ ##2: #H6; napply (or2_intro2 … (decidable_ar8_aux6 T … H6))
+      ##| ##1: #H6; napply (or2_elim (? = ?) (? ≠ ?) ? (H x7 y7) …);
+       ##[ ##2: #H7; napply (or2_intro2 … (decidable_ar8_aux7 T … H7))
+       ##| ##1: #H7; napply (or2_elim (? = ?) (? ≠ ?) ? (H x8 y8) …);
+        ##[ ##2: #H8; napply (or2_intro2 … (decidable_ar8_aux8 T … H8))
+        ##| ##1: #H8; nrewrite > H1; nrewrite > H2; nrewrite > H3; nrewrite > H4;
+                      nrewrite > H5; nrewrite > H6; nrewrite > H7; nrewrite > H8;
+                      napply (or2_intro1 (? = ?) (? ≠ ?) (refl_eq …))
+        ##]
+       ##]
+      ##]
+     ##]
+    ##]
+   ##]
+  ##]
+ ##]
+nqed.
diff --git a/helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC05_instr_mode_lemmas.ma b/helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC05_instr_mode_lemmas.ma
new file mode 100755 (executable)
index 0000000..87f22cb
--- /dev/null
@@ -0,0 +1,69 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* ********************************************************************** *)
+(*                          Progetto FreeScale                            *)
+(*                                                                        *)
+(*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
+(*   Sviluppo: 2008-2010                                                  *)
+(*                                                                        *)
+(* ********************************************************************** *)
+
+include "num/bool_lemmas.ma".
+include "emulator/opcodes/HC05_instr_mode.ma".
+include "num/oct_lemmas.ma".
+
+nlemma eq_to_eqHC05im : ∀n1,n2.n1 = n2 → eq_HC05_im n1 n2 = true.
+ #n1; #n2; #H;
+ nrewrite > H;
+ nelim n2;
+ ##[ ##15,16: #o; nrewrite > (eq_to_eqoct … (refl_eq …)) ##]
+ napply refl_eq.
+nqed.
+
+nlemma neqHC05im_to_neq : ∀n1,n2.eq_HC05_im n1 n2 = false → n1 ≠ n2.
+ #n1; #n2; #H;
+ napply (not_to_not (n1 = n2) (eq_HC05_im n1 n2 = true) …);
+ ##[ ##1: napply (eq_to_eqHC05im n1 n2)
+ ##| ##2: napply (eqfalse_to_neqtrue … H)
+ ##]
+nqed.
+
+(* !!! per brevita... *)
+naxiom eqHC05im_to_eq : ∀c1,c2.eq_HC05_im c1 c2 = true → c1 = c2.
+
+nlemma neq_to_neqHC05im : ∀n1,n2.n1 ≠ n2 → eq_HC05_im n1 n2 = false.
+ #n1; #n2; #H;
+ napply (neqtrue_to_eqfalse (eq_HC05_im n1 n2));
+ napply (not_to_not (eq_HC05_im n1 n2 = true) (n1 = n2) ? H);
+ napply (eqHC05im_to_eq n1 n2).
+nqed.
+
+nlemma decidable_HC05im : ∀x,y:HC05_instr_mode.decidable (x = y).
+ #x; #y; nnormalize;
+ napply (or2_elim (eq_HC05_im x y = true) (eq_HC05_im x y = false) ? (decidable_bexpr ?));
+ ##[ ##1: #H; napply (or2_intro1 (x = y) (x ≠ y) (eqHC05im_to_eq … H))
+ ##| ##2: #H; napply (or2_intro2 (x = y) (x ≠ y) (neqHC05im_to_neq … H))
+ ##]
+nqed.
+
+nlemma symmetric_eqHC05im : symmetricT HC05_instr_mode bool eq_HC05_im.
+ #n1; #n2;
+ napply (or2_elim (n1 = n2) (n1 ≠ n2) ? (decidable_HC05im n1 n2));
+ ##[ ##1: #H; nrewrite > H; napply refl_eq
+ ##| ##2: #H; nrewrite > (neq_to_neqHC05im n1 n2 H);
+          napply (symmetric_eq ? (eq_HC05_im n2 n1) false);
+          napply (neq_to_neqHC05im n2 n1 (symmetric_neq ? n1 n2 H))
+ ##]
+nqed.
diff --git a/helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC05_opcode_lemmas.ma b/helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC05_opcode_lemmas.ma
new file mode 100755 (executable)
index 0000000..041c554
--- /dev/null
@@ -0,0 +1,68 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* ********************************************************************** *)
+(*                          Progetto FreeScale                            *)
+(*                                                                        *)
+(*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
+(*   Sviluppo: 2008-2010                                                  *)
+(*                                                                        *)
+(* ********************************************************************** *)
+
+include "num/bool_lemmas.ma".
+include "emulator/opcodes/HC05_opcode.ma".
+
+nlemma eq_to_eqHC05op : ∀n1,n2.n1 = n2 → eq_HC05_op n1 n2 = true.
+ #n1; #n2; #H;
+ nrewrite > H;
+ nelim n2;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma neqHC05op_to_neq : ∀n1,n2.eq_HC05_op n1 n2 = false → n1 ≠ n2.
+ #n1; #n2; #H;
+ napply (not_to_not (n1 = n2) (eq_HC05_op n1 n2 = true) …);
+ ##[ ##1: napply (eq_to_eqHC05op n1 n2)
+ ##| ##2: napply (eqfalse_to_neqtrue … H)
+ ##]
+nqed.
+
+(* !!! per brevita... *)
+naxiom eqHC05op_to_eq : ∀c1,c2.eq_HC05_op c1 c2 = true → c1 = c2.
+
+nlemma neq_to_neqHC05op : ∀n1,n2.n1 ≠ n2 → eq_HC05_op n1 n2 = false.
+ #n1; #n2; #H;
+ napply (neqtrue_to_eqfalse (eq_HC05_op n1 n2));
+ napply (not_to_not (eq_HC05_op n1 n2 = true) (n1 = n2) ? H);
+ napply (eqHC05op_to_eq n1 n2).
+nqed.
+
+nlemma decidable_HC05op : ∀x,y:HC05_opcode.decidable (x = y).
+ #x; #y; nnormalize;
+ napply (or2_elim (eq_HC05_op x y = true) (eq_HC05_op x y = false) ? (decidable_bexpr ?));
+ ##[ ##1: #H; napply (or2_intro1 (x = y) (x ≠ y) (eqHC05op_to_eq … H))
+ ##| ##2: #H; napply (or2_intro2 (x = y) (x ≠ y) (neqHC05op_to_neq … H))
+ ##]
+nqed.
+
+nlemma symmetric_eqHC05op : symmetricT HC05_opcode bool eq_HC05_op.
+ #n1; #n2;
+ napply (or2_elim (n1 = n2) (n1 ≠ n2) ? (decidable_HC05op n1 n2));
+ ##[ ##1: #H; nrewrite > H; napply refl_eq
+ ##| ##2: #H; nrewrite > (neq_to_neqHC05op n1 n2 H);
+          napply (symmetric_eq ? (eq_HC05_op n2 n1) false);
+          napply (neq_to_neqHC05op n2 n1 (symmetric_neq ? n1 n2 H))
+ ##]
+nqed.
index 145e5ca4eaebe353a21173f8983a5764d4a3dd9c..debb76922c55744a1e9c05921e651dee7820c00b 100755 (executable)
@@ -40,31 +40,35 @@ ndefinition HC05_not_impl_byte ≝
  ].
 
 (* test bytecode non implementati *)
-nlemma ok_byte_table_HC05 : forall_b8 (λb.
+(* !!! per brevita... *)
+(*nlemma ok_byte_table_HC05 : forall_b8 (λb.
  (test_not_impl_byte b HC05_not_impl_byte     ⊙ eq_w16 (get_byte_count HC05 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC05) 〈〈x0,x0〉:〈x0,x1〉〉) ⊗
  (⊖ (test_not_impl_byte b HC05_not_impl_byte) ⊙ eq_w16 (get_byte_count HC05 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC05) 〈〈x0,x0〉:〈x0,x0〉〉))
  = true.
  napply refl_eq.
-nqed.
+nqed.*)
 
 (* tutti op implementati *)
-nlemma ok_pseudo_table_HC05 :
+(* !!! per brevita... *)
+(*nlemma ok_pseudo_table_HC05 :
  forall_op HC05 (λo.
   le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_pseudo_count HC05 o 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC05)) = true.
  napply refl_eq.
-nqed.
+nqed.*)
 
 (* tutte im implementate *)
-nlemma ok_mode_table_HC05 :
+(* !!! per brevita... *)
+(*nlemma ok_mode_table_HC05 :
  forall_im HC05 (λi.
   le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_mode_count HC05 i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC05)) = true.
  napply refl_eq.
-nqed.
+nqed.*)
 
 (* nessuna ripetizione di combinazione op + imm *)
-nlemma ok_OpIm_table_HC05 :
+(* !!! per brevita... *)
+(*nlemma ok_OpIm_table_HC05 :
  forall_im HC05 (λi.
   forall_op HC05 (λo.
    le_w16 (get_OpIm_count HC05 o i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC05) 〈〈x0,x0〉:〈x0,x1〉〉)) = true.
  napply refl_eq.
-nqed.
+nqed.*)
diff --git a/helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC08_instr_mode_lemmas.ma b/helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC08_instr_mode_lemmas.ma
new file mode 100755 (executable)
index 0000000..100bcef
--- /dev/null
@@ -0,0 +1,70 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* ********************************************************************** *)
+(*                          Progetto FreeScale                            *)
+(*                                                                        *)
+(*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
+(*   Sviluppo: 2008-2010                                                  *)
+(*                                                                        *)
+(* ********************************************************************** *)
+
+include "num/bool_lemmas.ma".
+include "emulator/opcodes/HC08_instr_mode.ma".
+include "num/oct_lemmas.ma".
+
+nlemma eq_to_eqHC08im : ∀n1,n2.n1 = n2 → eq_HC08_im n1 n2 = true.
+ #n1; #n2; #H;
+ nrewrite > H;
+ nelim n2;
+ ##[ ##31,32: #o; nrewrite > (eq_to_eqoct … (refl_eq …)) ##]
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma neqHC08im_to_neq : ∀n1,n2.eq_HC08_im n1 n2 = false → n1 ≠ n2.
+ #n1; #n2; #H;
+ napply (not_to_not (n1 = n2) (eq_HC08_im n1 n2 = true) …);
+ ##[ ##1: napply (eq_to_eqHC08im n1 n2)
+ ##| ##2: napply (eqfalse_to_neqtrue … H)
+ ##]
+nqed.
+
+(* !!! per brevita... *)
+naxiom eqHC08im_to_eq : ∀c1,c2.eq_HC08_im c1 c2 = true → c1 = c2.
+
+nlemma neq_to_neqHC08im : ∀n1,n2.n1 ≠ n2 → eq_HC08_im n1 n2 = false.
+ #n1; #n2; #H;
+ napply (neqtrue_to_eqfalse (eq_HC08_im n1 n2));
+ napply (not_to_not (eq_HC08_im n1 n2 = true) (n1 = n2) ? H);
+ napply (eqHC08im_to_eq n1 n2).
+nqed.
+
+nlemma decidable_HC08im : ∀x,y:HC08_instr_mode.decidable (x = y).
+ #x; #y; nnormalize;
+ napply (or2_elim (eq_HC08_im x y = true) (eq_HC08_im x y = false) ? (decidable_bexpr ?));
+ ##[ ##1: #H; napply (or2_intro1 (x = y) (x ≠ y) (eqHC08im_to_eq … H))
+ ##| ##2: #H; napply (or2_intro2 (x = y) (x ≠ y) (neqHC08im_to_neq … H))
+ ##]
+nqed.
+
+nlemma symmetric_eqHC08im : symmetricT HC08_instr_mode bool eq_HC08_im.
+ #n1; #n2;
+ napply (or2_elim (n1 = n2) (n1 ≠ n2) ? (decidable_HC08im n1 n2));
+ ##[ ##1: #H; nrewrite > H; napply refl_eq
+ ##| ##2: #H; nrewrite > (neq_to_neqHC08im n1 n2 H);
+          napply (symmetric_eq ? (eq_HC08_im n2 n1) false);
+          napply (neq_to_neqHC08im n2 n1 (symmetric_neq ? n1 n2 H))
+ ##]
+nqed.
diff --git a/helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC08_opcode_lemmas.ma b/helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC08_opcode_lemmas.ma
new file mode 100755 (executable)
index 0000000..e346c48
--- /dev/null
@@ -0,0 +1,68 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* ********************************************************************** *)
+(*                          Progetto FreeScale                            *)
+(*                                                                        *)
+(*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
+(*   Sviluppo: 2008-2010                                                  *)
+(*                                                                        *)
+(* ********************************************************************** *)
+
+include "num/bool_lemmas.ma".
+include "emulator/opcodes/HC08_opcode.ma".
+
+nlemma eq_to_eqHC08op : ∀n1,n2.n1 = n2 → eq_HC08_op n1 n2 = true.
+ #n1; #n2; #H;
+ nrewrite > H;
+ nelim n2;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma neqHC08op_to_neq : ∀n1,n2.eq_HC08_op n1 n2 = false → n1 ≠ n2.
+ #n1; #n2; #H;
+ napply (not_to_not (n1 = n2) (eq_HC08_op n1 n2 = true) …);
+ ##[ ##1: napply (eq_to_eqHC08op n1 n2)
+ ##| ##2: napply (eqfalse_to_neqtrue … H)
+ ##]
+nqed.
+
+(* !!! per brevita... *)
+naxiom eqHC08op_to_eq : ∀c1,c2.eq_HC08_op c1 c2 = true → c1 = c2.
+
+nlemma neq_to_neqHC08op : ∀n1,n2.n1 ≠ n2 → eq_HC08_op n1 n2 = false.
+ #n1; #n2; #H;
+ napply (neqtrue_to_eqfalse (eq_HC08_op n1 n2));
+ napply (not_to_not (eq_HC08_op n1 n2 = true) (n1 = n2) ? H);
+ napply (eqHC08op_to_eq n1 n2).
+nqed.
+
+nlemma decidable_HC08op : ∀x,y:HC08_opcode.decidable (x = y).
+ #x; #y; nnormalize;
+ napply (or2_elim (eq_HC08_op x y = true) (eq_HC08_op x y = false) ? (decidable_bexpr ?));
+ ##[ ##1: #H; napply (or2_intro1 (x = y) (x ≠ y) (eqHC08op_to_eq … H))
+ ##| ##2: #H; napply (or2_intro2 (x = y) (x ≠ y) (neqHC08op_to_neq … H))
+ ##]
+nqed.
+
+nlemma symmetric_eqHC08op : symmetricT HC08_opcode bool eq_HC08_op.
+ #n1; #n2;
+ napply (or2_elim (n1 = n2) (n1 ≠ n2) ? (decidable_HC08op n1 n2));
+ ##[ ##1: #H; nrewrite > H; napply refl_eq
+ ##| ##2: #H; nrewrite > (neq_to_neqHC08op n1 n2 H);
+          napply (symmetric_eq ? (eq_HC08_op n2 n1) false);
+          napply (neq_to_neqHC08op n2 n1 (symmetric_neq ? n1 n2 H))
+ ##]
+nqed.
index 06b4d26571ac3ad042020841279684bc4594d26b..4e29e87fc421b4b7a90781d617845250d570ccd7 100755 (executable)
@@ -36,12 +36,13 @@ ndefinition HC08_not_impl_byte ≝
  ].
 
 (* test bytecode non implementati *)
-nlemma ok_byte_table_HC08 : forall_b8 (λb.
+(* !!! per brevita... *)
+(*nlemma ok_byte_table_HC08 : forall_b8 (λb.
  (test_not_impl_byte b HC08_not_impl_byte     ⊙ eq_w16 (get_byte_count HC08 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08) 〈〈x0,x0〉:〈x0,x1〉〉) ⊗
  (⊖ (test_not_impl_byte b HC08_not_impl_byte) ⊙ eq_w16 (get_byte_count HC08 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08) 〈〈x0,x0〉:〈x0,x0〉〉))
  = true.
  napply refl_eq.
-nqed.
+nqed.*)
 
 (* HC08: opcode non implementati come da manuale (0x9E+byte) *)
 ndefinition HC08_not_impl_word ≝
@@ -77,31 +78,35 @@ ndefinition HC08_not_impl_word ≝
  ].
 
 (* test bytecode non implementati *)
-nlemma ok_word_table_HC08 : forall_b8 (λb.
+(* !!! per brevita... *)
+(*nlemma ok_word_table_HC08 : forall_b8 (λb.
  (test_not_impl_byte b HC08_not_impl_word     ⊙ eq_w16 (get_word_count HC08 〈〈x9,xE〉:b〉 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08) 〈〈x0,x0〉:〈x0,x1〉〉) ⊗
  (⊖ (test_not_impl_byte b HC08_not_impl_word) ⊙ eq_w16 (get_word_count HC08 〈〈x9,xE〉:b〉 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08) 〈〈x0,x0〉:〈x0,x0〉〉))
  = true.
  napply refl_eq.
-nqed.
+nqed.*)
 
 (* tutti op implementati *)
-nlemma ok_pseudo_table_HC08 :
+(* !!! per brevita... *)
+(*nlemma ok_pseudo_table_HC08 :
  forall_op HC08 (λo.
   le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_pseudo_count HC08 o 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08)) = true.
  napply refl_eq.
-nqed.
+nqed.*)
 
 (* tutte im implementate *)
-nlemma ok_mode_table_HC08 :
+(* !!! per brevita... *)
+(*nlemma ok_mode_table_HC08 :
  forall_im HC08 (λi.
   le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_mode_count HC08 i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08)) = true.
  napply refl_eq.
-nqed.
+nqed.*)
 
 (* nessuna ripetizione di combinazione op + imm *)
-nlemma ok_OpIm_table_HC08 :
+(* !!! per brevita... *)
+(*nlemma ok_OpIm_table_HC08 :
  forall_im HC08 (λi.
   forall_op HC08 (λo.
    le_w16 (get_OpIm_count HC08 o i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08) 〈〈x0,x0〉:〈x0,x1〉〉)) = true.
  napply refl_eq.
-nqed.
+nqed.*)
diff --git a/helm/software/matita/contribs/ng_assembly/emulator/opcodes/HCS08_opcode_lemmas.ma b/helm/software/matita/contribs/ng_assembly/emulator/opcodes/HCS08_opcode_lemmas.ma
new file mode 100755 (executable)
index 0000000..a4b1b95
--- /dev/null
@@ -0,0 +1,68 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* ********************************************************************** *)
+(*                          Progetto FreeScale                            *)
+(*                                                                        *)
+(*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
+(*   Sviluppo: 2008-2010                                                  *)
+(*                                                                        *)
+(* ********************************************************************** *)
+
+include "num/bool_lemmas.ma".
+include "emulator/opcodes/HCS08_opcode.ma".
+
+nlemma eq_to_eqHCS08op : ∀n1,n2.n1 = n2 → eq_HCS08_op n1 n2 = true.
+ #n1; #n2; #H;
+ nrewrite > H;
+ nelim n2;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma neqHCS08op_to_neq : ∀n1,n2.eq_HCS08_op n1 n2 = false → n1 ≠ n2.
+ #n1; #n2; #H;
+ napply (not_to_not (n1 = n2) (eq_HCS08_op n1 n2 = true) …);
+ ##[ ##1: napply (eq_to_eqHCS08op n1 n2)
+ ##| ##2: napply (eqfalse_to_neqtrue … H)
+ ##]
+nqed.
+
+(* !!! per brevita... *)
+naxiom eqHCS08op_to_eq : ∀c1,c2.eq_HCS08_op c1 c2 = true → c1 = c2.
+
+nlemma neq_to_neqHCS08op : ∀n1,n2.n1 ≠ n2 → eq_HCS08_op n1 n2 = false.
+ #n1; #n2; #H;
+ napply (neqtrue_to_eqfalse (eq_HCS08_op n1 n2));
+ napply (not_to_not (eq_HCS08_op n1 n2 = true) (n1 = n2) ? H);
+ napply (eqHCS08op_to_eq n1 n2).
+nqed.
+
+nlemma decidable_HCS08op : ∀x,y:HCS08_opcode.decidable (x = y).
+ #x; #y; nnormalize;
+ napply (or2_elim (eq_HCS08_op x y = true) (eq_HCS08_op x y = false) ? (decidable_bexpr ?));
+ ##[ ##1: #H; napply (or2_intro1 (x = y) (x ≠ y) (eqHCS08op_to_eq … H))
+ ##| ##2: #H; napply (or2_intro2 (x = y) (x ≠ y) (neqHCS08op_to_neq … H))
+ ##]
+nqed.
+
+nlemma symmetric_eqHCS08op : symmetricT HCS08_opcode bool eq_HCS08_op.
+ #n1; #n2;
+ napply (or2_elim (n1 = n2) (n1 ≠ n2) ? (decidable_HCS08op n1 n2));
+ ##[ ##1: #H; nrewrite > H; napply refl_eq
+ ##| ##2: #H; nrewrite > (neq_to_neqHCS08op n1 n2 H);
+          napply (symmetric_eq ? (eq_HCS08_op n2 n1) false);
+          napply (neq_to_neqHCS08op n2 n1 (symmetric_neq ? n1 n2 H))
+ ##]
+nqed.
index c7b9c15491cabcdbcb3491f7c64e8a564bde6970..e51b236a3d688d4ebe5a0e8e331b91296592655f 100755 (executable)
@@ -35,12 +35,13 @@ ndefinition HCS08_not_impl_byte ≝
  ].
 
 (* test bytecode non implementati *)
-nlemma ok_byte_table_HCS08 : forall_b8 (λb.
+(* !!! per brevita... *)
+(*nlemma ok_byte_table_HCS08 : forall_b8 (λb.
  (test_not_impl_byte b HCS08_not_impl_byte     ⊙ eq_w16 (get_byte_count HCS08 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HCS08) 〈〈x0,x0〉:〈x0,x1〉〉) ⊗
  (⊖ (test_not_impl_byte b HCS08_not_impl_byte) ⊙ eq_w16 (get_byte_count HCS08 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HCS08) 〈〈x0,x0〉:〈x0,x0〉〉))
  = true.
  napply refl_eq.
-nqed.
+nqed.*)
 
 (* HCS08: opcode non implementati come da manuale (0x9E+byte) *)
 ndefinition HCS08_not_impl_word ≝
@@ -72,31 +73,35 @@ ndefinition HCS08_not_impl_word ≝
  ].
 
 (* test bytecode non implementati *)
-nlemma ok_word_table_HCS08 : forall_b8 (λb.
+(* !!! per brevita... *)
+(*nlemma ok_word_table_HCS08 : forall_b8 (λb.
  (test_not_impl_byte b HCS08_not_impl_word     ⊙ eq_w16 (get_word_count HCS08 〈〈x9,xE〉:b〉 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HCS08) 〈〈x0,x0〉:〈x0,x1〉〉) ⊗
  (⊖ (test_not_impl_byte b HCS08_not_impl_word) ⊙ eq_w16 (get_word_count HCS08 〈〈x9,xE〉:b〉 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HCS08) 〈〈x0,x0〉:〈x0,x0〉〉))
  = true.
  napply refl_eq.
-nqed.
+nqed.*)
 
 (* tutti op implementati *)
-nlemma ok_pseudo_table_HCS08 :
+(* !!! per brevita... *)
+(*nlemma ok_pseudo_table_HCS08 :
  forall_op HCS08 (λo.
   le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_pseudo_count HCS08 o 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HCS08)) = true.
  napply refl_eq.
-nqed.
+nqed.*)
 
 (* tutte im implementate *)
-nlemma ok_mode_table_HCS08 :
+(* !!! per brevita... *)
+(*nlemma ok_mode_table_HCS08 :
  forall_im HCS08 (λi.
   le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_mode_count HCS08 i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HCS08)) = true.
  napply refl_eq.
-nqed.
+nqed.*)
 
 (* nessuna ripetizione di combinazione op + imm *)
-nlemma ok_OpIm_table_HCS08 :
+(* !!! per brevita... *)
+(*nlemma ok_OpIm_table_HCS08 :
  forall_im HCS08 (λi.
   forall_op HCS08 (λo.
    le_w16 (get_OpIm_count HCS08 o i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HCS08) 〈〈x0,x0〉:〈x0,x1〉〉)) = true.
  napply refl_eq.
-nqed.
+nqed.*)
diff --git a/helm/software/matita/contribs/ng_assembly/emulator/opcodes/IP2022_instr_mode_lemmas.ma b/helm/software/matita/contribs/ng_assembly/emulator/opcodes/IP2022_instr_mode_lemmas.ma
new file mode 100755 (executable)
index 0000000..eb7f9b8
--- /dev/null
@@ -0,0 +1,72 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* ********************************************************************** *)
+(*                          Progetto FreeScale                            *)
+(*                                                                        *)
+(*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
+(*   Sviluppo: 2008-2010                                                  *)
+(*                                                                        *)
+(* ********************************************************************** *)
+
+include "num/bool_lemmas.ma".
+include "emulator/opcodes/IP2022_instr_mode.ma".
+include "num/oct_lemmas.ma".
+include "num/bitrigesim_lemmas.ma".
+
+nlemma eq_to_eqIP2022im : ∀n1,n2.n1 = n2 → eq_IP2022_im n1 n2 = true.
+ #n1; #n2; #H;
+ nrewrite > H;
+ nelim n2;
+ ##[ ##2,9,10: #o; nrewrite > (eq_to_eqoct … (refl_eq …))
+ ##| ##4: #t; nrewrite > (eq_to_eqbit … (refl_eq …)) ##]
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma neqIP2022im_to_neq : ∀n1,n2.eq_IP2022_im n1 n2 = false → n1 ≠ n2.
+ #n1; #n2; #H;
+ napply (not_to_not (n1 = n2) (eq_IP2022_im n1 n2 = true) …);
+ ##[ ##1: napply (eq_to_eqIP2022im n1 n2)
+ ##| ##2: napply (eqfalse_to_neqtrue … H)
+ ##]
+nqed.
+
+(* !!! per brevita... *)
+naxiom eqIP2022im_to_eq : ∀c1,c2.eq_IP2022_im c1 c2 = true → c1 = c2.
+
+nlemma neq_to_neqIP2022im : ∀n1,n2.n1 ≠ n2 → eq_IP2022_im n1 n2 = false.
+ #n1; #n2; #H;
+ napply (neqtrue_to_eqfalse (eq_IP2022_im n1 n2));
+ napply (not_to_not (eq_IP2022_im n1 n2 = true) (n1 = n2) ? H);
+ napply (eqIP2022im_to_eq n1 n2).
+nqed.
+
+nlemma decidable_IP2022im : ∀x,y:IP2022_instr_mode.decidable (x = y).
+ #x; #y; nnormalize;
+ napply (or2_elim (eq_IP2022_im x y = true) (eq_IP2022_im x y = false) ? (decidable_bexpr ?));
+ ##[ ##1: #H; napply (or2_intro1 (x = y) (x ≠ y) (eqIP2022im_to_eq … H))
+ ##| ##2: #H; napply (or2_intro2 (x = y) (x ≠ y) (neqIP2022im_to_neq … H))
+ ##]
+nqed.
+
+nlemma symmetric_eqIP2022im : symmetricT IP2022_instr_mode bool eq_IP2022_im.
+ #n1; #n2;
+ napply (or2_elim (n1 = n2) (n1 ≠ n2) ? (decidable_IP2022im n1 n2));
+ ##[ ##1: #H; nrewrite > H; napply refl_eq
+ ##| ##2: #H; nrewrite > (neq_to_neqIP2022im n1 n2 H);
+          napply (symmetric_eq ? (eq_IP2022_im n2 n1) false);
+          napply (neq_to_neqIP2022im n2 n1 (symmetric_neq ? n1 n2 H))
+ ##]
+nqed.
diff --git a/helm/software/matita/contribs/ng_assembly/emulator/opcodes/IP2022_opcode_lemmas.ma b/helm/software/matita/contribs/ng_assembly/emulator/opcodes/IP2022_opcode_lemmas.ma
new file mode 100755 (executable)
index 0000000..427bfa1
--- /dev/null
@@ -0,0 +1,68 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* ********************************************************************** *)
+(*                          Progetto FreeScale                            *)
+(*                                                                        *)
+(*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
+(*   Sviluppo: 2008-2010                                                  *)
+(*                                                                        *)
+(* ********************************************************************** *)
+
+include "num/bool_lemmas.ma".
+include "emulator/opcodes/IP2022_opcode.ma".
+
+nlemma eq_to_eqIP2022op : ∀n1,n2.n1 = n2 → eq_IP2022_op n1 n2 = true.
+ #n1; #n2; #H;
+ nrewrite > H;
+ nelim n2;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma neqIP2022op_to_neq : ∀n1,n2.eq_IP2022_op n1 n2 = false → n1 ≠ n2.
+ #n1; #n2; #H;
+ napply (not_to_not (n1 = n2) (eq_IP2022_op n1 n2 = true) …);
+ ##[ ##1: napply (eq_to_eqIP2022op n1 n2)
+ ##| ##2: napply (eqfalse_to_neqtrue … H)
+ ##]
+nqed.
+
+(* !!! per brevita... *)
+naxiom eqIP2022op_to_eq : ∀c1,c2.eq_IP2022_op c1 c2 = true → c1 = c2.
+
+nlemma neq_to_neqIP2022op : ∀n1,n2.n1 ≠ n2 → eq_IP2022_op n1 n2 = false.
+ #n1; #n2; #H;
+ napply (neqtrue_to_eqfalse (eq_IP2022_op n1 n2));
+ napply (not_to_not (eq_IP2022_op n1 n2 = true) (n1 = n2) ? H);
+ napply (eqIP2022op_to_eq n1 n2).
+nqed.
+
+nlemma decidable_IP2022op : ∀x,y:IP2022_opcode.decidable (x = y).
+ #x; #y; nnormalize;
+ napply (or2_elim (eq_IP2022_op x y = true) (eq_IP2022_op x y = false) ? (decidable_bexpr ?));
+ ##[ ##1: #H; napply (or2_intro1 (x = y) (x ≠ y) (eqIP2022op_to_eq … H))
+ ##| ##2: #H; napply (or2_intro2 (x = y) (x ≠ y) (neqIP2022op_to_neq … H))
+ ##]
+nqed.
+
+nlemma symmetric_eqIP2022op : symmetricT IP2022_opcode bool eq_IP2022_op.
+ #n1; #n2;
+ napply (or2_elim (n1 = n2) (n1 ≠ n2) ? (decidable_IP2022op n1 n2));
+ ##[ ##1: #H; nrewrite > H; napply refl_eq
+ ##| ##2: #H; nrewrite > (neq_to_neqIP2022op n1 n2 H);
+          napply (symmetric_eq ? (eq_IP2022_op n2 n1) false);
+          napply (neq_to_neqIP2022op n2 n1 (symmetric_neq ? n1 n2 H))
+ ##]
+nqed.
index c753b181b29388edf2e2fab5d48ca414bb4f029a..798d25f995aa750d5978d36f838390aa82918f52 100755 (executable)
@@ -34,12 +34,13 @@ ndefinition IP2022_not_impl_byte ≝
  ;〈x6,xB〉;〈x6,xC〉;〈x6,xD〉;〈x6,xE〉;〈x6,xF〉;〈x7,x5〉 ].
 
 (* test bytecode non implementati *)
-nlemma ok_byte_table_IP2022 : forall_b8 (λb.
+(* !!! per brevita... *)
+(*nlemma ok_byte_table_IP2022 : forall_b8 (λb.
  (test_not_impl_byte b IP2022_not_impl_byte     ⊙ eq_w16 (get_byte_count IP2022 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_IP2022) 〈〈x0,x0〉:〈x0,x1〉〉) ⊗
  (⊖ (test_not_impl_byte b IP2022_not_impl_byte) ⊙ eq_w16 (get_byte_count IP2022 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_IP2022) 〈〈x0,x0〉:〈x0,x0〉〉))
  = true.
  napply refl_eq.
-nqed.
+nqed.*)
 
 (* IP2022: opcode non implementati come da manuale (0x00+byte) *)
 ndefinition IP2022_not_impl_word ≝
@@ -75,31 +76,35 @@ ndefinition IP2022_not_impl_word ≝
  ].
 
 (* test bytecode non implementati *)
-nlemma ok_word_table_IP2022 : forall_b8 (λb.
+(* !!! per brevita... *)
+(*nlemma ok_word_table_IP2022 : forall_b8 (λb.
  (test_not_impl_byte b IP2022_not_impl_word     ⊙ eq_w16 (get_word_count IP2022 〈〈x0,x0〉:b〉 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_IP2022) 〈〈x0,x0〉:〈x0,x1〉〉) ⊗
  (⊖ (test_not_impl_byte b IP2022_not_impl_word) ⊙ eq_w16 (get_word_count IP2022 〈〈x0,x0〉:b〉 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_IP2022) 〈〈x0,x0〉:〈x0,x0〉〉))
  = true.
  napply refl_eq.
-nqed.
+nqed.*)
 
 (* tutti op implementati *)
-nlemma ok_pseudo_table_IP2022 :
+(* !!! per brevita... *)
+(*nlemma ok_pseudo_table_IP2022 :
  forall_op IP2022 (λo.
   le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_pseudo_count IP2022 o 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_IP2022)) = true.
  napply refl_eq.
-nqed.
+nqed.*)
 
 (* tutte im implementate *)
-nlemma ok_mode_table_IP2022 :
+(* !!! per brevita... *)
+(*nlemma ok_mode_table_IP2022 :
  forall_im IP2022 (λi.
   le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_mode_count IP2022 i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_IP2022)) = true.
  napply refl_eq.
-nqed.
+nqed.*)
 
 (* nessuna ripetizione di combinazione op + imm *)
-nlemma ok_OpIm_table_IP2022 :
+(* !!! per brevita... *)
+(*nlemma ok_OpIm_table_IP2022 :
  forall_im IP2022 (λi.
   forall_op IP2022 (λo.
    le_w16 (get_OpIm_count IP2022 o i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_IP2022) 〈〈x0,x0〉:〈x0,x1〉〉)) = true.
  napply refl_eq.
-nqed.
+nqed.*)
diff --git a/helm/software/matita/contribs/ng_assembly/emulator/opcodes/RS08_instr_mode_lemmas.ma b/helm/software/matita/contribs/ng_assembly/emulator/opcodes/RS08_instr_mode_lemmas.ma
new file mode 100755 (executable)
index 0000000..aa834fb
--- /dev/null
@@ -0,0 +1,74 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* ********************************************************************** *)
+(*                          Progetto FreeScale                            *)
+(*                                                                        *)
+(*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
+(*   Sviluppo: 2008-2010                                                  *)
+(*                                                                        *)
+(* ********************************************************************** *)
+
+include "num/bool_lemmas.ma".
+include "emulator/opcodes/RS08_instr_mode.ma".
+include "num/oct_lemmas.ma".
+include "num/exadecim_lemmas.ma".
+include "num/bitrigesim_lemmas.ma".
+
+nlemma eq_to_eqRS08im : ∀n1,n2.n1 = n2 → eq_RS08_im n1 n2 = true.
+ #n1; #n2; #H;
+ nrewrite > H;
+ nelim n2;
+ ##[ ##11,12: #o; nrewrite > (eq_to_eqoct … (refl_eq …))
+ ##| ##13: #e; nrewrite > (eq_to_eqex … (refl_eq …))
+ ##| ##14: #t; nrewrite > (eq_to_eqbit … (refl_eq …)) ##]
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma neqRS08im_to_neq : ∀n1,n2.eq_RS08_im n1 n2 = false → n1 ≠ n2.
+ #n1; #n2; #H;
+ napply (not_to_not (n1 = n2) (eq_RS08_im n1 n2 = true) …);
+ ##[ ##1: napply (eq_to_eqRS08im n1 n2)
+ ##| ##2: napply (eqfalse_to_neqtrue … H)
+ ##]
+nqed.
+
+(* !!! per brevita... *)
+naxiom eqRS08im_to_eq : ∀c1,c2.eq_RS08_im c1 c2 = true → c1 = c2.
+
+nlemma neq_to_neqRS08im : ∀n1,n2.n1 ≠ n2 → eq_RS08_im n1 n2 = false.
+ #n1; #n2; #H;
+ napply (neqtrue_to_eqfalse (eq_RS08_im n1 n2));
+ napply (not_to_not (eq_RS08_im n1 n2 = true) (n1 = n2) ? H);
+ napply (eqRS08im_to_eq n1 n2).
+nqed.
+
+nlemma decidable_RS08im : ∀x,y:RS08_instr_mode.decidable (x = y).
+ #x; #y; nnormalize;
+ napply (or2_elim (eq_RS08_im x y = true) (eq_RS08_im x y = false) ? (decidable_bexpr ?));
+ ##[ ##1: #H; napply (or2_intro1 (x = y) (x ≠ y) (eqRS08im_to_eq … H))
+ ##| ##2: #H; napply (or2_intro2 (x = y) (x ≠ y) (neqRS08im_to_neq … H))
+ ##]
+nqed.
+
+nlemma symmetric_eqRS08im : symmetricT RS08_instr_mode bool eq_RS08_im.
+ #n1; #n2;
+ napply (or2_elim (n1 = n2) (n1 ≠ n2) ? (decidable_RS08im n1 n2));
+ ##[ ##1: #H; nrewrite > H; napply refl_eq
+ ##| ##2: #H; nrewrite > (neq_to_neqRS08im n1 n2 H);
+          napply (symmetric_eq ? (eq_RS08_im n2 n1) false);
+          napply (neq_to_neqRS08im n2 n1 (symmetric_neq ? n1 n2 H))
+ ##]
+nqed.
diff --git a/helm/software/matita/contribs/ng_assembly/emulator/opcodes/RS08_opcode_lemmas.ma b/helm/software/matita/contribs/ng_assembly/emulator/opcodes/RS08_opcode_lemmas.ma
new file mode 100755 (executable)
index 0000000..0046e10
--- /dev/null
@@ -0,0 +1,68 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* ********************************************************************** *)
+(*                          Progetto FreeScale                            *)
+(*                                                                        *)
+(*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
+(*   Sviluppo: 2008-2010                                                  *)
+(*                                                                        *)
+(* ********************************************************************** *)
+
+include "num/bool_lemmas.ma".
+include "emulator/opcodes/RS08_opcode.ma".
+
+nlemma eq_to_eqRS08op : ∀n1,n2.n1 = n2 → eq_RS08_op n1 n2 = true.
+ #n1; #n2; #H;
+ nrewrite > H;
+ nelim n2;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma neqRS08op_to_neq : ∀n1,n2.eq_RS08_op n1 n2 = false → n1 ≠ n2.
+ #n1; #n2; #H;
+ napply (not_to_not (n1 = n2) (eq_RS08_op n1 n2 = true) …);
+ ##[ ##1: napply (eq_to_eqRS08op n1 n2)
+ ##| ##2: napply (eqfalse_to_neqtrue … H)
+ ##]
+nqed.
+
+(* !!! per brevita... *)
+naxiom eqRS08op_to_eq : ∀c1,c2.eq_RS08_op c1 c2 = true → c1 = c2.
+
+nlemma neq_to_neqRS08op : ∀n1,n2.n1 ≠ n2 → eq_RS08_op n1 n2 = false.
+ #n1; #n2; #H;
+ napply (neqtrue_to_eqfalse (eq_RS08_op n1 n2));
+ napply (not_to_not (eq_RS08_op n1 n2 = true) (n1 = n2) ? H);
+ napply (eqRS08op_to_eq n1 n2).
+nqed.
+
+nlemma decidable_RS08op : ∀x,y:RS08_opcode.decidable (x = y).
+ #x; #y; nnormalize;
+ napply (or2_elim (eq_RS08_op x y = true) (eq_RS08_op x y = false) ? (decidable_bexpr ?));
+ ##[ ##1: #H; napply (or2_intro1 (x = y) (x ≠ y) (eqRS08op_to_eq … H))
+ ##| ##2: #H; napply (or2_intro2 (x = y) (x ≠ y) (neqRS08op_to_neq … H))
+ ##]
+nqed.
+
+nlemma symmetric_eqRS08op : symmetricT RS08_opcode bool eq_RS08_op.
+ #n1; #n2;
+ napply (or2_elim (n1 = n2) (n1 ≠ n2) ? (decidable_RS08op n1 n2));
+ ##[ ##1: #H; nrewrite > H; napply refl_eq
+ ##| ##2: #H; nrewrite > (neq_to_neqRS08op n1 n2 H);
+          napply (symmetric_eq ? (eq_RS08_op n2 n1) false);
+          napply (neq_to_neqRS08op n2 n1 (symmetric_neq ? n1 n2 H))
+ ##]
+nqed.
index 155c6abf2a5168db766980831752830fc3d93342..73f1c0ad23372656977e38dd8e709fb2ef52ce42 100755 (executable)
@@ -36,31 +36,35 @@ ndefinition RS08_not_impl_byte ≝
  ].
 
 (* test bytecode non implementati *)
-nlemma ok_byte_table_RS08 : forall_b8 (λb.
+(* !!! per brevita... *)
+(*nlemma ok_byte_table_RS08 : forall_b8 (λb.
  (test_not_impl_byte b RS08_not_impl_byte     ⊙ eq_w16 (get_byte_count RS08 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08) 〈〈x0,x0〉:〈x0,x1〉〉) ⊗
  (⊖ (test_not_impl_byte b RS08_not_impl_byte) ⊙ eq_w16 (get_byte_count RS08 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08) 〈〈x0,x0〉:〈x0,x0〉〉))
  = true.
  napply refl_eq.
-nqed.
+nqed.*)
 
 (* tutti op implementati *)
-nlemma ok_pseudo_table_RS08 :
+(* !!! per brevita... *)
+(*nlemma ok_pseudo_table_RS08 :
  forall_op RS08 (λo.
   le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_pseudo_count RS08 o 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08)) = true.
  napply refl_eq.
-nqed.
+nqed.*)
 
 (* tutte im implementate *)
-nlemma ok_mode_table_RS08 :
+(* !!! per brevita... *)
+(*nlemma ok_mode_table_RS08 :
  forall_im RS08 (λi.
   le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_mode_count RS08 i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08)) = true.
  napply refl_eq.
-nqed.
+nqed.*)
 
 (* nessuna ripetizione di combinazione op + imm *)
-nlemma ok_OpIm_table_RS08 :
+(* !!! per brevita... *)
+(*nlemma ok_OpIm_table_RS08 :
  forall_im RS08 (λi.
   forall_op RS08 (λo.
    le_w16 (get_OpIm_count RS08 o i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08) 〈〈x0,x0〉:〈x0,x1〉〉)) = true.
  napply refl_eq.
-nqed.
+nqed.*)
diff --git a/helm/software/matita/contribs/ng_assembly/emulator/opcodes/opcode_lemmas.ma b/helm/software/matita/contribs/ng_assembly/emulator/opcodes/opcode_lemmas.ma
new file mode 100755 (executable)
index 0000000..bb12d86
--- /dev/null
@@ -0,0 +1,152 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* ********************************************************************** *)
+(*                          Progetto FreeScale                            *)
+(*                                                                        *)
+(*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
+(*   Sviluppo: 2008-2010                                                  *)
+(*                                                                        *)
+(* ********************************************************************** *)
+
+include "emulator/opcodes/HC05_opcode_lemmas.ma".
+include "emulator/opcodes/HC05_instr_mode_lemmas.ma".
+include "emulator/opcodes/HC08_opcode_lemmas.ma".
+include "emulator/opcodes/HC08_instr_mode_lemmas.ma".
+include "emulator/opcodes/HCS08_opcode_lemmas.ma".
+include "emulator/opcodes/RS08_opcode_lemmas.ma".
+include "emulator/opcodes/RS08_instr_mode_lemmas.ma".
+include "emulator/opcodes/IP2022_opcode_lemmas.ma".
+include "emulator/opcodes/IP2022_instr_mode_lemmas.ma".
+include "emulator/opcodes/opcode.ma".
+
+nlemma eq_to_eqop : ∀m.∀n1,n2.(n1 = n2) → (eq_op m n1 n2 = true).
+ #m; nelim m;
+ ##[ ##1: napply eq_to_eqHC05op
+ ##| ##2: napply eq_to_eqHC08op
+ ##| ##3: napply eq_to_eqHCS08op
+ ##| ##4: napply eq_to_eqRS08op
+ ##| ##5: napply eq_to_eqIP2022op
+ ##]
+nqed.
+
+nlemma neqop_to_neq : ∀m.∀n1,n2.(eq_op m n1 n2 = false) → (n1 ≠ n2).
+ #m; nelim m;
+ ##[ ##1: napply neqHC05op_to_neq
+ ##| ##2: napply neqHC08op_to_neq
+ ##| ##3: napply neqHCS08op_to_neq
+ ##| ##4: napply neqRS08op_to_neq
+ ##| ##5: napply neqIP2022op_to_neq
+ ##]
+nqed.
+
+nlemma eqop_to_eq : ∀m.∀n1,n2.(eq_op m n1 n2 = true) → (n1 = n2).
+ #m; nelim m;
+ ##[ ##1: napply eqHC05op_to_eq
+ ##| ##2: napply eqHC08op_to_eq
+ ##| ##3: napply eqHCS08op_to_eq
+ ##| ##4: napply eqRS08op_to_eq
+ ##| ##5: napply eqIP2022op_to_eq
+ ##]
+nqed.
+
+nlemma neq_to_neqop : ∀m.∀n1,n2.(n1 ≠ n2) → (eq_op m n1 n2 = false).
+ #m; nelim m;
+ ##[ ##1: napply neq_to_neqHC05op
+ ##| ##2: napply neq_to_neqHC08op
+ ##| ##3: napply neq_to_neqHCS08op
+ ##| ##4: napply neq_to_neqRS08op
+ ##| ##5: napply neq_to_neqIP2022op
+ ##]
+nqed.
+
+nlemma decidable_op : ∀m.∀x,y:aux_op_type m.decidable (x = y).
+ #m; nelim m;
+ ##[ ##1: napply decidable_HC05op
+ ##| ##2: napply decidable_HC08op
+ ##| ##3: napply decidable_HCS08op
+ ##| ##4: napply decidable_RS08op
+ ##| ##5: napply decidable_IP2022op
+ ##]
+nqed.
+
+nlemma symmetric_eqop : ∀m.symmetricT (aux_op_type m) bool (eq_op m).
+ #m; nelim m;
+ ##[ ##1: napply symmetric_eqHC05op
+ ##| ##2: napply symmetric_eqHC08op
+ ##| ##3: napply symmetric_eqHCS08op
+ ##| ##4: napply symmetric_eqRS08op
+ ##| ##5: napply symmetric_eqIP2022op
+ ##]
+nqed.
+
+nlemma eq_to_eqim : ∀m.∀n1,n2.(n1 = n2) → (eq_im m n1 n2 = true).
+ #m; nelim m;
+ ##[ ##1: napply eq_to_eqHC05im
+ ##| ##2: napply eq_to_eqHC08im
+ ##| ##3: napply eq_to_eqHC08im
+ ##| ##4: napply eq_to_eqRS08im
+ ##| ##5: napply eq_to_eqIP2022im
+ ##]
+nqed.
+
+nlemma neqim_to_neq : ∀m.∀n1,n2.(eq_im m n1 n2 = false) → (n1 ≠ n2).
+ #m; nelim m;
+ ##[ ##1: napply neqHC05im_to_neq
+ ##| ##2: napply neqHC08im_to_neq
+ ##| ##3: napply neqHC08im_to_neq
+ ##| ##4: napply neqRS08im_to_neq
+ ##| ##5: napply neqIP2022im_to_neq
+ ##]
+nqed.
+
+nlemma eqim_to_eq : ∀m.∀n1,n2.(eq_im m n1 n2 = true) → (n1 = n2).
+ #m; nelim m;
+ ##[ ##1: napply eqHC05im_to_eq
+ ##| ##2: napply eqHC08im_to_eq
+ ##| ##3: napply eqHC08im_to_eq
+ ##| ##4: napply eqRS08im_to_eq
+ ##| ##5: napply eqIP2022im_to_eq
+ ##]
+nqed.
+
+nlemma neq_to_neqim : ∀m.∀n1,n2.(n1 ≠ n2) → (eq_im m n1 n2 = false).
+ #m; nelim m;
+ ##[ ##1: napply neq_to_neqHC05im
+ ##| ##2: napply neq_to_neqHC08im
+ ##| ##3: napply neq_to_neqHC08im
+ ##| ##4: napply neq_to_neqRS08im
+ ##| ##5: napply neq_to_neqIP2022im
+ ##]
+nqed.
+
+nlemma decidable_im : ∀m.∀x,y:aux_im_type m.decidable (x = y).
+ #m; nelim m;
+ ##[ ##1: napply decidable_HC05im
+ ##| ##2: napply decidable_HC08im
+ ##| ##3: napply decidable_HC08im
+ ##| ##4: napply decidable_RS08im
+ ##| ##5: napply decidable_IP2022im
+ ##]
+nqed.
+
+nlemma symmetric_eqim : ∀m.symmetricT (aux_im_type m) bool (eq_im m).
+ #m; nelim m;
+ ##[ ##1: napply symmetric_eqHC05im
+ ##| ##2: napply symmetric_eqHC08im
+ ##| ##3: napply symmetric_eqHC08im
+ ##| ##4: napply symmetric_eqRS08im
+ ##| ##5: napply symmetric_eqIP2022im
+ ##]
+nqed.
diff --git a/helm/software/matita/contribs/ng_assembly/emulator/status/HC05_status_lemmas.ma b/helm/software/matita/contribs/ng_assembly/emulator/status/HC05_status_lemmas.ma
new file mode 100755 (executable)
index 0000000..c41b7cf
--- /dev/null
@@ -0,0 +1,503 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* ********************************************************************** *)
+(*                          Progetto FreeScale                            *)
+(*                                                                        *)
+(*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
+(*   Sviluppo: 2008-2010                                                  *)
+(*                                                                        *)
+(* ********************************************************************** *)
+
+include "num/word16_lemmas.ma".
+include "emulator/status/HC05_status.ma".
+
+(* *********************************** *)
+(* STATUS INTERNO DEL PROCESSORE (ALU) *)
+(* *********************************** *)
+
+nlemma aluHC05_destruct_1 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 = mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 →
+ x1 = y1.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #H;
+ nchange with (match mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13
+                with [ mk_alu_HC05 a _ _ _ _ _ _ _ _ _ _ _ _ ⇒ x1 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC05_destruct_2 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 = mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 →
+ x2 = y2.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #H;
+ nchange with (match mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13
+                with [ mk_alu_HC05 _ a _ _ _ _ _ _ _ _ _ _ _ ⇒ x2 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC05_destruct_3 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 = mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 →
+ x3 = y3.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #H;
+ nchange with (match mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13
+                with [ mk_alu_HC05 _ _ a _ _ _ _ _ _ _ _ _ _ ⇒ x3 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC05_destruct_4 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 = mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 →
+ x4 = y4.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #H;
+ nchange with (match mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13
+                with [ mk_alu_HC05 _ _ _ a _ _ _ _ _ _ _ _ _ ⇒ x4 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC05_destruct_5 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 = mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 →
+ x5 = y5.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #H;
+ nchange with (match mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13
+                with [ mk_alu_HC05 _ _ _ _ a _ _ _ _ _ _ _ _ ⇒ x5 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC05_destruct_6 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 = mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 →
+ x6 = y6.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #H;
+ nchange with (match mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13
+                with [ mk_alu_HC05 _ _ _ _ _ a _ _ _ _ _ _ _ ⇒ x6 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC05_destruct_7 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 = mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 →
+ x7 = y7.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #H;
+ nchange with (match mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13
+                with [ mk_alu_HC05 _ _ _ _ _ _ a _ _ _ _ _ _ ⇒ x7 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC05_destruct_8 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 = mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 →
+ x8 = y8.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #H;
+ nchange with (match mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13
+                with [ mk_alu_HC05 _ _ _ _ _ _ _ a _ _ _ _ _ ⇒ x8 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC05_destruct_9 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 = mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 →
+ x9 = y9.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #H;
+ nchange with (match mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13
+                with [ mk_alu_HC05 _ _ _ _ _ _ _ _ a _ _ _ _ ⇒ x9 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC05_destruct_10 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 = mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 →
+ x10 = y10.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #H;
+ nchange with (match mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13
+                with [ mk_alu_HC05 _ _ _ _ _ _ _ _ _ a _ _ _ ⇒ x10 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC05_destruct_11 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 = mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 →
+ x11 = y11.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #H;
+ nchange with (match mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13
+                with [ mk_alu_HC05 _ _ _ _ _ _ _ _ _ _ a _ _ ⇒ x11 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC05_destruct_12 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 = mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 →
+ x12 = y12.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #H;
+ nchange with (match mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13
+                with [ mk_alu_HC05 _ _ _ _ _ _ _ _ _ _ _ a _ ⇒ x12 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC05_destruct_13 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 = mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 →
+ x13 = y13.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #H;
+ nchange with (match mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13
+                with [ mk_alu_HC05 _ _ _ _ _ _ _ _ _ _ _ _ a ⇒ x13 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma symmetric_eqaluHC05 : symmetricT alu_HC05 bool eq_HC05_alu.
+ #alu1; #alu2;
+ ncases alu1;
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ ncases alu2;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13;
+ nchange with (
+  ((eq_b8 x1 y1) ⊗ (eq_b8 x2 y2) ⊗ (eq_w16 x3 y3) ⊗ (eq_w16 x4 y4) ⊗
+  (eq_w16 x5 y5) ⊗ (eq_w16 x6 y6) ⊗  (eq_w16 x7 y7) ⊗ (eq_bool x8 y8) ⊗
+  (eq_bool x9 y9) ⊗ (eq_bool x10 y10) ⊗  (eq_bool x11 y11) ⊗ (eq_bool x12 y12) ⊗
+  (eq_bool x13 y13)) = ((eq_b8 y1 x1) ⊗  (eq_b8 y2 x2) ⊗ (eq_w16 y3 x3) ⊗
+  (eq_w16 y4 x4) ⊗ (eq_w16 y5 x5) ⊗  (eq_w16 y6 x6) ⊗ (eq_w16 y7 x7) ⊗
+  (eq_bool y8 x8) ⊗ (eq_bool y9 x9) ⊗  (eq_bool y10 x10) ⊗ (eq_bool y11 x11) ⊗
+  (eq_bool y12 x12) ⊗ (eq_bool y13 x13)));
+ nrewrite > (symmetric_eqb8 x1 y1);
+ nrewrite > (symmetric_eqb8 x2 y2);
+ nrewrite > (symmetric_eqw16 x3 y3);
+ nrewrite > (symmetric_eqw16 x4 y4);
+ nrewrite > (symmetric_eqw16 x5 y5);
+ nrewrite > (symmetric_eqw16 x6 y6);
+ nrewrite > (symmetric_eqw16 x7 y7);
+ nrewrite > (symmetric_eqbool x8 y8);
+ nrewrite > (symmetric_eqbool x9 y9);
+ nrewrite > (symmetric_eqbool x10 y10);
+ nrewrite > (symmetric_eqbool x11 y11);
+ nrewrite > (symmetric_eqbool x12 y12);
+ nrewrite > (symmetric_eqbool x13 y13);
+ napply refl_eq.
+nqed.
+
+nlemma eqaluHC05_to_eq : ∀alu1,alu2.eq_HC05_alu alu1 alu2 = true → alu1 = alu2.
+ #alu1; #alu2;
+ ncases alu1;
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ ncases alu2;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #H;
+ nchange in H:(%) with (
+ ((eq_b8 x1 y1) ⊗ (eq_b8 x2 y2) ⊗
+  (eq_w16 x3 y3) ⊗ (eq_w16 x4 y4) ⊗
+  (eq_w16 x5 y5) ⊗ (eq_w16 x6 y6) ⊗
+  (eq_w16 x7 y7) ⊗ (eq_bool x8 y8) ⊗
+  (eq_bool x9 y9) ⊗ (eq_bool x10 y10) ⊗
+  (eq_bool x11 y11) ⊗ (eq_bool x12 y12) ⊗
+  (eq_bool x13 y13)) = true);  
+ nrewrite > (eqbool_to_eq … (andb_true_true_r … H));
+ nletin H1 ≝ (andb_true_true_l … H);
+ nrewrite > (eqbool_to_eq x12 y12 (andb_true_true_r … (andb_true_true_l … H)));
+ nletin H2 ≝ (andb_true_true_l … H1);
+ nrewrite > (eqbool_to_eq … (andb_true_true_r … H2));
+ nletin H3 ≝ (andb_true_true_l … H2);
+ nrewrite > (eqbool_to_eq … (andb_true_true_r … H3));
+ nletin H4 ≝ (andb_true_true_l … H3);
+ nrewrite > (eqbool_to_eq … (andb_true_true_r … H4));
+ nletin H5 ≝ (andb_true_true_l … H4);
+ nrewrite > (eqbool_to_eq … (andb_true_true_r … H5));
+ nletin H6 ≝ (andb_true_true_l … H5);
+ nrewrite > (eqw16_to_eq … (andb_true_true_r … H6));
+ nletin H7 ≝ (andb_true_true_l … H6);
+ nrewrite > (eqw16_to_eq … (andb_true_true_r … H7));
+ nletin H8 ≝ (andb_true_true_l … H7);
+ nrewrite > (eqw16_to_eq … (andb_true_true_r … H8));
+ nletin H9 ≝ (andb_true_true_l … H8);
+ nrewrite > (eqw16_to_eq … (andb_true_true_r … H9));
+ nletin H10 ≝ (andb_true_true_l … H9);
+ nrewrite > (eqw16_to_eq … (andb_true_true_r … H10));
+ nletin H11 ≝ (andb_true_true_l … H10);
+ nrewrite > (eqb8_to_eq … (andb_true_true_r … H11));
+ nrewrite > (eqb8_to_eq … (andb_true_true_l … H11));
+ napply refl_eq.
+nqed.
+
+nlemma eq_to_eqaluHC05 : ∀alu1,alu2.alu1 = alu2 → eq_HC05_alu alu1 alu2 = true.
+ #alu1; #alu2;
+ ncases alu1;
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ ncases alu2;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #H;
+ nrewrite > (aluHC05_destruct_1 … H);
+ nrewrite > (aluHC05_destruct_2 … H);
+ nrewrite > (aluHC05_destruct_3 … H);
+ nrewrite > (aluHC05_destruct_4 … H);
+ nrewrite > (aluHC05_destruct_5 … H);
+ nrewrite > (aluHC05_destruct_6 … H);
+ nrewrite > (aluHC05_destruct_7 … H);
+ nrewrite > (aluHC05_destruct_8 … H);
+ nrewrite > (aluHC05_destruct_9 … H);
+ nrewrite > (aluHC05_destruct_10 … H);
+ nrewrite > (aluHC05_destruct_11 … H);
+ nrewrite > (aluHC05_destruct_12 … H);
+ nrewrite > (aluHC05_destruct_13 … H);
+ nchange with (
+ ((eq_b8 y1 y1) ⊗ (eq_b8 y2 y2) ⊗
+  (eq_w16 y3 y3) ⊗ (eq_w16 y4 y4) ⊗
+  (eq_w16 y5 y5) ⊗ (eq_w16 y6 y6) ⊗
+  (eq_w16 y7 y7) ⊗ (eq_bool y8 y8) ⊗
+  (eq_bool y9 y9) ⊗ (eq_bool y10 y10) ⊗
+  (eq_bool y11 y11) ⊗ (eq_bool y12 y12) ⊗
+  (eq_bool y13 y13)) = true); 
+ nrewrite > (eq_to_eqb8 y1 y1 (refl_eq …));
+ nrewrite > (eq_to_eqb8 y2 y2 (refl_eq …));
+ nrewrite > (eq_to_eqw16 y3 y3 (refl_eq …));
+ nrewrite > (eq_to_eqw16 y4 y4 (refl_eq …));
+ nrewrite > (eq_to_eqw16 y5 y5 (refl_eq …));
+ nrewrite > (eq_to_eqw16 y6 y6 (refl_eq …));
+ nrewrite > (eq_to_eqw16 y7 y7 (refl_eq …));
+ nrewrite > (eq_to_eqbool y8 y8 (refl_eq …));
+ nrewrite > (eq_to_eqbool y9 y9 (refl_eq …));
+ nrewrite > (eq_to_eqbool y10 y10 (refl_eq …));
+ nrewrite > (eq_to_eqbool y11 y11 (refl_eq …));
+ nrewrite > (eq_to_eqbool y12 y12 (refl_eq …));
+ nrewrite > (eq_to_eqbool y13 y13 (refl_eq …));
+ napply refl_eq.
+nqed.
+
+nlemma decidable_aluHC05_aux1
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ (x1 ≠ y1) →
+ (mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) ≠
+ (mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13;
+ nnormalize; #H; #H1;
+ napply (H (aluHC05_destruct_1 … H1)).
+nqed.
+
+nlemma decidable_aluHC05_aux2
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ (x2 ≠ y2) →
+ (mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) ≠
+ (mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13;
+ nnormalize; #H; #H1;
+ napply (H (aluHC05_destruct_2 … H1)).
+nqed.
+
+nlemma decidable_aluHC05_aux3
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ (x3 ≠ y3) →
+ (mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) ≠
+ (mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13;
+ nnormalize; #H; #H1;
+ napply (H (aluHC05_destruct_3 … H1)).
+nqed.
+
+nlemma decidable_aluHC05_aux4
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ (x4 ≠ y4) →
+ (mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) ≠
+ (mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13;
+ nnormalize; #H; #H1;
+ napply (H (aluHC05_destruct_4 … H1)).
+nqed.
+
+nlemma decidable_aluHC05_aux5
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ (x5 ≠ y5) →
+ (mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) ≠
+ (mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13;
+ nnormalize; #H; #H1;
+ napply (H (aluHC05_destruct_5 … H1)).
+nqed.
+
+nlemma decidable_aluHC05_aux6
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ (x6 ≠ y6) →
+ (mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) ≠
+ (mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13;
+ nnormalize; #H; #H1;
+ napply (H (aluHC05_destruct_6 … H1)).
+nqed.
+
+nlemma decidable_aluHC05_aux7
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ (x7 ≠ y7) →
+ (mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) ≠
+ (mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13;
+ nnormalize; #H; #H1;
+ napply (H (aluHC05_destruct_7 … H1)).
+nqed.
+
+nlemma decidable_aluHC05_aux8
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ (x8 ≠ y8) →
+ (mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) ≠
+ (mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13;
+ nnormalize; #H; #H1;
+ napply (H (aluHC05_destruct_8 … H1)).
+nqed.
+
+nlemma decidable_aluHC05_aux9
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ (x9 ≠ y9) →
+ (mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) ≠
+ (mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13;
+ nnormalize; #H; #H1;
+ napply (H (aluHC05_destruct_9 … H1)).
+nqed.
+
+nlemma decidable_aluHC05_aux10
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ (x10 ≠ y10) →
+ (mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) ≠
+ (mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13;
+ nnormalize; #H; #H1;
+ napply (H (aluHC05_destruct_10 … H1)).
+nqed.
+
+nlemma decidable_aluHC05_aux11
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ (x11 ≠ y11) →
+ (mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) ≠
+ (mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13;
+ nnormalize; #H; #H1;
+ napply (H (aluHC05_destruct_11 … H1)).
+nqed.
+
+nlemma decidable_aluHC05_aux12
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ (x12 ≠ y12) →
+ (mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) ≠
+ (mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13;
+ nnormalize; #H; #H1;
+ napply (H (aluHC05_destruct_12 … H1)).
+nqed.
+
+nlemma decidable_aluHC05_aux13
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13.
+ (x13 ≠ y13) →
+ (mk_alu_HC05 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13) ≠
+ (mk_alu_HC05 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13;
+ nnormalize; #H; #H1;
+ napply (H (aluHC05_destruct_13 … H1)).
+nqed.
+
+nlemma decidable_aluHC05 : ∀x,y:alu_HC05.decidable (x = y).
+ #x; nelim x; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13;
+ #y; nelim y; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13;
+ nnormalize;
+ napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_b8 x1 y1) …);
+ ##[ ##2: #H; napply (or2_intro2 … (decidable_aluHC05_aux1 … H))
+ ##| ##1: #H; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_b8 x2 y2) …);
+  ##[ ##2: #H1; napply (or2_intro2 … (decidable_aluHC05_aux2 … H1))
+  ##| ##1: #H1; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_w16 x3 y3) …);
+   ##[ ##2: #H2; napply (or2_intro2 … (decidable_aluHC05_aux3 … H2))
+   ##| ##1: #H2; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_w16 x4 y4) …);
+    ##[ ##2: #H3; napply (or2_intro2 … (decidable_aluHC05_aux4 … H3))
+    ##| ##1: #H3; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_w16 x5 y5) …);
+     ##[ ##2: #H4; napply (or2_intro2 … (decidable_aluHC05_aux5 … H4))
+     ##| ##1: #H4; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_w16 x6 y6) …);
+      ##[ ##2: #H5; napply (or2_intro2 … (decidable_aluHC05_aux6 … H5))
+      ##| ##1: #H5; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_w16 x7 y7) …);
+       ##[ ##2: #H6; napply (or2_intro2 … (decidable_aluHC05_aux7 … H6))
+       ##| ##1: #H6; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_bool x8 y8) …);
+        ##[ ##2: #H7; napply (or2_intro2 … (decidable_aluHC05_aux8 … H7))
+        ##| ##1: #H7; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_bool x9 y9) …);
+         ##[ ##2: #H8; napply (or2_intro2 … (decidable_aluHC05_aux9 … H8))
+         ##| ##1: #H8; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_bool x10 y10) …);
+          ##[ ##2: #H9; napply (or2_intro2 … (decidable_aluHC05_aux10 … H9))
+          ##| ##1: #H9; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_bool x11 y11) …);
+           ##[ ##2: #H10; napply (or2_intro2 … (decidable_aluHC05_aux11 … H10))
+           ##| ##1: #H10; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_bool x12 y12) …);
+            ##[ ##2: #H11; napply (or2_intro2 … (decidable_aluHC05_aux12 … H11))
+            ##| ##1: #H11; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_bool x13 y13) …);
+             ##[ ##2: #H12; napply (or2_intro2 … (decidable_aluHC05_aux13 … H12))
+             ##| ##1: #H12; nrewrite > H; nrewrite > H1; nrewrite > H2; nrewrite > H3;
+                      nrewrite > H4; nrewrite > H5; nrewrite > H6; nrewrite > H7;
+                      nrewrite > H8; nrewrite > H9; nrewrite > H10; nrewrite > H11;
+                      nrewrite > H12; napply (or2_intro1 (? = ?) (? ≠ ?) (refl_eq …))
+             ##]
+            ##]
+           ##]
+          ##]
+         ##]
+        ##]
+       ##]
+      ##]
+     ##]
+    ##]
+   ##]
+  ##]
+ ##]
+nqed.
diff --git a/helm/software/matita/contribs/ng_assembly/emulator/status/HC08_status_lemmas.ma b/helm/software/matita/contribs/ng_assembly/emulator/status/HC08_status_lemmas.ma
new file mode 100755 (executable)
index 0000000..b159762
--- /dev/null
@@ -0,0 +1,462 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* ********************************************************************** *)
+(*                          Progetto FreeScale                            *)
+(*                                                                        *)
+(*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
+(*   Sviluppo: 2008-2010                                                  *)
+(*                                                                        *)
+(* ********************************************************************** *)
+
+include "num/word16_lemmas.ma".
+include "emulator/status/HC08_status.ma".
+
+(* *********************************** *)
+(* STATUS INTERNO DEL PROCESSORE (ALU) *)
+(* *********************************** *)
+
+nlemma aluHC08_destruct_1 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 = mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 →
+ x1 = y1.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #H;
+ nchange with (match mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12
+                with [ mk_alu_HC08 a _ _ _ _ _ _ _ _ _ _ _ ⇒ x1 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC08_destruct_2 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 = mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 →
+ x2 = y2.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #H;
+ nchange with (match mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12
+                with [ mk_alu_HC08 _ a _ _ _ _ _ _ _ _ _ _ ⇒ x2 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC08_destruct_3 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 = mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 →
+ x3 = y3.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #H;
+ nchange with (match mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12
+                with [ mk_alu_HC08 _ _ a _ _ _ _ _ _ _ _ _ ⇒ x3 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC08_destruct_4 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 = mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 →
+ x4 = y4.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #H;
+ nchange with (match mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12
+                with [ mk_alu_HC08 _ _ _ a _ _ _ _ _ _ _ _ ⇒ x4 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC08_destruct_5 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 = mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 →
+ x5 = y5.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #H;
+ nchange with (match mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12
+                with [ mk_alu_HC08 _ _ _ _ a _ _ _ _ _ _ _ ⇒ x5 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC08_destruct_6 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 = mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 →
+ x6 = y6.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #H;
+ nchange with (match mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12
+                with [ mk_alu_HC08 _ _ _ _ _ a _ _ _ _ _ _ ⇒ x6 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC08_destruct_7 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 = mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 →
+ x7 = y7.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #H;
+ nchange with (match mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12
+                with [ mk_alu_HC08 _ _ _ _ _ _ a _ _ _ _ _ ⇒ x7 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC08_destruct_8 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 = mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 →
+ x8 = y8.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #H;
+ nchange with (match mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12
+                with [ mk_alu_HC08 _ _ _ _ _ _ _ a _ _ _ _ ⇒ x8 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC08_destruct_9 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 = mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 →
+ x9 = y9.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #H;
+ nchange with (match mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12
+                with [ mk_alu_HC08 _ _ _ _ _ _ _ _ a _ _ _ ⇒ x9 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC08_destruct_10 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 = mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 →
+ x10 = y10.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #H;
+ nchange with (match mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12
+                with [ mk_alu_HC08 _ _ _ _ _ _ _ _ _ a _ _ ⇒ x10 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC08_destruct_11 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 = mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 →
+ x11 = y11.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #H;
+ nchange with (match mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12
+                with [ mk_alu_HC08 _ _ _ _ _ _ _ _ _ _ a _ ⇒ x11 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluHC08_destruct_12 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 = mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 →
+ x12 = y12.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #H;
+ nchange with (match mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12
+                with [ mk_alu_HC08 _ _ _ _ _ _ _ _ _ _ _ a ⇒ x12 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma symmetric_eqaluHC08 : symmetricT alu_HC08 bool eq_HC08_alu.
+ #alu1; #alu2;
+ ncases alu1;
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ ncases alu2;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12;
+ nchange with (
+  ((eq_b8 x1 y1) ⊗ (eq_b8 x2 y2) ⊗ (eq_b8 x3 y3) ⊗ (eq_w16 x4 y4) ⊗
+   (eq_w16 x5 y5) ⊗ (eq_bool x6 y6) ⊗ (eq_bool x7 y7) ⊗ (eq_bool x8 y8) ⊗
+   (eq_bool x9 y9) ⊗ (eq_bool x10 y10) ⊗ (eq_bool x11 y11) ⊗ (eq_bool x12 y12)) =
+   ((eq_b8 y1 x1) ⊗ (eq_b8 y2 x2) ⊗ (eq_b8 y3 x3) ⊗ (eq_w16 y4 x4) ⊗
+   (eq_w16 y5 x5) ⊗ (eq_bool y6 x6) ⊗ (eq_bool y7 x7) ⊗ (eq_bool y8 x8) ⊗
+   (eq_bool y9 x9) ⊗ (eq_bool y10 x10) ⊗ (eq_bool y11 x11) ⊗ (eq_bool y12 x12))); 
+ nrewrite > (symmetric_eqb8 x1 y1);
+ nrewrite > (symmetric_eqb8 x2 y2);
+ nrewrite > (symmetric_eqb8 x3 y3);
+ nrewrite > (symmetric_eqw16 x4 y4);
+ nrewrite > (symmetric_eqw16 x5 y5);
+ nrewrite > (symmetric_eqbool x6 y6);
+ nrewrite > (symmetric_eqbool x7 y7);
+ nrewrite > (symmetric_eqbool x8 y8);
+ nrewrite > (symmetric_eqbool x9 y9);
+ nrewrite > (symmetric_eqbool x10 y10);
+ nrewrite > (symmetric_eqbool x11 y11);
+ nrewrite > (symmetric_eqbool x12 y12);
+ napply refl_eq.
+nqed.
+
+nlemma eqaluHC08_to_eq : ∀alu1,alu2.eq_HC08_alu alu1 alu2 = true → alu1 = alu2.
+ #alu1; #alu2;
+ ncases alu1;
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ ncases alu2;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #H;
+ nchange in H:(%) with (
+ ((eq_b8 x1 y1) ⊗ (eq_b8 x2 y2) ⊗ (eq_b8 x3 y3) ⊗ (eq_w16 x4 y4) ⊗
+  (eq_w16 x5 y5) ⊗ (eq_bool x6 y6) ⊗ (eq_bool x7 y7) ⊗ (eq_bool x8 y8) ⊗
+  (eq_bool x9 y9) ⊗ (eq_bool x10 y10) ⊗ (eq_bool x11 y11) ⊗ (eq_bool x12 y12)) = true);  
+ nrewrite > (eqbool_to_eq … (andb_true_true_r … H));
+ nletin H1 ≝ (andb_true_true_l … H);
+ nrewrite > (eqbool_to_eq … (andb_true_true_r … H1));
+ nletin H2 ≝ (andb_true_true_l … H1);
+ nrewrite > (eqbool_to_eq … (andb_true_true_r … H2));
+ nletin H3 ≝ (andb_true_true_l … H2);
+ nrewrite > (eqbool_to_eq … (andb_true_true_r … H3));
+ nletin H4 ≝ (andb_true_true_l … H3);
+ nrewrite > (eqbool_to_eq … (andb_true_true_r … H4));
+ nletin H5 ≝ (andb_true_true_l … H4);
+ nrewrite > (eqbool_to_eq … (andb_true_true_r … H5));
+ nletin H6 ≝ (andb_true_true_l … H5);
+ nrewrite > (eqbool_to_eq … (andb_true_true_r … H6));
+ nletin H7 ≝ (andb_true_true_l … H6);
+ nrewrite > (eqw16_to_eq … (andb_true_true_r … H7));
+ nletin H8 ≝ (andb_true_true_l … H7);
+ nrewrite > (eqw16_to_eq … (andb_true_true_r … H8));
+ nletin H9 ≝ (andb_true_true_l … H8);
+ nrewrite > (eqb8_to_eq … (andb_true_true_r … H9));
+ nletin H10 ≝ (andb_true_true_l … H9);
+ nrewrite > (eqb8_to_eq … (andb_true_true_r … H10));
+ nrewrite > (eqb8_to_eq … (andb_true_true_l … H10));
+ napply refl_eq.
+nqed.
+
+nlemma eq_to_eqaluHC08 : ∀alu1,alu2.alu1 = alu2 → eq_HC08_alu alu1 alu2 = true.
+ #alu1; #alu2;
+ ncases alu1;
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ ncases alu2;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #H;
+ nrewrite > (aluHC08_destruct_1 … H);
+ nrewrite > (aluHC08_destruct_2 … H);
+ nrewrite > (aluHC08_destruct_3 … H);
+ nrewrite > (aluHC08_destruct_4 … H);
+ nrewrite > (aluHC08_destruct_5 … H);
+ nrewrite > (aluHC08_destruct_6 … H);
+ nrewrite > (aluHC08_destruct_7 … H);
+ nrewrite > (aluHC08_destruct_8 … H);
+ nrewrite > (aluHC08_destruct_9 … H);
+ nrewrite > (aluHC08_destruct_10 … H);
+ nrewrite > (aluHC08_destruct_11 … H);
+ nrewrite > (aluHC08_destruct_12 … H);
+ nchange with (
+ ((eq_b8 y1 y1) ⊗ (eq_b8 y2 y2) ⊗ (eq_b8 y3 y3) ⊗ (eq_w16 y4 y4) ⊗
+  (eq_w16 y5 y5) ⊗ (eq_bool y6 y6) ⊗ (eq_bool y7 y7) ⊗ (eq_bool y8 y8) ⊗
+  (eq_bool y9 y9) ⊗ (eq_bool y10 y10) ⊗ (eq_bool y11 y11) ⊗ (eq_bool y12 y12)) = true); 
+ nrewrite > (eq_to_eqb8 y1 y1 (refl_eq …));
+ nrewrite > (eq_to_eqb8 y2 y2 (refl_eq …));
+ nrewrite > (eq_to_eqb8 y3 y3 (refl_eq …));
+ nrewrite > (eq_to_eqw16 y4 y4 (refl_eq …));
+ nrewrite > (eq_to_eqw16 y5 y5 (refl_eq …));
+ nrewrite > (eq_to_eqbool y6 y6 (refl_eq …));
+ nrewrite > (eq_to_eqbool y7 y7 (refl_eq …));
+ nrewrite > (eq_to_eqbool y8 y8 (refl_eq …));
+ nrewrite > (eq_to_eqbool y9 y9 (refl_eq …));
+ nrewrite > (eq_to_eqbool y10 y10 (refl_eq …));
+ nrewrite > (eq_to_eqbool y11 y11 (refl_eq …));
+ nrewrite > (eq_to_eqbool y12 y12 (refl_eq …));
+ napply refl_eq.
+nqed.
+
+nlemma decidable_aluHC08_aux1
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ (x1 ≠ y1) →
+ (mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) ≠
+ (mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12;
+ nnormalize; #H; #H1;
+ napply (H (aluHC08_destruct_1 … H1)).
+nqed.
+
+nlemma decidable_aluHC08_aux2
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ (x2 ≠ y2) →
+ (mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) ≠
+ (mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12;
+ nnormalize; #H; #H1;
+ napply (H (aluHC08_destruct_2 … H1)).
+nqed.
+
+nlemma decidable_aluHC08_aux3
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ (x3 ≠ y3) →
+ (mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) ≠
+ (mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12;
+ nnormalize; #H; #H1;
+ napply (H (aluHC08_destruct_3 … H1)).
+nqed.
+
+nlemma decidable_aluHC08_aux4
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ (x4 ≠ y4) →
+ (mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) ≠
+ (mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12;
+ nnormalize; #H; #H1;
+ napply (H (aluHC08_destruct_4 … H1)).
+nqed.
+
+nlemma decidable_aluHC08_aux5
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ (x5 ≠ y5) →
+ (mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) ≠
+ (mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12;
+ nnormalize; #H; #H1;
+ napply (H (aluHC08_destruct_5 … H1)).
+nqed.
+
+nlemma decidable_aluHC08_aux6
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ (x6 ≠ y6) →
+ (mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) ≠
+ (mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12;
+ nnormalize; #H; #H1;
+ napply (H (aluHC08_destruct_6 … H1)).
+nqed.
+
+nlemma decidable_aluHC08_aux7
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ (x7 ≠ y7) →
+ (mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) ≠
+ (mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12;
+ nnormalize; #H; #H1;
+ napply (H (aluHC08_destruct_7 … H1)).
+nqed.
+
+nlemma decidable_aluHC08_aux8
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ (x8 ≠ y8) →
+ (mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) ≠
+ (mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12;
+ nnormalize; #H; #H1;
+ napply (H (aluHC08_destruct_8 … H1)).
+nqed.
+
+nlemma decidable_aluHC08_aux9
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ (x9 ≠ y9) →
+ (mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) ≠
+ (mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12;
+ nnormalize; #H; #H1;
+ napply (H (aluHC08_destruct_9 … H1)).
+nqed.
+
+nlemma decidable_aluHC08_aux10
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ (x10 ≠ y10) →
+ (mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) ≠
+ (mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12;
+ nnormalize; #H; #H1;
+ napply (H (aluHC08_destruct_10 … H1)).
+nqed.
+
+nlemma decidable_aluHC08_aux11
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ (x11 ≠ y11) →
+ (mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) ≠
+ (mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12;
+ nnormalize; #H; #H1;
+ napply (H (aluHC08_destruct_11 … H1)).
+nqed.
+
+nlemma decidable_aluHC08_aux12
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12.
+ (x12 ≠ y12) →
+ (mk_alu_HC08 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12) ≠
+ (mk_alu_HC08 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12;
+ nnormalize; #H; #H1;
+ napply (H (aluHC08_destruct_12 … H1)).
+nqed.
+
+nlemma decidable_aluHC08 : ∀x,y:alu_HC08.decidable (x = y).
+ #x; nelim x; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12;
+ #y; nelim y; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12;
+ nnormalize;
+ napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_b8 x1 y1) …);
+ ##[ ##2: #H; napply (or2_intro2 … (decidable_aluHC08_aux1 … H))
+ ##| ##1: #H; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_b8 x2 y2) …);
+  ##[ ##2: #H1; napply (or2_intro2 … (decidable_aluHC08_aux2 … H1))
+  ##| ##1: #H1; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_b8 x3 y3) …);
+   ##[ ##2: #H2; napply (or2_intro2 … (decidable_aluHC08_aux3 … H2))
+   ##| ##1: #H2; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_w16 x4 y4) …);
+    ##[ ##2: #H3; napply (or2_intro2 … (decidable_aluHC08_aux4 … H3))
+    ##| ##1: #H3; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_w16 x5 y5) …);
+     ##[ ##2: #H4; napply (or2_intro2 … (decidable_aluHC08_aux5 … H4))
+     ##| ##1: #H4; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_bool x6 y6) …);
+      ##[ ##2: #H5; napply (or2_intro2 … (decidable_aluHC08_aux6 … H5))
+      ##| ##1: #H5; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_bool x7 y7) …);
+       ##[ ##2: #H6; napply (or2_intro2 … (decidable_aluHC08_aux7 … H6))
+       ##| ##1: #H6; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_bool x8 y8) …);
+        ##[ ##2: #H7; napply (or2_intro2 … (decidable_aluHC08_aux8 … H7))
+        ##| ##1: #H7; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_bool x9 y9) …);
+         ##[ ##2: #H8; napply (or2_intro2 … (decidable_aluHC08_aux9 … H8))
+         ##| ##1: #H8; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_bool x10 y10) …);
+          ##[ ##2: #H9; napply (or2_intro2 … (decidable_aluHC08_aux10 … H9))
+          ##| ##1: #H9; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_bool x11 y11) …);
+           ##[ ##2: #H10; napply (or2_intro2 … (decidable_aluHC08_aux11 … H10))
+           ##| ##1: #H10; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_bool x12 y12) …);
+            ##[ ##2: #H11; napply (or2_intro2 … (decidable_aluHC08_aux12 … H11))
+            ##| ##1: #H11; nrewrite > H; nrewrite > H1; nrewrite > H2; nrewrite > H3;
+                      nrewrite > H4; nrewrite > H5; nrewrite > H6; nrewrite > H7;
+                      nrewrite > H8; nrewrite > H9; nrewrite > H10; nrewrite > H11;
+                      napply (or2_intro1 (? = ?) (? ≠ ?) (refl_eq …))
+            ##]
+           ##]
+          ##]
+         ##]
+        ##]
+       ##]
+      ##]
+     ##]
+    ##]
+   ##]
+  ##]
+ ##]
+nqed.
diff --git a/helm/software/matita/contribs/ng_assembly/emulator/status/IP2022_status_lemmas.ma b/helm/software/matita/contribs/ng_assembly/emulator/status/IP2022_status_lemmas.ma
new file mode 100755 (executable)
index 0000000..d698c03
--- /dev/null
@@ -0,0 +1,615 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* ********************************************************************** *)
+(*                          Progetto FreeScale                            *)
+(*                                                                        *)
+(*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
+(*   Sviluppo: 2008-2010                                                  *)
+(*                                                                        *)
+(* ********************************************************************** *)
+
+include "num/oct_lemmas.ma".
+include "num/word16_lemmas.ma".
+include "num/word24_lemmas.ma".
+include "emulator/status/IP2022_status.ma".
+include "emulator/memory/memory_struct_lemmas.ma".
+
+(* *********************************** *)
+(* STATUS INTERNO DEL PROCESSORE (ALU) *)
+(* *********************************** *)
+
+nlemma aluIP2022_destruct_1 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x1 = y1.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_alu_IP2022 a _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ⇒ x1 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluIP2022_destruct_2 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x2 = y2.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_alu_IP2022 _ a _ _ _ _ _ _ _ _ _ _ _ _ _ _ ⇒ x2 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluIP2022_destruct_3 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x3 = y3.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_alu_IP2022 _ _ a _ _ _ _ _ _ _ _ _ _ _ _ _ ⇒ x3 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluIP2022_destruct_4 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x4 = y4.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_alu_IP2022 _ _ _ a _ _ _ _ _ _ _ _ _ _ _ _ ⇒ x4 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluIP2022_destruct_5 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x5 = y5.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_alu_IP2022 _ _ _ _ a _ _ _ _ _ _ _ _ _ _ _ ⇒ x5 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluIP2022_destruct_6 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x6 = y6.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_alu_IP2022 _ _ _ _ _ a _ _ _ _ _ _ _ _ _ _ ⇒ x6 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluIP2022_destruct_7 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x7 = y7.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_alu_IP2022 _ _ _ _ _ _ a _ _ _ _ _ _ _ _ _ ⇒ x7 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluIP2022_destruct_8 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x8 = y8.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_alu_IP2022 _ _ _ _ _ _ _ a _ _ _ _ _ _ _ _ ⇒ x8 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluIP2022_destruct_9 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x9 = y9.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_alu_IP2022 _ _ _ _ _ _ _ _ a _ _ _ _ _ _ _ ⇒ x9 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluIP2022_destruct_10 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x10 = y10.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_alu_IP2022 _ _ _ _ _ _ _ _ _ a _ _ _ _ _ _ ⇒ x10 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluIP2022_destruct_11 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x11 = y11.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_alu_IP2022 _ _ _ _ _ _ _ _ _ _ a _ _ _ _ _ ⇒ x11 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluIP2022_destruct_12 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x12 = y12.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_alu_IP2022 _ _ _ _ _ _ _ _ _ _ _ a _ _ _ _ ⇒ x12 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluIP2022_destruct_13 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x13 = y13.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_alu_IP2022 _ _ _ _ _ _ _ _ _ _ _ _ a _ _ _ ⇒ x13 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluIP2022_destruct_14 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x14 = y14.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_alu_IP2022 _ _ _ _ _ _ _ _ _ _ _ _ _ a _ _ ⇒ x14 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluIP2022_destruct_15 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x15 = y15.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_alu_IP2022 _ _ _ _ _ _ _ _ _ _ _ _ _ _ a _ ⇒ x15 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluIP2022_destruct_16 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 =
+ mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 →
+ x16 = y16.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange with (match mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16
+                with [ mk_alu_IP2022 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ a ⇒ x16 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+naxiom symmetric_eqaluIP2022 : symmetricT alu_IP2022 bool eq_IP2022_alu.
+(* !!! la compilazione avviene ma il tempo e' troppo lungo...
+ #alu1; ncases alu1;
+ #z1; #z2; #z3; #z4; #z5; #z6; #z7; #z8; #z9; #z10; #z11; #z12; #z13; #z14; #z15; #z16;
+ #alu2; ncases alu2;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nchange with (
+  ((eq_b8 z1 y1) ⊗ (eq_b8 z2 y2) ⊗ (eq_b8 z3 y3) ⊗ (eq_ar8 ? eq_w24 z4 y4) ⊗
+  (eq_ar16 ? eq_w16 z5 y5) ⊗ (eq_w16 z6 y6) ⊗ (eq_w16 z7 y7) ⊗ (eq_w16 z8 y8) ⊗
+  (eq_w16 z9 y9) ⊗ (eq_w16 z10 y10) ⊗ (eq_ex z11 y11) ⊗ (eq_oct z12 y12) ⊗
+  (eq_bool z13 y13) ⊗ (eq_bool z14 y14) ⊗ (eq_bool z15 y15) ⊗ (eq_bool z16 y16)) =
+  ((eq_b8 y1 z1) ⊗ (eq_b8 y2 z2) ⊗ (eq_b8 y3 z3) ⊗ (eq_ar8 ? eq_w24 y4 z4) ⊗
+  (eq_ar16 ? eq_w16 y5 z5) ⊗ (eq_w16 y6 z6) ⊗ (eq_w16 y7 z7) ⊗ (eq_w16 y8 z8) ⊗
+  (eq_w16 y9 z9) ⊗ (eq_w16 y10 z10) ⊗ (eq_ex y11 z11) ⊗ (eq_oct y12 z12) ⊗
+  (eq_bool y13 z13) ⊗ (eq_bool y14 z14) ⊗ (eq_bool y15 z15) ⊗ (eq_bool y16 z16)));
+ nrewrite > (symmetric_eqb8 z1 y1);
+ nrewrite > (symmetric_eqb8 z2 y2);
+ nrewrite > (symmetric_eqb8 z3 y3);
+ nrewrite > (symmetric_eqar8 ? eq_w24 symmetric_eqw24 z4 y4);
+ nrewrite > (symmetric_eqar16 ? eq_w16 symmetric_eqw16 z5 y5);
+ nrewrite > (symmetric_eqw16 z6 y6);
+ nrewrite > (symmetric_eqw16 z7 y7);
+ nrewrite > (symmetric_eqw16 z8 y8);
+ nrewrite > (symmetric_eqw16 z9 y9);
+ nrewrite > (symmetric_eqw16 z10 y10);
+ nrewrite > (symmetric_eqex z11 y11);
+ nrewrite > (symmetric_eqoct z12 y12);
+ nrewrite > (symmetric_eqbool z13 y13);
+ nrewrite > (symmetric_eqbool z14 y14);
+ nrewrite > (symmetric_eqbool z15 y15);
+ nrewrite > (symmetric_eqbool z16 y16);
+ napply refl_eq.
+nqed.
+*)
+
+nlemma eqaluIP2022_to_eq : ∀alu1,alu2.eq_IP2022_alu alu1 alu2 = true → alu1 = alu2.
+ #alu1; ncases alu1;
+ #z1; #z2; #z3; #z4; #z5; #z6; #z7; #z8; #z9; #z10; #z11; #z12; #z13; #z14; #z15; #z16;
+ #alu2; ncases alu2;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nchange in H:(%) with (
+ ((eq_b8 z1 y1) ⊗ (eq_b8 z2 y2) ⊗ (eq_b8 z3 y3) ⊗ (eq_ar8 ? eq_w24 z4 y4) ⊗
+  (eq_ar16 ? eq_w16 z5 y5) ⊗ (eq_w16 z6 y6) ⊗ (eq_w16 z7 y7) ⊗ (eq_w16 z8 y8) ⊗
+  (eq_w16 z9 y9) ⊗ (eq_w16 z10 y10) ⊗ (eq_ex z11 y11) ⊗ (eq_oct z12 y12) ⊗
+  (eq_bool z13 y13) ⊗ (eq_bool z14 y14) ⊗ (eq_bool z15 y15) ⊗ (eq_bool z16 y16)) = true);  
+ nrewrite > (eqbool_to_eq … (andb_true_true_r … H));
+ nletin H1 ≝ (andb_true_true_l … H);
+ nrewrite > (eqbool_to_eq … (andb_true_true_r … (andb_true_true_l … H)));
+ nletin H2 ≝ (andb_true_true_l … H1);
+ nrewrite > (eqbool_to_eq … (andb_true_true_r … H2));
+ nletin H3 ≝ (andb_true_true_l … H2);
+ nrewrite > (eqbool_to_eq … (andb_true_true_r … H3));
+ nletin H4 ≝ (andb_true_true_l … H3);
+ nrewrite > (eqoct_to_eq … (andb_true_true_r … H4));
+ nletin H5 ≝ (andb_true_true_l … H4);
+ nrewrite > (eqex_to_eq … (andb_true_true_r … H5));
+ nletin H6 ≝ (andb_true_true_l … H5);
+ nrewrite > (eqw16_to_eq … (andb_true_true_r … H6));
+ nletin H7 ≝ (andb_true_true_l … H6);
+ nrewrite > (eqw16_to_eq … (andb_true_true_r … H7));
+ nletin H8 ≝ (andb_true_true_l … H7);
+ nrewrite > (eqw16_to_eq … (andb_true_true_r … H8));
+ nletin H9 ≝ (andb_true_true_l … H8);
+ nrewrite > (eqw16_to_eq … (andb_true_true_r … H9));
+ nletin H10 ≝ (andb_true_true_l … H9);
+ nrewrite > (eqw16_to_eq … (andb_true_true_r … H10));
+ nletin H11 ≝ (andb_true_true_l … H10);
+ nrewrite > (eqar16_to_eq ? eq_w16 eqw16_to_eq … (andb_true_true_r … H11));
+ nletin H12 ≝ (andb_true_true_l … H11);
+ nrewrite > (eqar8_to_eq ? eq_w24 eqw24_to_eq … (andb_true_true_r … H12));
+ nletin H13 ≝ (andb_true_true_l … H12);
+ nrewrite > (eqb8_to_eq … (andb_true_true_r … H13));
+ nletin H14 ≝ (andb_true_true_l … H13);
+ nrewrite > (eqb8_to_eq … (andb_true_true_r … H14));
+ nrewrite > (eqb8_to_eq … (andb_true_true_l … H14));
+ napply refl_eq.
+nqed.
+
+naxiom eq_to_eqaluIP2022 : ∀alu1,alu2.alu1 = alu2 → eq_IP2022_alu alu1 alu2 = true.
+(* !!! la compilazione avviene ma il tempo e' troppo lungo...
+ #alu1; ncases alu1;
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #alu2; ncases alu2;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16; #H;
+ nrewrite > (aluIP2022_destruct_1 … H);
+ nrewrite > (aluIP2022_destruct_2 … H);
+ nrewrite > (aluIP2022_destruct_3 … H);
+ nrewrite > (aluIP2022_destruct_4 … H);
+ nrewrite > (aluIP2022_destruct_5 … H);
+ nrewrite > (aluIP2022_destruct_6 … H);
+ nrewrite > (aluIP2022_destruct_7 … H);
+ nrewrite > (aluIP2022_destruct_8 … H);
+ nrewrite > (aluIP2022_destruct_9 … H);
+ nrewrite > (aluIP2022_destruct_10 … H);
+ nrewrite > (aluIP2022_destruct_11 … H);
+ nrewrite > (aluIP2022_destruct_12 … H);
+ nrewrite > (aluIP2022_destruct_13 … H);
+ nrewrite > (aluIP2022_destruct_14 … H);
+ nrewrite > (aluIP2022_destruct_15 … H);
+ nrewrite > (aluIP2022_destruct_16 … H);
+ nchange with (
+ ((eq_b8 y1 y1) ⊗ (eq_b8 y2 y2) ⊗ (eq_b8 y3 y3) ⊗ (eq_ar8 ? eq_w24 y4 y4) ⊗
+  (eq_ar16 ? eq_w16 y5 y5) ⊗ (eq_w16 y6 y6) ⊗ (eq_w16 y7 y7) ⊗ (eq_w16 y8 y8) ⊗
+  (eq_w16 y9 y9) ⊗ (eq_w16 y10 y10) ⊗ (eq_ex y11 y11) ⊗ (eq_oct y12 y12) ⊗
+  (eq_bool y13 y13) ⊗ (eq_bool y14 y14) ⊗ (eq_bool y15 y15) ⊗ (eq_bool y16 y16)) = true); 
+ nrewrite > (eq_to_eqb8 y1 y1 (refl_eq …));
+ nrewrite > (eq_to_eqb8 y2 y2 (refl_eq …));
+ nrewrite > (eq_to_eqb8 y3 y3 (refl_eq …));
+ nrewrite > (eq_to_eqar8 ? eq_w24 eq_to_eqw24 y4 y4 (refl_eq …));
+ nrewrite > (eq_to_eqar16 ? eq_w16 eq_to_eqw16 y5 y5 (refl_eq …));
+ nrewrite > (eq_to_eqw16 y6 y6 (refl_eq …));
+ nrewrite > (eq_to_eqw16 y7 y7 (refl_eq …));
+ nrewrite > (eq_to_eqw16 y8 y8 (refl_eq …));
+ nrewrite > (eq_to_eqw16 y9 y9 (refl_eq …));
+ nrewrite > (eq_to_eqw16 y10 y10 (refl_eq …));
+ nrewrite > (eq_to_ex y11 y11 (refl_eq …));
+ nrewrite > (eq_to_oct y12 y12 (refl_eq …));
+ nrewrite > (eq_to_eqbool y13 y13 (refl_eq …));
+ nrewrite > (eq_to_eqbool y14 y14 (refl_eq …));
+ nrewrite > (eq_to_eqbool y15 y15 (refl_eq …));
+ nrewrite > (eq_to_eqbool y16 y16 (refl_eq …));
+ napply refl_eq.
+nqed.
+*)
+
+nlemma decidable_aluIP2022_aux1
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ (x1 ≠ y1) →
+ (mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (aluIP2022_destruct_1 … H1)).
+nqed.
+
+nlemma decidable_aluIP2022_aux2
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ (x2 ≠ y2) →
+ (mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (aluIP2022_destruct_2 … H1)).
+nqed.
+
+nlemma decidable_aluIP2022_aux3
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ (x3 ≠ y3) →
+ (mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (aluIP2022_destruct_3 … H1)).
+nqed.
+
+nlemma decidable_aluIP2022_aux4
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ (x4 ≠ y4) →
+ (mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (aluIP2022_destruct_4 … H1)).
+nqed.
+
+nlemma decidable_aluIP2022_aux5
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ (x5 ≠ y5) →
+ (mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (aluIP2022_destruct_5 … H1)).
+nqed.
+
+nlemma decidable_aluIP2022_aux6
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ (x6 ≠ y6) →
+ (mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (aluIP2022_destruct_6 … H1)).
+nqed.
+
+nlemma decidable_aluIP2022_aux7
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ (x7 ≠ y7) →
+ (mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (aluIP2022_destruct_7 … H1)).
+nqed.
+
+nlemma decidable_aluIP2022_aux8
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ (x8 ≠ y8) →
+ (mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (aluIP2022_destruct_8 … H1)).
+nqed.
+
+nlemma decidable_aluIP2022_aux9
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ (x9 ≠ y9) →
+ (mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (aluIP2022_destruct_9 … H1)).
+nqed.
+
+nlemma decidable_aluIP2022_aux10
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ (x10 ≠ y10) →
+ (mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (aluIP2022_destruct_10 … H1)).
+nqed.
+
+nlemma decidable_aluIP2022_aux11
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ (x11 ≠ y11) →
+ (mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (aluIP2022_destruct_11 … H1)).
+nqed.
+
+nlemma decidable_aluIP2022_aux12
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ (x12 ≠ y12) →
+ (mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (aluIP2022_destruct_12 … H1)).
+nqed.
+
+nlemma decidable_aluIP2022_aux13
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ (x13 ≠ y13) →
+ (mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (aluIP2022_destruct_13 … H1)).
+nqed.
+
+nlemma decidable_aluIP2022_aux14
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ (x14 ≠ y14) →
+ (mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (aluIP2022_destruct_14 … H1)).
+nqed.
+
+nlemma decidable_aluIP2022_aux15
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ (x15 ≠ y15) →
+ (mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (aluIP2022_destruct_15 … H1)).
+nqed.
+
+nlemma decidable_aluIP2022_aux16
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16.
+ (x16 ≠ y16) →
+ (mk_alu_IP2022 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16) ≠
+ (mk_alu_IP2022 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize; #H; #H1;
+ napply (H (aluIP2022_destruct_16 … H1)).
+nqed.
+
+nlemma decidable_aluIP2022 : ∀x,y:alu_IP2022.decidable (x = y).
+ #x; nelim x; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8; #x9; #x10; #x11; #x12; #x13; #x14; #x15; #x16;
+ #y; nelim y; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #y9; #y10; #y11; #y12; #y13; #y14; #y15; #y16;
+ nnormalize;
+ napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_b8 x1 y1) …);
+ ##[ ##2: #H; napply (or2_intro2 … (decidable_aluIP2022_aux1 … H))
+ ##| ##1: #H; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_b8 x2 y2) …);
+  ##[ ##2: #H1; napply (or2_intro2 … (decidable_aluIP2022_aux2 … H1))
+  ##| ##1: #H1; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_b8 x3 y3) …);
+   ##[ ##2: #H2; napply (or2_intro2 … (decidable_aluIP2022_aux3 … H2))
+   ##| ##1: #H2; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_ar8 ? decidable_w24 x4 y4) …);
+    ##[ ##2: #H3; napply (or2_intro2 … (decidable_aluIP2022_aux4 … H3))
+    ##| ##1: #H3; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_ar16 ? decidable_w16 x5 y5) …);
+     ##[ ##2: #H4; napply (or2_intro2 … (decidable_aluIP2022_aux5 … H4))
+     ##| ##1: #H4; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_w16 x6 y6) …);
+      ##[ ##2: #H5; napply (or2_intro2 … (decidable_aluIP2022_aux6 … H5))
+      ##| ##1: #H5; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_w16 x7 y7) …);
+       ##[ ##2: #H6; napply (or2_intro2 … (decidable_aluIP2022_aux7 … H6))
+       ##| ##1: #H6; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_w16 x8 y8) …);
+        ##[ ##2: #H7; napply (or2_intro2 … (decidable_aluIP2022_aux8 … H7))
+        ##| ##1: #H7; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_w16 x9 y9) …);
+         ##[ ##2: #H8; napply (or2_intro2 … (decidable_aluIP2022_aux9 … H8))
+         ##| ##1: #H8; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_w16 x10 y10) …);
+          ##[ ##2: #H9; napply (or2_intro2 … (decidable_aluIP2022_aux10 … H9))
+          ##| ##1: #H9; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_ex x11 y11) …);
+           ##[ ##2: #H10; napply (or2_intro2 … (decidable_aluIP2022_aux11 … H10))
+           ##| ##1: #H10; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_oct x12 y12) …);
+            ##[ ##2: #H11; napply (or2_intro2 … (decidable_aluIP2022_aux12 … H11))
+            ##| ##1: #H11; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_bool x13 y13) …);
+             ##[ ##2: #H12; napply (or2_intro2 … (decidable_aluIP2022_aux13 … H12))
+             ##| ##1: #H12; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_bool x14 y14) …);
+              ##[ ##2: #H13; napply (or2_intro2 … (decidable_aluIP2022_aux14 … H13))
+              ##| ##1: #H13; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_bool x15 y15) …);
+               ##[ ##2: #H14; napply (or2_intro2 … (decidable_aluIP2022_aux15 … H14))
+               ##| ##1: #H14; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_bool x16 y16) …);
+                ##[ ##2: #H15; napply (or2_intro2 … (decidable_aluIP2022_aux16 … H15))
+                ##| ##1: #H15; nrewrite > H; nrewrite > H1; nrewrite > H2; nrewrite > H3;
+                      nrewrite > H4; nrewrite > H5; nrewrite > H6; nrewrite > H7;
+                      nrewrite > H8; nrewrite > H9; nrewrite > H10; nrewrite > H11;
+                      nrewrite > H12; nrewrite > H13; nrewrite > H14; nrewrite > H15;
+                      napply (or2_intro1 (? = ?) (? ≠ ?) (refl_eq …));
+                ##]
+               ##]
+              ##]
+             ##]
+            ##]
+           ##]
+          ##]
+         ##]
+        ##]
+       ##]
+      ##]
+     ##]
+    ##]
+   ##]
+  ##]
+ ##]
+nqed.
diff --git a/helm/software/matita/contribs/ng_assembly/emulator/status/RS08_status_lemmas.ma b/helm/software/matita/contribs/ng_assembly/emulator/status/RS08_status_lemmas.ma
new file mode 100755 (executable)
index 0000000..4b2615e
--- /dev/null
@@ -0,0 +1,337 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* ********************************************************************** *)
+(*                          Progetto FreeScale                            *)
+(*                                                                        *)
+(*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
+(*   Sviluppo: 2008-2010                                                  *)
+(*                                                                        *)
+(* ********************************************************************** *)
+
+include "num/word16_lemmas.ma".
+include "emulator/status/RS08_status.ma".
+
+(* *********************************** *)
+(* STATUS INTERNO DEL PROCESSORE (ALU) *)
+(* *********************************** *)
+
+nlemma aluRS08_destruct_1 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8.
+ mk_alu_RS08 x1 x2 x3 x4 x5 x6 x7 x8 = mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8 →
+ x1 = y1.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H;
+ nchange with (match mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8
+                with [ mk_alu_RS08 a _ _ _ _ _ _ _ ⇒ x1 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluRS08_destruct_2 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8.
+ mk_alu_RS08 x1 x2 x3 x4 x5 x6 x7 x8 = mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8 →
+ x2 = y2.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H;
+ nchange with (match mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8
+                with [ mk_alu_RS08 _ a _ _ _ _ _ _ ⇒ x2 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluRS08_destruct_3 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8.
+ mk_alu_RS08 x1 x2 x3 x4 x5 x6 x7 x8 = mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8 →
+ x3 = y3.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H;
+ nchange with (match mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8
+                with [ mk_alu_RS08 _ _ a _ _ _ _ _ ⇒ x3 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluRS08_destruct_4 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8.
+ mk_alu_RS08 x1 x2 x3 x4 x5 x6 x7 x8 = mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8 →
+ x4 = y4.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H;
+ nchange with (match mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8
+                with [ mk_alu_RS08 _ _ _ a _ _ _ _ ⇒ x4 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluRS08_destruct_5 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8.
+ mk_alu_RS08 x1 x2 x3 x4 x5 x6 x7 x8 = mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8 →
+ x5 = y5.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H;
+ nchange with (match mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8
+                with [ mk_alu_RS08 _ _ _ _ a _ _ _ ⇒ x5 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluRS08_destruct_6 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8.
+ mk_alu_RS08 x1 x2 x3 x4 x5 x6 x7 x8 = mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8 →
+ x6 = y6.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H;
+ nchange with (match mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8
+                with [ mk_alu_RS08 _ _ _ _ _ a _ _ ⇒ x6 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluRS08_destruct_7 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8.
+ mk_alu_RS08 x1 x2 x3 x4 x5 x6 x7 x8 = mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8 →
+ x7 = y7.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H;
+ nchange with (match mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8
+                with [ mk_alu_RS08 _ _ _ _ _ _ a _ ⇒ x7 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma aluRS08_destruct_8 :
+∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8.
+ mk_alu_RS08 x1 x2 x3 x4 x5 x6 x7 x8 = mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8 →
+ x8 = y8.
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H;
+ nchange with (match mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8
+                with [ mk_alu_RS08 _ _ _ _ _ _ _ a ⇒ x8 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma symmetric_eqaluRS08 : symmetricT alu_RS08 bool eq_RS08_alu.
+ #alu1; #alu2;
+ ncases alu1;
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ ncases alu2;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8;
+ nchange with (
+  ((eq_b8 x1 y1) ⊗ (eq_w16 x2 y2) ⊗
+   (eq_w16 x3 y3) ⊗ (eq_w16 x4 y4) ⊗
+   (eq_b8 x5 y5) ⊗ (eq_b8 x6 y6) ⊗
+   (eq_bool x7 y7) ⊗ (eq_bool x8 y8)) =
+  ((eq_b8 y1 x1) ⊗ (eq_w16 y2 x2) ⊗
+   (eq_w16 y3 x3) ⊗ (eq_w16 y4 x4) ⊗
+   (eq_b8 y5 x5) ⊗ (eq_b8 y6 x6) ⊗
+   (eq_bool y7 x7) ⊗ (eq_bool y8 x8)));
+ nrewrite > (symmetric_eqb8 x1 y1);
+ nrewrite > (symmetric_eqw16 x2 y2);
+ nrewrite > (symmetric_eqw16 x3 y3);
+ nrewrite > (symmetric_eqw16 x4 y4);
+ nrewrite > (symmetric_eqb8 x5 y5);
+ nrewrite > (symmetric_eqb8 x6 y6);
+ nrewrite > (symmetric_eqbool x7 y7);
+ nrewrite > (symmetric_eqbool x8 y8);
+ napply refl_eq.
+nqed.
+
+nlemma eqaluRS08_to_eq : ∀alu1,alu2.eq_RS08_alu alu1 alu2 = true → alu1 = alu2.
+ #alu1; #alu2;
+ ncases alu1;
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ ncases alu2;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H;
+ nchange in H:(%) with (
+  ((eq_b8 x1 y1) ⊗ (eq_w16 x2 y2) ⊗
+   (eq_w16 x3 y3) ⊗ (eq_w16 x4 y4) ⊗
+   (eq_b8 x5 y5) ⊗ (eq_b8 x6 y6) ⊗
+   (eq_bool x7 y7) ⊗ (eq_bool x8 y8)) = true);
+ nrewrite > (eqbool_to_eq … (andb_true_true_r … H));
+ nletin H1 ≝ (andb_true_true_l … H);
+ nrewrite > (eqbool_to_eq … (andb_true_true_r … H1));
+ nletin H2 ≝ (andb_true_true_l … H1);
+ nrewrite > (eqb8_to_eq … (andb_true_true_r … H2));
+ nletin H3 ≝ (andb_true_true_l … H2);
+ nrewrite > (eqb8_to_eq … (andb_true_true_r … H3));
+ nletin H4 ≝ (andb_true_true_l … H3);
+ nrewrite > (eqw16_to_eq … (andb_true_true_r … H4));
+ nletin H5 ≝ (andb_true_true_l … H4);
+ nrewrite > (eqw16_to_eq … (andb_true_true_r … H5));
+ nletin H6 ≝ (andb_true_true_l … H5);
+ nrewrite > (eqw16_to_eq … (andb_true_true_r … H6));
+ nrewrite > (eqb8_to_eq … (andb_true_true_l … H6));
+ napply refl_eq.
+nqed.
+
+nlemma eq_to_eqaluRS08 : ∀alu1,alu2.alu1 = alu2 → eq_RS08_alu alu1 alu2 = true.
+ #alu1; #alu2;
+ ncases alu1;
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ ncases alu2;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8; #H;
+ nrewrite > (aluRS08_destruct_1 … H);
+ nrewrite > (aluRS08_destruct_2 … H);
+ nrewrite > (aluRS08_destruct_3 … H);
+ nrewrite > (aluRS08_destruct_4 … H);
+ nrewrite > (aluRS08_destruct_5 … H);
+ nrewrite > (aluRS08_destruct_6 … H);
+ nrewrite > (aluRS08_destruct_7 … H);
+ nrewrite > (aluRS08_destruct_8 … H);
+ nchange with (
+  ((eq_b8 y1 y1) ⊗ (eq_w16 y2 y2) ⊗
+   (eq_w16 y3 y3) ⊗ (eq_w16 y4 y4) ⊗
+   (eq_b8 y5 y5) ⊗ (eq_b8 y6 y6) ⊗
+   (eq_bool y7 y7) ⊗ (eq_bool y8 y8)) = true);
+ nrewrite > (eq_to_eqb8 y1 y1 (refl_eq …));
+ nrewrite > (eq_to_eqw16 y2 y2 (refl_eq …));
+ nrewrite > (eq_to_eqw16 y3 y3 (refl_eq …));
+ nrewrite > (eq_to_eqw16 y4 y4 (refl_eq …));
+ nrewrite > (eq_to_eqb8 y5 y5 (refl_eq …));
+ nrewrite > (eq_to_eqb8 y6 y6 (refl_eq …));
+ nrewrite > (eq_to_eqbool y7 y7 (refl_eq …));
+ nrewrite > (eq_to_eqbool y8 y8 (refl_eq …));
+ napply refl_eq.
+nqed.
+
+nlemma decidable_aluRS08_aux1
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8.
+ (x1 ≠ y1) →
+ (mk_alu_RS08 x1 x2 x3 x4 x5 x6 x7 x8) ≠
+ (mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8;
+ nnormalize; #H; #H1;
+ napply (H (aluRS08_destruct_1 … H1)).
+nqed.
+
+nlemma decidable_aluRS08_aux2
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8.
+ (x2 ≠ y2) →
+ (mk_alu_RS08 x1 x2 x3 x4 x5 x6 x7 x8) ≠
+ (mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8;
+ nnormalize; #H; #H1;
+ napply (H (aluRS08_destruct_2 … H1)).
+nqed.
+
+nlemma decidable_aluRS08_aux3
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8.
+ (x3 ≠ y3) →
+ (mk_alu_RS08 x1 x2 x3 x4 x5 x6 x7 x8) ≠
+ (mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8;
+ nnormalize; #H; #H1;
+ napply (H (aluRS08_destruct_3 … H1)).
+nqed.
+
+nlemma decidable_aluRS08_aux4
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8.
+ (x4 ≠ y4) →
+ (mk_alu_RS08 x1 x2 x3 x4 x5 x6 x7 x8) ≠
+ (mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8;
+ nnormalize; #H; #H1;
+ napply (H (aluRS08_destruct_4 … H1)).
+nqed.
+
+nlemma decidable_aluRS08_aux5
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8.
+ (x5 ≠ y5) →
+ (mk_alu_RS08 x1 x2 x3 x4 x5 x6 x7 x8) ≠
+ (mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8;
+ nnormalize; #H; #H1;
+ napply (H (aluRS08_destruct_5 … H1)).
+nqed.
+
+nlemma decidable_aluRS08_aux6
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8.
+ (x6 ≠ y6) →
+ (mk_alu_RS08 x1 x2 x3 x4 x5 x6 x7 x8) ≠
+ (mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8;
+ nnormalize; #H; #H1;
+ napply (H (aluRS08_destruct_6 … H1)).
+nqed.
+
+nlemma decidable_aluRS08_aux7
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8.
+ (x7 ≠ y7) →
+ (mk_alu_RS08 x1 x2 x3 x4 x5 x6 x7 x8) ≠
+ (mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8;
+ nnormalize; #H; #H1;
+ napply (H (aluRS08_destruct_7 … H1)).
+nqed.
+
+nlemma decidable_aluRS08_aux8
+ : ∀x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8.
+ (x8 ≠ y8) →
+ (mk_alu_RS08 x1 x2 x3 x4 x5 x6 x7 x8) ≠
+ (mk_alu_RS08 y1 y2 y3 y4 y5 y6 y7 y8).
+ #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8;
+ nnormalize; #H; #H1;
+ napply (H (aluRS08_destruct_8 … H1)).
+nqed.
+
+nlemma decidable_aluRS08 : ∀x,y:alu_RS08.decidable (x = y).
+ #x; nelim x; #x1; #x2; #x3; #x4; #x5; #x6; #x7; #x8;
+ #y; nelim y; #y1; #y2; #y3; #y4; #y5; #y6; #y7; #y8;
+ nnormalize;
+ napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_b8 x1 y1) …);
+ ##[ ##2: #H; napply (or2_intro2 … (decidable_aluRS08_aux1 … H))
+ ##| ##1: #H; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_w16 x2 y2) …);
+  ##[ ##2: #H1; napply (or2_intro2 … (decidable_aluRS08_aux2 … H1))
+  ##| ##1: #H1; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_w16 x3 y3) …);
+   ##[ ##2: #H2; napply (or2_intro2 … (decidable_aluRS08_aux3 … H2))
+   ##| ##1: #H2; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_w16 x4 y4) …);
+    ##[ ##2: #H3; napply (or2_intro2 … (decidable_aluRS08_aux4 … H3))
+    ##| ##1: #H3; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_b8 x5 y5) …);
+     ##[ ##2: #H4; napply (or2_intro2 … (decidable_aluRS08_aux5 … H4))
+     ##| ##1: #H4; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_b8 x6 y6) …);
+      ##[ ##2: #H5; napply (or2_intro2 … (decidable_aluRS08_aux6 … H5))
+      ##| ##1: #H5; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_bool x7 y7) …);
+       ##[ ##2: #H6; napply (or2_intro2 … (decidable_aluRS08_aux7 … H6))
+       ##| ##1: #H6; napply (or2_elim (? = ?) (? ≠ ?) ? (decidable_bool x8 y8) …);
+        ##[ ##2: #H7; napply (or2_intro2 … (decidable_aluRS08_aux8 … H7))
+        ##| ##1: #H7; nrewrite > H; nrewrite > H1; nrewrite > H2; nrewrite > H3;
+                      nrewrite > H4; nrewrite > H5; nrewrite > H6; nrewrite > H7;
+                      napply (or2_intro1 (? = ?) (? ≠ ?) (refl_eq …))
+        ##]
+       ##]
+      ##]
+     ##]
+    ##]
+   ##]
+  ##]
+ ##]
+nqed.
index deaf39aad0c1a058ff4bccb91965062122cec051..9462c455b8a2da7ba87da795f9ddeb6b085ef941 100755 (executable)
@@ -93,18 +93,7 @@ nlet rec forall_memory_ranged
                  (forall_memory_ranged t chk1 chk2 mem1 mem2 tl)
   ].
 
-ndefinition eq_clk ≝
-λm:mcu_type.λc1,c2:option (aux_clk_type m).
- match c1 with
-  [ None ⇒ match c2 with
-   [ None ⇒ true | Some _ ⇒ false ]
-  | Some c1' ⇒ match c2 with
-   [ None ⇒ false | Some c2' ⇒ (eq_b8 (fst5T … c1') (fst5T … c2')) ⊗
-                               (eq_op m (snd5T … c1') (snd5T … c2')) ⊗
-                               (eq_im m (thd5T … c1') (thd5T … c2')) ⊗
-                               (eq_b8 (fth5T … c1') (fth5T … c2')) ⊗
-                               (eq_w16 (fft5T … c1') (fft5T … c2')) ]
-  ].
+ndefinition eq_clk ≝ λm.eq_option … (eq_quintuple … eq_b8 (eq_op m) (eq_im m) eq_b8 eq_w16).
 
 (* generalizzazione del confronto fra stati *)
 ndefinition eq_anystatus ≝
diff --git a/helm/software/matita/contribs/ng_assembly/emulator/status/status_lemmas.ma b/helm/software/matita/contribs/ng_assembly/emulator/status/status_lemmas.ma
new file mode 100755 (executable)
index 0000000..aee06a2
--- /dev/null
@@ -0,0 +1,276 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* ********************************************************************** *)
+(*                          Progetto FreeScale                            *)
+(*                                                                        *)
+(*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
+(*   Sviluppo: 2008-2010                                                  *)
+(*                                                                        *)
+(* ********************************************************************** *)
+
+include "emulator/status/HC05_status_lemmas.ma".
+include "emulator/status/HC08_status_lemmas.ma".
+include "emulator/status/RS08_status_lemmas.ma".
+include "emulator/status/IP2022_status_lemmas.ma".
+include "emulator/status/status.ma".
+include "common/option_lemmas.ma".
+include "common/prod_lemmas.ma".
+include "emulator/opcodes/opcode_lemmas.ma".
+
+(* *********************************** *)
+(* STATUS INTERNO DEL PROCESSORE (ALU) *)
+(* *********************************** *)
+
+nlemma symmetric_eqclk : ∀m.∀clk1,clk2.eq_clk m clk1 clk2 = eq_clk m clk2 clk1.
+ #m;
+ napply (symmetric_eqoption ? (eq_quintuple …) (symmetric_eqquintuple …));
+ ##[ ##1: napply symmetric_eqw16
+ ##| ##2: napply symmetric_eqb8
+ ##| ##3: napply (symmetric_eqim m)
+ ##| ##4: napply (symmetric_eqop m)
+ ##| ##5: napply symmetric_eqb8
+ ##]
+nqed.
+
+nlemma eqclk_to_eq : ∀m.∀clk1,clk2.eq_clk m clk1 clk2 = true → clk1 = clk2.
+ #m;
+ napply (eqoption_to_eq ? (eq_quintuple …) (eqquintuple_to_eq …));
+ ##[ ##1: napply eqw16_to_eq
+ ##| ##2: napply eqb8_to_eq
+ ##| ##3: napply (eqim_to_eq m)
+ ##| ##4: napply (eqop_to_eq m)
+ ##| ##5: napply eqb8_to_eq
+ ##]
+nqed.
+
+nlemma eq_to_eqclk : ∀m.∀clk1,clk2.(clk1 = clk2) → (eq_clk m clk1 clk2 = true).
+ #m;
+ napply (eq_to_eqoption ? (eq_quintuple …) (eq_to_eqquintuple …));
+ ##[ ##1: napply eq_to_eqw16
+ ##| ##2: napply eq_to_eqb8
+ ##| ##3: napply (eq_to_eqim m)
+ ##| ##4: napply (eq_to_eqop m)
+ ##| ##5: napply eq_to_eqb8
+ ##]
+nqed.
+
+nlemma neqclk_to_neq : ∀m.∀clk1,clk2.eq_clk m clk1 clk2 = false → clk1 ≠ clk2.
+ #m;
+ napply (neqoption_to_neq ? (eq_quintuple …) (neqquintuple_to_neq …));
+ ##[ ##1: napply neqw16_to_neq
+ ##| ##2: napply neqb8_to_neq
+ ##| ##3: napply (neqim_to_neq m)
+ ##| ##4: napply (neqop_to_neq m)
+ ##| ##5: napply neqb8_to_neq
+ ##]
+nqed.
+
+nlemma neq_to_neqclk : ∀m.∀clk1,clk2.(clk1 ≠ clk2) → (eq_clk m clk1 clk2 = false).
+ #m;
+ napply (neq_to_neqoption ? (eq_quintuple …) (neq_to_neqquintuple …));
+ ##[ ##1: napply neq_to_neqw16
+ ##| ##2: napply neq_to_neqb8
+ ##| ##3: napply (neq_to_neqim m)
+ ##| ##4: napply (neq_to_neqop m)
+ ##| ##5: napply neq_to_neqb8
+ ##| ##6: napply decidable_w16
+ ##| ##7: napply decidable_b8
+ ##| ##8: napply (decidable_im m)
+ ##| ##9: napply (decidable_op m)
+ ##| ##10: napply decidable_b8
+ ##]
+nqed.
+
+nlemma decidable_clk : ∀m.∀clk1,clk2:option (aux_clk_type m).decidable (clk1 = clk2).
+ #m;
+ napply (decidable_option ? (decidable_quintuple …));
+ ##[ ##1: napply decidable_w16
+ ##| ##2: napply decidable_b8
+ ##| ##3: napply (decidable_im m)
+ ##| ##4: napply (decidable_op m)
+ ##| ##5: napply decidable_b8
+ ##]
+nqed.
+
+nlemma symmetric_forallmemoryranged :
+∀t.∀chk1,chk2:aux_chk_type t.∀mem1,mem2:aux_mem_type t.∀addrl.
+ forall_memory_ranged t chk1 chk2 mem1 mem2 addrl =
+ forall_memory_ranged t chk2 chk1 mem2 mem1 addrl.
+ #t; #chk1; #chk2; #mem1; #mem2; #addrl;
+ nelim addrl;
+ ##[ ##1: nnormalize; napply refl_eq
+ ##| ##2: #a; #l; #H;
+          nchange with (
+           ((eq_option byte8 eq_b8 (mem_read t mem1 chk1 a)
+                                   (mem_read t mem2 chk2 a)) ⊗
+           (forall_memory_ranged t chk1 chk2 mem1 mem2 l)) =
+           ((eq_option byte8 eq_b8 (mem_read t mem2 chk2 a)
+                                   (mem_read t mem1 chk1 a)) ⊗
+           (forall_memory_ranged t chk2 chk1 mem2 mem1 l)));
+           nrewrite > H;
+           nrewrite > (symmetric_eqoption ? eq_b8 symmetric_eqb8 (mem_read t mem1 chk1 a) (mem_read t mem2 chk2 a));
+           napply refl_eq
+ ##]
+nqed.
+
+nlemma anystatus_destruct_1 :
+∀m,t.∀x1,x2,x3,x4,y1,y2,y3,y4.
+ mk_any_status m t x1 x2 x3 x4 = mk_any_status m t y1 y2 y3 y4 →
+ x1 = y1.
+ #m; #t;
+ #x1; #x2; #x3; #x4;
+ #y1; #y2; #y3; #y4; #H;
+ nchange with (match mk_any_status m t y1 y2 y3 y4
+                with [ mk_any_status a _ _ _ ⇒ x1 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma anystatus_destruct_2 :
+∀m,t.∀x1,x2,x3,x4,y1,y2,y3,y4.
+ mk_any_status m t x1 x2 x3 x4 = mk_any_status m t y1 y2 y3 y4 →
+ x2 = y2.
+ #m; #t;
+ #x1; #x2; #x3; #x4;
+ #y1; #y2; #y3; #y4; #H;
+ nchange with (match mk_any_status m t y1 y2 y3 y4
+                with [ mk_any_status _ a _ _ ⇒ x2 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma anystatus_destruct_3 :
+∀m,t.∀x1,x2,x3,x4,y1,y2,y3,y4.
+ mk_any_status m t x1 x2 x3 x4 = mk_any_status m t y1 y2 y3 y4 →
+ x3 = y3.
+ #m; #t;
+ #x1; #x2; #x3; #x4;
+ #y1; #y2; #y3; #y4; #H;
+ nchange with (match mk_any_status m t y1 y2 y3 y4
+                with [ mk_any_status _ _ a _ ⇒ x3 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma anystatus_destruct_4 :
+∀m,t.∀x1,x2,x3,x4,y1,y2,y3,y4.
+ mk_any_status m t x1 x2 x3 x4 = mk_any_status m t y1 y2 y3 y4 →
+ x4 = y4.
+ #m; #t;
+ #x1; #x2; #x3; #x4;
+ #y1; #y2; #y3; #y4; #H;
+ nchange with (match mk_any_status m t y1 y2 y3 y4
+                with [ mk_any_status _ _ _ a ⇒ x4 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+naxiom symmetric_eqanystatus :
+∀addrl:list word32.∀m:mcu_type.∀t:memory_impl.∀s1,s2:any_status m t.
+ eq_anystatus m t s1 s2 addrl = eq_anystatus m t s2 s1 addrl.
+(* !!! si blocca su symmetric_eqalu_HC05 *)
+(* #addrl; #m; ncases m; #t; #s1;
+ ##[ ##1: nelim s1; #x1; #x2; #x3; #x4;
+          #s2; nelim s2; #y1; #y2; #y3; #y4;
+          nchange with (
+           ((eq_HC05_alu x1 y1) ⊗ (forall_memory_ranged t x3 y3 x2 y2 addrl) ⊗ (eq_clk HC05 x4 y4)) =
+           ((eq_HC05_alu y1 x1) ⊗ (forall_memory_ranged t y3 x3 y2 x2 addrl) ⊗ (eq_clk HC05 y4 x4)));
+           nrewrite > (symmetric_eqaluHC05 x1 y1)
+ ##| ##2,3: ncases s1; #x1; #x2; #x3; #x4;
+          #s2; ncases s2; #y1; #y2; #y3; #y4;
+          nchange with (
+           ((eq_aluHC08 x1 y1) ⊗ (forall_memory_ranged t x3 y3 x2 y2 addrl) ⊗ (eq_clk ? x4 y4)) =
+           ((eq_aluHC08 y1 x1) ⊗ (forall_memory_ranged t y3 x3 y2 x2 addrl) ⊗ (eq_clk ? y4 x4)));
+           nrewrite > (symmetric_eqaluHC08 x1 y1)
+ ##| ##4: ncases s1; #x1; #x2; #x3; #x4;
+          #s2; ncases s2; #y1; #y2; #y3; #y4;
+          nchange with (
+           ((eq_aluRS08 x1 y1) ⊗ (forall_memory_ranged t x3 y3 x2 y2 addrl) ⊗ (eq_clk RS08 x4 y4)) =
+           ((eq_aluRS08 y1 x1) ⊗ (forall_memory_ranged t y3 x3 y2 x2 addrl) ⊗ (eq_clk RS08 y4 x4)));
+           nrewrite > (symmetric_eqaluRS08 x1 y1)
+ ##| ##5: ...
+ ##]
+ nrewrite > (symmetric_forallmemoryranged t x3 y3 x2 y2 addrl);
+ nrewrite > (symmetric_eqclk ? x4 y4);
+ napply refl_eq.
+nqed.*)
+
+nlemma eqanystatus_to_eq :
+∀addrl:list word32.∀m:mcu_type.∀t:memory_impl.∀s1,s2:any_status m t.
+ (eq_anystatus m t s1 s2 addrl = true) →
+  And3 (alu m t s1 = alu m t s2) 
+       (clk_desc m t s1 = clk_desc m t s2)
+       ((forall_memory_ranged t (chk_desc m t s1) (chk_desc m t s2)
+                                (mem_desc m t s1) (mem_desc m t s2) addrl) = true).
+ #addrl; #m; #t;
+ ncases m; #s1;
+ ncases s1; #x1; #x2; #x3; #x4;
+          #s2; ncases s2; #y1; #y2; #y3; #y4; #H;
+ ##[ ##1: nchange in H:(%) with (
+           ((eq_HC05_alu x1 y1) ⊗ (forall_memory_ranged t x3 y3 x2 y2 addrl) ⊗ (eq_clk ? x4 y4)) = true);
+           nrewrite > (eqaluHC05_to_eq … (andb_true_true_l … (andb_true_true_l … H)))
+ ##| ##2,3: nchange in H:(%) with (
+            ((eq_HC08_alu x1 y1) ⊗ (forall_memory_ranged t x3 y3 x2 y2 addrl) ⊗ (eq_clk ? x4 y4)) = true);
+            nrewrite > (eqaluHC08_to_eq … (andb_true_true_l … (andb_true_true_l … H)))
+ ##| ##4: nchange in H:(%) with (
+           ((eq_RS08_alu x1 y1) ⊗ (forall_memory_ranged t x3 y3 x2 y2 addrl) ⊗ (eq_clk ? x4 y4)) = true);
+          nrewrite > (eqaluRS08_to_eq … (andb_true_true_l … (andb_true_true_l … H)))
+ ##| ##5: nchange in H:(%) with (
+           ((eq_IP2022_alu x1 y1) ⊗ (forall_memory_ranged t x3 y3 x2 y2 addrl) ⊗ (eq_clk ? x4 y4)) = true);
+          nrewrite > (eqaluIP2022_to_eq … (andb_true_true_l … (andb_true_true_l … H)))
+ ##]
+ nchange with (And3 (y1 = y1) (x4 = y4) (forall_memory_ranged t x3 y3 x2 y2 addrl = true));
+ nrewrite > (andb_true_true_r … (andb_true_true_l … H));
+ nrewrite > (eqclk_to_eq … (andb_true_true_r … H));
+ napply (conj3 … (refl_eq ? y1) (refl_eq ? y4) (refl_eq ? true)).
+nqed.
+
+naxiom eq_to_eqanystatus :
+∀addrl:list word32.∀m:mcu_type.∀t:memory_impl.∀s1,s2:any_status m t.
+ (alu m t s1 = alu m t s2) →
+ (clk_desc m t s1 = clk_desc m t s2) →
+ ((forall_memory_ranged t (chk_desc m t s1) (chk_desc m t s2)
+                            (mem_desc m t s1) (mem_desc m t s2) addrl) = true) →
+ (eq_anystatus m t s1 s2 addrl = true).
+(* !!! si blocca su symmetric_eqalu_HC05 *)
+(* #addrl; #m; #t;
+ ncases m; #s1; ncases s1; #x1; #x2; #x3; #x4;
+ #s2; ncases s2; #y1; #y2; #y3; #y4; #H; #H1; #H2;
+ ##[ ##1: nchange with (((eq_HC05_alu x1 y1) ⊗ (forall_memory_ranged t x3 y3 x2 y2 addrl) ⊗ (eq_clk ? x4 y4)) = true);
+          nchange in H:(%) with (x1 = y1);
+          nrewrite > H; 
+          nrewrite > (eq_to_eqaluHC05 y1 y1 (refl_eq …))
+ ##| ##2,3: nchange with (((eq_HC08_alu x1 y1) ⊗ (forall_memory_ranged t x3 y3 x2 y2 addrl) ⊗ (eq_clk ? x4 y4)) = true);
+            nchange in H:(%) with (x1 = y1);
+            nrewrite > H; 
+            nrewrite > (eq_to_eqaluHC08 y1 y1 (refl_eq …))
+ ##| ##4: nchange with (((eq_RS08_alu x1 y1) ⊗ (forall_memory_ranged t x3 y3 x2 y2 addrl) ⊗ (eq_clk ? x4 y4)) = true);
+          nchange in H:(%) with (x1 = y1);
+          nrewrite > H; 
+          nrewrite > (eq_to_eqaluRS08 y1 y1 (refl_eq …))
+ ##| ##5: ...
+ ##]
+ nchange in H2:(%) with (forall_memory_ranged t x3 y3 x2 y2 addrl = true);
+ nrewrite > H2;
+ nchange in H1:(%) with (x4 = y4);
+ nrewrite > H1;
+ nrewrite > (eq_to_eqclk ? y4 y4 (refl_eq …));
+ nnormalize;
+ napply refl_eq.
+nqed.*)
index 021563e94a9cd2e888736678b6d76c0d0d620422..9aa485cc5f1c846d16c8e32547d9d5b90a97a1c8 100755 (executable)
@@ -57,59 +57,8 @@ nlemma neqbit_to_neq : ∀n1,n2.eq_bit n1 n2 = false → n1 ≠ n2.
  ##]
 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;
- ##[ ##1: napply eqbit_to_eq1 ##| ##2: napply eqbit_to_eq2
- ##| ##3: napply eqbit_to_eq3 ##| ##4: napply eqbit_to_eq4
- ##| ##5: napply eqbit_to_eq5 ##| ##6: napply eqbit_to_eq6
- ##| ##7: napply eqbit_to_eq7 ##| ##8: napply eqbit_to_eq8
- ##| ##9: napply eqbit_to_eq9 ##| ##10: napply eqbit_to_eq10
- ##| ##11: napply eqbit_to_eq11 ##| ##12: napply eqbit_to_eq12
- ##| ##13: napply eqbit_to_eq13 ##| ##14: napply eqbit_to_eq14
- ##| ##15: napply eqbit_to_eq15 ##| ##16: napply eqbit_to_eq16
- ##| ##17: napply eqbit_to_eq17 ##| ##18: napply eqbit_to_eq18
- ##| ##19: napply eqbit_to_eq19 ##| ##20: napply eqbit_to_eq20
- ##| ##21: napply eqbit_to_eq21 ##| ##22: napply eqbit_to_eq22
- ##| ##23: napply eqbit_to_eq23 ##| ##24: napply eqbit_to_eq24
- ##| ##25: napply eqbit_to_eq25 ##| ##26: napply eqbit_to_eq26
- ##| ##27: napply eqbit_to_eq27 ##| ##28: napply eqbit_to_eq28
- ##| ##29: napply eqbit_to_eq29 ##| ##30: napply eqbit_to_eq30
- ##| ##31: napply eqbit_to_eq31 ##| ##32: napply eqbit_to_eq32
- ##]
-nqed.
+(* !!! per brevita... *)
+naxiom eqbit_to_eq : ∀t1,t2.eq_bit t1 t2 = true → t1 = t2.
 
 nlemma neq_to_neqbit : ∀n1,n2.n1 ≠ n2 → eq_bit n1 n2 = false.
  #n1; #n2; #H;
diff --git a/helm/software/matita/contribs/ng_assembly/num/word24_lemmas.ma b/helm/software/matita/contribs/ng_assembly/num/word24_lemmas.ma
new file mode 100755 (executable)
index 0000000..646a5eb
--- /dev/null
@@ -0,0 +1,182 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* ********************************************************************** *)
+(*                          Progetto FreeScale                            *)
+(*                                                                        *)
+(*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
+(*   Sviluppo: 2008-2010                                                  *)
+(*                                                                        *)
+(* ********************************************************************** *)
+
+include "num/byte8_lemmas.ma".
+include "num/word24.ma".
+
+(* **** *)
+(* BYTE *)
+(* **** *)
+
+nlemma word24_destruct_1 :
+∀x1,x2,y1,y2,z1,z2.
+ mk_word24 x1 y1 z1 = mk_word24 x2 y2 z2 → x1 = x2.
+ #x1; #x2; #y1; #y2; #z1; #z2; #H;
+ nchange with (match mk_word24 x2 y2 z2 with [ mk_word24 a _ _ ⇒ x1 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma word24_destruct_2 :
+∀x1,x2,y1,y2,z1,z2.
+ mk_word24 x1 y1 z1 = mk_word24 x2 y2 z2 → y1 = y2.
+ #x1; #x2; #y1; #y2; #z1; #z2; #H;
+ nchange with (match mk_word24 x2 y2 z2 with [ mk_word24 _ a _ ⇒ y1 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma word24_destruct_3 :
+∀x1,x2,y1,y2,z1,z2.
+ mk_word24 x1 y1 z1 = mk_word24 x2 y2 z2 → z1 = z2.
+ #x1; #x2; #y1; #y2; #z1; #z2; #H;
+ nchange with (match mk_word24 x2 y2 z2 with [ mk_word24 _ _ a ⇒ z1 = a ]);
+ nrewrite < H;
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma symmetric_eqw24 : symmetricT word24 bool eq_w24.
+ #b1; nelim b1; #e1; #e2; #e3;
+ #b2; nelim b2; #e4; #e5; #e6;
+ nchange with (((eq_b8 e1 e4)⊗(eq_b8 e2 e5)⊗(eq_b8 e3 e6)) = ((eq_b8 e4 e1)⊗(eq_b8 e5 e2)⊗(eq_b8 e6 e3)));
+ nrewrite > (symmetric_eqb8 e1 e4);
+ nrewrite > (symmetric_eqb8 e2 e5);
+ nrewrite > (symmetric_eqb8 e3 e6);
+ napply refl_eq.
+nqed.
+
+nlemma eqw24_to_eq : ∀b1,b2.(eq_w24 b1 b2 = true) → (b1 = b2).
+ #b1; nelim b1; #e1; #e2; #e3;
+ #b2; nelim b2; #e4; #e5; #e6;
+ nchange in ⊢ (% → ?) with (((eq_b8 e1 e4)⊗(eq_b8 e2 e5)⊗(eq_b8 e3 e6)) = true);
+ #H;
+ nrewrite < (eqb8_to_eq … (andb_true_true_r … H));
+ nrewrite < (eqb8_to_eq … (andb_true_true_r … (andb_true_true_l … H)));
+ nrewrite < (eqb8_to_eq … (andb_true_true_l … (andb_true_true_l … H)));
+ napply refl_eq.
+nqed.
+
+nlemma eq_to_eqw24 : ∀b1,b2.(b1 = b2) → (eq_w24 b1 b2 = true).
+ #b1; nelim b1; #e1; #e2; #e3;
+ #b2; nelim b2; #e4; #e5; #e6;
+ #H;
+ nchange with (((eq_b8 e1 e4)⊗(eq_b8 e2 e5)⊗(eq_b8 e3 e6)) = true);
+ nrewrite < (word24_destruct_1 … H);
+ nrewrite < (word24_destruct_2 … H);
+ nrewrite < (word24_destruct_3 … H);
+ nrewrite > (eq_to_eqb8 e1 e1 (refl_eq …));
+ nrewrite > (eq_to_eqb8 e2 e2 (refl_eq …)); 
+ nrewrite > (eq_to_eqb8 e3 e3 (refl_eq …)); 
+ nnormalize;
+ napply refl_eq.
+nqed.
+
+nlemma decidable_w24_aux1 :
+∀e1,e2,e3,e4,e5,e6.e1 ≠ e4 → (mk_word24 e1 e2 e3) ≠ (mk_word24 e4 e5 e6).
+ #e1; #e2; #e3; #e4; #e5; #e6;
+ nnormalize; #H; #H1;
+ napply (H (word24_destruct_1 … H1)).
+nqed.
+
+nlemma decidable_w24_aux2 :
+∀e1,e2,e3,e4,e5,e6.e2 ≠ e5 → (mk_word24 e1 e2 e3) ≠ (mk_word24 e4 e5 e6).
+ #e1; #e2; #e3; #e4; #e5; #e6;
+ nnormalize; #H; #H1;
+ napply (H (word24_destruct_2 … H1)).
+nqed.
+
+nlemma decidable_w24_aux3 :
+∀e1,e2,e3,e4,e5,e6.e3 ≠ e6 → (mk_word24 e1 e2 e3) ≠ (mk_word24 e4 e5 e6).
+ #e1; #e2; #e3; #e4; #e5; #e6;
+ nnormalize; #H; #H1;
+ napply (H (word24_destruct_3 … H1)).
+nqed.
+
+nlemma decidable_w24 : ∀b1,b2:word24.(decidable (b1 = b2)).
+ #b1; nelim b1; #e1; #e2; #e3;
+ #b2; nelim b2; #e4; #e5; #e6;
+ nnormalize;
+ napply (or2_elim (e1 = e4) (e1 ≠ e4) ? (decidable_b8 e1 e4) …);
+ ##[ ##2: #H; napply (or2_intro2 … (decidable_w24_aux1 e1 e2 e3 e4 e5 e6 H))
+ ##| ##1: #H; napply (or2_elim (e2 = e5) (e2 ≠ e5) ? (decidable_b8 e2 e5) …);
+          ##[ ##2: #H1; napply (or2_intro2 … (decidable_w24_aux2 e1 e2 e3 e4 e5 e6 H1))
+          ##| ##1: #H1; napply (or2_elim (e3 = e6) (e3 ≠ e6) ? (decidable_b8 e3 e6) …);
+                   ##[ ##2: #H2; napply (or2_intro2 … (decidable_w24_aux3 e1 e2 e3 e4 e5 e6 H2))
+                   ##| ##1: #H2; nrewrite > H; nrewrite > H1; nrewrite > H2;
+                                 napply (or2_intro1 … (refl_eq ? (mk_word24 e4 e5 e6)))
+                   ##]
+          ##]
+ ##]
+nqed.
+
+nlemma neqw24_to_neq : ∀b1,b2.(eq_w24 b1 b2 = false) → (b1 ≠ b2).
+ #b1; nelim b1; #e1; #e2; #e3;
+ #b2; nelim b2; #e4; #e5; #e6;
+ #H;
+ nchange in H:(%) with (((eq_b8 e1 e4)⊗(eq_b8 e2 e5)⊗(eq_b8 e3 e6)) = false);
+ #H1;
+ nrewrite > (word24_destruct_1 … H1) in H:(%);
+ nrewrite > (word24_destruct_2 … H1);
+ nrewrite > (word24_destruct_3 … H1);
+ nrewrite > (eq_to_eqb8 e4 e4 (refl_eq …));
+ nrewrite > (eq_to_eqb8 e5 e5 (refl_eq …));
+ nrewrite > (eq_to_eqb8 e6 e6 (refl_eq …));
+ #H; ndestruct.
+nqed.
+
+nlemma word24_destruct :
+∀e1,e2,e3,e4,e5,e6.
+ ((mk_word24 e1 e2 e3) ≠ (mk_word24 e4 e5 e6)) →
+ (Or3 (e1 ≠ e4) (e2 ≠ e5) (e3 ≠ e6)).
+ #e1; #e2; #e3; #e4; #e5; #e6;
+ nnormalize; #H;
+ napply (or2_elim (e1 = e4) (e1 ≠ e4) ? (decidable_b8 e1 e4) …);
+ ##[ ##2: #H1; napply (or3_intro1 … H1)
+ ##| ##1: #H1; napply (or2_elim (e2 = e5) (e2 ≠ e5) ? (decidable_b8 e2 e5) …);
+          ##[ ##2: #H2; napply (or3_intro2 … H2)
+          ##| ##1: #H2; napply (or2_elim (e3 = e6) (e3 ≠ e6) ? (decidable_b8 e3 e6) …);
+                   ##[ ##2: #H3; napply (or3_intro3 … H3)
+                   ##| ##1: #H3; nrewrite > H1 in H:(%);
+                            nrewrite > H2; nrewrite > H3;
+                            #H; nelim (H (refl_eq …))
+                   ##]
+          ##]
+ ##]
+nqed.
+
+nlemma neq_to_neqw24 : ∀b1,b2.((b1 ≠ b2) → (eq_w24 b1 b2 = false)).
+ #b1; nelim b1; #e1; #e2; #e3;
+ #b2; nelim b2; #e4; #e5; #e6;
+ #H; nchange with (((eq_b8 e1 e4)⊗(eq_b8 e2 e5)⊗(eq_b8 e3 e6)) = false);
+ napply (or3_elim (e1 ≠ e4) (e2 ≠ e5) (e3 ≠ e6) ? (word24_destruct e1 e2 e3 e4 e5 e6 … H) …);
+ ##[ ##1: #H1; nrewrite > (neq_to_neqb8 e1 e4 H1); nnormalize; napply refl_eq
+ ##| ##2: #H1; nrewrite > (neq_to_neqb8 e2 e5 H1);
+          nrewrite > (symmetric_andbool (eq_b8 e1 e4) …);
+          nnormalize; napply refl_eq
+ ##| ##3: #H1; nrewrite > (neq_to_neqb8 e3 e6 H1);
+          nrewrite > (symmetric_andbool ((eq_b8 e1 e4)⊗(eq_b8 e2 e5)) …);
+          nnormalize; napply refl_eq
+ ##]
+nqed.