Apply orIR to the current goal.
We prove the intermediate
claim L1:
gcd_reln p a 1.
Apply and3I to the current goal.
Let d be given.
Apply Hdp to the current goal.
Assume H _.
Apply H to the current goal.
Assume _.
We prove the intermediate
claim LdS:
SNo d.
An
exact proof term for the current goal is
int_SNo d HdZ.
An exact proof term for the current goal is H3.
An
exact proof term for the current goal is
SNoLt_0_1.
We prove the intermediate
claim LdN:
d ∈ ω.
An exact proof term for the current goal is LdN.
An exact proof term for the current goal is Hp1.
An exact proof term for the current goal is Hdp.
Apply Hp3 d LdN Ldp to the current goal.
rewrite the current goal using H4 (from left to right).
Apply H2 to the current goal.
rewrite the current goal using H4 (from right to left).
An exact proof term for the current goal is Hda.
We prove the intermediate
claim L2:
¬ (p = 0 ∧ a = 0).
Assume H3.
Apply H3 to the current goal.
Assume _.
rewrite the current goal using H4 (from right to left) at position 2.
An exact proof term for the current goal is Hp2.
Apply BezoutThm p LpZ a Ha L2 1 to the current goal.
Assume _.
Apply HBezout1 L1 to the current goal.
Assume H.
Apply H to the current goal.
Assume _.
Let m be given.
Let n be given.
We prove the intermediate
claim LnS:
SNo n.
An
exact proof term for the current goal is
int_SNo n Hn.
We prove the intermediate
claim L3:
b * m * p + b * n * a = b.
We will
prove b * (m * p + n * a) = b.
rewrite the current goal using H5 (from left to right).
An
exact proof term for the current goal is
mul_SNo_oneR b LbS.
rewrite the current goal using L3 (from right to left).
An exact proof term for the current goal is H1.
∎