Theorem: PowerSeries.divided_by_X_pow_orderMul
File: Mathlib/RingTheory/PowerSeries/Order.lean

Proof steps:
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R⟦X⟧
hf : f ≠ 0
hg : g ≠ 0
⊢ divided_by_X_pow_order hf * divided_by_X_pow_order hg = divided_by_X_pow_order ⋯
state_after: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R⟦X⟧
hf : f ≠ 0
hg : g ≠ 0
df : ℕ := f.order.get ⋯
⊢ divided_by_X_pow_order hf * divided_by_X_pow_order hg = divided_by_X_pow_order ⋯
tactic: set df := f.order.get (order_finite_iff_ne_zero.mpr hf)
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R⟦X⟧
hf : f ≠ 0
hg : g ≠ 0
df : ℕ := f.order.get ⋯
⊢ divided_by_X_pow_order hf * divided_by_X_pow_order hg = divided_by_X_pow_order ⋯
state_after: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R⟦X⟧
hf : f ≠ 0
hg : g ≠ 0
df : ℕ := f.order.get ⋯
dg : ℕ := g.order.get ⋯
⊢ divided_by_X_pow_order hf * divided_by_X_pow_order hg = divided_by_X_pow_order ⋯
tactic: set dg := g.order.get (order_finite_iff_ne_zero.mpr hg)
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R⟦X⟧
hf : f ≠ 0
hg : g ≠ 0
df : ℕ := f.order.get ⋯
dg : ℕ := g.order.get ⋯
⊢ divided_by_X_pow_order hf * divided_by_X_pow_order hg = divided_by_X_pow_order ⋯
state_after: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R⟦X⟧
hf : f ≠ 0
hg : g ≠ 0
df : ℕ := f.order.get ⋯
dg : ℕ := g.order.get ⋯
dfg : ℕ := (f * g).order.get ⋯
hdfg : dfg = (f * g).order.get ⋯
⊢ divided_by_X_pow_order hf * divided_by_X_pow_order hg = divided_by_X_pow_order ⋯
tactic: set dfg := (f * g).order.get (order_finite_iff_ne_zero.mpr (mul_ne_zero hf hg)) with hdfg
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R⟦X⟧
hf : f ≠ 0
hg : g ≠ 0
df : ℕ := f.order.get ⋯
dg : ℕ := g.order.get ⋯
dfg : ℕ := (f * g).order.get ⋯
hdfg : dfg = (f * g).order.get ⋯
⊢ divided_by_X_pow_order hf * divided_by_X_pow_order hg = divided_by_X_pow_order ⋯
state_after: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R⟦X⟧
hf : f ≠ 0
hg : g ≠ 0
df : ℕ := f.order.get ⋯
dg : ℕ := g.order.get ⋯
dfg : ℕ := (f * g).order.get ⋯
hdfg : dfg = (f * g).order.get ⋯
H_add_d : df + dg = dfg
⊢ divided_by_X_pow_order hf * divided_by_X_pow_order hg = divided_by_X_pow_order ⋯
tactic: have H_add_d : df + dg = dfg := by simp_all only [PartENat.get_add, order_mul f g]
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R⟦X⟧
hf : f ≠ 0
hg : g ≠ 0
df : ℕ := f.order.get ⋯
dg : ℕ := g.order.get ⋯
dfg : ℕ := (f * g).order.get ⋯
hdfg : dfg = (f * g).order.get ⋯
H_add_d : df + dg = dfg
⊢ divided_by_X_pow_order hf * divided_by_X_pow_order hg = divided_by_X_pow_order ⋯
state_after: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R⟦X⟧
hf : f ≠ 0
hg : g ≠ 0
df : ℕ := f.order.get ⋯
dg : ℕ := g.order.get ⋯
dfg : ℕ := (f * g).order.get ⋯
hdfg : dfg = (f * g).order.get ⋯
H_add_d : df + dg = dfg
H : X ^ (f * g).order.get ⋯ * divided_by_X_pow_order ⋯ = f * g
⊢ divided_by_X_pow_order hf * divided_by_X_pow_order hg = divided_by_X_pow_order ⋯
tactic: have H := self_eq_X_pow_order_mul_divided_by_X_pow_order (mul_ne_zero hf hg)
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R⟦X⟧
hf : f ≠ 0
hg : g ≠ 0
df : ℕ := f.order.get ⋯
dg : ℕ := g.order.get ⋯
dfg : ℕ := (f * g).order.get ⋯
hdfg : dfg = (f * g).order.get ⋯
H_add_d : df + dg = dfg
H : X ^ (f * g).order.get ⋯ * divided_by_X_pow_order ⋯ = f * g
⊢ divided_by_X_pow_order hf * divided_by_X_pow_order hg = divided_by_X_pow_order ⋯
state_after: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R⟦X⟧
hf : f ≠ 0
hg : g ≠ 0
df : ℕ := f.order.get ⋯
dg : ℕ := g.order.get ⋯
dfg : ℕ := (f * g).order.get ⋯
hdfg : dfg = (f * g).order.get ⋯
H_add_d : df + dg = dfg
H : X ^ (f * g).order.get ⋯ * divided_by_X_pow_order ⋯ = f * g
this : f * g = X ^ dfg * (divided_by_X_pow_order hf * divided_by_X_pow_order hg)
⊢ divided_by_X_pow_order hf * divided_by_X_pow_order hg = divided_by_X_pow_order ⋯
tactic: have : f * g = X ^ dfg * (divided_by_X_pow_order hf * divided_by_X_pow_order hg) := by
    calc
      f * g = X ^ df * divided_by_X_pow_order hf * (X ^ dg * divided_by_X_pow_order hg) := by
        rw [self_eq_X_pow_order_mul_divided_by_X_pow_order,
          self_eq_X_pow_order_mul_divided_by_X_pow_order]
      _ = X ^ df * X ^ dg * divided_by_X_pow_order hf * divided_by_X_pow_order hg := by ring
      _ = X ^ (df + dg) * divided_by_X_pow_order hf * divided_by_X_pow_order hg := by rw [pow_add]
      _ = X ^ dfg * divided_by_X_pow_order hf * divided_by_X_pow_order hg := by rw [H_add_d]
      _ = X ^ dfg * (divided_by_X_pow_order hf * divided_by_X_pow_order hg) := by rw [mul_assoc]
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R⟦X⟧
hf : f ≠ 0
hg : g ≠ 0
df : ℕ := f.order.get ⋯
dg : ℕ := g.order.get ⋯
dfg : ℕ := (f * g).order.get ⋯
hdfg : dfg = (f * g).order.get ⋯
H_add_d : df + dg = dfg
H : X ^ (f * g).order.get ⋯ * divided_by_X_pow_order ⋯ = f * g
this : f * g = X ^ dfg * (divided_by_X_pow_order hf * divided_by_X_pow_order hg)
⊢ divided_by_X_pow_order hf * divided_by_X_pow_order hg = divided_by_X_pow_order ⋯
state_after: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R⟦X⟧
hf : f ≠ 0
hg : g ≠ 0
df : ℕ := f.order.get ⋯
dg : ℕ := g.order.get ⋯
dfg : ℕ := (f * g).order.get ⋯
hdfg : dfg = (f * g).order.get ⋯
H_add_d : df + dg = dfg
this : f * g = X ^ dfg * (divided_by_X_pow_order hf * divided_by_X_pow_order hg)
H :
  X ^ (X ^ dfg * (divided_by_X_pow_order hf * divided_by_X_pow_order hg)).order.get ⋯ * divided_by_X_pow_order ⋯ =
    X ^ dfg * (divided_by_X_pow_order hf * divided_by_X_pow_order hg)
⊢ divided_by_X_pow_order hf * divided_by_X_pow_order hg = divided_by_X_pow_order ⋯
tactic: simp [← hdfg, this] at H
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R⟦X⟧
hf : f ≠ 0
hg : g ≠ 0
df : ℕ := f.order.get ⋯
dg : ℕ := g.order.get ⋯
dfg : ℕ := (f * g).order.get ⋯
hdfg : dfg = (f * g).order.get ⋯
H_add_d : df + dg = dfg
this : f * g = X ^ dfg * (divided_by_X_pow_order hf * divided_by_X_pow_order hg)
H :
  X ^ (X ^ dfg * (divided_by_X_pow_order hf * divided_by_X_pow_order hg)).order.get ⋯ * divided_by_X_pow_order ⋯ =
    X ^ dfg * (divided_by_X_pow_order hf * divided_by_X_pow_order hg)
⊢ divided_by_X_pow_order hf * divided_by_X_pow_order hg = divided_by_X_pow_order ⋯
state_after: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R⟦X⟧
hf : f ≠ 0
hg : g ≠ 0
df : ℕ := f.order.get ⋯
dg : ℕ := g.order.get ⋯
dfg : ℕ := (f * g).order.get ⋯
hdfg : dfg = (f * g).order.get ⋯
H_add_d : df + dg = dfg
this : f * g = X ^ dfg * (divided_by_X_pow_order hf * divided_by_X_pow_order hg)
H :
  X ^ (X ^ dfg * (divided_by_X_pow_order hf * divided_by_X_pow_order hg)).order.get ⋯ * divided_by_X_pow_order ⋯ =
    X ^ dfg * (divided_by_X_pow_order hf * divided_by_X_pow_order hg)
⊢ X ^ dfg * divided_by_X_pow_order ⋯ = X ^ dfg * (divided_by_X_pow_order hf * divided_by_X_pow_order hg)
tactic: refine (IsLeftCancelMulZero.mul_left_cancel_of_ne_zero (pow_ne_zero dfg X_ne_zero) ?_).symm
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R⟦X⟧
hf : f ≠ 0
hg : g ≠ 0
df : ℕ := f.order.get ⋯
dg : ℕ := g.order.get ⋯
dfg : ℕ := (f * g).order.get ⋯
hdfg : dfg = (f * g).order.get ⋯
H_add_d : df + dg = dfg
this : f * g = X ^ dfg * (divided_by_X_pow_order hf * divided_by_X_pow_order hg)
H :
  X ^ (X ^ dfg * (divided_by_X_pow_order hf * divided_by_X_pow_order hg)).order.get ⋯ * divided_by_X_pow_order ⋯ =
    X ^ dfg * (divided_by_X_pow_order hf * divided_by_X_pow_order hg)
⊢ X ^ dfg * divided_by_X_pow_order ⋯ = X ^ dfg * (divided_by_X_pow_order hf * divided_by_X_pow_order hg)
state_after: no goals
tactic: convert H