@@ -52,10 +52,10 @@ begin
52
52
nontriviality R using [zero_lt_one],
53
53
have hpos : 0 < ∥(↑x⁻¹ : R)∥ := units.norm_pos x⁻¹,
54
54
calc ∥-(↑x⁻¹ * t)∥
55
- = ∥↑x⁻¹ * t∥ : by { rw norm_neg }
56
- ... ≤ ∥(↑x⁻¹ : R)∥ * ∥t∥ : norm_mul_le x.inv _
55
+ = ∥↑x⁻¹ * t∥ : by { rw norm_neg }
56
+ ... ≤ ∥(↑x⁻¹ : R)∥ * ∥t∥ : norm_mul_le ↑x⁻¹ _
57
57
... < ∥(↑x⁻¹ : R)∥ * ∥(↑x⁻¹ : R)∥⁻¹ : by nlinarith only [h, hpos]
58
- ... = 1 : mul_inv_cancel (ne_of_gt hpos)
58
+ ... = 1 : mul_inv_cancel (ne_of_gt hpos)
59
59
end )
60
60
61
61
@[simp] lemma add_coe (x : units R) (t : R) (h : ∥t∥ < ∥(↑x⁻¹ : R)∥⁻¹) :
@@ -70,20 +70,19 @@ x.add ((y : R) - x) h
70
70
↑(x.unit_of_nearby y h) = y := by { unfold units.unit_of_nearby, simp }
71
71
72
72
/-- The group of units of a complete normed ring is an open subset of the ring. -/
73
- lemma is_open : is_open {x : R | is_unit x} :=
73
+ protected lemma is_open : is_open {x : R | is_unit x} :=
74
74
begin
75
75
nontriviality R,
76
76
apply metric.is_open_iff.mpr,
77
- rintros x' ⟨x, h ⟩,
77
+ rintros x' ⟨x, rfl ⟩,
78
78
refine ⟨∥(↑x⁻¹ : R)∥⁻¹, inv_pos.mpr (units.norm_pos x⁻¹), _⟩,
79
79
intros y hy,
80
- rw [metric.mem_ball, dist_eq_norm, ←h] at hy,
81
- use x.unit_of_nearby y hy,
82
- simp
80
+ rw [metric.mem_ball, dist_eq_norm] at hy,
81
+ exact ⟨x.unit_of_nearby y hy, unit_of_nearby_coe _ _ _⟩
83
82
end
84
83
85
- lemma nhds (x : units R) : {x : R | is_unit x} ∈ 𝓝 (x : R) :=
86
- mem_nhds_sets is_open (by { rw [set.mem_set_of_eq], exact is_unit_unit x } )
84
+ protected lemma nhds (x : units R) : {x : R | is_unit x} ∈ 𝓝 (x : R) :=
85
+ mem_nhds_sets units. is_open (is_unit_unit x)
87
86
88
87
end units
89
88
@@ -92,10 +91,7 @@ open_locale classical big_operators
92
91
open asymptotics filter metric finset ring
93
92
94
93
lemma inverse_one_sub (t : R) (h : ∥t∥ < 1 ) : inverse (1 - t) = ↑(units.one_sub t h)⁻¹ :=
95
- begin
96
- rw ← inverse_unit (units.one_sub t h),
97
- refl,
98
- end
94
+ by rw [← inverse_unit (units.one_sub t h), units.one_sub_coe]
99
95
100
96
/-- The formula `inverse (x + t) = inverse (1 + x⁻¹ * t) * x⁻¹` holds for `t` sufficiently small. -/
101
97
lemma inverse_add (x : units R) :
0 commit comments