Let Lx, Rx, Ly, Ry, x and y be given.
Assume HLRx HLRy Hxe Hye.
Apply HLRx to the current goal.
Assume H.
Apply H to the current goal.
Apply HLRy to the current goal.
Assume H.
Apply H to the current goal.
Apply SNoCutP_SNoCut_impred Lx Rx HLRx to the current goal.
rewrite the current goal using Hxe (from right to left).
Assume Hx1: SNo x.
Apply SNoCutP_SNoCut_impred Ly Ry HLRy to the current goal.
rewrite the current goal using Hye (from right to left).
Assume Hy1: SNo y.
We prove the intermediate
claim Lxy:
SNo (x + y).
An
exact proof term for the current goal is
SNo_add_SNo x y Hx1 Hy1.
We prove the intermediate
claim LI:
∀u, SNo u → SNoLev u ∈ SNoLev (x + y) → x + y < u → (∃v ∈ Rx, v + y ≤ u) ∨ (∃v ∈ Ry, x + v ≤ u).
Apply SNoLev_ind to the current goal.
Let u be given.
Assume Hu1: SNo u.
Apply dneg to the current goal.
Apply SNoLt_irref u to the current goal.
We will prove u < u.
Apply (λH : u ≤ x + y ⇒ SNoLeLt_tra u (x + y) u Hu1 Lxy Hu1 H Hu3) to the current goal.
Set Lxy1 to be the term
{w + y|w ∈ Lx}.
Set Lxy2 to be the term
{x + w|w ∈ Ly}.
Set Rxy1 to be the term
{z + y|z ∈ Rx}.
Set Rxy2 to be the term
{x + z|z ∈ Ry}.
rewrite the current goal using
add_SNoCut_eq Lx Rx Ly Ry x y HLRx HLRy Hxe Hye (from left to right).
We will prove u ≤ SNoCut (Lxy1 ∪ Lxy2) (Rxy1 ∪ Rxy2).
rewrite the current goal using SNo_eta u Hu1 (from left to right).
We will prove SNoCut (SNoL u) (SNoR u) ≤ SNoCut (Lxy1 ∪ Lxy2) (Rxy1 ∪ Rxy2).
Apply SNoCut_Le (SNoL u) (SNoR u) (Lxy1 ∪ Lxy2) (Rxy1 ∪ Rxy2) to the current goal.
An exact proof term for the current goal is SNoCutP_SNoL_SNoR u Hu1.
An
exact proof term for the current goal is
add_SNoCutP_gen Lx Rx Ly Ry x y HLRx HLRy Hxe Hye.
rewrite the current goal using
add_SNoCut_eq Lx Rx Ly Ry x y HLRx HLRy Hxe Hye (from right to left).
We will
prove ∀z ∈ SNoL u, z < x + y.
Let z be given.
Apply SNoL_E u Hu1 z Hz to the current goal.
Assume Hz1: SNo z.
Assume Hz3: z < u.
Apply SNoLt_trichotomy_or z (x + y) Hz1 Lxy to the current goal.
Assume H1.
Apply H1 to the current goal.
An exact proof term for the current goal is H1.
We will prove False.
Apply In_no2cycle (SNoLev z) (SNoLev u) Hz2 to the current goal.
We will
prove SNoLev u ∈ SNoLev z.
rewrite the current goal using H1 (from left to right).
An exact proof term for the current goal is Hu2.
We will prove False.
We prove the intermediate
claim Lz1:
z ∈ SNoS_ (SNoLev u).
An exact proof term for the current goal is SNoL_SNoS_ u z Hz.
We prove the intermediate
claim Lz2:
SNoLev z ∈ SNoLev (x + y).
Apply SNoLev_ordinal (x + y) Lxy to the current goal.
Assume Hxy1 _.
An exact proof term for the current goal is Hxy1 (SNoLev u) Hu2 (SNoLev z) Hz2.
Apply IH z Lz1 Lz2 H1 to the current goal.
Apply H2 to the current goal.
Let v be given.
Assume H3.
Apply H3 to the current goal.
Apply HNC to the current goal.
Apply orIL to the current goal.
We use v to witness the existential quantifier.
Apply andI to the current goal.
An exact proof term for the current goal is Hv.
Apply SNoLe_tra (v + y) z u (SNo_add_SNo v y (HLRx2 v Hv) Hy1) Hz1 Hu1 to the current goal.
An exact proof term for the current goal is H3.
We will prove z ≤ u.
Apply SNoLtLe to the current goal.
An exact proof term for the current goal is Hz3.
Apply H2 to the current goal.
Let v be given.
Assume H3.
Apply H3 to the current goal.
Apply HNC to the current goal.
Apply orIR to the current goal.
We use v to witness the existential quantifier.
Apply andI to the current goal.
An exact proof term for the current goal is Hv.
Apply SNoLe_tra (x + v) z u (SNo_add_SNo x v Hx1 (HLRy2 v Hv)) Hz1 Hu1 to the current goal.
An exact proof term for the current goal is H3.
We will prove z ≤ u.
Apply SNoLtLe to the current goal.
An exact proof term for the current goal is Hz3.
rewrite the current goal using SNo_eta u Hu1 (from right to left).
We will
prove ∀w ∈ Rxy1 ∪ Rxy2, u < w.
Let w be given.
Apply binunionE Rxy1 Rxy2 w Hw to the current goal.
We will prove u < w.
Apply ReplE_impred Rx (λw ⇒ w + y) w Hw2 to the current goal.
Let v be given.
rewrite the current goal using Hwv (from left to right).
We prove the intermediate
claim Lvy:
SNo (v + y).
An
exact proof term for the current goal is
SNo_add_SNo v y (HLRx2 v Hv) Hy1.
Apply SNoLtLe_or u (v + y) Hu1 Lvy to the current goal.
An exact proof term for the current goal is H1.
We will prove False.
Apply HNC to the current goal.
Apply orIL to the current goal.
We use v to witness the existential quantifier.
Apply andI to the current goal.
An exact proof term for the current goal is Hv.
An exact proof term for the current goal is H1.
We will prove u < w.
Apply ReplE_impred Ry (λw ⇒ x + w) w Hw2 to the current goal.
Let v be given.
rewrite the current goal using Hwv (from left to right).
We prove the intermediate
claim Lxv:
SNo (x + v).
An
exact proof term for the current goal is
SNo_add_SNo x v Hx1 (HLRy2 v Hv).
Apply SNoLtLe_or u (x + v) Hu1 Lxv to the current goal.
An exact proof term for the current goal is H1.
We will prove False.
Apply HNC to the current goal.
Apply orIR to the current goal.
We use v to witness the existential quantifier.
Apply andI to the current goal.
An exact proof term for the current goal is Hv.
An exact proof term for the current goal is H1.
Let u be given.
Apply SNoR_E (x + y) Lxy u Hu to the current goal.
Assume Hu1: SNo u.
An exact proof term for the current goal is LI u Hu1 Hu2 Hu3.
∎