Theorem: ValuationSubring.unitGroup_le_unitGroup
File: Mathlib/RingTheory/Valuation/ValuationSubring.lean

tactic: constructor
state_before: K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
⊢ A.unitGroup ≤ B.unitGroup ↔ A ≤ B
state_after: case mp
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
⊢ A.unitGroup ≤ B.unitGroup → A ≤ B

case mpr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
⊢ A ≤ B → A.unitGroup ≤ B.unitGroup

tactic: intro h x hx
state_before: case mp
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
⊢ A.unitGroup ≤ B.unitGroup → A ≤ B
state_after: case mp
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
hx : x ∈ A
⊢ x ∈ B

tactic: rw [← A.valuation_le_one_iff x, le_iff_lt_or_eq] at hx
state_before: case mp
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
hx : x ∈ A
⊢ x ∈ B
state_after: case mp
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
hx : A.valuation x < 1 ∨ A.valuation x = 1
⊢ x ∈ B

tactic: by_cases h_1 : x = 0
state_before: case mp
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
hx : A.valuation x < 1 ∨ A.valuation x = 1
⊢ x ∈ B
state_after: case pos
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
hx : A.valuation x < 1 ∨ A.valuation x = 1
h_1 : x = 0
⊢ x ∈ B

case neg
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
hx : A.valuation x < 1 ∨ A.valuation x = 1
h_1 : ¬x = 0
⊢ x ∈ B

tactic: by_cases h_2 : 1 + x = 0
state_before: case neg
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
hx : A.valuation x < 1 ∨ A.valuation x = 1
h_1 : ¬x = 0
⊢ x ∈ B
state_after: case pos
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
hx : A.valuation x < 1 ∨ A.valuation x = 1
h_1 : ¬x = 0
h_2 : 1 + x = 0
⊢ x ∈ B

case neg
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
hx : A.valuation x < 1 ∨ A.valuation x = 1
h_1 : ¬x = 0
h_2 : ¬1 + x = 0
⊢ x ∈ B

tactic: cases' hx with hx hx
state_before: case neg
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
hx : A.valuation x < 1 ∨ A.valuation x = 1
h_1 : ¬x = 0
h_2 : ¬1 + x = 0
⊢ x ∈ B
state_after: case neg.inl
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
h_1 : ¬x = 0
h_2 : ¬1 + x = 0
hx : A.valuation x < 1
⊢ x ∈ B

case neg.inr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
h_1 : ¬x = 0
h_2 : ¬1 + x = 0
hx : A.valuation x = 1
⊢ x ∈ B

tactic: simp only [h_1, zero_mem]
state_before: case pos
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
hx : A.valuation x < 1 ∨ A.valuation x = 1
h_1 : x = 0
⊢ x ∈ B
state_after: no goals

tactic: simp only [← add_eq_zero_iff_neg_eq.1 h_2, neg_mem _ _ (one_mem _)]
state_before: case pos
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
hx : A.valuation x < 1 ∨ A.valuation x = 1
h_1 : ¬x = 0
h_2 : 1 + x = 0
⊢ x ∈ B
state_after: no goals

tactic: have := h (show Units.mk0 _ h_2 ∈ A.unitGroup from A.valuation.map_one_add_of_lt hx)
state_before: case neg.inl
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
h_1 : ¬x = 0
h_2 : ¬1 + x = 0
hx : A.valuation x < 1
⊢ x ∈ B
state_after: case neg.inl
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
h_1 : ¬x = 0
h_2 : ¬1 + x = 0
hx : A.valuation x < 1
this : Units.mk0 (1 + x) h_2 ∈ B.unitGroup
⊢ x ∈ B

tactic: simpa using
  B.add_mem _ _ (show 1 + x ∈ B from SetLike.coe_mem (B.unitGroupMulEquiv ⟨_, this⟩ : B))
    (B.neg_mem _ B.one_mem)
state_before: case neg.inl
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
h_1 : ¬x = 0
h_2 : ¬1 + x = 0
hx : A.valuation x < 1
this : Units.mk0 (1 + x) h_2 ∈ B.unitGroup
⊢ x ∈ B
state_after: no goals

tactic: have := h (show Units.mk0 x h_1 ∈ A.unitGroup from hx)
state_before: case neg.inr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
h_1 : ¬x = 0
h_2 : ¬1 + x = 0
hx : A.valuation x = 1
⊢ x ∈ B
state_after: case neg.inr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
h_1 : ¬x = 0
h_2 : ¬1 + x = 0
hx : A.valuation x = 1
this : Units.mk0 x h_1 ∈ B.unitGroup
⊢ x ∈ B

tactic: exact SetLike.coe_mem (B.unitGroupMulEquiv ⟨_, this⟩ : B)
state_before: case neg.inr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A.unitGroup ≤ B.unitGroup
x : K
h_1 : ¬x = 0
h_2 : ¬1 + x = 0
hx : A.valuation x = 1
this : Units.mk0 x h_1 ∈ B.unitGroup
⊢ x ∈ B
state_after: no goals

tactic: rintro h x (hx : A.valuation x = 1)
state_before: case mpr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
⊢ A ≤ B → A.unitGroup ≤ B.unitGroup
state_after: case mpr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A ≤ B
x : Kˣ
hx : A.valuation ↑x = 1
⊢ x ∈ B.unitGroup

tactic: apply_fun A.mapOfLE B h at hx
state_before: case mpr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A ≤ B
x : Kˣ
hx : A.valuation ↑x = 1
⊢ x ∈ B.unitGroup
state_after: case mpr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A ≤ B
x : Kˣ
hx : (A.mapOfLE B h) (A.valuation ↑x) = (A.mapOfLE B h) 1
⊢ x ∈ B.unitGroup

tactic: simpa using hx
state_before: case mpr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A ≤ B
x : Kˣ
hx : (A.mapOfLE B h) (A.valuation ↑x) = (A.mapOfLE B h) 1
⊢ x ∈ B.unitGroup
state_after: no goals