Let L and R be given.
Let α be given.
Let p be given.
Set p0 to be the term
λδ ⇒ p δ ∧ δ ≠ α of type
set → prop.
Set p1 to be the term
λδ ⇒ p δ ∨ δ = α of type
set → prop.
Apply Hp to the current goal.
Apply Hp0 to the current goal.
Apply Hp1 to the current goal.
We prove the intermediate
claim Lnp0a:
¬ p0 α.
Assume H10.
Apply H10 to the current goal.
Assume H11: p α.
Apply H12 to the current goal.
Use reflexivity.
We prove the intermediate claim Lp1a: p1 α.
We will
prove p α ∨ α = α.
Apply orIR to the current goal.
Use reflexivity.
We prove the intermediate
claim Lap0p:
PNoLt (ordsucc α) p0 α p.
An exact proof term for the current goal is Lnp0a.
We prove the intermediate
claim Lapp1:
PNoLt α p (ordsucc α) p1.
We will prove p1 α.
An exact proof term for the current goal is Lp1a.
Apply andI to the current goal.
Let β be given.
Let q be given.
Assume Hq: L β q.
We will
prove PNoLt β q α p.
We prove the intermediate
claim L4:
PNo_downc L β q.
An exact proof term for the current goal is Hq.
We prove the intermediate
claim L5:
β ∈ ordsucc α → PNoLt β q α p.
Apply Hp0a β H10 q to the current goal.
An exact proof term for the current goal is L4.
An exact proof term for the current goal is Lap0p.
We prove the intermediate
claim L6:
∀γ ∈ ordsucc α, γ ∈ β → PNoEq_ γ p q → q γ → p0 γ.
Let γ be given.
Assume H11: q γ.
Apply dneg to the current goal.
We prove the intermediate
claim Lc:
ordinal γ.
An
exact proof term for the current goal is
ordinal_Hered β Hb γ Hc2.
We prove the intermediate
claim L6a:
PNoLt γ q β q.
An exact proof term for the current goal is Hc2.
We will prove q γ.
An exact proof term for the current goal is H11.
We prove the intermediate
claim L6b:
PNo_downc L γ q.
We use β to witness the existential quantifier.
Apply andI to the current goal.
An exact proof term for the current goal is Hb.
We use q to witness the existential quantifier.
Apply andI to the current goal.
An exact proof term for the current goal is Hq.
An exact proof term for the current goal is L6a.
We prove the intermediate
claim L6c:
PNoLt γ q (ordsucc α) p0.
An exact proof term for the current goal is Hp0a γ Hc1 q L6b.
We prove the intermediate
claim L6d:
PNoLt (ordsucc α) p0 γ q.
An exact proof term for the current goal is Hc1.
Apply ordsuccE α γ Hc1 to the current goal.
rewrite the current goal using H12 (from left to right).
An exact proof term for the current goal is H10.
An exact proof term for the current goal is HNC.
An
exact proof term for the current goal is
PNoLt_tra γ (ordsucc α) γ Lc Lsa Lc q p0 q L6c L6d.
Assume H10.
Apply H10 to the current goal.
Apply PNoLtE α β p q H10 to the current goal.
Apply H11 to the current goal.
Let γ be given.
Assume H12.
Apply H12 to the current goal.
Assume H12.
Apply H12 to the current goal.
Assume H12.
Apply H12 to the current goal.
Assume H14: q γ.
Apply L6 γ (ordsuccI1 α γ Hc1) Hc2 H12 H14 to the current goal.
Assume H15: p γ.
Assume _.
Apply H13 to the current goal.
An exact proof term for the current goal is H15.
Assume H13: q α.
Apply Lnp0a to the current goal.
We will prove p0 α.
An
exact proof term for the current goal is
L6 α (ordsuccI2 α) H11 H12 H13.
Assume _ _.
Apply L5 to the current goal.
An exact proof term for the current goal is H11.
Assume H10.
Apply H10 to the current goal.
Apply L5 to the current goal.
rewrite the current goal using H10a (from right to left).
An exact proof term for the current goal is H10.
Let β be given.
Let q be given.
Assume Hq: R β q.
We will
prove PNoLt α p β q.
We prove the intermediate
claim L4:
PNo_upc R β q.
An exact proof term for the current goal is Hq.
We prove the intermediate
claim L5:
β ∈ ordsucc α → PNoLt α p β q.
An exact proof term for the current goal is Lapp1.
Apply Hp1b β H10 q to the current goal.
An exact proof term for the current goal is L4.
We prove the intermediate
claim L6:
∀γ ∈ ordsucc α, γ ∈ β → PNoEq_ γ q p → p1 γ → q γ.
Let γ be given.
Assume H11: p1 γ.
Apply dneg to the current goal.
We prove the intermediate
claim Lc:
ordinal γ.
An
exact proof term for the current goal is
ordinal_Hered β Hb γ Hc2.
We prove the intermediate
claim L6a:
PNoLt β q γ q.
An exact proof term for the current goal is Hc2.
An exact proof term for the current goal is HNC.
We prove the intermediate
claim L6b:
PNo_upc R γ q.
We use β to witness the existential quantifier.
Apply andI to the current goal.
An exact proof term for the current goal is Hb.
We use q to witness the existential quantifier.
Apply andI to the current goal.
An exact proof term for the current goal is Hq.
An exact proof term for the current goal is L6a.
We prove the intermediate
claim L6c:
PNoLt (ordsucc α) p1 γ q.
An exact proof term for the current goal is Hp1b γ Hc1 q L6b.
We prove the intermediate
claim L6d:
PNoLt γ q (ordsucc α) p1.
An exact proof term for the current goal is Hc1.
An exact proof term for the current goal is H10.
Apply ordsuccE α γ Hc1 to the current goal.
rewrite the current goal using H12 (from left to right).
We will prove p1 γ.
An exact proof term for the current goal is H11.
An
exact proof term for the current goal is
PNoLt_tra γ (ordsucc α) γ Lc Lsa Lc q p1 q L6d L6c.
Assume H10.
Apply H10 to the current goal.
Assume H10.
An exact proof term for the current goal is H10.
Assume H10.
Apply H10 to the current goal.
Apply L5 to the current goal.
rewrite the current goal using H10a (from right to left).
Apply PNoLtE β α q p H10 to the current goal.
Apply H11 to the current goal.
Let γ be given.
Assume H12.
Apply H12 to the current goal.
Assume H12.
Apply H12 to the current goal.
Assume H12.
Apply H12 to the current goal.
Assume H14: p γ.
Apply H13 to the current goal.
Apply L6 γ (ordsuccI1 α γ Hc1) Hc2 H12 to the current goal.
We will prove p1 γ.
We will
prove p γ ∨ γ = α.
Apply orIL to the current goal.
An exact proof term for the current goal is H14.
Assume _ _.
Apply L5 to the current goal.
An exact proof term for the current goal is H11.
Apply H13 to the current goal.
An
exact proof term for the current goal is
L6 α (ordsuccI2 α) H11 H12 Lp1a.
∎