Theorem: HahnSeries.ofPowerSeries_C
File: Mathlib/RingTheory/HahnSeries/PowerSeries.lean

tactic: ext n
state_before: Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
⊢ (ofPowerSeries Γ R) ((PowerSeries.C R) r) = C r
state_after: case coeff.h
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
⊢ ((ofPowerSeries Γ R) ((PowerSeries.C R) r)).coeff n = (C r).coeff n

tactic: simp only [ofPowerSeries_apply, C, RingHom.coe_mk, MonoidHom.coe_mk, OneHom.coe_mk, ne_eq,
  single_coeff]
state_before: case coeff.h
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
⊢ ((ofPowerSeries Γ R) ((PowerSeries.C R) r)).coeff n = (C r).coeff n
state_after: case coeff.h
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
⊢ (embDomain { toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } (toPowerSeries.symm ((PowerSeries.C R) r))).coeff n =
    if n = 0 then r else 0

tactic: split_ifs with hn
state_before: case coeff.h
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
⊢ (embDomain { toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } (toPowerSeries.symm ((PowerSeries.C R) r))).coeff n =
    if n = 0 then r else 0
state_after: case pos
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
hn : n = 0
⊢ (embDomain { toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } (toPowerSeries.symm ((PowerSeries.C R) r))).coeff n = r

case neg
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
hn : ¬n = 0
⊢ (embDomain { toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } (toPowerSeries.symm ((PowerSeries.C R) r))).coeff n = 0

tactic: subst hn
state_before: case pos
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
hn : n = 0
⊢ (embDomain { toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } (toPowerSeries.symm ((PowerSeries.C R) r))).coeff n = r
state_after: case pos
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
⊢ (embDomain { toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } (toPowerSeries.symm ((PowerSeries.C R) r))).coeff 0 = r

tactic: convert @embDomain_coeff ℕ R _ _ Γ _ _ _ 0 <;> simp
state_before: case pos
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
⊢ (embDomain { toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } (toPowerSeries.symm ((PowerSeries.C R) r))).coeff 0 = r
state_after: no goals

tactic: rw [embDomain_notin_image_support]
state_before: case neg
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
hn : ¬n = 0
⊢ (embDomain { toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } (toPowerSeries.symm ((PowerSeries.C R) r))).coeff n = 0
state_after: case neg
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
hn : ¬n = 0
⊢ n ∉ ⇑{ toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } '' (toPowerSeries.symm ((PowerSeries.C R) r)).support

tactic: simp only [not_exists, Set.mem_image, toPowerSeries_symm_apply_coeff, mem_support,
  PowerSeries.coeff_C]
state_before: case neg
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
hn : ¬n = 0
⊢ n ∉ ⇑{ toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } '' (toPowerSeries.symm ((PowerSeries.C R) r)).support
state_after: case neg
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
hn : ¬n = 0
⊢ ∀ (x : ℕ), ¬((if x = 0 then r else 0) ≠ 0 ∧ { toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } x = n)

tactic: intro
state_before: case neg
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
hn : ¬n = 0
⊢ ∀ (x : ℕ), ¬((if x = 0 then r else 0) ≠ 0 ∧ { toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } x = n)
state_after: case neg
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
hn : ¬n = 0
x✝ : ℕ
⊢ ¬((if x✝ = 0 then r else 0) ≠ 0 ∧ { toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } x✝ = n)

tactic: simp (config := { contextual := true }) [Ne.symm hn]
state_before: case neg
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
hn : ¬n = 0
x✝ : ℕ
⊢ ¬((if x✝ = 0 then r else 0) ≠ 0 ∧ { toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } x✝ = n)
state_after: no goals