DEFINITION pr3_gen_cast()
TYPE =
∀c:C
.∀u1:T
.∀t1:T
.∀x:T
.pr3 c (THead (Flat Cast) u1 t1) x
→or (ex3_2 T T λu2:T.λt2:T.eq T x (THead (Flat Cast) u2 t2) λu2:T.λ:T.pr3 c u1 u2 λ:T.λt2:T.pr3 c t1 t2) (pr3 c t1 x)
BODY =
assume c: C
assume u1: T
assume t1: T
assume x: T
suppose H: pr3 c (THead (Flat Cast) u1 t1) x
assume y: T
suppose H0: pr3 c y x
we proceed by induction on H0 to prove
∀x0:T
.∀x1:T
.eq T y (THead (Flat Cast) x0 x1)
→or (ex3_2 T T λu2:T.λt2:T.eq T x (THead (Flat Cast) u2 t2) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt2:T.pr3 c x1 t2) (pr3 c x1 x)
case pr3_refl : t:T ⇒
the thesis becomes
∀x0:T
.∀x1:T
.∀H1:eq T t (THead (Flat Cast) x0 x1)
.or (ex3_2 T T λu2:T.λt2:T.eq T t (THead (Flat Cast) u2 t2) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt2:T.pr3 c x1 t2) (pr3 c x1 t)
assume x0: T
assume x1: T
suppose H1: eq T t (THead (Flat Cast) x0 x1)
(h1)
by (refl_equal . .)
eq T (THead (Flat Cast) x0 x1) (THead (Flat Cast) x0 x1)
end of h1
(h2) by (pr3_refl . .) we proved pr3 c x0 x0
(h3) by (pr3_refl . .) we proved pr3 c x1 x1
by (ex3_2_intro . . . . . . . h1 h2 h3)
we proved
ex3_2
T
T
λu2:T.λt2:T.eq T (THead (Flat Cast) x0 x1) (THead (Flat Cast) u2 t2)
λu2:T.λ:T.pr3 c x0 u2
λ:T.λt2:T.pr3 c x1 t2
by (or_introl . . previous)
we proved
or
ex3_2
T
T
λu2:T.λt2:T.eq T (THead (Flat Cast) x0 x1) (THead (Flat Cast) u2 t2)
λu2:T.λ:T.pr3 c x0 u2
λ:T.λt2:T.pr3 c x1 t2
pr3 c x1 (THead (Flat Cast) x0 x1)
by (eq_ind_r . . . previous . H1)
we proved
or (ex3_2 T T λu2:T.λt2:T.eq T t (THead (Flat Cast) u2 t2) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt2:T.pr3 c x1 t2) (pr3 c x1 t)
∀x0:T
.∀x1:T
.∀H1:eq T t (THead (Flat Cast) x0 x1)
.or (ex3_2 T T λu2:T.λt2:T.eq T t (THead (Flat Cast) u2 t2) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt2:T.pr3 c x1 t2) (pr3 c x1 t)
case pr3_sing : t2:T t3:T H1:pr2 c t3 t2 t4:T H2:pr3 c t2 t4 ⇒
the thesis becomes
∀x0:T
.∀x1:T
.∀H4:eq T t3 (THead (Flat Cast) x0 x1)
.or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
(H3) by induction hypothesis we know
∀x0:T
.∀x1:T
.eq T t2 (THead (Flat Cast) x0 x1)
→or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
assume x0: T
assume x1: T
suppose H4: eq T t3 (THead (Flat Cast) x0 x1)
(H5)
we proceed by induction on H4 to prove pr2 c (THead (Flat Cast) x0 x1) t2
case refl_equal : ⇒
the thesis becomes the hypothesis H1
pr2 c (THead (Flat Cast) x0 x1) t2
end of H5
(H6)
by (pr2_gen_cast . . . . H5)
or (ex3_2 T T λu2:T.λt2:T.eq T t2 (THead (Flat Cast) u2 t2) λu2:T.λ:T.pr2 c x0 u2 λ:T.λt2:T.pr2 c x1 t2) (pr2 c x1 t2)
end of H6
we proceed by induction on H6 to prove or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
case or_introl : H7:ex3_2 T T λu2:T.λt5:T.eq T t2 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr2 c x0 u2 λ:T.λt5:T.pr2 c x1 t5 ⇒
the thesis becomes or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
we proceed by induction on H7 to prove or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
case ex3_2_intro : x2:T x3:T H8:eq T t2 (THead (Flat Cast) x2 x3) H9:pr2 c x0 x2 H10:pr2 c x1 x3 ⇒
the thesis becomes or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
(H11)
we proceed by induction on H8 to prove
∀x4:T
.∀x5:T
.eq T (THead (Flat Cast) x2 x3) (THead (Flat Cast) x4 x5)
→or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x4 u2 λ:T.λt5:T.pr3 c x5 t5) (pr3 c x5 t4)
case refl_equal : ⇒
the thesis becomes the hypothesis H3
∀x4:T
.∀x5:T
.eq T (THead (Flat Cast) x2 x3) (THead (Flat Cast) x4 x5)
→or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x4 u2 λ:T.λt5:T.pr3 c x5 t5) (pr3 c x5 t4)
end of H11
(H12)
by (refl_equal . .)
we proved eq T (THead (Flat Cast) x2 x3) (THead (Flat Cast) x2 x3)
by (H11 . . previous)
or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x2 u2 λ:T.λt5:T.pr3 c x3 t5) (pr3 c x3 t4)
end of H12
we proceed by induction on H12 to prove or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
case or_introl : H13:ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x2 u2 λ:T.λt5:T.pr3 c x3 t5 ⇒
the thesis becomes or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
we proceed by induction on H13 to prove or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
case ex3_2_intro : x4:T x5:T H14:eq T t4 (THead (Flat Cast) x4 x5) H15:pr3 c x2 x4 H16:pr3 c x3 x5 ⇒
the thesis becomes or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
(h1)
by (refl_equal . .)
eq T (THead (Flat Cast) x4 x5) (THead (Flat Cast) x4 x5)
end of h1
(h2)
by (pr3_sing . . . H9 . H15)
pr3 c x0 x4
end of h2
(h3)
by (pr3_sing . . . H10 . H16)
pr3 c x1 x5
end of h3
by (ex3_2_intro . . . . . . . h1 h2 h3)
we proved
ex3_2
T
T
λu2:T.λt5:T.eq T (THead (Flat Cast) x4 x5) (THead (Flat Cast) u2 t5)
λu2:T.λ:T.pr3 c x0 u2
λ:T.λt5:T.pr3 c x1 t5
by (or_introl . . previous)
we proved
or
ex3_2
T
T
λu2:T.λt5:T.eq T (THead (Flat Cast) x4 x5) (THead (Flat Cast) u2 t5)
λu2:T.λ:T.pr3 c x0 u2
λ:T.λt5:T.pr3 c x1 t5
pr3 c x1 (THead (Flat Cast) x4 x5)
by (eq_ind_r . . . previous . H14)
or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
case or_intror : H13:pr3 c x3 t4 ⇒
the thesis becomes or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
by (pr3_sing . . . H10 . H13)
we proved pr3 c x1 t4
by (or_intror . . previous)
or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
case or_intror : H7:pr2 c x1 t2 ⇒
the thesis becomes or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
by (pr3_sing . . . H7 . H2)
we proved pr3 c x1 t4
by (or_intror . . previous)
or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
we proved or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
∀x0:T
.∀x1:T
.∀H4:eq T t3 (THead (Flat Cast) x0 x1)
.or (ex3_2 T T λu2:T.λt5:T.eq T t4 (THead (Flat Cast) u2 t5) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt5:T.pr3 c x1 t5) (pr3 c x1 t4)
we proved
∀x0:T
.∀x1:T
.eq T y (THead (Flat Cast) x0 x1)
→or (ex3_2 T T λu2:T.λt2:T.eq T x (THead (Flat Cast) u2 t2) λu2:T.λ:T.pr3 c x0 u2 λ:T.λt2:T.pr3 c x1 t2) (pr3 c x1 x)
by (unintro . . . previous)
we proved
∀x0:T
.eq T y (THead (Flat Cast) u1 x0)
→or (ex3_2 T T λu2:T.λt2:T.eq T x (THead (Flat Cast) u2 t2) λu2:T.λ:T.pr3 c u1 u2 λ:T.λt2:T.pr3 c x0 t2) (pr3 c x0 x)
by (unintro . . . previous)
we proved
eq T y (THead (Flat Cast) u1 t1)
→or (ex3_2 T T λu2:T.λt2:T.eq T x (THead (Flat Cast) u2 t2) λu2:T.λ:T.pr3 c u1 u2 λ:T.λt2:T.pr3 c t1 t2) (pr3 c t1 x)
we proved
∀y:T
.pr3 c y x
→(eq T y (THead (Flat Cast) u1 t1)
→or (ex3_2 T T λu2:T.λt2:T.eq T x (THead (Flat Cast) u2 t2) λu2:T.λ:T.pr3 c u1 u2 λ:T.λt2:T.pr3 c t1 t2) (pr3 c t1 x))
by (insert_eq . . . . previous H)
we proved
or (ex3_2 T T λu2:T.λt2:T.eq T x (THead (Flat Cast) u2 t2) λu2:T.λ:T.pr3 c u1 u2 λ:T.λt2:T.pr3 c t1 t2) (pr3 c t1 x)
we proved
∀c:C
.∀u1:T
.∀t1:T
.∀x:T
.pr3 c (THead (Flat Cast) u1 t1) x
→or (ex3_2 T T λu2:T.λt2:T.eq T x (THead (Flat Cast) u2 t2) λu2:T.λ:T.pr3 c u1 u2 λ:T.λt2:T.pr3 c t1 t2) (pr3 c t1 x)