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

Commit d7fa405

Browse files
committed
chore(algebra/*): merge inv_inv'' with inv_inv' (#2954)
1 parent 8161888 commit d7fa405

File tree

5 files changed

+12
-15
lines changed

5 files changed

+12
-15
lines changed

src/algebra/field.lean

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,6 @@ match classical.em (a = 0) with
172172
| or.inr h := eq.symm (eq_one_div_of_mul_eq_one_left (mul_one_div_cancel h))
173173
end
174174

175-
lemma inv_inv' (a : α) : a⁻¹⁻¹ = a :=
176-
by rw [inv_eq_one_div, inv_eq_one_div, one_div_one_div]
177-
178175
lemma eq_of_one_div_eq_one_div (h : 1 / a = 1 / b) : a = b :=
179176
by rw [← one_div_one_div a, h,one_div_one_div]
180177

src/algebra/group_with_zero.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ calc (a * b⁻¹) * b = a * (b⁻¹ * b) : mul_assoc _ _ _
110110
calc a⁻¹ * (a * b) = (a⁻¹ * a) * b : (mul_assoc _ _ _).symm
111111
... = b : by simp [h]
112112

113-
@[simp] lemma inv_inv'' (a : G₀) : a⁻¹⁻¹ = a :=
113+
@[simp] lemma inv_inv' (a : G₀) : a⁻¹⁻¹ = a :=
114114
begin
115115
classical,
116116
by_cases h : a = 0, { simp [h] },
@@ -159,7 +159,7 @@ mul_self_mul_inv a
159159
mul_inv_mul_self a
160160

161161
lemma inv_involutive' : function.involutive (has_inv.inv : G₀ → G₀) :=
162-
inv_inv''
162+
inv_inv'
163163

164164
lemma ne_zero_of_mul_right_eq_one' (a b : G₀) (h : a * b = 1) : a ≠ 0 :=
165165
assume a_eq_0, zero_ne_one (by simpa [a_eq_0] using h : (0:G₀) = 1)
@@ -189,7 +189,7 @@ inv_involutive'.injective
189189
⟨assume H, inv_injective' H, congr_arg _⟩
190190

191191
lemma inv_eq_iff {g h : G₀} : g⁻¹ = h ↔ h⁻¹ = g :=
192-
by rw [← inv_inj'', eq_comm, inv_inv'']
192+
by rw [← inv_inj'', eq_comm, inv_inv']
193193

194194
@[simp] lemma coe_unit_mul_inv' (a : units G₀) : (a : G₀) * a⁻¹ = 1 :=
195195
mul_inv_cancel' _ $ ne_zero_of_mul_right_eq_one' _ (a⁻¹ : units G₀) $ by simp
@@ -361,7 +361,7 @@ have a ≠ 0, from
361361
by rw [← h, mul_div_assoc'', div_self' this, mul_one]
362362

363363
@[simp] lemma one_div_div' (a b : G₀) : 1 / (a / b) = b / a :=
364-
by rw [one_div, div_eq_mul_inv, mul_inv_rev', inv_inv'', div_eq_mul_inv]
364+
by rw [one_div, div_eq_mul_inv, mul_inv_rev', inv_inv', div_eq_mul_inv]
365365

366366
@[simp] lemma one_div_one_div' (a : G₀) : 1 / (1 / a) = a :=
367367
by simp
@@ -390,7 +390,7 @@ congr_arg _ $ units.inv_eq_inv _
390390
divp_eq_div _ _
391391

392392
lemma inv_div : (a / b)⁻¹ = b / a :=
393-
(mul_inv_rev' _ _).trans (by rw inv_inv''; refl)
393+
(mul_inv_rev' _ _).trans (by rw inv_inv'; refl)
394394

395395
lemma inv_div_left : a⁻¹ / b = (b * a)⁻¹ :=
396396
(mul_inv_rev' _ _).symm
@@ -409,7 +409,7 @@ lemma div_left_inj' (hc : c ≠ 0) : a / c = b / c ↔ a = b :=
409409
by rw [← divp_mk0 _ hc, ← divp_mk0 _ hc, divp_left_inj]
410410

411411
lemma mul_left_inj' (hc : c ≠ 0) : a * c = b * c ↔ a = b :=
412-
by rw [← inv_inv'' c, ← div_eq_mul_inv, ← div_eq_mul_inv, div_left_inj' (inv_ne_zero' hc)]
412+
by rw [← inv_inv' c, ← div_eq_mul_inv, ← div_eq_mul_inv, div_left_inj' (inv_ne_zero' hc)]
413413

414414
lemma div_eq_iff_mul_eq (hb : b ≠ 0) : a / b = c ↔ c * b = a :=
415415
⟨λ h, by rw [← h, div_mul_cancel' _ hb],

src/algebra/group_with_zero_power.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ lemma zero_fpow : ∀ z : ℤ, z ≠ 0 → (0 : G₀) ^ z = 0
8787
@[simp] theorem fpow_neg (a : G₀) : ∀ (n : ℤ), a ^ -n = (a ^ n)⁻¹
8888
| (n+1:ℕ) := rfl
8989
| 0 := inv_one'.symm
90-
| -[1+ n] := (inv_inv'' _).symm
90+
| -[1+ n] := (inv_inv' _).symm
9191

9292
theorem fpow_neg_one (x : G₀) : x ^ (-1:ℤ) = x⁻¹ := congr_arg has_inv.inv $ pow_one x
9393

@@ -103,7 +103,7 @@ or.elim (nat.lt_or_ge m (nat.succ n))
103103
suffices a ^ -[1+ n-m] = a ^ of_nat m * a ^ -[1+n],
104104
by rwa [of_nat_add_neg_succ_of_nat_of_lt h1],
105105
show (a ^ nat.succ (n - m))⁻¹ = a ^ of_nat m * a ^ -[1+n],
106-
by rw [← nat.succ_sub h2, pow_sub' _ h (le_of_lt h1), mul_inv_rev', inv_inv'']; refl)
106+
by rw [← nat.succ_sub h2, pow_sub' _ h (le_of_lt h1), mul_inv_rev', inv_inv']; refl)
107107
(assume : m ≥ n.succ,
108108
suffices a ^ (of_nat (m - n.succ)) = (a ^ (of_nat m)) * (a ^ -[1+ n]),
109109
by rw [of_nat_add_neg_succ_of_nat_of_ge]; assumption,
@@ -135,7 +135,7 @@ theorem fpow_mul (a : G₀) : ∀ m n : ℤ, a ^ (m * n) = (a ^ m) ^ n
135135
| -[1+ m] (n : ℕ) := (fpow_neg _ (m.succ * n)).trans $
136136
show (a ^ (m.succ * n))⁻¹ = _, by rw [pow_mul, ← inv_pow']; refl
137137
| -[1+ m] -[1+ n] := (pow_mul a m.succ n.succ).trans $
138-
show _ = (_⁻¹ ^ _)⁻¹, by rw [inv_pow', inv_inv'']
138+
show _ = (_⁻¹ ^ _)⁻¹, by rw [inv_pow', inv_inv']
139139

140140
theorem fpow_mul' (a : G₀) (m n : ℤ) : a ^ (m * n) = (a ^ n) ^ m :=
141141
by rw [mul_comm, fpow_mul]

src/algebra/ordered_field.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,12 +440,12 @@ lemma div_pos : 0 < a → 0 < b → 0 < a / b := div_pos_of_pos_of_pos
440440

441441
@[simp] lemma inv_pos : ∀ {a : α}, 0 < a⁻¹ ↔ 0 < a :=
442442
suffices ∀ a : α, 0 < a → 0 < a⁻¹,
443-
from λ a, ⟨λ h, inv_inv'' a ▸ this _ h, this a⟩,
443+
from λ a, ⟨λ h, inv_inv' a ▸ this _ h, this a⟩,
444444
λ a, one_div_eq_inv a ▸ one_div_pos_of_pos
445445

446446
@[simp] lemma inv_lt_zero : ∀ {a : α}, a⁻¹ < 0 ↔ a < 0 :=
447447
suffices ∀ a : α, a < 0 → a⁻¹ < 0,
448-
from λ a, ⟨λ h, inv_inv'' a ▸ this _ h, this a⟩,
448+
from λ a, ⟨λ h, inv_inv' a ▸ this _ h, this a⟩,
449449
λ a, one_div_eq_inv a ▸ one_div_neg_of_neg
450450

451451
@[simp] lemma inv_nonneg : 0 ≤ a⁻¹ ↔ 0 ≤ a :=

src/algebra/pointwise.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ iff.intro
332332

333333
lemma mem_smul_set_iff_inv_smul_mem [field α] [mul_action α β]
334334
{a : α} (ha : a ≠ 0) (A : set β) (x : β) : x ∈ a • A ↔ a⁻¹ • x ∈ A :=
335-
by conv_lhs { rw ← inv_inv'' a };
335+
by conv_lhs { rw ← inv_inv' a };
336336
exact (mem_inv_smul_set_iff (inv_ne_zero ha) _ _)
337337

338338
end

0 commit comments

Comments
 (0)