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

tactic: constructor
state_before: Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
⊢ IsUnit x ↔ IsUnit (x.coeff x.order)
state_after: case mp
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
⊢ IsUnit x → IsUnit (x.coeff x.order)

case mpr
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
⊢ IsUnit (x.coeff x.order) → IsUnit x

tactic: rintro ⟨⟨u, i, ui, iu⟩, rfl⟩
state_before: case mp
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
⊢ IsUnit x → IsUnit (x.coeff x.order)
state_after: case mp.intro.mk
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
u i : HahnSeries Γ R
ui : u * i = 1
iu : i * u = 1
⊢ IsUnit
    ((↑{ val := u, inv := i, val_inv := ui, inv_val := iu }).coeff
      (↑{ val := u, inv := i, val_inv := ui, inv_val := iu }).order)

tactic: refine
  isUnit_of_mul_eq_one (u.coeff u.order) (i.coeff i.order)
    ((mul_coeff_order_add_order u i).symm.trans ?_)
state_before: case mp.intro.mk
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
u i : HahnSeries Γ R
ui : u * i = 1
iu : i * u = 1
⊢ IsUnit
    ((↑{ val := u, inv := i, val_inv := ui, inv_val := iu }).coeff
      (↑{ val := u, inv := i, val_inv := ui, inv_val := iu }).order)
state_after: case mp.intro.mk
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
u i : HahnSeries Γ R
ui : u * i = 1
iu : i * u = 1
⊢ (u * i).coeff (u.order + i.order) = 1

tactic: rw [ui, one_coeff, if_pos]
state_before: case mp.intro.mk
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
u i : HahnSeries Γ R
ui : u * i = 1
iu : i * u = 1
⊢ (u * i).coeff (u.order + i.order) = 1
state_after: case mp.intro.mk.hc
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
u i : HahnSeries Γ R
ui : u * i = 1
iu : i * u = 1
⊢ u.order + i.order = 0

tactic: rw [← order_mul (left_ne_zero_of_mul_eq_one ui) (right_ne_zero_of_mul_eq_one ui), ui, order_one]
state_before: case mp.intro.mk.hc
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
u i : HahnSeries Γ R
ui : u * i = 1
iu : i * u = 1
⊢ u.order + i.order = 0
state_after: no goals

tactic: rintro ⟨⟨u, i, ui, iu⟩, h⟩
state_before: case mpr
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
⊢ IsUnit (x.coeff x.order) → IsUnit x
state_after: case mpr.intro.mk
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
u i : R
ui : u * i = 1
iu : i * u = 1
h : ↑{ val := u, inv := i, val_inv := ui, inv_val := iu } = x.coeff x.order
⊢ IsUnit x

tactic: rw [Units.val_mk] at h
state_before: case mpr.intro.mk
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
u i : R
ui : u * i = 1
iu : i * u = 1
h : ↑{ val := u, inv := i, val_inv := ui, inv_val := iu } = x.coeff x.order
⊢ IsUnit x
state_after: case mpr.intro.mk
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
u i : R
ui : u * i = 1
iu : i * u = 1
h : u = x.coeff x.order
⊢ IsUnit x

tactic: rw [h] at iu
state_before: case mpr.intro.mk
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
u i : R
ui : u * i = 1
iu : i * u = 1
h : u = x.coeff x.order
⊢ IsUnit x
state_after: case mpr.intro.mk
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
u i : R
ui : u * i = 1
iu : i * x.coeff x.order = 1
h : u = x.coeff x.order
⊢ IsUnit x

tactic: have h := SummableFamily.one_sub_self_mul_hsum_powers (unit_aux x iu)
state_before: case mpr.intro.mk
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
u i : R
ui : u * i = 1
iu : i * x.coeff x.order = 1
h : u = x.coeff x.order
⊢ IsUnit x
state_after: case mpr.intro.mk
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
u i : R
ui : u * i = 1
iu : i * x.coeff x.order = 1
h✝ : u = x.coeff x.order
h :
  (1 - (1 - C i * (single (-x.order)) 1 * x)) * (SummableFamily.powers (1 - C i * (single (-x.order)) 1 * x) ⋯).hsum = 1
⊢ IsUnit x

tactic: rw [sub_sub_cancel] at h
state_before: case mpr.intro.mk
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
u i : R
ui : u * i = 1
iu : i * x.coeff x.order = 1
h✝ : u = x.coeff x.order
h :
  (1 - (1 - C i * (single (-x.order)) 1 * x)) * (SummableFamily.powers (1 - C i * (single (-x.order)) 1 * x) ⋯).hsum = 1
⊢ IsUnit x
state_after: case mpr.intro.mk
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
u i : R
ui : u * i = 1
iu : i * x.coeff x.order = 1
h✝ : u = x.coeff x.order
h : C i * (single (-x.order)) 1 * x * (SummableFamily.powers (1 - C i * (single (-x.order)) 1 * x) ⋯).hsum = 1
⊢ IsUnit x

tactic: exact isUnit_of_mul_isUnit_right (isUnit_of_mul_eq_one _ _ h)
state_before: case mpr.intro.mk
Γ : Type u_1
R : Type u_2
inst✝² : LinearOrderedAddCommGroup Γ
inst✝¹ : CommRing R
inst✝ : IsDomain R
x : HahnSeries Γ R
u i : R
ui : u * i = 1
iu : i * x.coeff x.order = 1
h✝ : u = x.coeff x.order
h : C i * (single (-x.order)) 1 * x * (SummableFamily.powers (1 - C i * (single (-x.order)) 1 * x) ⋯).hsum = 1
⊢ IsUnit x
state_after: no goals