Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 6c8b2cd

Browse files
committed
fix(algebra/field) remove one_div_eq_inv (#3749)
It already existed as `one_div` for `group_with_zero` Also make `one_div` a `simp` lemma and renamed `nnreal.one_div_eq_inv` to `nnreal.one_div`.
1 parent d6ffc1a commit 6c8b2cd

23 files changed

+32
-34
lines changed

src/algebra/archimedean.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ begin
194194
rw [int.cast_add, int.cast_one],
195195
refine lt_of_le_of_lt (add_le_add_right ((zh _).1 (le_refl _)) _) _,
196196
rwa [← lt_sub_iff_add_lt', ← sub_mul,
197-
← div_lt_iff' (sub_pos.2 h), one_div_eq_inv],
197+
← div_lt_iff' (sub_pos.2 h), one_div],
198198
{ rw [rat.coe_int_denom, nat.cast_one], exact one_ne_zero },
199199
{ intro H, rw [rat.coe_nat_num, ← coe_coe, nat.cast_eq_zero] at H, subst H, cases n0 },
200200
{ rw [rat.coe_nat_denom, nat.cast_one], exact one_ne_zero }

src/algebra/field.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ instance division_ring.to_group_with_zero :
3232
{ .. ‹division_ring α›,
3333
.. (infer_instance : semiring α) }
3434

35-
@[simp] lemma one_div_eq_inv (a : α) : 1 / a = a⁻¹ := one_mul a⁻¹
36-
3735
@[field_simps] lemma inv_eq_one_div (a : α) : a⁻¹ = 1 / a := by simp
3836

3937
local attribute [simp]

src/algebra/field_power.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ begin
3737
{ apply absurd h,
3838
apply not_le_of_gt,
3939
exact lt_of_lt_of_le (neg_succ_lt_zero _) (of_nat_nonneg _) },
40-
{ simp only [fpow_neg_succ_of_nat, one_div_eq_inv],
40+
{ simp only [fpow_neg_succ_of_nat, one_div],
4141
apply le_trans (inv_le_one _); apply one_le_pow_of_one_le hx },
4242
{ simp only [fpow_neg_succ_of_nat],
4343
apply (inv_le_inv _ _).2,

src/algebra/group_with_zero.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ end
584584

585585
@[simp] lemma div_one (a : G₀) : a / 1 = a := by simp [div_eq_mul_inv]
586586

587-
lemma one_div (a : G₀) : 1 / a = a⁻¹ := one_mul _
587+
@[simp] lemma one_div (a : G₀) : 1 / a = a⁻¹ := one_mul _
588588

589589
@[simp] lemma zero_div (a : G₀) : 0 / a = 0 := zero_mul _
590590

@@ -632,7 +632,7 @@ by simpa only [one_div] using eq_inv_of_mul_left_eq_one h
632632
@[simp] lemma one_div_div (a b : G₀) : 1 / (a / b) = b / a :=
633633
by rw [one_div, div_eq_mul_inv, mul_inv_rev', inv_inv', div_eq_mul_inv]
634634

635-
@[simp] lemma one_div_one_div (a : G₀) : 1 / (1 / a) = a :=
635+
lemma one_div_one_div (a : G₀) : 1 / (1 / a) = a :=
636636
by simp
637637

638638
lemma eq_of_one_div_eq_one_div {a b : G₀} (h : 1 / a = 1 / b) : a = b :=

src/algebra/ordered_field.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ lemma le_inv (ha : 0 < a) (hb : 0 < b) : a ≤ b⁻¹ ↔ b ≤ a⁻¹ :=
393393
by rw [← inv_le_inv (inv_pos.2 hb) ha, inv_inv']
394394

395395
lemma one_div_le_one_div (ha : 0 < a) (hb : 0 < b) : 1 / a ≤ 1 / b ↔ b ≤ a :=
396-
by simpa [one_div_eq_inv] using inv_le_inv ha hb
396+
by simpa [one_div] using inv_le_inv ha hb
397397

398398
lemma inv_lt_inv (ha : 0 < a) (hb : 0 < b) : a⁻¹ < b⁻¹ ↔ b < a :=
399399
lt_iff_lt_of_le_iff_le (inv_le_inv hb ha)
@@ -402,7 +402,7 @@ lemma inv_lt (ha : 0 < a) (hb : 0 < b) : a⁻¹ < b ↔ b⁻¹ < a :=
402402
lt_iff_lt_of_le_iff_le (le_inv hb ha)
403403

404404
lemma one_div_lt (ha : 0 < a) (hb : 0 < b) : 1 / a < b ↔ 1 / b < a :=
405-
(one_div_eq_inv a).symm ▸ (one_div_eq_inv b).symm ▸ inv_lt ha hb
405+
(one_div a).symm ▸ (one_div b).symm ▸ inv_lt ha hb
406406

407407
lemma one_div_le (ha : 0 < a) (hb : 0 < b) : 1 / a ≤ b ↔ 1 / b ≤ a :=
408408
by simpa using inv_le ha hb

src/analysis/analytic/basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ begin
9696
have A : ∀ n : ℕ , 0 < n →
9797
(r : ennreal) ≤ ((C + 1)^(1/(n : ℝ)) : nnreal) * (1 / (nnnorm (p n) ^ (1/(n:ℝ)) : nnreal)),
9898
{ assume n npos,
99-
simp only [one_div_eq_inv, mul_assoc, mul_one, eq.symm ennreal.mul_div_assoc],
99+
simp only [one_div, mul_assoc, mul_one, eq.symm ennreal.mul_div_assoc],
100100
rw [ennreal.le_div_iff_mul_le _ _, ← nnreal.pow_nat_rpow_nat_inv r npos, ← ennreal.coe_mul,
101101
ennreal.coe_le_coe, ← nnreal.mul_rpow, mul_comm],
102102
{ exact nnreal.rpow_le_rpow (le_trans (h n) (le_add_right (le_refl _))) (by simp) },
@@ -137,7 +137,7 @@ begin
137137
rw [nnreal.lt_inv_iff_mul_lt A, mul_comm] at B,
138138
have : (nnnorm (p n) ^ (1 / (n : ℝ)) * r) ^ n ≤ 1 :=
139139
pow_le_one n (zero_le (nnnorm (p n) ^ (1 / ↑n) * r)) (le_of_lt B),
140-
rw [mul_pow, one_div_eq_inv, nnreal.rpow_nat_inv_pow_nat _ (lt_of_le_of_lt (zero_le _) hn)]
140+
rw [mul_pow, one_div, nnreal.rpow_nat_inv_pow_nat _ (lt_of_le_of_lt (zero_le _) hn)]
141141
at this,
142142
exact le_trans this (le_max_right _ _) },
143143
end

src/analysis/asymptotics.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ theorem is_O_with.right_le_sub_of_lt_1 {f₁ f₂ : α → E'} (h : is_O_with c
10761076
mem_sets_of_superset h $ λ x hx,
10771077
begin
10781078
simp only [mem_set_of_eq] at hx ⊢,
1079-
rw [mul_comm, one_div_eq_inv, ← div_eq_mul_inv, le_div_iff, mul_sub, mul_one, mul_comm],
1079+
rw [mul_comm, one_div, ← div_eq_mul_inv, le_div_iff, mul_sub, mul_one, mul_comm],
10801080
{ exact le_trans (sub_le_sub_left hx _) (norm_sub_norm_le _ _) },
10811081
{ exact sub_pos.2 hc }
10821082
end

src/analysis/calculus/deriv.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1630,7 +1630,7 @@ begin
16301630
rcases lt_trichotomy m 0 with hm|hm|hm,
16311631
{ have := (has_strict_deriv_at_inv _).scomp _ (this (-m) (neg_pos.2 hm));
16321632
[skip, exact fpow_ne_zero_of_ne_zero hx _],
1633-
simp only [(∘), fpow_neg, one_div_eq_inv, inv_inv', smul_eq_mul] at this,
1633+
simp only [(∘), fpow_neg, one_div, inv_inv', smul_eq_mul] at this,
16341634
convert this using 1,
16351635
rw [pow_two, mul_inv', inv_inv', int.cast_neg, ← neg_mul_eq_neg_mul, neg_mul_neg,
16361636
← fpow_add hx, mul_assoc, ← fpow_add hx], congr, abel },

src/analysis/convex/basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ begin
673673
simp only [center_mass, sum_insert ha, smul_add, (mul_smul _ _ _).symm],
674674
congr' 2,
675675
{ apply mul_comm },
676-
{ rw [div_mul_eq_mul_div, mul_inv_cancel hw, one_div_eq_inv] }
676+
{ rw [div_mul_eq_mul_div, mul_inv_cancel hw, one_div] }
677677
end
678678

679679
lemma finset.center_mass_singleton (hw : w i ≠ 0) : ({i} : finset ι).center_mass w z = z i :=

src/analysis/mean_inequalities.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ begin
427427
simp [this] },
428428
push_neg at H,
429429
by_cases H' : (∑ i in s, (f i)^p) ^ (1/p) = ⊤ ∨ (∑ i in s, (g i)^q) ^ (1/q) = ⊤,
430-
{ cases H'; simp [H', -one_div_eq_inv, H] },
430+
{ cases H'; simp [H', -one_div, H] },
431431
replace H' : (∀ i ∈ s, f i ≠ ⊤) ∧ (∀ i ∈ s, g i ≠ ⊤),
432432
by simpa [ennreal.rpow_eq_top_iff, asymm hpq.pos, asymm hpq.symm.pos, hpq.pos, hpq.symm.pos,
433433
ennreal.sum_eq_top_iff, not_or_distrib] using H',
@@ -447,7 +447,7 @@ theorem Lp_add_le (hp : 1 ≤ p) :
447447
(∑ i in s, (f i + g i) ^ p)^(1/p) ≤ (∑ i in s, (f i)^p) ^ (1/p) + (∑ i in s, (g i)^p) ^ (1/p) :=
448448
begin
449449
by_cases H' : (∑ i in s, (f i)^p) ^ (1/p) = ⊤ ∨ (∑ i in s, (g i)^p) ^ (1/p) = ⊤,
450-
{ cases H'; simp [H', -one_div_eq_inv] },
450+
{ cases H'; simp [H', -one_div] },
451451
have pos : 0 < p := lt_of_lt_of_le zero_lt_one hp,
452452
replace H' : (∀ i ∈ s, f i ≠ ⊤) ∧ (∀ i ∈ s, g i ≠ ⊤),
453453
by simpa [ennreal.rpow_eq_top_iff, asymm pos, pos, ennreal.sum_eq_top_iff,

0 commit comments

Comments
 (0)