l3lab/ntp-mathlib huggingface dataset:
theorem isEquiv_tfae [LinearOrderedCommGroupWithZero Γ₀] [LinearOrderedCommGroupWithZero Γ'₀]
    (v : Valuation K Γ₀) (v' : Valuation K Γ'₀) :
    [v.IsEquiv v', ∀ {x}, v x ≤ 1 ↔ v' x ≤ 1, ∀ {x}, v x = 1 ↔ v' x = 1, ∀ {x}, v x < 1 ↔ v' x < 1,
        ∀ {x}, v (x - 1) < 1 ↔ v' (x - 1) < 1].TFAE := by
  tfae_have 1 ↔ 2; · apply isEquiv_iff_val_le_one
  tfae_have 1 ↔ 3; · apply isEquiv_iff_val_eq_one
  

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝³ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝² : LinearOrderedCommMonoidWithZero Γ''₀
inst✝¹ : LinearOrderedCommGroupWithZero Γ₀
inst✝ : LinearOrderedCommGroupWithZero Γ'₀
v : Valuation K Γ₀
v' : Valuation K Γ'₀
tfae_1_iff_2 : IsEquiv v v' ↔ ∀ {x : K}, v x ≤ 1 ↔ v' x ≤ 1
tfae_1_iff_3 : IsEquiv v v' ↔ ∀ {x : K}, v x = 1 ↔ v' x = 1
⊢ List.TFAE
    [IsEquiv v v', ∀ {x : K}, v x ≤ 1 ↔ v' x ≤ 1, ∀ {x : K}, v x = 1 ↔ v' x = 1, ∀ {x : K}, v x < 1 ↔ v' x < 1,
      ∀ {x : K}, v (x - 1) < 1 ↔ v' (x - 1) < 1]

Next tactic:
tfae_have 1 ↔ 4
theorem isEquiv_tfae [LinearOrderedCommGroupWithZero Γ₀] [LinearOrderedCommGroupWithZero Γ'₀]
    (v : Valuation K Γ₀) (v' : Valuation K Γ'₀) :
    [v.IsEquiv v', ∀ {x}, v x ≤ 1 ↔ v' x ≤ 1, ∀ {x}, v x = 1 ↔ v' x = 1, ∀ {x}, v x < 1 ↔ v' x < 1,
        ∀ {x}, v (x - 1) < 1 ↔ v' (x - 1) < 1].TFAE := by
  tfae_have 1 ↔ 2; · apply isEquiv_iff_val_le_one
  tfae_have 1 ↔ 3; · apply isEquiv_iff_val_eq_one
  tfae_have 1 ↔ 4; · 

Proof state:
case tfae_1_iff_4
K : Type u_1
F : Type u_2
R : Type u_3
inst✝³ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝² : LinearOrderedCommMonoidWithZero Γ''₀
inst✝¹ : LinearOrderedCommGroupWithZero Γ₀
inst✝ : LinearOrderedCommGroupWithZero Γ'₀
v : Valuation K Γ₀
v' : Valuation K Γ'₀
tfae_1_iff_2 : IsEquiv v v' ↔ ∀ {x : K}, v x ≤ 1 ↔ v' x ≤ 1
tfae_1_iff_3 : IsEquiv v v' ↔ ∀ {x : K}, v x = 1 ↔ v' x = 1
⊢ IsEquiv v v' ↔ ∀ {x : K}, v x < 1 ↔ v' x < 1

Next tactic:
apply isEquiv_iff_val_lt_one
theorem isEquiv_tfae [LinearOrderedCommGroupWithZero Γ₀] [LinearOrderedCommGroupWithZero Γ'₀]
    (v : Valuation K Γ₀) (v' : Valuation K Γ'₀) :
    [v.IsEquiv v', ∀ {x}, v x ≤ 1 ↔ v' x ≤ 1, ∀ {x}, v x = 1 ↔ v' x = 1, ∀ {x}, v x < 1 ↔ v' x < 1,
        ∀ {x}, v (x - 1) < 1 ↔ v' (x - 1) < 1].TFAE := by
  tfae_have 1 ↔ 2; · apply isEquiv_iff_val_le_one
  tfae_have 1 ↔ 3; · apply isEquiv_iff_val_eq_one
  tfae_have 1 ↔ 4; · apply isEquiv_iff_val_lt_one
  

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝³ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝² : LinearOrderedCommMonoidWithZero Γ''₀
inst✝¹ : LinearOrderedCommGroupWithZero Γ₀
inst✝ : LinearOrderedCommGroupWithZero Γ'₀
v : Valuation K Γ₀
v' : Valuation K Γ'₀
tfae_1_iff_2 : IsEquiv v v' ↔ ∀ {x : K}, v x ≤ 1 ↔ v' x ≤ 1
tfae_1_iff_3 : IsEquiv v v' ↔ ∀ {x : K}, v x = 1 ↔ v' x = 1
tfae_1_iff_4 : IsEquiv v v' ↔ ∀ {x : K}, v x < 1 ↔ v' x < 1
⊢ List.TFAE
    [IsEquiv v v', ∀ {x : K}, v x ≤ 1 ↔ v' x ≤ 1, ∀ {x : K}, v x = 1 ↔ v' x = 1, ∀ {x : K}, v x < 1 ↔ v' x < 1,
      ∀ {x : K}, v (x - 1) < 1 ↔ v' (x - 1) < 1]

Next tactic:
tfae_have 1 ↔ 5
theorem isEquiv_tfae [LinearOrderedCommGroupWithZero Γ₀] [LinearOrderedCommGroupWithZero Γ'₀]
    (v : Valuation K Γ₀) (v' : Valuation K Γ'₀) :
    [v.IsEquiv v', ∀ {x}, v x ≤ 1 ↔ v' x ≤ 1, ∀ {x}, v x = 1 ↔ v' x = 1, ∀ {x}, v x < 1 ↔ v' x < 1,
        ∀ {x}, v (x - 1) < 1 ↔ v' (x - 1) < 1].TFAE := by
  tfae_have 1 ↔ 2; · apply isEquiv_iff_val_le_one
  tfae_have 1 ↔ 3; · apply isEquiv_iff_val_eq_one
  tfae_have 1 ↔ 4; · apply isEquiv_iff_val_lt_one
  tfae_have 1 ↔ 5; · 

Proof state:
case tfae_1_iff_5
K : Type u_1
F : Type u_2
R : Type u_3
inst✝³ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝² : LinearOrderedCommMonoidWithZero Γ''₀
inst✝¹ : LinearOrderedCommGroupWithZero Γ₀
inst✝ : LinearOrderedCommGroupWithZero Γ'₀
v : Valuation K Γ₀
v' : Valuation K Γ'₀
tfae_1_iff_2 : IsEquiv v v' ↔ ∀ {x : K}, v x ≤ 1 ↔ v' x ≤ 1
tfae_1_iff_3 : IsEquiv v v' ↔ ∀ {x : K}, v x = 1 ↔ v' x = 1
tfae_1_iff_4 : IsEquiv v v' ↔ ∀ {x : K}, v x < 1 ↔ v' x < 1
⊢ IsEquiv v v' ↔ ∀ {x : K}, v (x - 1) < 1 ↔ v' (x - 1) < 1

Next tactic:
apply isEquiv_iff_val_sub_one_lt_one
theorem isEquiv_tfae [LinearOrderedCommGroupWithZero Γ₀] [LinearOrderedCommGroupWithZero Γ'₀]
    (v : Valuation K Γ₀) (v' : Valuation K Γ'₀) :
    [v.IsEquiv v', ∀ {x}, v x ≤ 1 ↔ v' x ≤ 1, ∀ {x}, v x = 1 ↔ v' x = 1, ∀ {x}, v x < 1 ↔ v' x < 1,
        ∀ {x}, v (x - 1) < 1 ↔ v' (x - 1) < 1].TFAE := by
  tfae_have 1 ↔ 2; · apply isEquiv_iff_val_le_one
  tfae_have 1 ↔ 3; · apply isEquiv_iff_val_eq_one
  tfae_have 1 ↔ 4; · apply isEquiv_iff_val_lt_one
  tfae_have 1 ↔ 5; · apply isEquiv_iff_val_sub_one_lt_one
  

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝³ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝² : LinearOrderedCommMonoidWithZero Γ''₀
inst✝¹ : LinearOrderedCommGroupWithZero Γ₀
inst✝ : LinearOrderedCommGroupWithZero Γ'₀
v : Valuation K Γ₀
v' : Valuation K Γ'₀
tfae_1_iff_2 : IsEquiv v v' ↔ ∀ {x : K}, v x ≤ 1 ↔ v' x ≤ 1
tfae_1_iff_3 : IsEquiv v v' ↔ ∀ {x : K}, v x = 1 ↔ v' x = 1
tfae_1_iff_4 : IsEquiv v v' ↔ ∀ {x : K}, v x < 1 ↔ v' x < 1
tfae_1_iff_5 : IsEquiv v v' ↔ ∀ {x : K}, v (x - 1) < 1 ↔ v' (x - 1) < 1
⊢ List.TFAE
    [IsEquiv v v', ∀ {x : K}, v x ≤ 1 ↔ v' x ≤ 1, ∀ {x : K}, v x = 1 ↔ v' x = 1, ∀ {x : K}, v x < 1 ↔ v' x < 1,
      ∀ {x : K}, v (x - 1) < 1 ↔ v' (x - 1) < 1]

Next tactic:
tfae_finish
/-- The support of a valuation is a prime ideal. -/
instance [Nontrivial Γ₀] [NoZeroDivisors Γ₀] : Ideal.IsPrime (supp v) :=
  ⟨fun h =>
    one_ne_zero (α := Γ₀) <|
      calc
        1 = v 1 := v.map_one.symm
        _ = 0 := by 

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝⁶ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝⁵ : LinearOrderedCommMonoidWithZero Γ''₀
inst✝⁴ : CommRing R
inst✝³ : LinearOrderedCommMonoidWithZero Γ₀
inst✝² : LinearOrderedCommMonoidWithZero Γ'₀
v : Valuation R Γ₀
inst✝¹ : Nontrivial Γ₀
inst✝ : NoZeroDivisors Γ₀
h : supp v = ⊤
⊢ v 1 = 0

Next tactic:
rw [← mem_supp_iff, h]
/-- The support of a valuation is a prime ideal. -/
instance [Nontrivial Γ₀] [NoZeroDivisors Γ₀] : Ideal.IsPrime (supp v) :=
  ⟨fun h =>
    one_ne_zero (α := Γ₀) <|
      calc
        1 = v 1 := v.map_one.symm
        _ = 0 := by rw [← mem_supp_iff, h]; 

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝⁶ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝⁵ : LinearOrderedCommMonoidWithZero Γ''₀
inst✝⁴ : CommRing R
inst✝³ : LinearOrderedCommMonoidWithZero Γ₀
inst✝² : LinearOrderedCommMonoidWithZero Γ'₀
v : Valuation R Γ₀
inst✝¹ : Nontrivial Γ₀
inst✝ : NoZeroDivisors Γ₀
h : supp v = ⊤
⊢ 1 ∈ ⊤

Next tactic:
exact Submodule.mem_top
/-- The support of a valuation is a prime ideal. -/
instance [Nontrivial Γ₀] [NoZeroDivisors Γ₀] : Ideal.IsPrime (supp v) :=
  ⟨fun h =>
    one_ne_zero (α := Γ₀) <|
      calc
        1 = v 1 := v.map_one.symm
        _ = 0 := by rw [← mem_supp_iff, h]; exact Submodule.mem_top,
   fun {x y} hxy => by
    

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝⁶ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝⁵ : LinearOrderedCommMonoidWithZero Γ''₀
inst✝⁴ : CommRing R
inst✝³ : LinearOrderedCommMonoidWithZero Γ₀
inst✝² : LinearOrderedCommMonoidWithZero Γ'₀
v : Valuation R Γ₀
inst✝¹ : Nontrivial Γ₀
inst✝ : NoZeroDivisors Γ₀
x y : R
hxy : x * y ∈ supp v
⊢ x ∈ supp v ∨ y ∈ supp v

Next tactic:
simp only [mem_supp_iff] at hxy ⊢
/-- The support of a valuation is a prime ideal. -/
instance [Nontrivial Γ₀] [NoZeroDivisors Γ₀] : Ideal.IsPrime (supp v) :=
  ⟨fun h =>
    one_ne_zero (α := Γ₀) <|
      calc
        1 = v 1 := v.map_one.symm
        _ = 0 := by rw [← mem_supp_iff, h]; exact Submodule.mem_top,
   fun {x y} hxy => by
    simp only [mem_supp_iff] at hxy ⊢
    

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝⁶ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝⁵ : LinearOrderedCommMonoidWithZero Γ''₀
inst✝⁴ : CommRing R
inst✝³ : LinearOrderedCommMonoidWithZero Γ₀
inst✝² : LinearOrderedCommMonoidWithZero Γ'₀
v : Valuation R Γ₀
inst✝¹ : Nontrivial Γ₀
inst✝ : NoZeroDivisors Γ₀
x y : R
hxy : v (x * y) = 0
⊢ v x = 0 ∨ v y = 0

Next tactic:
rw [v.map_mul x y] at hxy
/-- The support of a valuation is a prime ideal. -/
instance [Nontrivial Γ₀] [NoZeroDivisors Γ₀] : Ideal.IsPrime (supp v) :=
  ⟨fun h =>
    one_ne_zero (α := Γ₀) <|
      calc
        1 = v 1 := v.map_one.symm
        _ = 0 := by rw [← mem_supp_iff, h]; exact Submodule.mem_top,
   fun {x y} hxy => by
    simp only [mem_supp_iff] at hxy ⊢
    rw [v.map_mul x y] at hxy
    

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝⁶ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝⁵ : LinearOrderedCommMonoidWithZero Γ''₀
inst✝⁴ : CommRing R
inst✝³ : LinearOrderedCommMonoidWithZero Γ₀
inst✝² : LinearOrderedCommMonoidWithZero Γ'₀
v : Valuation R Γ₀
inst✝¹ : Nontrivial Γ₀
inst✝ : NoZeroDivisors Γ₀
x y : R
hxy : v x * v y = 0
⊢ v x = 0 ∨ v y = 0

Next tactic:
exact eq_zero_or_eq_zero_of_mul_eq_zero hxy
theorem map_add_supp (a : R) {s : R} (h : s ∈ supp v) : v (a + s) = v a := by
  

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝⁴ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝³ : LinearOrderedCommMonoidWithZero Γ''₀
inst✝² : CommRing R
inst✝¹ : LinearOrderedCommMonoidWithZero Γ₀
inst✝ : LinearOrderedCommMonoidWithZero Γ'₀
v : Valuation R Γ₀
a s : R
h : s ∈ supp v
⊢ v (a + s) = v a

Next tactic:
have aux : ∀ a s, v s = 0 → v (a + s) ≤ v a := by
    intro a' s' h'
    refine' le_trans (v.map_add a' s') (max_le le_rfl _)
    simp [h']
theorem map_add_supp (a : R) {s : R} (h : s ∈ supp v) : v (a + s) = v a := by
  have aux : ∀ a s, v s = 0 → v (a + s) ≤ v a := by
    

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝⁴ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝³ : LinearOrderedCommMonoidWithZero Γ''₀
inst✝² : CommRing R
inst✝¹ : LinearOrderedCommMonoidWithZero Γ₀
inst✝ : LinearOrderedCommMonoidWithZero Γ'₀
v : Valuation R Γ₀
a s : R
h : s ∈ supp v
⊢ ∀ (a s : R), v s = 0 → v (a + s) ≤ v a

Next tactic:
intro a' s' h'
theorem map_add_supp (a : R) {s : R} (h : s ∈ supp v) : v (a + s) = v a := by
  have aux : ∀ a s, v s = 0 → v (a + s) ≤ v a := by
    intro a' s' h'
    

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝⁴ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝³ : LinearOrderedCommMonoidWithZero Γ''₀
inst✝² : CommRing R
inst✝¹ : LinearOrderedCommMonoidWithZero Γ₀
inst✝ : LinearOrderedCommMonoidWithZero Γ'₀
v : Valuation R Γ₀
a s : R
h : s ∈ supp v
a' s' : R
h' : v s' = 0
⊢ v (a' + s') ≤ v a'

Next tactic:
refine' le_trans (v.map_add a' s') (max_le le_rfl _)
theorem map_add_supp (a : R) {s : R} (h : s ∈ supp v) : v (a + s) = v a := by
  have aux : ∀ a s, v s = 0 → v (a + s) ≤ v a := by
    intro a' s' h'
    refine' le_trans (v.map_add a' s') (max_le le_rfl _)
    

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝⁴ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝³ : LinearOrderedCommMonoidWithZero Γ''₀
inst✝² : CommRing R
inst✝¹ : LinearOrderedCommMonoidWithZero Γ₀
inst✝ : LinearOrderedCommMonoidWithZero Γ'₀
v : Valuation R Γ₀
a s : R
h : s ∈ supp v
a' s' : R
h' : v s' = 0
⊢ v s' ≤ v a'

Next tactic:
simp [h']
theorem map_add_supp (a : R) {s : R} (h : s ∈ supp v) : v (a + s) = v a := by
  have aux : ∀ a s, v s = 0 → v (a + s) ≤ v a := by
    intro a' s' h'
    refine' le_trans (v.map_add a' s') (max_le le_rfl _)
    simp [h']
  

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝⁴ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝³ : LinearOrderedCommMonoidWithZero Γ''₀
inst✝² : CommRing R
inst✝¹ : LinearOrderedCommMonoidWithZero Γ₀
inst✝ : LinearOrderedCommMonoidWithZero Γ'₀
v : Valuation R Γ₀
a s : R
h : s ∈ supp v
aux : ∀ (a s : R), v s = 0 → v (a + s) ≤ v a
⊢ v (a + s) = v a

Next tactic:
apply le_antisymm (aux a s h)
theorem map_add_supp (a : R) {s : R} (h : s ∈ supp v) : v (a + s) = v a := by
  have aux : ∀ a s, v s = 0 → v (a + s) ≤ v a := by
    intro a' s' h'
    refine' le_trans (v.map_add a' s') (max_le le_rfl _)
    simp [h']
  apply le_antisymm (aux a s h)
  

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝⁴ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝³ : LinearOrderedCommMonoidWithZero Γ''₀
inst✝² : CommRing R
inst✝¹ : LinearOrderedCommMonoidWithZero Γ₀
inst✝ : LinearOrderedCommMonoidWithZero Γ'₀
v : Valuation R Γ₀
a s : R
h : s ∈ supp v
aux : ∀ (a s : R), v s = 0 → v (a + s) ≤ v a
⊢ v a ≤ v (a + s)

Next tactic:
calc
    v a = v (a + s + -s) := by simp
    _ ≤ v (a + s) := aux (a + s) (-s) (by rwa [← Ideal.neg_mem_iff] at h)
theorem map_add_supp (a : R) {s : R} (h : s ∈ supp v) : v (a + s) = v a := by
  have aux : ∀ a s, v s = 0 → v (a + s) ≤ v a := by
    intro a' s' h'
    refine' le_trans (v.map_add a' s') (max_le le_rfl _)
    simp [h']
  apply le_antisymm (aux a s h)
  calc
    v a = v (a + s + -s) := by 

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝⁴ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝³ : LinearOrderedCommMonoidWithZero Γ''₀
inst✝² : CommRing R
inst✝¹ : LinearOrderedCommMonoidWithZero Γ₀
inst✝ : LinearOrderedCommMonoidWithZero Γ'₀
v : Valuation R Γ₀
a s : R
h : s ∈ supp v
aux : ∀ (a s : R), v s = 0 → v (a + s) ≤ v a
⊢ v a = v (a + s + -s)

Next tactic:
simp
theorem map_add_supp (a : R) {s : R} (h : s ∈ supp v) : v (a + s) = v a := by
  have aux : ∀ a s, v s = 0 → v (a + s) ≤ v a := by
    intro a' s' h'
    refine' le_trans (v.map_add a' s') (max_le le_rfl _)
    simp [h']
  apply le_antisymm (aux a s h)
  calc
    v a = v (a + s + -s) := by simp
    _ ≤ v (a + s) := aux (a + s) (-s) (by 

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝⁴ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝³ : LinearOrderedCommMonoidWithZero Γ''₀
inst✝² : CommRing R
inst✝¹ : LinearOrderedCommMonoidWithZero Γ₀
inst✝ : LinearOrderedCommMonoidWithZero Γ'₀
v : Valuation R Γ₀
a s : R
h : s ∈ supp v
aux : ∀ (a s : R), v s = 0 → v (a + s) ≤ v a
⊢ v (-s) = 0

Next tactic:
rwa [← Ideal.neg_mem_iff] at h
theorem comap_supp {S : Type*} [CommRing S] (f : S →+* R) :
    supp (v.comap f) = Ideal.comap f v.supp :=
  Ideal.ext fun x => by 

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝⁵ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝⁴ : LinearOrderedCommMonoidWithZero Γ''₀
inst✝³ : CommRing R
inst✝² : LinearOrderedCommMonoidWithZero Γ₀
inst✝¹ : LinearOrderedCommMonoidWithZero Γ'₀
v : Valuation R Γ₀
S : Type u_7
inst✝ : CommRing S
f : S →+* R
x : S
⊢ x ∈ supp (comap f v) ↔ x ∈ Ideal.comap f (supp v)

Next tactic:
rw [mem_supp_iff, Ideal.mem_comap, mem_supp_iff, comap_apply]
/-- A valuation is coerced to the underlying function `R → Γ₀`. -/
instance (R) (Γ₀) [Ring R] [LinearOrderedAddCommMonoidWithTop Γ₀] :
    FunLike (AddValuation R Γ₀) R fun _ => Γ₀ where
  coe v := v.toMonoidWithZeroHom.toFun
  coe_injective' f g := by 

Proof state:
K : Type u_1
F : Type u_2
R✝ : Type u_3
inst✝² : DivisionRing K
Γ₀✝ : Type u_4
Γ'₀ : Type u_5
R : Type ?u.4364742
Γ₀ : Type ?u.4364745
inst✝¹ : Ring R
inst✝ : LinearOrderedAddCommMonoidWithTop Γ₀
f g : AddValuation R Γ₀
⊢ (fun v => v.toFun) f = (fun v => v.toFun) g → f = g

Next tactic:
cases f
/-- A valuation is coerced to the underlying function `R → Γ₀`. -/
instance (R) (Γ₀) [Ring R] [LinearOrderedAddCommMonoidWithTop Γ₀] :
    FunLike (AddValuation R Γ₀) R fun _ => Γ₀ where
  coe v := v.toMonoidWithZeroHom.toFun
  coe_injective' f g := by cases f; 

Proof state:
case mk
K : Type u_1
F : Type u_2
R✝ : Type u_3
inst✝² : DivisionRing K
Γ₀✝ : Type u_4
Γ'₀ : Type u_5
R : Type ?u.4364742
Γ₀ : Type ?u.4364745
inst✝¹ : Ring R
inst✝ : LinearOrderedAddCommMonoidWithTop Γ₀
g : AddValuation R Γ₀
toMonoidWithZeroHom✝ : R →*₀ Multiplicative Γ₀ᵒᵈ
map_add_le_max'✝ :
  ∀ (x y : R),
    ZeroHom.toFun (↑toMonoidWithZeroHom✝) (x + y) ≤
      max (ZeroHom.toFun (↑toMonoidWithZeroHom✝) x) (ZeroHom.toFun (↑toMonoidWithZeroHom✝) y)
⊢ (fun v => v.toFun) { toMonoidWithZeroHom := toMonoidWithZeroHom✝, map_add_le_max' := map_add_le_max'✝ } =
      (fun v => v.toFun) g →
    { toMonoidWithZeroHom := toMonoidWithZeroHom✝, map_add_le_max' := map_add_le_max'✝ } = g

Next tactic:
cases g
/-- A valuation is coerced to the underlying function `R → Γ₀`. -/
instance (R) (Γ₀) [Ring R] [LinearOrderedAddCommMonoidWithTop Γ₀] :
    FunLike (AddValuation R Γ₀) R fun _ => Γ₀ where
  coe v := v.toMonoidWithZeroHom.toFun
  coe_injective' f g := by cases f; cases g; 

Proof state:
case mk.mk
K : Type u_1
F : Type u_2
R✝ : Type u_3
inst✝² : DivisionRing K
Γ₀✝ : Type u_4
Γ'₀ : Type u_5
R : Type ?u.4364742
Γ₀ : Type ?u.4364745
inst✝¹ : Ring R
inst✝ : LinearOrderedAddCommMonoidWithTop Γ₀
toMonoidWithZeroHom✝¹ : R →*₀ Multiplicative Γ₀ᵒᵈ
map_add_le_max'✝¹ :
  ∀ (x y : R),
    ZeroHom.toFun (↑toMonoidWithZeroHom✝¹) (x + y) ≤
      max (ZeroHom.toFun (↑toMonoidWithZeroHom✝¹) x) (ZeroHom.toFun (↑toMonoidWithZeroHom✝¹) y)
toMonoidWithZeroHom✝ : R →*₀ Multiplicative Γ₀ᵒᵈ
map_add_le_max'✝ :
  ∀ (x y : R),
    ZeroHom.toFun (↑toMonoidWithZeroHom✝) (x + y) ≤
      max (ZeroHom.toFun (↑toMonoidWithZeroHom✝) x) (ZeroHom.toFun (↑toMonoidWithZeroHom✝) y)
⊢ (fun v => v.toFun) { toMonoidWithZeroHom := toMonoidWithZeroHom✝¹, map_add_le_max' := map_add_le_max'✝¹ } =
      (fun v => v.toFun) { toMonoidWithZeroHom := toMonoidWithZeroHom✝, map_add_le_max' := map_add_le_max'✝ } →
    { toMonoidWithZeroHom := toMonoidWithZeroHom✝¹, map_add_le_max' := map_add_le_max'✝¹ } =
      { toMonoidWithZeroHom := toMonoidWithZeroHom✝, map_add_le_max' := map_add_le_max'✝ }

Next tactic:
simp (config := {contextual := true})
@[simp]
theorem map_add' : ∀ (x y : R), v x ≤ v (x + y) ∨ v y ≤ v (x + y) := by
  

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝³ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
inst✝² : Ring R
inst✝¹ : LinearOrderedAddCommMonoidWithTop Γ₀
inst✝ : LinearOrderedAddCommMonoidWithTop Γ'₀
v : AddValuation R Γ₀
x y z : R
⊢ ∀ (x y : R), v x ≤ v (x + y) ∨ v y ≤ v (x + y)

Next tactic:
intro x y
@[simp]
theorem map_add' : ∀ (x y : R), v x ≤ v (x + y) ∨ v y ≤ v (x + y) := by
  intro x y
  

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝³ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
inst✝² : Ring R
inst✝¹ : LinearOrderedAddCommMonoidWithTop Γ₀
inst✝ : LinearOrderedAddCommMonoidWithTop Γ'₀
v : AddValuation R Γ₀
x✝ y✝ z x y : R
⊢ v x ≤ v (x + y) ∨ v y ≤ v (x + y)

Next tactic:
rw [← @min_le_iff _ _ (v x) (v y) (v (x+y)), ← ge_iff_le]
@[simp]
theorem map_add' : ∀ (x y : R), v x ≤ v (x + y) ∨ v y ≤ v (x + y) := by
  intro x y
  rw [← @min_le_iff _ _ (v x) (v y) (v (x+y)), ← ge_iff_le]
  

Proof state:
K : Type u_1
F : Type u_2
R : Type u_3
inst✝³ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
inst✝² : Ring R
inst✝¹ : LinearOrderedAddCommMonoidWithTop Γ₀
inst✝ : LinearOrderedAddCommMonoidWithTop Γ'₀
v : AddValuation R Γ₀
x✝ y✝ z x y : R
⊢ v (x + y) ≥ min (v x) (v y)

Next tactic:
apply map_add
theorem wellPowered_of_equiv (e : C ≌ D) [WellPowered C] : WellPowered D :=
  wellPowered_of_essentiallySmall_monoOver fun X =>
    (essentiallySmall_congr (MonoOver.congr X e.symm)).2 <| by 

Proof state:
C : Type u₁
inst✝² : Category.{v, u₁} C
D : Type u₂
inst✝¹ : Category.{v, u₂} D
e : C ≌ D
inst✝ : WellPowered C
X : D
⊢ EssentiallySmall.{v, v, max u₁ v} (MonoOver (e.symm.functor.obj X))

Next tactic:
infer_instance
instance commSemiring : CommSemiring ℕ where
  add := Nat.add
  add_assoc := Nat.add_assoc
  zero := Nat.zero
  zero_add := Nat.zero_add
  add_zero := Nat.add_zero
  add_comm := Nat.add_comm
  mul := Nat.mul
  mul_assoc := Nat.mul_assoc
  one := Nat.succ Nat.zero
  one_mul := Nat.one_mul
  mul_one := Nat.mul_one
  left_distrib := Nat.left_distrib
  right_distrib := Nat.right_distrib
  zero_mul := Nat.zero_mul
  mul_zero := Nat.mul_zero
  mul_comm := Nat.mul_comm
  natCast n := n
  natCast_zero := rfl
  natCast_succ n := rfl
  nsmul m n := m * n
  nsmul_zero := Nat.zero_mul
  nsmul_succ _ _ := by 

Proof state:
x✝¹ x✝ : ℕ
⊢ (fun m n => m * n) (x✝¹ + 1) x✝ = x✝ + (fun m n => m * n) x✝¹ x✝

Next tactic:
dsimp only
instance commSemiring : CommSemiring ℕ where
  add := Nat.add
  add_assoc := Nat.add_assoc
  zero := Nat.zero
  zero_add := Nat.zero_add
  add_zero := Nat.add_zero
  add_comm := Nat.add_comm
  mul := Nat.mul
  mul_assoc := Nat.mul_assoc
  one := Nat.succ Nat.zero
  one_mul := Nat.one_mul
  mul_one := Nat.mul_one
  left_distrib := Nat.left_distrib
  right_distrib := Nat.right_distrib
  zero_mul := Nat.zero_mul
  mul_zero := Nat.mul_zero
  mul_comm := Nat.mul_comm
  natCast n := n
  natCast_zero := rfl
  natCast_succ n := rfl
  nsmul m n := m * n
  nsmul_zero := Nat.zero_mul
  nsmul_succ _ _ := by dsimp only; 

Proof state:
x✝¹ x✝ : ℕ
⊢ (x✝¹ + 1) * x✝ = x✝ + x✝¹ * x✝

Next tactic:
rw [Nat.add_comm, Nat.right_distrib, Nat.one_mul]
theorem or_exists_succ {p : ℕ → Prop} : (p 0 ∨ ∃ n, p (n + 1)) ↔ ∃ n, p n :=
  ⟨fun h => h.elim (fun h0 => ⟨0, h0⟩) fun ⟨n, hn⟩ => ⟨n + 1, hn⟩, by
    

Proof state:
m n k : ℕ
p : ℕ → Prop
⊢ (∃ n, p n) → p 0 ∨ ∃ n, p (n + 1)

Next tactic:
rintro ⟨_ | n, hn⟩
theorem or_exists_succ {p : ℕ → Prop} : (p 0 ∨ ∃ n, p (n + 1)) ↔ ∃ n, p n :=
  ⟨fun h => h.elim (fun h0 => ⟨0, h0⟩) fun ⟨n, hn⟩ => ⟨n + 1, hn⟩, by
    rintro ⟨_ | n, hn⟩
    

Proof state:
case intro.zero
m n k : ℕ
p : ℕ → Prop
hn : p zero
⊢ p 0 ∨ ∃ n, p (n + 1)
case intro.succ m n✝ k : ℕ p : ℕ → Prop n : ℕ hn : p (succ n) ⊢ p 0 ∨ ∃ n, p (n + 1)

Next tactic:
exacts [Or.inl hn, Or.inr ⟨n, hn⟩]
theorem lt_iff_add_one_le {m n : ℕ} : m < n ↔ m + 1 ≤ n := by 

Proof state:
m✝ n✝ k m n : ℕ
⊢ m < n ↔ m + 1 ≤ n

Next tactic:
rw [succ_le_iff]
theorem lt_one_add_iff {a b : ℕ} : a < 1 + b ↔ a ≤ b := by 

Proof state:
m n k a b : ℕ
⊢ a < 1 + b ↔ a ≤ b

Next tactic:
simp only [add_comm, lt_succ_iff]
theorem one_add_le_iff {a b : ℕ} : 1 + a ≤ b ↔ a < b := by 

Proof state:
m n k a b : ℕ
⊢ 1 + a ≤ b ↔ a < b

Next tactic:
simp only [add_comm, add_one_le_iff]
theorem div_le_iff_le_mul_add_pred {m n k : ℕ} (n0 : 0 < n) : m / n ≤ k ↔ m ≤ n * k + (n - 1) := by
  

Proof state:
m✝ n✝ k✝ m n k : ℕ
n0 : 0 < n
⊢ m / n ≤ k ↔ m ≤ n * k + (n - 1)

Next tactic:
rw [← lt_succ_iff, div_lt_iff_lt_mul n0, succ_mul, mul_comm]
theorem div_le_iff_le_mul_add_pred {m n k : ℕ} (n0 : 0 < n) : m / n ≤ k ↔ m ≤ n * k + (n - 1) := by
  rw [← lt_succ_iff, div_lt_iff_lt_mul n0, succ_mul, mul_comm]
  

Proof state:
m✝ n✝ k✝ m n k : ℕ
n0 : 0 < n
⊢ m < n * k + n ↔ m ≤ n * k + (n - 1)

Next tactic:
cases n
theorem div_le_iff_le_mul_add_pred {m n k : ℕ} (n0 : 0 < n) : m / n ≤ k ↔ m ≤ n * k + (n - 1) := by
  rw [← lt_succ_iff, div_lt_iff_lt_mul n0, succ_mul, mul_comm]
  cases n
  · 

Proof state:
case zero
m✝ n k✝ m k : ℕ
n0 : 0 < zero
⊢ m < zero * k + zero ↔ m ≤ zero * k + (zero - 1)

Next tactic:
cases n0
theorem div_le_iff_le_mul_add_pred {m n k : ℕ} (n0 : 0 < n) : m / n ≤ k ↔ m ≤ n * k + (n - 1) := by
  rw [← lt_succ_iff, div_lt_iff_lt_mul n0, succ_mul, mul_comm]
  cases n
  · cases n0

  

Proof state:
case succ
m✝ n k✝ m k n✝ : ℕ
n0 : 0 < succ n✝
⊢ m < succ n✝ * k + succ n✝ ↔ m ≤ succ n✝ * k + (succ n✝ - 1)

Next tactic:
exact lt_succ_iff
theorem two_lt_of_ne : ∀ {n}, n ≠ 0 → n ≠ 1 → n ≠ 2 → 2 < n
  | 0, h, _, _ => (h rfl).elim
  | 1, _, h, _ => (h rfl).elim
  | 2, _, _, h => (h rfl).elim
  -- Porting note: was `by decide`
  | n + 3, _, _, _ => by 

Proof state:
m n✝ k n : ℕ
x✝² : n + 3 ≠ 0
x✝¹ : n + 3 ≠ 1
x✝ : n + 3 ≠ 2
⊢ 2 < n + 3

Next tactic:
rw [Nat.lt_iff_add_one_le]
theorem two_lt_of_ne : ∀ {n}, n ≠ 0 → n ≠ 1 → n ≠ 2 → 2 < n
  | 0, h, _, _ => (h rfl).elim
  | 1, _, h, _ => (h rfl).elim
  | 2, _, _, h => (h rfl).elim
  -- Porting note: was `by decide`
  | n + 3, _, _, _ => by rw [Nat.lt_iff_add_one_le]; 

Proof state:
m n✝ k n : ℕ
x✝² : n + 3 ≠ 0
x✝¹ : n + 3 ≠ 1
x✝ : n + 3 ≠ 2
⊢ 2 + 1 ≤ n + 3

Next tactic:
convert Nat.le_add_left 3 n
theorem forall_lt_succ {P : ℕ → Prop} {n : ℕ} : (∀ m < n + 1, P m) ↔ (∀ m < n, P m) ∧ P n := by
  

Proof state:
m n✝ k : ℕ
P : ℕ → Prop
n : ℕ
⊢ (∀ (m : ℕ), m < n + 1 → P m) ↔ (∀ (m : ℕ), m < n → P m) ∧ P n

Next tactic:
simp only [lt_succ_iff, Decidable.le_iff_eq_or_lt, forall_eq_or_imp, and_comm]