Let X, n, e1, e2 and x be given.
We prove the intermediate
claim HP0:
Psum 0.
Let ea and eb be given.
Use reflexivity.
We prove the intermediate
claim HPS:
∀m : set, nat_p m → Psum m → Psum (ordsucc m).
Let m be given.
Assume IHm: Psum m.
Let ea and eb be given.
Let k be given.
An
exact proof term for the current goal is
(HeqS k (ordsuccI1 m k HkM)).
An exact proof term for the current goal is (IHm ea eb Heqm).
An
exact proof term for the current goal is
(HeqS m (ordsuccI2 m)).
rewrite the current goal using Hacc (from left to right) at position 1.
rewrite the current goal using Hem (from left to right).
Use reflexivity.
We prove the intermediate claim HPn: Psum n.
An
exact proof term for the current goal is
(nat_ind Psum HP0 HPS n HnNat).
We prove the intermediate
claim HnIn:
n ∈ ordsucc n.
An
exact proof term for the current goal is
(ordsuccI2 n).
rewrite the current goal using Hstep1 (from right to left).
rewrite the current goal using Hstep2 (from right to left).
An exact proof term for the current goal is (HPn e1 e2 Heq).
∎