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 *)
19 (* Cosimo Oliboni, oliboni@cs.unibo.it *)
21 (* Questo materiale fa parte della tesi: *)
22 (* "Formalizzazione Interattiva dei Microcontroller a 8bit FreeScale" *)
24 (* data ultima modifica 15/11/2007 *)
25 (* ********************************************************************** *)
27 include "freescale/theory.ma".
28 include "freescale/bool.ma".
34 ndefinition boolRelation : Type → Type ≝
37 ndefinition boolSymmetric: ∀A:Type.∀R:boolRelation A.Prop ≝
38 λA.λR.∀x,y:A.R x y = R y x.
40 ntheorem bool_destruct_true_false : true ≠ false.
43 nchange with (match true with [ true ⇒ False | false ⇒ True]);
49 ntheorem bool_destruct_false_true : false ≠ true.
52 nchange with (match true with [ true ⇒ False | false ⇒ True]);
58 nlemma bsymmetric_eqbool : boolSymmetric bool eq_bool.
67 nlemma bsymmetric_andbool : boolSymmetric bool and_bool.
76 nlemma bsymmetric_orbool : boolSymmetric bool or_bool.
85 nlemma bsymmetric_xorbool : boolSymmetric bool xor_bool.
94 nlemma eqbool_to_eq : ∀b1,b2:bool.(eq_bool b1 b2 = true) → (b1 = b2).
100 ##[ ##2,3: nelim (bool_destruct_false_true H) ##]
104 nlemma eq_to_eqbool : ∀b1,b2.b1 = b2 → eq_bool b1 b2 = true.
110 ##[ ##2: nelim (bool_destruct_true_false H)
111 ##| ##3: nelim (bool_destruct_false_true H) ##]
115 nlemma andb_true_true: ∀b1,b2.(b1 ⊗ b2) = true → b1 = true.
121 ##[ ##3,4: nelim (bool_destruct_false_true H) ##]
125 nlemma andb_true_true_r: ∀b1,b2.(b1 ⊗ b2) = true → b2 = true.
131 ##[ ##2,3,4: nelim (bool_destruct_false_true H) ##]
135 nlemma orb_false_false : ∀b1,b2:bool.(b1 ⊕ b2) = false → b1 = false.
141 ##[ ##1,2: nelim (bool_destruct_true_false H) ##]
145 nlemma orb_false_false_r : ∀b1,b2:bool.(b1 ⊕ b2) = false → b2 = false.
151 ##[ ##1,3: nelim (bool_destruct_true_false H) ##]