]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/limits/u0_preds.ma
beginning of minimalist foundation from a student of Milly
[helm.git] / matita / matita / contribs / limits / u0_preds.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "preamble.ma".
16
17 (* PREDICATES *********************************************************)
18
19 definition u0_predicate1: Type[0] → Type[1] ≝ λT.T → Prop.
20
21 definition u0_predicate2: Type[0] → Type[1] ≝ λT.T → u0_predicate1 T.
22
23 definition u1_predicate1: Type[1] → Type[2] ≝ λT.T → Prop.
24
25 definition u1_predicate2: Type[1] → Type[2] ≝ λT.T → u1_predicate1 T.
26
27 definition u0_full: ∀T:Type[0]. u0_predicate1 T ≝ λT,a. ⊤.
28
29 definition u0_empty: ∀T:Type[0]. u0_predicate1 T ≝ λT,a. ⊥.
30
31 definition u0_quantifier: Type[0] → Type[2] ≝ λT. u1_predicate2 (u0_predicate1 T).
32
33 definition u0_all: ∀T:Type[0]. u0_quantifier T ≝ λT,I,P. ∀a. I a → P a.
34
35 definition u0_ex: ∀T:Type[0]. u0_quantifier T ≝ λT,I,P. ∃a. I a ∧ P a.
36
37 definition u0_refl (T:Type[0]) (I:u0_predicate1 T) (P:u0_predicate2 T): Prop ≝
38                    u0_all T I (λa. P a a).
39
40 definition u0_sym (T:Type[0]) (I:u0_predicate1 T) (P:u0_predicate2 T): Prop ≝
41                   u0_all T I (λa1. u0_all T I (λa2. P a2 a1 → P a1 a2)).
42
43 definition u0_trans (T:Type[0]) (I:u0_predicate1 T) (P:u0_predicate2 T): Prop ≝
44                     u0_all T I (λa1. u0_all T I (λa. P a1 a → (u0_all T I (λa2. P a a2 → P a1 a2)))).
45
46 definition u0_conf (T:Type[0]) (I:u0_predicate1 T) (P:u0_predicate2 T): Prop ≝
47                    u0_all T I (λa. u0_all T I (λa1. P a a1 → (u0_all T I (λa2. P a a2 → P a1 a2)))).
48
49 definition u0_div (T:Type[0]) (I:u0_predicate1 T) (P:u0_predicate2 T): Prop ≝
50                   u0_all T I (λa1. u0_all T I (λa. P a1 a → (u0_all T I (λa2. P a2 a → P a1 a2)))).
51
52 definition u0_repl2 (T:Type[0]) (I:u0_predicate1 T) (Q:u0_predicate2 T) (P:u0_predicate2 T): Prop ≝
53                     u0_all T I (λa1. u0_all T I (λa2. P a1 a2 → u0_all T I (λb1. u0_all T I (λb2. Q b1 a1 → Q b2 a2 → P b1 b2)))).
54
55 definition u0_hom1 (T:Type[0]) (I:u0_predicate1 T) (U:Type[0]) (f:T → U) (P:u0_predicate1 T) (Q:u0_predicate1 U) : Prop ≝
56                    u0_all T I (λa. P a → Q (f a)).
57
58 definition u0_hom2 (T:Type[0]) (I:u0_predicate1 T) (U:Type[0]) (f:T → U) (P:u0_predicate2 T) (Q:u0_predicate2 U) : Prop ≝
59                    u0_all T I (λa1. u0_all T I (λa2. P a1 a2 → Q (f a1) (f a2))).
60
61 definition u0_xeq (T:Type[0]) (I:u0_predicate1 T) (U:Type[0]) (Q:u0_predicate2 U): u0_predicate2 (T → U) ≝
62                   λf,g. u0_all T I (λa. Q (f a) (g a)).
63
64 (* Basic properties ***************************************************)
65
66 lemma u0_refl_repl_sym: ∀T,I,P. u0_refl T I P → u0_repl2 T I P P → u0_sym T I P.
67 normalize /3 width=7 by/ qed-.
68
69 lemma u0_refl_repl_trans: ∀T,I,P. u0_refl T I P → u0_repl2 T I P P → u0_trans T I P.
70 normalize /3 width=7 by/ qed-.
71
72 lemma u0_refl_repl_conf: ∀T,I,P. u0_refl T I P → u0_repl2 T I P P → u0_conf T I P.
73 #T #I #P
74 (*
75 /3 width=1 by (u0_refl_repl_trans T I P), (u0_refl_repl_sym T I P)/ 
76 *)
77 #H1 #H2 #a #Ha #a1 #Ha1 #Haa1
78 @(u0_refl_repl_trans T I P) /2 width=7 by/
79 @(u0_refl_repl_sym T I P) /2 width=7 by/
80 qed-.
81
82 lemma u0_refl_repl_div: ∀T,I,P. u0_refl T I P → u0_repl2 T I P P → u0_div T I P.
83 #T #I #P #H1 #H2 #a1 #Ha1 #a #Ha #Ha1a #a2 #Ha2 #Ha2a
84 @(u0_refl_repl_trans T I P … a) /2 width=7 by/
85 @(u0_refl_repl_sym T I P) /2 width=7 by/
86 qed-.