From: Cosimo Oliboni Date: Fri, 31 Jul 2009 23:06:23 +0000 (+0000) Subject: freescale porting, work in progress X-Git-Tag: make_still_working~3580 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=dcde2b362a4106e36623d25e6a2d26dffac61848;p=helm.git freescale porting, work in progress --- diff --git a/helm/software/matita/contribs/ng_assembly/compiler/ast_type.ma b/helm/software/matita/contribs/ng_assembly/compiler/ast_type.ma index fd9e373ef..828e7ffc4 100755 --- a/helm/software/matita/contribs/ng_assembly/compiler/ast_type.ma +++ b/helm/software/matita/contribs/ng_assembly/compiler/ast_type.ma @@ -21,7 +21,6 @@ (* ********************************************************************** *) include "utility/utility.ma". -include "freescale/nat_lemmas.ma". (* ************************* *) (* dimensioni degli elementi *) diff --git a/helm/software/matita/contribs/ng_assembly/depends b/helm/software/matita/contribs/ng_assembly/depends index 4c1f165d2..3db4d02d8 100644 --- a/helm/software/matita/contribs/ng_assembly/depends +++ b/helm/software/matita/contribs/ng_assembly/depends @@ -1,60 +1,62 @@ -freescale/byte8.ma freescale/exadecim.ma +freescale/byte8.ma freescale/bitrigesim.ma freescale/exadecim.ma freescale/status.ma freescale/memory_abs.ma freescale/opcode_base.ma freescale/prod.ma freescale/memory_bits.ma freescale/memory_trees.ma utility/ascii_lemmas1.ma freescale/theory.ma utility/ascii.ma freescale/byte8_lemmas.ma freescale/byte8.ma freescale/exadecim_lemmas.ma -utility/string_lemmas.ma freescale/nat_lemmas.ma utility/ascii_lemmas2.ma utility/string.ma +utility/string_lemmas.ma utility/ascii_lemmas2.ma utility/string.ma utility/utility_lemmas.ma freescale/table_HCS08_tests.ma freescale/table_HCS08.ma -freescale/multivm.ma freescale/load_write.ma freescale/nat_lemmas.ma +freescale/multivm.ma freescale/load_write.ma freescale/opcode_base_lemmas.ma freescale/bool_lemmas.ma freescale/opcode_base.ma -compiler/ast_type_lemmas.ma compiler/ast_type.ma +compiler/ast_type_lemmas.ma compiler/ast_type.ma utility/utility_lemmas.ma freescale/table_HC05_tests.ma freescale/table_HC05.ma freescale/option.ma freescale/bool.ma freescale/bool.ma freescale/pts.ma -freescale/nat_lemmas.ma freescale/bool_lemmas.ma freescale/nat.ma freescale/bool_lemmas.ma freescale/bool.ma freescale/theory.ma freescale/opcode_base_lemmas_opcode1.ma freescale/bool_lemmas.ma freescale/opcode_base.ma freescale/memory_func.ma freescale/memory_struct.ma freescale/option.ma freescale/theory.ma freescale/word16.ma freescale/load_write.ma freescale/model.ma freescale/translation.ma +freescale/bitrigesim.ma freescale/bool.ma freescale/table_RS08.ma freescale/opcode.ma +freescale/oct.ma freescale/bool.ma freescale/option_lemmas.ma freescale/bool_lemmas.ma freescale/option.ma freescale/table_RS08_tests.ma freescale/table_RS08.ma freescale/translation.ma freescale/option.ma freescale/table_HC05.ma freescale/table_HC08.ma freescale/table_HCS08.ma freescale/table_RS08.ma -freescale/nat.ma freescale/bool.ma freescale/pts.ma freescale/medium_tests_tools.ma freescale/multivm.ma utility/utility_lemmas.ma utility/utility.ma freescale/memory_abs.ma freescale/memory_bits.ma freescale/memory_func.ma freescale/memory_trees.ma +freescale/bitrigesim_lemmas.ma freescale/bitrigesim.ma freescale/bool_lemmas.ma test_errori.ma compiler/ast_type_lemmas.ma freescale/byte8_lemmas.ma utility/utility.ma -freescale/memory_struct.ma freescale/aux_bases.ma freescale/byte8.ma +freescale/memory_struct.ma freescale/byte8.ma freescale/oct.ma freescale/model.ma freescale/status.ma -freescale/aux_bases.ma freescale/byte8.ma freescale/nat.ma freescale/table_HC05.ma freescale/opcode.ma +freescale/quatern_lemmas.ma freescale/bool_lemmas.ma freescale/quatern.ma freescale/exadecim_lemmas.ma freescale/bool_lemmas.ma freescale/exadecim.ma -compiler/ast_type.ma freescale/nat_lemmas.ma utility/utility.ma +compiler/ast_type.ma utility/utility.ma freescale/word16.ma freescale/byte8.ma utility/ascii.ma freescale/bool.ma freescale/memory_trees.ma freescale/memory_struct.ma freescale/option.ma freescale/theory.ma freescale/word16.ma freescale/pts.ma freescale/opcode_base_lemmas_instrmode2.ma freescale/opcode_base_lemmas_instrmode1.ma -freescale/aux_bases_lemmas.ma freescale/aux_bases.ma freescale/bool_lemmas.ma freescale/opcode_base_lemmas1.ma freescale/opcode_base_lemmas_instrmode2.ma freescale/opcode_base_lemmas_opcode2.ma freescale/word16_lemmas.ma freescale/table_HC08.ma freescale/opcode.ma freescale/prod.ma freescale/bool.ma -utility/string.ma freescale/nat.ma freescale/theory.ma utility/ascii.ma +utility/string.ma freescale/theory.ma utility/ascii.ma utility/utility.ma freescale/table_HCS08.ma freescale/opcode.ma freescale/word32.ma freescale/word16.ma freescale/prod_lemmas.ma freescale/bool_lemmas.ma freescale/prod.ma -freescale/opcode_base.ma freescale/aux_bases.ma freescale/theory.ma freescale/word16.ma +freescale/opcode_base.ma freescale/bitrigesim.ma freescale/oct.ma freescale/theory.ma freescale/word16.ma freescale/word32_lemmas.ma freescale/word16_lemmas.ma freescale/word32.ma freescale/status_lemmas.ma freescale/opcode_base_lemmas1.ma freescale/option_lemmas.ma freescale/prod_lemmas.ma freescale/status.ma freescale/word16_lemmas.ma utility/ascii_lemmas2.ma freescale/bool_lemmas.ma utility/ascii_lemmas1.ma freescale/micro_tests.ma freescale/multivm.ma freescale/status_lemmas.ma freescale/table_HC08_tests.ma freescale/table_HC08.ma -utility/utility.ma freescale/nat_lemmas.ma freescale/option.ma freescale/theory.ma -freescale/opcode_base_lemmas_instrmode1.ma freescale/aux_bases_lemmas.ma freescale/exadecim_lemmas.ma freescale/opcode_base.ma +utility/utility.ma freescale/option.ma freescale/theory.ma +freescale/quatern.ma freescale/bool.ma +freescale/opcode_base_lemmas_instrmode1.ma freescale/bitrigesim_lemmas.ma freescale/exadecim_lemmas.ma freescale/oct_lemmas.ma freescale/opcode_base.ma freescale/word16_lemmas.ma freescale/byte8_lemmas.ma freescale/word16.ma -freescale/exadecim.ma freescale/bool.ma freescale/nat.ma freescale/prod.ma +freescale/exadecim.ma freescale/bool.ma freescale/oct.ma freescale/prod.ma freescale/quatern.ma freescale/theory.ma freescale/pts.ma freescale/opcode_base_lemmas_opcode2.ma freescale/opcode_base_lemmas_opcode1.ma freescale/medium_tests.ma freescale/medium_tests_tools.ma utility/utility.ma freescale/opcode.ma freescale/opcode_base.ma +freescale/oct_lemmas.ma freescale/bool_lemmas.ma freescale/oct.ma diff --git a/helm/software/matita/contribs/ng_assembly/freescale/aux_bases.ma b/helm/software/matita/contribs/ng_assembly/freescale/aux_bases.ma deleted file mode 100755 index 1d49e79c5..000000000 --- a/helm/software/matita/contribs/ng_assembly/freescale/aux_bases.ma +++ /dev/null @@ -1,310 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||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: Cosimo Oliboni, oliboni@cs.unibo.it *) -(* Cosimo Oliboni, oliboni@cs.unibo.it *) -(* *) -(* ********************************************************************** *) - -include "freescale/byte8.ma". -include "freescale/nat.ma". - -(* ****** *) -(* OTTALI *) -(* ****** *) - -ninductive oct : Type ≝ - o0: oct -| o1: oct -| o2: oct -| o3: oct -| o4: oct -| o5: oct -| o6: oct -| o7: oct. - -(* operatore = *) -ndefinition eq_oct ≝ -λn1,n2:oct. - match n1 with - [ o0 ⇒ match n2 with - [ o0 ⇒ true | o1 ⇒ false | o2 ⇒ false | o3 ⇒ false - | o4 ⇒ false | o5 ⇒ false | o6 ⇒ false | o7 ⇒ false ] - | o1 ⇒ match n2 with - [ o0 ⇒ false | o1 ⇒ true | o2 ⇒ false | o3 ⇒ false - | o4 ⇒ false | o5 ⇒ false | o6 ⇒ false | o7 ⇒ false ] - | o2 ⇒ match n2 with - [ o0 ⇒ false | o1 ⇒ false | o2 ⇒ true | o3 ⇒ false - | o4 ⇒ false | o5 ⇒ false | o6 ⇒ false | o7 ⇒ false ] - | o3 ⇒ match n2 with - [ o0 ⇒ false | o1 ⇒ false | o2 ⇒ false | o3 ⇒ true - | o4 ⇒ false | o5 ⇒ false | o6 ⇒ false | o7 ⇒ false ] - | o4 ⇒ match n2 with - [ o0 ⇒ false | o1 ⇒ false | o2 ⇒ false | o3 ⇒ false - | o4 ⇒ true | o5 ⇒ false | o6 ⇒ false | o7 ⇒ false ] - | o5 ⇒ match n2 with - [ o0 ⇒ false | o1 ⇒ false | o2 ⇒ false | o3 ⇒ false - | o4 ⇒ false | o5 ⇒ true | o6 ⇒ false | o7 ⇒ false ] - | o6 ⇒ match n2 with - [ o0 ⇒ false | o1 ⇒ false | o2 ⇒ false | o3 ⇒ false - | o4 ⇒ false | o5 ⇒ false | o6 ⇒ true | o7 ⇒ false ] - | o7 ⇒ match n2 with - [ o0 ⇒ false | o1 ⇒ false | o2 ⇒ false | o3 ⇒ false - | o4 ⇒ false | o5 ⇒ false | o6 ⇒ false | o7 ⇒ true ] - ]. - -(* ottali → naturali *) -ndefinition nat_of_oct ≝ -λn:oct. - match n with - [ o0 ⇒ 0 | o1 ⇒ 1 | o2 ⇒ 2 | o3 ⇒ 3 | o4 ⇒ 4 | o5 ⇒ 5 | o6 ⇒ 6 | o7 ⇒ 7 ]. - -(* iteratore sugli ottali *) -ndefinition forall_oct ≝ λP. - P o0 ⊗ P o1 ⊗ P o2 ⊗ P o3 ⊗ P o4 ⊗ P o5 ⊗ P o6 ⊗ P o7. - -(* ************* *) -(* BITRIGESIMALI *) -(* ************* *) - -ninductive bitrigesim : Type ≝ - t00: bitrigesim -| t01: bitrigesim -| t02: bitrigesim -| t03: bitrigesim -| t04: bitrigesim -| t05: bitrigesim -| t06: bitrigesim -| t07: bitrigesim -| t08: bitrigesim -| t09: bitrigesim -| t0A: bitrigesim -| t0B: bitrigesim -| t0C: bitrigesim -| t0D: bitrigesim -| t0E: bitrigesim -| t0F: bitrigesim -| t10: bitrigesim -| t11: bitrigesim -| t12: bitrigesim -| t13: bitrigesim -| t14: bitrigesim -| t15: bitrigesim -| t16: bitrigesim -| t17: bitrigesim -| t18: bitrigesim -| t19: bitrigesim -| t1A: bitrigesim -| t1B: bitrigesim -| t1C: bitrigesim -| t1D: bitrigesim -| t1E: bitrigesim -| t1F: bitrigesim. - -(* operatore = *) -ndefinition eq_bitrig ≝ -λt1,t2:bitrigesim. - match t1 with - [ t00 ⇒ match t2 with - [ t00 ⇒ true | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t01 ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ true | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t02 ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ true | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t03 ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ true | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t04 ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ true | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t05 ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ true | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t06 ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ true | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t07 ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ true - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t08 ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ true | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t09 ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ true | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t0A ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ true | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t0B ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ true | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t0C ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ true | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t0D ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ true | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t0E ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ true | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t0F ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ true - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t10 ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ true | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t11 ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ true | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t12 ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ true | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t13 ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ true | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t14 ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ true | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t15 ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ true | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t16 ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ true | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t17 ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ true - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t18 ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ true | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t19 ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ true | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t1A ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ true | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t1B ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ true | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t1C ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ true | t1D ⇒ false | t1E ⇒ false | t1F ⇒ false ] - | t1D ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ true | t1E ⇒ false | t1F ⇒ false ] - | t1E ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ true | t1F ⇒ false ] - | t1F ⇒ match t2 with - [ t00 ⇒ false | t01 ⇒ false | t02 ⇒ false | t03 ⇒ false | t04 ⇒ false | t05 ⇒ false | t06 ⇒ false | t07 ⇒ false - | t08 ⇒ false | t09 ⇒ false | t0A ⇒ false | t0B ⇒ false | t0C ⇒ false | t0D ⇒ false | t0E ⇒ false | t0F ⇒ false - | t10 ⇒ false | t11 ⇒ false | t12 ⇒ false | t13 ⇒ false | t14 ⇒ false | t15 ⇒ false | t16 ⇒ false | t17 ⇒ false - | t18 ⇒ false | t19 ⇒ false | t1A ⇒ false | t1B ⇒ false | t1C ⇒ false | t1D ⇒ false | t1E ⇒ false | t1F ⇒ true ] - ]. - -(* bitrigesimali → naturali *) -ndefinition nat_of_bitrigesim ≝ -λt:bitrigesim. - match t with - [ t00 ⇒ 0 | t01 ⇒ 1 | t02 ⇒ 2 | t03 ⇒ 3 | t04 ⇒ 4 | t05 ⇒ 5 | t06 ⇒ 6 | t07 ⇒ 7 - | t08 ⇒ 8 | t09 ⇒ 9 | t0A ⇒ 10 | t0B ⇒ 11 | t0C ⇒ 12 | t0D ⇒ 13 | t0E ⇒ 14 | t0F ⇒ 15 - | t10 ⇒ 16 | t11 ⇒ 17 | t12 ⇒ 18 | t13 ⇒ 19 | t14 ⇒ 20 | t15 ⇒ 21 | t16 ⇒ 22 | t17 ⇒ 23 - | t18 ⇒ 24 | t19 ⇒ 25 | t1A ⇒ 26 | t1B ⇒ 27 | t1C ⇒ 28 | t1D ⇒ 29 | t1E ⇒ 30 | t1F ⇒ 31 ]. - -ndefinition byte8_of_bitrigesim ≝ -λt:bitrigesim. - match t with - [ t00 ⇒ 〈x0,x0〉 | t01 ⇒ 〈x0,x1〉 | t02 ⇒ 〈x0,x2〉 | t03 ⇒ 〈x0,x3〉 - | t04 ⇒ 〈x0,x4〉 | t05 ⇒ 〈x0,x5〉 | t06 ⇒ 〈x0,x6〉 | t07 ⇒ 〈x0,x7〉 - | t08 ⇒ 〈x0,x8〉 | t09 ⇒ 〈x0,x9〉 | t0A ⇒ 〈x0,xA〉 | t0B ⇒ 〈x0,xB〉 - | t0C ⇒ 〈x0,xC〉 | t0D ⇒ 〈x0,xD〉 | t0E ⇒ 〈x0,xE〉 | t0F ⇒ 〈x0,xF〉 - | t10 ⇒ 〈x1,x0〉 | t11 ⇒ 〈x1,x1〉 | t12 ⇒ 〈x1,x2〉 | t13 ⇒ 〈x1,x3〉 - | t14 ⇒ 〈x1,x4〉 | t15 ⇒ 〈x1,x5〉 | t16 ⇒ 〈x1,x6〉 | t17 ⇒ 〈x1,x7〉 - | t18 ⇒ 〈x1,x8〉 | t19 ⇒ 〈x1,x9〉 | t1A ⇒ 〈x1,xA〉 | t1B ⇒ 〈x1,xB〉 - | t1C ⇒ 〈x1,xC〉 | t1D ⇒ 〈x1,xD〉 | t1E ⇒ 〈x1,xE〉 | t1F ⇒ 〈x1,xF〉 ]. - -(* iteratore sui bitrigesimali *) -ndefinition forall_bitrigesim ≝ λP. - P t00 ⊗ P t01 ⊗ P t02 ⊗ P t03 ⊗ P t04 ⊗ P t05 ⊗ P t06 ⊗ P t07 ⊗ - P t08 ⊗ P t09 ⊗ P t0A ⊗ P t0B ⊗ P t0C ⊗ P t0D ⊗ P t0E ⊗ P t0F ⊗ - P t10 ⊗ P t11 ⊗ P t12 ⊗ P t13 ⊗ P t14 ⊗ P t15 ⊗ P t16 ⊗ P t17 ⊗ - P t18 ⊗ P t19 ⊗ P t1A ⊗ P t1B ⊗ P t1C ⊗ P t1D ⊗ P t1E ⊗ P t1F. diff --git a/helm/software/matita/contribs/ng_assembly/freescale/aux_bases_lemmas.ma b/helm/software/matita/contribs/ng_assembly/freescale/aux_bases_lemmas.ma deleted file mode 100755 index ce3ea12af..000000000 --- a/helm/software/matita/contribs/ng_assembly/freescale/aux_bases_lemmas.ma +++ /dev/null @@ -1,955 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||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: Cosimo Oliboni, oliboni@cs.unibo.it *) -(* Cosimo Oliboni, oliboni@cs.unibo.it *) -(* *) -(* ********************************************************************** *) - -include "freescale/bool_lemmas.ma". -include "freescale/aux_bases.ma". - -(* ****** *) -(* OTTALI *) -(* ****** *) - -ndefinition oct_destruct_aux ≝ -Πn1,n2:oct.ΠP:Prop.n1 = n2 → - match n1 with - [ o0 ⇒ match n2 with [ o0 ⇒ P → P | _ ⇒ P ] - | o1 ⇒ match n2 with [ o1 ⇒ P → P | _ ⇒ P ] - | o2 ⇒ match n2 with [ o2 ⇒ P → P | _ ⇒ P ] - | o3 ⇒ match n2 with [ o3 ⇒ P → P | _ ⇒ P ] - | o4 ⇒ match n2 with [ o4 ⇒ P → P | _ ⇒ P ] - | o5 ⇒ match n2 with [ o5 ⇒ P → P | _ ⇒ P ] - | o6 ⇒ match n2 with [ o6 ⇒ P → P | _ ⇒ P ] - | o7 ⇒ match n2 with [ o7 ⇒ P → P | _ ⇒ P ] - ]. - -ndefinition oct_destruct : oct_destruct_aux. - #n1; #n2; #P; - nelim n1; - ##[ ##1: nelim n2; nnormalize; #H; - ##[ ##1: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match o0 with [ o0 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] - ##| ##2: nelim n2; nnormalize; #H; - ##[ ##2: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match o1 with [ o1 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] - ##| ##3: nelim n2; nnormalize; #H; - ##[ ##3: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match o2 with [ o2 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] - ##| ##4: nelim n2; nnormalize; #H; - ##[ ##4: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match o3 with [ o3 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] - ##| ##5: nelim n2; nnormalize; #H; - ##[ ##5: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match o4 with [ o4 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] - ##| ##6: nelim n2; nnormalize; #H; - ##[ ##6: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match o5 with [ o5 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] - ##| ##7: nelim n2; nnormalize; #H; - ##[ ##7: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match o6 with [ o6 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] - ##| ##8: nelim n2; nnormalize; #H; - ##[ ##8: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match o7 with [ o7 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] - ##] -nqed. - -nlemma symmetric_eqoct : symmetricT oct bool eq_oct. - #n1; #n2; - nelim n1; - nelim n2; - nnormalize; - napply refl_eq. -nqed. - -nlemma eqoct_to_eq : ∀n1,n2.eq_oct n1 n2 = true → n1 = n2. - #n1; #n2; - ncases n1; - ncases n2; - nnormalize; - ##[ ##1,10,19,28,37,46,55,64: #H; napply refl_eq - ##| ##*: #H; napply (bool_destruct … H) - ##] -nqed. - -nlemma eq_to_eqoct : ∀n1,n2.n1 = n2 → eq_oct n1 n2 = true. - #n1; #n2; - ncases n1; - ncases n2; - nnormalize; - ##[ ##1,10,19,28,37,46,55,64: #H; napply refl_eq - ##| ##*: #H; napply (oct_destruct … H) - ##] -nqed. - -(* ************* *) -(* BITRIGESIMALI *) -(* ************* *) - -ndefinition bitrigesim_destruct1 : -Πt2:bitrigesim.ΠP:Prop.t00 = t2 → match t2 with [ t00 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##1: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t00 with [ t00 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct2 : -Πt2:bitrigesim.ΠP:Prop.t01 = t2 → match t2 with [ t01 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##2: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t01 with [ t01 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct3 : -Πt2:bitrigesim.ΠP:Prop.t02 = t2 → match t2 with [ t02 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##3: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t02 with [ t02 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct4 : -Πt2:bitrigesim.ΠP:Prop.t03 = t2 → match t2 with [ t03 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##4: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t03 with [ t03 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct5 : -Πt2:bitrigesim.ΠP:Prop.t04 = t2 → match t2 with [ t04 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##5: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t04 with [ t04 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct6 : -Πt2:bitrigesim.ΠP:Prop.t05 = t2 → match t2 with [ t05 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##6: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t05 with [ t05 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct7 : -Πt2:bitrigesim.ΠP:Prop.t06 = t2 → match t2 with [ t06 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##7: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t06 with [ t06 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct8 : -Πt2:bitrigesim.ΠP:Prop.t07 = t2 → match t2 with [ t07 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##8: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t07 with [ t07 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct9 : -Πt2:bitrigesim.ΠP:Prop.t08 = t2 → match t2 with [ t08 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##9: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t08 with [ t08 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct10 : -Πt2:bitrigesim.ΠP:Prop.t09 = t2 → match t2 with [ t09 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##10: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t09 with [ t09 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct11 : -Πt2:bitrigesim.ΠP:Prop.t0A = t2 → match t2 with [ t0A ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##11: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t0A with [ t0A ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct12 : -Πt2:bitrigesim.ΠP:Prop.t0B = t2 → match t2 with [ t0B ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##12: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t0B with [ t0B ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct13 : -Πt2:bitrigesim.ΠP:Prop.t0C = t2 → match t2 with [ t0C ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##13: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t0C with [ t0C ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct14 : -Πt2:bitrigesim.ΠP:Prop.t0D = t2 → match t2 with [ t0D ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##14: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t0D with [ t0D ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct15 : -Πt2:bitrigesim.ΠP:Prop.t0E = t2 → match t2 with [ t0E ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##15: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t0E with [ t0E ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct16 : -Πt2:bitrigesim.ΠP:Prop.t0F = t2 → match t2 with [ t0F ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##16: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t0F with [ t0F ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct17 : -Πt2:bitrigesim.ΠP:Prop.t10 = t2 → match t2 with [ t10 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##17: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t10 with [ t10 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct18 : -Πt2:bitrigesim.ΠP:Prop.t11 = t2 → match t2 with [ t11 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##18: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t11 with [ t11 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct19 : -Πt2:bitrigesim.ΠP:Prop.t12 = t2 → match t2 with [ t12 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##19: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t12 with [ t12 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct20 : -Πt2:bitrigesim.ΠP:Prop.t13 = t2 → match t2 with [ t13 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##20: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t13 with [ t13 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct21 : -Πt2:bitrigesim.ΠP:Prop.t14 = t2 → match t2 with [ t14 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##21: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t14 with [ t14 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct22 : -Πt2:bitrigesim.ΠP:Prop.t15 = t2 → match t2 with [ t15 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##22: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t15 with [ t15 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct23 : -Πt2:bitrigesim.ΠP:Prop.t16 = t2 → match t2 with [ t16 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##23: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t16 with [ t16 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct24 : -Πt2:bitrigesim.ΠP:Prop.t17 = t2 → match t2 with [ t17 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##24: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t17 with [ t17 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct25 : -Πt2:bitrigesim.ΠP:Prop.t18 = t2 → match t2 with [ t18 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##25: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t18 with [ t18 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct26 : -Πt2:bitrigesim.ΠP:Prop.t19 = t2 → match t2 with [ t19 ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##26: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t19 with [ t19 ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct27 : -Πt2:bitrigesim.ΠP:Prop.t1A = t2 → match t2 with [ t1A ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##27: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t1A with [ t1A ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct28 : -Πt2:bitrigesim.ΠP:Prop.t1B = t2 → match t2 with [ t1B ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##28: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t1B with [ t1B ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct29 : -Πt2:bitrigesim.ΠP:Prop.t1C = t2 → match t2 with [ t1C ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##29: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t1C with [ t1C ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct30 : -Πt2:bitrigesim.ΠP:Prop.t1D = t2 → match t2 with [ t1D ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##30: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t1D with [ t1D ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct31 : -Πt2:bitrigesim.ΠP:Prop.t1E = t2 → match t2 with [ t1E ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##31: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t1E with [ t1E ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct32 : -Πt2:bitrigesim.ΠP:Prop.t1F = t2 → match t2 with [ t1F ⇒ P → P | _ ⇒ P ]. - #t2; #P; - ncases t2; - nnormalize; #H; - ##[ ##32: napply (λx:P.x) - ##| ##*: napply (False_ind …); - nchange with (match t1F with [ t1F ⇒ False | _ ⇒ True ]); - nrewrite > H; nnormalize; napply I - ##] -nqed. - -ndefinition bitrigesim_destruct_aux ≝ -Πt1,t2:bitrigesim.ΠP:Prop.t1 = t2 → - match t1 with - [ t00 ⇒ match t2 with [ t00 ⇒ P → P | _ ⇒ P ] - | t01 ⇒ match t2 with [ t01 ⇒ P → P | _ ⇒ P ] - | t02 ⇒ match t2 with [ t02 ⇒ P → P | _ ⇒ P ] - | t03 ⇒ match t2 with [ t03 ⇒ P → P | _ ⇒ P ] - | t04 ⇒ match t2 with [ t04 ⇒ P → P | _ ⇒ P ] - | t05 ⇒ match t2 with [ t05 ⇒ P → P | _ ⇒ P ] - | t06 ⇒ match t2 with [ t06 ⇒ P → P | _ ⇒ P ] - | t07 ⇒ match t2 with [ t07 ⇒ P → P | _ ⇒ P ] - | t08 ⇒ match t2 with [ t08 ⇒ P → P | _ ⇒ P ] - | t09 ⇒ match t2 with [ t09 ⇒ P → P | _ ⇒ P ] - | t0A ⇒ match t2 with [ t0A ⇒ P → P | _ ⇒ P ] - | t0B ⇒ match t2 with [ t0B ⇒ P → P | _ ⇒ P ] - | t0C ⇒ match t2 with [ t0C ⇒ P → P | _ ⇒ P ] - | t0D ⇒ match t2 with [ t0D ⇒ P → P | _ ⇒ P ] - | t0E ⇒ match t2 with [ t0E ⇒ P → P | _ ⇒ P ] - | t0F ⇒ match t2 with [ t0F ⇒ P → P | _ ⇒ P ] - | t10 ⇒ match t2 with [ t10 ⇒ P → P | _ ⇒ P ] - | t11 ⇒ match t2 with [ t11 ⇒ P → P | _ ⇒ P ] - | t12 ⇒ match t2 with [ t12 ⇒ P → P | _ ⇒ P ] - | t13 ⇒ match t2 with [ t13 ⇒ P → P | _ ⇒ P ] - | t14 ⇒ match t2 with [ t14 ⇒ P → P | _ ⇒ P ] - | t15 ⇒ match t2 with [ t15 ⇒ P → P | _ ⇒ P ] - | t16 ⇒ match t2 with [ t16 ⇒ P → P | _ ⇒ P ] - | t17 ⇒ match t2 with [ t17 ⇒ P → P | _ ⇒ P ] - | t18 ⇒ match t2 with [ t18 ⇒ P → P | _ ⇒ P ] - | t19 ⇒ match t2 with [ t19 ⇒ P → P | _ ⇒ P ] - | t1A ⇒ match t2 with [ t1A ⇒ P → P | _ ⇒ P ] - | t1B ⇒ match t2 with [ t1B ⇒ P → P | _ ⇒ P ] - | t1C ⇒ match t2 with [ t1C ⇒ P → P | _ ⇒ P ] - | t1D ⇒ match t2 with [ t1D ⇒ P → P | _ ⇒ P ] - | t1E ⇒ match t2 with [ t1E ⇒ P → P | _ ⇒ P ] - | t1F ⇒ match t2 with [ t1F ⇒ P → P | _ ⇒ P ] - ]. - -ndefinition bitrigesim_destruct : bitrigesim_destruct_aux. - #t1; - ncases t1; - ##[ ##1: napply bitrigesim_destruct1 - ##| ##2: napply bitrigesim_destruct2 - ##| ##3: napply bitrigesim_destruct3 - ##| ##4: napply bitrigesim_destruct4 - ##| ##5: napply bitrigesim_destruct5 - ##| ##6: napply bitrigesim_destruct6 - ##| ##7: napply bitrigesim_destruct7 - ##| ##8: napply bitrigesim_destruct8 - ##| ##9: napply bitrigesim_destruct9 - ##| ##10: napply bitrigesim_destruct10 - ##| ##11: napply bitrigesim_destruct11 - ##| ##12: napply bitrigesim_destruct12 - ##| ##13: napply bitrigesim_destruct13 - ##| ##14: napply bitrigesim_destruct14 - ##| ##15: napply bitrigesim_destruct15 - ##| ##16: napply bitrigesim_destruct16 - ##| ##17: napply bitrigesim_destruct17 - ##| ##18: napply bitrigesim_destruct18 - ##| ##19: napply bitrigesim_destruct19 - ##| ##20: napply bitrigesim_destruct20 - ##| ##21: napply bitrigesim_destruct21 - ##| ##22: napply bitrigesim_destruct22 - ##| ##23: napply bitrigesim_destruct23 - ##| ##24: napply bitrigesim_destruct24 - ##| ##25: napply bitrigesim_destruct25 - ##| ##26: napply bitrigesim_destruct26 - ##| ##27: napply bitrigesim_destruct27 - ##| ##28: napply bitrigesim_destruct28 - ##| ##29: napply bitrigesim_destruct29 - ##| ##30: napply bitrigesim_destruct30 - ##| ##31: napply bitrigesim_destruct31 - ##| ##32: napply bitrigesim_destruct32 - ##] -nqed. - -nlemma symmetric_eqbitrig : symmetricT bitrigesim bool eq_bitrig. - #t1; - nelim t1; - ##[ ##1: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##2: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##3: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##4: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##5: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##6: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##7: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##8: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##9: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##10: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##11: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##12: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##13: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##14: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##15: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##16: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##17: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##18: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##19: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##20: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##21: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##22: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##23: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##24: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##25: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##26: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##27: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##28: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##29: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##30: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##31: #t2; nelim t2; nnormalize; napply refl_eq - ##| ##32: #t2; nelim t2; nnormalize; napply refl_eq - ##] -nqed. - -nlemma eqbitrig_to_eq1 : ∀t2.eq_bitrig t00 t2 = true → t00 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##1: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq2 : ∀t2.eq_bitrig t01 t2 = true → t01 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##2: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq3 : ∀t2.eq_bitrig t02 t2 = true → t02 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##3: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq4 : ∀t2.eq_bitrig t03 t2 = true → t03 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##4: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq5 : ∀t2.eq_bitrig t04 t2 = true → t04 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##5: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq6 : ∀t2.eq_bitrig t05 t2 = true → t05 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##6: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq7 : ∀t2.eq_bitrig t06 t2 = true → t06 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##7: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq8 : ∀t2.eq_bitrig t07 t2 = true → t07 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##8: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq9 : ∀t2.eq_bitrig t08 t2 = true → t08 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##9: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq10 : ∀t2.eq_bitrig t09 t2 = true → t09 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##10: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq11 : ∀t2.eq_bitrig t0A t2 = true → t0A = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##11: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq12 : ∀t2.eq_bitrig t0B t2 = true → t0B = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##12: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq13 : ∀t2.eq_bitrig t0C t2 = true → t0C = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##13: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq14 : ∀t2.eq_bitrig t0D t2 = true → t0D = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##14: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq15 : ∀t2.eq_bitrig t0E t2 = true → t0E = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##15: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq16 : ∀t2.eq_bitrig t0F t2 = true → t0F = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##16: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq17 : ∀t2.eq_bitrig t10 t2 = true → t10 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##17: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq18 : ∀t2.eq_bitrig t11 t2 = true → t11 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##18: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq19 : ∀t2.eq_bitrig t12 t2 = true → t12 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##19: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq20 : ∀t2.eq_bitrig t13 t2 = true → t13 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##20: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq21 : ∀t2.eq_bitrig t14 t2 = true → t14 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##21: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq22 : ∀t2.eq_bitrig t15 t2 = true → t15 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##22: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq23 : ∀t2.eq_bitrig t16 t2 = true → t16 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##23: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq24 : ∀t2.eq_bitrig t17 t2 = true → t17 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##24: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq25 : ∀t2.eq_bitrig t18 t2 = true → t18 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##25: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq26 : ∀t2.eq_bitrig t19 t2 = true → t19 = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##26: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq27 : ∀t2.eq_bitrig t1A t2 = true → t1A = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##27: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq28 : ∀t2.eq_bitrig t1B t2 = true → t1B = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##28: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq29 : ∀t2.eq_bitrig t1C t2 = true → t1C = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##29: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq30 : ∀t2.eq_bitrig t1D t2 = true → t1D = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##30: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq31 : ∀t2.eq_bitrig t1E t2 = true → t1E = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##31: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq32 : ∀t2.eq_bitrig t1F t2 = true → t1F = t2. - #t2; ncases t2; nnormalize; #H; ##[ ##32: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] -nqed. - -nlemma eqbitrig_to_eq : ∀t1,t2.eq_bitrig t1 t2 = true → t1 = t2. - #t1; - ncases t1; - ##[ ##1: napply eqbitrig_to_eq1 - ##| ##2: napply eqbitrig_to_eq2 - ##| ##3: napply eqbitrig_to_eq3 - ##| ##4: napply eqbitrig_to_eq4 - ##| ##5: napply eqbitrig_to_eq5 - ##| ##6: napply eqbitrig_to_eq6 - ##| ##7: napply eqbitrig_to_eq7 - ##| ##8: napply eqbitrig_to_eq8 - ##| ##9: napply eqbitrig_to_eq9 - ##| ##10: napply eqbitrig_to_eq10 - ##| ##11: napply eqbitrig_to_eq11 - ##| ##12: napply eqbitrig_to_eq12 - ##| ##13: napply eqbitrig_to_eq13 - ##| ##14: napply eqbitrig_to_eq14 - ##| ##15: napply eqbitrig_to_eq15 - ##| ##16: napply eqbitrig_to_eq16 - ##| ##17: napply eqbitrig_to_eq17 - ##| ##18: napply eqbitrig_to_eq18 - ##| ##19: napply eqbitrig_to_eq19 - ##| ##20: napply eqbitrig_to_eq20 - ##| ##21: napply eqbitrig_to_eq21 - ##| ##22: napply eqbitrig_to_eq22 - ##| ##23: napply eqbitrig_to_eq23 - ##| ##24: napply eqbitrig_to_eq24 - ##| ##25: napply eqbitrig_to_eq25 - ##| ##26: napply eqbitrig_to_eq26 - ##| ##27: napply eqbitrig_to_eq27 - ##| ##28: napply eqbitrig_to_eq28 - ##| ##29: napply eqbitrig_to_eq29 - ##| ##30: napply eqbitrig_to_eq30 - ##| ##31: napply eqbitrig_to_eq31 - ##| ##32: napply eqbitrig_to_eq32 - ##] -nqed. - -nlemma eq_to_eqbitrig1 : ∀t2.t00 = t2 → eq_bitrig t00 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##1: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig2 : ∀t2.t01 = t2 → eq_bitrig t01 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##2: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig3 : ∀t2.t02 = t2 → eq_bitrig t02 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##3: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig4 : ∀t2.t03 = t2 → eq_bitrig t03 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##4: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig5 : ∀t2.t04 = t2 → eq_bitrig t04 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##5: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig6 : ∀t2.t05 = t2 → eq_bitrig t05 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##6: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig7 : ∀t2.t06 = t2 → eq_bitrig t06 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##7: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig8 : ∀t2.t07 = t2 → eq_bitrig t07 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##8: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig9 : ∀t2.t08 = t2 → eq_bitrig t08 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##9: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig10 : ∀t2.t09 = t2 → eq_bitrig t09 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##10: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig11 : ∀t2.t0A = t2 → eq_bitrig t0A t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##11: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig12 : ∀t2.t0B = t2 → eq_bitrig t0B t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##12: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig13 : ∀t2.t0C = t2 → eq_bitrig t0C t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##13: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig14 : ∀t2.t0D = t2 → eq_bitrig t0D t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##14: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig15 : ∀t2.t0E = t2 → eq_bitrig t0E t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##15: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig16 : ∀t2.t0F = t2 → eq_bitrig t0F t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##16: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig17 : ∀t2.t10 = t2 → eq_bitrig t10 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##17: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig18 : ∀t2.t11 = t2 → eq_bitrig t11 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##18: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig19 : ∀t2.t12 = t2 → eq_bitrig t12 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##19: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig20 : ∀t2.t13 = t2 → eq_bitrig t13 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##20: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig21 : ∀t2.t14 = t2 → eq_bitrig t14 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##21: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. -nlemma eq_to_eqbitrig22 : ∀t2.t15 = t2 → eq_bitrig t15 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##22: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig23 : ∀t2.t16 = t2 → eq_bitrig t16 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##23: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig24 : ∀t2.t17 = t2 → eq_bitrig t17 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##24: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig25 : ∀t2.t18 = t2 → eq_bitrig t18 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##25: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig26 : ∀t2.t19 = t2 → eq_bitrig t19 t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##26: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig27 : ∀t2.t1A = t2 → eq_bitrig t1A t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##27: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig28 : ∀t2.t1B = t2 → eq_bitrig t1B t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##28: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig29 : ∀t2.t1C = t2 → eq_bitrig t1C t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##29: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig30 : ∀t2.t1D = t2 → eq_bitrig t1D t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##30: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig31 : ∀t2.t1E = t2 → eq_bitrig t1E t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##31: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig32 : ∀t2.t1F = t2 → eq_bitrig t1F t2 = true. - #t2; ncases t2; nnormalize; #H; ##[ ##32: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] -nqed. - -nlemma eq_to_eqbitrig : ∀t1,t2.t1 = t2 → eq_bitrig t1 t2 = true. - #t1; - ncases t1; - ##[ ##1: napply eq_to_eqbitrig1 - ##| ##2: napply eq_to_eqbitrig2 - ##| ##3: napply eq_to_eqbitrig3 - ##| ##4: napply eq_to_eqbitrig4 - ##| ##5: napply eq_to_eqbitrig5 - ##| ##6: napply eq_to_eqbitrig6 - ##| ##7: napply eq_to_eqbitrig7 - ##| ##8: napply eq_to_eqbitrig8 - ##| ##9: napply eq_to_eqbitrig9 - ##| ##10: napply eq_to_eqbitrig10 - ##| ##11: napply eq_to_eqbitrig11 - ##| ##12: napply eq_to_eqbitrig12 - ##| ##13: napply eq_to_eqbitrig13 - ##| ##14: napply eq_to_eqbitrig14 - ##| ##15: napply eq_to_eqbitrig15 - ##| ##16: napply eq_to_eqbitrig16 - ##| ##17: napply eq_to_eqbitrig17 - ##| ##18: napply eq_to_eqbitrig18 - ##| ##19: napply eq_to_eqbitrig19 - ##| ##20: napply eq_to_eqbitrig20 - ##| ##21: napply eq_to_eqbitrig21 - ##| ##22: napply eq_to_eqbitrig22 - ##| ##23: napply eq_to_eqbitrig23 - ##| ##24: napply eq_to_eqbitrig24 - ##| ##25: napply eq_to_eqbitrig25 - ##| ##26: napply eq_to_eqbitrig26 - ##| ##27: napply eq_to_eqbitrig27 - ##| ##28: napply eq_to_eqbitrig28 - ##| ##29: napply eq_to_eqbitrig29 - ##| ##30: napply eq_to_eqbitrig30 - ##| ##31: napply eq_to_eqbitrig31 - ##| ##32: napply eq_to_eqbitrig32 - ##] -nqed. diff --git a/helm/software/matita/contribs/ng_assembly/freescale/bitrigesim.ma b/helm/software/matita/contribs/ng_assembly/freescale/bitrigesim.ma new file mode 100755 index 000000000..e36fac640 --- /dev/null +++ b/helm/software/matita/contribs/ng_assembly/freescale/bitrigesim.ma @@ -0,0 +1,205 @@ +(**************************************************************************) +(* ___ *) +(* ||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: Cosimo Oliboni, oliboni@cs.unibo.it *) +(* Cosimo Oliboni, oliboni@cs.unibo.it *) +(* *) +(* ********************************************************************** *) + +include "freescale/bool.ma". + +(* ************* *) +(* BITRIGESIMALI *) +(* ************* *) + +ninductive bitrigesim : Type ≝ + t00: bitrigesim +| t01: bitrigesim +| t02: bitrigesim +| t03: bitrigesim +| t04: bitrigesim +| t05: bitrigesim +| t06: bitrigesim +| t07: bitrigesim +| t08: bitrigesim +| t09: bitrigesim +| t0A: bitrigesim +| t0B: bitrigesim +| t0C: bitrigesim +| t0D: bitrigesim +| t0E: bitrigesim +| t0F: bitrigesim +| t10: bitrigesim +| t11: bitrigesim +| t12: bitrigesim +| t13: bitrigesim +| t14: bitrigesim +| t15: bitrigesim +| t16: bitrigesim +| t17: bitrigesim +| t18: bitrigesim +| t19: bitrigesim +| t1A: bitrigesim +| t1B: bitrigesim +| t1C: bitrigesim +| t1D: bitrigesim +| t1E: bitrigesim +| t1F: bitrigesim. + +(* operatore = *) +ndefinition eq_bit ≝ +λt1,t2:bitrigesim. + match t1 with + [ t00 ⇒ match t2 with [ t00 ⇒ true | _ ⇒ false ] + | t01 ⇒ match t2 with [ t01 ⇒ true | _ ⇒ false ] + | t02 ⇒ match t2 with [ t02 ⇒ true | _ ⇒ false ] + | t03 ⇒ match t2 with [ t03 ⇒ true | _ ⇒ false ] + | t04 ⇒ match t2 with [ t04 ⇒ true | _ ⇒ false ] + | t05 ⇒ match t2 with [ t05 ⇒ true | _ ⇒ false ] + | t06 ⇒ match t2 with [ t06 ⇒ true | _ ⇒ false ] + | t07 ⇒ match t2 with [ t07 ⇒ true | _ ⇒ false ] + | t08 ⇒ match t2 with [ t08 ⇒ true | _ ⇒ false ] + | t09 ⇒ match t2 with [ t09 ⇒ true | _ ⇒ false ] + | t0A ⇒ match t2 with [ t0A ⇒ true | _ ⇒ false ] + | t0B ⇒ match t2 with [ t0B ⇒ true | _ ⇒ false ] + | t0C ⇒ match t2 with [ t0C ⇒ true | _ ⇒ false ] + | t0D ⇒ match t2 with [ t0D ⇒ true | _ ⇒ false ] + | t0E ⇒ match t2 with [ t0E ⇒ true | _ ⇒ false ] + | t0F ⇒ match t2 with [ t0F ⇒ true | _ ⇒ false ] + | t10 ⇒ match t2 with [ t10 ⇒ true | _ ⇒ false ] + | t11 ⇒ match t2 with [ t11 ⇒ true | _ ⇒ false ] + | t12 ⇒ match t2 with [ t12 ⇒ true | _ ⇒ false ] + | t13 ⇒ match t2 with [ t13 ⇒ true | _ ⇒ false ] + | t14 ⇒ match t2 with [ t14 ⇒ true | _ ⇒ false ] + | t15 ⇒ match t2 with [ t15 ⇒ true | _ ⇒ false ] + | t16 ⇒ match t2 with [ t16 ⇒ true | _ ⇒ false ] + | t17 ⇒ match t2 with [ t17 ⇒ true | _ ⇒ false ] + | t18 ⇒ match t2 with [ t18 ⇒ true | _ ⇒ false ] + | t19 ⇒ match t2 with [ t19 ⇒ true | _ ⇒ false ] + | t1A ⇒ match t2 with [ t1A ⇒ true | _ ⇒ false ] + | t1B ⇒ match t2 with [ t1B ⇒ true | _ ⇒ false ] + | t1C ⇒ match t2 with [ t1C ⇒ true | _ ⇒ false ] + | t1D ⇒ match t2 with [ t1D ⇒ true | _ ⇒ false ] + | t1E ⇒ match t2 with [ t1E ⇒ true | _ ⇒ false ] + | t1F ⇒ match t2 with [ t1F ⇒ true | _ ⇒ false ] + ]. + +(* iteratore sui bitrigesimali *) +ndefinition forall_bit ≝ λP. + P t00 ⊗ P t01 ⊗ P t02 ⊗ P t03 ⊗ P t04 ⊗ P t05 ⊗ P t06 ⊗ P t07 ⊗ + P t08 ⊗ P t09 ⊗ P t0A ⊗ P t0B ⊗ P t0C ⊗ P t0D ⊗ P t0E ⊗ P t0F ⊗ + P t10 ⊗ P t11 ⊗ P t12 ⊗ P t13 ⊗ P t14 ⊗ P t15 ⊗ P t16 ⊗ P t17 ⊗ + P t18 ⊗ P t19 ⊗ P t1A ⊗ P t1B ⊗ P t1C ⊗ P t1D ⊗ P t1E ⊗ P t1F. + +(* operatore successore *) +ndefinition succ_bit ≝ +λn.match n with + [ t00 ⇒ t01 | t01 ⇒ t02 | t02 ⇒ t03 | t03 ⇒ t04 | t04 ⇒ t05 | t05 ⇒ t06 | t06 ⇒ t07 | t07 ⇒ t08 + | t08 ⇒ t09 | t09 ⇒ t0A | t0A ⇒ t0B | t0B ⇒ t0C | t0C ⇒ t0D | t0D ⇒ t0E | t0E ⇒ t0F | t0F ⇒ t10 + | t10 ⇒ t11 | t11 ⇒ t12 | t12 ⇒ t13 | t13 ⇒ t14 | t14 ⇒ t15 | t15 ⇒ t16 | t16 ⇒ t17 | t17 ⇒ t18 + | t18 ⇒ t19 | t19 ⇒ t1A | t1A ⇒ t1B | t1B ⇒ t1C | t1C ⇒ t1D | t1D ⇒ t1E | t1E ⇒ t1F | t1F ⇒ t00 + ]. + +(* bitrigesimali ricorsivi *) +ninductive rec_bitrigesim : bitrigesim → Type ≝ + bi_O : rec_bitrigesim t00 +| bi_S : ∀n.rec_bitrigesim n → rec_bitrigesim (succ_bit n). + +(* bitrigesimali → bitrigesimali ricorsivi *) +ndefinition bit_to_recbit ≝ +λn.match n return λx.rec_bitrigesim x with + [ t00 ⇒ bi_O + | t01 ⇒ bi_S ? bi_O + | t02 ⇒ bi_S ? (bi_S ? bi_O) + | t03 ⇒ bi_S ? (bi_S ? (bi_S ? bi_O)) + | t04 ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? bi_O))) + | t05 ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? bi_O)))) + | t06 ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? bi_O))))) + | t07 ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? bi_O)))))) + | t08 ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + bi_O))))))) + | t09 ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? bi_O)))))))) + | t0A ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? bi_O))))))))) + | t0B ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? bi_O)))))))))) + | t0C ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? bi_O))))))))))) + | t0D ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? bi_O)))))))))))) + | t0E ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? bi_O))))))))))))) + | t0F ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? bi_O)))))))))))))) + | t10 ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + bi_O))))))))))))))) + | t11 ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? bi_O)))))))))))))))) + | t12 ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? bi_O))))))))))))))))) + | t13 ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? bi_O)))))))))))))))))) + | t14 ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? bi_O))))))))))))))))))) + | t15 ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? bi_O)))))))))))))))))))) + | t16 ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? bi_O))))))))))))))))))))) + | t17 ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? bi_O)))))))))))))))))))))) + | t18 ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + bi_O))))))))))))))))))))))) + | t19 ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? bi_O)))))))))))))))))))))))) + | t1A ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? bi_O))))))))))))))))))))))))) + | t1B ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? bi_O)))))))))))))))))))))))))) + | t1C ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? bi_O))))))))))))))))))))))))))) + | t1D ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? bi_O)))))))))))))))))))))))))))) + | t1E ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? bi_O))))))))))))))))))))))))))))) + | t1F ⇒ bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? + (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? (bi_S ? bi_O)))))))))))))))))))))))))))))) + ]. diff --git a/helm/software/matita/contribs/ng_assembly/freescale/bitrigesim_lemmas.ma b/helm/software/matita/contribs/ng_assembly/freescale/bitrigesim_lemmas.ma new file mode 100755 index 000000000..694555704 --- /dev/null +++ b/helm/software/matita/contribs/ng_assembly/freescale/bitrigesim_lemmas.ma @@ -0,0 +1,857 @@ +(**************************************************************************) +(* ___ *) +(* ||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: Cosimo Oliboni, oliboni@cs.unibo.it *) +(* Cosimo Oliboni, oliboni@cs.unibo.it *) +(* *) +(* ********************************************************************** *) + +include "freescale/bool_lemmas.ma". +include "freescale/bitrigesim.ma". + +(* ************* *) +(* BITRIGESIMALI *) +(* ************* *) + +ndefinition bitrigesim_destruct1 : +Πt2:bitrigesim.ΠP:Prop.t00 = t2 → match t2 with [ t00 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##1: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t00 with [ t00 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct2 : +Πt2:bitrigesim.ΠP:Prop.t01 = t2 → match t2 with [ t01 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##2: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t01 with [ t01 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct3 : +Πt2:bitrigesim.ΠP:Prop.t02 = t2 → match t2 with [ t02 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##3: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t02 with [ t02 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct4 : +Πt2:bitrigesim.ΠP:Prop.t03 = t2 → match t2 with [ t03 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##4: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t03 with [ t03 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct5 : +Πt2:bitrigesim.ΠP:Prop.t04 = t2 → match t2 with [ t04 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##5: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t04 with [ t04 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct6 : +Πt2:bitrigesim.ΠP:Prop.t05 = t2 → match t2 with [ t05 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##6: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t05 with [ t05 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct7 : +Πt2:bitrigesim.ΠP:Prop.t06 = t2 → match t2 with [ t06 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##7: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t06 with [ t06 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct8 : +Πt2:bitrigesim.ΠP:Prop.t07 = t2 → match t2 with [ t07 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##8: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t07 with [ t07 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct9 : +Πt2:bitrigesim.ΠP:Prop.t08 = t2 → match t2 with [ t08 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##9: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t08 with [ t08 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct10 : +Πt2:bitrigesim.ΠP:Prop.t09 = t2 → match t2 with [ t09 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##10: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t09 with [ t09 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct11 : +Πt2:bitrigesim.ΠP:Prop.t0A = t2 → match t2 with [ t0A ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##11: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t0A with [ t0A ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct12 : +Πt2:bitrigesim.ΠP:Prop.t0B = t2 → match t2 with [ t0B ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##12: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t0B with [ t0B ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct13 : +Πt2:bitrigesim.ΠP:Prop.t0C = t2 → match t2 with [ t0C ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##13: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t0C with [ t0C ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct14 : +Πt2:bitrigesim.ΠP:Prop.t0D = t2 → match t2 with [ t0D ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##14: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t0D with [ t0D ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct15 : +Πt2:bitrigesim.ΠP:Prop.t0E = t2 → match t2 with [ t0E ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##15: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t0E with [ t0E ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct16 : +Πt2:bitrigesim.ΠP:Prop.t0F = t2 → match t2 with [ t0F ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##16: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t0F with [ t0F ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct17 : +Πt2:bitrigesim.ΠP:Prop.t10 = t2 → match t2 with [ t10 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##17: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t10 with [ t10 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct18 : +Πt2:bitrigesim.ΠP:Prop.t11 = t2 → match t2 with [ t11 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##18: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t11 with [ t11 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct19 : +Πt2:bitrigesim.ΠP:Prop.t12 = t2 → match t2 with [ t12 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##19: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t12 with [ t12 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct20 : +Πt2:bitrigesim.ΠP:Prop.t13 = t2 → match t2 with [ t13 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##20: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t13 with [ t13 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct21 : +Πt2:bitrigesim.ΠP:Prop.t14 = t2 → match t2 with [ t14 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##21: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t14 with [ t14 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct22 : +Πt2:bitrigesim.ΠP:Prop.t15 = t2 → match t2 with [ t15 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##22: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t15 with [ t15 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct23 : +Πt2:bitrigesim.ΠP:Prop.t16 = t2 → match t2 with [ t16 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##23: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t16 with [ t16 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct24 : +Πt2:bitrigesim.ΠP:Prop.t17 = t2 → match t2 with [ t17 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##24: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t17 with [ t17 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct25 : +Πt2:bitrigesim.ΠP:Prop.t18 = t2 → match t2 with [ t18 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##25: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t18 with [ t18 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct26 : +Πt2:bitrigesim.ΠP:Prop.t19 = t2 → match t2 with [ t19 ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##26: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t19 with [ t19 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct27 : +Πt2:bitrigesim.ΠP:Prop.t1A = t2 → match t2 with [ t1A ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##27: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t1A with [ t1A ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct28 : +Πt2:bitrigesim.ΠP:Prop.t1B = t2 → match t2 with [ t1B ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##28: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t1B with [ t1B ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct29 : +Πt2:bitrigesim.ΠP:Prop.t1C = t2 → match t2 with [ t1C ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##29: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t1C with [ t1C ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct30 : +Πt2:bitrigesim.ΠP:Prop.t1D = t2 → match t2 with [ t1D ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##30: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t1D with [ t1D ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct31 : +Πt2:bitrigesim.ΠP:Prop.t1E = t2 → match t2 with [ t1E ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##31: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t1E with [ t1E ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct32 : +Πt2:bitrigesim.ΠP:Prop.t1F = t2 → match t2 with [ t1F ⇒ P → P | _ ⇒ P ]. + #t2; #P; + ncases t2; + nnormalize; #H; + ##[ ##32: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match t1F with [ t1F ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] +nqed. + +ndefinition bitrigesim_destruct_aux ≝ +Πt1,t2:bitrigesim.ΠP:Prop.t1 = t2 → + match t1 with + [ t00 ⇒ match t2 with [ t00 ⇒ P → P | _ ⇒ P ] + | t01 ⇒ match t2 with [ t01 ⇒ P → P | _ ⇒ P ] + | t02 ⇒ match t2 with [ t02 ⇒ P → P | _ ⇒ P ] + | t03 ⇒ match t2 with [ t03 ⇒ P → P | _ ⇒ P ] + | t04 ⇒ match t2 with [ t04 ⇒ P → P | _ ⇒ P ] + | t05 ⇒ match t2 with [ t05 ⇒ P → P | _ ⇒ P ] + | t06 ⇒ match t2 with [ t06 ⇒ P → P | _ ⇒ P ] + | t07 ⇒ match t2 with [ t07 ⇒ P → P | _ ⇒ P ] + | t08 ⇒ match t2 with [ t08 ⇒ P → P | _ ⇒ P ] + | t09 ⇒ match t2 with [ t09 ⇒ P → P | _ ⇒ P ] + | t0A ⇒ match t2 with [ t0A ⇒ P → P | _ ⇒ P ] + | t0B ⇒ match t2 with [ t0B ⇒ P → P | _ ⇒ P ] + | t0C ⇒ match t2 with [ t0C ⇒ P → P | _ ⇒ P ] + | t0D ⇒ match t2 with [ t0D ⇒ P → P | _ ⇒ P ] + | t0E ⇒ match t2 with [ t0E ⇒ P → P | _ ⇒ P ] + | t0F ⇒ match t2 with [ t0F ⇒ P → P | _ ⇒ P ] + | t10 ⇒ match t2 with [ t10 ⇒ P → P | _ ⇒ P ] + | t11 ⇒ match t2 with [ t11 ⇒ P → P | _ ⇒ P ] + | t12 ⇒ match t2 with [ t12 ⇒ P → P | _ ⇒ P ] + | t13 ⇒ match t2 with [ t13 ⇒ P → P | _ ⇒ P ] + | t14 ⇒ match t2 with [ t14 ⇒ P → P | _ ⇒ P ] + | t15 ⇒ match t2 with [ t15 ⇒ P → P | _ ⇒ P ] + | t16 ⇒ match t2 with [ t16 ⇒ P → P | _ ⇒ P ] + | t17 ⇒ match t2 with [ t17 ⇒ P → P | _ ⇒ P ] + | t18 ⇒ match t2 with [ t18 ⇒ P → P | _ ⇒ P ] + | t19 ⇒ match t2 with [ t19 ⇒ P → P | _ ⇒ P ] + | t1A ⇒ match t2 with [ t1A ⇒ P → P | _ ⇒ P ] + | t1B ⇒ match t2 with [ t1B ⇒ P → P | _ ⇒ P ] + | t1C ⇒ match t2 with [ t1C ⇒ P → P | _ ⇒ P ] + | t1D ⇒ match t2 with [ t1D ⇒ P → P | _ ⇒ P ] + | t1E ⇒ match t2 with [ t1E ⇒ P → P | _ ⇒ P ] + | t1F ⇒ match t2 with [ t1F ⇒ P → P | _ ⇒ P ] + ]. + +ndefinition bitrigesim_destruct : bitrigesim_destruct_aux. + #t1; + ncases t1; + ##[ ##1: napply bitrigesim_destruct1 + ##| ##2: napply bitrigesim_destruct2 + ##| ##3: napply bitrigesim_destruct3 + ##| ##4: napply bitrigesim_destruct4 + ##| ##5: napply bitrigesim_destruct5 + ##| ##6: napply bitrigesim_destruct6 + ##| ##7: napply bitrigesim_destruct7 + ##| ##8: napply bitrigesim_destruct8 + ##| ##9: napply bitrigesim_destruct9 + ##| ##10: napply bitrigesim_destruct10 + ##| ##11: napply bitrigesim_destruct11 + ##| ##12: napply bitrigesim_destruct12 + ##| ##13: napply bitrigesim_destruct13 + ##| ##14: napply bitrigesim_destruct14 + ##| ##15: napply bitrigesim_destruct15 + ##| ##16: napply bitrigesim_destruct16 + ##| ##17: napply bitrigesim_destruct17 + ##| ##18: napply bitrigesim_destruct18 + ##| ##19: napply bitrigesim_destruct19 + ##| ##20: napply bitrigesim_destruct20 + ##| ##21: napply bitrigesim_destruct21 + ##| ##22: napply bitrigesim_destruct22 + ##| ##23: napply bitrigesim_destruct23 + ##| ##24: napply bitrigesim_destruct24 + ##| ##25: napply bitrigesim_destruct25 + ##| ##26: napply bitrigesim_destruct26 + ##| ##27: napply bitrigesim_destruct27 + ##| ##28: napply bitrigesim_destruct28 + ##| ##29: napply bitrigesim_destruct29 + ##| ##30: napply bitrigesim_destruct30 + ##| ##31: napply bitrigesim_destruct31 + ##| ##32: napply bitrigesim_destruct32 + ##] +nqed. + +nlemma symmetric_eqbit : symmetricT bitrigesim bool eq_bit. + #t1; + nelim t1; + ##[ ##1: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##2: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##3: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##4: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##5: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##6: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##7: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##8: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##9: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##10: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##11: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##12: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##13: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##14: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##15: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##16: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##17: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##18: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##19: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##20: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##21: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##22: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##23: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##24: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##25: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##26: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##27: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##28: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##29: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##30: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##31: #t2; nelim t2; nnormalize; napply refl_eq + ##| ##32: #t2; nelim t2; nnormalize; napply refl_eq + ##] +nqed. + +nlemma eqbit_to_eq1 : ∀t2.eq_bit t00 t2 = true → t00 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##1: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq2 : ∀t2.eq_bit t01 t2 = true → t01 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##2: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq3 : ∀t2.eq_bit t02 t2 = true → t02 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##3: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq4 : ∀t2.eq_bit t03 t2 = true → t03 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##4: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq5 : ∀t2.eq_bit t04 t2 = true → t04 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##5: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq6 : ∀t2.eq_bit t05 t2 = true → t05 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##6: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq7 : ∀t2.eq_bit t06 t2 = true → t06 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##7: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq8 : ∀t2.eq_bit t07 t2 = true → t07 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##8: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq9 : ∀t2.eq_bit t08 t2 = true → t08 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##9: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq10 : ∀t2.eq_bit t09 t2 = true → t09 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##10: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq11 : ∀t2.eq_bit t0A t2 = true → t0A = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##11: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq12 : ∀t2.eq_bit t0B t2 = true → t0B = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##12: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq13 : ∀t2.eq_bit t0C t2 = true → t0C = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##13: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq14 : ∀t2.eq_bit t0D t2 = true → t0D = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##14: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq15 : ∀t2.eq_bit t0E t2 = true → t0E = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##15: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq16 : ∀t2.eq_bit t0F t2 = true → t0F = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##16: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq17 : ∀t2.eq_bit t10 t2 = true → t10 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##17: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq18 : ∀t2.eq_bit t11 t2 = true → t11 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##18: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq19 : ∀t2.eq_bit t12 t2 = true → t12 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##19: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq20 : ∀t2.eq_bit t13 t2 = true → t13 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##20: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq21 : ∀t2.eq_bit t14 t2 = true → t14 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##21: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq22 : ∀t2.eq_bit t15 t2 = true → t15 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##22: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq23 : ∀t2.eq_bit t16 t2 = true → t16 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##23: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq24 : ∀t2.eq_bit t17 t2 = true → t17 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##24: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq25 : ∀t2.eq_bit t18 t2 = true → t18 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##25: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq26 : ∀t2.eq_bit t19 t2 = true → t19 = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##26: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq27 : ∀t2.eq_bit t1A t2 = true → t1A = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##27: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq28 : ∀t2.eq_bit t1B t2 = true → t1B = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##28: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq29 : ∀t2.eq_bit t1C t2 = true → t1C = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##29: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq30 : ∀t2.eq_bit t1D t2 = true → t1D = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##30: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq31 : ∀t2.eq_bit t1E t2 = true → t1E = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##31: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_eq32 : ∀t2.eq_bit t1F t2 = true → t1F = t2. + #t2; ncases t2; nnormalize; #H; ##[ ##32: napply refl_eq ##| ##*: napply (bool_destruct … H) ##] +nqed. + +nlemma eqbit_to_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. + +nlemma eq_to_eqbit1 : ∀t2.t00 = t2 → eq_bit t00 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##1: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit2 : ∀t2.t01 = t2 → eq_bit t01 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##2: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit3 : ∀t2.t02 = t2 → eq_bit t02 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##3: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit4 : ∀t2.t03 = t2 → eq_bit t03 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##4: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit5 : ∀t2.t04 = t2 → eq_bit t04 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##5: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit6 : ∀t2.t05 = t2 → eq_bit t05 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##6: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit7 : ∀t2.t06 = t2 → eq_bit t06 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##7: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit8 : ∀t2.t07 = t2 → eq_bit t07 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##8: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit9 : ∀t2.t08 = t2 → eq_bit t08 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##9: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit10 : ∀t2.t09 = t2 → eq_bit t09 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##10: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit11 : ∀t2.t0A = t2 → eq_bit t0A t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##11: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit12 : ∀t2.t0B = t2 → eq_bit t0B t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##12: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit13 : ∀t2.t0C = t2 → eq_bit t0C t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##13: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit14 : ∀t2.t0D = t2 → eq_bit t0D t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##14: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit15 : ∀t2.t0E = t2 → eq_bit t0E t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##15: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit16 : ∀t2.t0F = t2 → eq_bit t0F t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##16: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit17 : ∀t2.t10 = t2 → eq_bit t10 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##17: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit18 : ∀t2.t11 = t2 → eq_bit t11 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##18: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit19 : ∀t2.t12 = t2 → eq_bit t12 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##19: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit20 : ∀t2.t13 = t2 → eq_bit t13 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##20: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit21 : ∀t2.t14 = t2 → eq_bit t14 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##21: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit22 : ∀t2.t15 = t2 → eq_bit t15 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##22: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit23 : ∀t2.t16 = t2 → eq_bit t16 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##23: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit24 : ∀t2.t17 = t2 → eq_bit t17 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##24: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit25 : ∀t2.t18 = t2 → eq_bit t18 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##25: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit26 : ∀t2.t19 = t2 → eq_bit t19 t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##26: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit27 : ∀t2.t1A = t2 → eq_bit t1A t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##27: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit28 : ∀t2.t1B = t2 → eq_bit t1B t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##28: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit29 : ∀t2.t1C = t2 → eq_bit t1C t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##29: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit30 : ∀t2.t1D = t2 → eq_bit t1D t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##30: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit31 : ∀t2.t1E = t2 → eq_bit t1E t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##31: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit32 : ∀t2.t1F = t2 → eq_bit t1F t2 = true. + #t2; ncases t2; nnormalize; #H; ##[ ##32: napply refl_eq ##| ##*: napply (bitrigesim_destruct … H) ##] +nqed. + +nlemma eq_to_eqbit : ∀t1,t2.t1 = t2 → eq_bit t1 t2 = true. + #t1; + ncases t1; + ##[ ##1: napply eq_to_eqbit1 + ##| ##2: napply eq_to_eqbit2 + ##| ##3: napply eq_to_eqbit3 + ##| ##4: napply eq_to_eqbit4 + ##| ##5: napply eq_to_eqbit5 + ##| ##6: napply eq_to_eqbit6 + ##| ##7: napply eq_to_eqbit7 + ##| ##8: napply eq_to_eqbit8 + ##| ##9: napply eq_to_eqbit9 + ##| ##10: napply eq_to_eqbit10 + ##| ##11: napply eq_to_eqbit11 + ##| ##12: napply eq_to_eqbit12 + ##| ##13: napply eq_to_eqbit13 + ##| ##14: napply eq_to_eqbit14 + ##| ##15: napply eq_to_eqbit15 + ##| ##16: napply eq_to_eqbit16 + ##| ##17: napply eq_to_eqbit17 + ##| ##18: napply eq_to_eqbit18 + ##| ##19: napply eq_to_eqbit19 + ##| ##20: napply eq_to_eqbit20 + ##| ##21: napply eq_to_eqbit21 + ##| ##22: napply eq_to_eqbit22 + ##| ##23: napply eq_to_eqbit23 + ##| ##24: napply eq_to_eqbit24 + ##| ##25: napply eq_to_eqbit25 + ##| ##26: napply eq_to_eqbit26 + ##| ##27: napply eq_to_eqbit27 + ##| ##28: napply eq_to_eqbit28 + ##| ##29: napply eq_to_eqbit29 + ##| ##30: napply eq_to_eqbit30 + ##| ##31: napply eq_to_eqbit31 + ##| ##32: napply eq_to_eqbit32 + ##] +nqed. diff --git a/helm/software/matita/contribs/ng_assembly/freescale/bool_lemmas.ma b/helm/software/matita/contribs/ng_assembly/freescale/bool_lemmas.ma index 2ae438888..bcb09a2f8 100755 --- a/helm/software/matita/contribs/ng_assembly/freescale/bool_lemmas.ma +++ b/helm/software/matita/contribs/ng_assembly/freescale/bool_lemmas.ma @@ -40,12 +40,12 @@ ndefinition bool_destruct : bool_destruct_aux. nelim b2; nnormalize; #H; - ##[ ##2: napply (False_ind (λx.?) ?); + ##[ ##2: napply False_ind; nchange with (match true with [ true ⇒ False | false ⇒ True]); nrewrite > H; nnormalize; napply I - ##| ##3: napply (False_ind (λx.?) ?); + ##| ##3: napply False_ind; nchange with (match true with [ true ⇒ False | false ⇒ True]); nrewrite < H; nnormalize; diff --git a/helm/software/matita/contribs/ng_assembly/freescale/byte8.ma b/helm/software/matita/contribs/ng_assembly/freescale/byte8.ma index ca59bc5b7..f15537cc7 100755 --- a/helm/software/matita/contribs/ng_assembly/freescale/byte8.ma +++ b/helm/software/matita/contribs/ng_assembly/freescale/byte8.ma @@ -21,6 +21,7 @@ (* ********************************************************************** *) include "freescale/exadecim.ma". +include "freescale/bitrigesim.ma". (* **** *) (* BYTE *) @@ -90,10 +91,10 @@ ndefinition ror_b8 ≝ | false ⇒ mk_byte8 bh' bl' ]]]. (* operatore rotazione destra n-volte *) -nlet rec ror_b8_n (b:byte8) (n:nat) on n ≝ - match n with - [ O ⇒ b - | S n' ⇒ ror_b8_n (ror_b8 b) n' ]. +nlet rec ror_b8_n (b:byte8) (n:oct) (r:rec_oct n) on r ≝ + match r with + [ oc_O ⇒ b + | oc_S t n' ⇒ ror_b8_n (ror_b8 b) t n' ]. (* operatore rotazione sinistra con carry *) ndefinition rcl_b8 ≝ @@ -116,10 +117,10 @@ ndefinition rol_b8 ≝ | false ⇒ mk_byte8 bh' bl' ]]]. (* operatore rotazione sinistra n-volte *) -nlet rec rol_b8_n (b:byte8) (n:nat) on n ≝ - match n with - [ O ⇒ b - | S n' ⇒ rol_b8_n (rol_b8 b) n' ]. +nlet rec rol_b8_n (b:byte8) (n:oct) (r:rec_oct n) on r ≝ + match r with + [ oc_O ⇒ b + | oc_S t n' ⇒ rol_b8_n (rol_b8 b) t n' ]. (* operatore not/complemento a 1 *) ndefinition not_b8 ≝ @@ -164,9 +165,6 @@ ndefinition plus_b8_d_c ≝ (* operatore Most Significant Bit *) ndefinition MSB_b8 ≝ λb:byte8.eq_ex x8 (and_ex x8 (b8h b)). -(* byte → naturali *) -ndefinition nat_of_byte8 ≝ λb:byte8.(16*(nat_of_exadecim (b8h b))) + (nat_of_exadecim (b8l b)). - (* operatore predecessore *) ndefinition pred_b8 ≝ λb:byte8.match eq_ex (b8l b) x0 with @@ -302,8 +300,64 @@ ndefinition daa_b8 ≝ ]. (* iteratore sui byte *) -ndefinition forall_byte8 ≝ +ndefinition forall_b8 ≝ λP. - forall_exadecim (λbh. - forall_exadecim (λbl. + forall_ex (λbh. + forall_ex (λbl. P (mk_byte8 bh bl))). + +(* byte ricorsivi *) +ninductive rec_byte8 : byte8 → Type ≝ + b8_O : rec_byte8 〈x0,x0〉 +| b8_S : ∀n.rec_byte8 n → rec_byte8 (succ_b8 n). + +(* byte → byte ricorsivi *) +ndefinition b8_to_recb8_aux1 : Πn.rec_byte8 〈n,x0〉 → rec_byte8 〈succ_ex n,x0〉 ≝ +λn.λrecb:rec_byte8 〈n,x0〉. + b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? ( + b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? recb))))))))))))))). + +(* ... cifra esadecimale superiore *) +nlet rec b8_to_recb8_aux2 (n:exadecim) (r:rec_exadecim n) on r ≝ + match r return λx.λy:rec_exadecim x.rec_byte8 〈x,x0〉 with + [ ex_O ⇒ b8_O + | ex_S t n' ⇒ b8_to_recb8_aux1 ? (b8_to_recb8_aux2 t n') + ]. + +(* ... cifra esadecimale inferiore *) +ndefinition b8_to_recb8_aux3 : Πn1,n2.rec_byte8 〈n1,x0〉 → rec_byte8 〈n1,n2〉 ≝ +λn1,n2.λrecb:rec_byte8 〈n1,x0〉. + match n2 return λx.rec_byte8 〈n1,x〉 with + [ x0 ⇒ recb + | x1 ⇒ b8_S ? recb + | x2 ⇒ b8_S ? (b8_S ? recb) + | x3 ⇒ b8_S ? (b8_S ? (b8_S ? recb)) + | x4 ⇒ b8_S ? (b8_S ? (b8_S ? (b8_S ? recb))) + | x5 ⇒ b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? recb)))) + | x6 ⇒ b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? recb))))) + | x7 ⇒ b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? recb)))))) + | x8 ⇒ b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? recb))))))) + | x9 ⇒ b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? recb)))))))) + | xA ⇒ b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? recb))))))))) + | xB ⇒ b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? recb)))))))))) + | xC ⇒ b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? recb))))))))))) + | xD ⇒ b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? recb)))))))))))) + | xE ⇒ b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? recb))))))))))))) + | xF ⇒ b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? recb)))))))))))))) + ]. + +ndefinition b8_to_recb8 ≝ +λn.b8_to_recb8_aux3 (b8h n) (b8l n) (b8_to_recb8_aux2 (b8h n) (ex_to_recex (b8h n))). + +(* ottali → esadecimali *) +ndefinition b8_of_bit ≝ +λn.match n with + [ t00 ⇒ 〈x0,x0〉 | t01 ⇒ 〈x0,x1〉 | t02 ⇒ 〈x0,x2〉 | t03 ⇒ 〈x0,x3〉 + | t04 ⇒ 〈x0,x4〉 | t05 ⇒ 〈x0,x5〉 | t06 ⇒ 〈x0,x6〉 | t07 ⇒ 〈x0,x7〉 + | t08 ⇒ 〈x0,x8〉 | t09 ⇒ 〈x0,x9〉 | t0A ⇒ 〈x0,xA〉 | t0B ⇒ 〈x0,xB〉 + | t0C ⇒ 〈x0,xC〉 | t0D ⇒ 〈x0,xD〉 | t0E ⇒ 〈x0,xE〉 | t0F ⇒ 〈x0,xF〉 + | t10 ⇒ 〈x1,x0〉 | t11 ⇒ 〈x1,x1〉 | t12 ⇒ 〈x1,x2〉 | t13 ⇒ 〈x1,x3〉 + | t14 ⇒ 〈x1,x4〉 | t15 ⇒ 〈x1,x5〉 | t16 ⇒ 〈x1,x6〉 | t17 ⇒ 〈x1,x7〉 + | t18 ⇒ 〈x1,x8〉 | t19 ⇒ 〈x1,x9〉 | t1A ⇒ 〈x1,xA〉 | t1B ⇒ 〈x1,xB〉 + | t1C ⇒ 〈x1,xC〉 | t1D ⇒ 〈x1,xD〉 | t1E ⇒ 〈x1,xE〉 | t1F ⇒ 〈x1,xF〉 + ]. diff --git a/helm/software/matita/contribs/ng_assembly/freescale/exadecim.ma b/helm/software/matita/contribs/ng_assembly/freescale/exadecim.ma index 74e04a498..9270e8ea8 100755 --- a/helm/software/matita/contribs/ng_assembly/freescale/exadecim.ma +++ b/helm/software/matita/contribs/ng_assembly/freescale/exadecim.ma @@ -21,15 +21,14 @@ (* ********************************************************************** *) include "freescale/bool.ma". +include "freescale/quatern.ma". +include "freescale/oct.ma". include "freescale/prod.ma". -include "freescale/nat.ma". (* *********** *) (* ESADECIMALI *) (* *********** *) -(* non riesce a terminare l'esecuzione !!! *) - ninductive exadecim : Type ≝ x0: exadecim | x1: exadecim @@ -52,86 +51,22 @@ ninductive exadecim : Type ≝ ndefinition eq_ex ≝ λe1,e2:exadecim. match e1 with - [ x0 ⇒ match e2 with - [ x0 ⇒ true | x1 ⇒ false | x2 ⇒ false | x3 ⇒ false - | x4 ⇒ false | x5 ⇒ false | x6 ⇒ false | x7 ⇒ false - | x8 ⇒ false | x9 ⇒ false | xA ⇒ false | xB ⇒ false - | xC ⇒ false | xD ⇒ false | xE ⇒ false | xF ⇒ false ] - | x1 ⇒ match e2 with - [ x0 ⇒ false | x1 ⇒ true | x2 ⇒ false | x3 ⇒ false - | x4 ⇒ false | x5 ⇒ false | x6 ⇒ false | x7 ⇒ false - | x8 ⇒ false | x9 ⇒ false | xA ⇒ false | xB ⇒ false - | xC ⇒ false | xD ⇒ false | xE ⇒ false | xF ⇒ false ] - | x2 ⇒ match e2 with - [ x0 ⇒ false | x1 ⇒ false | x2 ⇒ true | x3 ⇒ false - | x4 ⇒ false | x5 ⇒ false | x6 ⇒ false | x7 ⇒ false - | x8 ⇒ false | x9 ⇒ false | xA ⇒ false | xB ⇒ false - | xC ⇒ false | xD ⇒ false | xE ⇒ false | xF ⇒ false ] - | x3 ⇒ match e2 with - [ x0 ⇒ false | x1 ⇒ false | x2 ⇒ false | x3 ⇒ true - | x4 ⇒ false | x5 ⇒ false | x6 ⇒ false | x7 ⇒ false - | x8 ⇒ false | x9 ⇒ false | xA ⇒ false | xB ⇒ false - | xC ⇒ false | xD ⇒ false | xE ⇒ false | xF ⇒ false ] - | x4 ⇒ match e2 with - [ x0 ⇒ false | x1 ⇒ false | x2 ⇒ false | x3 ⇒ false - | x4 ⇒ true | x5 ⇒ false | x6 ⇒ false | x7 ⇒ false - | x8 ⇒ false | x9 ⇒ false | xA ⇒ false | xB ⇒ false - | xC ⇒ false | xD ⇒ false | xE ⇒ false | xF ⇒ false ] - | x5 ⇒ match e2 with - [ x0 ⇒ false | x1 ⇒ false | x2 ⇒ false | x3 ⇒ false - | x4 ⇒ false | x5 ⇒ true | x6 ⇒ false | x7 ⇒ false - | x8 ⇒ false | x9 ⇒ false | xA ⇒ false | xB ⇒ false - | xC ⇒ false | xD ⇒ false | xE ⇒ false | xF ⇒ false ] - | x6 ⇒ match e2 with - [ x0 ⇒ false | x1 ⇒ false | x2 ⇒ false | x3 ⇒ false - | x4 ⇒ false | x5 ⇒ false | x6 ⇒ true | x7 ⇒ false - | x8 ⇒ false | x9 ⇒ false | xA ⇒ false | xB ⇒ false - | xC ⇒ false | xD ⇒ false | xE ⇒ false | xF ⇒ false ] - | x7 ⇒ match e2 with - [ x0 ⇒ false | x1 ⇒ false | x2 ⇒ false | x3 ⇒ false - | x4 ⇒ false | x5 ⇒ false | x6 ⇒ false | x7 ⇒ true - | x8 ⇒ false | x9 ⇒ false | xA ⇒ false | xB ⇒ false - | xC ⇒ false | xD ⇒ false | xE ⇒ false | xF ⇒ false ] - | x8 ⇒ match e2 with - [ x0 ⇒ false | x1 ⇒ false | x2 ⇒ false | x3 ⇒ false - | x4 ⇒ false | x5 ⇒ false | x6 ⇒ false | x7 ⇒ false - | x8 ⇒ true | x9 ⇒ false | xA ⇒ false | xB ⇒ false - | xC ⇒ false | xD ⇒ false | xE ⇒ false | xF ⇒ false ] - | x9 ⇒ match e2 with - [ x0 ⇒ false | x1 ⇒ false | x2 ⇒ false | x3 ⇒ false - | x4 ⇒ false | x5 ⇒ false | x6 ⇒ false | x7 ⇒ false - | x8 ⇒ false | x9 ⇒ true | xA ⇒ false | xB ⇒ false - | xC ⇒ false | xD ⇒ false | xE ⇒ false | xF ⇒ false ] - | xA ⇒ match e2 with - [ x0 ⇒ false | x1 ⇒ false | x2 ⇒ false | x3 ⇒ false - | x4 ⇒ false | x5 ⇒ false | x6 ⇒ false | x7 ⇒ false - | x8 ⇒ false | x9 ⇒ false | xA ⇒ true | xB ⇒ false - | xC ⇒ false | xD ⇒ false | xE ⇒ false | xF ⇒ false ] - | xB ⇒ match e2 with - [ x0 ⇒ false | x1 ⇒ false | x2 ⇒ false | x3 ⇒ false - | x4 ⇒ false | x5 ⇒ false | x6 ⇒ false | x7 ⇒ false - | x8 ⇒ false | x9 ⇒ false | xA ⇒ false | xB ⇒ true - | xC ⇒ false | xD ⇒ false | xE ⇒ false | xF ⇒ false ] - | xC ⇒ match e2 with - [ x0 ⇒ false | x1 ⇒ false | x2 ⇒ false | x3 ⇒ false - | x4 ⇒ false | x5 ⇒ false | x6 ⇒ false | x7 ⇒ false - | x8 ⇒ false | x9 ⇒ false | xA ⇒ false | xB ⇒ false - | xC ⇒ true | xD ⇒ false | xE ⇒ false | xF ⇒ false ] - | xD ⇒ match e2 with - [ x0 ⇒ false | x1 ⇒ false | x2 ⇒ false | x3 ⇒ false - | x4 ⇒ false | x5 ⇒ false | x6 ⇒ false | x7 ⇒ false - | x8 ⇒ false | x9 ⇒ false | xA ⇒ false | xB ⇒ false - | xC ⇒ false | xD ⇒ true | xE ⇒ false | xF ⇒ false ] - | xE ⇒ match e2 with - [ x0 ⇒ false | x1 ⇒ false | x2 ⇒ false | x3 ⇒ false - | x4 ⇒ false | x5 ⇒ false | x6 ⇒ false | x7 ⇒ false - | x8 ⇒ false | x9 ⇒ false | xA ⇒ false | xB ⇒ false - | xC ⇒ false | xD ⇒ false | xE ⇒ true | xF ⇒ false ] - | xF ⇒ match e2 with - [ x0 ⇒ false | x1 ⇒ false | x2 ⇒ false | x3 ⇒ false - | x4 ⇒ false | x5 ⇒ false | x6 ⇒ false | x7 ⇒ false - | x8 ⇒ false | x9 ⇒ false | xA ⇒ false | xB ⇒ false - | xC ⇒ false | xD ⇒ false | xE ⇒ false | xF ⇒ true ] + [ x0 ⇒ match e2 with [ x0 ⇒ true | _ ⇒ false ] + | x1 ⇒ match e2 with [ x1 ⇒ true | _ ⇒ false ] + | x2 ⇒ match e2 with [ x2 ⇒ true | _ ⇒ false ] + | x3 ⇒ match e2 with [ x3 ⇒ true | _ ⇒ false ] + | x4 ⇒ match e2 with [ x4 ⇒ true | _ ⇒ false ] + | x5 ⇒ match e2 with [ x5 ⇒ true | _ ⇒ false ] + | x6 ⇒ match e2 with [ x6 ⇒ true | _ ⇒ false ] + | x7 ⇒ match e2 with [ x7 ⇒ true | _ ⇒ false ] + | x8 ⇒ match e2 with [ x8 ⇒ true | _ ⇒ false ] + | x9 ⇒ match e2 with [ x9 ⇒ true | _ ⇒ false ] + | xA ⇒ match e2 with [ xA ⇒ true | _ ⇒ false ] + | xB ⇒ match e2 with [ xB ⇒ true | _ ⇒ false ] + | xC ⇒ match e2 with [ xC ⇒ true | _ ⇒ false ] + | xD ⇒ match e2 with [ xD ⇒ true | _ ⇒ false ] + | xE ⇒ match e2 with [ xE ⇒ true | _ ⇒ false ] + | xF ⇒ match e2 with [ xF ⇒ true | _ ⇒ false ] ]. (* operatore < *) @@ -777,10 +712,10 @@ ndefinition ror_ex ≝ | xC ⇒ x6 | xD ⇒ xE | xE ⇒ x7 | xF ⇒ xF ]. (* operatore rotazione destra n-volte *) -nlet rec ror_ex_n (e:exadecim) (n:nat) on n ≝ - match n with - [ O ⇒ e - | S n' ⇒ ror_ex_n (ror_ex e) n' ]. +nlet rec ror_ex_n (e:exadecim) (n:quatern) (r:rec_quatern n) on r ≝ + match r with + [ qu_O ⇒ e + | qu_S t n' ⇒ ror_ex_n (ror_ex e) t n' ]. (* operatore rotazione sinistra con carry *) ndefinition rcl_ex ≝ @@ -826,10 +761,10 @@ ndefinition rol_ex ≝ | xC ⇒ x9 | xD ⇒ xB | xE ⇒ xD | xF ⇒ xF ]. (* operatore rotazione sinistra n-volte *) -nlet rec rol_ex_n (e:exadecim) (n:nat) on n ≝ - match n with - [ O ⇒ e - | S n' ⇒ rol_ex_n (rol_ex e) n' ]. +nlet rec rol_ex_n (e:exadecim) (n:quatern) (r:rec_quatern n) on r ≝ + match r with + [ qu_O ⇒ e + | qu_S t n' ⇒ rol_ex_n (rol_ex e) t n' ]. (* operatore not/complemento a 1 *) ndefinition not_ex ≝ @@ -1420,13 +1355,6 @@ ndefinition MSB_ex ≝ | x8 ⇒ true | x9 ⇒ true | xA ⇒ true | xB ⇒ true | xC ⇒ true | xD ⇒ true | xE ⇒ true | xF ⇒ true ]. -(* esadecimali → naturali *) -ndefinition nat_of_exadecim : exadecim → nat ≝ -λe:exadecim. - match e with - [ x0 ⇒ 0 | x1 ⇒ 1 | x2 ⇒ 2 | x3 ⇒ 3 | x4 ⇒ 4 | x5 ⇒ 5 | x6 ⇒ 6 | x7 ⇒ 7 - | x8 ⇒ 8 | x9 ⇒ 9 | xA ⇒ 10 | xB ⇒ 11 | xC ⇒ 12 | xD ⇒ 13 | xE ⇒ 14 | xF ⇒ 15 ]. - (* operatore predecessore *) ndefinition pred_ex ≝ λe:exadecim. @@ -1450,6 +1378,42 @@ ndefinition compl_ex ≝ | xC ⇒ x4 | xD ⇒ x3 | xE ⇒ x2 | xF ⇒ x1 ]. (* iteratore sugli esadecimali *) -ndefinition forall_exadecim ≝ λP. +ndefinition forall_ex ≝ λP. P x0 ⊗ P x1 ⊗ P x2 ⊗ P x3 ⊗ P x4 ⊗ P x5 ⊗ P x6 ⊗ P x7 ⊗ P x8 ⊗ P x9 ⊗ P xA ⊗ P xB ⊗ P xC ⊗ P xD ⊗ P xE ⊗ P xF. + +(* esadecimali ricorsivi *) +ninductive rec_exadecim : exadecim → Type ≝ + ex_O : rec_exadecim x0 +| ex_S : ∀n.rec_exadecim n → rec_exadecim (succ_ex n). + +(* esadecimali → esadecimali ricorsivi *) +ndefinition ex_to_recex ≝ +λn.match n return λx.rec_exadecim x with + [ x0 ⇒ ex_O + | x1 ⇒ ex_S ? ex_O + | x2 ⇒ ex_S ? (ex_S ? ex_O) + | x3 ⇒ ex_S ? (ex_S ? (ex_S ? ex_O)) + | x4 ⇒ ex_S ? (ex_S ? (ex_S ? (ex_S ? ex_O))) + | x5 ⇒ ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? ex_O)))) + | x6 ⇒ ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? ex_O))))) + | x7 ⇒ ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? ex_O)))))) + | x8 ⇒ ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? ex_O))))))) + | x9 ⇒ ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? ex_O)))))))) + | xA ⇒ ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? ex_O))))))))) + | xB ⇒ ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? ex_O)))))))))) + | xC ⇒ ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? ex_O))))))))))) + | xD ⇒ ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? ex_O)))))))))))) + | xE ⇒ ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? ex_O))))))))))))) + | xF ⇒ ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? (ex_S ? ex_O)))))))))))))) + ]. + +(* quaternari → esadecimali *) +ndefinition ex_of_qu ≝ +λn.match n with + [ q0 ⇒ x0 | q1 ⇒ x1 | q2 ⇒ x2 | q3 ⇒ x3 ]. + +(* ottali → esadecimali *) +ndefinition ex_of_oct ≝ +λn.match n with + [ o0 ⇒ x0 | o1 ⇒ x1 | o2 ⇒ x2 | o3 ⇒ x3 | o4 ⇒ x4 | o5 ⇒ x5 | o6 ⇒ x6 | o7 ⇒ x7 ]. diff --git a/helm/software/matita/contribs/ng_assembly/freescale/exadecim_lemmas.ma b/helm/software/matita/contribs/ng_assembly/freescale/exadecim_lemmas.ma index 7b361a2cb..4f3bad2d7 100755 --- a/helm/software/matita/contribs/ng_assembly/freescale/exadecim_lemmas.ma +++ b/helm/software/matita/contribs/ng_assembly/freescale/exadecim_lemmas.ma @@ -30,7 +30,7 @@ include "freescale/exadecim.ma". ndefinition exadecim_destruct1 : Πe2.ΠP:Prop.ΠH:x0 = e2.match e2 with [ x0 ⇒ P → P | _ ⇒ P ]. #e2; #P; ncases e2; nnormalize; #H; ##[ ##1: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match x0 with [ x0 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -39,7 +39,7 @@ nqed. ndefinition exadecim_destruct2 : Πe2.ΠP:Prop.ΠH:x1 = e2.match e2 with [ x1 ⇒ P → P | _ ⇒ P ]. #e2; #P; ncases e2; nnormalize; #H; ##[ ##2: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match x1 with [ x1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -48,7 +48,7 @@ nqed. ndefinition exadecim_destruct3 : Πe2.ΠP:Prop.ΠH:x2 = e2.match e2 with [ x2 ⇒ P → P | _ ⇒ P ]. #e2; #P; ncases e2; nnormalize; #H; ##[ ##3: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match x2 with [ x2 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -57,7 +57,7 @@ nqed. ndefinition exadecim_destruct4 : Πe2.ΠP:Prop.ΠH:x3 = e2.match e2 with [ x3 ⇒ P → P | _ ⇒ P ]. #e2; #P; ncases e2; nnormalize; #H; ##[ ##4: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match x3 with [ x3 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -66,7 +66,7 @@ nqed. ndefinition exadecim_destruct5 : Πe2.ΠP:Prop.ΠH:x4 = e2.match e2 with [ x4 ⇒ P → P | _ ⇒ P ]. #e2; #P; ncases e2; nnormalize; #H; ##[ ##5: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match x4 with [ x4 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -75,7 +75,7 @@ nqed. ndefinition exadecim_destruct6 : Πe2.ΠP:Prop.ΠH:x5 = e2.match e2 with [ x5 ⇒ P → P | _ ⇒ P ]. #e2; #P; ncases e2; nnormalize; #H; ##[ ##6: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match x5 with [ x5 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -84,7 +84,7 @@ nqed. ndefinition exadecim_destruct7 : Πe2.ΠP:Prop.ΠH:x6 = e2.match e2 with [ x6 ⇒ P → P | _ ⇒ P ]. #e2; #P; ncases e2; nnormalize; #H; ##[ ##7: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match x6 with [ x6 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -93,7 +93,7 @@ nqed. ndefinition exadecim_destruct8 : Πe2.ΠP:Prop.ΠH:x7 = e2.match e2 with [ x7 ⇒ P → P | _ ⇒ P ]. #e2; #P; ncases e2; nnormalize; #H; ##[ ##8: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match x7 with [ x7 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -102,7 +102,7 @@ nqed. ndefinition exadecim_destruct9 : Πe2.ΠP:Prop.ΠH:x8 = e2.match e2 with [ x8 ⇒ P → P | _ ⇒ P ]. #e2; #P; ncases e2; nnormalize; #H; ##[ ##9: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match x8 with [ x8 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -111,7 +111,7 @@ nqed. ndefinition exadecim_destruct10 : Πe2.ΠP:Prop.ΠH:x9 = e2.match e2 with [ x9 ⇒ P → P | _ ⇒ P ]. #e2; #P; ncases e2; nnormalize; #H; ##[ ##10: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match x9 with [ x9 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -120,7 +120,7 @@ nqed. ndefinition exadecim_destruct11 : Πe2.ΠP:Prop.ΠH:xA = e2.match e2 with [ xA ⇒ P → P | _ ⇒ P ]. #e2; #P; ncases e2; nnormalize; #H; ##[ ##11: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match xA with [ xA ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -129,7 +129,7 @@ nqed. ndefinition exadecim_destruct12 : Πe2.ΠP:Prop.ΠH:xB = e2.match e2 with [ xB ⇒ P → P | _ ⇒ P ]. #e2; #P; ncases e2; nnormalize; #H; ##[ ##12: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match xB with [ xB ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -138,7 +138,7 @@ nqed. ndefinition exadecim_destruct13 : Πe2.ΠP:Prop.ΠH:xC = e2.match e2 with [ xC ⇒ P → P | _ ⇒ P ]. #e2; #P; ncases e2; nnormalize; #H; ##[ ##13: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match xC with [ xC ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -147,7 +147,7 @@ nqed. ndefinition exadecim_destruct14 : Πe2.ΠP:Prop.ΠH:xD = e2.match e2 with [ xD ⇒ P → P | _ ⇒ P ]. #e2; #P; ncases e2; nnormalize; #H; ##[ ##14: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match xD with [ xD ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -156,7 +156,7 @@ nqed. ndefinition exadecim_destruct15 : Πe2.ΠP:Prop.ΠH:xE = e2.match e2 with [ xE ⇒ P → P | _ ⇒ P ]. #e2; #P; ncases e2; nnormalize; #H; ##[ ##15: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match xE with [ xE ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -165,7 +165,7 @@ nqed. ndefinition exadecim_destruct16 : Πe2.ΠP:Prop.ΠH:xF = e2.match e2 with [ xF ⇒ P → P | _ ⇒ P ]. #e2; #P; ncases e2; nnormalize; #H; ##[ ##16: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match xF with [ xF ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] diff --git a/helm/software/matita/contribs/ng_assembly/freescale/memory_struct.ma b/helm/software/matita/contribs/ng_assembly/freescale/memory_struct.ma index 38966a668..9d6da1a7f 100755 --- a/helm/software/matita/contribs/ng_assembly/freescale/memory_struct.ma +++ b/helm/software/matita/contribs/ng_assembly/freescale/memory_struct.ma @@ -20,7 +20,7 @@ (* *) (* ********************************************************************** *) -include "freescale/aux_bases.ma". +include "freescale/oct.ma". include "freescale/byte8.ma". (* **************************** *) diff --git a/helm/software/matita/contribs/ng_assembly/freescale/multivm.ma b/helm/software/matita/contribs/ng_assembly/freescale/multivm.ma index 40c8c11c7..09f49021b 100755 --- a/helm/software/matita/contribs/ng_assembly/freescale/multivm.ma +++ b/helm/software/matita/contribs/ng_assembly/freescale/multivm.ma @@ -21,7 +21,6 @@ (* ********************************************************************** *) include "freescale/load_write.ma". -include "freescale/nat_lemmas.ma". (* ************************************************ *) (* LOGICHE AUSILIARE CHE ACCOMUNANO PIU' OPERAZIONI *) diff --git a/helm/software/matita/contribs/ng_assembly/freescale/nat.ma b/helm/software/matita/contribs/ng_assembly/freescale/nat.ma deleted file mode 100755 index 4753b4cac..000000000 --- a/helm/software/matita/contribs/ng_assembly/freescale/nat.ma +++ /dev/null @@ -1,90 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||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: Cosimo Oliboni, oliboni@cs.unibo.it *) -(* Cosimo Oliboni, oliboni@cs.unibo.it *) -(* *) -(* ********************************************************************** *) - -include "freescale/pts.ma". -include "freescale/bool.ma". - -(* ******** *) -(* NATURALI *) -(* ******** *) - -inductive nat : Type ≝ - O : nat -| S : nat → nat. - -interpretation "Natural numbers" 'N = nat. - -default "natural numbers" cic:/matita/freescale/nat/nat.ind. - -alias num (instance 0) = "natural number". - -nlet rec eq_nat (n1,n2:nat) on n1 ≝ - match n1 with - [ O ⇒ match n2 with [ O ⇒ true | S _ ⇒ false ] - | S n1' ⇒ match n2 with [ O ⇒ false | S n2' ⇒ eq_nat n1' n2' ] - ]. - -nlet rec le_nat n m ≝ - match n with - [ O ⇒ true - | (S p) ⇒ match m with - [ O ⇒ false | (S q) ⇒ le_nat p q ] - ]. - -nlet rec plus (n1,n2:nat) on n1 ≝ - match n1 with - [ O ⇒ n2 - | (S n1') ⇒ S (plus n1' n2) ]. - -interpretation "natural plus" 'plus x y = (plus x y). - -nlet rec times (n1,n2:nat) on n1 ≝ - match n1 with - [ O ⇒ O - | (S n1') ⇒ n2 + (times n1' n2) ]. - -interpretation "natural times" 'times x y = (times x y). - -nlet rec minus n m ≝ - match n with - [ O ⇒ O - | (S p) ⇒ - match m with - [O ⇒ (S p) - | (S q) ⇒ minus p q ]]. - -interpretation "natural minus" 'minus x y = (minus x y). - -nlet rec div_aux p m n : nat ≝ -match (le_nat m n) with -[ true ⇒ O -| false ⇒ - match p with - [ O ⇒ O - | (S q) ⇒ S (div_aux q (m-(S n)) n)]]. - -ndefinition div : nat → nat → nat ≝ -λn,m.match m with - [ O ⇒ S n - | (S p) ⇒ div_aux n n p]. - -interpretation "natural divide" 'divide x y = (div x y). diff --git a/helm/software/matita/contribs/ng_assembly/freescale/nat_lemmas.ma b/helm/software/matita/contribs/ng_assembly/freescale/nat_lemmas.ma deleted file mode 100644 index c8fb12723..000000000 --- a/helm/software/matita/contribs/ng_assembly/freescale/nat_lemmas.ma +++ /dev/null @@ -1,161 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||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: Cosimo Oliboni, oliboni@cs.unibo.it *) -(* Cosimo Oliboni, oliboni@cs.unibo.it *) -(* *) -(* ********************************************************************** *) - -include "freescale/bool_lemmas.ma". -include "freescale/nat.ma". - -(* ******** *) -(* NATURALI *) -(* ******** *) - -nlemma nat_destruct_S_S : ∀n1,n2:nat.S n1 = S n2 → n1 = n2. - #n1; #n2; #H; - nchange with (match S n2 with [ O ⇒ False | S a ⇒ n1 = a ]); - nrewrite < H; - nnormalize; - napply refl_eq. -nqed. - -nlemma nat_destruct_0_S : ∀n:nat.O = S n → False. - #n; #H; - nchange with (match S n with [ O ⇒ True | S a ⇒ False ]); - nrewrite < H; - nnormalize; - napply I. -nqed. - -nlemma nat_destruct_S_0 : ∀n:nat.S n = O → False. - #n; #H; - nchange with (match S n with [ O ⇒ True | S a ⇒ False ]); - nrewrite > H; - nnormalize; - napply I. -nqed. - -nlemma symmetric_eqnat : symmetricT nat bool eq_nat. - nnormalize; - #n1; - nelim n1; - ##[ ##1: #n2; - nelim n2; - nnormalize; - ##[ ##1: napply refl_eq - ##| ##2: #n3; #H; napply refl_eq - ##] - ##| ##2: #n2; #H; #n3; - nnormalize; - ncases n3; - nnormalize; - ##[ ##1: napply refl_eq - ##| ##2: #n4; napply (H n4) - ##] - ##] -nqed. - -nlemma eq_to_eqnat : ∀n1,n2:nat.n1 = n2 → eq_nat n1 n2 = true. - #n1; - nelim n1; - ##[ ##1: #n2; - nelim n2; - nnormalize; - ##[ ##1: #H; napply refl_eq - ##| ##2: #n3; #H; #H1; nelim (nat_destruct_0_S ? H1) - ##] - ##| ##2: #n2; #H; #n3; #H1; - ncases n3 in H1:(%) ⊢ %; - nnormalize; - ##[ ##1: #H1; nelim (nat_destruct_S_0 ? H1) - ##| ##2: #n4; #H1; - napply (H n4 (nat_destruct_S_S … H1)) - ##] - ##] -nqed. - -nlemma eqnat_to_eq : ∀n1,n2:nat.(eq_nat n1 n2 = true → n1 = n2). - #n1; - nelim n1; - ##[ ##1: #n2; - nelim n2; - nnormalize; - ##[ ##1: #H; napply refl_eq - ##| ##2: #n3; #H; #H1; napply (bool_destruct … (O = S n3) H1) - ##] - ##| ##2: #n2; #H; #n3; #H1; - ncases n3 in H1:(%) ⊢ %; - nnormalize; - ##[ ##1: #H1; napply (bool_destruct … (S n2 = O) H1) - ##| ##2: #n4; #H1; - nrewrite > (H n4 H1); - napply refl_eq - ##] - ##] -nqed. - -nlemma Sn_p_n_to_S_npn : ∀n1,n2.(S n1) + n2 = S (n1 + n2). - #n1; - nelim n1; - ##[ ##1: nnormalize; #n2; napply refl_eq - ##| ##2: #n; #H; #n2; nrewrite > (H n2); - ncases n in H:(%) ⊢ %; - ##[ ##1: nnormalize; #H; napply refl_eq - ##| ##2: #n3; nnormalize; #H; napply refl_eq - ##] - ##] -nqed. - -nlemma n_p_Sn_to_S_npn : ∀n1,n2.n1 + (S n2) = S (n1 + n2). - #n1; - nelim n1; - ##[ ##1: nnormalize; #n2; napply refl_eq - ##| ##2: #n; #H; #n2; - nrewrite > (Sn_p_n_to_S_npn n (S n2)); - nrewrite > (H n2); - napply refl_eq - ##] -nqed. - -nlemma Opn_to_n : ∀n.O + n = n. - #n; nnormalize; napply refl_eq. -nqed. - -nlemma npO_to_n : ∀n.n + O = n. - #n; - nelim n; - ##[ ##1: nnormalize; napply refl_eq - ##| ##2: #n1; #H; - nrewrite > (Sn_p_n_to_S_npn n1 O); - nrewrite > H; - napply refl_eq - ##] -nqed. - -nlemma symmetric_plusnat : symmetricT nat nat plus. - #n1; - nelim n1; - ##[ ##1: #n2; nrewrite > (npO_to_n n2); nnormalize; napply refl_eq - ##| ##2: #n2; #H; #n3; - nrewrite > (Sn_p_n_to_S_npn n2 n3); - nrewrite > (n_p_Sn_to_S_npn n3 n2); - nrewrite > (H n3); - napply refl_eq - ##] -nqed. diff --git a/helm/software/matita/contribs/ng_assembly/freescale/oct.ma b/helm/software/matita/contribs/ng_assembly/freescale/oct.ma new file mode 100755 index 000000000..21731dde9 --- /dev/null +++ b/helm/software/matita/contribs/ng_assembly/freescale/oct.ma @@ -0,0 +1,78 @@ +(**************************************************************************) +(* ___ *) +(* ||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: Cosimo Oliboni, oliboni@cs.unibo.it *) +(* Cosimo Oliboni, oliboni@cs.unibo.it *) +(* *) +(* ********************************************************************** *) + +include "freescale/bool.ma". + +(* ****** *) +(* OTTALI *) +(* ****** *) + +ninductive oct : Type ≝ + o0: oct +| o1: oct +| o2: oct +| o3: oct +| o4: oct +| o5: oct +| o6: oct +| o7: oct. + +(* operatore = *) +ndefinition eq_oct ≝ +λn1,n2:oct. + match n1 with + [ o0 ⇒ match n2 with [ o0 ⇒ true | _ ⇒ false ] + | o1 ⇒ match n2 with [ o1 ⇒ true | _ ⇒ false ] + | o2 ⇒ match n2 with [ o2 ⇒ true | _ ⇒ false ] + | o3 ⇒ match n2 with [ o3 ⇒ true | _ ⇒ false ] + | o4 ⇒ match n2 with [ o4 ⇒ true | _ ⇒ false ] + | o5 ⇒ match n2 with [ o5 ⇒ true | _ ⇒ false ] + | o6 ⇒ match n2 with [ o6 ⇒ true | _ ⇒ false ] + | o7 ⇒ match n2 with [ o7 ⇒ true | _ ⇒ false ] + ]. + +(* iteratore sugli ottali *) +ndefinition forall_oct ≝ λP. + P o0 ⊗ P o1 ⊗ P o2 ⊗ P o3 ⊗ P o4 ⊗ P o5 ⊗ P o6 ⊗ P o7. + +(* operatore successore *) +ndefinition succ_oct ≝ +λn.match n with + [ o0 ⇒ o1 | o1 ⇒ o2 | o2 ⇒ o3 | o3 ⇒ o4 | o4 ⇒ o5 | o5 ⇒ o6 | o6 ⇒ o7 | o7 ⇒ o0 ]. + +(* ottali ricorsivi *) +ninductive rec_oct : oct → Type ≝ + oc_O : rec_oct o0 +| oc_S : ∀n.rec_oct n → rec_oct (succ_oct n). + +(* ottali → ottali ricorsivi *) +ndefinition oct_to_recoct ≝ +λn.match n return λx.rec_oct x with + [ o0 ⇒ oc_O + | o1 ⇒ oc_S ? oc_O + | o2 ⇒ oc_S ? (oc_S ? oc_O) + | o3 ⇒ oc_S ? (oc_S ? (oc_S ? oc_O)) + | o4 ⇒ oc_S ? (oc_S ? (oc_S ? (oc_S ? oc_O))) + | o5 ⇒ oc_S ? (oc_S ? (oc_S ? (oc_S ? (oc_S ? oc_O)))) + | o6 ⇒ oc_S ? (oc_S ? (oc_S ? (oc_S ? (oc_S ? (oc_S ? oc_O))))) + | o7 ⇒ oc_S ? (oc_S ? (oc_S ? (oc_S ? (oc_S ? (oc_S ? (oc_S ? oc_O)))))) + ]. diff --git a/helm/software/matita/contribs/ng_assembly/freescale/oct_lemmas.ma b/helm/software/matita/contribs/ng_assembly/freescale/oct_lemmas.ma new file mode 100755 index 000000000..51f1aa76e --- /dev/null +++ b/helm/software/matita/contribs/ng_assembly/freescale/oct_lemmas.ma @@ -0,0 +1,123 @@ +(**************************************************************************) +(* ___ *) +(* ||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: Cosimo Oliboni, oliboni@cs.unibo.it *) +(* Cosimo Oliboni, oliboni@cs.unibo.it *) +(* *) +(* ********************************************************************** *) + +include "freescale/bool_lemmas.ma". +include "freescale/oct.ma". + +(* ****** *) +(* OTTALI *) +(* ****** *) + +ndefinition oct_destruct_aux ≝ +Πn1,n2:oct.ΠP:Prop.n1 = n2 → + match n1 with + [ o0 ⇒ match n2 with [ o0 ⇒ P → P | _ ⇒ P ] + | o1 ⇒ match n2 with [ o1 ⇒ P → P | _ ⇒ P ] + | o2 ⇒ match n2 with [ o2 ⇒ P → P | _ ⇒ P ] + | o3 ⇒ match n2 with [ o3 ⇒ P → P | _ ⇒ P ] + | o4 ⇒ match n2 with [ o4 ⇒ P → P | _ ⇒ P ] + | o5 ⇒ match n2 with [ o5 ⇒ P → P | _ ⇒ P ] + | o6 ⇒ match n2 with [ o6 ⇒ P → P | _ ⇒ P ] + | o7 ⇒ match n2 with [ o7 ⇒ P → P | _ ⇒ P ] + ]. + +ndefinition oct_destruct : oct_destruct_aux. + #n1; #n2; #P; + nelim n1; + ##[ ##1: nelim n2; nnormalize; #H; + ##[ ##1: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match o0 with [ o0 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] + ##| ##2: nelim n2; nnormalize; #H; + ##[ ##2: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match o1 with [ o1 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] + ##| ##3: nelim n2; nnormalize; #H; + ##[ ##3: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match o2 with [ o2 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] + ##| ##4: nelim n2; nnormalize; #H; + ##[ ##4: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match o3 with [ o3 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] + ##| ##5: nelim n2; nnormalize; #H; + ##[ ##5: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match o4 with [ o4 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] + ##| ##6: nelim n2; nnormalize; #H; + ##[ ##6: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match o5 with [ o5 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] + ##| ##7: nelim n2; nnormalize; #H; + ##[ ##7: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match o6 with [ o6 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] + ##| ##8: nelim n2; nnormalize; #H; + ##[ ##8: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match o7 with [ o7 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] + ##] +nqed. + +nlemma symmetric_eqoct : symmetricT oct bool eq_oct. + #n1; #n2; + nelim n1; + nelim n2; + nnormalize; + napply refl_eq. +nqed. + +nlemma eqoct_to_eq : ∀n1,n2.eq_oct n1 n2 = true → n1 = n2. + #n1; #n2; + ncases n1; + ncases n2; + nnormalize; + ##[ ##1,10,19,28,37,46,55,64: #H; napply refl_eq + ##| ##*: #H; napply (bool_destruct … H) + ##] +nqed. + +nlemma eq_to_eqoct : ∀n1,n2.n1 = n2 → eq_oct n1 n2 = true. + #n1; #n2; + ncases n1; + ncases n2; + nnormalize; + ##[ ##1,10,19,28,37,46,55,64: #H; napply refl_eq + ##| ##*: #H; napply (oct_destruct … H) + ##] +nqed. diff --git a/helm/software/matita/contribs/ng_assembly/freescale/opcode_base.ma b/helm/software/matita/contribs/ng_assembly/freescale/opcode_base.ma index 74b7cc4e2..0fdf1b154 100755 --- a/helm/software/matita/contribs/ng_assembly/freescale/opcode_base.ma +++ b/helm/software/matita/contribs/ng_assembly/freescale/opcode_base.ma @@ -20,7 +20,8 @@ (* *) (* ********************************************************************** *) -include "freescale/aux_bases.ma". +include "freescale/oct.ma". +include "freescale/bitrigesim.ma". include "freescale/word16.ma". include "freescale/theory.ma". @@ -124,7 +125,7 @@ ninductive instr_mode: Type ≝ | MODE_SRT : bitrigesim → instr_mode . -ndefinition eq_instrmode ≝ +ndefinition eq_im ≝ λi1,i2:instr_mode. match i1 with [ MODE_INH ⇒ match i2 with [ MODE_INH ⇒ true | _ ⇒ false ] @@ -160,7 +161,7 @@ ndefinition eq_instrmode ≝ | MODE_DIRn n1 ⇒ match i2 with [ MODE_DIRn n2 ⇒ eq_oct n1 n2 | _ ⇒ false ] | MODE_DIRn_and_IMM1 n1 ⇒ match i2 with [ MODE_DIRn_and_IMM1 n2 ⇒ eq_oct n1 n2 | _ ⇒ false ] | MODE_TNY e1 ⇒ match i2 with [ MODE_TNY e2 ⇒ eq_ex e1 e2 | _ ⇒ false ] - | MODE_SRT t1 ⇒ match i2 with [ MODE_SRT t2 ⇒ eq_bitrig t1 t2 | _ ⇒ false ] + | MODE_SRT t1 ⇒ match i2 with [ MODE_SRT t2 ⇒ eq_bit t1 t2 | _ ⇒ false ] ]. (* enumerazione delle istruzioni di tutte le ALU *) diff --git a/helm/software/matita/contribs/ng_assembly/freescale/opcode_base_lemmas.ma b/helm/software/matita/contribs/ng_assembly/freescale/opcode_base_lemmas.ma index 69c1c0021..71e6e65ee 100755 --- a/helm/software/matita/contribs/ng_assembly/freescale/opcode_base_lemmas.ma +++ b/helm/software/matita/contribs/ng_assembly/freescale/opcode_base_lemmas.ma @@ -41,25 +41,25 @@ ndefinition mcu_type_destruct : mcu_type_destruct_aux. nelim m1; ##[ ##1: nelim m2; nnormalize; #H; ##[ ##1: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match HC05 with [ HC05 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] ##| ##2: nelim m2; nnormalize; #H; ##[ ##2: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match HC08 with [ HC08 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] ##| ##3: nelim m2; nnormalize; #H; ##[ ##3: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match HCS08 with [ HCS08 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] ##| ##4: nelim m2; nnormalize; #H; ##[ ##4: napply (λx:P.x) - ##| ##*: napply (False_ind (λ_.?) ?); + ##| ##*: napply False_ind; nchange with (match RS08 with [ RS08 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] diff --git a/helm/software/matita/contribs/ng_assembly/freescale/opcode_base_lemmas_instrmode1.ma b/helm/software/matita/contribs/ng_assembly/freescale/opcode_base_lemmas_instrmode1.ma index ad383d2ab..c2e1ed6d1 100755 --- a/helm/software/matita/contribs/ng_assembly/freescale/opcode_base_lemmas_instrmode1.ma +++ b/helm/software/matita/contribs/ng_assembly/freescale/opcode_base_lemmas_instrmode1.ma @@ -20,7 +20,8 @@ (* *) (* ********************************************************************** *) -include "freescale/aux_bases_lemmas.ma". +include "freescale/oct_lemmas.ma". +include "freescale/bitrigesim_lemmas.ma". include "freescale/exadecim_lemmas.ma". include "freescale/opcode_base.ma". @@ -35,11 +36,11 @@ ndefinition instr_mode_destruct1 : nnormalize; ##[ ##1: #H; napply (λx:P.x) ##| ##2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_INH with [ MODE_INH ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_INH with [ MODE_INH ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -52,11 +53,11 @@ ndefinition instr_mode_destruct2 : nnormalize; ##[ ##2: #H; napply (λx:P.x) ##| ##1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_INHA with [ MODE_INHA ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_INHA with [ MODE_INHA ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -69,11 +70,11 @@ ndefinition instr_mode_destruct3 : nnormalize; ##[ ##3: #H; napply (λx:P.x) ##| ##1,2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_INHX with [ MODE_INHX ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_INHX with [ MODE_INHX ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -86,11 +87,11 @@ ndefinition instr_mode_destruct4 : nnormalize; ##[ ##4: #H; napply (λx:P.x) ##| ##1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_INHH with [ MODE_INHH ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_INHH with [ MODE_INHH ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -103,11 +104,11 @@ ndefinition instr_mode_destruct5 : nnormalize; ##[ ##5: #H; napply (λx:P.x) ##| ##1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_INHX0ADD with [ MODE_INHX0ADD ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_INHX0ADD with [ MODE_INHX0ADD ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -120,11 +121,11 @@ ndefinition instr_mode_destruct6 : nnormalize; ##[ ##6: #H; napply (λx:P.x) ##| ##1,2,3,4,5,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_INHX1ADD with [ MODE_INHX1ADD ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_INHX1ADD with [ MODE_INHX1ADD ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -137,11 +138,11 @@ ndefinition instr_mode_destruct7 : nnormalize; ##[ ##7: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_INHX2ADD with [ MODE_INHX2ADD ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_INHX2ADD with [ MODE_INHX2ADD ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -154,11 +155,11 @@ ndefinition instr_mode_destruct8 : nnormalize; ##[ ##8: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IMM1 with [ MODE_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IMM1 with [ MODE_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -171,11 +172,11 @@ ndefinition instr_mode_destruct9 : nnormalize; ##[ ##9: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IMM1EXT with [ MODE_IMM1EXT ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IMM1EXT with [ MODE_IMM1EXT ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -188,11 +189,11 @@ ndefinition instr_mode_destruct10 : nnormalize; ##[ ##10: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IMM2 with [ MODE_IMM2 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IMM2 with [ MODE_IMM2 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -205,11 +206,11 @@ ndefinition instr_mode_destruct11 : nnormalize; ##[ ##11: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_DIR1 with [ MODE_DIR1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_DIR1 with [ MODE_DIR1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -222,11 +223,11 @@ ndefinition instr_mode_destruct12 : nnormalize; ##[ ##12: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_DIR2 with [ MODE_DIR2 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_DIR2 with [ MODE_DIR2 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -239,11 +240,11 @@ ndefinition instr_mode_destruct13 : nnormalize; ##[ ##13: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,11,12,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IX0 with [ MODE_IX0 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IX0 with [ MODE_IX0 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -256,11 +257,11 @@ ndefinition instr_mode_destruct14 : nnormalize; ##[ ##14: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IX1 with [ MODE_IX1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IX1 with [ MODE_IX1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -273,11 +274,11 @@ ndefinition instr_mode_destruct15 : nnormalize; ##[ ##15: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IX2 with [ MODE_IX2 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IX2 with [ MODE_IX2 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -290,11 +291,11 @@ ndefinition instr_mode_destruct16 : nnormalize; ##[ ##16: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_SP1 with [ MODE_SP1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_SP1 with [ MODE_SP1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -307,11 +308,11 @@ ndefinition instr_mode_destruct17 : nnormalize; ##[ ##17: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_SP2 with [ MODE_SP2 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_SP2 with [ MODE_SP2 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -324,11 +325,11 @@ ndefinition instr_mode_destruct18 : nnormalize; ##[ ##18: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_DIR1_to_DIR1 with [ MODE_DIR1_to_DIR1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_DIR1_to_DIR1 with [ MODE_DIR1_to_DIR1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -341,11 +342,11 @@ ndefinition instr_mode_destruct19 : nnormalize; ##[ ##19: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IMM1_to_DIR1 with [ MODE_IMM1_to_DIR1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IMM1_to_DIR1 with [ MODE_IMM1_to_DIR1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -358,11 +359,11 @@ ndefinition instr_mode_destruct20 : nnormalize; ##[ ##20: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IX0p_to_DIR1 with [ MODE_IX0p_to_DIR1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IX0p_to_DIR1 with [ MODE_IX0p_to_DIR1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -375,11 +376,11 @@ ndefinition instr_mode_destruct21 : nnormalize; ##[ ##21: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_DIR1_to_IX0p with [ MODE_DIR1_to_IX0p ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_DIR1_to_IX0p with [ MODE_DIR1_to_IX0p ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -392,11 +393,11 @@ ndefinition instr_mode_destruct22 : nnormalize; ##[ ##22: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_INHA_and_IMM1 with [ MODE_INHA_and_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_INHA_and_IMM1 with [ MODE_INHA_and_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -409,11 +410,11 @@ ndefinition instr_mode_destruct23 : nnormalize; ##[ ##23: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_INHX_and_IMM1 with [ MODE_INHX_and_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_INHX_and_IMM1 with [ MODE_INHX_and_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -426,11 +427,11 @@ ndefinition instr_mode_destruct24 : nnormalize; ##[ ##24: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IMM1_and_IMM1 with [ MODE_IMM1_and_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IMM1_and_IMM1 with [ MODE_IMM1_and_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -443,11 +444,11 @@ ndefinition instr_mode_destruct25 : nnormalize; ##[ ##25: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_DIR1_and_IMM1 with [ MODE_DIR1_and_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_DIR1_and_IMM1 with [ MODE_DIR1_and_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -460,11 +461,11 @@ ndefinition instr_mode_destruct26 : nnormalize; ##[ ##26: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IX0_and_IMM1 with [ MODE_IX0_and_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IX0_and_IMM1 with [ MODE_IX0_and_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -477,11 +478,11 @@ ndefinition instr_mode_destruct27 : nnormalize; ##[ ##27: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IX0p_and_IMM1 with [ MODE_IX0p_and_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IX0p_and_IMM1 with [ MODE_IX0p_and_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -494,11 +495,11 @@ ndefinition instr_mode_destruct28 : nnormalize; ##[ ##28: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IX1_and_IMM1 with [ MODE_IX1_and_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IX1_and_IMM1 with [ MODE_IX1_and_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -511,11 +512,11 @@ ndefinition instr_mode_destruct29 : nnormalize; ##[ ##29: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IX1p_and_IMM1 with [ MODE_IX1p_and_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_IX1p_and_IMM1 with [ MODE_IX1p_and_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -528,11 +529,11 @@ ndefinition instr_mode_destruct30 : nnormalize; ##[ ##30: #H; napply (λx:P.x) ##| ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_SP1_and_IMM1 with [ MODE_SP1_and_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_SP1_and_IMM1 with [ MODE_SP1_and_IMM1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -559,11 +560,11 @@ ndefinition instr_mode_destruct31 : ncases i2; nnormalize; ##[ ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_DIRn n1 with [ MODE_DIRn a ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##32,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_DIRn n1 with [ MODE_DIRn n1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31: #n2; @@ -596,11 +597,11 @@ ndefinition instr_mode_destruct32 : ncases i2; nnormalize; ##[ ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_DIRn_and_IMM1 n1 with [ MODE_DIRn_and_IMM1 a ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,33,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_DIRn_and_IMM1 n1 with [ MODE_DIRn_and_IMM1 n1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##32: #n2; @@ -637,11 +638,11 @@ ndefinition instr_mode_destruct33 : ncases i2; nnormalize; ##[ ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_TNY n1 with [ MODE_TNY a ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,34: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_TNY n1 with [ MODE_TNY n1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##33: #n2; @@ -686,11 +687,11 @@ ndefinition instr_mode_destruct34 : ncases i2; nnormalize; ##[ ##1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30: #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_SRT n1 with [ MODE_SRT a ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##31,32,33: #n; #H; - napply (False_ind (λ_.?) ?); + napply False_ind; nchange with (match MODE_SRT n1 with [ MODE_SRT n1 ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##| ##34: #n2; diff --git a/helm/software/matita/contribs/ng_assembly/freescale/opcode_base_lemmas_instrmode2.ma b/helm/software/matita/contribs/ng_assembly/freescale/opcode_base_lemmas_instrmode2.ma index 06aa6c040..a80e96d21 100755 --- a/helm/software/matita/contribs/ng_assembly/freescale/opcode_base_lemmas_instrmode2.ma +++ b/helm/software/matita/contribs/ng_assembly/freescale/opcode_base_lemmas_instrmode2.ma @@ -26,7 +26,7 @@ include "freescale/opcode_base_lemmas_instrmode1.ma". (* MATTONI BASE PER DEFINIRE LE TABELLE DELLE MCU *) (* ********************************************** *) -nlemma symmetric_eqinstrmode : symmetricT instr_mode bool eq_instrmode. +nlemma symmetric_eqim : symmetricT instr_mode bool eq_im. #i1; #i2; ncases i1; ##[ ##1: ncases i2; nnormalize; ##[ ##31,32,33,34: #n ##] napply refl_eq @@ -82,15 +82,15 @@ nlemma symmetric_eqinstrmode : symmetricT instr_mode bool eq_instrmode. nnormalize; napply refl_eq ##| ##34: ncases i2; #n1; ##[ ##34: #n2; - nchange with (eq_bitrig n2 n1 = eq_bitrig n1 n2); - nrewrite > (symmetric_eqbitrig n1 n2); + nchange with (eq_bit n2 n1 = eq_bit n1 n2); + nrewrite > (symmetric_eqbit n1 n2); ##| ##31,32,33: #n2; nnormalize ##] nnormalize; napply refl_eq ##] nqed. -nlemma eqinstrmode_to_eq1 : ∀i2.eq_instrmode MODE_INH i2 = true → MODE_INH = i2. +nlemma eqim_to_eq1 : ∀i2.eq_im MODE_INH i2 = true → MODE_INH = i2. #i2; ncases i2; nnormalize; ##[ ##1: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -98,7 +98,7 @@ nlemma eqinstrmode_to_eq1 : ∀i2.eq_instrmode MODE_INH i2 = true → MODE_INH = ##] nqed. -nlemma eqinstrmode_to_eq2 : ∀i2.eq_instrmode MODE_INHA i2 = true → MODE_INHA = i2. +nlemma eqim_to_eq2 : ∀i2.eq_im MODE_INHA i2 = true → MODE_INHA = i2. #i2; ncases i2; nnormalize; ##[ ##2: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -106,7 +106,7 @@ nlemma eqinstrmode_to_eq2 : ∀i2.eq_instrmode MODE_INHA i2 = true → MODE_INHA ##] nqed. -nlemma eqinstrmode_to_eq3 : ∀i2.eq_instrmode MODE_INHX i2 = true → MODE_INHX = i2. +nlemma eqim_to_eq3 : ∀i2.eq_im MODE_INHX i2 = true → MODE_INHX = i2. #i2; ncases i2; nnormalize; ##[ ##3: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -114,7 +114,7 @@ nlemma eqinstrmode_to_eq3 : ∀i2.eq_instrmode MODE_INHX i2 = true → MODE_INHX ##] nqed. -nlemma eqinstrmode_to_eq4 : ∀i2.eq_instrmode MODE_INHH i2 = true → MODE_INHH = i2. +nlemma eqim_to_eq4 : ∀i2.eq_im MODE_INHH i2 = true → MODE_INHH = i2. #i2; ncases i2; nnormalize; ##[ ##4: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -122,7 +122,7 @@ nlemma eqinstrmode_to_eq4 : ∀i2.eq_instrmode MODE_INHH i2 = true → MODE_INHH ##] nqed. -nlemma eqinstrmode_to_eq5 : ∀i2.eq_instrmode MODE_INHX0ADD i2 = true → MODE_INHX0ADD = i2. +nlemma eqim_to_eq5 : ∀i2.eq_im MODE_INHX0ADD i2 = true → MODE_INHX0ADD = i2. #i2; ncases i2; nnormalize; ##[ ##5: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -130,7 +130,7 @@ nlemma eqinstrmode_to_eq5 : ∀i2.eq_instrmode MODE_INHX0ADD i2 = true → MODE_ ##] nqed. -nlemma eqinstrmode_to_eq6 : ∀i2.eq_instrmode MODE_INHX1ADD i2 = true → MODE_INHX1ADD = i2. +nlemma eqim_to_eq6 : ∀i2.eq_im MODE_INHX1ADD i2 = true → MODE_INHX1ADD = i2. #i2; ncases i2; nnormalize; ##[ ##6: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -138,7 +138,7 @@ nlemma eqinstrmode_to_eq6 : ∀i2.eq_instrmode MODE_INHX1ADD i2 = true → MODE_ ##] nqed. -nlemma eqinstrmode_to_eq7 : ∀i2.eq_instrmode MODE_INHX2ADD i2 = true → MODE_INHX2ADD = i2. +nlemma eqim_to_eq7 : ∀i2.eq_im MODE_INHX2ADD i2 = true → MODE_INHX2ADD = i2. #i2; ncases i2; nnormalize; ##[ ##7: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -146,7 +146,7 @@ nlemma eqinstrmode_to_eq7 : ∀i2.eq_instrmode MODE_INHX2ADD i2 = true → MODE_ ##] nqed. -nlemma eqinstrmode_to_eq8 : ∀i2.eq_instrmode MODE_IMM1 i2 = true → MODE_IMM1 = i2. +nlemma eqim_to_eq8 : ∀i2.eq_im MODE_IMM1 i2 = true → MODE_IMM1 = i2. #i2; ncases i2; nnormalize; ##[ ##8: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -154,7 +154,7 @@ nlemma eqinstrmode_to_eq8 : ∀i2.eq_instrmode MODE_IMM1 i2 = true → MODE_IMM1 ##] nqed. -nlemma eqinstrmode_to_eq9 : ∀i2.eq_instrmode MODE_IMM1EXT i2 = true → MODE_IMM1EXT = i2. +nlemma eqim_to_eq9 : ∀i2.eq_im MODE_IMM1EXT i2 = true → MODE_IMM1EXT = i2. #i2; ncases i2; nnormalize; ##[ ##9: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -162,7 +162,7 @@ nlemma eqinstrmode_to_eq9 : ∀i2.eq_instrmode MODE_IMM1EXT i2 = true → MODE_I ##] nqed. -nlemma eqinstrmode_to_eq10 : ∀i2.eq_instrmode MODE_IMM2 i2 = true → MODE_IMM2 = i2. +nlemma eqim_to_eq10 : ∀i2.eq_im MODE_IMM2 i2 = true → MODE_IMM2 = i2. #i2; ncases i2; nnormalize; ##[ ##10: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -170,7 +170,7 @@ nlemma eqinstrmode_to_eq10 : ∀i2.eq_instrmode MODE_IMM2 i2 = true → MODE_IMM ##] nqed. -nlemma eqinstrmode_to_eq11 : ∀i2.eq_instrmode MODE_DIR1 i2 = true → MODE_DIR1 = i2. +nlemma eqim_to_eq11 : ∀i2.eq_im MODE_DIR1 i2 = true → MODE_DIR1 = i2. #i2; ncases i2; nnormalize; ##[ ##11: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -178,7 +178,7 @@ nlemma eqinstrmode_to_eq11 : ∀i2.eq_instrmode MODE_DIR1 i2 = true → MODE_DIR ##] nqed. -nlemma eqinstrmode_to_eq12 : ∀i2.eq_instrmode MODE_DIR2 i2 = true → MODE_DIR2 = i2. +nlemma eqim_to_eq12 : ∀i2.eq_im MODE_DIR2 i2 = true → MODE_DIR2 = i2. #i2; ncases i2; nnormalize; ##[ ##12: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -186,7 +186,7 @@ nlemma eqinstrmode_to_eq12 : ∀i2.eq_instrmode MODE_DIR2 i2 = true → MODE_DIR ##] nqed. -nlemma eqinstrmode_to_eq13 : ∀i2.eq_instrmode MODE_IX0 i2 = true → MODE_IX0 = i2. +nlemma eqim_to_eq13 : ∀i2.eq_im MODE_IX0 i2 = true → MODE_IX0 = i2. #i2; ncases i2; nnormalize; ##[ ##13: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -194,7 +194,7 @@ nlemma eqinstrmode_to_eq13 : ∀i2.eq_instrmode MODE_IX0 i2 = true → MODE_IX0 ##] nqed. -nlemma eqinstrmode_to_eq14 : ∀i2.eq_instrmode MODE_IX1 i2 = true → MODE_IX1 = i2. +nlemma eqim_to_eq14 : ∀i2.eq_im MODE_IX1 i2 = true → MODE_IX1 = i2. #i2; ncases i2; nnormalize; ##[ ##14: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -202,7 +202,7 @@ nlemma eqinstrmode_to_eq14 : ∀i2.eq_instrmode MODE_IX1 i2 = true → MODE_IX1 ##] nqed. -nlemma eqinstrmode_to_eq15 : ∀i2.eq_instrmode MODE_IX2 i2 = true → MODE_IX2 = i2. +nlemma eqim_to_eq15 : ∀i2.eq_im MODE_IX2 i2 = true → MODE_IX2 = i2. #i2; ncases i2; nnormalize; ##[ ##15: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -210,7 +210,7 @@ nlemma eqinstrmode_to_eq15 : ∀i2.eq_instrmode MODE_IX2 i2 = true → MODE_IX2 ##] nqed. -nlemma eqinstrmode_to_eq16 : ∀i2.eq_instrmode MODE_SP1 i2 = true → MODE_SP1 = i2. +nlemma eqim_to_eq16 : ∀i2.eq_im MODE_SP1 i2 = true → MODE_SP1 = i2. #i2; ncases i2; nnormalize; ##[ ##16: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -218,7 +218,7 @@ nlemma eqinstrmode_to_eq16 : ∀i2.eq_instrmode MODE_SP1 i2 = true → MODE_SP1 ##] nqed. -nlemma eqinstrmode_to_eq17 : ∀i2.eq_instrmode MODE_SP2 i2 = true → MODE_SP2 = i2. +nlemma eqim_to_eq17 : ∀i2.eq_im MODE_SP2 i2 = true → MODE_SP2 = i2. #i2; ncases i2; nnormalize; ##[ ##17: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -226,7 +226,7 @@ nlemma eqinstrmode_to_eq17 : ∀i2.eq_instrmode MODE_SP2 i2 = true → MODE_SP2 ##] nqed. -nlemma eqinstrmode_to_eq18 : ∀i2.eq_instrmode MODE_DIR1_to_DIR1 i2 = true → MODE_DIR1_to_DIR1 = i2. +nlemma eqim_to_eq18 : ∀i2.eq_im MODE_DIR1_to_DIR1 i2 = true → MODE_DIR1_to_DIR1 = i2. #i2; ncases i2; nnormalize; ##[ ##18: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -234,7 +234,7 @@ nlemma eqinstrmode_to_eq18 : ∀i2.eq_instrmode MODE_DIR1_to_DIR1 i2 = true → ##] nqed. -nlemma eqinstrmode_to_eq19 : ∀i2.eq_instrmode MODE_IMM1_to_DIR1 i2 = true → MODE_IMM1_to_DIR1 = i2. +nlemma eqim_to_eq19 : ∀i2.eq_im MODE_IMM1_to_DIR1 i2 = true → MODE_IMM1_to_DIR1 = i2. #i2; ncases i2; nnormalize; ##[ ##19: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -242,7 +242,7 @@ nlemma eqinstrmode_to_eq19 : ∀i2.eq_instrmode MODE_IMM1_to_DIR1 i2 = true → ##] nqed. -nlemma eqinstrmode_to_eq20 : ∀i2.eq_instrmode MODE_IX0p_to_DIR1 i2 = true → MODE_IX0p_to_DIR1 = i2. +nlemma eqim_to_eq20 : ∀i2.eq_im MODE_IX0p_to_DIR1 i2 = true → MODE_IX0p_to_DIR1 = i2. #i2; ncases i2; nnormalize; ##[ ##20: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -250,7 +250,7 @@ nlemma eqinstrmode_to_eq20 : ∀i2.eq_instrmode MODE_IX0p_to_DIR1 i2 = true → ##] nqed. -nlemma eqinstrmode_to_eq21 : ∀i2.eq_instrmode MODE_DIR1_to_IX0p i2 = true → MODE_DIR1_to_IX0p = i2. +nlemma eqim_to_eq21 : ∀i2.eq_im MODE_DIR1_to_IX0p i2 = true → MODE_DIR1_to_IX0p = i2. #i2; ncases i2; nnormalize; ##[ ##21: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -258,7 +258,7 @@ nlemma eqinstrmode_to_eq21 : ∀i2.eq_instrmode MODE_DIR1_to_IX0p i2 = true → ##] nqed. -nlemma eqinstrmode_to_eq22 : ∀i2.eq_instrmode MODE_INHA_and_IMM1 i2 = true → MODE_INHA_and_IMM1 = i2. +nlemma eqim_to_eq22 : ∀i2.eq_im MODE_INHA_and_IMM1 i2 = true → MODE_INHA_and_IMM1 = i2. #i2; ncases i2; nnormalize; ##[ ##22: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -266,7 +266,7 @@ nlemma eqinstrmode_to_eq22 : ∀i2.eq_instrmode MODE_INHA_and_IMM1 i2 = true → ##] nqed. -nlemma eqinstrmode_to_eq23 : ∀i2.eq_instrmode MODE_INHX_and_IMM1 i2 = true → MODE_INHX_and_IMM1 = i2. +nlemma eqim_to_eq23 : ∀i2.eq_im MODE_INHX_and_IMM1 i2 = true → MODE_INHX_and_IMM1 = i2. #i2; ncases i2; nnormalize; ##[ ##23: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -274,7 +274,7 @@ nlemma eqinstrmode_to_eq23 : ∀i2.eq_instrmode MODE_INHX_and_IMM1 i2 = true → ##] nqed. -nlemma eqinstrmode_to_eq24 : ∀i2.eq_instrmode MODE_IMM1_and_IMM1 i2 = true → MODE_IMM1_and_IMM1 = i2. +nlemma eqim_to_eq24 : ∀i2.eq_im MODE_IMM1_and_IMM1 i2 = true → MODE_IMM1_and_IMM1 = i2. #i2; ncases i2; nnormalize; ##[ ##24: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -282,7 +282,7 @@ nlemma eqinstrmode_to_eq24 : ∀i2.eq_instrmode MODE_IMM1_and_IMM1 i2 = true → ##] nqed. -nlemma eqinstrmode_to_eq25 : ∀i2.eq_instrmode MODE_DIR1_and_IMM1 i2 = true → MODE_DIR1_and_IMM1 = i2. +nlemma eqim_to_eq25 : ∀i2.eq_im MODE_DIR1_and_IMM1 i2 = true → MODE_DIR1_and_IMM1 = i2. #i2; ncases i2; nnormalize; ##[ ##25: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -290,7 +290,7 @@ nlemma eqinstrmode_to_eq25 : ∀i2.eq_instrmode MODE_DIR1_and_IMM1 i2 = true → ##] nqed. -nlemma eqinstrmode_to_eq26 : ∀i2.eq_instrmode MODE_IX0_and_IMM1 i2 = true → MODE_IX0_and_IMM1 = i2. +nlemma eqim_to_eq26 : ∀i2.eq_im MODE_IX0_and_IMM1 i2 = true → MODE_IX0_and_IMM1 = i2. #i2; ncases i2; nnormalize; ##[ ##26: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -298,7 +298,7 @@ nlemma eqinstrmode_to_eq26 : ∀i2.eq_instrmode MODE_IX0_and_IMM1 i2 = true → ##] nqed. -nlemma eqinstrmode_to_eq27 : ∀i2.eq_instrmode MODE_IX0p_and_IMM1 i2 = true → MODE_IX0p_and_IMM1 = i2. +nlemma eqim_to_eq27 : ∀i2.eq_im MODE_IX0p_and_IMM1 i2 = true → MODE_IX0p_and_IMM1 = i2. #i2; ncases i2; nnormalize; ##[ ##27: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -306,7 +306,7 @@ nlemma eqinstrmode_to_eq27 : ∀i2.eq_instrmode MODE_IX0p_and_IMM1 i2 = true → ##] nqed. -nlemma eqinstrmode_to_eq28 : ∀i2.eq_instrmode MODE_IX1_and_IMM1 i2 = true → MODE_IX1_and_IMM1 = i2. +nlemma eqim_to_eq28 : ∀i2.eq_im MODE_IX1_and_IMM1 i2 = true → MODE_IX1_and_IMM1 = i2. #i2; ncases i2; nnormalize; ##[ ##28: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -314,7 +314,7 @@ nlemma eqinstrmode_to_eq28 : ∀i2.eq_instrmode MODE_IX1_and_IMM1 i2 = true → ##] nqed. -nlemma eqinstrmode_to_eq29 : ∀i2.eq_instrmode MODE_IX1p_and_IMM1 i2 = true → MODE_IX1p_and_IMM1 = i2. +nlemma eqim_to_eq29 : ∀i2.eq_im MODE_IX1p_and_IMM1 i2 = true → MODE_IX1p_and_IMM1 = i2. #i2; ncases i2; nnormalize; ##[ ##29: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -322,7 +322,7 @@ nlemma eqinstrmode_to_eq29 : ∀i2.eq_instrmode MODE_IX1p_and_IMM1 i2 = true → ##] nqed. -nlemma eqinstrmode_to_eq30 : ∀i2.eq_instrmode MODE_SP1_and_IMM1 i2 = true → MODE_SP1_and_IMM1 = i2. +nlemma eqim_to_eq30 : ∀i2.eq_im MODE_SP1_and_IMM1 i2 = true → MODE_SP1_and_IMM1 = i2. #i2; ncases i2; nnormalize; ##[ ##30: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (bool_destruct … H) @@ -330,7 +330,7 @@ nlemma eqinstrmode_to_eq30 : ∀i2.eq_instrmode MODE_SP1_and_IMM1 i2 = true → ##] nqed. -nlemma eqinstrmode_to_eq31 : ∀n1,i2.eq_instrmode (MODE_DIRn n1) i2 = true → MODE_DIRn n1 = i2. +nlemma eqim_to_eq31 : ∀n1,i2.eq_im (MODE_DIRn n1) i2 = true → MODE_DIRn n1 = i2. #n1; #i2; ncases i2; ##[ ##31: #n2; #H; nchange in H:(%) with (eq_oct n1 n2 = true); @@ -341,7 +341,7 @@ nlemma eqinstrmode_to_eq31 : ∀n1,i2.eq_instrmode (MODE_DIRn n1) i2 = true → ##] nqed. -nlemma eqinstrmode_to_eq32 : ∀n1,i2.eq_instrmode (MODE_DIRn_and_IMM1 n1) i2 = true → MODE_DIRn_and_IMM1 n1 = i2. +nlemma eqim_to_eq32 : ∀n1,i2.eq_im (MODE_DIRn_and_IMM1 n1) i2 = true → MODE_DIRn_and_IMM1 n1 = i2. #n1; #i2; ncases i2; ##[ ##32: #n2; #H; nchange in H:(%) with (eq_oct n1 n2 = true); @@ -352,7 +352,7 @@ nlemma eqinstrmode_to_eq32 : ∀n1,i2.eq_instrmode (MODE_DIRn_and_IMM1 n1) i2 = ##] nqed. -nlemma eqinstrmode_to_eq33 : ∀n1,i2.eq_instrmode (MODE_TNY n1) i2 = true → MODE_TNY n1 = i2. +nlemma eqim_to_eq33 : ∀n1,i2.eq_im (MODE_TNY n1) i2 = true → MODE_TNY n1 = i2. #n1; #i2; ncases i2; ##[ ##33: #n2; #H; nchange in H:(%) with (eq_ex n1 n2 = true); @@ -363,40 +363,40 @@ nlemma eqinstrmode_to_eq33 : ∀n1,i2.eq_instrmode (MODE_TNY n1) i2 = true → M ##] nqed. -nlemma eqinstrmode_to_eq34 : ∀n1,i2.eq_instrmode (MODE_SRT n1) i2 = true → MODE_SRT n1 = i2. +nlemma eqim_to_eq34 : ∀n1,i2.eq_im (MODE_SRT n1) i2 = true → MODE_SRT n1 = i2. #n1; #i2; ncases i2; ##[ ##34: #n2; #H; - nchange in H:(%) with (eq_bitrig n1 n2 = true); - nrewrite > (eqbitrig_to_eq … H); + nchange in H:(%) with (eq_bit n1 n2 = true); + nrewrite > (eqbit_to_eq … H); napply refl_eq ##| ##31,32,33: nnormalize; #n2; #H; napply (bool_destruct … H) ##| ##*: nnormalize; #H; napply (bool_destruct … H) ##] nqed. -nlemma eqinstrmode_to_eq : ∀i1,i2.eq_instrmode i1 i2 = true → i1 = i2. +nlemma eqim_to_eq : ∀i1,i2.eq_im i1 i2 = true → i1 = i2. #i1; ncases i1; - ##[ ##1: napply eqinstrmode_to_eq1 ##| ##2: napply eqinstrmode_to_eq2 - ##| ##3: napply eqinstrmode_to_eq3 ##| ##4: napply eqinstrmode_to_eq4 - ##| ##5: napply eqinstrmode_to_eq5 ##| ##6: napply eqinstrmode_to_eq6 - ##| ##7: napply eqinstrmode_to_eq7 ##| ##8: napply eqinstrmode_to_eq8 - ##| ##9: napply eqinstrmode_to_eq9 ##| ##10: napply eqinstrmode_to_eq10 - ##| ##11: napply eqinstrmode_to_eq11 ##| ##12: napply eqinstrmode_to_eq12 - ##| ##13: napply eqinstrmode_to_eq13 ##| ##14: napply eqinstrmode_to_eq14 - ##| ##15: napply eqinstrmode_to_eq15 ##| ##16: napply eqinstrmode_to_eq16 - ##| ##17: napply eqinstrmode_to_eq17 ##| ##18: napply eqinstrmode_to_eq18 - ##| ##19: napply eqinstrmode_to_eq19 ##| ##20: napply eqinstrmode_to_eq20 - ##| ##21: napply eqinstrmode_to_eq21 ##| ##22: napply eqinstrmode_to_eq22 - ##| ##23: napply eqinstrmode_to_eq23 ##| ##24: napply eqinstrmode_to_eq24 - ##| ##25: napply eqinstrmode_to_eq25 ##| ##26: napply eqinstrmode_to_eq26 - ##| ##27: napply eqinstrmode_to_eq27 ##| ##28: napply eqinstrmode_to_eq28 - ##| ##29: napply eqinstrmode_to_eq29 ##| ##30: napply eqinstrmode_to_eq30 - ##| ##31: napply eqinstrmode_to_eq31 ##| ##32: napply eqinstrmode_to_eq32 - ##| ##33: napply eqinstrmode_to_eq33 ##| ##34: napply eqinstrmode_to_eq34 - ##] -nqed. - -nlemma eq_to_eqinstrmode1 : ∀i2.MODE_INH = i2 → eq_instrmode MODE_INH i2 = true. + ##[ ##1: napply eqim_to_eq1 ##| ##2: napply eqim_to_eq2 + ##| ##3: napply eqim_to_eq3 ##| ##4: napply eqim_to_eq4 + ##| ##5: napply eqim_to_eq5 ##| ##6: napply eqim_to_eq6 + ##| ##7: napply eqim_to_eq7 ##| ##8: napply eqim_to_eq8 + ##| ##9: napply eqim_to_eq9 ##| ##10: napply eqim_to_eq10 + ##| ##11: napply eqim_to_eq11 ##| ##12: napply eqim_to_eq12 + ##| ##13: napply eqim_to_eq13 ##| ##14: napply eqim_to_eq14 + ##| ##15: napply eqim_to_eq15 ##| ##16: napply eqim_to_eq16 + ##| ##17: napply eqim_to_eq17 ##| ##18: napply eqim_to_eq18 + ##| ##19: napply eqim_to_eq19 ##| ##20: napply eqim_to_eq20 + ##| ##21: napply eqim_to_eq21 ##| ##22: napply eqim_to_eq22 + ##| ##23: napply eqim_to_eq23 ##| ##24: napply eqim_to_eq24 + ##| ##25: napply eqim_to_eq25 ##| ##26: napply eqim_to_eq26 + ##| ##27: napply eqim_to_eq27 ##| ##28: napply eqim_to_eq28 + ##| ##29: napply eqim_to_eq29 ##| ##30: napply eqim_to_eq30 + ##| ##31: napply eqim_to_eq31 ##| ##32: napply eqim_to_eq32 + ##| ##33: napply eqim_to_eq33 ##| ##34: napply eqim_to_eq34 + ##] +nqed. + +nlemma eq_to_eqim1 : ∀i2.MODE_INH = i2 → eq_im MODE_INH i2 = true. #t2; ncases t2; nnormalize; ##[ ##1: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -404,7 +404,7 @@ nlemma eq_to_eqinstrmode1 : ∀i2.MODE_INH = i2 → eq_instrmode MODE_INH i2 = t ##] nqed. -nlemma eq_to_eqinstrmode2 : ∀i2.MODE_INHA = i2 → eq_instrmode MODE_INHA i2 = true. +nlemma eq_to_eqim2 : ∀i2.MODE_INHA = i2 → eq_im MODE_INHA i2 = true. #t2; ncases t2; nnormalize; ##[ ##2: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -412,7 +412,7 @@ nlemma eq_to_eqinstrmode2 : ∀i2.MODE_INHA = i2 → eq_instrmode MODE_INHA i2 = ##] nqed. -nlemma eq_to_eqinstrmode3 : ∀i2.MODE_INHX = i2 → eq_instrmode MODE_INHX i2 = true. +nlemma eq_to_eqim3 : ∀i2.MODE_INHX = i2 → eq_im MODE_INHX i2 = true. #t2; ncases t2; nnormalize; ##[ ##3: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -420,7 +420,7 @@ nlemma eq_to_eqinstrmode3 : ∀i2.MODE_INHX = i2 → eq_instrmode MODE_INHX i2 = ##] nqed. -nlemma eq_to_eqinstrmode4 : ∀i2.MODE_INHH = i2 → eq_instrmode MODE_INHH i2 = true. +nlemma eq_to_eqim4 : ∀i2.MODE_INHH = i2 → eq_im MODE_INHH i2 = true. #t2; ncases t2; nnormalize; ##[ ##4: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -428,7 +428,7 @@ nlemma eq_to_eqinstrmode4 : ∀i2.MODE_INHH = i2 → eq_instrmode MODE_INHH i2 = ##] nqed. -nlemma eq_to_eqinstrmode5 : ∀i2.MODE_INHX0ADD = i2 → eq_instrmode MODE_INHX0ADD i2 = true. +nlemma eq_to_eqim5 : ∀i2.MODE_INHX0ADD = i2 → eq_im MODE_INHX0ADD i2 = true. #t2; ncases t2; nnormalize; ##[ ##5: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -436,7 +436,7 @@ nlemma eq_to_eqinstrmode5 : ∀i2.MODE_INHX0ADD = i2 → eq_instrmode MODE_INHX0 ##] nqed. -nlemma eq_to_eqinstrmode6 : ∀i2.MODE_INHX1ADD = i2 → eq_instrmode MODE_INHX1ADD i2 = true. +nlemma eq_to_eqim6 : ∀i2.MODE_INHX1ADD = i2 → eq_im MODE_INHX1ADD i2 = true. #t2; ncases t2; nnormalize; ##[ ##6: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -444,7 +444,7 @@ nlemma eq_to_eqinstrmode6 : ∀i2.MODE_INHX1ADD = i2 → eq_instrmode MODE_INHX1 ##] nqed. -nlemma eq_to_eqinstrmode7 : ∀i2.MODE_INHX2ADD = i2 → eq_instrmode MODE_INHX2ADD i2 = true. +nlemma eq_to_eqim7 : ∀i2.MODE_INHX2ADD = i2 → eq_im MODE_INHX2ADD i2 = true. #t2; ncases t2; nnormalize; ##[ ##7: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -452,7 +452,7 @@ nlemma eq_to_eqinstrmode7 : ∀i2.MODE_INHX2ADD = i2 → eq_instrmode MODE_INHX2 ##] nqed. -nlemma eq_to_eqinstrmode8 : ∀i2.MODE_IMM1 = i2 → eq_instrmode MODE_IMM1 i2 = true. +nlemma eq_to_eqim8 : ∀i2.MODE_IMM1 = i2 → eq_im MODE_IMM1 i2 = true. #t2; ncases t2; nnormalize; ##[ ##8: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -460,7 +460,7 @@ nlemma eq_to_eqinstrmode8 : ∀i2.MODE_IMM1 = i2 → eq_instrmode MODE_IMM1 i2 = ##] nqed. -nlemma eq_to_eqinstrmode9 : ∀i2.MODE_IMM1EXT = i2 → eq_instrmode MODE_IMM1EXT i2 = true. +nlemma eq_to_eqim9 : ∀i2.MODE_IMM1EXT = i2 → eq_im MODE_IMM1EXT i2 = true. #t2; ncases t2; nnormalize; ##[ ##9: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -468,7 +468,7 @@ nlemma eq_to_eqinstrmode9 : ∀i2.MODE_IMM1EXT = i2 → eq_instrmode MODE_IMM1EX ##] nqed. -nlemma eq_to_eqinstrmode10 : ∀i2.MODE_IMM2 = i2 → eq_instrmode MODE_IMM2 i2 = true. +nlemma eq_to_eqim10 : ∀i2.MODE_IMM2 = i2 → eq_im MODE_IMM2 i2 = true. #t2; ncases t2; nnormalize; ##[ ##10: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -476,7 +476,7 @@ nlemma eq_to_eqinstrmode10 : ∀i2.MODE_IMM2 = i2 → eq_instrmode MODE_IMM2 i2 ##] nqed. -nlemma eq_to_eqinstrmode11 : ∀i2.MODE_DIR1 = i2 → eq_instrmode MODE_DIR1 i2 = true. +nlemma eq_to_eqim11 : ∀i2.MODE_DIR1 = i2 → eq_im MODE_DIR1 i2 = true. #t2; ncases t2; nnormalize; ##[ ##11: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -484,7 +484,7 @@ nlemma eq_to_eqinstrmode11 : ∀i2.MODE_DIR1 = i2 → eq_instrmode MODE_DIR1 i2 ##] nqed. -nlemma eq_to_eqinstrmode12 : ∀i2.MODE_DIR2 = i2 → eq_instrmode MODE_DIR2 i2 = true. +nlemma eq_to_eqim12 : ∀i2.MODE_DIR2 = i2 → eq_im MODE_DIR2 i2 = true. #t2; ncases t2; nnormalize; ##[ ##12: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -492,7 +492,7 @@ nlemma eq_to_eqinstrmode12 : ∀i2.MODE_DIR2 = i2 → eq_instrmode MODE_DIR2 i2 ##] nqed. -nlemma eq_to_eqinstrmode13 : ∀i2.MODE_IX0 = i2 → eq_instrmode MODE_IX0 i2 = true. +nlemma eq_to_eqim13 : ∀i2.MODE_IX0 = i2 → eq_im MODE_IX0 i2 = true. #t2; ncases t2; nnormalize; ##[ ##13: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -500,7 +500,7 @@ nlemma eq_to_eqinstrmode13 : ∀i2.MODE_IX0 = i2 → eq_instrmode MODE_IX0 i2 = ##] nqed. -nlemma eq_to_eqinstrmode14 : ∀i2.MODE_IX1 = i2 → eq_instrmode MODE_IX1 i2 = true. +nlemma eq_to_eqim14 : ∀i2.MODE_IX1 = i2 → eq_im MODE_IX1 i2 = true. #t2; ncases t2; nnormalize; ##[ ##14: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -508,7 +508,7 @@ nlemma eq_to_eqinstrmode14 : ∀i2.MODE_IX1 = i2 → eq_instrmode MODE_IX1 i2 = ##] nqed. -nlemma eq_to_eqinstrmode15 : ∀i2.MODE_IX2 = i2 → eq_instrmode MODE_IX2 i2 = true. +nlemma eq_to_eqim15 : ∀i2.MODE_IX2 = i2 → eq_im MODE_IX2 i2 = true. #t2; ncases t2; nnormalize; ##[ ##15: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -516,7 +516,7 @@ nlemma eq_to_eqinstrmode15 : ∀i2.MODE_IX2 = i2 → eq_instrmode MODE_IX2 i2 = ##] nqed. -nlemma eq_to_eqinstrmode16 : ∀i2.MODE_SP1 = i2 → eq_instrmode MODE_SP1 i2 = true. +nlemma eq_to_eqim16 : ∀i2.MODE_SP1 = i2 → eq_im MODE_SP1 i2 = true. #t2; ncases t2; nnormalize; ##[ ##16: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -524,7 +524,7 @@ nlemma eq_to_eqinstrmode16 : ∀i2.MODE_SP1 = i2 → eq_instrmode MODE_SP1 i2 = ##] nqed. -nlemma eq_to_eqinstrmode17 : ∀i2.MODE_SP2 = i2 → eq_instrmode MODE_SP2 i2 = true. +nlemma eq_to_eqim17 : ∀i2.MODE_SP2 = i2 → eq_im MODE_SP2 i2 = true. #t2; ncases t2; nnormalize; ##[ ##17: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -532,7 +532,7 @@ nlemma eq_to_eqinstrmode17 : ∀i2.MODE_SP2 = i2 → eq_instrmode MODE_SP2 i2 = ##] nqed. -nlemma eq_to_eqinstrmode18 : ∀i2.MODE_DIR1_to_DIR1 = i2 → eq_instrmode MODE_DIR1_to_DIR1 i2 = true. +nlemma eq_to_eqim18 : ∀i2.MODE_DIR1_to_DIR1 = i2 → eq_im MODE_DIR1_to_DIR1 i2 = true. #t2; ncases t2; nnormalize; ##[ ##18: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -540,7 +540,7 @@ nlemma eq_to_eqinstrmode18 : ∀i2.MODE_DIR1_to_DIR1 = i2 → eq_instrmode MODE_ ##] nqed. -nlemma eq_to_eqinstrmode19 : ∀i2.MODE_IMM1_to_DIR1 = i2 → eq_instrmode MODE_IMM1_to_DIR1 i2 = true. +nlemma eq_to_eqim19 : ∀i2.MODE_IMM1_to_DIR1 = i2 → eq_im MODE_IMM1_to_DIR1 i2 = true. #t2; ncases t2; nnormalize; ##[ ##19: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -548,7 +548,7 @@ nlemma eq_to_eqinstrmode19 : ∀i2.MODE_IMM1_to_DIR1 = i2 → eq_instrmode MODE_ ##] nqed. -nlemma eq_to_eqinstrmode20 : ∀i2.MODE_IX0p_to_DIR1 = i2 → eq_instrmode MODE_IX0p_to_DIR1 i2 = true. +nlemma eq_to_eqim20 : ∀i2.MODE_IX0p_to_DIR1 = i2 → eq_im MODE_IX0p_to_DIR1 i2 = true. #t2; ncases t2; nnormalize; ##[ ##20: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -556,7 +556,7 @@ nlemma eq_to_eqinstrmode20 : ∀i2.MODE_IX0p_to_DIR1 = i2 → eq_instrmode MODE_ ##] nqed. -nlemma eq_to_eqinstrmode21 : ∀i2.MODE_DIR1_to_IX0p = i2 → eq_instrmode MODE_DIR1_to_IX0p i2 = true. +nlemma eq_to_eqim21 : ∀i2.MODE_DIR1_to_IX0p = i2 → eq_im MODE_DIR1_to_IX0p i2 = true. #t2; ncases t2; nnormalize; ##[ ##21: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -564,7 +564,7 @@ nlemma eq_to_eqinstrmode21 : ∀i2.MODE_DIR1_to_IX0p = i2 → eq_instrmode MODE_ ##] nqed. -nlemma eq_to_eqinstrmode22 : ∀i2.MODE_INHA_and_IMM1 = i2 → eq_instrmode MODE_INHA_and_IMM1 i2 = true. +nlemma eq_to_eqim22 : ∀i2.MODE_INHA_and_IMM1 = i2 → eq_im MODE_INHA_and_IMM1 i2 = true. #t2; ncases t2; nnormalize; ##[ ##22: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -572,7 +572,7 @@ nlemma eq_to_eqinstrmode22 : ∀i2.MODE_INHA_and_IMM1 = i2 → eq_instrmode MODE ##] nqed. -nlemma eq_to_eqinstrmode23 : ∀i2.MODE_INHX_and_IMM1 = i2 → eq_instrmode MODE_INHX_and_IMM1 i2 = true. +nlemma eq_to_eqim23 : ∀i2.MODE_INHX_and_IMM1 = i2 → eq_im MODE_INHX_and_IMM1 i2 = true. #t2; ncases t2; nnormalize; ##[ ##23: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -580,7 +580,7 @@ nlemma eq_to_eqinstrmode23 : ∀i2.MODE_INHX_and_IMM1 = i2 → eq_instrmode MODE ##] nqed. -nlemma eq_to_eqinstrmode24 : ∀i2.MODE_IMM1_and_IMM1 = i2 → eq_instrmode MODE_IMM1_and_IMM1 i2 = true. +nlemma eq_to_eqim24 : ∀i2.MODE_IMM1_and_IMM1 = i2 → eq_im MODE_IMM1_and_IMM1 i2 = true. #t2; ncases t2; nnormalize; ##[ ##24: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -588,7 +588,7 @@ nlemma eq_to_eqinstrmode24 : ∀i2.MODE_IMM1_and_IMM1 = i2 → eq_instrmode MODE ##] nqed. -nlemma eq_to_eqinstrmode25 : ∀i2.MODE_DIR1_and_IMM1 = i2 → eq_instrmode MODE_DIR1_and_IMM1 i2 = true. +nlemma eq_to_eqim25 : ∀i2.MODE_DIR1_and_IMM1 = i2 → eq_im MODE_DIR1_and_IMM1 i2 = true. #t2; ncases t2; nnormalize; ##[ ##25: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -596,7 +596,7 @@ nlemma eq_to_eqinstrmode25 : ∀i2.MODE_DIR1_and_IMM1 = i2 → eq_instrmode MODE ##] nqed. -nlemma eq_to_eqinstrmode26 : ∀i2.MODE_IX0_and_IMM1 = i2 → eq_instrmode MODE_IX0_and_IMM1 i2 = true. +nlemma eq_to_eqim26 : ∀i2.MODE_IX0_and_IMM1 = i2 → eq_im MODE_IX0_and_IMM1 i2 = true. #t2; ncases t2; nnormalize; ##[ ##26: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -604,7 +604,7 @@ nlemma eq_to_eqinstrmode26 : ∀i2.MODE_IX0_and_IMM1 = i2 → eq_instrmode MODE_ ##] nqed. -nlemma eq_to_eqinstrmode27 : ∀i2.MODE_IX0p_and_IMM1 = i2 → eq_instrmode MODE_IX0p_and_IMM1 i2 = true. +nlemma eq_to_eqim27 : ∀i2.MODE_IX0p_and_IMM1 = i2 → eq_im MODE_IX0p_and_IMM1 i2 = true. #t2; ncases t2; nnormalize; ##[ ##27: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -612,7 +612,7 @@ nlemma eq_to_eqinstrmode27 : ∀i2.MODE_IX0p_and_IMM1 = i2 → eq_instrmode MODE ##] nqed. -nlemma eq_to_eqinstrmode28 : ∀i2.MODE_IX1_and_IMM1 = i2 → eq_instrmode MODE_IX1_and_IMM1 i2 = true. +nlemma eq_to_eqim28 : ∀i2.MODE_IX1_and_IMM1 = i2 → eq_im MODE_IX1_and_IMM1 i2 = true. #t2; ncases t2; nnormalize; ##[ ##28: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -620,7 +620,7 @@ nlemma eq_to_eqinstrmode28 : ∀i2.MODE_IX1_and_IMM1 = i2 → eq_instrmode MODE_ ##] nqed. -nlemma eq_to_eqinstrmode29 : ∀i2.MODE_IX1p_and_IMM1 = i2 → eq_instrmode MODE_IX1p_and_IMM1 i2 = true. +nlemma eq_to_eqim29 : ∀i2.MODE_IX1p_and_IMM1 = i2 → eq_im MODE_IX1p_and_IMM1 i2 = true. #t2; ncases t2; nnormalize; ##[ ##29: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -628,7 +628,7 @@ nlemma eq_to_eqinstrmode29 : ∀i2.MODE_IX1p_and_IMM1 = i2 → eq_instrmode MODE ##] nqed. -nlemma eq_to_eqinstrmode30 : ∀i2.MODE_SP1_and_IMM1 = i2 → eq_instrmode MODE_SP1_and_IMM1 i2 = true. +nlemma eq_to_eqim30 : ∀i2.MODE_SP1_and_IMM1 = i2 → eq_im MODE_SP1_and_IMM1 i2 = true. #t2; ncases t2; nnormalize; ##[ ##30: #H; napply refl_eq ##| ##31,32,33,34: #n; #H; napply (instr_mode_destruct … H) @@ -636,7 +636,7 @@ nlemma eq_to_eqinstrmode30 : ∀i2.MODE_SP1_and_IMM1 = i2 → eq_instrmode MODE_ ##] nqed. -nlemma eq_to_eqinstrmode31 : ∀n1,i2.MODE_DIRn n1 = i2 → eq_instrmode (MODE_DIRn n1) i2 = true. +nlemma eq_to_eqim31 : ∀n1,i2.MODE_DIRn n1 = i2 → eq_im (MODE_DIRn n1) i2 = true. #n1; #t2; ncases t2; ##[ ##31: #n2; #H; nchange with (eq_oct n1 n2 = true); @@ -648,7 +648,7 @@ nlemma eq_to_eqinstrmode31 : ∀n1,i2.MODE_DIRn n1 = i2 → eq_instrmode (MODE_D ##] nqed. -nlemma eq_to_eqinstrmode32 : ∀n1,i2.MODE_DIRn_and_IMM1 n1 = i2 → eq_instrmode (MODE_DIRn_and_IMM1 n1) i2 = true. +nlemma eq_to_eqim32 : ∀n1,i2.MODE_DIRn_and_IMM1 n1 = i2 → eq_im (MODE_DIRn_and_IMM1 n1) i2 = true. #n1; #t2; ncases t2; ##[ ##32: #n2; #H; nchange with (eq_oct n1 n2 = true); @@ -660,7 +660,7 @@ nlemma eq_to_eqinstrmode32 : ∀n1,i2.MODE_DIRn_and_IMM1 n1 = i2 → eq_instrmod ##] nqed. -nlemma eq_to_eqinstrmode33 : ∀n1,i2.MODE_TNY n1 = i2 → eq_instrmode (MODE_TNY n1) i2 = true. +nlemma eq_to_eqim33 : ∀n1,i2.MODE_TNY n1 = i2 → eq_im (MODE_TNY n1) i2 = true. #n1; #t2; ncases t2; ##[ ##33: #n2; #H; nchange with (eq_ex n1 n2 = true); @@ -672,36 +672,36 @@ nlemma eq_to_eqinstrmode33 : ∀n1,i2.MODE_TNY n1 = i2 → eq_instrmode (MODE_TN ##] nqed. -nlemma eq_to_eqinstrmode34 : ∀n1,i2.MODE_SRT n1 = i2 → eq_instrmode (MODE_SRT n1) i2 = true. +nlemma eq_to_eqim34 : ∀n1,i2.MODE_SRT n1 = i2 → eq_im (MODE_SRT n1) i2 = true. #n1; #t2; ncases t2; ##[ ##34: #n2; #H; - nchange with (eq_bitrig n1 n2 = true); + nchange with (eq_bit n1 n2 = true); nrewrite > (instr_mode_destruct_MODE_SRT … H); - nrewrite > (eq_to_eqbitrig n2 n2 (refl_eq …)); + nrewrite > (eq_to_eqbit n2 n2 (refl_eq …)); napply refl_eq ##| ##31,32,33: #n; #H; nnormalize; napply (instr_mode_destruct … H) ##| ##*: #H; nnormalize; napply (instr_mode_destruct … H) ##] nqed. -nlemma eq_to_eqinstrmode : ∀i1,i2.i1 = i2 → eq_instrmode i1 i2 = true. +nlemma eq_to_eqim : ∀i1,i2.i1 = i2 → eq_im i1 i2 = true. #i1; ncases i1; - ##[ ##1: napply eq_to_eqinstrmode1 ##| ##2: napply eq_to_eqinstrmode2 - ##| ##3: napply eq_to_eqinstrmode3 ##| ##4: napply eq_to_eqinstrmode4 - ##| ##5: napply eq_to_eqinstrmode5 ##| ##6: napply eq_to_eqinstrmode6 - ##| ##7: napply eq_to_eqinstrmode7 ##| ##8: napply eq_to_eqinstrmode8 - ##| ##9: napply eq_to_eqinstrmode9 ##| ##10: napply eq_to_eqinstrmode10 - ##| ##11: napply eq_to_eqinstrmode11 ##| ##12: napply eq_to_eqinstrmode12 - ##| ##13: napply eq_to_eqinstrmode13 ##| ##14: napply eq_to_eqinstrmode14 - ##| ##15: napply eq_to_eqinstrmode15 ##| ##16: napply eq_to_eqinstrmode16 - ##| ##17: napply eq_to_eqinstrmode17 ##| ##18: napply eq_to_eqinstrmode18 - ##| ##19: napply eq_to_eqinstrmode19 ##| ##20: napply eq_to_eqinstrmode20 - ##| ##21: napply eq_to_eqinstrmode21 ##| ##22: napply eq_to_eqinstrmode22 - ##| ##23: napply eq_to_eqinstrmode23 ##| ##24: napply eq_to_eqinstrmode24 - ##| ##25: napply eq_to_eqinstrmode25 ##| ##26: napply eq_to_eqinstrmode26 - ##| ##27: napply eq_to_eqinstrmode27 ##| ##28: napply eq_to_eqinstrmode28 - ##| ##29: napply eq_to_eqinstrmode29 ##| ##30: napply eq_to_eqinstrmode30 - ##| ##31: napply eq_to_eqinstrmode31 ##| ##32: napply eq_to_eqinstrmode32 - ##| ##33: napply eq_to_eqinstrmode33 ##| ##34: napply eq_to_eqinstrmode34 + ##[ ##1: napply eq_to_eqim1 ##| ##2: napply eq_to_eqim2 + ##| ##3: napply eq_to_eqim3 ##| ##4: napply eq_to_eqim4 + ##| ##5: napply eq_to_eqim5 ##| ##6: napply eq_to_eqim6 + ##| ##7: napply eq_to_eqim7 ##| ##8: napply eq_to_eqim8 + ##| ##9: napply eq_to_eqim9 ##| ##10: napply eq_to_eqim10 + ##| ##11: napply eq_to_eqim11 ##| ##12: napply eq_to_eqim12 + ##| ##13: napply eq_to_eqim13 ##| ##14: napply eq_to_eqim14 + ##| ##15: napply eq_to_eqim15 ##| ##16: napply eq_to_eqim16 + ##| ##17: napply eq_to_eqim17 ##| ##18: napply eq_to_eqim18 + ##| ##19: napply eq_to_eqim19 ##| ##20: napply eq_to_eqim20 + ##| ##21: napply eq_to_eqim21 ##| ##22: napply eq_to_eqim22 + ##| ##23: napply eq_to_eqim23 ##| ##24: napply eq_to_eqim24 + ##| ##25: napply eq_to_eqim25 ##| ##26: napply eq_to_eqim26 + ##| ##27: napply eq_to_eqim27 ##| ##28: napply eq_to_eqim28 + ##| ##29: napply eq_to_eqim29 ##| ##30: napply eq_to_eqim30 + ##| ##31: napply eq_to_eqim31 ##| ##32: napply eq_to_eqim32 + ##| ##33: napply eq_to_eqim33 ##| ##34: napply eq_to_eqim34 ##] nqed. diff --git a/helm/software/matita/contribs/ng_assembly/freescale/opcode_base_lemmas_opcode1.ma b/helm/software/matita/contribs/ng_assembly/freescale/opcode_base_lemmas_opcode1.ma index f0954a11c..041874b6f 100755 --- a/helm/software/matita/contribs/ng_assembly/freescale/opcode_base_lemmas_opcode1.ma +++ b/helm/software/matita/contribs/ng_assembly/freescale/opcode_base_lemmas_opcode1.ma @@ -30,7 +30,7 @@ include "freescale/opcode_base.ma". ndefinition opcode_destruct1 : Πop2.ΠP:Prop.ADC = op2 → match op2 with [ ADC ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##1: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match ADC with [ ADC ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -39,7 +39,7 @@ nqed. ndefinition opcode_destruct2 : Πop2.ΠP:Prop.ADD = op2 → match op2 with [ ADD ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##2: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match ADD with [ ADD ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -48,7 +48,7 @@ nqed. ndefinition opcode_destruct3 : Πop2.ΠP:Prop.AIS = op2 → match op2 with [ AIS ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##3: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match AIS with [ AIS ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -57,7 +57,7 @@ nqed. ndefinition opcode_destruct4 : Πop2.ΠP:Prop.AIX = op2 → match op2 with [ AIX ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##4: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match AIX with [ AIX ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -66,7 +66,7 @@ nqed. ndefinition opcode_destruct5 : Πop2.ΠP:Prop.AND = op2 → match op2 with [ AND ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##5: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match AND with [ AND ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -75,7 +75,7 @@ nqed. ndefinition opcode_destruct6 : Πop2.ΠP:Prop.ASL = op2 → match op2 with [ ASL ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##6: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match ASL with [ ASL ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -84,7 +84,7 @@ nqed. ndefinition opcode_destruct7 : Πop2.ΠP:Prop.ASR = op2 → match op2 with [ ASR ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##7: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match ASR with [ ASR ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -93,7 +93,7 @@ nqed. ndefinition opcode_destruct8 : Πop2.ΠP:Prop.BCC = op2 → match op2 with [ BCC ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##8: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BCC with [ BCC ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -102,7 +102,7 @@ nqed. ndefinition opcode_destruct9 : Πop2.ΠP:Prop.BCLRn = op2 → match op2 with [ BCLRn ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##9: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BCLRn with [ BCLRn ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -111,7 +111,7 @@ nqed. ndefinition opcode_destruct10 : Πop2.ΠP:Prop.BCS = op2 → match op2 with [ BCS ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##10: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BCS with [ BCS ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -120,7 +120,7 @@ nqed. ndefinition opcode_destruct11 : Πop2.ΠP:Prop.BEQ = op2 → match op2 with [ BEQ ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##11: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BEQ with [ BEQ ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -129,7 +129,7 @@ nqed. ndefinition opcode_destruct12 : Πop2.ΠP:Prop.BGE = op2 → match op2 with [ BGE ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##12: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BGE with [ BGE ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -138,7 +138,7 @@ nqed. ndefinition opcode_destruct13 : Πop2.ΠP:Prop.BGND = op2 → match op2 with [ BGND ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##13: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BGND with [ BGND ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -147,7 +147,7 @@ nqed. ndefinition opcode_destruct14 : Πop2.ΠP:Prop.BGT = op2 → match op2 with [ BGT ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##14: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BGT with [ BGT ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -156,7 +156,7 @@ nqed. ndefinition opcode_destruct15 : Πop2.ΠP:Prop.BHCC = op2 → match op2 with [ BHCC ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##15: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BHCC with [ BHCC ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -165,7 +165,7 @@ nqed. ndefinition opcode_destruct16 : Πop2.ΠP:Prop.BHCS = op2 → match op2 with [ BHCS ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##16: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BHCS with [ BHCS ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -174,7 +174,7 @@ nqed. ndefinition opcode_destruct17 : Πop2.ΠP:Prop.BHI = op2 → match op2 with [ BHI ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##17: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BHI with [ BHI ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -183,7 +183,7 @@ nqed. ndefinition opcode_destruct18 : Πop2.ΠP:Prop.BIH = op2 → match op2 with [ BIH ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##18: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BIH with [ BIH ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -192,7 +192,7 @@ nqed. ndefinition opcode_destruct19 : Πop2.ΠP:Prop.BIL = op2 → match op2 with [ BIL ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##19: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BIL with [ BIL ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -201,7 +201,7 @@ nqed. ndefinition opcode_destruct20 : Πop2.ΠP:Prop.BIT = op2 → match op2 with [ BIT ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##20: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BIT with [ BIT ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -210,7 +210,7 @@ nqed. ndefinition opcode_destruct21 : Πop2.ΠP:Prop.BLE = op2 → match op2 with [ BLE ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##21: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BLE with [ BLE ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -219,7 +219,7 @@ nqed. ndefinition opcode_destruct22 : Πop2.ΠP:Prop.BLS = op2 → match op2 with [ BLS ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##22: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BLS with [ BLS ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -228,7 +228,7 @@ nqed. ndefinition opcode_destruct23 : Πop2.ΠP:Prop.BLT = op2 → match op2 with [ BLT ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##23: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BLT with [ BLT ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -237,7 +237,7 @@ nqed. ndefinition opcode_destruct24 : Πop2.ΠP:Prop.BMC = op2 → match op2 with [ BMC ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##24: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BMC with [ BMC ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -246,7 +246,7 @@ nqed. ndefinition opcode_destruct25 : Πop2.ΠP:Prop.BMI = op2 → match op2 with [ BMI ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##25: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BMI with [ BMI ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -255,7 +255,7 @@ nqed. ndefinition opcode_destruct26 : Πop2.ΠP:Prop.BMS = op2 → match op2 with [ BMS ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##26: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BMS with [ BMS ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -264,7 +264,7 @@ nqed. ndefinition opcode_destruct27 : Πop2.ΠP:Prop.BNE = op2 → match op2 with [ BNE ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##27: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BNE with [ BNE ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -273,7 +273,7 @@ nqed. ndefinition opcode_destruct28 : Πop2.ΠP:Prop.BPL = op2 → match op2 with [ BPL ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##28: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BPL with [ BPL ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -282,7 +282,7 @@ nqed. ndefinition opcode_destruct29 : Πop2.ΠP:Prop.BRA = op2 → match op2 with [ BRA ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##29: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BRA with [ BRA ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -291,7 +291,7 @@ nqed. ndefinition opcode_destruct30 : Πop2.ΠP:Prop.BRCLRn = op2 → match op2 with [ BRCLRn ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##30: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BRCLRn with [ BRCLRn ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -300,7 +300,7 @@ nqed. ndefinition opcode_destruct31 : Πop2.ΠP:Prop.BRN = op2 → match op2 with [ BRN ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##31: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BRN with [ BRN ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -309,7 +309,7 @@ nqed. ndefinition opcode_destruct32 : Πop2.ΠP:Prop.BRSETn = op2 → match op2 with [ BRSETn ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##32: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BRSETn with [ BRSETn ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -318,7 +318,7 @@ nqed. ndefinition opcode_destruct33 : Πop2.ΠP:Prop.BSETn = op2 → match op2 with [ BSETn ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##33: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BSETn with [ BSETn ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -327,7 +327,7 @@ nqed. ndefinition opcode_destruct34 : Πop2.ΠP:Prop.BSR = op2 → match op2 with [ BSR ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##34: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match BSR with [ BSR ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -336,7 +336,7 @@ nqed. ndefinition opcode_destruct35 : Πop2.ΠP:Prop.CBEQA = op2 → match op2 with [ CBEQA ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##35: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match CBEQA with [ CBEQA ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -345,7 +345,7 @@ nqed. ndefinition opcode_destruct36 : Πop2.ΠP:Prop.CBEQX = op2 → match op2 with [ CBEQX ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##36: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match CBEQX with [ CBEQX ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -354,7 +354,7 @@ nqed. ndefinition opcode_destruct37 : Πop2.ΠP:Prop.CLC = op2 → match op2 with [ CLC ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##37: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match CLC with [ CLC ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -363,7 +363,7 @@ nqed. ndefinition opcode_destruct38 : Πop2.ΠP:Prop.CLI = op2 → match op2 with [ CLI ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##38: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match CLI with [ CLI ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -372,7 +372,7 @@ nqed. ndefinition opcode_destruct39 : Πop2.ΠP:Prop.CLR = op2 → match op2 with [ CLR ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##39: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match CLR with [ CLR ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -381,7 +381,7 @@ nqed. ndefinition opcode_destruct40 : Πop2.ΠP:Prop.CMP = op2 → match op2 with [ CMP ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##40: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match CMP with [ CMP ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -390,7 +390,7 @@ nqed. ndefinition opcode_destruct41 : Πop2.ΠP:Prop.COM = op2 → match op2 with [ COM ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##41: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match COM with [ COM ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -399,7 +399,7 @@ nqed. ndefinition opcode_destruct42 : Πop2.ΠP:Prop.CPHX = op2 → match op2 with [ CPHX ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##42: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match CPHX with [ CPHX ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -408,7 +408,7 @@ nqed. ndefinition opcode_destruct43 : Πop2.ΠP:Prop.CPX = op2 → match op2 with [ CPX ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##43: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match CPX with [ CPX ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -417,7 +417,7 @@ nqed. ndefinition opcode_destruct44 : Πop2.ΠP:Prop.DAA = op2 → match op2 with [ DAA ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##44: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match DAA with [ DAA ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -426,7 +426,7 @@ nqed. ndefinition opcode_destruct45 : Πop2.ΠP:Prop.DBNZ = op2 → match op2 with [ DBNZ ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##45: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match DBNZ with [ DBNZ ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -435,7 +435,7 @@ nqed. ndefinition opcode_destruct46 : Πop2.ΠP:Prop.DEC = op2 → match op2 with [ DEC ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##46: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match DEC with [ DEC ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -444,7 +444,7 @@ nqed. ndefinition opcode_destruct47 : Πop2.ΠP:Prop.DIV = op2 → match op2 with [ DIV ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##47: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match DIV with [ DIV ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -453,7 +453,7 @@ nqed. ndefinition opcode_destruct48 : Πop2.ΠP:Prop.EOR = op2 → match op2 with [ EOR ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##48: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match EOR with [ EOR ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -462,7 +462,7 @@ nqed. ndefinition opcode_destruct49 : Πop2.ΠP:Prop.INC = op2 → match op2 with [ INC ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##49: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match INC with [ INC ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -471,7 +471,7 @@ nqed. ndefinition opcode_destruct50 : Πop2.ΠP:Prop.JMP = op2 → match op2 with [ JMP ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##50: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match JMP with [ JMP ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -480,7 +480,7 @@ nqed. ndefinition opcode_destruct51 : Πop2.ΠP:Prop.JSR = op2 → match op2 with [ JSR ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##51: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match JSR with [ JSR ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -489,7 +489,7 @@ nqed. ndefinition opcode_destruct52 : Πop2.ΠP:Prop.LDA = op2 → match op2 with [ LDA ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##52: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match LDA with [ LDA ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -498,7 +498,7 @@ nqed. ndefinition opcode_destruct53 : Πop2.ΠP:Prop.LDHX = op2 → match op2 with [ LDHX ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##53: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match LDHX with [ LDHX ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -507,7 +507,7 @@ nqed. ndefinition opcode_destruct54 : Πop2.ΠP:Prop.LDX = op2 → match op2 with [ LDX ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##54: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match LDX with [ LDX ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -516,7 +516,7 @@ nqed. ndefinition opcode_destruct55 : Πop2.ΠP:Prop.LSR = op2 → match op2 with [ LSR ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##55: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match LSR with [ LSR ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -525,7 +525,7 @@ nqed. ndefinition opcode_destruct56 : Πop2.ΠP:Prop.MOV = op2 → match op2 with [ MOV ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##56: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match MOV with [ MOV ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -534,7 +534,7 @@ nqed. ndefinition opcode_destruct57 : Πop2.ΠP:Prop.MUL = op2 → match op2 with [ MUL ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##57: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match MUL with [ MUL ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -543,7 +543,7 @@ nqed. ndefinition opcode_destruct58 : Πop2.ΠP:Prop.NEG = op2 → match op2 with [ NEG ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##58: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match NEG with [ NEG ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -552,7 +552,7 @@ nqed. ndefinition opcode_destruct59 : Πop2.ΠP:Prop.NOP = op2 → match op2 with [ NOP ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##59: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match NOP with [ NOP ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -561,7 +561,7 @@ nqed. ndefinition opcode_destruct60 : Πop2.ΠP:Prop.NSA = op2 → match op2 with [ NSA ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##60: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match NSA with [ NSA ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -570,7 +570,7 @@ nqed. ndefinition opcode_destruct61 : Πop2.ΠP:Prop.ORA = op2 → match op2 with [ ORA ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##61: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match ORA with [ ORA ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -579,7 +579,7 @@ nqed. ndefinition opcode_destruct62 : Πop2.ΠP:Prop.PSHA = op2 → match op2 with [ PSHA ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##62: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match PSHA with [ PSHA ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -588,7 +588,7 @@ nqed. ndefinition opcode_destruct63 : Πop2.ΠP:Prop.PSHH = op2 → match op2 with [ PSHH ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##63: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match PSHH with [ PSHH ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -597,7 +597,7 @@ nqed. ndefinition opcode_destruct64 : Πop2.ΠP:Prop.PSHX = op2 → match op2 with [ PSHX ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##64: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match PSHX with [ PSHX ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -606,7 +606,7 @@ nqed. ndefinition opcode_destruct65 : Πop2.ΠP:Prop.PULA = op2 → match op2 with [ PULA ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##65: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match PULA with [ PULA ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -615,7 +615,7 @@ nqed. ndefinition opcode_destruct66 : Πop2.ΠP:Prop.PULH = op2 → match op2 with [ PULH ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##66: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match PULH with [ PULH ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -624,7 +624,7 @@ nqed. ndefinition opcode_destruct67 : Πop2.ΠP:Prop.PULX = op2 → match op2 with [ PULX ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##67: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match PULX with [ PULX ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -633,7 +633,7 @@ nqed. ndefinition opcode_destruct68 : Πop2.ΠP:Prop.ROL = op2 → match op2 with [ ROL ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##68: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match ROL with [ ROL ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -642,7 +642,7 @@ nqed. ndefinition opcode_destruct69 : Πop2.ΠP:Prop.ROR = op2 → match op2 with [ ROR ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##69: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match ROR with [ ROR ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -651,7 +651,7 @@ nqed. ndefinition opcode_destruct70 : Πop2.ΠP:Prop.RSP = op2 → match op2 with [ RSP ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##70: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match RSP with [ RSP ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -660,7 +660,7 @@ nqed. ndefinition opcode_destruct71 : Πop2.ΠP:Prop.RTI = op2 → match op2 with [ RTI ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##71: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match RTI with [ RTI ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -669,7 +669,7 @@ nqed. ndefinition opcode_destruct72 : Πop2.ΠP:Prop.RTS = op2 → match op2 with [ RTS ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##72: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match RTS with [ RTS ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -678,7 +678,7 @@ nqed. ndefinition opcode_destruct73 : Πop2.ΠP:Prop.SBC = op2 → match op2 with [ SBC ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##73: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match SBC with [ SBC ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -687,7 +687,7 @@ nqed. ndefinition opcode_destruct74 : Πop2.ΠP:Prop.SEC = op2 → match op2 with [ SEC ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##74: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match SEC with [ SEC ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -696,7 +696,7 @@ nqed. ndefinition opcode_destruct75 : Πop2.ΠP:Prop.SEI = op2 → match op2 with [ SEI ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##75: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match SEI with [ SEI ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -705,7 +705,7 @@ nqed. ndefinition opcode_destruct76 : Πop2.ΠP:Prop.SHA = op2 → match op2 with [ SHA ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##76: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match SHA with [ SHA ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -714,7 +714,7 @@ nqed. ndefinition opcode_destruct77 : Πop2.ΠP:Prop.SLA = op2 → match op2 with [ SLA ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##77: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match SLA with [ SLA ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -723,7 +723,7 @@ nqed. ndefinition opcode_destruct78 : Πop2.ΠP:Prop.STA = op2 → match op2 with [ STA ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##78: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match STA with [ STA ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -732,7 +732,7 @@ nqed. ndefinition opcode_destruct79 : Πop2.ΠP:Prop.STHX = op2 → match op2 with [ STHX ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##79: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match STHX with [ STHX ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -741,7 +741,7 @@ nqed. ndefinition opcode_destruct80 : Πop2.ΠP:Prop.STOP = op2 → match op2 with [ STOP ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##80: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match STOP with [ STOP ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -750,7 +750,7 @@ nqed. ndefinition opcode_destruct81 : Πop2.ΠP:Prop.STX = op2 → match op2 with [ STX ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##81: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match STX with [ STX ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -759,7 +759,7 @@ nqed. ndefinition opcode_destruct82 : Πop2.ΠP:Prop.SUB = op2 → match op2 with [ SUB ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##82: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match SUB with [ SUB ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -768,7 +768,7 @@ nqed. ndefinition opcode_destruct83 : Πop2.ΠP:Prop.SWI = op2 → match op2 with [ SWI ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##83: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match SWI with [ SWI ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -777,7 +777,7 @@ nqed. ndefinition opcode_destruct84 : Πop2.ΠP:Prop.TAP = op2 → match op2 with [ TAP ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##84: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match TAP with [ TAP ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -786,7 +786,7 @@ nqed. ndefinition opcode_destruct85 : Πop2.ΠP:Prop.TAX = op2 → match op2 with [ TAX ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##85: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match TAX with [ TAX ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -795,7 +795,7 @@ nqed. ndefinition opcode_destruct86 : Πop2.ΠP:Prop.TPA = op2 → match op2 with [ TPA ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##86: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match TPA with [ TPA ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -804,7 +804,7 @@ nqed. ndefinition opcode_destruct87 : Πop2.ΠP:Prop.TST = op2 → match op2 with [ TST ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##87: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match TST with [ TST ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -813,7 +813,7 @@ nqed. ndefinition opcode_destruct88 : Πop2.ΠP:Prop.TSX = op2 → match op2 with [ TSX ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##88: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match TSX with [ TSX ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -822,7 +822,7 @@ nqed. ndefinition opcode_destruct89 : Πop2.ΠP:Prop.TXA = op2 → match op2 with [ TXA ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##89: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match TXA with [ TXA ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -831,7 +831,7 @@ nqed. ndefinition opcode_destruct90 : Πop2.ΠP:Prop.TXS = op2 → match op2 with [ TXS ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##90: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match TXS with [ TXS ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] @@ -840,7 +840,7 @@ nqed. ndefinition opcode_destruct91 : Πop2.ΠP:Prop.WAIT = op2 → match op2 with [ WAIT ⇒ P → P | _ ⇒ P ]. #op2; #P; ncases op2; nnormalize; ##[ ##91: #H; napply (λx:P.x) - ##| ##*: #H; napply (False_ind (λ_.?) ?); + ##| ##*: #H; napply False_ind; nchange with (match WAIT with [ WAIT ⇒ False | _ ⇒ True ]); nrewrite > H; nnormalize; napply I ##] diff --git a/helm/software/matita/contribs/ng_assembly/freescale/quatern.ma b/helm/software/matita/contribs/ng_assembly/freescale/quatern.ma new file mode 100755 index 000000000..ea74ccabf --- /dev/null +++ b/helm/software/matita/contribs/ng_assembly/freescale/quatern.ma @@ -0,0 +1,66 @@ +(**************************************************************************) +(* ___ *) +(* ||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: Cosimo Oliboni, oliboni@cs.unibo.it *) +(* Cosimo Oliboni, oliboni@cs.unibo.it *) +(* *) +(* ********************************************************************** *) + +include "freescale/bool.ma". + +(* ********** *) +(* QUATERNARI *) +(* ********** *) + +ninductive quatern : Type ≝ + q0 : quatern +| q1 : quatern +| q2 : quatern +| q3 : quatern. + +(* operatore = *) +ndefinition eq_qu ≝ +λn1,n2:quatern. + match n1 with + [ q0 ⇒ match n2 with [ q0 ⇒ true | _ ⇒ false ] + | q1 ⇒ match n2 with [ q1 ⇒ true | _ ⇒ false ] + | q2 ⇒ match n2 with [ q2 ⇒ true | _ ⇒ false ] + | q3 ⇒ match n2 with [ q3 ⇒ true | _ ⇒ false ] + ]. + +(* iteratore sui quaternari *) +ndefinition forall_qu ≝ λP. + P q0 ⊗ P q1 ⊗ P q2 ⊗ P q3. + +(* operatore successorre *) +ndefinition succ_qu ≝ +λn.match n with + [ q0 ⇒ q1 | q1 ⇒ q2 | q2 ⇒ q3 | q3 ⇒ q0 ]. + +(* quaternari ricorsivi *) +ninductive rec_quatern : quatern → Type ≝ + qu_O : rec_quatern q0 +| qu_S : ∀n.rec_quatern n → rec_quatern (succ_qu n). + +(* quaternari → quaternari ricorsivi *) +ndefinition qu_to_recqu ≝ +λn.match n return λx.rec_quatern x with + [ q0 ⇒ qu_O + | q1 ⇒ qu_S ? qu_O + | q2 ⇒ qu_S ? (qu_S ? qu_O) + | q3 ⇒ qu_S ? (qu_S ? (qu_S ? qu_O)) + ]. diff --git a/helm/software/matita/contribs/ng_assembly/freescale/quatern_lemmas.ma b/helm/software/matita/contribs/ng_assembly/freescale/quatern_lemmas.ma new file mode 100755 index 000000000..ea0e830c7 --- /dev/null +++ b/helm/software/matita/contribs/ng_assembly/freescale/quatern_lemmas.ma @@ -0,0 +1,95 @@ +(**************************************************************************) +(* ___ *) +(* ||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: Cosimo Oliboni, oliboni@cs.unibo.it *) +(* Cosimo Oliboni, oliboni@cs.unibo.it *) +(* *) +(* ********************************************************************** *) + +include "freescale/bool_lemmas.ma". +include "freescale/quatern.ma". + +(* ********** *) +(* QUATERNARI *) +(* ********** *) + +ndefinition quatern_destruct_aux ≝ +Πn1,n2:quatern.ΠP:Prop.n1 = n2 → + match n1 with + [ q0 ⇒ match n2 with [ q0 ⇒ P → P | _ ⇒ P ] + | q1 ⇒ match n2 with [ q1 ⇒ P → P | _ ⇒ P ] + | q2 ⇒ match n2 with [ q2 ⇒ P → P | _ ⇒ P ] + | q3 ⇒ match n2 with [ q3 ⇒ P → P | _ ⇒ P ] + ]. + +ndefinition quatern_destruct : quatern_destruct_aux. + #n1; #n2; #P; + nelim n1; + ##[ ##1: nelim n2; nnormalize; #H; + ##[ ##1: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match q0 with [ q0 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] + ##| ##2: nelim n2; nnormalize; #H; + ##[ ##2: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match q1 with [ q1 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] + ##| ##3: nelim n2; nnormalize; #H; + ##[ ##3: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match q2 with [ q2 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] + ##| ##4: nelim n2; nnormalize; #H; + ##[ ##4: napply (λx:P.x) + ##| ##*: napply False_ind; + nchange with (match q3 with [ q3 ⇒ False | _ ⇒ True ]); + nrewrite > H; nnormalize; napply I + ##] + ##] +nqed. + +nlemma symmetric_eqqu : symmetricT quatern bool eq_qu. + #n1; #n2; + nelim n1; + nelim n2; + nnormalize; + napply refl_eq. +nqed. + +nlemma eqqu_to_eq : ∀n1,n2.eq_qu n1 n2 = true → n1 = n2. + #n1; #n2; + ncases n1; + ncases n2; + nnormalize; + ##[ ##1,6,11,16: #H; napply refl_eq + ##| ##*: #H; napply (bool_destruct … H) + ##] +nqed. + +nlemma eq_to_eqqu : ∀n1,n2.n1 = n2 → eq_qu n1 n2 = true. + #n1; #n2; + ncases n1; + ncases n2; + nnormalize; + ##[ ##1,6,11,16: #H; napply refl_eq + ##| ##*: #H; napply (quatern_destruct … H) + ##] +nqed. diff --git a/helm/software/matita/contribs/ng_assembly/freescale/theory.ma b/helm/software/matita/contribs/ng_assembly/freescale/theory.ma index 9679d66ed..a9e6287a8 100644 --- a/helm/software/matita/contribs/ng_assembly/freescale/theory.ma +++ b/helm/software/matita/contribs/ng_assembly/freescale/theory.ma @@ -59,6 +59,7 @@ interpretation "logical and" 'and x y = (And x y). nlemma proj1: ∀A,B:Prop.A ∧ B → A. #A; #B; #H; + (* \ldots al posto di ??? *) napply (And_ind A B … H); #H1; #H2; napply H1. @@ -88,7 +89,7 @@ ninductive ex2 (A:Type) (Q,R:A → Prop) : Prop ≝ ex_intro2: ∀x:A.Q x → R x → ex2 A Q R. ndefinition iff ≝ -λA,B.(A -> B) ∧ (B -> A). +λA,B.(A → B) ∧ (B → A). (* higher_order_defs/relations *) @@ -152,12 +153,12 @@ ndefinition associative : ∀A:Type.∀R:relationT A A.Prop ≝ ninductive list (A:Type) : Type ≝ nil: list A -| cons: A -> list A -> list A. +| cons: A → list A → list A. nlet rec append A (l1: list A) l2 on l1 ≝ match l1 with - [ nil => l2 - | (cons hd tl) => cons A hd (append A tl l2) ]. + [ nil ⇒ l2 + | (cons hd tl) ⇒ cons A hd (append A tl l2) ]. notation "hvbox(hd break :: tl)" right associative with precedence 47 diff --git a/helm/software/matita/contribs/ng_assembly/freescale/word16.ma b/helm/software/matita/contribs/ng_assembly/freescale/word16.ma index 88cbe3563..7dd405eeb 100755 --- a/helm/software/matita/contribs/ng_assembly/freescale/word16.ma +++ b/helm/software/matita/contribs/ng_assembly/freescale/word16.ma @@ -90,10 +90,10 @@ ndefinition ror_w16 ≝ | false ⇒ mk_word16 wh' wl' ]]]. (* operatore rotazione destra n-volte *) -nlet rec ror_w16_n (w:word16) (n:nat) on n ≝ - match n with - [ O ⇒ w - | S n' ⇒ ror_w16_n (ror_w16 w) n' ]. +nlet rec ror_w16_n (w:word16) (n:exadecim) (r:rec_exadecim n) on r ≝ + match r with + [ ex_O ⇒ w + | ex_S t n' ⇒ ror_w16_n (ror_w16 w) t n' ]. (* operatore rotazione sinistra con carry *) ndefinition rcl_w16 ≝ @@ -116,10 +116,10 @@ ndefinition rol_w16 ≝ | false ⇒ mk_word16 wh' wl' ]]]. (* operatore rotazione sinistra n-volte *) -nlet rec rol_w16_n (w:word16) (n:nat) on n ≝ - match n with - [ O ⇒ w - | S n' ⇒ rol_w16_n (rol_w16 w) n' ]. +nlet rec rol_w16_n (w:word16) (n:exadecim) (r:rec_exadecim n) on r ≝ + match r with + [ ex_O ⇒ w + | ex_S t n' ⇒ rol_w16_n (rol_w16 w) t n' ]. (* operatore not/complemento a 1 *) ndefinition not_w16 ≝ @@ -164,9 +164,6 @@ ndefinition plus_w16_d_c ≝ (* operatore Most Significant Bit *) ndefinition MSB_w16 ≝ λw:word16.eq_ex x8 (and_ex x8 (b8h (w16h w))). -(* word → naturali *) -ndefinition nat_of_word16 ≝ λw:word16. 256 * (nat_of_byte8 (w16h w)) + (nat_of_byte8 (w16l w)). - (* operatore predecessore *) ndefinition pred_w16 ≝ λw:word16.match eq_b8 (w16l w) (mk_byte8 x0 x0) with @@ -203,15 +200,15 @@ ndefinition mul_b8 ≝ ]]]]]]. (* divisione senza segno (secondo la logica delle ALU): (quoziente resto) overflow *) -nlet rec div_b8_aux (divd:word16) (divs:word16) (molt:byte8) (q:byte8) (c:nat) on c ≝ +nlet rec div_b8_aux (divd:word16) (divs:word16) (molt:byte8) (q:byte8) (c:oct) (rc:rec_oct c) on rc ≝ let w' ≝ plus_w16_d_d divd (compl_w16 divs) in - match c with - [ O ⇒ match le_w16 divs divd with + match rc with + [ oc_O ⇒ match le_w16 divs divd with [ true ⇒ triple … (or_b8 molt q) (w16l w') (⊖ (eq_b8 (w16h w') 〈x0,x0〉)) | false ⇒ triple … q (w16l divd) (⊖ (eq_b8 (w16h divd) 〈x0,x0〉)) ] - | S c' ⇒ match le_w16 divs divd with - [ true ⇒ div_b8_aux w' (ror_w16 divs) (ror_b8 molt) (or_b8 molt q) c' - | false ⇒ div_b8_aux divd (ror_w16 divs) (ror_b8 molt) q c' ]]. + | oc_S t c' ⇒ match le_w16 divs divd with + [ true ⇒ div_b8_aux w' (ror_w16 divs) (ror_b8 molt) (or_b8 molt q) t c' + | false ⇒ div_b8_aux divd (ror_w16 divs) (ror_b8 molt) q t c' ]]. ndefinition div_b8 ≝ λw:word16.λb:byte8.match eq_b8 b 〈x0,x0〉 with @@ -227,15 +224,240 @@ ndefinition div_b8 ≝ (* 3) ad ogni ciclo il divisore e il moltiplicatore vengono scalati di 1 a dx *) (* 4) il moltiplicatore e' la quantita' aggiunta al quoziente se il divisore *) (* puo' essere sottratto al dividendo *) - | false ⇒ div_b8_aux w (rol_w16_n 〈〈x0,x0〉:b〉 7) 〈x8,x0〉 〈x0,x0〉 7 ]]. + | false ⇒ div_b8_aux w (rol_w16_n 〈〈x0,x0〉:b〉 ? (ex_to_recex x7)) 〈x8,x0〉 〈x0,x0〉 ? (oct_to_recoct o7) ]]. (* operatore x in [inf,sup] *) -ndefinition in_range ≝ +ndefinition inrange_w16 ≝ λx,inf,sup:word16.(le_w16 inf sup) ⊗ (ge_w16 x inf) ⊗ (le_w16 x sup). (* iteratore sulle word *) -ndefinition forall_word16 ≝ +ndefinition forall_w16 ≝ λP. - forall_byte8 (λbh. - forall_byte8 (λbl. + forall_b8 (λbh. + forall_b8 (λbl. P (mk_word16 bh bl ))). + +(* word16 ricorsive *) +ninductive rec_word16 : word16 → Type ≝ + w16_O : rec_word16 〈〈x0,x0〉:〈x0,x0〉〉 +| w16_S : ∀n.rec_word16 n → rec_word16 (succ_w16 n). + +(* word16 → word16 ricorsive *) +ndefinition w16_to_recw16_aux1_1 : Πn.rec_word16 〈n:〈x0,x0〉〉 → rec_word16 〈n:〈x1,x0〉〉 ≝ +λn.λrecw:rec_word16 〈n:〈x0,x0〉〉. + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? ( + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? recw + ))))))))))))))). + +ndefinition w16_to_recw16_aux1_2 : Πn.rec_word16 〈n:〈x0,x0〉〉 → rec_word16 〈n:〈x2,x0〉〉 ≝ +λn.λrecw:rec_word16 〈n:〈x0,x0〉〉. + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? ( + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_to_recw16_aux1_1 ? recw) + ))))))))))))))). + +ndefinition w16_to_recw16_aux1_3 : Πn.rec_word16 〈n:〈x0,x0〉〉 → rec_word16 〈n:〈x3,x0〉〉 ≝ +λn.λrecw:rec_word16 〈n:〈x0,x0〉〉. + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? ( + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_to_recw16_aux1_2 ? recw) + ))))))))))))))). + +ndefinition w16_to_recw16_aux1_4 : Πn.rec_word16 〈n:〈x0,x0〉〉 → rec_word16 〈n:〈x4,x0〉〉 ≝ +λn.λrecw:rec_word16 〈n:〈x0,x0〉〉. + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? ( + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_to_recw16_aux1_3 ? recw) + ))))))))))))))). + +ndefinition w16_to_recw16_aux1_5 : Πn.rec_word16 〈n:〈x0,x0〉〉 → rec_word16 〈n:〈x5,x0〉〉 ≝ +λn.λrecw:rec_word16 〈n:〈x0,x0〉〉. + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? ( + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_to_recw16_aux1_4 ? recw) + ))))))))))))))). + +ndefinition w16_to_recw16_aux1_6 : Πn.rec_word16 〈n:〈x0,x0〉〉 → rec_word16 〈n:〈x6,x0〉〉 ≝ +λn.λrecw:rec_word16 〈n:〈x0,x0〉〉. + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? ( + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_to_recw16_aux1_5 ? recw) + ))))))))))))))). + +ndefinition w16_to_recw16_aux1_7 : Πn.rec_word16 〈n:〈x0,x0〉〉 → rec_word16 〈n:〈x7,x0〉〉 ≝ +λn.λrecw:rec_word16 〈n:〈x0,x0〉〉. + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? ( + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_to_recw16_aux1_6 ? recw) + ))))))))))))))). + +ndefinition w16_to_recw16_aux1_8 : Πn.rec_word16 〈n:〈x0,x0〉〉 → rec_word16 〈n:〈x8,x0〉〉 ≝ +λn.λrecw:rec_word16 〈n:〈x0,x0〉〉. + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? ( + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_to_recw16_aux1_7 ? recw) + ))))))))))))))). + +ndefinition w16_to_recw16_aux1_9 : Πn.rec_word16 〈n:〈x0,x0〉〉 → rec_word16 〈n:〈x9,x0〉〉 ≝ +λn.λrecw:rec_word16 〈n:〈x0,x0〉〉. + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? ( + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_to_recw16_aux1_8 ? recw) + ))))))))))))))). + +ndefinition w16_to_recw16_aux1_10 : Πn.rec_word16 〈n:〈x0,x0〉〉 → rec_word16 〈n:〈xA,x0〉〉 ≝ +λn.λrecw:rec_word16 〈n:〈x0,x0〉〉. + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? ( + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_to_recw16_aux1_9 ? recw) + ))))))))))))))). + +ndefinition w16_to_recw16_aux1_11 : Πn.rec_word16 〈n:〈x0,x0〉〉 → rec_word16 〈n:〈xB,x0〉〉 ≝ +λn.λrecw:rec_word16 〈n:〈x0,x0〉〉. + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? ( + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_to_recw16_aux1_10 ? recw) + ))))))))))))))). + +ndefinition w16_to_recw16_aux1_12 : Πn.rec_word16 〈n:〈x0,x0〉〉 → rec_word16 〈n:〈xC,x0〉〉 ≝ +λn.λrecw:rec_word16 〈n:〈x0,x0〉〉. + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? ( + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_to_recw16_aux1_11 ? recw) + ))))))))))))))). + +ndefinition w16_to_recw16_aux1_13 : Πn.rec_word16 〈n:〈x0,x0〉〉 → rec_word16 〈n:〈xD,x0〉〉 ≝ +λn.λrecw:rec_word16 〈n:〈x0,x0〉〉. + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? ( + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_to_recw16_aux1_12 ? recw) + ))))))))))))))). + +ndefinition w16_to_recw16_aux1_14 : Πn.rec_word16 〈n:〈x0,x0〉〉 → rec_word16 〈n:〈xE,x0〉〉 ≝ +λn.λrecw:rec_word16 〈n:〈x0,x0〉〉. + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? ( + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_to_recw16_aux1_13 ? recw) + ))))))))))))))). + +ndefinition w16_to_recw16_aux1_15 : Πn.rec_word16 〈n:〈x0,x0〉〉 → rec_word16 〈n:〈xF,x0〉〉 ≝ +λn.λrecw:rec_word16 〈n:〈x0,x0〉〉. + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? ( + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_to_recw16_aux1_14 ? recw) + ))))))))))))))). + +ndefinition w16_to_recw16_aux1 : Πn.rec_word16 〈n:〈x0,x0〉〉 → rec_word16 〈(succ_b8 n):〈x0,x0〉〉 ≝ +λn.λrecw:rec_word16 〈n:〈x0,x0〉〉. + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? ( + w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_S ? (w16_to_recw16_aux1_15 ? recw) + ))))))))))))))). + +(* ... cifra byte superiore *) +nlet rec w16_to_recw16_aux2 (n:byte8) (r:rec_byte8 n) on r ≝ + match r return λx.λy:rec_byte8 x.rec_word16 〈x:〈x0,x0〉〉 with + [ b8_O ⇒ w16_O + | b8_S t n' ⇒ w16_to_recw16_aux1 ? (w16_to_recw16_aux2 t n') + ]. + +(* ... cifra esadecimale n.2 *) +ndefinition w16_to_recw16_aux3 ≝ +λb,n.λrecw:rec_word16 〈b:〈x0,x0〉〉. + match n return λx.rec_word16 〈b:〈x,x0〉〉 with + [ x0 ⇒ recw + | x1 ⇒ w16_to_recw16_aux1_1 ? recw + | x2 ⇒ w16_to_recw16_aux1_2 ? recw + | x3 ⇒ w16_to_recw16_aux1_3 ? recw + | x4 ⇒ w16_to_recw16_aux1_4 ? recw + | x5 ⇒ w16_to_recw16_aux1_5 ? recw + | x6 ⇒ w16_to_recw16_aux1_6 ? recw + | x7 ⇒ w16_to_recw16_aux1_7 ? recw + | x8 ⇒ w16_to_recw16_aux1_8 ? recw + | x9 ⇒ w16_to_recw16_aux1_9 ? recw + | xA ⇒ w16_to_recw16_aux1_10 ? recw + | xB ⇒ w16_to_recw16_aux1_11 ? recw + | xC ⇒ w16_to_recw16_aux1_12 ? recw + | xD ⇒ w16_to_recw16_aux1_13 ? recw + | xE ⇒ w16_to_recw16_aux1_14 ? recw + | xF ⇒ w16_to_recw16_aux1_15 ? recw + ]. + +nlemma w16_to_recw16_aux4_1 : Πn,e.rec_word16 〈n:〈e,x0〉〉 → rec_word16 〈n:〈e,x1〉〉. + #n; #e; nelim e; #input; napply (w16_S ? input). +nqed. + +nlemma w16_to_recw16_aux4_2 : Πn,e.rec_word16 〈n:〈e,x0〉〉 → rec_word16 〈n:〈e,x2〉〉. + #n; #e; nelim e; #input; napply (w16_S ? (w16_to_recw16_aux4_1 … input)). +nqed. + +nlemma w16_to_recw16_aux4_3 : Πn,e.rec_word16 〈n:〈e,x0〉〉 → rec_word16 〈n:〈e,x3〉〉. + #n; #e; nelim e; #input; napply (w16_S ? (w16_to_recw16_aux4_2 … input)). +nqed. + +nlemma w16_to_recw16_aux4_4 : Πn,e.rec_word16 〈n:〈e,x0〉〉 → rec_word16 〈n:〈e,x4〉〉. + #n; #e; nelim e; #input; napply (w16_S ? (w16_to_recw16_aux4_3 … input)). +nqed. + +nlemma w16_to_recw16_aux4_5 : Πn,e.rec_word16 〈n:〈e,x0〉〉 → rec_word16 〈n:〈e,x5〉〉. + #n; #e; nelim e; #input; napply (w16_S ? (w16_to_recw16_aux4_4 … input)). +nqed. + +nlemma w16_to_recw16_aux4_6 : Πn,e.rec_word16 〈n:〈e,x0〉〉 → rec_word16 〈n:〈e,x6〉〉. + #n; #e; nelim e; #input; napply (w16_S ? (w16_to_recw16_aux4_5 … input)). +nqed. + +nlemma w16_to_recw16_aux4_7 : Πn,e.rec_word16 〈n:〈e,x0〉〉 → rec_word16 〈n:〈e,x7〉〉. + #n; #e; nelim e; #input; napply (w16_S ? (w16_to_recw16_aux4_6 … input)). +nqed. + +nlemma w16_to_recw16_aux4_8 : Πn,e.rec_word16 〈n:〈e,x0〉〉 → rec_word16 〈n:〈e,x8〉〉. + #n; #e; nelim e; #input; napply (w16_S ? (w16_to_recw16_aux4_7 … input)). +nqed. + +nlemma w16_to_recw16_aux4_9 : Πn,e.rec_word16 〈n:〈e,x0〉〉 → rec_word16 〈n:〈e,x9〉〉. + #n; #e; nelim e; #input; napply (w16_S ? (w16_to_recw16_aux4_8 … input)). +nqed. + +nlemma w16_to_recw16_aux4_10 : Πn,e.rec_word16 〈n:〈e,x0〉〉 → rec_word16 〈n:〈e,xA〉〉. + #n; #e; nelim e; #input; napply (w16_S ? (w16_to_recw16_aux4_9 … input)). +nqed. + +nlemma w16_to_recw16_aux4_11 : Πn,e.rec_word16 〈n:〈e,x0〉〉 → rec_word16 〈n:〈e,xB〉〉. + #n; #e; nelim e; #input; napply (w16_S ? (w16_to_recw16_aux4_10 … input)). +nqed. + +nlemma w16_to_recw16_aux4_12 : Πn,e.rec_word16 〈n:〈e,x0〉〉 → rec_word16 〈n:〈e,xC〉〉. + #n; #e; nelim e; #input; napply (w16_S ? (w16_to_recw16_aux4_11 … input)). +nqed. + +nlemma w16_to_recw16_aux4_13 : Πn,e.rec_word16 〈n:〈e,x0〉〉 → rec_word16 〈n:〈e,xD〉〉. + #n; #e; nelim e; #input; napply (w16_S ? (w16_to_recw16_aux4_12 … input)). +nqed. + +nlemma w16_to_recw16_aux4_14 : Πn,e.rec_word16 〈n:〈e,x0〉〉 → rec_word16 〈n:〈e,xE〉〉. + #n; #e; nelim e; #input; napply (w16_S ? (w16_to_recw16_aux4_13 … input)). +nqed. + +nlemma w16_to_recw16_aux4_15 : Πn,e.rec_word16 〈n:〈e,x0〉〉 → rec_word16 〈n:〈e,xF〉〉. + #n; #e; nelim e; #input; napply (w16_S ? (w16_to_recw16_aux4_14 … input)). +nqed. + +(* ... cifra esadecimale n.1 *) +ndefinition w16_to_recw16_aux4 ≝ +λb,e,n.λrecw:rec_word16 〈b:〈e,x0〉〉. + match n return λx.rec_word16 〈b:〈e,x〉〉 with + [ x0 ⇒ recw + | x1 ⇒ w16_to_recw16_aux4_1 … recw + | x2 ⇒ w16_to_recw16_aux4_2 … recw + | x3 ⇒ w16_to_recw16_aux4_3 … recw + | x4 ⇒ w16_to_recw16_aux4_4 … recw + | x5 ⇒ w16_to_recw16_aux4_5 … recw + | x6 ⇒ w16_to_recw16_aux4_6 … recw + | x7 ⇒ w16_to_recw16_aux4_7 … recw + | x8 ⇒ w16_to_recw16_aux4_8 … recw + | x9 ⇒ w16_to_recw16_aux4_9 … recw + | xA ⇒ w16_to_recw16_aux4_10 … recw + | xB ⇒ w16_to_recw16_aux4_11 … recw + | xC ⇒ w16_to_recw16_aux4_12 … recw + | xD ⇒ w16_to_recw16_aux4_13 … recw + | xE ⇒ w16_to_recw16_aux4_14 … recw + | xF ⇒ w16_to_recw16_aux4_15 … recw + ]. + +nlemma w16_to_recw16_aux5 : ∀b.rec_byte8 (〈b8h b,b8l b〉) → rec_byte8 b. + #b; nelim b; #e1; #e2; nnormalize; #input; napply input. nqed. + +ndefinition w16_to_recw16 ≝ +λn.w16_to_recw16_aux4 (w16h n) (b8h (w16l n)) (b8l (w16l n)) + (w16_to_recw16_aux3 (w16h n) (b8h (w16l n)) (w16_to_recw16_aux2 (w16h n) ?)). + nelim n; #b1; #b2; + nchange with (rec_byte8 b1); + napply (w16_to_recw16_aux5 b1); + napply (b8_to_recb8 b1). +nqed. diff --git a/helm/software/matita/contribs/ng_assembly/freescale/word32.ma b/helm/software/matita/contribs/ng_assembly/freescale/word32.ma index fa57c68f5..8eb5d52e5 100755 --- a/helm/software/matita/contribs/ng_assembly/freescale/word32.ma +++ b/helm/software/matita/contribs/ng_assembly/freescale/word32.ma @@ -90,10 +90,10 @@ ndefinition ror_w32 ≝ | false ⇒ mk_word32 wh' wl' ]]]. (* operatore rotazione destra n-volte *) -nlet rec ror_w32_n (dw:word32) (n:nat) on n ≝ - match n with - [ O ⇒ dw - | S n' ⇒ ror_w32_n (ror_w32 dw) n' ]. +nlet rec ror_w32_n (dw:word32) (n:bitrigesim) (r:rec_bitrigesim n) on r ≝ + match r with + [ bi_O ⇒ dw + | bi_S t n' ⇒ ror_w32_n (ror_w32 dw) t n' ]. (* operatore rotazione sinistra con carry *) ndefinition rcl_w32 ≝ @@ -116,10 +116,10 @@ ndefinition rol_w32 ≝ | false ⇒ mk_word32 wh' wl' ]]]. (* operatore rotazione sinistra n-volte *) -nlet rec rol_w32_n (dw:word32) (n:nat) on n ≝ - match n with - [ O ⇒ dw - | S n' ⇒ rol_w32_n (rol_w32 dw) n' ]. +nlet rec rol_w32_n (dw:word32) (n:bitrigesim) (r:rec_bitrigesim n) on r ≝ + match r with + [ bi_O ⇒ dw + | bi_S t n' ⇒ rol_w32_n (rol_w32 dw) t n' ]. (* operatore not/complemento a 1 *) ndefinition not_w32 ≝ @@ -164,9 +164,6 @@ ndefinition plus_w32_d_c ≝ (* operatore Most Significant Bit *) ndefinition MSB_w32 ≝ λdw:word32.eq_ex x8 (and_ex x8 (b8h (w16h (w32h dw)))). -(* word → naturali *) -ndefinition nat_of_word32 ≝ λdw:word32. (256 * 256 * (nat_of_word16 (w32h dw))) + (nat_of_word16 (w32l dw)). - (* operatore predecessore *) ndefinition pred_w32 ≝ λdw:word32.match eq_w16 (w32l dw) (mk_word16 (mk_byte8 x0 x0) (mk_byte8 x0 x0)) with @@ -203,15 +200,15 @@ ndefinition mul_w16 ≝ ]]]]]]. (* divisione senza segno (secondo la logica delle ALU): (quoziente resto) overflow *) -nlet rec div_w16_aux (divd:word32) (divs:word32) (molt:word16) (q:word16) (c:nat) on c ≝ +nlet rec div_w16_aux (divd:word32) (divs:word32) (molt:word16) (q:word16) (c:exadecim) (rc:rec_exadecim c) on rc ≝ let w' ≝ plus_w32_d_d divd (compl_w32 divs) in - match c with - [ O ⇒ match le_w32 divs divd with + match rc with + [ ex_O ⇒ match le_w32 divs divd with [ true ⇒ triple … (or_w16 molt q) (w32l w') (⊖ (eq_w16 (w32h w') 〈〈x0,x0〉:〈x0,x0〉〉)) | false ⇒ triple … q (w32l divd) (⊖ (eq_w16 (w32h divd) 〈〈x0,x0〉:〈x0,x0〉〉)) ] - | S c' ⇒ match le_w32 divs divd with - [ true ⇒ div_w16_aux w' (ror_w32 divs) (ror_w16 molt) (or_w16 molt q) c' - | false ⇒ div_w16_aux divd (ror_w32 divs) (ror_w16 molt) q c' ]]. + | ex_S t c' ⇒ match le_w32 divs divd with + [ true ⇒ div_w16_aux w' (ror_w32 divs) (ror_w16 molt) (or_w16 molt q) t c' + | false ⇒ div_w16_aux divd (ror_w32 divs) (ror_w16 molt) q t c' ]]. ndefinition div_w16 ≝ λw:word32.λb:word16.match eq_w16 b 〈〈x0,x0〉:〈x0,x0〉〉 with @@ -227,15 +224,15 @@ ndefinition div_w16 ≝ (* 3) ad ogni ciclo il divisore e il moltiplicatore vengono scalati di 1 a dx *) (* 4) il moltiplicatore e' la quantita' aggiunta al quoziente se il divisore *) (* puo' essere sottratto al dividendo *) - | false ⇒ div_w16_aux w (rol_w32_n 〈〈〈x0,x0〉:〈x0,x0〉〉.b〉 15) 〈〈x8,x0〉:〈x0,x0〉〉 〈〈x0,x0〉:〈x0,x0〉〉 15 ]]. + | false ⇒ div_w16_aux w (rol_w32_n 〈〈〈x0,x0〉:〈x0,x0〉〉.b〉 ? (bit_to_recbit t0F)) 〈〈x8,x0〉:〈x0,x0〉〉 〈〈x0,x0〉:〈x0,x0〉〉 ? (ex_to_recex xF) ]]. (* operatore x in [inf,sup] *) -ndefinition in_range ≝ +ndefinition inrange_w32 ≝ λx,inf,sup:word32.(le_w32 inf sup) ⊗ (ge_w32 x inf) ⊗ (le_w32 x sup). (* iteratore sulle word *) -ndefinition forall_word32 ≝ +ndefinition forall_w32 ≝ λP. - forall_word16 (λbh. - forall_word16 (λbl. + forall_w16 (λbh. + forall_w16 (λbl. P (mk_word32 bh bl ))). diff --git a/helm/software/matita/contribs/ng_assembly/utility/string.ma b/helm/software/matita/contribs/ng_assembly/utility/string.ma index 736bbf722..fb95e2e6b 100644 --- a/helm/software/matita/contribs/ng_assembly/utility/string.ma +++ b/helm/software/matita/contribs/ng_assembly/utility/string.ma @@ -22,7 +22,6 @@ include "utility/ascii.ma". include "freescale/theory.ma". -include "freescale/nat.ma". include "utility/utility.ma". (* ************************ *) diff --git a/helm/software/matita/contribs/ng_assembly/utility/string_lemmas.ma b/helm/software/matita/contribs/ng_assembly/utility/string_lemmas.ma index 289cfaf65..0387750d8 100755 --- a/helm/software/matita/contribs/ng_assembly/utility/string_lemmas.ma +++ b/helm/software/matita/contribs/ng_assembly/utility/string_lemmas.ma @@ -22,7 +22,6 @@ include "utility/string.ma". include "utility/ascii_lemmas2.ma". -include "freescale/nat_lemmas.ma". include "utility/utility_lemmas.ma". (* ************************ *) diff --git a/helm/software/matita/contribs/ng_assembly/utility/utility.ma b/helm/software/matita/contribs/ng_assembly/utility/utility.ma index 35cb725a0..c34ca8465 100755 --- a/helm/software/matita/contribs/ng_assembly/utility/utility.ma +++ b/helm/software/matita/contribs/ng_assembly/utility/utility.ma @@ -21,7 +21,6 @@ (* ********************************************************************** *) include "freescale/theory.ma". -include "freescale/nat_lemmas.ma". include "freescale/option.ma". (* ************** *)