1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 (* ********************************************************************** *)
16 (* Progetto FreeScale *)
18 (* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
19 (* Ultima modifica: 05/08/2009 *)
21 (* ********************************************************************** *)
24 include "num/bool_lemmas.ma".
30 ndefinition oct_destruct_aux ≝
31 Πn1,n2:oct.ΠP:Prop.n1 = n2 →
32 match eq_oct n1 n2 with [ true ⇒ P → P | false ⇒ P ].
34 ndefinition oct_destruct : oct_destruct_aux.
42 nlemma symmetric_eqoct : symmetricT oct bool eq_oct.
50 nlemma eqoct_to_eq : ∀n1,n2.eq_oct n1 n2 = true → n1 = n2.
55 ##[ ##1,10,19,28,37,46,55,64: #H; napply refl_eq
56 ##| ##*: #H; napply (bool_destruct … H)
60 nlemma eq_to_eqoct : ∀n1,n2.n1 = n2 → eq_oct n1 n2 = true.
65 ##[ ##1,10,19,28,37,46,55,64: #H; napply refl_eq
66 ##| ##*: #H; napply (oct_destruct … H)
70 nlemma decidable_oct : ∀x,y:oct.decidable (x = y).
75 ##[ ##1,10,19,28,37,46,55,64: napply (or2_intro1 (? = ?) (? ≠ ?) …); napply refl_eq
76 ##| ##*: napply (or2_intro2 (? = ?) (? ≠ ?) …);
79 napply (oct_destruct … H)
83 nlemma neqoct_to_neq : ∀n1,n2.eq_oct n1 n2 = false → n1 ≠ n2.
88 ##[ ##1,10,19,28,37,46,55,64: #H; napply (bool_destruct … H)
89 ##| ##*: #H; #H1; napply (oct_destruct … H1)
93 nlemma neq_to_neqoct : ∀n1,n2.n1 ≠ n2 → eq_oct n1 n2 = false.
98 ##[ ##1,10,19,28,37,46,55,64: #H; nelim (H (refl_eq …))
99 ##| ##*: #H; napply refl_eq