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

Commit ac6fc38

Browse files
committed
chore(*): move/add lemmas about disjoint (#5277)
* `set.disjoint_compl_left` and `set.disjoint_compl_right`: - generalize to any `boolean_algebra`, - move to `order/boolean_algebra`, - drop `set.` prefix, - make the argument implicit to follow the style of other lemmas in `order/boolean_algebra` * add `set.disjoint_empty` and `set.empty_disjoint` * add `disjoint_top` and `top_disjoint`, use in `set.disjoint_univ`and `set.univ_disjoint`.
1 parent ef377a9 commit ac6fc38

File tree

9 files changed

+27
-15
lines changed

9 files changed

+27
-15
lines changed

src/data/set/lattice.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,15 +1116,15 @@ disjoint_sup_right
11161116
theorem disjoint_diff {a b : set α} : disjoint a (b \ a) :=
11171117
disjoint_iff.2 (inter_diff_self _ _)
11181118

1119-
theorem disjoint_compl_left (s : set α) : disjoint sᶜ s := assume a ⟨h₁, h₂⟩, h₁ h₂
1119+
@[simp] theorem disjoint_empty (s : set α) : disjoint s ∅ := disjoint_bot_right
11201120

1121-
theorem disjoint_compl_right (s : set α) : disjoint s sᶜ := assume a ⟨h₁, h₂⟩, h₂ h₁
1121+
@[simp] theorem empty_disjoint (s : set α) : disjoint ∅ s := disjoint_bot_left
11221122

11231123
@[simp] lemma univ_disjoint {s : set α}: disjoint univ s ↔ s = ∅ :=
1124-
by simp [set.disjoint_iff_inter_eq_empty]
1124+
top_disjoint
11251125

11261126
@[simp] lemma disjoint_univ {s : set α} : disjoint s univ ↔ s = ∅ :=
1127-
by simp [set.disjoint_iff_inter_eq_empty]
1127+
disjoint_top
11281128

11291129
@[simp] theorem disjoint_singleton_left {a : α} {s : set α} : disjoint {a} s ↔ a ∉ s :=
11301130
by simp [set.disjoint_iff, subset_def]; exact iff.rfl

src/linear_algebra/basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2517,8 +2517,8 @@ lemma disjoint_std_basis_std_basis (I J : set ι) (h : disjoint I J) :
25172517
disjoint (⨆i∈I, range (std_basis R φ i)) (⨆i∈J, range (std_basis R φ i)) :=
25182518
begin
25192519
refine disjoint.mono
2520-
(supr_range_std_basis_le_infi_ker_proj _ _ _ _ $ set.disjoint_compl_right I)
2521-
(supr_range_std_basis_le_infi_ker_proj _ _ _ _ $ set.disjoint_compl_right J) _,
2520+
(supr_range_std_basis_le_infi_ker_proj _ _ _ _ $ disjoint_compl_right)
2521+
(supr_range_std_basis_le_infi_ker_proj _ _ _ _ $ disjoint_compl_right) _,
25222522
simp only [disjoint, submodule.le_def', mem_infi, mem_inf, mem_ker, mem_bot, proj_apply,
25232523
funext_iff],
25242524
rintros b ⟨hI, hJ⟩ i,

src/linear_algebra/finsupp.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ lemma disjoint_lsingle_lsingle (s t : set α) (hs : disjoint s t) :
131131
disjoint (⨆a∈s, (lsingle a : M →ₗ[R] (α →₀ M)).range) (⨆a∈t, (lsingle a).range) :=
132132
begin
133133
refine disjoint.mono
134-
(lsingle_range_le_ker_lapply _ _ $ disjoint_compl_right s)
135-
(lsingle_range_le_ker_lapply _ _ $ disjoint_compl_right t)
134+
(lsingle_range_le_ker_lapply _ _ $ disjoint_compl_right)
135+
(lsingle_range_le_ker_lapply _ _ $ disjoint_compl_right)
136136
(le_trans (le_infi $ assume i, _) infi_ker_lapply_le_bot),
137137
classical,
138138
by_cases his : i ∈ s,

src/linear_algebra/matrix.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ begin
621621
simp only [comap_infi, (ker_comp _ _).symm, proj_diagonal, ker_smul'],
622622
have : univ ⊆ {i : m | w i = 0} ∪ {i : m | w i = 0}ᶜ, { rw set.union_compl_self },
623623
exact (supr_range_std_basis_eq_infi_ker_proj K (λi:m, K)
624-
(disjoint_compl_right {i | w i = 0}) this (finite.of_fintype _)).symm
624+
disjoint_compl_right this (finite.of_fintype _)).symm
625625
end
626626

627627
lemma range_diagonal [decidable_eq m] (w : m → K) :
@@ -637,7 +637,7 @@ lemma rank_diagonal [decidable_eq m] [decidable_eq K] (w : m → K) :
637637
rank (diagonal w).to_lin' = fintype.card { i // w i ≠ 0 } :=
638638
begin
639639
have hu : univ ⊆ {i : m | w i = 0}ᶜ ∪ {i : m | w i = 0}, { rw set.compl_union_self },
640-
have hd : disjoint {i : m | w i ≠ 0} {i : m | w i = 0} := (disjoint_compl_right {i | w i = 0}).symm,
640+
have hd : disjoint {i : m | w i ≠ 0} {i : m | w i = 0} := disjoint_compl_left,
641641
have h₁ := supr_range_std_basis_eq_infi_ker_proj K (λi:m, K) hd hu (finite.of_fintype _),
642642
have h₂ := @infi_ker_proj_equiv K _ _ (λi:m, K) _ _ _ _ (by simp; apply_instance) hd hu,
643643
rw [rank, range_diagonal, h₁, ←@dim_fun' K],

src/measure_theory/measure_space.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ end
824824

825825
@[simp] lemma restrict_add_restrict_compl {s : set α} (hs : is_measurable s) :
826826
μ.restrict s + μ.restrict sᶜ = μ :=
827-
by rw [← restrict_union (disjoint_compl_right _) hs hs.compl, union_compl_self, restrict_univ]
827+
by rw [← restrict_union disjoint_compl_right hs hs.compl, union_compl_self, restrict_univ]
828828

829829
@[simp] lemma restrict_compl_add_restrict {s : set α} (hs : is_measurable s) :
830830
μ.restrict sᶜ + μ.restrict s = μ :=

src/measure_theory/set_integral.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ lemma integral_univ : ∫ x in univ, f x ∂μ = ∫ x, f x ∂μ := by rw [meas
331331

332332
lemma integral_add_compl (hs : is_measurable s) (hfi : integrable f μ) :
333333
∫ x in s, f x ∂μ + ∫ x in sᶜ, f x ∂μ = ∫ x, f x ∂μ :=
334-
by rw [← integral_union (disjoint_compl_right s) hs hs.compl hfi.integrable_on hfi.integrable_on,
334+
by rw [← integral_union disjoint_compl_right hs hs.compl hfi.integrable_on hfi.integrable_on,
335335
union_compl_self, integral_univ]
336336

337337
/-- For a measurable function `f` and a measurable set `s`, the integral of `indicator s f`

src/order/boolean_algebra.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ is_compl.of_eq inf_compl_eq_bot sup_compl_eq_top
4949
theorem is_compl.compl_eq (h : is_compl x y) : xᶜ = y :=
5050
(h.right_unique is_compl_compl).symm
5151

52+
theorem disjoint_compl_right : disjoint x xᶜ := is_compl_compl.disjoint
53+
theorem disjoint_compl_left : disjoint xᶜ x := disjoint_compl_right.symm
54+
5255
theorem sdiff_eq : x \ y = x ⊓ yᶜ :=
5356
boolean_algebra.sdiff_eq x y
5457

src/order/bounded_lattice.lean

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -954,8 +954,8 @@ by rw [disjoint, disjoint, inf_comm]
954954
@[symm] theorem disjoint.symm ⦃a b : α⦄ : disjoint a b → disjoint b a :=
955955
disjoint.comm.1
956956

957-
@[simp] theorem disjoint_bot_left {a : α} : disjoint ⊥ a := disjoint_iff.2 bot_inf_eq
958-
@[simp] theorem disjoint_bot_right {a : α} : disjoint a ⊥ := disjoint_iff.2 inf_bot_eq
957+
@[simp] theorem disjoint_bot_left {a : α} : disjoint ⊥ a := inf_le_left
958+
@[simp] theorem disjoint_bot_right {a : α} : disjoint a ⊥ := inf_le_right
959959

960960
theorem disjoint.mono {a b c d : α} (h₁ : a ≤ b) (h₂ : c ≤ d) :
961961
disjoint b d → disjoint a c := le_trans (inf_le_inf h₁ h₂)
@@ -974,6 +974,15 @@ by { intro h, rw [←h, disjoint_self] at hab, exact ha hab }
974974

975975
end semilattice_inf_bot
976976

977+
section bounded_lattice
978+
979+
variables [bounded_lattice α] {a : α}
980+
981+
@[simp] theorem disjoint_top : disjoint a ⊤ ↔ a = ⊥ := by simp [disjoint_iff]
982+
@[simp] theorem top_disjoint : disjoint ⊤ a ↔ a = ⊥ := by simp [disjoint_iff]
983+
984+
end bounded_lattice
985+
977986
section bounded_distrib_lattice
978987

979988
variables [bounded_distrib_lattice α] {a b c : α}

src/ring_theory/localization.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ begin
11731173
ext x,
11741174
split; simp only [local_ring.mem_maximal_ideal, mem_nonunits_iff]; intro hx,
11751175
{ exact λ h, (localization_map.is_prime_of_is_prime_disjoint f P hP
1176-
(set.disjoint_compl_left P.carrier)).1 (ideal.eq_top_of_is_unit_mem _ hx h) },
1176+
disjoint_compl_left).1 (ideal.eq_top_of_is_unit_mem _ hx h) },
11771177
{ obtain ⟨⟨a, b⟩, hab⟩ := localization_map.surj f x,
11781178
contrapose! hx,
11791179
rw is_unit_iff_exists_inv,

0 commit comments

Comments
 (0)