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

Commit 951c063

Browse files
committed
chore(data/set/pairwise): rename set.pairwise_on to set.pairwise to match list.pairwise and multiset.pairwise (#10035)
1 parent 7ef3262 commit 951c063

File tree

22 files changed

+155
-155
lines changed

22 files changed

+155
-155
lines changed

src/algebra/big_operators/finprod.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ sets `t i`, `i ∈ I`, are finite, if all `t i`, `i ∈ I`, are pairwise disjoin
699699
the product of `f a` over `a ∈ ⋃ i ∈ I, t i` is equal to the product over `i ∈ I`
700700
of the products of `f a` over `a ∈ t i`. -/
701701
@[to_additive] lemma finprod_mem_bUnion {I : set ι} {t : ι → set α}
702-
(h : pairwise_on I (disjoint on t)) (hI : I.finite) (ht : ∀ i ∈ I, (t i).finite) :
702+
(h : I.pairwise (disjoint on t)) (hI : I.finite) (ht : ∀ i ∈ I, (t i).finite) :
703703
∏ᶠ a ∈ ⋃ x ∈ I, t x, f a = ∏ᶠ i ∈ I, ∏ᶠ j ∈ t i, f j :=
704704
begin
705705
haveI := hI.fintype,
@@ -709,7 +709,7 @@ end
709709

710710
/-- If `t` is a finite set of pairwise disjoint finite sets, then the product of `f a`
711711
over `a ∈ ⋃₀ t` is the product over `s ∈ t` of the products of `f a` over `a ∈ s`. -/
712-
@[to_additive] lemma finprod_mem_sUnion {t : set (set α)} (h : pairwise_on t disjoint)
712+
@[to_additive] lemma finprod_mem_sUnion {t : set (set α)} (h : t.pairwise disjoint)
713713
(ht₀ : t.finite) (ht₁ : ∀ x ∈ t, set.finite x):
714714
∏ᶠ a ∈ ⋃₀ t, f a = ∏ᶠ s ∈ t, ∏ᶠ a ∈ s, f a :=
715715
by rw [set.sUnion_eq_bUnion, finprod_mem_bUnion h ht₀ ht₁]

src/analysis/box_integral/partition/basic.lean

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ variables {ι : Type*}
4747
structure prepartition (I : box ι) :=
4848
(boxes : finset (box ι))
4949
(le_of_mem' : ∀ J ∈ boxes, J ≤ I)
50-
(pairwise_disjoint : pairwise_on ↑boxes (disjoint on (coe : box ι → set (ι → ℝ))))
50+
(pairwise_disjoint : set.pairwise ↑boxes (disjoint on (coe : box ι → set (ι → ℝ))))
5151

5252
namespace prepartition
5353

@@ -224,7 +224,7 @@ function. -/
224224
end,
225225
pairwise_disjoint :=
226226
begin
227-
simp only [pairwise_on, finset.mem_coe, finset.mem_bUnion],
227+
simp only [set.pairwise, finset.mem_coe, finset.mem_bUnion],
228228
rintro J₁' ⟨J₁, hJ₁, hJ₁'⟩ J₂' ⟨J₂, hJ₂, hJ₂'⟩ Hne x ⟨hx₁, hx₂⟩, apply Hne,
229229
obtain rfl : J₁ = J₂,
230230
from π.eq_of_mem_of_mem hJ₁ hJ₂ ((πi J₁).le_of_mem hJ₁' hx₁)
@@ -308,7 +308,7 @@ end
308308
the empty one if it exists. -/
309309
def of_with_bot (boxes : finset (with_bot (box ι)))
310310
(le_of_mem : ∀ J ∈ boxes, (J : with_bot (box ι)) ≤ I)
311-
(pairwise_disjoint : pairwise_on (boxes : set (with_bot (box ι))) disjoint) :
311+
(pairwise_disjoint : set.pairwise (boxes : set (with_bot (box ι))) disjoint) :
312312
prepartition I :=
313313
{ boxes := boxes.erase_none,
314314
le_of_mem' := λ J hJ,
@@ -328,7 +328,7 @@ mem_erase_none
328328

329329
@[simp] lemma Union_of_with_bot (boxes : finset (with_bot (box ι)))
330330
(le_of_mem : ∀ J ∈ boxes, (J : with_bot (box ι)) ≤ I)
331-
(pairwise_disjoint : pairwise_on (boxes : set (with_bot (box ι))) disjoint) :
331+
(pairwise_disjoint : set.pairwise (boxes : set (with_bot (box ι))) disjoint) :
332332
(of_with_bot boxes le_of_mem pairwise_disjoint).Union = ⋃ J ∈ boxes, ↑J :=
333333
begin
334334
suffices : (⋃ (J : box ι) (hJ : ↑J ∈ boxes), ↑J) = ⋃ J ∈ boxes, ↑J,
@@ -339,7 +339,7 @@ end
339339

340340
lemma of_with_bot_le {boxes : finset (with_bot (box ι))}
341341
{le_of_mem : ∀ J ∈ boxes, (J : with_bot (box ι)) ≤ I}
342-
{pairwise_disjoint : pairwise_on (boxes : set (with_bot (box ι))) disjoint}
342+
{pairwise_disjoint : set.pairwise (boxes : set (with_bot (box ι))) disjoint}
343343
(H : ∀ J ∈ boxes, J ≠ ⊥ → ∃ J' ∈ π, J ≤ ↑J') :
344344
of_with_bot boxes le_of_mem pairwise_disjoint ≤ π :=
345345
have ∀ (J : box ι), ↑J ∈ boxes → ∃ J' ∈ π, J ≤ J',
@@ -348,7 +348,7 @@ by simpa [of_with_bot, le_def]
348348

349349
lemma le_of_with_bot {boxes : finset (with_bot (box ι))}
350350
{le_of_mem : ∀ J ∈ boxes, (J : with_bot (box ι)) ≤ I}
351-
{pairwise_disjoint : pairwise_on (boxes : set (with_bot (box ι))) disjoint}
351+
{pairwise_disjoint : set.pairwise (boxes : set (with_bot (box ι))) disjoint}
352352
(H : ∀ J ∈ π, ∃ J' ∈ boxes, ↑J ≤ J') :
353353
π ≤ of_with_bot boxes le_of_mem pairwise_disjoint :=
354354
begin
@@ -360,10 +360,10 @@ end
360360

361361
lemma of_with_bot_mono {boxes₁ : finset (with_bot (box ι))}
362362
{le_of_mem₁ : ∀ J ∈ boxes₁, (J : with_bot (box ι)) ≤ I}
363-
{pairwise_disjoint₁ : pairwise_on (boxes₁ : set (with_bot (box ι))) disjoint}
363+
{pairwise_disjoint₁ : set.pairwise (boxes₁ : set (with_bot (box ι))) disjoint}
364364
{boxes₂ : finset (with_bot (box ι))}
365365
{le_of_mem₂ : ∀ J ∈ boxes₂, (J : with_bot (box ι)) ≤ I}
366-
{pairwise_disjoint₂ : pairwise_on (boxes₂ : set (with_bot (box ι))) disjoint}
366+
{pairwise_disjoint₂ : set.pairwise (boxes₂ : set (with_bot (box ι))) disjoint}
367367
(H : ∀ J ∈ boxes₁, J ≠ ⊥ → ∃ J' ∈ boxes₂, J ≤ J') :
368368
of_with_bot boxes₁ le_of_mem₁ pairwise_disjoint₁ ≤
369369
of_with_bot boxes₂ le_of_mem₂ pairwise_disjoint₂ :=
@@ -372,7 +372,7 @@ le_of_with_bot _ $ λ J hJ, H J (mem_of_with_bot.1 hJ) (with_bot.coe_ne_bot _)
372372
lemma sum_of_with_bot {M : Type*} [add_comm_monoid M]
373373
(boxes : finset (with_bot (box ι)))
374374
(le_of_mem : ∀ J ∈ boxes, (J : with_bot (box ι)) ≤ I)
375-
(pairwise_disjoint : pairwise_on (boxes : set (with_bot (box ι))) disjoint)
375+
(pairwise_disjoint : set.pairwise (boxes : set (with_bot (box ι))) disjoint)
376376
(f : box ι → M) :
377377
∑ J in (of_with_bot boxes le_of_mem pairwise_disjoint).boxes, f J =
378378
∑ J in boxes, option.elim J 0 f :=
@@ -384,7 +384,7 @@ def restrict (π : prepartition I) (J : box ι) :
384384
of_with_bot (π.boxes.image (λ J', J ⊓ J'))
385385
(λ J' hJ', by { rcases finset.mem_image.1 hJ' with ⟨J', -, rfl⟩, exact inf_le_left })
386386
begin
387-
simp only [pairwise_on, on_fun, finset.mem_coe, finset.mem_image],
387+
simp only [set.pairwise, on_fun, finset.mem_coe, finset.mem_image],
388388
rintro _ ⟨J₁, h₁, rfl⟩ _ ⟨J₂, h₂, rfl⟩ Hne,
389389
have : J₁ ≠ J₂, by { rintro rfl, exact Hne rfl },
390390
exact ((box.disjoint_coe.2 $ π.disjoint_coe_of_mem h₁ h₂ this).inf_left' _).inf_right' _
@@ -523,7 +523,7 @@ by convert sum_fiberwise_of_maps_to (λ _, finset.mem_image_of_mem f) g
523523
le_of_mem' := λ J hJ, (finset.mem_union.1 hJ).elim π₁.le_of_mem π₂.le_of_mem,
524524
pairwise_disjoint :=
525525
suffices ∀ (J₁ ∈ π₁) (J₂ ∈ π₂), J₁ ≠ J₂ → disjoint (J₁ : set (ι → ℝ)) J₂,
526-
by simpa [pairwise_on_union_of_symmetric (symmetric_disjoint.comap _), pairwise_disjoint],
526+
by simpa [pairwise_union_of_symmetric (symmetric_disjoint.comap _), pairwise_disjoint],
527527
λ J₁ h₁ J₂ h₂ _, h.mono (π₁.subset_Union h₁) (π₂.subset_Union h₂) }
528528

529529
@[simp] lemma mem_disj_union (H : disjoint π₁.Union π₂.Union) :

src/analysis/box_integral/partition/split.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ of_with_bot {I.split_lower i x, I.split_upper i x}
147147
end
148148
begin
149149
simp only [finset.coe_insert, finset.coe_singleton, true_and, set.mem_singleton_iff,
150-
pairwise_on_insert_of_symmetric symmetric_disjoint, pairwise_on_singleton],
150+
pairwise_insert_of_symmetric symmetric_disjoint, pairwise_singleton],
151151
rintro J rfl -,
152152
exact I.disjoint_split_lower_split_upper i x
153153
end

src/analysis/convex/basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,8 +529,8 @@ begin
529529
exact h hx hy ha hb hab
530530
end
531531

532-
lemma convex_iff_pairwise_on_pos :
533-
convex 𝕜 s ↔ s.pairwise_on (λ x y, ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 → a • x + b • y ∈ s) :=
532+
lemma convex_iff_pairwise_pos :
533+
convex 𝕜 s ↔ s.pairwise (λ x y, ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 → a • x + b • y ∈ s) :=
534534
begin
535535
refine ⟨λ h x hx y hy _ a b ha hb hab, h hx hy ha.le hb.le hab, _⟩,
536536
intros h x y hx hy a b ha hb hab,

src/analysis/convex/function.lean

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@ lemma concave_on_iff_forall_pos {s : set E} {f : E → β} :
229229
→ a • f x + b • f y ≤ f (a • x + b • y) :=
230230
@convex_on_iff_forall_pos 𝕜 E (order_dual β) _ _ _ _ _ _ _
231231

232-
lemma convex_on_iff_pairwise_on_pos {s : set E} {f : E → β} :
232+
lemma convex_on_iff_pairwise_pos {s : set E} {f : E → β} :
233233
convex_on 𝕜 s f ↔ convex 𝕜 s ∧
234-
s.pairwise_on (λ x y, ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1
234+
s.pairwise (λ x y, ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1
235235
→ f (a • x + b • y) ≤ a • f x + b • f y) :=
236236
begin
237237
rw convex_on_iff_forall_pos,
@@ -242,11 +242,11 @@ begin
242242
exact h x hx y hy hxy ha hb hab,
243243
end
244244

245-
lemma concave_on_iff_pairwise_on_pos {s : set E} {f : E → β} :
245+
lemma concave_on_iff_pairwise_pos {s : set E} {f : E → β} :
246246
concave_on 𝕜 s f ↔ convex 𝕜 s ∧
247-
s.pairwise_on (λ x y, ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1
247+
s.pairwise (λ x y, ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1
248248
→ a • f x + b • f y ≤ f (a • x + b • y)) :=
249-
@convex_on_iff_pairwise_on_pos 𝕜 E (order_dual β) _ _ _ _ _ _ _
249+
@convex_on_iff_pairwise_pos 𝕜 E (order_dual β) _ _ _ _ _ _ _
250250

251251
/-- A linear map is convex. -/
252252
lemma linear_map.convex_on (f : E →ₗ[𝕜] β) {s : set E} (hs : convex 𝕜 s) : convex_on 𝕜 s f :=
@@ -279,7 +279,7 @@ variables [ordered_smul 𝕜 β] {s : set E} {f : E → β}
279279

280280
lemma strict_convex_on.convex_lt (hf : strict_convex_on 𝕜 s f) (r : β) :
281281
convex 𝕜 {x ∈ s | f x < r} :=
282-
convex_iff_pairwise_on_pos.2 $ λ x hx y hy hxy a b ha hb hab, ⟨hf.1 hx.1 hy.1 ha.le hb.le hab,
282+
convex_iff_pairwise_pos.2 $ λ x hx y hy hxy a b ha hb hab, ⟨hf.1 hx.1 hy.1 ha.le hb.le hab,
283283
calc
284284
f (a • x + b • y) < a • f x + b • f y : hf.2 hx.1 hy.1 hxy ha hb hab
285285
... ≤ a • r + b • r : add_le_add (smul_lt_smul_of_pos hx.2 ha).le
@@ -304,7 +304,7 @@ lemma linear_order.convex_on_of_lt (hs : convex 𝕜 s)
304304
(hf : ∀ ⦃x y : E⦄, x ∈ s → y ∈ s → x < y → ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1
305305
f (a • x + b • y) ≤ a • f x + b • f y) : convex_on 𝕜 s f :=
306306
begin
307-
refine convex_on_iff_pairwise_on_pos.2 ⟨hs, λ x hx y hy hxy a b ha hb hab, _⟩,
307+
refine convex_on_iff_pairwise_pos.2 ⟨hs, λ x hx y hy hxy a b ha hb hab, _⟩,
308308
wlog h : x ≤ y using [x y a b, y x b a],
309309
{ exact le_total _ _ },
310310
exact hf hx hy (h.lt_of_ne hxy) ha hb hab,

src/data/list/nodup.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ begin
338338
exact absurd (hl x) hx.not_le
339339
end
340340

341-
lemma nodup.pairwise_of_set_pairwise_on {l : list α} {r : α → α → Prop}
342-
(hl : l.nodup) (h : {x | x ∈ l}.pairwise_on r) : l.pairwise r :=
341+
lemma nodup.pairwise_of_set_pairwise {l : list α} {r : α → α → Prop}
342+
(hl : l.nodup) (h : {x | x ∈ l}.pairwise r) : l.pairwise r :=
343343
hl.pairwise_of_forall_ne h
344344

345345
end list

src/data/list/pairwise.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ from λ R l, ⟨λ p, reverse_reverse l ▸ this p, this⟩,
246246
pairwise_cons, forall_prop_of_false (not_mem_nil _), forall_true_iff,
247247
pairwise.nil, mem_reverse, mem_singleton, forall_eq, true_and] using h]
248248

249-
lemma pairwise.set_pairwise_on {l : list α} (h : pairwise R l) (hr : symmetric R) :
250-
set.pairwise_on {x | x ∈ l} R :=
249+
lemma pairwise.set_pairwise {l : list α} (h : pairwise R l) (hr : symmetric R) :
250+
set.pairwise {x | x ∈ l} R :=
251251
begin
252252
induction h with hd tl imp h IH,
253253
{ simp },

src/data/polynomial/field_division.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ begin
408408
pairwise_coprime_X_sub function.injective_id,
409409
have H : pairwise (is_coprime on λ (a : R), (polynomial.X - C (id a)) ^ (root_multiplicity a p)),
410410
{ intros a b hdiff, exact (hcoprime a b hdiff).pow },
411-
apply finset.prod_dvd_of_coprime (pairwise.pairwise_on H (↑(multiset.to_finset p.roots) : set R)),
411+
apply finset.prod_dvd_of_coprime (H.set_pairwise (↑(multiset.to_finset p.roots) : set R)),
412412
intros a h,
413413
rw multiset.mem_to_finset at h,
414414
exact pow_root_multiplicity_dvd p a

0 commit comments

Comments
 (0)