Theorem: C05S03.mod_4_eq_3_or_mod_4_eq_3 (MIL/C05_Elementary_Number_Theory/S03_Infinitely_Many_Primes.lean)

State before:
m n : ℕ
h : m * n % 4 = 3
⊢ m % 4 = 3 ∨ n % 4 = 3
Tactic:
revert h
State after:
m n : ℕ
⊢ m * n % 4 = 3 → m % 4 = 3 ∨ n % 4 = 3

State before:
m n : ℕ
⊢ m * n % 4 = 3 → m % 4 = 3 ∨ n % 4 = 3
Tactic:
rw [Nat.mul_mod]
State after:
m n : ℕ
⊢ m % 4 * (n % 4) % 4 = 3 → m % 4 = 3 ∨ n % 4 = 3

State before:
m n : ℕ
⊢ m % 4 * (n % 4) % 4 = 3 → m % 4 = 3 ∨ n % 4 = 3
Tactic:
have : m % 4 < 4 := Nat.mod_lt m (by norm_num)
State after:
m n : ℕ
this : m % 4 < 4
⊢ m % 4 * (n % 4) % 4 = 3 → m % 4 = 3 ∨ n % 4 = 3

State before:
m n : ℕ
this : m % 4 < 4
⊢ m % 4 * (n % 4) % 4 = 3 → m % 4 = 3 ∨ n % 4 = 3
Tactic:
interval_cases m % 4 <;> simp [-Nat.mul_mod_mod]
State after:
case «2»
m n : ℕ
this : 2 < 4
⊢ 2 * (n % 4) % 4 = 3 → n % 4 = 3

State before:
case «2»
m n : ℕ
this : 2 < 4
⊢ 2 * (n % 4) % 4 = 3 → n % 4 = 3
Tactic:
have : n % 4 < 4 := Nat.mod_lt n (by norm_num)
State after:
case «2»
m n : ℕ
this✝ : 2 < 4
this : n % 4 < 4
⊢ 2 * (n % 4) % 4 = 3 → n % 4 = 3

State before:
case «2»
m n : ℕ
this✝ : 2 < 4
this : n % 4 < 4
⊢ 2 * (n % 4) % 4 = 3 → n % 4 = 3
Tactic:
interval_cases n % 4 <;> simp
State after:
no goals

State before:
m n : ℕ
⊢ 4 > 0
Tactic:
norm_num
State after:
no goals

State before:
m n : ℕ
this : 2 < 4
⊢ 4 > 0
Tactic:
norm_num
State after:
no goals