Theorem: LO.FirstOrder.Arith.Model.even_or_odd' (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 : M
⊢ a = 2 * (a / 2) ∨ a = 2 * (a / 2) + 1
Tactic:
have : 2 * (a / 2) + (a % 2) = a := div_add_mod a 2
State after:
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 : M
this : 2 * (a / 2) + a % 2 = a
⊢ a = 2 * (a / 2) ∨ a = 2 * (a / 2) + 1

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 : M
this : 2 * (a / 2) + a % 2 = a
⊢ a = 2 * (a / 2) ∨ a = 2 * (a / 2) + 1
Tactic:
rcases mod_two a with (e | e) <;>  simp [e] at this <;> simp [*]
State after:
no goals