-- Mathlib/RingTheory/HahnSeries/PowerSeries.lean
theorem ofPowerSeries_X : ofPowerSeries Γ R PowerSeries.X = single 1 1

Proof state:
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

Result:
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

Proof state:
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 +contextual [Ne.symm hn]

Result:
no goals

Proof state:
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 [coeff_single, ofPowerSeries_apply, RingHom.coe_mk]

Result:
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

Proof state:
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

Tactic:
rw [hn]

Result:
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

Proof state:
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 (a := 1) <;> simp

Result:
no goals

Proof state:
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 [embDomain_notin_image_support]

Result:
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

Proof state:
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

Result:
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)

Proof state:
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]

Result:
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)

Proof state:
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
⊢ (ofPowerSeries Γ R) PowerSeries.X = (single 1) 1

Tactic:
ext n

Result:
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