Theorem: MonoidWithZeroHom.withTopMap_apply
File: Mathlib/Algebra/Order/Ring/WithTop.lean

Proof steps:
state_before: α : 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
x y : WithTop R
⊢ { toFun := map ⇑f, map_zero' := ⋯ }.toFun (x * y) =
    { toFun := map ⇑f, map_zero' := ⋯ }.toFun x * { toFun := map ⇑f, map_zero' := ⋯ }.toFun y
state_after: α : 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
x y : WithTop R
this : ∀ (z : WithTop R), map (⇑f) z = 0 ↔ z = 0
⊢ { toFun := map ⇑f, map_zero' := ⋯ }.toFun (x * y) =
    { toFun := map ⇑f, map_zero' := ⋯ }.toFun x * { toFun := map ⇑f, map_zero' := ⋯ }.toFun y
tactic: have : ∀ z, map f z = 0 ↔ z = 0 := fun z =>
        (Option.map_injective hf).eq_iff' f.toZeroHom.withTopMap.map_zero
state_before: α : 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
x y : WithTop R
this : ∀ (z : WithTop R), map (⇑f) z = 0 ↔ z = 0
⊢ { toFun := map ⇑f, map_zero' := ⋯ }.toFun (x * y) =
    { toFun := map ⇑f, map_zero' := ⋯ }.toFun x * { toFun := map ⇑f, map_zero' := ⋯ }.toFun y
state_after: 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
y : WithTop R
this : ∀ (z : WithTop R), map (⇑f) z = 0 ↔ z = 0
⊢ { toFun := map ⇑f, map_zero' := ⋯ }.toFun (0 * y) =
    { toFun := map ⇑f, map_zero' := ⋯ }.toFun 0 * { toFun := map ⇑f, map_zero' := ⋯ }.toFun y

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
x y : WithTop R
this : ∀ (z : WithTop R), map (⇑f) z = 0 ↔ z = 0
hx : x ≠ 0
⊢ { toFun := map ⇑f, map_zero' := ⋯ }.toFun (x * y) =
    { toFun := map ⇑f, map_zero' := ⋯ }.toFun x * { toFun := map ⇑f, map_zero' := ⋯ }.toFun y
tactic: rcases Decidable.eq_or_ne x 0 with (rfl | hx)
state_before: 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
x y : WithTop R
this : ∀ (z : WithTop R), map (⇑f) z = 0 ↔ z = 0
hx : x ≠ 0
⊢ { toFun := map ⇑f, map_zero' := ⋯ }.toFun (x * y) =
    { toFun := map ⇑f, map_zero' := ⋯ }.toFun x * { toFun := map ⇑f, map_zero' := ⋯ }.toFun y
state_after: 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
x : WithTop R
this : ∀ (z : WithTop R), map (⇑f) z = 0 ↔ z = 0
hx : x ≠ 0
⊢ { toFun := map ⇑f, map_zero' := ⋯ }.toFun (x * 0) =
    { toFun := map ⇑f, map_zero' := ⋯ }.toFun x * { toFun := map ⇑f, map_zero' := ⋯ }.toFun 0

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
x y : WithTop R
this : ∀ (z : WithTop R), map (⇑f) z = 0 ↔ z = 0
hx : x ≠ 0
hy : y ≠ 0
⊢ { toFun := map ⇑f, map_zero' := ⋯ }.toFun (x * y) =
    { toFun := map ⇑f, map_zero' := ⋯ }.toFun x * { toFun := map ⇑f, map_zero' := ⋯ }.toFun y
tactic: rcases Decidable.eq_or_ne y 0 with (rfl | hy)
state_before: 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
x y : WithTop R
this : ∀ (z : WithTop R), map (⇑f) z = 0 ↔ z = 0
hx : x ≠ 0
hy : y ≠ 0
⊢ { toFun := map ⇑f, map_zero' := ⋯ }.toFun (x * y) =
    { toFun := map ⇑f, map_zero' := ⋯ }.toFun x * { toFun := map ⇑f, map_zero' := ⋯ }.toFun y
state_after: 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
y : WithTop R
this : ∀ (z : WithTop R), map (⇑f) z = 0 ↔ z = 0
hy : y ≠ 0
hx : ⊤ ≠ 0
⊢ { toFun := map ⇑f, map_zero' := ⋯ }.toFun (⊤ * y) =
    { toFun := map ⇑f, map_zero' := ⋯ }.toFun ⊤ * { toFun := map ⇑f, map_zero' := ⋯ }.toFun y

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
y : WithTop R
this : ∀ (z : WithTop R), map (⇑f) z = 0 ↔ z = 0
hy : y ≠ 0
x : R
hx : ↑x ≠ 0
⊢ { toFun := map ⇑f, map_zero' := ⋯ }.toFun (↑x * y) =
    { toFun := map ⇑f, map_zero' := ⋯ }.toFun ↑x * { toFun := map ⇑f, map_zero' := ⋯ }.toFun y
tactic: induction' x with x
state_before: 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
y : WithTop R
this : ∀ (z : WithTop R), map (⇑f) z = 0 ↔ z = 0
hy : y ≠ 0
x : R
hx : ↑x ≠ 0
⊢ { toFun := map ⇑f, map_zero' := ⋯ }.toFun (↑x * y) =
    { toFun := map ⇑f, map_zero' := ⋯ }.toFun ↑x * { toFun := map ⇑f, map_zero' := ⋯ }.toFun y
state_after: 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
this : ∀ (z : WithTop R), map (⇑f) z = 0 ↔ z = 0
x : R
hx : ↑x ≠ 0
hy : ⊤ ≠ 0
⊢ { toFun := map ⇑f, map_zero' := ⋯ }.toFun (↑x * ⊤) =
    { toFun := map ⇑f, map_zero' := ⋯ }.toFun ↑x * { toFun := map ⇑f, map_zero' := ⋯ }.toFun ⊤

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
this : ∀ (z : WithTop R), map (⇑f) z = 0 ↔ z = 0
x : R
hx : ↑x ≠ 0
y : R
hy : ↑y ≠ 0
⊢ { toFun := map ⇑f, map_zero' := ⋯ }.toFun (↑x * ↑y) =
    { toFun := map ⇑f, map_zero' := ⋯ }.toFun ↑x * { toFun := map ⇑f, map_zero' := ⋯ }.toFun ↑y
tactic: induction' y with y