Theorem: Cardinal.mul_eq_left_iff
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: rw [max_le_iff]
state_before: a b : Cardinal
⊢ a * b = a ↔ max ℵ₀ b ≤ a ∧ b ≠ 0 ∨ b = 1 ∨ a = 0

tactic: refine' ⟨fun h => _, _⟩
state_before: a b : Cardinal
⊢ a * b = a ↔ (ℵ₀ ≤ a ∧ b ≤ a) ∧ b ≠ 0 ∨ b = 1 ∨ a = 0

tactic: cases' le_or_lt ℵ₀ a with ha ha
state_before: case refine'_1
a b : Cardinal
h : a * b = a
⊢ (ℵ₀ ≤ a ∧ b ≤ a) ∧ b ≠ 0 ∨ b = 1 ∨ a = 0

tactic: right
state_before: case refine'_1.inr
a b : Cardinal
h : a * b = a
ha : a < ℵ₀
⊢ (ℵ₀ ≤ a ∧ b ≤ a) ∧ b ≠ 0 ∨ b = 1 ∨ a = 0

tactic: by_cases h2a : a = 0
state_before: case refine'_1.inr.h
a b : Cardinal
h : a * b = a
ha : a < ℵ₀
⊢ b = 1 ∨ a = 0

tactic: have hb : b ≠ 0 := by
  rintro rfl
  apply h2a
  rw [mul_zero] at h
  exact h.symm
state_before: case neg
a b : Cardinal
h : a * b = a
ha : a < ℵ₀
h2a : ¬a = 0
⊢ b = 1 ∨ a = 0

tactic: left
state_before: case neg
a b : Cardinal
h : a * b = a
ha : a < ℵ₀
h2a : ¬a = 0
hb : b ≠ 0
⊢ b = 1 ∨ a = 0

tactic: rw [← h, mul_lt_aleph0_iff, lt_aleph0, lt_aleph0] at ha
state_before: case neg.h
a b : Cardinal
h : a * b = a
ha : a < ℵ₀
h2a : ¬a = 0
hb : b ≠ 0
⊢ b = 1

tactic: rcases ha with (rfl | rfl | ⟨⟨n, rfl⟩, ⟨m, rfl⟩⟩)
state_before: case neg.h
a b : Cardinal
h : a * b = a
ha : a = 0 ∨ b = 0 ∨ (∃ n, a = ↑n) ∧ ∃ n, b = ↑n
h2a : ¬a = 0
hb : b ≠ 0
⊢ b = 1

tactic: contradiction
state_before: case neg.h.inl
b : Cardinal
hb : b ≠ 0
h : 0 * b = 0
h2a : ¬0 = 0
⊢ b = 1

case neg.h.inr.inl
a : Cardinal
h2a : ¬a = 0
h : a * 0 = a
hb : 0 ≠ 0
⊢ 0 = 1

case neg.h.inr.inr.intro.intro.intro
n : ℕ
h2a : ¬↑n = 0
m : ℕ
hb : ↑m ≠ 0
h : ↑n * ↑m = ↑n
⊢ ↑m = 1

tactic: contradiction
state_before: case neg.h.inr.inl
a : Cardinal
h2a : ¬a = 0
h : a * 0 = a
hb : 0 ≠ 0
⊢ 0 = 1

case neg.h.inr.inr.intro.intro.intro
n : ℕ
h2a : ¬↑n = 0
m : ℕ
hb : ↑m ≠ 0
h : ↑n * ↑m = ↑n
⊢ ↑m = 1

tactic: rw [← Ne] at h2a
state_before: case neg.h.inr.inr.intro.intro.intro
n : ℕ
h2a : ¬↑n = 0
m : ℕ
hb : ↑m ≠ 0
h : ↑n * ↑m = ↑n
⊢ ↑m = 1

tactic: rw [← one_le_iff_ne_zero] at h2a hb
state_before: case neg.h.inr.inr.intro.intro.intro
n : ℕ
h2a : ↑n ≠ 0
m : ℕ
hb : ↑m ≠ 0
h : ↑n * ↑m = ↑n
⊢ ↑m = 1

tactic: norm_cast  at h2a hb h⊢
state_before: case neg.h.inr.inr.intro.intro.intro
n : ℕ
h2a : 1 ≤ ↑n
m : ℕ
hb : 1 ≤ ↑m
h : ↑n * ↑m = ↑n
⊢ ↑m = 1

tactic: apply le_antisymm _ hb
state_before: case neg.h.inr.inr.intro.intro.intro
n m : ℕ
h2a : 1 ≤ n
hb : 1 ≤ m
h : n * m = n
⊢ m = 1

tactic: rw [← not_lt]
state_before: n m : ℕ
h2a : 1 ≤ n
hb : 1 ≤ m
h : n * m = n
⊢ m ≤ 1

tactic: apply fun h2b => ne_of_gt _ h
state_before: n m : ℕ
h2a : 1 ≤ n
hb : 1 ≤ m
h : n * m = n
⊢ ¬1 < m

tactic: conv_rhs => left; rw [← mul_one n]
state_before: n m : ℕ
h2a : 1 ≤ n
hb : 1 ≤ m
h : n * m = n
⊢ 1 < m → n < n * m

tactic: rw [mul_lt_mul_left]
state_before: n m : ℕ
h2a : 1 ≤ n
hb : 1 ≤ m
h : n * m = n
⊢ 1 < m → n * 1 < n * m

tactic: exact id
state_before: n m : ℕ
h2a : 1 ≤ n
hb : 1 ≤ m
h : n * m = n
⊢ 1 < m → 1 < m

n m : ℕ
h2a : 1 ≤ n
hb : 1 ≤ m
h : n * m = n
⊢ 0 < n

tactic: apply Nat.lt_of_succ_le h2a
state_before: n m : ℕ
h2a : 1 ≤ n
hb : 1 ≤ m
h : n * m = n
⊢ 0 < n

tactic: have : a ≠ 0 := by
  rintro rfl
  exact ha.not_lt aleph0_pos
state_before: case refine'_1.inl
a b : Cardinal
h : a * b = a
ha : ℵ₀ ≤ a
⊢ (ℵ₀ ≤ a ∧ b ≤ a) ∧ b ≠ 0 ∨ b = 1 ∨ a = 0

tactic: left
state_before: case refine'_1.inl
a b : Cardinal
h : a * b = a
ha : ℵ₀ ≤ a
this : a ≠ 0
⊢ (ℵ₀ ≤ a ∧ b ≤ a) ∧ b ≠ 0 ∨ b = 1 ∨ a = 0

tactic: rw [and_assoc]
state_before: case refine'_1.inl.h
a b : Cardinal
h : a * b = a
ha : ℵ₀ ≤ a
this : a ≠ 0
⊢ (ℵ₀ ≤ a ∧ b ≤ a) ∧ b ≠ 0

tactic: use ha
state_before: case refine'_1.inl.h
a b : Cardinal
h : a * b = a
ha : ℵ₀ ≤ a
this : a ≠ 0
⊢ ℵ₀ ≤ a ∧ b ≤ a ∧ b ≠ 0

tactic: constructor
state_before: case refine'_1.inl.h
a b : Cardinal
h : a * b = a
ha : ℵ₀ ≤ a
this : a ≠ 0
⊢ b ≤ a ∧ b ≠ 0

tactic: rintro rfl
state_before: a b : Cardinal
h : a * b = a
ha : ℵ₀ ≤ a
⊢ a ≠ 0

tactic: exact ha.not_lt aleph0_pos
state_before: b : Cardinal
h : 0 * b = 0
ha : ℵ₀ ≤ 0
⊢ False

tactic: rw [← not_lt]
state_before: case refine'_1.inl.h.left
a b : Cardinal
h : a * b = a
ha : ℵ₀ ≤ a
this : a ≠ 0
⊢ b ≤ a

tactic: exact fun hb => ne_of_gt (hb.trans_le (le_mul_left this)) h
state_before: case refine'_1.inl.h.left
a b : Cardinal
h : a * b = a
ha : ℵ₀ ≤ a
this : a ≠ 0
⊢ ¬a < b

tactic: rintro rfl
state_before: case refine'_1.inl.h.right
a b : Cardinal
h : a * b = a
ha : ℵ₀ ≤ a
this : a ≠ 0
⊢ b ≠ 0

tactic: apply this
state_before: case refine'_1.inl.h.right
a : Cardinal
ha : ℵ₀ ≤ a
this : a ≠ 0
h : a * 0 = a
⊢ False

tactic: rw [mul_zero] at h
state_before: case refine'_1.inl.h.right
a : Cardinal
ha : ℵ₀ ≤ a
this : a ≠ 0
h : a * 0 = a
⊢ a = 0

tactic: exact h.symm
state_before: case refine'_1.inl.h.right
a : Cardinal
ha : ℵ₀ ≤ a
this : a ≠ 0
h : 0 = a
⊢ a = 0

tactic: exact Or.inr h2a
state_before: case pos
a b : Cardinal
h : a * b = a
ha : a < ℵ₀
h2a : a = 0
⊢ b = 1 ∨ a = 0

tactic: rintro rfl
state_before: a b : Cardinal
h : a * b = a
ha : a < ℵ₀
h2a : ¬a = 0
⊢ b ≠ 0

tactic: apply h2a
state_before: a : Cardinal
ha : a < ℵ₀
h2a : ¬a = 0
h : a * 0 = a
⊢ False

tactic: rw [mul_zero] at h
state_before: a : Cardinal
ha : a < ℵ₀
h2a : ¬a = 0
h : a * 0 = a
⊢ a = 0

tactic: exact h.symm
state_before: a : Cardinal
ha : a < ℵ₀
h2a : ¬a = 0
h : 0 = a
⊢ a = 0

tactic: rintro (⟨⟨ha, hab⟩, hb⟩ | rfl | rfl)
state_before: case refine'_2
a b : Cardinal
⊢ (ℵ₀ ≤ a ∧ b ≤ a) ∧ b ≠ 0 ∨ b = 1 ∨ a = 0 → a * b = a

tactic: all_goals simp
state_before: case refine'_2.inr.inl
a : Cardinal
⊢ a * 1 = a

case refine'_2.inr.inr
b : Cardinal
⊢ 0 * b = 0

tactic: rw [mul_eq_max_of_aleph0_le_left ha hb, max_eq_left hab]
state_before: case refine'_2.inl.intro.intro
a b : Cardinal
hb : b ≠ 0
ha : ℵ₀ ≤ a
hab : b ≤ a
⊢ a * b = a

tactic: simp
state_before: case refine'_2.inr.inr
b : Cardinal
⊢ 0 * b = 0