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

Commit c2cc9a9

Browse files
fpvandoornmergify[bot]
authored andcommitted
refactor(*): change priority of \simeq (#1210)
* change priority of \simeq Also change priority of similar notations Remove many unnecessary parentheses * lower precedence on order_embedding and similar also add parentheses in 1 place where they were needed * spacing * add parenthesis
1 parent 86d0f29 commit c2cc9a9

File tree

18 files changed

+131
-131
lines changed

18 files changed

+131
-131
lines changed

src/algebra/gcd_domain.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ lemma nat.prime_iff_prime_int {p : ℕ} : p.prime ↔ _root_.prime (p : ℤ) :=
576576
mt is_unit_nat.1 $ λ h, by simpa [h, not_prime_one] using hp,
577577
λ a b, by simpa only [int.coe_nat_dvd, (int.coe_nat_mul _ _).symm] using hp.2.2 a b⟩⟩
578578

579-
def associates_int_equiv_nat : (associates ℤ) ≃ ℕ :=
579+
def associates_int_equiv_nat : associates ℤ ≃ ℕ :=
580580
begin
581581
refine ⟨λz, z.out.nat_abs, λn, associates.mk n, _, _⟩,
582582
{ refine (assume a, quotient.induction_on' a $ assume a,

src/category_theory/endomorphism.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ by refine { one := iso.refl X,
6363
inv := iso.symm,
6464
mul := flip iso.trans, .. } ; dunfold flip; obviously
6565

66-
def units_End_eqv_Aut : (units (End X)) ≃* Aut X :=
66+
def units_End_eqv_Aut : units (End X) ≃* Aut X :=
6767
{ to_fun := λ f, ⟨f.1, f.2, f.4, f.3⟩,
6868
inv_fun := λ f, ⟨f.1, f.2, f.4, f.3⟩,
6969
left_inv := λ ⟨f₁, f₂, f₃, f₄⟩, rfl,

src/data/equiv/algebra.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ attribute [to_additive add_equiv.mk] mul_equiv.mk
210210
attribute [to_additive add_equiv.to_equiv] mul_equiv.to_equiv
211211
attribute [to_additive add_equiv.hom] mul_equiv.hom
212212

213-
infix ` ≃* `:50 := mul_equiv
214-
infix ` ≃+ `:50 := add_equiv
213+
infix ` ≃* `:25 := mul_equiv
214+
infix ` ≃+ `:25 := add_equiv
215215

216216
namespace mul_equiv
217217

@@ -276,7 +276,7 @@ end units
276276
structure ring_equiv (α β : Type*) [ring α] [ring β] extends α ≃ β :=
277277
(hom : is_ring_hom to_fun)
278278

279-
infix ` ≃r `:50 := ring_equiv
279+
infix ` ≃r `:25 := ring_equiv
280280

281281
namespace ring_equiv
282282

src/data/equiv/basic.lean

Lines changed: 96 additions & 97 deletions
Large diffs are not rendered by default.

src/data/equiv/denumerable.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ instance ulift : denumerable (ulift α) := of_equiv _ equiv.ulift
108108

109109
instance plift : denumerable (plift α) := of_equiv _ equiv.plift
110110

111-
def pair : (α × α) ≃ α := equiv₂ _ _
111+
def pair : α × α ≃ α := equiv₂ _ _
112112

113113
end
114114
end denumerable

src/data/equiv/fin.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def fin_two_equiv : fin 2 ≃ bool :=
2525
end,
2626
assume b, match b with tt := rfl | ff := rfl end
2727

28-
def sum_fin_sum_equiv : (fin m ⊕ fin n) ≃ fin (m + n) :=
28+
def sum_fin_sum_equiv : fin m ⊕ fin n ≃ fin (m + n) :=
2929
{ to_fun := λ x, sum.rec_on x
3030
(λ y, ⟨y.1, nat.lt_of_lt_of_le y.2 $ nat.le_add_right m n⟩)
3131
(λ y, ⟨m + y.1, nat.add_lt_add_left y.2 m⟩),
@@ -46,7 +46,7 @@ def sum_fin_sum_equiv : (fin m ⊕ fin n) ≃ fin (m + n) :=
4646
{ dsimp, rw [dif_neg H], simp [fin.ext_iff, nat.add_sub_of_le (le_of_not_gt H)] }
4747
end }
4848

49-
def fin_prod_fin_equiv : (fin m × fin n) ≃ fin (m * n) :=
49+
def fin_prod_fin_equiv : fin m × fin n ≃ fin (m * n) :=
5050
{ to_fun := λ x, ⟨x.2.1 + n * x.1.1,
5151
calc x.2.1 + n * x.1.1 + 1
5252
= x.1.1 * n + x.2.1 + 1 : by ac_refl

src/data/equiv/nat.lean

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@ open nat
1212

1313
namespace equiv
1414

15-
@[simp] def nat_prod_nat_equiv_nat : (ℕ × ℕ) ≃ ℕ :=
15+
@[simp] def nat_prod_nat_equiv_nat : ℕ × ℕ ≃ ℕ :=
1616
⟨λ p, nat.mkpair p.1 p.2,
1717
nat.unpair,
1818
λ p, begin cases p, apply nat.unpair_mkpair end,
1919
nat.mkpair_unpair⟩
2020

21-
@[simp] def bool_prod_nat_equiv_nat : (bool × ℕ) ≃ ℕ :=
21+
@[simp] def bool_prod_nat_equiv_nat : bool × ℕ ≃ ℕ :=
2222
⟨λ ⟨b, n⟩, bit b n, bodd_div2,
2323
λ ⟨b, n⟩, by simp [bool_prod_nat_equiv_nat._match_1, bodd_bit, div2_bit],
2424
λ n, by simp [bool_prod_nat_equiv_nat._match_1, bit_decomp]⟩
2525

26-
@[simp] def nat_sum_nat_equiv_nat : (ℕ ⊕ ℕ) ≃ ℕ :=
26+
@[simp] def nat_sum_nat_equiv_nat : ℕ ⊕ ℕ ≃ ℕ :=
2727
(bool_prod_equiv_sum ℕ).symm.trans bool_prod_nat_equiv_nat
2828

2929
def int_equiv_nat : ℤ ≃ ℕ :=
3030
int_equiv_nat_sum_nat.trans nat_sum_nat_equiv_nat
3131

32-
def prod_equiv_of_equiv_nat {α : Sort*} (e : α ≃ ℕ) : (α × α) ≃ α :=
33-
calc (α × α)(ℕ × ℕ) : prod_congr e e
34-
... ≃ ℕ : nat_prod_nat_equiv_nat
35-
... ≃ α : e.symm
32+
def prod_equiv_of_equiv_nat {α : Sort*} (e : α ≃ ℕ) : α × α ≃ α :=
33+
calc α × α ≃ ℕ × ℕ : prod_congr e e
34+
... ≃ ℕ : nat_prod_nat_equiv_nat
35+
... ≃ α : e.symm
3636

3737
def pnat_equiv_nat : ℕ+ ≃ ℕ :=
3838
⟨λ n, pred n.1, succ_pnat,

src/data/finsupp.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,7 @@ by_contradiction (mt multiset.count_eq_zero.2 H)
10811081
of_multiset m a = m.count a :=
10821082
rfl
10831083

1084-
def equiv_multiset [decidable_eq α] : (α →₀ ℕ) ≃ (multiset α) :=
1084+
def equiv_multiset [decidable_eq α] : (α →₀ ℕ) ≃ multiset α :=
10851085
⟨ to_multiset, of_multiset,
10861086
assume f, finsupp.ext $ λ a, by rw [of_multiset_apply, count_to_multiset],
10871087
assume m, multiset.ext.2 $ λ a, by rw [count_to_multiset, of_multiset_apply] ⟩

src/data/list/sort.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ end sorted
6060
section sort
6161
universe variable uu
6262
parameters {α : Type uu} (r : α → α → Prop) [decidable_rel r]
63-
local infix `` : 50 := r
63+
local infix `` : 50 := r
6464

6565
/- insertion sort -/
6666

src/group_theory/coset.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ attribute [to_additive is_add_subgroup.left_add_coset_equiv_subgroup._match_1.eq
221221
attribute [to_additive is_add_subgroup.left_add_coset_equiv_subgroup._match_2.equations._eqn_1] left_coset_equiv_subgroup._match_2.equations._eqn_1
222222

223223
noncomputable def group_equiv_quotient_times_subgroup (hs : is_subgroup s) :
224-
α ≃ (quotient s × s) :=
224+
α ≃ quotient s × s :=
225225
calc α ≃ Σ L : quotient s, {x : α // (x : quotient s)= L} :
226226
equiv.equiv_fib quotient_group.mk
227227
... ≃ Σ L : quotient s, left_coset (quotient.out' L) s :
@@ -232,7 +232,7 @@ calc α ≃ Σ L : quotient s, {x : α // (x : quotient s)= L} :
232232
end)
233233
... ≃ Σ L : quotient s, s :
234234
equiv.sigma_congr_right (λ L, left_coset_equiv_subgroup _)
235-
... ≃ (quotient s × s) :
235+
... ≃ quotient s × s :
236236
equiv.sigma_equiv_prod _ _
237237
attribute [to_additive is_add_subgroup.add_group_equiv_quotient_times_subgroup._proof_2] group_equiv_quotient_times_subgroup._proof_2
238238
attribute [to_additive is_add_subgroup.add_group_equiv_quotient_times_subgroup._proof_1] group_equiv_quotient_times_subgroup._proof_1
@@ -246,7 +246,7 @@ namespace quotient_group
246246
variables [group α]
247247

248248
noncomputable def preimage_mk_equiv_subgroup_times_set
249-
(s : set α) [is_subgroup s] (t : set (quotient s)) : quotient_group.mk ⁻¹' t ≃ (s × t) :=
249+
(s : set α) [is_subgroup s] (t : set (quotient s)) : quotient_group.mk ⁻¹' t ≃ s × t :=
250250
have h : ∀ {x : quotient s} {a : α}, x ∈ t → a ∈ s →
251251
(quotient.mk' (quotient.out' x * a) : quotient s) = quotient.mk' (quotient.out' x) :=
252252
λ x a hx ha, quotient.sound' (show (quotient.out' x * a)⁻¹ * quotient.out' x ∈ s,

0 commit comments

Comments
 (0)