Let a and b be given.
Apply HJ to the current goal.
Assume Hleft Hdir.
Apply Hleft to the current goal.
Assume HJne Hpo.
We prove the intermediate
claim Htrans:
∀a b c : set, a ∈ J → b ∈ J → c ∈ J → (a,b) ∈ le → (b,c) ∈ le → (a,c) ∈ le.
We prove the intermediate
claim HaJ:
a ∈ J.
An exact proof term for the current goal is (HK a HaK).
We prove the intermediate
claim HbJ:
b ∈ J.
An exact proof term for the current goal is (HK b HbK).
We prove the intermediate
claim Hexm:
∃m : set, m ∈ J ∧ (a,m) ∈ le ∧ (b,m) ∈ le.
An exact proof term for the current goal is (Hdir a b HaJ HbJ).
Apply Hexm to the current goal.
Let m be given.
Assume Hm.
Apply Hm to the current goal.
Assume Hmleft Hbm.
Apply Hmleft to the current goal.
Assume HmJ Ham.
We prove the intermediate
claim Hexk:
∃k : set, k ∈ K ∧ (m,k) ∈ le.
An exact proof term for the current goal is (Hcofinal m HmJ).
Apply Hexk to the current goal.
Let k be given.
Assume Hkpair.
We prove the intermediate
claim HkK:
k ∈ K.
An
exact proof term for the current goal is
(andEL (k ∈ K) ((m,k) ∈ le) Hkpair).
We prove the intermediate
claim Hmk:
(m,k) ∈ le.
An
exact proof term for the current goal is
(andER (k ∈ K) ((m,k) ∈ le) Hkpair).
We prove the intermediate
claim HkJ:
k ∈ J.
An exact proof term for the current goal is (HK k HkK).
We prove the intermediate
claim Hak:
(a,k) ∈ le.
An exact proof term for the current goal is (Htrans a m k HaJ HmJ HkJ Ham Hmk).
We prove the intermediate
claim Hbk:
(b,k) ∈ le.
An exact proof term for the current goal is (Htrans b m k HbJ HmJ HkJ Hbm Hmk).
We use k to witness the existential quantifier.
Apply andI to the current goal.
Apply andI to the current goal.
An exact proof term for the current goal is HkK.
Apply (SepI le (λp : set ⇒ p 0 ∈ K ∧ p 1 ∈ K) (a,k) Hak) to the current goal.
Apply andI to the current goal.
rewrite the current goal using
(tuple_2_0_eq a k) (from left to right).
An exact proof term for the current goal is HaK.
rewrite the current goal using
(tuple_2_1_eq a k) (from left to right).
An exact proof term for the current goal is HkK.
Apply (SepI le (λp : set ⇒ p 0 ∈ K ∧ p 1 ∈ K) (b,k) Hbk) to the current goal.
Apply andI to the current goal.
rewrite the current goal using
(tuple_2_0_eq b k) (from left to right).
An exact proof term for the current goal is HbK.
rewrite the current goal using
(tuple_2_1_eq b k) (from left to right).
An exact proof term for the current goal is HkK.
∎