case intro
m✝ n b : ℤ
hb : Odd b
m : ℤ
⊢ 4 ∣ 2 * m + 1 + b ∨ 4 ∣ 2 * m + 1 - b
m n a b : ℤ
ha : Odd a
hb : Odd b
⊢ 4 ∣ a + b ∨ 4 ∣ a - b
obtain ⟨m, rfl⟩ := ha
case intro.intro
m✝ n✝ m n : ℤ
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1) ∨ 4 ∣ 2 * m + 1 - (2 * n + 1)
case intro
m✝ n b : ℤ
hb : Odd b
m : ℤ
⊢ 4 ∣ 2 * m + 1 + b ∨ 4 ∣ 2 * m + 1 - b
obtain ⟨n, rfl⟩ := hb
case intro.intro.inl
m✝ n✝ m n : ℤ
h : Even (m + n)
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1) ∨ 4 ∣ 2 * m + 1 - (2 * n + 1)

case intro.intro.inr
m✝ n✝ m n : ℤ
h : Odd (m + n)
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1) ∨ 4 ∣ 2 * m + 1 - (2 * n + 1)
case intro.intro
m✝ n✝ m n : ℤ
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1) ∨ 4 ∣ 2 * m + 1 - (2 * n + 1)
obtain h | h := Int.even_or_odd (m + n)
case intro.intro.inl.h
m✝ n✝ m n : ℤ
h : Even (m + n)
⊢ 4 ∣ 2 * m + 1 - (2 * n + 1)
case intro.intro.inl
m✝ n✝ m n : ℤ
h : Even (m + n)
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1) ∨ 4 ∣ 2 * m + 1 - (2 * n + 1)
right
case intro.intro.inl.h
m✝ n✝ m n : ℤ
h : Even (m - n)
⊢ 4 ∣ 2 * m + 1 - (2 * n + 1)
case intro.intro.inl.h
m✝ n✝ m n : ℤ
h : Even (m + n)
⊢ 4 ∣ 2 * m + 1 - (2 * n + 1)
rw [Int.even_add, ← Int.even_sub] at h
case intro.intro.inl.h.intro
m✝ n✝ m n k : ℤ
hk : m - n = k + k
⊢ 4 ∣ 2 * m + 1 - (2 * n + 1)
case intro.intro.inl.h
m✝ n✝ m n : ℤ
h : Even (m - n)
⊢ 4 ∣ 2 * m + 1 - (2 * n + 1)
obtain ⟨k, hk⟩ := h
case h.e'_4
m✝ n✝ m n k : ℤ
hk : m - n = k + k
⊢ 2 * m + 1 - (2 * n + 1) = 4 * k
case intro.intro.inl.h.intro
m✝ n✝ m n k : ℤ
hk : m - n = k + k
⊢ 4 ∣ 2 * m + 1 - (2 * n + 1)
convert dvd_mul_right 4 k using 1
case h.e'_4
m✝ n✝ m n k : ℤ
hk : m - n = k + k
⊢ 2 * 2 * k = 4 * k
case h.e'_4
m✝ n✝ m n k : ℤ
hk : m - n = k + k
⊢ 2 * m + 1 - (2 * n + 1) = 4 * k
rw [eq_add_of_sub_eq hk, mul_add, add_assoc, add_sub_cancel, ← two_mul, ← mul_assoc]
no goals
case h.e'_4
m✝ n✝ m n k : ℤ
hk : m - n = k + k
⊢ 2 * 2 * k = 4 * k
rfl
case intro.intro.inr.h
m✝ n✝ m n : ℤ
h : Odd (m + n)
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1)
case intro.intro.inr
m✝ n✝ m n : ℤ
h : Odd (m + n)
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1) ∨ 4 ∣ 2 * m + 1 - (2 * n + 1)
left
case intro.intro.inr.h.intro
m✝ n✝ m n k : ℤ
hk : m + n = 2 * k + 1
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1)
case intro.intro.inr.h
m✝ n✝ m n : ℤ
h : Odd (m + n)
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1)
obtain ⟨k, hk⟩ := h
case h.e'_4
m✝ n✝ m n k : ℤ
hk : m + n = 2 * k + 1
⊢ 2 * m + 1 + (2 * n + 1) = 4 * (k + 1)
case intro.intro.inr.h.intro
m✝ n✝ m n k : ℤ
hk : m + n = 2 * k + 1
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1)
convert dvd_mul_right 4 (k + 1) using 1
case h.e'_4
m✝ n✝ m n k : ℤ
hk : m + n = 2 * k + 1
⊢ 2 * 2 * k + (2 * 1 + (1 + 1)) = 4 * k + 4 * 1
case h.e'_4
m✝ n✝ m n k : ℤ
hk : m + n = 2 * k + 1
⊢ 2 * m + 1 + (2 * n + 1) = 4 * (k + 1)
rw [eq_sub_of_add_eq hk, add_right_comm, ← add_sub, mul_add, mul_sub, add_assoc, add_assoc,
  sub_add, add_assoc, ← sub_sub (2 * n), sub_self, zero_sub, sub_neg_eq_add, ← mul_assoc,
  mul_add]
no goals
case h.e'_4
m✝ n✝ m n k : ℤ
hk : m + n = 2 * k + 1
⊢ 2 * 2 * k + (2 * 1 + (1 + 1)) = 4 * k + 4 * 1
rfl