Theorem: LO.FirstOrder.Arith.Model.mod_add (Arithmetization/Basic/IOpen.lean)

State before:
M : Type u_1
inst✝⁶ : Zero M
inst✝⁵ : One M
inst✝⁴ : Add M
inst✝³ : Mul M
inst✝² : LT M
inst✝¹ : M ⊧ₘ* 𝐏𝐀⁻
inst✝ : M ⊧ₘ* 𝐈open
a b m : M
pos : 0 < m
⊢ (a + b) % m = (m * (a / m) + a % m + (m * (b / m) + b % m)) % m
Tactic:
simp [div_add_mod]
State after:
no goals

State before:
M : Type u_1
inst✝⁶ : Zero M
inst✝⁵ : One M
inst✝⁴ : Add M
inst✝³ : Mul M
inst✝² : LT M
inst✝¹ : M ⊧ₘ* 𝐏𝐀⁻
inst✝ : M ⊧ₘ* 𝐈open
a b m : M
pos : 0 < m
⊢ (m * (a / m) + a % m + (m * (b / m) + b % m)) % m = (m * (a / m) + m * (b / m) + a % m + b % m) % m
Tactic:
simp [←add_assoc, add_right_comm]
State after:
no goals

State before:
M : Type u_1
inst✝⁶ : Zero M
inst✝⁵ : One M
inst✝⁴ : Add M
inst✝³ : Mul M
inst✝² : LT M
inst✝¹ : M ⊧ₘ* 𝐏𝐀⁻
inst✝ : M ⊧ₘ* 𝐈open
a b m : M
pos : 0 < m
⊢ (m * (a / m) + m * (b / m) + a % m + b % m) % m = (a % m + b % m) % m
Tactic:
simp [add_assoc, pos]
State after:
no goals