Skip to content

Commit 79c1c03

Browse files
committed
feat: s \ {a ∈ s | p a} = {a ∈ s | ¬ p a} (#24888)
I wrote this for #22974, but it isn't needed there in the end.
1 parent 624a353 commit 79c1c03

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Mathlib/Data/Set/Basic.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,6 +1238,9 @@ theorem diff_diff_cancel_left {s t : Set α} (h : s ⊆ t) : t \ (t \ s) = s :=
12381238
theorem union_eq_diff_union_diff_union_inter (s t : Set α) : s ∪ t = s \ t ∪ t \ s ∪ s ∩ t :=
12391239
sup_eq_sdiff_sup_sdiff_sup_inf
12401240

1241+
@[simp] lemma sdiff_sep_self (s : Set α) (p : α → Prop) : s \ {a ∈ s | p a} = {a ∈ s | ¬ p a} :=
1242+
diff_self_inter
1243+
12411244
/-! ### Powerset -/
12421245

12431246
theorem mem_powerset {x s : Set α} (h : x ⊆ s) : x ∈ 𝒫 s := @h

0 commit comments

Comments
 (0)