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 (* Sviluppo: 2008-2010 *)
21 (* ********************************************************************** *)
23 include "common/theory.ma".
29 ninductive bool : Type ≝
33 (* operatori booleani *)
36 λb1,b2:bool.match b1 with
37 [ true ⇒ match b2 with [ true ⇒ true | false ⇒ false ]
38 | false ⇒ match b2 with [ true ⇒ false | false ⇒ true ]
41 ndefinition not_bool ≝
42 λb:bool.match b with [ true ⇒ false | false ⇒ true ].
44 ndefinition and_bool ≝
45 λb1,b2:bool.match b1 with
46 [ true ⇒ b2 | false ⇒ false ].
49 λb1,b2:bool.match b1 with
50 [ true ⇒ true | false ⇒ b2 ].
52 ndefinition xor_bool ≝
53 λb1,b2:bool.match b1 with
58 notation "hvbox(⊖ a)" non associative with precedence 36
59 for @{ 'not_bool $a }.
60 interpretation "not_bool" 'not_bool x = (not_bool x).
63 notation "hvbox(a break ⊗ b)" left associative with precedence 35
64 for @{ 'and_bool $a $b }.
65 interpretation "and_bool" 'and_bool x y = (and_bool x y).
68 notation "hvbox(a break ⊕ b)" left associative with precedence 34
69 for @{ 'or_bool $a $b }.
70 interpretation "or_bool" 'or_bool x y = (or_bool x y).
73 notation "hvbox(a break ⊙ b)" left associative with precedence 33
74 for @{ 'xor_bool $a $b }.
75 interpretation "xor_bool" 'xor_bool x y = (xor_bool x y).
77 ndefinition boolRelation : Type → Type ≝