]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/nlibrary/logic/connectives.ma
...
[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 (* elimination principle *)
22 ndefinition False_rect ≝ λP: False → Type.λp: False.
23  match p in False return λp. P p with [].
24
25 ndefinition Not: CProp → CProp ≝
26   λA. A → False.
27
28 interpretation "logical not" 'not x = (Not x).
29
30 ninductive And (A,B:CProp) : CProp ≝
31     conj : A → B → And A B.
32
33 interpretation "logical and" 'and x y = (And x y).
34
35 ninductive Or (A,B:CProp) : CProp ≝
36      or_introl : A → Or A B
37    | or_intror : B → Or A B.
38
39 interpretation "logical or" 'or x y = (Or x y).
40
41 ninductive Ex (A:Type) (P:A → CProp) : CProp ≝
42     ex_intro: ∀x:A. P x → Ex A P.
43
44 interpretation "exists" 'exists x = (Ex ? x).