Let J, f and g be given.
We prove the intermediate
claim HAnen:
∃a0 : set, a0 ∈ A.
We prove the intermediate
claim HAinR:
∀a : set, a ∈ A → a ∈ R.
We prove the intermediate
claim Hub1:
∀a : set, a ∈ A → a ∈ R → Rle a 1.
Let a be given.
Let j be given.
rewrite the current goal using Haj (from left to right).
We prove the intermediate
claim HubExists:
∃u : set, u ∈ R ∧ ∀a : set, a ∈ A → a ∈ R → Rle a u.
We use
1 to
witness the existential quantifier.
Apply andI to the current goal.
An
exact proof term for the current goal is
real_1.
Let a be given.
An exact proof term for the current goal is (Hub1 a HaA HaR).
We prove the intermediate
claim Hexlub:
∃l : set, R_lub A l.
An
exact proof term for the current goal is
(R_lub_exists A HAnen HAinR HubExists).
rewrite the current goal using Hdef (from left to right).
An
exact proof term for the current goal is
(Eps_i_ex (λr : set ⇒ R_lub A r) Hexlub).
∎