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 *)
35 λb1,b2:bool.match b1 with
36 [ true ⇒ match b2 with [ true ⇒ true | false ⇒ false ]
37 | false ⇒ match b2 with [ true ⇒ false | false ⇒ true ]
40 ndefinition not_bool ≝
41 λb:bool.match b with [ true ⇒ false | false ⇒ true ].
43 ndefinition and_bool ≝
44 λb1,b2:bool.match b1 with
45 [ true ⇒ b2 | false ⇒ false ].
48 λb1,b2:bool.match b1 with
49 [ true ⇒ true | false ⇒ b2 ].
51 ndefinition xor_bool ≝
52 λb1,b2:bool.match b1 with
57 notation "hvbox(⊖ a)" non associative with precedence 36
58 for @{ 'not_bool $a }.
59 interpretation "not_bool" 'not_bool x = (not_bool x).
62 notation "hvbox(a break ⊗ b)" left associative with precedence 35
63 for @{ 'and_bool $a $b }.
64 interpretation "and_bool" 'and_bool x y = (and_bool x y).
67 notation "hvbox(a break ⊕ b)" left associative with precedence 34
68 for @{ 'or_bool $a $b }.
69 interpretation "or_bool" 'or_bool x y = (or_bool x y).
72 notation "hvbox(a break ⊙ b)" left associative with precedence 33
73 for @{ 'xor_bool $a $b }.
74 interpretation "xor_bool" 'xor_bool x y = (xor_bool x y).
76 (* iteratore sugli esadecimali *)
77 ndefinition forall_bool ≝ λP.P true ⊗ P false.
79 ndefinition boolRelation : Type → Type ≝