@@ -126,7 +126,7 @@ protected theorem le_total (a b : ValueGroup A K) : a ≤ b ∨ b ≤ a := by
126126
127127-- Porting note: it is much faster to split the instance `LinearOrderedCommGroupWithZero`
128128-- into two parts
129- noncomputable instance : LinearOrder (ValueGroup A K) where
129+ noncomputable instance linearOrder : LinearOrder (ValueGroup A K) where
130130 le_refl := by rintro ⟨⟩; use 1 ; rw [one_smul]
131131 le_trans := by rintro ⟨a⟩ ⟨b⟩ ⟨c⟩ ⟨e, rfl⟩ ⟨f, rfl⟩; use e * f; rw [mul_smul]
132132 le_antisymm := by
@@ -146,33 +146,34 @@ noncomputable instance : LinearOrder (ValueGroup A K) where
146146 decidableLE := by classical infer_instance
147147
148148noncomputable instance linearOrderedCommGroupWithZero :
149- LinearOrderedCommGroupWithZero (ValueGroup A K) where
150- mul_assoc := by rintro ⟨a⟩ ⟨b⟩ ⟨c⟩; apply Quotient.sound'; rw [mul_assoc]; apply Setoid.refl'
151- one_mul := by rintro ⟨a⟩; apply Quotient.sound'; rw [one_mul]; apply Setoid.refl'
152- mul_one := by rintro ⟨a⟩; apply Quotient.sound'; rw [mul_one]; apply Setoid.refl'
153- mul_comm := by rintro ⟨a⟩ ⟨b⟩; apply Quotient.sound'; rw [mul_comm]; apply Setoid.refl'
154- mul_le_mul_left := by
155- rintro ⟨a⟩ ⟨b⟩ ⟨c, rfl⟩ ⟨d⟩
156- use c; simp only [Algebra.smul_def]; ring
157- zero_mul := by rintro ⟨a⟩; apply Quotient.sound'; rw [zero_mul]; apply Setoid.refl'
158- mul_zero := by rintro ⟨a⟩; apply Quotient.sound'; rw [mul_zero]; apply Setoid.refl'
159- zero_le_one := ⟨0 , by rw [zero_smul]⟩
160- exists_pair_ne := by
161- use 0 , 1
162- intro c; obtain ⟨d, hd⟩ := Quotient.exact' c
163- apply_fun fun t => d⁻¹ • t at hd
164- simp only [inv_smul_smul, smul_zero, one_ne_zero] at hd
165- inv_zero := by apply Quotient.sound'; rw [inv_zero]; apply Setoid.refl'
166- mul_inv_cancel := by
167- rintro ⟨a⟩ ha
168- apply Quotient.sound'
169- use 1
170- simp only [one_smul, ne_eq]
171- apply (mul_inv_cancel _).symm
172- contrapose ha
173- simp only [Classical.not_not] at ha ⊢
174- rw [ha]
175- rfl
149+ LinearOrderedCommGroupWithZero (ValueGroup A K) :=
150+ { linearOrder .. with
151+ mul_assoc := by rintro ⟨a⟩ ⟨b⟩ ⟨c⟩; apply Quotient.sound'; rw [mul_assoc]; apply Setoid.refl'
152+ one_mul := by rintro ⟨a⟩; apply Quotient.sound'; rw [one_mul]; apply Setoid.refl'
153+ mul_one := by rintro ⟨a⟩; apply Quotient.sound'; rw [mul_one]; apply Setoid.refl'
154+ mul_comm := by rintro ⟨a⟩ ⟨b⟩; apply Quotient.sound'; rw [mul_comm]; apply Setoid.refl'
155+ mul_le_mul_left := by
156+ rintro ⟨a⟩ ⟨b⟩ ⟨c, rfl⟩ ⟨d⟩
157+ use c; simp only [Algebra.smul_def]; ring
158+ zero_mul := by rintro ⟨a⟩; apply Quotient.sound'; rw [zero_mul]; apply Setoid.refl'
159+ mul_zero := by rintro ⟨a⟩; apply Quotient.sound'; rw [mul_zero]; apply Setoid.refl'
160+ zero_le_one := ⟨0 , by rw [zero_smul]⟩
161+ exists_pair_ne := by
162+ use 0 , 1
163+ intro c; obtain ⟨d, hd⟩ := Quotient.exact' c
164+ apply_fun fun t => d⁻¹ • t at hd
165+ simp only [inv_smul_smul, smul_zero, one_ne_zero] at hd
166+ inv_zero := by apply Quotient.sound'; rw [inv_zero]; apply Setoid.refl'
167+ mul_inv_cancel := by
168+ rintro ⟨a⟩ ha
169+ apply Quotient.sound'
170+ use 1
171+ simp only [one_smul, ne_eq]
172+ apply (mul_inv_cancel _).symm
173+ contrapose ha
174+ simp only [Classical.not_not] at ha ⊢
175+ rw [ha]
176+ rfl }
176177
177178/-- Any valuation ring induces a valuation on its fraction field. -/
178179def valuation : Valuation K (ValueGroup A K) where
0 commit comments