case coeff.h
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
⊢ coeff (↑(ofPowerSeries Γ R) (↑(PowerSeries.C R) r)) n = coeff (↑C r) n
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
⊢ ↑(ofPowerSeries Γ R) (↑(PowerSeries.C R) r) = ↑C r
ext n
case coeff.h
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
⊢ coeff
      (embDomain
        { toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },
          map_rel_iff' :=
            (_ :
              ∀ {a b : ℕ},
                ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤
                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔
                  a ≤ b) }
        (↑(RingEquiv.symm toPowerSeries) (↑(PowerSeries.C R) r)))
      n =
    if n = 0 then r else 0
case coeff.h
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
⊢ coeff (↑(ofPowerSeries Γ R) (↑(PowerSeries.C R) r)) n = coeff (↑C r) n
simp only [ofPowerSeries_apply, C, RingHom.coe_mk, MonoidHom.coe_mk, OneHom.coe_mk, ne_eq,
  single_coeff]
case coeff.h.inl
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
hn : n = 0
⊢ coeff
      (embDomain
        { toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },
          map_rel_iff' :=
            (_ :
              ∀ {a b : ℕ},
                ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤
                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔
                  a ≤ b) }
        (↑(RingEquiv.symm toPowerSeries) (↑(PowerSeries.C R) r)))
      n =
    r

case coeff.h.inr
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
hn : ¬n = 0
⊢ coeff
      (embDomain
        { toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },
          map_rel_iff' :=
            (_ :
              ∀ {a b : ℕ},
                ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤
                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔
                  a ≤ b) }
        (↑(RingEquiv.symm toPowerSeries) (↑(PowerSeries.C R) r)))
      n =
    0
case coeff.h
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
⊢ coeff
      (embDomain
        { toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },
          map_rel_iff' :=
            (_ :
              ∀ {a b : ℕ},
                ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤
                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔
                  a ≤ b) }
        (↑(RingEquiv.symm toPowerSeries) (↑(PowerSeries.C R) r)))
      n =
    if n = 0 then r else 0
split_ifs with hn
case coeff.h.inl
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
⊢ coeff
      (embDomain
        { toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },
          map_rel_iff' :=
            (_ :
              ∀ {a b : ℕ},
                ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤
                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔
                  a ≤ b) }
        (↑(RingEquiv.symm toPowerSeries) (↑(PowerSeries.C R) r)))
      0 =
    r
case coeff.h.inl
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
hn : n = 0
⊢ coeff
      (embDomain
        { toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },
          map_rel_iff' :=
            (_ :
              ∀ {a b : ℕ},
                ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤
                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔
                  a ≤ b) }
        (↑(RingEquiv.symm toPowerSeries) (↑(PowerSeries.C R) r)))
      n =
    r
subst hn
no goals
case coeff.h.inl
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
⊢ coeff
      (embDomain
        { toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },
          map_rel_iff' :=
            (_ :
              ∀ {a b : ℕ},
                ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤
                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔
                  a ≤ b) }
        (↑(RingEquiv.symm toPowerSeries) (↑(PowerSeries.C R) r)))
      0 =
    r
convert @embDomain_coeff ℕ R _ _ Γ _ _ _ 0 <;> simp
case coeff.h.inr
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
hn : ¬n = 0
⊢ ¬n ∈
      ↑{ toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },
            map_rel_iff' :=
              (_ :
                ∀ {a b : ℕ},
                  ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤
                      ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔
                    a ≤ b) } ''
        support (↑(RingEquiv.symm toPowerSeries) (↑(PowerSeries.C R) r))
case coeff.h.inr
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
hn : ¬n = 0
⊢ coeff
      (embDomain
        { toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },
          map_rel_iff' :=
            (_ :
              ∀ {a b : ℕ},
                ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤
                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔
                  a ≤ b) }
        (↑(RingEquiv.symm toPowerSeries) (↑(PowerSeries.C R) r)))
      n =
    0
rw [embDomain_notin_image_support]
case coeff.h.inr
Γ : 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 ∧
        ↑{ toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },
                map_rel_iff' :=
                  (_ :
                    ∀ {a b : ℕ},
                      ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤
                          ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔
                        a ≤ b) }
            x =
          n)
case coeff.h.inr
Γ : Type u_1
R : Type u_2
inst✝¹ : Semiring R
inst✝ : StrictOrderedSemiring Γ
r : R
n : Γ
hn : ¬n = 0
⊢ ¬n ∈
      ↑{ toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },
            map_rel_iff' :=
              (_ :
                ∀ {a b : ℕ},
                  ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤
                      ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔
                    a ≤ b) } ''
        support (↑(RingEquiv.symm toPowerSeries) (↑(PowerSeries.C R) r))
simp only [not_exists, Set.mem_image, toPowerSeries_symm_apply_coeff, mem_support,
  PowerSeries.coeff_C]
case coeff.h.inr
Γ : 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 ∧
      ↑{ toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },
              map_rel_iff' :=
                (_ :
                  ∀ {a b : ℕ},
                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤
                        ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔
                      a ≤ b) }
          x✝ =
        n)
case coeff.h.inr
Γ : 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 ∧
        ↑{ toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },
                map_rel_iff' :=
                  (_ :
                    ∀ {a b : ℕ},
                      ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤
                          ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔
                        a ≤ b) }
            x =
          n)
intro
no goals
case coeff.h.inr
Γ : 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 ∧
      ↑{ toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },
              map_rel_iff' :=
                (_ :
                  ∀ {a b : ℕ},
                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤
                        ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔
                      a ≤ b) }
          x✝ =
        n)
simp (config := { contextual := true }) [Ne.symm hn]