Let a, b and d be given.
Let m be given.
Let n be given.
We prove the intermediate
claim LaS:
SNo a.
An
exact proof term for the current goal is
int_SNo a Ha.
We prove the intermediate
claim LbS:
SNo b.
An
exact proof term for the current goal is
int_SNo b Hb.
We prove the intermediate
claim LmS:
SNo m.
An
exact proof term for the current goal is
int_SNo m Hm.
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 LdN:
nat_p d.
An exact proof term for the current goal is Hd2.
We prove the intermediate
claim Ld1:
d ∈ ω ∖ {0}.
An exact proof term for the current goal is LdN.
rewrite the current goal using
SingE 0 d H3 (from right to left) at position 2.
An exact proof term for the current goal is Hd2.
We prove the intermediate
claim LdS:
SNo d.
An
exact proof term for the current goal is
nat_p_SNo d LdN.
Let q be given.
Assume H.
Apply H to the current goal.
Assume H.
Apply H to the current goal.
Let r be given.
Assume H.
Apply H to the current goal.
We prove the intermediate
claim LqS:
SNo q.
An exact proof term for the current goal is Hq.
We prove the intermediate
claim LmqS:
SNo (- q).
We prove the intermediate
claim LrN:
nat_p r.
An
exact proof term for the current goal is
nat_p_trans d LdN r Hr.
We prove the intermediate
claim Lrnn:
0 ≤ r.
An exact proof term for the current goal is LrN.
We prove the intermediate
claim Lrd:
r < d.
We prove the intermediate
claim LqdS:
SNo (q * d).
An
exact proof term for the current goal is
SNo_mul_SNo q d LqS LdS.
We prove the intermediate
claim LrS:
SNo r.
An
exact proof term for the current goal is
nat_p_SNo r LrN.
We prove the intermediate
claim L1:
r = (1 + - q * m) * a + (- q * n) * b.
Use transitivity with
a + - q * d, and
a + (- q) * (m * a + n * b).
We will
prove r = a + - q * d.
We will
prove r = - q * d + a.
rewrite the current goal using H1 (from left to right).
We will
prove r = - q * d + q * d + r.
Use symmetry.
We will
prove a + - q * d = a + (- q) * (m * a + n * b).
Use f_equal.
We will
prove - q * d = (- q) * (m * a + n * b).
We will
prove (- q) * d = (- q) * (m * a + n * b).
Use f_equal.
We will
prove d = m * a + n * b.
Use symmetry.
An exact proof term for the current goal is H2.
We will
prove a + ((- q) * (m * a)) + ((- q) * (n * b)) = (1 + - q * m) * a + (- q * n) * b.
We will
prove (a + (- q) * (m * a)) + (- q) * (n * b) = (1 + - q * m) * a + (- q * n) * b.
Use f_equal.
We will
prove a + (- q) * (m * a) = (1 + - q * m) * a.
We will
prove a + (- q) * (m * a) = (1 + (- q) * m) * a.
We will
prove a + (- q) * (m * a) = 1 * a + ((- q) * m) * a.
Use f_equal.
Use symmetry.
An
exact proof term for the current goal is
mul_SNo_oneL a LaS.
We will
prove (- q) * (m * a) = ((- q) * m) * a.
An
exact proof term for the current goal is
mul_SNo_assoc (- q) m a LmqS LmS LaS.
We will
prove (- q) * (n * b) = (- q * n) * b.
An
exact proof term for the current goal is
mul_SNo_assoc (- q) n b LmqS LnS LbS.
Apply and4I to the current goal.
An exact proof term for the current goal is Ha.
An exact proof term for the current goal is Hb.
An exact proof term for the current goal is LrN.
We use
(1 + - q * m) to
witness the existential quantifier.
Apply andI to the current goal.
An
exact proof term for the current goal is
nat_1.
An exact proof term for the current goal is Hq.
An exact proof term for the current goal is Hm.
We use
(- q * n) 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 Hn.
Use symmetry.
An exact proof term for the current goal is L1.
We prove the intermediate
claim L3:
r = 0.
Apply SNoLtLe_tra r d r LrS LdS LrS Lrd to the current goal.
Apply Hd3 to the current goal.
An exact proof term for the current goal is L2.
An exact proof term for the current goal is H2.
Use symmetry.
An exact proof term for the current goal is H2.
Apply and3I to the current goal.
An exact proof term for the current goal is HdZ.
An exact proof term for the current goal is Ha.
We use q to witness the existential quantifier.
Apply andI to the current goal.
An exact proof term for the current goal is Hq.
rewrite the current goal using H1 (from left to right).
We will
prove d * q = q * d + r.
rewrite the current goal using L3 (from left to right).
rewrite the current goal using
add_SNo_0R (q * d) LqdS (from left to right).
We will
prove d * q = q * d.
An
exact proof term for the current goal is
mul_SNo_com d q LdS LqS.
∎