]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/nlibrary/logic/connectives.ma
026e9216951c9224737b6493953317effd635369
[helm.git] / helm / software / matita / nlibrary / logic / connectives.ma
1 (**************************************************************************)
2 (*       ___                                                                *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||       A.Asperti, C.Sacerdoti Coen,                          *)
8 (*      ||A||       E.Tassi, S.Zacchiroli                                 *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU Lesser General Public License Version 2.1         *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "logic/pts.ma".
16
17 ninductive True: CProp ≝
18   I : True.
19
20 ninductive False: CProp ≝.
21
22 ndefinition Not: CProp → CProp ≝
23   λA. A → False.
24
25 interpretation "logical not" 'not x = (Not x).
26
27 ninductive And (A,B:CProp) : CProp ≝
28     conj : A → B → And A B.
29
30 interpretation "logical and" 'and x y = (And x y).
31
32 ninductive Or (A,B:CProp) : CProp ≝
33      or_introl : A → Or A B
34    | or_intror : B → Or A B.
35
36 interpretation "logical or" 'or x y = (Or x y).
37
38 ninductive Ex (A:Type) (P:A → CProp) : CProp ≝
39     ex_intro: ∀x:A. P x → Ex A P.
40
41 interpretation "exists" 'exists x = (Ex ? x).
42
43 nrecord iff (A,B: CProp) : CProp ≝
44  { if: A → B;
45    fi: B → A
46  }.
47
48 notation > "hvbox(a break \liff b)"
49   left associative with precedence 25
50 for @{ 'iff $a $b }.
51
52 notation "hvbox(a break \leftrightarrow b)"
53   left associative with precedence 25
54 for @{ 'iff $a $b }.
55
56 interpretation "logical iff" 'iff x y = (iff x y).