2 ||M|| This file is part of HELM, an Hypertextual, Electronic
3 ||A|| Library of Mathematics, developed at the Computer Science
4 ||T|| Department of the University of Bologna, Italy.
8 \ / This file is distributed under the terms of the
9 \ / GNU General Public License Version 2
10 V_______________________________________________________________ *)
12 include "basics/pts.ma".
13 include "hints_declaration.ma".
15 (* propositional equality *)
17 inductive eq (A:Type[2]) (x:A) : A → Prop ≝
20 interpretation "leibnitz's equality" 'eq t x y = (eq t x y).
21 interpretation "leibniz reflexivity" 'refl = refl.
24 ∀A.∀a,x.∀p:
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 ? x a.∀P: ∀x:A.
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 ? x a → Type[3]. P a (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 A a) → P x p.
25 #A #a #x #p (cases p) // qed.
28 ∀A.∀a.∀P: ∀x:A. x
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 a → Prop. P a (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 A a) → ∀x.∀p:
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 ? x a.P x p.
29 #A #a #P #p #x0 #p0; @(
\ 5a href="cic:/matita/basics/logic/eq_rect_r.def(1)"
\ 6eq_rect_r
\ 5/a
\ 6 ? ? ? p0) //; qed.
31 lemma eq_rect_Type0_r:
32 ∀A.∀a.∀P: ∀x:A.
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 ? x a → Type[0]. P a (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 A a) → ∀x.∀p:
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 ? x a.P x p.
33 #A #a #P #H #x #p lapply H lapply P
36 lemma eq_rect_Type1_r:
37 ∀A.∀a.∀P: ∀x:A.
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 ? x a → Type[1]. P a (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 A a) → ∀x.∀p:
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 ? x a.P x p.
38 #A #a #P #H #x #p lapply H lapply P
41 lemma eq_rect_Type2_r:
42 ∀A.∀a.∀P: ∀x:A.
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 ? x a → Type[2]. P a (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 A a) → ∀x.∀p:
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 ? x a.P x p.
43 #A #a #P #H #x #p lapply H lapply P
46 lemma eq_rect_Type3_r:
47 ∀A.∀a.∀P: ∀x:A.
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 ? x a → Type[3]. P a (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 A a) → ∀x.∀p:
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 ? x a.P x p.
48 #A #a #P #H #x #p lapply H lapply P
51 theorem rewrite_l: ∀A:Type[2].∀x.∀P:A → Type[2]. P x → ∀y. x
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 y → P y.
52 #A #x #P #Hx #y #Heq (cases Heq); //; qed.
54 theorem sym_eq: ∀A.∀x,y:A. x
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 y → y
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 x.
55 #A #x #y #Heq @(
\ 5a href="cic:/matita/basics/logic/rewrite_l.def(1)"
\ 6rewrite_l
\ 5/a
\ 6 A x (λz.z
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6x)) // qed.
57 theorem rewrite_r: ∀A:Type[2].∀x.∀P:A → Type[2]. P x → ∀y. y
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 x → P y.
58 #A #x #P #Hx #y #Heq (cases (
\ 5a href="cic:/matita/basics/logic/sym_eq.def(2)"
\ 6sym_eq
\ 5/a
\ 6 ? ? ? Heq)); //; qed.
60 theorem eq_coerc: ∀A,B:Type[0].A→(A
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6B)→B.
61 #A #B #Ha #Heq (elim Heq); //; qed.
63 theorem trans_eq : ∀A.∀x,y,z:A. x
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 y → y
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 z → x
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 z.
64 #A #x #y #z #H1 #H2 >H1; //; qed.
66 theorem eq_f: ∀A,B.∀f:A→B.∀x,y:A. x
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6y → f x
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 f y.
67 #A #B #f #x #y #H >H; //; qed.
69 (* deleterio per auto? *)
70 theorem eq_f2: ∀A,B,C.∀f:A→B→C.
71 ∀x1,x2:A.∀y1,y2:B. x1
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6x2 → y1
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6y2 → f x1 y1
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 f x2 y2.
72 #A #B #C #f #x1 #x2 #y1 #y2 #E1 #E2 >E1; >E2; //; qed.
74 lemma eq_f3: ∀A,B,C,D.∀f:A→B→C->D.
75 ∀x1,x2:A.∀y1,y2:B. ∀z1,z2:C. x1
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6x2 → y1
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6y2 → z1
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6z2 → f x1 y1 z1
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 f x2 y2 z2.
76 #A #B #C #D #f #x1 #x2 #y1 #y2 #z1 #z2 #E1 #E2 #E3 >E1; >E2; >E3 //; qed.
78 (* hint to genereric equality
79 definition eq_equality: equality ≝
80 mk_equality eq refl rewrite_l rewrite_r.
83 unification hint 0 ≔ T,a,b;
85 (*------------------------------------*) ⊢
86 equal X T a b ≡ eq T a b.
89 (********** connectives ********)
91 inductive True: Prop ≝
94 inductive False: Prop ≝ .
96 (* ndefinition Not: Prop → Prop ≝
99 inductive Not (A:Prop): Prop ≝
100 nmk: (A →
\ 5a href="cic:/matita/basics/logic/False.ind(1,0,0)"
\ 6False
\ 5/a
\ 6) → Not A.
102 interpretation "logical not" 'not x = (Not x).
104 theorem absurd : ∀A:Prop. A →
\ 5a title="logical not" href="cic:/fakeuri.def(1)"
\ 6¬
\ 5/a
\ 6A →
\ 5a href="cic:/matita/basics/logic/False.ind(1,0,0)"
\ 6False
\ 5/a
\ 6.
105 #A #H #Hn (elim Hn); /
\ 5span class="autotactic"
\ 62
\ 5span class="autotrace"
\ 6 trace
\ 5/span
\ 6\ 5/span
\ 6/; qed.
108 ntheorem absurd : ∀ A,C:Prop. A → ¬A → C.
109 #A; #C; #H; #Hn; nelim (Hn H).
112 theorem not_to_not : ∀A,B:Prop. (A → B) →
\ 5a title="logical not" href="cic:/fakeuri.def(1)"
\ 6¬
\ 5/a
\ 6B →
\ 5a title="logical not" href="cic:/fakeuri.def(1)"
\ 6¬
\ 5/a
\ 6A.
113 /
\ 5span class="autotactic"
\ 64
\ 5span class="autotrace"
\ 6 trace
\ 5a href="cic:/matita/basics/logic/absurd.def(2)"
\ 6absurd
\ 5/a
\ 6,
\ 5a href="cic:/matita/basics/logic/Not.con(0,1,1)"
\ 6nmk
\ 5/a
\ 6\ 5/span
\ 6\ 5/span
\ 6/; qed.
116 interpretation "leibnitz's non-equality" 'neq t x y = (Not (eq t x y)).
118 theorem sym_not_eq: ∀A.∀x,y:A. x
\ 5a title="leibnitz's non-equality" href="cic:/fakeuri.def(1)"
\ 6≠
\ 5/a
\ 6 y → y
\ 5a title="leibnitz's non-equality" href="cic:/fakeuri.def(1)"
\ 6≠
\ 5/a
\ 6 x.
119 /
\ 5span class="autotactic"
\ 63
\ 5span class="autotrace"
\ 6 trace
\ 5a href="cic:/matita/basics/logic/absurd.def(2)"
\ 6absurd
\ 5/a
\ 6,
\ 5a href="cic:/matita/basics/logic/Not.con(0,1,1)"
\ 6nmk
\ 5/a
\ 6\ 5/span
\ 6\ 5/span
\ 6/; qed.
122 inductive And (A,B:Prop) : Prop ≝
123 conj : A → B → And A B.
125 interpretation "logical and" 'and x y = (And x y).
127 theorem proj1: ∀A,B:Prop. A
\ 5a title="logical and" href="cic:/fakeuri.def(1)"
\ 6∧
\ 5/a
\ 6 B → A.
128 #A #B #AB (elim AB) //; qed.
130 theorem proj2: ∀ A,B:Prop. A
\ 5a title="logical and" href="cic:/fakeuri.def(1)"
\ 6∧
\ 5/a
\ 6 B → B.
131 #A #B #AB (elim AB) //; qed.
134 inductive Or (A,B:Prop) : Prop ≝
135 or_introl : A → (Or A B)
136 | or_intror : B → (Or A B).
138 interpretation "logical or" 'or x y = (Or x y).
140 definition decidable : Prop → Prop ≝
141 λ A:Prop. A
\ 5a title="logical or" href="cic:/fakeuri.def(1)"
\ 6∨
\ 5/a
\ 6 \ 5a title="logical not" href="cic:/fakeuri.def(1)"
\ 6¬
\ 5/a
\ 6 A.
144 inductive ex (A:Type[0]) (P:A → Prop) : Prop ≝
145 ex_intro: ∀ x:A. P x → ex A P.
147 interpretation "exists" 'exists x = (ex ? x).
149 inductive ex2 (A:Type[0]) (P,Q:A →Prop) : Prop ≝
150 ex_intro2: ∀ x:A. P x → Q x → ex2 A P Q.
154 λ A,B. (A → B)
\ 5a title="logical and" href="cic:/fakeuri.def(1)"
\ 6∧
\ 5/a
\ 6 (B → A).
156 interpretation "iff" 'iff a b = (iff a b).
158 lemma iff_sym: ∀A,B. A
\ 5a title="iff" href="cic:/fakeuri.def(1)"
\ 6↔
\ 5/a
\ 6 B → B
\ 5a title="iff" href="cic:/fakeuri.def(1)"
\ 6↔
\ 5/a
\ 6 A.
159 #A #B * /
\ 5span class="autotactic"
\ 63
\ 5span class="autotrace"
\ 6 trace
\ 5a href="cic:/matita/basics/logic/And.con(0,1,2)"
\ 6conj
\ 5/a
\ 6\ 5/span
\ 6\ 5/span
\ 6/ qed.
161 lemma iff_trans:∀A,B,C. A
\ 5a title="iff" href="cic:/fakeuri.def(1)"
\ 6↔
\ 5/a
\ 6 B → B
\ 5a title="iff" href="cic:/fakeuri.def(1)"
\ 6↔
\ 5/a
\ 6 C → A
\ 5a title="iff" href="cic:/fakeuri.def(1)"
\ 6↔
\ 5/a
\ 6 C.
162 #A #B #C * #H1 #H2 * #H3 #H4 % /
\ 5span class="autotactic"
\ 63
\ 5span class="autotrace"
\ 6 trace
\ 5/span
\ 6\ 5/span
\ 6/ qed.
164 lemma iff_not: ∀A,B. A
\ 5a title="iff" href="cic:/fakeuri.def(1)"
\ 6↔
\ 5/a
\ 6 B →
\ 5a title="logical not" href="cic:/fakeuri.def(1)"
\ 6¬
\ 5/a
\ 6A
\ 5a title="iff" href="cic:/fakeuri.def(1)"
\ 6↔
\ 5/a
\ 6 \ 5a title="logical not" href="cic:/fakeuri.def(1)"
\ 6¬
\ 5/a
\ 6B.
165 #A #B * #H1 #H2 % /
\ 5span class="autotactic"
\ 63
\ 5span class="autotrace"
\ 6 trace
\ 5a href="cic:/matita/basics/logic/not_to_not.def(3)"
\ 6not_to_not
\ 5/a
\ 6\ 5/span
\ 6\ 5/span
\ 6/ qed.
167 lemma iff_and_l: ∀A,B,C. A
\ 5a title="iff" href="cic:/fakeuri.def(1)"
\ 6↔
\ 5/a
\ 6 B → C
\ 5a title="logical and" href="cic:/fakeuri.def(1)"
\ 6∧
\ 5/a
\ 6 A
\ 5a title="iff" href="cic:/fakeuri.def(1)"
\ 6↔
\ 5/a
\ 6 C
\ 5a title="logical and" href="cic:/fakeuri.def(1)"
\ 6∧
\ 5/a
\ 6 B.
168 #A #B #C * #H1 #H2 % * /
\ 5span class="autotactic"
\ 63
\ 5span class="autotrace"
\ 6 trace
\ 5a href="cic:/matita/basics/logic/And.con(0,1,2)"
\ 6conj
\ 5/a
\ 6\ 5/span
\ 6\ 5/span
\ 6/ qed.
170 lemma iff_and_r: ∀A,B,C. A
\ 5a title="iff" href="cic:/fakeuri.def(1)"
\ 6↔
\ 5/a
\ 6 B → A
\ 5a title="logical and" href="cic:/fakeuri.def(1)"
\ 6∧
\ 5/a
\ 6 C
\ 5a title="iff" href="cic:/fakeuri.def(1)"
\ 6↔
\ 5/a
\ 6 B
\ 5a title="logical and" href="cic:/fakeuri.def(1)"
\ 6∧
\ 5/a
\ 6 C.
171 #A #B #C * #H1 #H2 % * /
\ 5span class="autotactic"
\ 63
\ 5span class="autotrace"
\ 6 trace
\ 5a href="cic:/matita/basics/logic/And.con(0,1,2)"
\ 6conj
\ 5/a
\ 6\ 5/span
\ 6\ 5/span
\ 6/ qed.
173 lemma iff_or_l: ∀A,B,C. A
\ 5a title="iff" href="cic:/fakeuri.def(1)"
\ 6↔
\ 5/a
\ 6 B → C
\ 5a title="logical or" href="cic:/fakeuri.def(1)"
\ 6∨
\ 5/a
\ 6 A
\ 5a title="iff" href="cic:/fakeuri.def(1)"
\ 6↔
\ 5/a
\ 6 C
\ 5a title="logical or" href="cic:/fakeuri.def(1)"
\ 6∨
\ 5/a
\ 6 B.
174 #A #B #C * #H1 #H2 % * /
\ 5span class="autotactic"
\ 63
\ 5span class="autotrace"
\ 6 trace
\ 5a href="cic:/matita/basics/logic/Or.con(0,1,2)"
\ 6or_introl
\ 5/a
\ 6,
\ 5a href="cic:/matita/basics/logic/Or.con(0,2,2)"
\ 6or_intror
\ 5/a
\ 6\ 5/span
\ 6\ 5/span
\ 6/ qed.
176 lemma iff_or_r: ∀A,B,C. A
\ 5a title="iff" href="cic:/fakeuri.def(1)"
\ 6↔
\ 5/a
\ 6 B → A
\ 5a title="logical or" href="cic:/fakeuri.def(1)"
\ 6∨
\ 5/a
\ 6 C
\ 5a title="iff" href="cic:/fakeuri.def(1)"
\ 6↔
\ 5/a
\ 6 B
\ 5a title="logical or" href="cic:/fakeuri.def(1)"
\ 6∨
\ 5/a
\ 6 C.
177 #A #B #C * #H1 #H2 % * /
\ 5span class="autotactic"
\ 63
\ 5span class="autotrace"
\ 6 trace
\ 5a href="cic:/matita/basics/logic/Or.con(0,1,2)"
\ 6or_introl
\ 5/a
\ 6,
\ 5a href="cic:/matita/basics/logic/Or.con(0,2,2)"
\ 6or_intror
\ 5/a
\ 6\ 5/span
\ 6\ 5/span
\ 6/ qed.
179 (* cose per destruct: da rivedere *)
181 definition R0 ≝ λT:Type[0].λt:T.t.
183 definition R1 ≝
\ 5a href="cic:/matita/basics/logic/eq_rect_Type0.fix(0,5,1)"
\ 6eq_rect_Type0
\ 5/a
\ 6.
185 (* used for lambda-delta *)
189 ∀T1:∀x0:T0. a0
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6x0 → Type[0].
190 ∀a1:T1 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 ? a0).
191 ∀T2:∀x0:T0. ∀p0:a0
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6x0. ∀x1:T1 x0 p0.
\ 5a href="cic:/matita/basics/logic/R1.def(2)"
\ 6R1
\ 5/a
\ 6 ?? T1 a1 ? p0
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 x1 → Type[0].
192 ∀a2:T2 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 ? a0) a1 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 ? a1).
194 ∀e0:a0
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 b0.
196 ∀e1:
\ 5a href="cic:/matita/basics/logic/R1.def(2)"
\ 6R1
\ 5/a
\ 6 ?? T1 a1 ? e0
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 b1.
198 #T0 #a0 #T1 #a1 #T2 #a2 #b0 #e0 #b1 #e1
199 @(
\ 5a href="cic:/matita/basics/logic/eq_rect_Type0.fix(0,5,1)"
\ 6eq_rect_Type0
\ 5/a
\ 6 ????? e1)
200 @(
\ 5a href="cic:/matita/basics/logic/R1.def(2)"
\ 6R1
\ 5/a
\ 6 ?? ? ?? e0)
207 ∀T1:∀x0:T0. a0
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6x0 → Type[0].
208 ∀a1:T1 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 ? a0).
209 ∀T2:∀x0:T0. ∀p0:a0
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6x0. ∀x1:T1 x0 p0.
\ 5a href="cic:/matita/basics/logic/R1.def(2)"
\ 6R1
\ 5/a
\ 6 ?? T1 a1 ? p0
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 x1 → Type[0].
210 ∀a2:T2 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 ? a0) a1 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 ? a1).
211 ∀T3:∀x0:T0. ∀p0:a0
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6x0. ∀x1:T1 x0 p0.∀p1:
\ 5a href="cic:/matita/basics/logic/R1.def(2)"
\ 6R1
\ 5/a
\ 6 ?? T1 a1 ? p0
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 x1.
212 ∀x2:T2 x0 p0 x1 p1.
\ 5a href="cic:/matita/basics/logic/R2.def(3)"
\ 6R2
\ 5/a
\ 6 ???? T2 a2 x0 p0 ? p1
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 x2 → Type[0].
213 ∀a3:T3 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 ? a0) a1 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 ? a1) a2 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 ? a2).
215 ∀e0:a0
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 b0.
217 ∀e1:
\ 5a href="cic:/matita/basics/logic/R1.def(2)"
\ 6R1
\ 5/a
\ 6 ?? T1 a1 ? e0
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 b1.
219 ∀e2:
\ 5a href="cic:/matita/basics/logic/R2.def(3)"
\ 6R2
\ 5/a
\ 6 ???? T2 a2 b0 e0 ? e1
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 b2.
220 T3 b0 e0 b1 e1 b2 e2.
221 #T0 #a0 #T1 #a1 #T2 #a2 #T3 #a3 #b0 #e0 #b1 #e1 #b2 #e2
222 @(
\ 5a href="cic:/matita/basics/logic/eq_rect_Type0.fix(0,5,1)"
\ 6eq_rect_Type0
\ 5/a
\ 6 ????? e2)
223 @(
\ 5a href="cic:/matita/basics/logic/R2.def(3)"
\ 6R2
\ 5/a
\ 6 ?? ? ???? e0 ? e1)
230 ∀T1:∀x0:T0.
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 T0 a0 x0 → Type[0].
231 ∀a1:T1 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 T0 a0).
232 ∀T2:∀x0:T0. ∀p0:
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 (T0 …) a0 x0. ∀x1:T1 x0 p0.
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 (T1 …) (
\ 5a href="cic:/matita/basics/logic/R1.def(2)"
\ 6R1
\ 5/a
\ 6 T0 a0 T1 a1 x0 p0) x1 → Type[0].
233 ∀a2:T2 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 T0 a0) a1 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 (T1 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 T0 a0)) a1).
234 ∀T3:∀x0:T0. ∀p0:
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 (T0 …) a0 x0. ∀x1:T1 x0 p0.∀p1:
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 (T1 …) (
\ 5a href="cic:/matita/basics/logic/R1.def(2)"
\ 6R1
\ 5/a
\ 6 T0 a0 T1 a1 x0 p0) x1.
235 ∀x2:T2 x0 p0 x1 p1.
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 (T2 …) (
\ 5a href="cic:/matita/basics/logic/R2.def(3)"
\ 6R2
\ 5/a
\ 6 T0 a0 T1 a1 T2 a2 x0 p0 x1 p1) x2 → Type[0].
236 ∀a3:T3 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 T0 a0) a1 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 (T1 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 T0 a0)) a1)
237 a2 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 (T2 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 T0 a0) a1 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 (T1 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 T0 a0)) a1)) a2).
238 ∀T4:∀x0:T0. ∀p0:
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 (T0 …) a0 x0. ∀x1:T1 x0 p0.∀p1:
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 (T1 …) (
\ 5a href="cic:/matita/basics/logic/R1.def(2)"
\ 6R1
\ 5/a
\ 6 T0 a0 T1 a1 x0 p0) x1.
239 ∀x2:T2 x0 p0 x1 p1.∀p2:
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 (T2 …) (
\ 5a href="cic:/matita/basics/logic/R2.def(3)"
\ 6R2
\ 5/a
\ 6 T0 a0 T1 a1 T2 a2 x0 p0 x1 p1) x2.
240 ∀x3:T3 x0 p0 x1 p1 x2 p2.∀p3:
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 (T3 …) (
\ 5a href="cic:/matita/basics/logic/R3.def(4)"
\ 6R3
\ 5/a
\ 6 T0 a0 T1 a1 T2 a2 T3 a3 x0 p0 x1 p1 x2 p2) x3.
242 ∀a4:T4 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 T0 a0) a1 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 (T1 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 T0 a0)) a1)
243 a2 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 (T2 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 T0 a0) a1 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 (T1 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 T0 a0)) a1)) a2)
244 a3 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 (T3 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 T0 a0) a1 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 (T1 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 T0 a0)) a1)
245 a2 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 (T2 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 T0 a0) a1 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 (T1 a0 (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 T0 a0)) a1)) a2))
248 ∀e0:
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 (T0 …) a0 b0.
250 ∀e1:
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 (T1 …) (
\ 5a href="cic:/matita/basics/logic/R1.def(2)"
\ 6R1
\ 5/a
\ 6 T0 a0 T1 a1 b0 e0) b1.
252 ∀e2:
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 (T2 …) (
\ 5a href="cic:/matita/basics/logic/R2.def(3)"
\ 6R2
\ 5/a
\ 6 T0 a0 T1 a1 T2 a2 b0 e0 b1 e1) b2.
253 ∀b3: T3 b0 e0 b1 e1 b2 e2.
254 ∀e3:
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 (T3 …) (
\ 5a href="cic:/matita/basics/logic/R3.def(4)"
\ 6R3
\ 5/a
\ 6 T0 a0 T1 a1 T2 a2 T3 a3 b0 e0 b1 e1 b2 e2) b3.
255 T4 b0 e0 b1 e1 b2 e2 b3 e3.
256 #T0 #a0 #T1 #a1 #T2 #a2 #T3 #a3 #T4 #a4 #b0 #e0 #b1 #e1 #b2 #e2 #b3 #e3
257 @(
\ 5a href="cic:/matita/basics/logic/eq_rect_Type0.fix(0,5,1)"
\ 6eq_rect_Type0
\ 5/a
\ 6 ????? e3)
258 @(
\ 5a href="cic:/matita/basics/logic/R3.def(4)"
\ 6R3
\ 5/a
\ 6 ????????? e0 ? e1 ? e2)
262 definition eqProp ≝ λA:Prop.
\ 5a href="cic:/matita/basics/logic/eq.ind(1,0,2)"
\ 6eq
\ 5/a
\ 6 A.
264 (* Example to avoid indexing and the consequential creation of ill typed
265 terms during paramodulation *)
266 example lemmaK : ∀A.∀x:A.∀h:x
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6x.
\ 5a href="cic:/matita/basics/logic/eqProp.def(1)"
\ 6eqProp
\ 5/a
\ 6 ? h (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 A x).
267 #A #x #h @(
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 ? h:
\ 5a href="cic:/matita/basics/logic/eqProp.def(1)"
\ 6eqProp
\ 5/a
\ 6 ? ? ?).
270 theorem streicherK : ∀T:Type[2].∀t:T.∀P:t
\ 5a title="leibnitz's equality" href="cic:/fakeuri.def(1)"
\ 6=
\ 5/a
\ 6 t → Type[3].P (
\ 5a href="cic:/matita/basics/logic/eq.con(0,1,2)"
\ 6refl
\ 5/a
\ 6 ? t) → ∀p.P p.
271 #T #t #P #H #p >(
\ 5a href="cic:/matita/basics/logic/lemmaK.def(2)"
\ 6lemmaK
\ 5/a
\ 6 T t p) @H