We prove the intermediate
claim L1:
f N ≠ x.
We prove the intermediate
claim L1a:
f w = f N.
rewrite the current goal using H3 (from left to right).
An exact proof term for the current goal is Hfw.
rewrite the current goal using
Hf2 w (ordsuccI1 N w H2) N (ordsuccI2 N) L1a (from right to left) at position 1.
An exact proof term for the current goal is H2.
We prove the intermediate
claim L2:
∀u ∈ N, f u ≠ f N.
Let u be given.
rewrite the current goal using
Hf2 u (ordsuccI1 N u Hu) N (ordsuccI2 N) H3 (from right to left) at position 1.
An exact proof term for the current goal is Hu.
We prove the intermediate
claim L3:
∃g : set → set, (∀u ∈ ordsucc N, u ≠ w → g u = f u) ∧ g w = f N.
Set g to be the term
λu ⇒ if u = w then f N else f u of type
set → set.
We use g to witness the existential quantifier.
Apply andI to the current goal.
Let u be given.
An
exact proof term for the current goal is
If_i_0 (u = w) (f N) (f u) H3.
An
exact proof term for the current goal is
If_i_1 (w = w) (f N) (f w) (λq H ⇒ H).
Apply L3 to the current goal.
Let g be given.
Assume H.
Apply H to the current goal.
We will
prove ∃g : set → set, bij N (X ∖ {x}) g.
We use g to witness the existential quantifier.
Apply bijI to the current goal.
Let u be given.
We will
prove g u ∈ X ∖ {x}.
Apply xm (u = w) to the current goal.
rewrite the current goal using H3 (from left to right).
rewrite the current goal using Hg2 (from left to right).
We will
prove f N ∈ X ∖ {x}.
An
exact proof term for the current goal is
Hf1 N (ordsuccI2 N).
Apply L1 to the current goal.
Apply SingE to the current goal.
An exact proof term for the current goal is H4.
rewrite the current goal using
Hg1 u (ordsuccI1 N u Hu) H3 (from left to right).
We will
prove f u ∈ X ∖ {x}.
An
exact proof term for the current goal is
Hf1 u (ordsuccI1 N u Hu).
Apply H3 to the current goal.
Apply Hf2 u (ordsuccI1 N u Hu) w Hw to the current goal.
rewrite the current goal using Hfw (from left to right).
Apply SingE to the current goal.
An exact proof term for the current goal is H4.
Let u be given.
Let v be given.
We will
prove g u = g v → u = v.
Apply xm (u = w) to the current goal.
Apply xm (v = w) to the current goal.
Assume _.
rewrite the current goal using H4 (from left to right).
An exact proof term for the current goal is H3.
rewrite the current goal using H3 (from left to right).
rewrite the current goal using Hg2 (from left to right).
rewrite the current goal using
Hg1 v (ordsuccI1 N v Hv) H4 (from left to right).
Apply L2 v Hv to the current goal.
Use symmetry.
An exact proof term for the current goal is H5.
rewrite the current goal using
Hg1 u (ordsuccI1 N u Hu) H3 (from left to right).
Apply xm (v = w) to the current goal.
rewrite the current goal using H4 (from left to right).
rewrite the current goal using Hg2 (from left to right).
Apply L2 u Hu to the current goal.
An exact proof term for the current goal is H5.
rewrite the current goal using
Hg1 v (ordsuccI1 N v Hv) H4 (from left to right).
We will
prove f u = f v → u = v.
An
exact proof term for the current goal is
Hf2 u (ordsuccI1 N u Hu) v (ordsuccI1 N v Hv).
Let y be given.
Apply Hf3 y Hy1 to the current goal.
Let u be given.
Assume H.
Apply H to the current goal.
We prove the intermediate
claim L4:
u ≠ w.
Apply Hy2 to the current goal.
rewrite the current goal using Hu2 (from right to left).
rewrite the current goal using Hfw (from right to left).
rewrite the current goal using H3 (from left to right).
Apply SingI to the current goal.
Apply ordsuccE N u Hu1 to the current goal.
We use u to witness the existential quantifier.
Apply andI to the current goal.
An exact proof term for the current goal is H3.
rewrite the current goal using Hg1 u Hu1 L4 (from left to right).
An exact proof term for the current goal is Hu2.
We use w to witness the existential quantifier.
Apply andI to the current goal.
An exact proof term for the current goal is H2.
rewrite the current goal using Hg2 (from left to right).
rewrite the current goal using H3 (from right to left).
An exact proof term for the current goal is Hu2.
We will
prove ∃g : set → set, bij N (X ∖ {x}) g.
We use f to witness the existential quantifier.
Apply bijI to the current goal.
Let u be given.
We will
prove f u ∈ X ∖ {x}.
An
exact proof term for the current goal is
Hf1 u (ordsuccI1 N u Hu).
We prove the intermediate
claim L5:
u = N.
rewrite the current goal using H2 (from right to left).
rewrite the current goal using Hfw (from left to right).
Apply SingE to the current goal.
An exact proof term for the current goal is H3.
rewrite the current goal using L5 (from right to left) at position 1.
An exact proof term for the current goal is Hu.
Let u be given.
Let v be given.
We will
prove f u = f v → u = v.
An
exact proof term for the current goal is
Hf2 u (ordsuccI1 N u Hu) v (ordsuccI1 N v Hv).
Let y be given.
Apply Hf3 y Hy1 to the current goal.
Let u be given.
Assume H.
Apply H to the current goal.
We use u to witness the existential quantifier.
Apply andI to the current goal.
Apply ordsuccE N u Hu1 to the current goal.
An exact proof term for the current goal is H3.
Apply Hy2 to the current goal.
rewrite the current goal using Hu2 (from right to left).
rewrite the current goal using H3 (from left to right).
rewrite the current goal using H2 (from right to left).
rewrite the current goal using Hfw (from left to right).
Apply SingI to the current goal.
An exact proof term for the current goal is Hu2.
∎