1 Require Export st_base.
9 Definition LEx := Sigma.
11 Definition LBot := Empty.
13 Definition LOr := Plus.
15 Definition LImp: Set -> Set -> Set := [S,T](Pi S [_:S]T).
17 Definition LAnd: Set -> Set -> Set := [S,T](Sigma S [_:S]T).
19 Definition LNot: Set -> Set := [S](LImp S LBot).
21 Definition LTop: Set := (LNot LBot).
23 Definition LIff: Set -> Set -> Set := [S,T](LAnd (LImp S T) (LImp T S)).
25 Definition limp_i: (S,T:Set) (S -> T) -> (LImp S T).
27 MApply '(abst S [_]T H).
30 Definition limp_e: (S,T:Set) (LImp S T) -> (S->T).
32 MApply '(ap S [_:S]T H H0).
35 Definition land_i: (S,T:Set) S -> T -> (LAnd S T).
37 MApply '(pair S [_:S]T H H0).
40 Definition land_e2: (T,S:Set) (LAnd S T) -> S.
45 Definition land_e1: (S,T:Set) (LAnd S T) -> T.
50 Definition all_e: (S:Set; a:S; P:S->Set) (All S P) -> (P a) := [S;a;P,f](ap S P f a).
52 Definition lex_i: (S:Set; a:S; P:S->Set) (P a) -> (LEx S P).
54 MApply '(pair S P a H).
57 Definition lex_e: (S:Set; P:S->Set; P0:(LEx S P)->Set) ((a:S; y:(P a)) (P0 (lex_i S a P y))) -> (s:(LEx S P)) (P0 s).
67 Definition One: Set := (List Empty).
69 Definition tt: One := (empty Empty).
71 Definition onerec: (P:One->Set) (P tt) -> (u:One) (P u).
77 Definition OneFam: (P:One->Type) (P tt) -> (u:One) (P u).
87 Definition Boole: Set := (Plus One One).
89 Definition false: Boole := (in_l One One tt).
91 Definition true: Boole := (in_r One One tt).
93 Definition ite: (P:Boole->Set) (P false) -> (P true) -> (b:Boole) (P b).
100 Definition BooleFam: (P:Boole->Type)
101 (P false) -> (P true) -> (b:Boole) (P b).
108 Definition BF: Set -> Set -> Boole -> Set := (BooleFam [_]Set).
110 Definition Two: Set := Boole.
120 Theorem Top_fold: (P:Set->Set) (P Top) -> (P (Imp Bot Bot)).
122 Apply (sid_repl (Imp Bot Bot) Top).
131 Theorem LTop_red: LTop.
138 Theorem Top_And_red: (A:Set) A -> (And Top A).
149 Section Logic_Results.
151 Section boole_indipendence.
153 Axiom lor_p4: (A,B:Set; a:A; b:B)
154 (Id (LOr A B) (in_l A B a) (in_r A B b)) -> Empty.
156 Axiom boole_p4: (Id Boole false true) -> Empty. (**)
158 End boole_indipendence.
160 Section logic_results.
162 Theorem lor_e: (A,B,C:Set) (A -> C) -> (B -> C) -> (LOr A B) -> C.
164 MApply '(when A B [_:?]C).
169 Theorem lnot_i: (S:Set) (S -> LBot) -> (LNot S).
176 Theorem lnot_e: (S:Set) (LNot S) -> S -> LBot.
182 Theorem liff_i: (A,B:Set) (A -> B) -> (B -> A) -> (LIff A B).
185 (MApply land_i; MApply limp_i).
190 Theorem liff_e1: (A,B:Set) A -> (LIff A B) -> B.
194 MApply '(land_e2 (LImp B A)).
197 Theorem liff_e2: (B,A:Set) B -> (LIff A B) -> A.
201 MApply '(land_e1 (LImp A B)).
204 Theorem iff_trans: (C,A,B:Set) (Iff A C) -> (Iff C B) -> (Iff A B).
213 Theorem iff_sym: (A,B:Set) (Iff B A) -> (Iff A B).
220 Theorem lnot_liff_lbot: (A:Set) (LIff A (LNot A)) -> LBot.
222 MApply '(lnot_e (LNot A)).
225 MApply '(liff_e2 (LNot A)).
231 Theorem imp_r: (A:Set) (Imp A A).
236 Theorem imp_trans: (C,A,B:Set) (Imp A C) -> (Imp C B) -> (Imp A B).
243 Theorem all_sigma_l: (S:Set; T:S->Set; P:(Sigma S T)->Set) ((a:S; b:(T a)) (P (pair S T a b))) -> (p:(Sigma S T)) (P p).