[GOAL]
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Zero α
inst✝ : Mul α
⊢ ⊤ * ⊤ = ⊤
[PROOFSTEP]
simp [mul_def]
[GOAL]
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Zero α
inst✝ : Mul α
⊢ Option.map₂ (fun x x_1 => x * x_1) ⊤ ⊤ = ⊤
[PROOFSTEP]
rfl
[GOAL]
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Zero α
inst✝ : Mul α
a : WithTop α
⊢ a * ⊤ = if a = 0 then 0 else ⊤
[PROOFSTEP]
induction a using recTopCoe
[GOAL]
case top
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Zero α
inst✝ : Mul α
⊢ ⊤ * ⊤ = if ⊤ = 0 then 0 else ⊤
[PROOFSTEP]
simp [mul_def]
[GOAL]
case coe
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Zero α
inst✝ : Mul α
a✝ : α
⊢ ↑a✝ * ⊤ = if ↑a✝ = 0 then 0 else ⊤
[PROOFSTEP]
simp [mul_def]
[GOAL]
case top
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Zero α
inst✝ : Mul α
⊢ Option.map₂ (fun x x_1 => x * x_1) ⊤ ⊤ = ⊤
[PROOFSTEP]
rfl
[GOAL]
case coe
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Zero α
inst✝ : Mul α
a✝ : α
⊢ (if a✝ = 0 then 0 else Option.map₂ (fun x x_1 => x * x_1) ↑a✝ ⊤) = if a✝ = 0 then 0 else ⊤
[PROOFSTEP]
rfl
[GOAL]
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Zero α
inst✝ : Mul α
a : WithTop α
h : a ≠ 0
⊢ a * ⊤ = ⊤
[PROOFSTEP]
rw [mul_top', if_neg h]
[GOAL]
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Zero α
inst✝ : Mul α
a : WithTop α
⊢ ⊤ * a = if a = 0 then 0 else ⊤
[PROOFSTEP]
induction a using recTopCoe
[GOAL]
case top
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Zero α
inst✝ : Mul α
⊢ ⊤ * ⊤ = if ⊤ = 0 then 0 else ⊤
[PROOFSTEP]
simp [mul_def]
[GOAL]
case coe
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Zero α
inst✝ : Mul α
a✝ : α
⊢ ⊤ * ↑a✝ = if ↑a✝ = 0 then 0 else ⊤
[PROOFSTEP]
simp [mul_def]
[GOAL]
case top
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Zero α
inst✝ : Mul α
⊢ Option.map₂ (fun x x_1 => x * x_1) ⊤ ⊤ = ⊤
[PROOFSTEP]
rfl
[GOAL]
case coe
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Zero α
inst✝ : Mul α
a✝ : α
⊢ (if a✝ = 0 then 0 else Option.map₂ (fun x x_1 => x * x_1) ⊤ ↑a✝) = if a✝ = 0 then 0 else ⊤
[PROOFSTEP]
rfl
[GOAL]
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Zero α
inst✝ : Mul α
a : WithTop α
h : a ≠ 0
⊢ ⊤ * a = ⊤
[PROOFSTEP]
rw [top_mul', if_neg h]
[GOAL]
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Zero α
inst✝ : Mul α
a b : WithTop α
⊢ a * b = ⊤ ↔ a ≠ 0 ∧ b = ⊤ ∨ a = ⊤ ∧ b ≠ 0
[PROOFSTEP]
rw [mul_def, ite_eq_iff, ← none_eq_top, Option.map₂_eq_none_iff]
[GOAL]
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Zero α
inst✝ : Mul α
a b : WithTop α
⊢ (a = 0 ∨ b = 0) ∧ 0 = none ∨ ¬(a = 0 ∨ b = 0) ∧ (a = none ∨ b = none) ↔ a ≠ 0 ∧ b = none ∨ a = none ∧ b ≠ 0
[PROOFSTEP]
have ha : a = 0 → a ≠ none := fun h => h.symm ▸ zero_ne_top
[GOAL]
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Zero α
inst✝ : Mul α
a b : WithTop α
ha : a = 0 → a ≠ none
⊢ (a = 0 ∨ b = 0) ∧ 0 = none ∨ ¬(a = 0 ∨ b = 0) ∧ (a = none ∨ b = none) ↔ a ≠ 0 ∧ b = none ∨ a = none ∧ b ≠ 0
[PROOFSTEP]
have hb : b = 0 → b ≠ none := fun h => h.symm ▸ zero_ne_top
[GOAL]
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Zero α
inst✝ : Mul α
a b : WithTop α
ha : a = 0 → a ≠ none
hb : b = 0 → b ≠ none
⊢ (a = 0 ∨ b = 0) ∧ 0 = none ∨ ¬(a = 0 ∨ b = 0) ∧ (a = none ∨ b = none) ↔ a ≠ 0 ∧ b = none ∨ a = none ∧ b ≠ 0
[PROOFSTEP]
tauto
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : Zero α
inst✝¹ : Mul α
inst✝ : LT α
a b : WithTop α
ha : a < ⊤
hb : b < ⊤
⊢ a * b < ⊤
[PROOFSTEP]
rw [WithTop.lt_top_iff_ne_top] at *
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : Zero α
inst✝¹ : Mul α
inst✝ : LT α
a b : WithTop α
ha : a ≠ ⊤
hb : b ≠ ⊤
⊢ a * b ≠ ⊤
[PROOFSTEP]
simp only [Ne.def, mul_eq_top_iff, *, and_false, false_and, false_or]
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : Zero α
inst✝¹ : Mul α
inst✝ : NoZeroDivisors α
⊢ NoZeroDivisors (WithTop α)
[PROOFSTEP]
refine ⟨fun h₁ => Decidable.by_contradiction <| fun h₂ => ?_⟩
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : Zero α
inst✝¹ : Mul α
inst✝ : NoZeroDivisors α
a✝ b✝ : WithTop α
h₁ : a✝ * b✝ = 0
h₂ : ¬(a✝ = 0 ∨ b✝ = 0)
⊢ False
[PROOFSTEP]
rw [mul_def, if_neg h₂] at h₁
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : Zero α
inst✝¹ : Mul α
inst✝ : NoZeroDivisors α
a✝ b✝ : WithTop α
h₁ : Option.map₂ (fun x x_1 => x * x_1) a✝ b✝ = 0
h₂ : ¬(a✝ = 0 ∨ b✝ = 0)
⊢ False
[PROOFSTEP]
rcases Option.mem_map₂_iff.1 h₁ with ⟨a, b, (rfl : _ = _), (rfl : _ = _), hab⟩
[GOAL]
case intro.intro.intro.intro
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : Zero α
inst✝¹ : Mul α
inst✝ : NoZeroDivisors α
a b : α
hab : a * b = 0
h₁ : Option.map₂ (fun x x_1 => x * x_1) (Option.some a) (Option.some b) = 0
h₂ : ¬(Option.some a = 0 ∨ Option.some b = 0)
⊢ False
[PROOFSTEP]
exact h₂ ((eq_zero_or_eq_zero_of_mul_eq_zero hab).imp (congr_arg some) (congr_arg some))
[GOAL]
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a b : α
⊢ ↑(a * b) = ↑a * ↑b
[PROOFSTEP]
by_cases ha : a = 0
[GOAL]
case pos
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a b : α
ha : a = 0
⊢ ↑(a * b) = ↑a * ↑b
[PROOFSTEP]
simp [ha]
[GOAL]
case neg
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a b : α
ha : ¬a = 0
⊢ ↑(a * b) = ↑a * ↑b
[PROOFSTEP]
by_cases hb : b = 0
[GOAL]
case pos
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a b : α
ha : ¬a = 0
hb : b = 0
⊢ ↑(a * b) = ↑a * ↑b
[PROOFSTEP]
simp [hb]
[GOAL]
case neg
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a b : α
ha : ¬a = 0
hb : ¬b = 0
⊢ ↑(a * b) = ↑a * ↑b
[PROOFSTEP]
simp [*, mul_def]
[GOAL]
case neg
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a b : α
ha : ¬a = 0
hb : ¬b = 0
⊢ ↑(a * b) = Option.map₂ (fun x x_1 => x * x_1) ↑a ↑b
[PROOFSTEP]
rfl
[GOAL]
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
b : α
hb : b ≠ 0
⊢ (if ⊤ = 0 ∨ ↑b = 0 then 0 else ⊤) = ⊤
[PROOFSTEP]
simp [hb]
[GOAL]
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
b : α
hb : b ≠ 0
a : α
⊢ Option.some a * ↑b = Option.bind (Option.some a) fun a => Option.some (a * b)
[PROOFSTEP]
rw [some_eq_coe, ← coe_mul]
[GOAL]
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
b : α
hb : b ≠ 0
a : α
⊢ ↑(a * b) = Option.bind ↑a fun a => Option.some (a * b)
[PROOFSTEP]
rfl
[GOAL]
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a b : WithTop α
⊢ untop' 0 (a * b) = untop' 0 a * untop' 0 b
[PROOFSTEP]
by_cases ha : a = 0
[GOAL]
case pos
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a b : WithTop α
ha : a = 0
⊢ untop' 0 (a * b) = untop' 0 a * untop' 0 b
[PROOFSTEP]
rw [ha, zero_mul, ← coe_zero, untop'_coe, zero_mul]
[GOAL]
case neg
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a b : WithTop α
ha : ¬a = 0
⊢ untop' 0 (a * b) = untop' 0 a * untop' 0 b
[PROOFSTEP]
by_cases hb : b = 0
[GOAL]
case pos
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a b : WithTop α
ha : ¬a = 0
hb : b = 0
⊢ untop' 0 (a * b) = untop' 0 a * untop' 0 b
[PROOFSTEP]
rw [hb, mul_zero, ← coe_zero, untop'_coe, mul_zero]
[GOAL]
case neg
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a b : WithTop α
ha : ¬a = 0
hb : ¬b = 0
⊢ untop' 0 (a * b) = untop' 0 a * untop' 0 b
[PROOFSTEP]
induction a using WithTop.recTopCoe
[GOAL]
case neg.top
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
b : WithTop α
hb : ¬b = 0
ha : ¬⊤ = 0
⊢ untop' 0 (⊤ * b) = untop' 0 ⊤ * untop' 0 b
[PROOFSTEP]
rw [top_mul hb, untop'_top, zero_mul]
[GOAL]
case neg.coe
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
b : WithTop α
hb : ¬b = 0
a✝ : α
ha : ¬↑a✝ = 0
⊢ untop' 0 (↑a✝ * b) = untop' 0 ↑a✝ * untop' 0 b
[PROOFSTEP]
induction b using WithTop.recTopCoe
[GOAL]
case neg.coe.top
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a✝ : α
ha : ¬↑a✝ = 0
hb : ¬⊤ = 0
⊢ untop' 0 (↑a✝ * ⊤) = untop' 0 ↑a✝ * untop' 0 ⊤
[PROOFSTEP]
rw [mul_top ha, untop'_top, mul_zero]
[GOAL]
case neg.coe.coe
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a✝¹ : α
ha : ¬↑a✝¹ = 0
a✝ : α
hb : ¬↑a✝ = 0
⊢ untop' 0 (↑a✝¹ * ↑a✝) = untop' 0 ↑a✝¹ * untop' 0 ↑a✝
[PROOFSTEP]
rw [← coe_mul, untop'_coe, untop'_coe, untop'_coe]
[GOAL]
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : MulZeroOneClass α
inst✝ : Nontrivial α
src✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop
a✝ : WithTop α
a : α
⊢ 1 * ↑a = ↑a
[PROOFSTEP]
rw [← coe_one, ← coe_mul, one_mul]
[GOAL]
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : MulZeroOneClass α
inst✝ : Nontrivial α
src✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop
a✝ : WithTop α
a : α
⊢ ↑a * 1 = ↑a
[PROOFSTEP]
rw [← coe_one, ← coe_mul, mul_one]
[GOAL]
α : Type u_1
inst✝⁶ : DecidableEq α
R : Type u_2
S : Type u_3
inst✝⁵ : MulZeroOneClass R
inst✝⁴ : DecidableEq R
inst✝³ : Nontrivial R
inst✝² : MulZeroOneClass S
inst✝¹ : DecidableEq S
inst✝ : Nontrivial S
f : R →*₀ S
hf : Function.Injective ↑f
src✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f
src✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f
x y : WithTop R
⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (x * y) =
    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } x *
      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } y
[PROOFSTEP]
have : ∀ z, map f z = 0 ↔ z = 0 := fun z => (Option.map_injective hf).eq_iff' f.toZeroHom.withTopMap.map_zero
[GOAL]
α : Type u_1
inst✝⁶ : DecidableEq α
R : Type u_2
S : Type u_3
inst✝⁵ : MulZeroOneClass R
inst✝⁴ : DecidableEq R
inst✝³ : Nontrivial R
inst✝² : MulZeroOneClass S
inst✝¹ : DecidableEq S
inst✝ : Nontrivial S
f : R →*₀ S
hf : Function.Injective ↑f
src✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f
src✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f
x y : WithTop R
this : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0
⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (x * y) =
    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } x *
      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } y
[PROOFSTEP]
rcases Decidable.eq_or_ne x 0 with (rfl | hx)
[GOAL]
case inl
α : Type u_1
inst✝⁶ : DecidableEq α
R : Type u_2
S : Type u_3
inst✝⁵ : MulZeroOneClass R
inst✝⁴ : DecidableEq R
inst✝³ : Nontrivial R
inst✝² : MulZeroOneClass S
inst✝¹ : DecidableEq S
inst✝ : Nontrivial S
f : R →*₀ S
hf : Function.Injective ↑f
src✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f
src✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f
y : WithTop R
this : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0
⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (0 * y) =
    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } 0 *
      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } y
[PROOFSTEP]
simp
[GOAL]
case inr
α : Type u_1
inst✝⁶ : DecidableEq α
R : Type u_2
S : Type u_3
inst✝⁵ : MulZeroOneClass R
inst✝⁴ : DecidableEq R
inst✝³ : Nontrivial R
inst✝² : MulZeroOneClass S
inst✝¹ : DecidableEq S
inst✝ : Nontrivial S
f : R →*₀ S
hf : Function.Injective ↑f
src✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f
src✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f
x y : WithTop R
this : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0
hx : x ≠ 0
⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (x * y) =
    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } x *
      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } y
[PROOFSTEP]
rcases Decidable.eq_or_ne y 0 with (rfl | hy)
[GOAL]
case inr.inl
α : Type u_1
inst✝⁶ : DecidableEq α
R : Type u_2
S : Type u_3
inst✝⁵ : MulZeroOneClass R
inst✝⁴ : DecidableEq R
inst✝³ : Nontrivial R
inst✝² : MulZeroOneClass S
inst✝¹ : DecidableEq S
inst✝ : Nontrivial S
f : R →*₀ S
hf : Function.Injective ↑f
src✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f
src✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f
x : WithTop R
this : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0
hx : x ≠ 0
⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (x * 0) =
    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } x *
      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } 0
[PROOFSTEP]
simp
[GOAL]
case inr.inr
α : Type u_1
inst✝⁶ : DecidableEq α
R : Type u_2
S : Type u_3
inst✝⁵ : MulZeroOneClass R
inst✝⁴ : DecidableEq R
inst✝³ : Nontrivial R
inst✝² : MulZeroOneClass S
inst✝¹ : DecidableEq S
inst✝ : Nontrivial S
f : R →*₀ S
hf : Function.Injective ↑f
src✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f
src✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f
x y : WithTop R
this : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0
hx : x ≠ 0
hy : y ≠ 0
⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (x * y) =
    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } x *
      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } y
[PROOFSTEP]
induction' x using WithTop.recTopCoe with x
[GOAL]
case inr.inr.top
α : Type u_1
inst✝⁶ : DecidableEq α
R : Type u_2
S : Type u_3
inst✝⁵ : MulZeroOneClass R
inst✝⁴ : DecidableEq R
inst✝³ : Nontrivial R
inst✝² : MulZeroOneClass S
inst✝¹ : DecidableEq S
inst✝ : Nontrivial S
f : R →*₀ S
hf : Function.Injective ↑f
src✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f
src✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f
x y : WithTop R
this : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0
hx✝ : x ≠ 0
hy : y ≠ 0
hx : ⊤ ≠ 0
⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (⊤ * y) =
    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } ⊤ *
      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } y
[PROOFSTEP]
simp [hy, this]
[GOAL]
case inr.inr.coe
α : Type u_1
inst✝⁶ : DecidableEq α
R : Type u_2
S : Type u_3
inst✝⁵ : MulZeroOneClass R
inst✝⁴ : DecidableEq R
inst✝³ : Nontrivial R
inst✝² : MulZeroOneClass S
inst✝¹ : DecidableEq S
inst✝ : Nontrivial S
f : R →*₀ S
hf : Function.Injective ↑f
src✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f
src✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f
x✝ y : WithTop R
this : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0
hx✝ : x✝ ≠ 0
hy : y ≠ 0
x : R
hx : ↑x ≠ 0
⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (↑x * y) =
    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } ↑x *
      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } y
[PROOFSTEP]
induction' y using WithTop.recTopCoe with y
[GOAL]
case inr.inr.coe.top
α : Type u_1
inst✝⁶ : DecidableEq α
R : Type u_2
S : Type u_3
inst✝⁵ : MulZeroOneClass R
inst✝⁴ : DecidableEq R
inst✝³ : Nontrivial R
inst✝² : MulZeroOneClass S
inst✝¹ : DecidableEq S
inst✝ : Nontrivial S
f : R →*₀ S
hf : Function.Injective ↑f
src✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f
src✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f
x✝ y : WithTop R
this : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0
hx✝ : x✝ ≠ 0
hy✝ : y ≠ 0
x : R
hx : ↑x ≠ 0
hy : ⊤ ≠ 0
⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (↑x * ⊤) =
    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } ↑x *
      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } ⊤
[PROOFSTEP]
have : (f x : WithTop S) ≠ 0 := by simpa [hf.eq_iff' (map_zero f)] using hx
[GOAL]
α : Type u_1
inst✝⁶ : DecidableEq α
R : Type u_2
S : Type u_3
inst✝⁵ : MulZeroOneClass R
inst✝⁴ : DecidableEq R
inst✝³ : Nontrivial R
inst✝² : MulZeroOneClass S
inst✝¹ : DecidableEq S
inst✝ : Nontrivial S
f : R →*₀ S
hf : Function.Injective ↑f
src✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f
src✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f
x✝ y : WithTop R
this : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0
hx✝ : x✝ ≠ 0
hy✝ : y ≠ 0
x : R
hx : ↑x ≠ 0
hy : ⊤ ≠ 0
⊢ ↑(↑f x) ≠ 0
[PROOFSTEP]
simpa [hf.eq_iff' (map_zero f)] using hx
[GOAL]
case inr.inr.coe.top
α : Type u_1
inst✝⁶ : DecidableEq α
R : Type u_2
S : Type u_3
inst✝⁵ : MulZeroOneClass R
inst✝⁴ : DecidableEq R
inst✝³ : Nontrivial R
inst✝² : MulZeroOneClass S
inst✝¹ : DecidableEq S
inst✝ : Nontrivial S
f : R →*₀ S
hf : Function.Injective ↑f
src✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f
src✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f
x✝ y : WithTop R
this✝ : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0
hx✝ : x✝ ≠ 0
hy✝ : y ≠ 0
x : R
hx : ↑x ≠ 0
hy : ⊤ ≠ 0
this : ↑(↑f x) ≠ 0
⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (↑x * ⊤) =
    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } ↑x *
      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } ⊤
[PROOFSTEP]
simp [mul_top hx, mul_top this]
[GOAL]
case inr.inr.coe.coe
α : Type u_1
inst✝⁶ : DecidableEq α
R : Type u_2
S : Type u_3
inst✝⁵ : MulZeroOneClass R
inst✝⁴ : DecidableEq R
inst✝³ : Nontrivial R
inst✝² : MulZeroOneClass S
inst✝¹ : DecidableEq S
inst✝ : Nontrivial S
f : R →*₀ S
hf : Function.Injective ↑f
src✝¹ : ZeroHom (WithTop R) (WithTop S) := ZeroHom.withTopMap ↑f
src✝ : OneHom (WithTop R) (WithTop S) := OneHom.withTopMap ↑↑f
x✝ y✝ : WithTop R
this : ∀ (z : WithTop R), map (↑f) z = 0 ↔ z = 0
hx✝ : x✝ ≠ 0
hy✝ : y✝ ≠ 0
x : R
hx : ↑x ≠ 0
y : R
hy : ↑y ≠ 0
⊢ ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } (↑x * ↑y) =
    ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } ↑x *
      ZeroHom.toFun { toFun := map ↑f, map_zero' := (_ : ZeroHom.toFun src✝¹ 0 = 0) } ↑y
[PROOFSTEP]
simp only [map_coe, ← coe_mul, map_mul]
[GOAL]
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : SemigroupWithZero α
inst✝ : NoZeroDivisors α
src✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop
a b c : WithTop α
⊢ a * b * c = a * (b * c)
[PROOFSTEP]
rcases eq_or_ne a 0 with (rfl | ha)
[GOAL]
case inl
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : SemigroupWithZero α
inst✝ : NoZeroDivisors α
src✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop
b c : WithTop α
⊢ 0 * b * c = 0 * (b * c)
[PROOFSTEP]
simp only [zero_mul]
[GOAL]
case inr
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : SemigroupWithZero α
inst✝ : NoZeroDivisors α
src✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop
a b c : WithTop α
ha : a ≠ 0
⊢ a * b * c = a * (b * c)
[PROOFSTEP]
rcases eq_or_ne b 0 with (rfl | hb)
[GOAL]
case inr.inl
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : SemigroupWithZero α
inst✝ : NoZeroDivisors α
src✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop
a c : WithTop α
ha : a ≠ 0
⊢ a * 0 * c = a * (0 * c)
[PROOFSTEP]
simp only [zero_mul, mul_zero]
[GOAL]
case inr.inr
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : SemigroupWithZero α
inst✝ : NoZeroDivisors α
src✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop
a b c : WithTop α
ha : a ≠ 0
hb : b ≠ 0
⊢ a * b * c = a * (b * c)
[PROOFSTEP]
rcases eq_or_ne c 0 with (rfl | hc)
[GOAL]
case inr.inr.inl
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : SemigroupWithZero α
inst✝ : NoZeroDivisors α
src✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop
a b : WithTop α
ha : a ≠ 0
hb : b ≠ 0
⊢ a * b * 0 = a * (b * 0)
[PROOFSTEP]
simp only [mul_zero]
  -- Porting note: below needed to be rewritten due to changed `simp` behaviour for `coe`
[GOAL]
case inr.inr.inr
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : SemigroupWithZero α
inst✝ : NoZeroDivisors α
src✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop
a b c : WithTop α
ha : a ≠ 0
hb : b ≠ 0
hc : c ≠ 0
⊢ a * b * c = a * (b * c)
[PROOFSTEP]
induction' a using WithTop.recTopCoe with a
[GOAL]
case inr.inr.inr.top
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : SemigroupWithZero α
inst✝ : NoZeroDivisors α
src✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop
a b c : WithTop α
ha✝ : a ≠ 0
hb : b ≠ 0
hc : c ≠ 0
ha : ⊤ ≠ 0
⊢ ⊤ * b * c = ⊤ * (b * c)
[PROOFSTEP]
simp [hb, hc]
[GOAL]
case inr.inr.inr.coe
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : SemigroupWithZero α
inst✝ : NoZeroDivisors α
src✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop
a✝ b c : WithTop α
ha✝ : a✝ ≠ 0
hb : b ≠ 0
hc : c ≠ 0
a : α
ha : ↑a ≠ 0
⊢ ↑a * b * c = ↑a * (b * c)
[PROOFSTEP]
induction' b using WithTop.recTopCoe with b
[GOAL]
case inr.inr.inr.coe.top
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : SemigroupWithZero α
inst✝ : NoZeroDivisors α
src✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop
a✝ b c : WithTop α
ha✝ : a✝ ≠ 0
hb✝ : b ≠ 0
hc : c ≠ 0
a : α
ha : ↑a ≠ 0
hb : ⊤ ≠ 0
⊢ ↑a * ⊤ * c = ↑a * (⊤ * c)
[PROOFSTEP]
simp [mul_top ha, top_mul hc]
[GOAL]
case inr.inr.inr.coe.coe
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : SemigroupWithZero α
inst✝ : NoZeroDivisors α
src✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop
a✝ b✝ c : WithTop α
ha✝ : a✝ ≠ 0
hb✝ : b✝ ≠ 0
hc : c ≠ 0
a : α
ha : ↑a ≠ 0
b : α
hb : ↑b ≠ 0
⊢ ↑a * ↑b * c = ↑a * (↑b * c)
[PROOFSTEP]
induction' c using WithTop.recTopCoe with c
[GOAL]
case inr.inr.inr.coe.coe.top
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : SemigroupWithZero α
inst✝ : NoZeroDivisors α
src✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop
a✝ b✝ c : WithTop α
ha✝ : a✝ ≠ 0
hb✝ : b✝ ≠ 0
hc✝ : c ≠ 0
a : α
ha : ↑a ≠ 0
b : α
hb : ↑b ≠ 0
hc : ⊤ ≠ 0
⊢ ↑a * ↑b * ⊤ = ↑a * (↑b * ⊤)
[PROOFSTEP]
rw [mul_top hb, mul_top ha]
[GOAL]
case inr.inr.inr.coe.coe.top
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : SemigroupWithZero α
inst✝ : NoZeroDivisors α
src✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop
a✝ b✝ c : WithTop α
ha✝ : a✝ ≠ 0
hb✝ : b✝ ≠ 0
hc✝ : c ≠ 0
a : α
ha : ↑a ≠ 0
b : α
hb : ↑b ≠ 0
hc : ⊤ ≠ 0
⊢ ↑a * ↑b * ⊤ = ⊤
[PROOFSTEP]
rw [← coe_zero, ne_eq, coe_eq_coe] at ha hb
[GOAL]
case inr.inr.inr.coe.coe.top
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : SemigroupWithZero α
inst✝ : NoZeroDivisors α
src✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop
a✝ b✝ c : WithTop α
ha✝ : a✝ ≠ 0
hb✝ : b✝ ≠ 0
hc✝ : c ≠ 0
a : α
ha : ¬a = 0
b : α
hb : ¬b = 0
hc : ⊤ ≠ 0
⊢ ↑a * ↑b * ⊤ = ⊤
[PROOFSTEP]
simp [ha, hb]
[GOAL]
case inr.inr.inr.coe.coe.coe
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : SemigroupWithZero α
inst✝ : NoZeroDivisors α
src✝ : MulZeroClass (WithTop α) := instMulZeroClassWithTop
a✝ b✝ c✝ : WithTop α
ha✝ : a✝ ≠ 0
hb✝ : b✝ ≠ 0
hc✝ : c✝ ≠ 0
a : α
ha : ↑a ≠ 0
b : α
hb : ↑b ≠ 0
c : α
hc : ↑c ≠ 0
⊢ ↑a * ↑b * ↑c = ↑a * (↑b * ↑c)
[PROOFSTEP]
simp only [← coe_mul, mul_assoc]
[GOAL]
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
a b c : WithTop α
⊢ (a + b) * c = a * c + b * c
[PROOFSTEP]
induction' c using WithTop.recTopCoe with c
[GOAL]
case top
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
a b : WithTop α
⊢ (a + b) * ⊤ = a * ⊤ + b * ⊤
[PROOFSTEP]
by_cases ha : a = 0
[GOAL]
case pos
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
a b : WithTop α
ha : a = 0
⊢ (a + b) * ⊤ = a * ⊤ + b * ⊤
[PROOFSTEP]
simp [ha]
[GOAL]
case neg
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
a b : WithTop α
ha : ¬a = 0
⊢ (a + b) * ⊤ = a * ⊤ + b * ⊤
[PROOFSTEP]
simp [ha]
[GOAL]
case coe
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
a b : WithTop α
c : α
⊢ (a + b) * ↑c = a * ↑c + b * ↑c
[PROOFSTEP]
by_cases hc : c = 0
[GOAL]
case pos
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
a b : WithTop α
c : α
hc : c = 0
⊢ (a + b) * ↑c = a * ↑c + b * ↑c
[PROOFSTEP]
simp [hc]
[GOAL]
case neg
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
a b : WithTop α
c : α
hc : ¬c = 0
⊢ (a + b) * ↑c = a * ↑c + b * ↑c
[PROOFSTEP]
simp [mul_coe hc]
[GOAL]
case neg
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
a b : WithTop α
c : α
hc : ¬c = 0
⊢ (Option.bind (a + b) fun a => Option.some (a * c)) =
    (Option.bind a fun a => Option.some (a * c)) + Option.bind b fun a => Option.some (a * c)
[PROOFSTEP]
cases a
[GOAL]
case neg.none
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
b : WithTop α
c : α
hc : ¬c = 0
⊢ (Option.bind (none + b) fun a => Option.some (a * c)) =
    (Option.bind none fun a => Option.some (a * c)) + Option.bind b fun a => Option.some (a * c)
[PROOFSTEP]
cases b
[GOAL]
case neg.some
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
b : WithTop α
c : α
hc : ¬c = 0
val✝ : α
⊢ (Option.bind (Option.some val✝ + b) fun a => Option.some (a * c)) =
    (Option.bind (Option.some val✝) fun a => Option.some (a * c)) + Option.bind b fun a => Option.some (a * c)
[PROOFSTEP]
cases b
[GOAL]
case neg.none.none
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
⊢ (Option.bind (none + none) fun a => Option.some (a * c)) =
    (Option.bind none fun a => Option.some (a * c)) + Option.bind none fun a => Option.some (a * c)
case neg.none.some
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
val✝ : α
⊢ (Option.bind (none + Option.some val✝) fun a => Option.some (a * c)) =
    (Option.bind none fun a => Option.some (a * c)) + Option.bind (Option.some val✝) fun a => Option.some (a * c)
case neg.some.none
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
val✝ : α
⊢ (Option.bind (Option.some val✝ + none) fun a => Option.some (a * c)) =
    (Option.bind (Option.some val✝) fun a => Option.some (a * c)) + Option.bind none fun a => Option.some (a * c)
case neg.some.some
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
val✝¹ val✝ : α
⊢ (Option.bind (Option.some val✝¹ + Option.some val✝) fun a => Option.some (a * c)) =
    (Option.bind (Option.some val✝¹) fun a => Option.some (a * c)) +
      Option.bind (Option.some val✝) fun a => Option.some (a * c)
[PROOFSTEP]
repeat'
  first
  | rfl
  | exact congr_arg some (add_mul _ _ _)
[GOAL]
case neg.none.none
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
⊢ (Option.bind (none + none) fun a => Option.some (a * c)) =
    (Option.bind none fun a => Option.some (a * c)) + Option.bind none fun a => Option.some (a * c)
[PROOFSTEP]
first
| rfl
| exact congr_arg some (add_mul _ _ _)
[GOAL]
case neg.none.none
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
⊢ (Option.bind (none + none) fun a => Option.some (a * c)) =
    (Option.bind none fun a => Option.some (a * c)) + Option.bind none fun a => Option.some (a * c)
[PROOFSTEP]
rfl
[GOAL]
case neg.none.some
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
val✝ : α
⊢ (Option.bind (none + Option.some val✝) fun a => Option.some (a * c)) =
    (Option.bind none fun a => Option.some (a * c)) + Option.bind (Option.some val✝) fun a => Option.some (a * c)
[PROOFSTEP]
first
| rfl
| exact congr_arg some (add_mul _ _ _)
[GOAL]
case neg.none.some
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
val✝ : α
⊢ (Option.bind (none + Option.some val✝) fun a => Option.some (a * c)) =
    (Option.bind none fun a => Option.some (a * c)) + Option.bind (Option.some val✝) fun a => Option.some (a * c)
[PROOFSTEP]
rfl
[GOAL]
case neg.some.none
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
val✝ : α
⊢ (Option.bind (Option.some val✝ + none) fun a => Option.some (a * c)) =
    (Option.bind (Option.some val✝) fun a => Option.some (a * c)) + Option.bind none fun a => Option.some (a * c)
[PROOFSTEP]
first
| rfl
| exact congr_arg some (add_mul _ _ _)
[GOAL]
case neg.some.none
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
val✝ : α
⊢ (Option.bind (Option.some val✝ + none) fun a => Option.some (a * c)) =
    (Option.bind (Option.some val✝) fun a => Option.some (a * c)) + Option.bind none fun a => Option.some (a * c)
[PROOFSTEP]
rfl
[GOAL]
case neg.some.some
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
val✝¹ val✝ : α
⊢ (Option.bind (Option.some val✝¹ + Option.some val✝) fun a => Option.some (a * c)) =
    (Option.bind (Option.some val✝¹) fun a => Option.some (a * c)) +
      Option.bind (Option.some val✝) fun a => Option.some (a * c)
[PROOFSTEP]
first
| rfl
| exact congr_arg some (add_mul _ _ _)
[GOAL]
case neg.some.some
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
val✝¹ val✝ : α
⊢ (Option.bind (Option.some val✝¹ + Option.some val✝) fun a => Option.some (a * c)) =
    (Option.bind (Option.some val✝¹) fun a => Option.some (a * c)) +
      Option.bind (Option.some val✝) fun a => Option.some (a * c)
[PROOFSTEP]
rfl
[GOAL]
case neg.some.some
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
val✝¹ val✝ : α
⊢ (Option.bind (Option.some val✝¹ + Option.some val✝) fun a => Option.some (a * c)) =
    (Option.bind (Option.some val✝¹) fun a => Option.some (a * c)) +
      Option.bind (Option.some val✝) fun a => Option.some (a * c)
[PROOFSTEP]
exact congr_arg some (add_mul _ _ _)
[GOAL]
α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : CanonicallyOrderedCommSemiring α
inst✝ : Nontrivial α
src✝¹ : AddCommMonoidWithOne (WithTop α) := addCommMonoidWithOne
src✝ : CommMonoidWithZero (WithTop α) := commMonoidWithZero
a b c : WithTop α
⊢ a * (b + c) = a * b + a * c
[PROOFSTEP]
rw [mul_comm, distrib', mul_comm b, mul_comm c]
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMono α
⊢ Covariant { x // 0 ≤ x } (WithBot α) (fun x y => ↑x * y) fun x x_1 => x ≤ x_1
[PROOFSTEP]
intro ⟨x, x0⟩ a b h
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMono α
x : WithBot α
x0 : 0 ≤ x
a b : WithBot α
h : a ≤ b
⊢ (fun x y => ↑x * y) { val := x, property := x0 } a ≤ (fun x y => ↑x * y) { val := x, property := x0 } b
[PROOFSTEP]
simp only [Subtype.coe_mk]
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMono α
x : WithBot α
x0 : 0 ≤ x
a b : WithBot α
h : a ≤ b
⊢ x * a ≤ x * b
[PROOFSTEP]
rcases eq_or_ne x 0 with rfl | x0'
[GOAL]
case inl
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMono α
a b : WithBot α
h : a ≤ b
x0 : 0 ≤ 0
⊢ 0 * a ≤ 0 * b
[PROOFSTEP]
simp
[GOAL]
case inr
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMono α
x : WithBot α
x0 : 0 ≤ x
a b : WithBot α
h : a ≤ b
x0' : x ≠ 0
⊢ x * a ≤ x * b
[PROOFSTEP]
lift x to α
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMono α
x : WithBot α
x0 : 0 ≤ x
a b : WithBot α
h : a ≤ b
x0' : x ≠ 0
⊢ x ≠ ⊥
[PROOFSTEP]
rintro rfl
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMono α
a b : WithBot α
h : a ≤ b
x0 : 0 ≤ ⊥
x0' : ⊥ ≠ 0
⊢ False
[PROOFSTEP]
exact (WithBot.bot_lt_coe (0 : α)).not_le x0
[GOAL]
case inr.intro
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMono α
a b : WithBot α
h : a ≤ b
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
⊢ ↑x * a ≤ ↑x * b
[PROOFSTEP]
induction a using WithBot.recBotCoe
[GOAL]
case inr.intro.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMono α
b : WithBot α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
h : ⊥ ≤ b
⊢ ↑x * ⊥ ≤ ↑x * b
[PROOFSTEP]
simp_rw [mul_bot x0', bot_le]
[GOAL]
case inr.intro.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMono α
b : WithBot α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
a✝ : α
h : ↑a✝ ≤ b
⊢ ↑x * ↑a✝ ≤ ↑x * b
[PROOFSTEP]
induction b using WithBot.recBotCoe
[GOAL]
case inr.intro.coe.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMono α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
a✝ : α
h : ↑a✝ ≤ ⊥
⊢ ↑x * ↑a✝ ≤ ↑x * ⊥
[PROOFSTEP]
exact absurd h (bot_lt_coe _).not_le
[GOAL]
case inr.intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMono α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
a✝¹ a✝ : α
h : ↑a✝¹ ≤ ↑a✝
⊢ ↑x * ↑a✝¹ ≤ ↑x * ↑a✝
[PROOFSTEP]
simp only [← coe_mul, coe_le_coe] at *
[GOAL]
case inr.intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMono α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
a✝¹ a✝ : α
h : a✝¹ ≤ a✝
⊢ x * a✝¹ ≤ x * a✝
[PROOFSTEP]
norm_cast at x0
[GOAL]
case inr.intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMono α
x : α
x0' : ↑x ≠ 0
a✝¹ a✝ : α
h : a✝¹ ≤ a✝
x0 : 0 ≤ x
⊢ x * a✝¹ ≤ x * a✝
[PROOFSTEP]
exact mul_le_mul_of_nonneg_left h x0
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMono α
⊢ Covariant { x // 0 ≤ x } (WithBot α) (fun x y => y * ↑x) fun x x_1 => x ≤ x_1
[PROOFSTEP]
intro ⟨x, x0⟩ a b h
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMono α
x : WithBot α
x0 : 0 ≤ x
a b : WithBot α
h : a ≤ b
⊢ (fun x y => y * ↑x) { val := x, property := x0 } a ≤ (fun x y => y * ↑x) { val := x, property := x0 } b
[PROOFSTEP]
simp only [Subtype.coe_mk]
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMono α
x : WithBot α
x0 : 0 ≤ x
a b : WithBot α
h : a ≤ b
⊢ a * x ≤ b * x
[PROOFSTEP]
rcases eq_or_ne x 0 with rfl | x0'
[GOAL]
case inl
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMono α
a b : WithBot α
h : a ≤ b
x0 : 0 ≤ 0
⊢ a * 0 ≤ b * 0
[PROOFSTEP]
simp
[GOAL]
case inr
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMono α
x : WithBot α
x0 : 0 ≤ x
a b : WithBot α
h : a ≤ b
x0' : x ≠ 0
⊢ a * x ≤ b * x
[PROOFSTEP]
lift x to α
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMono α
x : WithBot α
x0 : 0 ≤ x
a b : WithBot α
h : a ≤ b
x0' : x ≠ 0
⊢ x ≠ ⊥
[PROOFSTEP]
rintro rfl
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMono α
a b : WithBot α
h : a ≤ b
x0 : 0 ≤ ⊥
x0' : ⊥ ≠ 0
⊢ False
[PROOFSTEP]
exact (WithBot.bot_lt_coe (0 : α)).not_le x0
[GOAL]
case inr.intro
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMono α
a b : WithBot α
h : a ≤ b
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
⊢ a * ↑x ≤ b * ↑x
[PROOFSTEP]
induction a using WithBot.recBotCoe
[GOAL]
case inr.intro.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMono α
b : WithBot α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
h : ⊥ ≤ b
⊢ ⊥ * ↑x ≤ b * ↑x
[PROOFSTEP]
simp_rw [bot_mul x0', bot_le]
[GOAL]
case inr.intro.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMono α
b : WithBot α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
a✝ : α
h : ↑a✝ ≤ b
⊢ ↑a✝ * ↑x ≤ b * ↑x
[PROOFSTEP]
induction b using WithBot.recBotCoe
[GOAL]
case inr.intro.coe.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMono α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
a✝ : α
h : ↑a✝ ≤ ⊥
⊢ ↑a✝ * ↑x ≤ ⊥ * ↑x
[PROOFSTEP]
exact absurd h (bot_lt_coe _).not_le
[GOAL]
case inr.intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMono α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
a✝¹ a✝ : α
h : ↑a✝¹ ≤ ↑a✝
⊢ ↑a✝¹ * ↑x ≤ ↑a✝ * ↑x
[PROOFSTEP]
simp only [← coe_mul, coe_le_coe] at *
[GOAL]
case inr.intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMono α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
a✝¹ a✝ : α
h : a✝¹ ≤ a✝
⊢ a✝¹ * x ≤ a✝ * x
[PROOFSTEP]
norm_cast at x0
[GOAL]
case inr.intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMono α
x : α
x0' : ↑x ≠ 0
a✝¹ a✝ : α
h : a✝¹ ≤ a✝
x0 : 0 ≤ x
⊢ a✝¹ * x ≤ a✝ * x
[PROOFSTEP]
exact mul_le_mul_of_nonneg_right h x0
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulStrictMono α
⊢ Covariant { x // 0 < x } (WithBot α) (fun x y => ↑x * y) fun x x_1 => x < x_1
[PROOFSTEP]
intro ⟨x, x0⟩ a b h
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulStrictMono α
x : WithBot α
x0 : 0 < x
a b : WithBot α
h : a < b
⊢ (fun x y => ↑x * y) { val := x, property := x0 } a < (fun x y => ↑x * y) { val := x, property := x0 } b
[PROOFSTEP]
simp only [Subtype.coe_mk]
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulStrictMono α
x : WithBot α
x0 : 0 < x
a b : WithBot α
h : a < b
⊢ x * a < x * b
[PROOFSTEP]
lift x to α using x0.ne_bot
[GOAL]
case intro
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulStrictMono α
a b : WithBot α
h : a < b
x : α
x0 : 0 < ↑x
⊢ ↑x * a < ↑x * b
[PROOFSTEP]
induction b using WithBot.recBotCoe
[GOAL]
case intro.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulStrictMono α
a : WithBot α
x : α
x0 : 0 < ↑x
h : a < ⊥
⊢ ↑x * a < ↑x * ⊥
[PROOFSTEP]
exact absurd h not_lt_bot
[GOAL]
case intro.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulStrictMono α
a : WithBot α
x : α
x0 : 0 < ↑x
a✝ : α
h : a < ↑a✝
⊢ ↑x * a < ↑x * ↑a✝
[PROOFSTEP]
induction a using WithBot.recBotCoe
[GOAL]
case intro.coe.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulStrictMono α
x : α
x0 : 0 < ↑x
a✝ : α
h : ⊥ < ↑a✝
⊢ ↑x * ⊥ < ↑x * ↑a✝
[PROOFSTEP]
simp_rw [mul_bot x0.ne.symm, ← coe_mul, bot_lt_coe]
[GOAL]
case intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulStrictMono α
x : α
x0 : 0 < ↑x
a✝¹ a✝ : α
h : ↑a✝ < ↑a✝¹
⊢ ↑x * ↑a✝ < ↑x * ↑a✝¹
[PROOFSTEP]
simp only [← coe_mul, coe_lt_coe] at *
[GOAL]
case intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulStrictMono α
x : α
x0 : 0 < ↑x
a✝¹ a✝ : α
h : a✝ < a✝¹
⊢ x * a✝ < x * a✝¹
[PROOFSTEP]
norm_cast at x0
[GOAL]
case intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulStrictMono α
x a✝¹ a✝ : α
h : a✝ < a✝¹
x0 : 0 < x
⊢ x * a✝ < x * a✝¹
[PROOFSTEP]
exact mul_lt_mul_of_pos_left h x0
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosStrictMono α
⊢ Covariant { x // 0 < x } (WithBot α) (fun x y => y * ↑x) fun x x_1 => x < x_1
[PROOFSTEP]
intro ⟨x, x0⟩ a b h
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosStrictMono α
x : WithBot α
x0 : 0 < x
a b : WithBot α
h : a < b
⊢ (fun x y => y * ↑x) { val := x, property := x0 } a < (fun x y => y * ↑x) { val := x, property := x0 } b
[PROOFSTEP]
simp only [Subtype.coe_mk]
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosStrictMono α
x : WithBot α
x0 : 0 < x
a b : WithBot α
h : a < b
⊢ a * x < b * x
[PROOFSTEP]
lift x to α using x0.ne_bot
[GOAL]
case intro
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosStrictMono α
a b : WithBot α
h : a < b
x : α
x0 : 0 < ↑x
⊢ a * ↑x < b * ↑x
[PROOFSTEP]
induction b using WithBot.recBotCoe
[GOAL]
case intro.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosStrictMono α
a : WithBot α
x : α
x0 : 0 < ↑x
h : a < ⊥
⊢ a * ↑x < ⊥ * ↑x
[PROOFSTEP]
exact absurd h not_lt_bot
[GOAL]
case intro.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosStrictMono α
a : WithBot α
x : α
x0 : 0 < ↑x
a✝ : α
h : a < ↑a✝
⊢ a * ↑x < ↑a✝ * ↑x
[PROOFSTEP]
induction a using WithBot.recBotCoe
[GOAL]
case intro.coe.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosStrictMono α
x : α
x0 : 0 < ↑x
a✝ : α
h : ⊥ < ↑a✝
⊢ ⊥ * ↑x < ↑a✝ * ↑x
[PROOFSTEP]
simp_rw [bot_mul x0.ne.symm, ← coe_mul, bot_lt_coe]
[GOAL]
case intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosStrictMono α
x : α
x0 : 0 < ↑x
a✝¹ a✝ : α
h : ↑a✝ < ↑a✝¹
⊢ ↑a✝ * ↑x < ↑a✝¹ * ↑x
[PROOFSTEP]
simp only [← coe_mul, coe_lt_coe] at *
[GOAL]
case intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosStrictMono α
x : α
x0 : 0 < ↑x
a✝¹ a✝ : α
h : a✝ < a✝¹
⊢ a✝ * x < a✝¹ * x
[PROOFSTEP]
norm_cast at x0
[GOAL]
case intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosStrictMono α
x a✝¹ a✝ : α
h : a✝ < a✝¹
x0 : 0 < x
⊢ a✝ * x < a✝¹ * x
[PROOFSTEP]
exact mul_lt_mul_of_pos_right h x0
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulReflectLT α
⊢ Contravariant { x // 0 ≤ x } (WithBot α) (fun x y => ↑x * y) fun x x_1 => x < x_1
[PROOFSTEP]
intro ⟨x, x0⟩ a b h
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulReflectLT α
x : WithBot α
x0 : 0 ≤ x
a b : WithBot α
h : (fun x y => ↑x * y) { val := x, property := x0 } a < (fun x y => ↑x * y) { val := x, property := x0 } b
⊢ a < b
[PROOFSTEP]
simp only [Subtype.coe_mk] at h
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulReflectLT α
x : WithBot α
x0 : 0 ≤ x
a b : WithBot α
h : x * a < x * b
⊢ a < b
[PROOFSTEP]
rcases eq_or_ne x 0 with rfl | x0'
[GOAL]
case inl
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulReflectLT α
a b : WithBot α
x0 : 0 ≤ 0
h : 0 * a < 0 * b
⊢ a < b
[PROOFSTEP]
simp at h
[GOAL]
case inr
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulReflectLT α
x : WithBot α
x0 : 0 ≤ x
a b : WithBot α
h : x * a < x * b
x0' : x ≠ 0
⊢ a < b
[PROOFSTEP]
lift x to α
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulReflectLT α
x : WithBot α
x0 : 0 ≤ x
a b : WithBot α
h : x * a < x * b
x0' : x ≠ 0
⊢ x ≠ ⊥
[PROOFSTEP]
rintro rfl
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulReflectLT α
a b : WithBot α
x0 : 0 ≤ ⊥
h : ⊥ * a < ⊥ * b
x0' : ⊥ ≠ 0
⊢ False
[PROOFSTEP]
exact (WithBot.bot_lt_coe (0 : α)).not_le x0
[GOAL]
case inr.intro
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulReflectLT α
a b : WithBot α
x : α
x0 : 0 ≤ ↑x
h : ↑x * a < ↑x * b
x0' : ↑x ≠ 0
⊢ a < b
[PROOFSTEP]
induction b using WithBot.recBotCoe
[GOAL]
case inr.intro.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulReflectLT α
a : WithBot α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
h : ↑x * a < ↑x * ⊥
⊢ a < ⊥
[PROOFSTEP]
rw [mul_bot x0'] at h
[GOAL]
case inr.intro.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulReflectLT α
a : WithBot α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
h : ↑x * a < ⊥
⊢ a < ⊥
[PROOFSTEP]
exact absurd h bot_le.not_lt
[GOAL]
case inr.intro.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulReflectLT α
a : WithBot α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
a✝ : α
h : ↑x * a < ↑x * ↑a✝
⊢ a < ↑a✝
[PROOFSTEP]
induction a using WithBot.recBotCoe
[GOAL]
case inr.intro.coe.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulReflectLT α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
a✝ : α
h : ↑x * ⊥ < ↑x * ↑a✝
⊢ ⊥ < ↑a✝
[PROOFSTEP]
exact WithBot.bot_lt_coe _
[GOAL]
case inr.intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulReflectLT α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
a✝¹ a✝ : α
h : ↑x * ↑a✝ < ↑x * ↑a✝¹
⊢ ↑a✝ < ↑a✝¹
[PROOFSTEP]
simp only [← coe_mul, coe_lt_coe] at *
[GOAL]
case inr.intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulReflectLT α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
a✝¹ a✝ : α
h : x * a✝ < x * a✝¹
⊢ a✝ < a✝¹
[PROOFSTEP]
norm_cast at x0
[GOAL]
case inr.intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulReflectLT α
x : α
x0' : ↑x ≠ 0
a✝¹ a✝ : α
h : x * a✝ < x * a✝¹
x0 : 0 ≤ x
⊢ a✝ < a✝¹
[PROOFSTEP]
exact lt_of_mul_lt_mul_left h x0
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosReflectLT α
⊢ Contravariant { x // 0 ≤ x } (WithBot α) (fun x y => y * ↑x) fun x x_1 => x < x_1
[PROOFSTEP]
intro ⟨x, x0⟩ a b h
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosReflectLT α
x : WithBot α
x0 : 0 ≤ x
a b : WithBot α
h : (fun x y => y * ↑x) { val := x, property := x0 } a < (fun x y => y * ↑x) { val := x, property := x0 } b
⊢ a < b
[PROOFSTEP]
simp only [Subtype.coe_mk] at h
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosReflectLT α
x : WithBot α
x0 : 0 ≤ x
a b : WithBot α
h : a * x < b * x
⊢ a < b
[PROOFSTEP]
rcases eq_or_ne x 0 with rfl | x0'
[GOAL]
case inl
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosReflectLT α
a b : WithBot α
x0 : 0 ≤ 0
h : a * 0 < b * 0
⊢ a < b
[PROOFSTEP]
simp at h
[GOAL]
case inr
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosReflectLT α
x : WithBot α
x0 : 0 ≤ x
a b : WithBot α
h : a * x < b * x
x0' : x ≠ 0
⊢ a < b
[PROOFSTEP]
lift x to α
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosReflectLT α
x : WithBot α
x0 : 0 ≤ x
a b : WithBot α
h : a * x < b * x
x0' : x ≠ 0
⊢ x ≠ ⊥
[PROOFSTEP]
rintro rfl
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosReflectLT α
a b : WithBot α
x0 : 0 ≤ ⊥
h : a * ⊥ < b * ⊥
x0' : ⊥ ≠ 0
⊢ False
[PROOFSTEP]
exact (WithBot.bot_lt_coe (0 : α)).not_le x0
[GOAL]
case inr.intro
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosReflectLT α
a b : WithBot α
x : α
x0 : 0 ≤ ↑x
h : a * ↑x < b * ↑x
x0' : ↑x ≠ 0
⊢ a < b
[PROOFSTEP]
induction b using WithBot.recBotCoe
[GOAL]
case inr.intro.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosReflectLT α
a : WithBot α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
h : a * ↑x < ⊥ * ↑x
⊢ a < ⊥
[PROOFSTEP]
rw [bot_mul x0'] at h
[GOAL]
case inr.intro.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosReflectLT α
a : WithBot α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
h : a * ↑x < ⊥
⊢ a < ⊥
[PROOFSTEP]
exact absurd h bot_le.not_lt
[GOAL]
case inr.intro.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosReflectLT α
a : WithBot α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
a✝ : α
h : a * ↑x < ↑a✝ * ↑x
⊢ a < ↑a✝
[PROOFSTEP]
induction a using WithBot.recBotCoe
[GOAL]
case inr.intro.coe.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosReflectLT α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
a✝ : α
h : ⊥ * ↑x < ↑a✝ * ↑x
⊢ ⊥ < ↑a✝
[PROOFSTEP]
exact WithBot.bot_lt_coe _
[GOAL]
case inr.intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosReflectLT α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
a✝¹ a✝ : α
h : ↑a✝ * ↑x < ↑a✝¹ * ↑x
⊢ ↑a✝ < ↑a✝¹
[PROOFSTEP]
simp only [← coe_mul, coe_lt_coe] at *
[GOAL]
case inr.intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosReflectLT α
x : α
x0 : 0 ≤ ↑x
x0' : ↑x ≠ 0
a✝¹ a✝ : α
h : a✝ * x < a✝¹ * x
⊢ a✝ < a✝¹
[PROOFSTEP]
norm_cast at x0
[GOAL]
case inr.intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosReflectLT α
x : α
x0' : ↑x ≠ 0
a✝¹ a✝ : α
h : a✝ * x < a✝¹ * x
x0 : 0 ≤ x
⊢ a✝ < a✝¹
[PROOFSTEP]
exact lt_of_mul_lt_mul_right h x0
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMonoRev α
⊢ Contravariant { x // 0 < x } (WithBot α) (fun x y => ↑x * y) fun x x_1 => x ≤ x_1
[PROOFSTEP]
intro ⟨x, x0⟩ a b h
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMonoRev α
x : WithBot α
x0 : 0 < x
a b : WithBot α
h : (fun x y => ↑x * y) { val := x, property := x0 } a ≤ (fun x y => ↑x * y) { val := x, property := x0 } b
⊢ a ≤ b
[PROOFSTEP]
simp only [Subtype.coe_mk] at h
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMonoRev α
x : WithBot α
x0 : 0 < x
a b : WithBot α
h : x * a ≤ x * b
⊢ a ≤ b
[PROOFSTEP]
lift x to α using x0.ne_bot
[GOAL]
case intro
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMonoRev α
a b : WithBot α
x : α
x0 : 0 < ↑x
h : ↑x * a ≤ ↑x * b
⊢ a ≤ b
[PROOFSTEP]
induction a using WithBot.recBotCoe
[GOAL]
case intro.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMonoRev α
b : WithBot α
x : α
x0 : 0 < ↑x
h : ↑x * ⊥ ≤ ↑x * b
⊢ ⊥ ≤ b
[PROOFSTEP]
exact bot_le
[GOAL]
case intro.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMonoRev α
b : WithBot α
x : α
x0 : 0 < ↑x
a✝ : α
h : ↑x * ↑a✝ ≤ ↑x * b
⊢ ↑a✝ ≤ b
[PROOFSTEP]
induction b using WithBot.recBotCoe
[GOAL]
case intro.coe.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMonoRev α
x : α
x0 : 0 < ↑x
a✝ : α
h : ↑x * ↑a✝ ≤ ↑x * ⊥
⊢ ↑a✝ ≤ ⊥
[PROOFSTEP]
rw [mul_bot x0.ne.symm, ← coe_mul] at h
[GOAL]
case intro.coe.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMonoRev α
x : α
x0 : 0 < ↑x
a✝ : α
h : ↑(x * a✝) ≤ ⊥
⊢ ↑a✝ ≤ ⊥
[PROOFSTEP]
exact absurd h (bot_lt_coe _).not_le
[GOAL]
case intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMonoRev α
x : α
x0 : 0 < ↑x
a✝¹ a✝ : α
h : ↑x * ↑a✝¹ ≤ ↑x * ↑a✝
⊢ ↑a✝¹ ≤ ↑a✝
[PROOFSTEP]
simp only [← coe_mul, coe_le_coe] at *
[GOAL]
case intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMonoRev α
x : α
x0 : 0 < ↑x
a✝¹ a✝ : α
h : x * a✝¹ ≤ x * a✝
⊢ a✝¹ ≤ a✝
[PROOFSTEP]
norm_cast at x0
[GOAL]
case intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMonoRev α
x a✝¹ a✝ : α
h : x * a✝¹ ≤ x * a✝
x0 : 0 < x
⊢ a✝¹ ≤ a✝
[PROOFSTEP]
exact le_of_mul_le_mul_left h x0
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMonoRev α
⊢ Contravariant { x // 0 < x } (WithBot α) (fun x y => y * ↑x) fun x x_1 => x ≤ x_1
[PROOFSTEP]
intro ⟨x, x0⟩ a b h
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMonoRev α
x : WithBot α
x0 : 0 < x
a b : WithBot α
h : (fun x y => y * ↑x) { val := x, property := x0 } a ≤ (fun x y => y * ↑x) { val := x, property := x0 } b
⊢ a ≤ b
[PROOFSTEP]
simp only [Subtype.coe_mk] at h
[GOAL]
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMonoRev α
x : WithBot α
x0 : 0 < x
a b : WithBot α
h : a * x ≤ b * x
⊢ a ≤ b
[PROOFSTEP]
lift x to α using x0.ne_bot
[GOAL]
case intro
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMonoRev α
a b : WithBot α
x : α
x0 : 0 < ↑x
h : a * ↑x ≤ b * ↑x
⊢ a ≤ b
[PROOFSTEP]
induction a using WithBot.recBotCoe
[GOAL]
case intro.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMonoRev α
b : WithBot α
x : α
x0 : 0 < ↑x
h : ⊥ * ↑x ≤ b * ↑x
⊢ ⊥ ≤ b
[PROOFSTEP]
exact bot_le
[GOAL]
case intro.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMonoRev α
b : WithBot α
x : α
x0 : 0 < ↑x
a✝ : α
h : ↑a✝ * ↑x ≤ b * ↑x
⊢ ↑a✝ ≤ b
[PROOFSTEP]
induction b using WithBot.recBotCoe
[GOAL]
case intro.coe.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMonoRev α
x : α
x0 : 0 < ↑x
a✝ : α
h : ↑a✝ * ↑x ≤ ⊥ * ↑x
⊢ ↑a✝ ≤ ⊥
[PROOFSTEP]
rw [bot_mul x0.ne.symm, ← coe_mul] at h
[GOAL]
case intro.coe.bot
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMonoRev α
x : α
x0 : 0 < ↑x
a✝ : α
h : ↑(a✝ * x) ≤ ⊥
⊢ ↑a✝ ≤ ⊥
[PROOFSTEP]
exact absurd h (bot_lt_coe _).not_le
[GOAL]
case intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMonoRev α
x : α
x0 : 0 < ↑x
a✝¹ a✝ : α
h : ↑a✝¹ * ↑x ≤ ↑a✝ * ↑x
⊢ ↑a✝¹ ≤ ↑a✝
[PROOFSTEP]
simp only [← coe_mul, coe_le_coe] at *
[GOAL]
case intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMonoRev α
x : α
x0 : 0 < ↑x
a✝¹ a✝ : α
h : a✝¹ * x ≤ a✝ * x
⊢ a✝¹ ≤ a✝
[PROOFSTEP]
norm_cast at x0
[GOAL]
case intro.coe.coe
α : Type u_1
inst✝³ : DecidableEq α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : MulPosMonoRev α
x a✝¹ a✝ : α
h : a✝¹ * x ≤ a✝ * x
x0 : 0 < x
⊢ a✝¹ ≤ a✝
[PROOFSTEP]
exact le_of_mul_le_mul_right h x0