Let x and y be given.
Assume Hx Hy.
Apply Hy to the current goal.
Assume H.
Apply H to the current goal.
Assume Hy2: SNo y.
Apply SNoR_E x Hx y Hy1 to the current goal.
Assume Hy1a.
Let z be given.
Assume Hz: SNo z.
We prove the intermediate
claim Lmx:
SNo (- x).
An exact proof term for the current goal is SNo_minus_SNo x Hx.
We prove the intermediate
claim Lmy:
SNo (- y).
An exact proof term for the current goal is SNo_minus_SNo y Hy2.
We prove the intermediate
claim Lmz:
SNo (- z).
An exact proof term for the current goal is SNo_minus_SNo z Hz.
We prove the intermediate
claim Lxx:
SNo (x + x).
An exact proof term for the current goal is SNo_add_SNo x x Hx Hx.
We prove the intermediate
claim Lyz:
SNo (y + z).
An exact proof term for the current goal is SNo_add_SNo y z Hy2 Hz.
We prove the intermediate
claim L1:
SNo_max_of (SNoL (- x)) (- y).
rewrite the current goal using SNoL_minus_SNoR x Hx (from left to right).
We will
prove ∀w ∈ SNoR x, SNo w.
Let w be given.
Assume Hw.
Apply SNoR_E x Hx w Hw to the current goal.
Assume Hw1 _ _.
An exact proof term for the current goal is Hw1.
An exact proof term for the current goal is Hy.
We prove the intermediate
claim L2:
- x < - z.
An exact proof term for the current goal is minus_SNo_Lt_contra z x Hz Hx H1.
We prove the intermediate
claim L3:
- y + - z < - x + - x.
rewrite the current goal using minus_add_SNo_distr y z Hy2 Hz (from right to left).
rewrite the current goal using minus_add_SNo_distr x x Hx Hx (from right to left).
An
exact proof term for the current goal is
minus_SNo_Lt_contra (x + x) (y + z) Lxx Lyz H2.
Let w be given.
Assume H.
Apply H to the current goal.
rewrite the current goal using minus_add_SNo_distr x x Hx Hx (from right to left).
Apply SNoR_E (- z) Lmz w Hw to the current goal.
Assume Hw1: SNo w.
We prove the intermediate
claim Lmw:
SNo (- w).
An exact proof term for the current goal is SNo_minus_SNo w Hw1.
We use
(- w) to
witness the existential quantifier.
Apply andI to the current goal.
We will
prove - w ∈ SNoL z.
rewrite the current goal using minus_SNo_invol z Hz (from right to left).
We will
prove - w ∈ SNoL (- - z).
rewrite the current goal using
SNoL_minus_SNoR (- z) Lmz (from left to right).
We will
prove - w ∈ {- w|w ∈ SNoR (- z)}.
Apply ReplI to the current goal.
An exact proof term for the current goal is Hw.
We will
prove y + - w = x + x.
rewrite the current goal using
minus_SNo_invol (x + x) Lxx (from right to left).
We will
prove y + - w = - - (x + x).
rewrite the current goal using H3 (from right to left).
We will
prove y + - w = - (- y + w).
rewrite the current goal using
minus_add_SNo_distr (- y) w Lmy Hw1 (from left to right).
We will
prove y + - w = - - y + - w.
rewrite the current goal using minus_SNo_invol y Hy2 (from left to right).
Use reflexivity.
∎