Let u be given.
Let v be given.
We prove the intermediate
claim Hydef:
y = apply_fun f u.
We prove the intermediate
claim Hfun:
function_on f X Y.
We prove the intermediate
claim HyY:
y ∈ Y.
An exact proof term for the current goal is (Hfun u HuX).
We prove the intermediate
claim HsurjU:
∀y0 : set, y0 ∈ Y → ∃x : set, x ∈ X ∧ apply_fun f x = y0 ∧ (∀x' : set, x' ∈ X → apply_fun f x' = y0 → x' = x).
An exact proof term for the current goal is (HsurjU y HyY).
Apply Hex to the current goal.
Let x0 be given.
Assume Hx0pack.
We prove the intermediate
claim Huniq:
∀x' : set, x' ∈ X → apply_fun f x' = y → x' = x0.
We prove the intermediate
claim Hu_y:
apply_fun f u = y.
rewrite the current goal using Hydef (from left to right).
Use reflexivity.
We prove the intermediate
claim Hv_y:
apply_fun f v = y.
rewrite the current goal using Hydef (from left to right).
rewrite the current goal using Heq (from right to left).
Use reflexivity.
We prove the intermediate
claim Hu0:
u = x0.
An exact proof term for the current goal is (Huniq u HuX Hu_y).
We prove the intermediate
claim Hv0:
v = x0.
An exact proof term for the current goal is (Huniq v HvX Hv_y).
rewrite the current goal using Hu0 (from left to right).
rewrite the current goal using Hv0 (from right to left).
Use reflexivity.
Let w be given.
We prove the intermediate
claim HsurjU:
∀y0 : set, y0 ∈ Y → ∃x : set, x ∈ X ∧ apply_fun f x = y0 ∧ (∀x' : set, x' ∈ X → apply_fun f x' = y0 → x' = x).
An exact proof term for the current goal is (HsurjU w HwY).
Apply Hex to the current goal.
Let x0 be given.
Assume Hx0pack.
We use x0 to witness the existential quantifier.
We prove the intermediate
claim Hx0pair:
x0 ∈ X ∧ apply_fun f x0 = w.
Apply andI to the current goal.
An
exact proof term for the current goal is
(andEL (x0 ∈ X) (apply_fun f x0 = w) Hx0pair).
An
exact proof term for the current goal is
(andER (x0 ∈ X) (apply_fun f x0 = w) Hx0pair).
∎