Theorem: PowerSeries.order_add_of_order_eq.aux
File: Mathlib/RingTheory/PowerSeries/Order.lean

tactic: suffices order (φ + ψ) = order φ by
  rw [le_inf_iff, this]
  exact ⟨le_rfl, le_of_lt H⟩
state_before: R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
H : φ.order < ψ.order
⊢ (φ + ψ).order ≤ φ.order ⊓ ψ.order
state_after: R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
H : φ.order < ψ.order
⊢ (φ + ψ).order = φ.order

tactic: rw [order_eq]
state_before: R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
H : φ.order < ψ.order
⊢ (φ + ψ).order = φ.order
state_after: R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
H : φ.order < ψ.order
⊢ (∀ (i : ℕ), ↑i = φ.order → (coeff R i) (φ + ψ) ≠ 0) ∧ ∀ (i : ℕ), ↑i < φ.order → (coeff R i) (φ + ψ) = 0

tactic: constructor
state_before: R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
H : φ.order < ψ.order
⊢ (∀ (i : ℕ), ↑i = φ.order → (coeff R i) (φ + ψ) ≠ 0) ∧ ∀ (i : ℕ), ↑i < φ.order → (coeff R i) (φ + ψ) = 0
state_after: case left
R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
H : φ.order < ψ.order
⊢ ∀ (i : ℕ), ↑i = φ.order → (coeff R i) (φ + ψ) ≠ 0

case right
R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
H : φ.order < ψ.order
⊢ ∀ (i : ℕ), ↑i < φ.order → (coeff R i) (φ + ψ) = 0

tactic: rw [le_inf_iff, this]
state_before: R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
H : φ.order < ψ.order
this : (φ + ψ).order = φ.order
⊢ (φ + ψ).order ≤ φ.order ⊓ ψ.order
state_after: R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
H : φ.order < ψ.order
this : (φ + ψ).order = φ.order
⊢ φ.order ≤ φ.order ∧ φ.order ≤ ψ.order

tactic: exact ⟨le_rfl, le_of_lt H⟩
state_before: R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
H : φ.order < ψ.order
this : (φ + ψ).order = φ.order
⊢ φ.order ≤ φ.order ∧ φ.order ≤ ψ.order
state_after: no goals

tactic: intro i hi
state_before: case left
R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
H : φ.order < ψ.order
⊢ ∀ (i : ℕ), ↑i = φ.order → (coeff R i) (φ + ψ) ≠ 0
state_after: case left
R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
H : φ.order < ψ.order
i : ℕ
hi : ↑i = φ.order
⊢ (coeff R i) (φ + ψ) ≠ 0

tactic: rw [← hi] at H
state_before: case left
R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
H : φ.order < ψ.order
i : ℕ
hi : ↑i = φ.order
⊢ (coeff R i) (φ + ψ) ≠ 0
state_after: case left
R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
i : ℕ
H : ↑i < ψ.order
hi : ↑i = φ.order
⊢ (coeff R i) (φ + ψ) ≠ 0

tactic: rw [(coeff _ _).map_add, coeff_of_lt_order i H, add_zero]
state_before: case left
R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
i : ℕ
H : ↑i < ψ.order
hi : ↑i = φ.order
⊢ (coeff R i) (φ + ψ) ≠ 0
state_after: case left
R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
i : ℕ
H : ↑i < ψ.order
hi : ↑i = φ.order
⊢ (coeff R i) φ ≠ 0

tactic: exact (order_eq_nat.1 hi.symm).1
state_before: case left
R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
i : ℕ
H : ↑i < ψ.order
hi : ↑i = φ.order
⊢ (coeff R i) φ ≠ 0
state_after: no goals

tactic: intro i hi
state_before: case right
R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
H : φ.order < ψ.order
⊢ ∀ (i : ℕ), ↑i < φ.order → (coeff R i) (φ + ψ) = 0
state_after: case right
R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
H : φ.order < ψ.order
i : ℕ
hi : ↑i < φ.order
⊢ (coeff R i) (φ + ψ) = 0

tactic: rw [(coeff _ _).map_add, coeff_of_lt_order i hi, coeff_of_lt_order i (lt_trans hi H),
  zero_add]
state_before: case right
R : Type u_1
inst✝ : Semiring R
φ✝ φ ψ : R⟦X⟧
_h : φ.order ≠ ψ.order
H : φ.order < ψ.order
i : ℕ
hi : ↑i < φ.order
⊢ (coeff R i) (φ + ψ) = 0
state_after: no goals