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

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

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

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

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

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

tactic: convert @embDomain_coeff ℕ R _ _ Γ _ _ _ 1 <;> simp
state_before: case pos
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
n : Γ
hn : n = 1
⊢ (embDomain { toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } (toPowerSeries.symm PowerSeries.X)).coeff 1 = 1
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 Γ
n : Γ
hn : ¬n = 1
⊢ (embDomain { toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } (toPowerSeries.symm PowerSeries.X)).coeff n = 0
state_after: case neg
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
n : Γ
hn : ¬n = 1
⊢ n ∉ ⇑{ toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } '' (toPowerSeries.symm PowerSeries.X).support

tactic: simp only [not_exists, Set.mem_image, toPowerSeries_symm_apply_coeff, mem_support,
  PowerSeries.coeff_X]
state_before: case neg
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
n : Γ
hn : ¬n = 1
⊢ n ∉ ⇑{ toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } '' (toPowerSeries.symm PowerSeries.X).support
state_after: case neg
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
n : Γ
hn : ¬n = 1
⊢ ∀ (x : ℕ), ¬((if x = 1 then 1 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 Γ
n : Γ
hn : ¬n = 1
⊢ ∀ (x : ℕ), ¬((if x = 1 then 1 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 Γ
n : Γ
hn : ¬n = 1
x✝ : ℕ
⊢ ¬((if x✝ = 1 then 1 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 Γ
n : Γ
hn : ¬n = 1
x✝ : ℕ
⊢ ¬((if x✝ = 1 then 1 else 0) ≠ 0 ∧ { toFun := Nat.cast, inj' := ⋯, map_rel_iff' := ⋯ } x✝ = n)
state_after: no goals