]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/nlibrary/logic/connectives.ma
more theory for lists
[helm.git] / helm / software / matita / nlibrary / logic / connectives.ma
index 6eb2375dcc895b3b8e4e6068572345382f349e34..4d085995d4ea1a589af54e8552afdbe2fbf713e3 100644 (file)
 
 include "logic/pts.ma".
 
-ninductive True: CProp ≝
+ninductive True: CProp[0] ≝
   I : True.
 
-ninductive False: CProp ≝.
-(* elimination principle *)
-ndefinition False_rect ≝ λP: False → Type.λp: False.
- match p in False return λp. P p with [].
+ninductive False: CProp[0] ≝.
 
-ndefinition Not: CProp → CProp ≝
+ndefinition Not: CProp[0] → CProp[0] ≝
   λA. A → False.
 
 interpretation "logical not" 'not x = (Not x).
 
-ninductive And (A,B:CProp) : CProp ≝
+ninductive And (A,B:CProp[0]) : CProp[0] ≝
     conj : A → B → And A B.
 
 interpretation "logical and" 'and x y = (And x y).
 
-ninductive Or (A,B:CProp) : CProp ≝
+ninductive Or (A,B:CProp[0]) : CProp[0] ≝
      or_introl : A → Or A B
    | or_intror : B → Or A B.
 
 interpretation "logical or" 'or x y = (Or x y).
 
-ninductive Ex (A:Type) (P:A → CProp) : CProp ≝
+ninductive Ex (A:Type[0]) (P:A → CProp[0]) : CProp[0] ≝
     ex_intro: ∀x:A. P x → Ex A P.
 
+
+ninductive Ex1 (A:Type[1]) (P:A → CProp[0]) : CProp[1] ≝
+    ex_intro1: ∀x:A. P x → Ex1 A P.
+
+interpretation "exists1" 'exists x = (Ex1 ? x).
 interpretation "exists" 'exists x = (Ex ? x).
+
+ninductive sigma (A : Type[0]) (P : A → CProp[0]) : Type[0] ≝ 
+ sig_intro : ∀x:A.P x → sigma A P. 
+
+interpretation "sigma" 'sigma \eta.p = (sigma ? p). 
+
+nrecord iff (A,B: CProp[0]) : CProp[0] ≝
+ { if: A → B;
+   fi: B → A
+ }.
+
+notation > "hvbox(a break \liff b)"
+  left associative with precedence 25
+for @{ 'iff $a $b }.
+
+notation "hvbox(a break \leftrightarrow b)"
+  left associative with precedence 25
+for @{ 'iff $a $b }.
+
+interpretation "logical iff" 'iff x y = (iff x y).