Theorem: HahnSeries.unit_aux
File: Mathlib/RingTheory/HahnSeries/Summable.lean

tactic: have h10 : (1 : R) ≠ 0 := one_ne_zero
state_before: Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
⊢ 0 < (addVal Γ R) (1 - C r * (single (-x.order)) 1 * x)
state_after: Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
⊢ 0 < (addVal Γ R) (1 - C r * (single (-x.order)) 1 * x)

tactic: have x0 : x ≠ 0 := ne_zero_of_coeff_ne_zero (right_ne_zero_of_mul_eq_one hr)
state_before: Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
⊢ 0 < (addVal Γ R) (1 - C r * (single (-x.order)) 1 * x)
state_after: Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
⊢ 0 < (addVal Γ R) (1 - C r * (single (-x.order)) 1 * x)

tactic: refine lt_of_le_of_ne ((addVal Γ R).map_le_sub (ge_of_eq (addVal Γ R).map_one) ?_) ?_
state_before: Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
⊢ 0 < (addVal Γ R) (1 - C r * (single (-x.order)) 1 * x)
state_after: case refine_1
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
⊢ 0 ≤ (addVal Γ R) (C r * (single (-x.order)) 1 * x)

case refine_2
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
⊢ 0 ≠ (addVal Γ R) (1 - C r * (single (-x.order)) 1 * x)

tactic: simp only [AddValuation.map_mul]
state_before: case refine_1
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
⊢ 0 ≤ (addVal Γ R) (C r * (single (-x.order)) 1 * x)
state_after: case refine_1
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
⊢ 0 ≤ (addVal Γ R) (C r) + (addVal Γ R) ((single (-x.order)) 1) + (addVal Γ R) x

tactic: rw [addVal_apply_of_ne x0, addVal_apply_of_ne (single_ne_zero h10), addVal_apply_of_ne _,
  order_C, order_single h10, WithTop.coe_zero, zero_add, ← WithTop.coe_add, neg_add_self,
  WithTop.coe_zero]
state_before: case refine_1
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
⊢ 0 ≤ (addVal Γ R) (C r) + (addVal Γ R) ((single (-x.order)) 1) + (addVal Γ R) x
state_after: Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
⊢ C r ≠ 0

tactic: exact C_ne_zero (left_ne_zero_of_mul_eq_one hr)
state_before: Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
⊢ C r ≠ 0
state_after: no goals

tactic: rw [addVal_apply, ← WithTop.coe_zero]
state_before: case refine_2
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
⊢ 0 ≠ (addVal Γ R) (1 - C r * (single (-x.order)) 1 * x)
state_after: case refine_2
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
⊢ ↑0 ≠ if 1 - C r * (single (-x.order)) 1 * x = 0 then ⊤ else ↑(1 - C r * (single (-x.order)) 1 * x).order

tactic: split_ifs with h
state_before: case refine_2
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
⊢ ↑0 ≠ if 1 - C r * (single (-x.order)) 1 * x = 0 then ⊤ else ↑(1 - C r * (single (-x.order)) 1 * x).order
state_after: case pos
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
h : 1 - C r * (single (-x.order)) 1 * x = 0
⊢ ↑0 ≠ ⊤

case neg
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
h : ¬1 - C r * (single (-x.order)) 1 * x = 0
⊢ ↑0 ≠ ↑(1 - C r * (single (-x.order)) 1 * x).order

tactic: rw [Ne, WithTop.coe_eq_coe]
state_before: case neg
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
h : ¬1 - C r * (single (-x.order)) 1 * x = 0
⊢ ↑0 ≠ ↑(1 - C r * (single (-x.order)) 1 * x).order
state_after: case neg
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
h : ¬1 - C r * (single (-x.order)) 1 * x = 0
⊢ ¬0 = (1 - C r * (single (-x.order)) 1 * x).order

tactic: intro con
state_before: case neg
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
h : ¬1 - C r * (single (-x.order)) 1 * x = 0
⊢ ¬0 = (1 - C r * (single (-x.order)) 1 * x).order
state_after: case neg
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
h : ¬1 - C r * (single (-x.order)) 1 * x = 0
con : 0 = (1 - C r * (single (-x.order)) 1 * x).order
⊢ False

tactic: apply coeff_order_ne_zero h
state_before: case neg
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
h : ¬1 - C r * (single (-x.order)) 1 * x = 0
con : 0 = (1 - C r * (single (-x.order)) 1 * x).order
⊢ False
state_after: case neg
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
h : ¬1 - C r * (single (-x.order)) 1 * x = 0
con : 0 = (1 - C r * (single (-x.order)) 1 * x).order
⊢ (1 - C r * (single (-x.order)) 1 * x).coeff (1 - C r * (single (-x.order)) 1 * x).order = 0

tactic: rw [← con, mul_assoc, sub_coeff, one_coeff, if_pos rfl, C_mul_eq_smul, smul_coeff, smul_eq_mul,
  ← add_neg_self x.order, single_mul_coeff_add, one_mul, hr, sub_self]
state_before: case neg
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
h : ¬1 - C r * (single (-x.order)) 1 * x = 0
con : 0 = (1 - C r * (single (-x.order)) 1 * x).order
⊢ (1 - C r * (single (-x.order)) 1 * x).coeff (1 - C r * (single (-x.order)) 1 * x).order = 0
state_after: no goals

tactic: apply WithTop.coe_ne_top
state_before: case pos
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
r : R
hr : r * x.coeff x.order = 1
h10 : 1 ≠ 0
x0 : x ≠ 0
h : 1 - C r * (single (-x.order)) 1 * x = 0
⊢ ↑0 ≠ ⊤
state_after: no goals