Let p be given.
We prove the intermediate
claim HpXY:
p ∈ setprod ω R.
An exact proof term for the current goal is (HfSub p Hp).
We prove the intermediate
claim Heta:
p = (p 0,p 1).
An
exact proof term for the current goal is
(setprod_eta ω R p HpXY).
We prove the intermediate
claim Hp0:
p 0 ∈ ω.
An
exact proof term for the current goal is
(ap0_Sigma ω (λ_ : set ⇒ R) p HpXY).
We prove the intermediate
claim Hp1:
p 1 ∈ R.
An
exact proof term for the current goal is
(ap1_Sigma ω (λ_ : set ⇒ R) p HpXY).
We prove the intermediate
claim Hpair:
(p 0,p 1) ∈ f.
rewrite the current goal using Heta (from right to left).
An exact proof term for the current goal is Hp.
We prove the intermediate
claim Happf:
apply_fun f (p 0) = (p 1).
An
exact proof term for the current goal is
(Hagree (p 0) Hp0).
Use symmetry.
An exact proof term for the current goal is Hfg.
We prove the intermediate
claim Happg:
apply_fun g (p 0) = (p 1).
rewrite the current goal using Hgf (from left to right).
An exact proof term for the current goal is Happf.
We prove the intermediate
claim Hexg:
∃y : set, (p 0,y) ∈ g.
Apply (Hgtot2 (p 0) Hp0) to the current goal.
Let y be given.
We use y to witness the existential quantifier.
An
exact proof term for the current goal is
(andER (y ∈ R) ((p 0,y) ∈ g) Hy).
We prove the intermediate
claim Hgpair:
(p 0,apply_fun g (p 0)) ∈ g.
We prove the intermediate
claim Hpeq:
(p 0,apply_fun g (p 0)) = (p 0,p 1).
rewrite the current goal using Happg (from left to right).
Use reflexivity.
rewrite the current goal using Heta (from left to right).
rewrite the current goal using Hpeq (from right to left).
An exact proof term for the current goal is Hgpair.
Let p be given.
We prove the intermediate
claim HpXY:
p ∈ setprod ω R.
An exact proof term for the current goal is (HgSub p Hp).
We prove the intermediate
claim Heta:
p = (p 0,p 1).
An
exact proof term for the current goal is
(setprod_eta ω R p HpXY).
We prove the intermediate
claim Hp0:
p 0 ∈ ω.
An
exact proof term for the current goal is
(ap0_Sigma ω (λ_ : set ⇒ R) p HpXY).
We prove the intermediate
claim Hp1:
p 1 ∈ R.
An
exact proof term for the current goal is
(ap1_Sigma ω (λ_ : set ⇒ R) p HpXY).
We prove the intermediate
claim Hpair:
(p 0,p 1) ∈ g.
rewrite the current goal using Heta (from right to left).
An exact proof term for the current goal is Hp.
We prove the intermediate
claim Happg:
apply_fun g (p 0) = (p 1).
An
exact proof term for the current goal is
(Hagree (p 0) Hp0).
We prove the intermediate
claim Happf:
apply_fun f (p 0) = (p 1).
rewrite the current goal using Hfg (from left to right).
An exact proof term for the current goal is Happg.
We prove the intermediate
claim Hexf:
∃y : set, (p 0,y) ∈ f.
Apply (Hftot2 (p 0) Hp0) to the current goal.
Let y be given.
We use y to witness the existential quantifier.
An
exact proof term for the current goal is
(andER (y ∈ R) ((p 0,y) ∈ f) Hy).
We prove the intermediate
claim Hfpair:
(p 0,apply_fun f (p 0)) ∈ f.
We prove the intermediate
claim Hpeq:
(p 0,apply_fun f (p 0)) = (p 0,p 1).
rewrite the current goal using Happf (from left to right).
Use reflexivity.
rewrite the current goal using Heta (from left to right).
rewrite the current goal using Hpeq (from right to left).
An exact proof term for the current goal is Hfpair.
∎