@@ -703,6 +703,9 @@ by rw [←compl_empty_iff, compl_compl]
703
703
lemma nonempty_compl {s : set α} : (-s : set α).nonempty ↔ s ≠ univ :=
704
704
ne_empty_iff_nonempty.symm.trans $ not_congr $ compl_empty_iff
705
705
706
+ lemma mem_compl_singleton_iff {a x : α} : x ∈ -({a} : set α) ↔ x ≠ a :=
707
+ not_iff_not_of_iff mem_singleton_iff
708
+
706
709
theorem union_eq_compl_compl_inter_compl (s t : set α) : s ∪ t = -(-s ∩ -t) :=
707
710
by simp [compl_inter, compl_compl]
708
711
@@ -735,9 +738,12 @@ forall_congr $ λ a, imp_not_comm
735
738
theorem subset_compl_iff_disjoint {s t : set α} : s ⊆ -t ↔ s ∩ t = ∅ :=
736
739
iff.trans (forall_congr $ λ a, and_imp.symm) subset_empty_iff
737
740
741
+ lemma subset_compl_singleton_iff {a : α} {s : set α} : s ⊆ -({a} : set α) ↔ a ∉ s :=
742
+ by { rw subset_compl_comm, simp }
743
+
738
744
theorem inter_subset (a b c : set α) : a ∩ b ⊆ c ↔ a ⊆ -b ∪ c :=
739
745
begin
740
- haveI := classical.prop_decidable ,
746
+ classical,
741
747
split,
742
748
{ intros h x xa, by_cases h' : x ∈ b, simp [h ⟨xa, h'⟩], simp [h'] },
743
749
intros h x, rintro ⟨xa, xb⟩, cases h xa, contradiction, assumption
@@ -1290,6 +1296,10 @@ theorem forall_range_iff {p : α → Prop} : (∀ a ∈ range f, p a) ↔ (∀ i
1290
1296
theorem exists_range_iff {p : α → Prop } : (∃ a ∈ range f, p a) ↔ (∃ i, p (f i)) :=
1291
1297
⟨assume ⟨a, ⟨i, eq⟩, h⟩, ⟨i, eq.symm ▸ h⟩, assume ⟨i, h⟩, ⟨f i, mem_range_self _, h⟩⟩
1292
1298
1299
+ lemma exists_range_iff' {p : α → Prop } :
1300
+ (∃ a, a ∈ range f ∧ p a) ↔ ∃ i, p (f i) :=
1301
+ by simpa only [exists_prop] using exists_range_iff
1302
+
1293
1303
theorem range_iff_surjective : range f = univ ↔ surjective f :=
1294
1304
eq_univ_iff_forall
1295
1305
@@ -1648,6 +1658,8 @@ end
1648
1658
1649
1659
end prod
1650
1660
1661
+ /-! ### Lemmas about set-indexed products of sets -/
1662
+
1651
1663
section pi
1652
1664
variables {α : Type *} {π : α → Type *}
1653
1665
@@ -1678,6 +1690,8 @@ end
1678
1690
1679
1691
end pi
1680
1692
1693
+ /-! ### Lemmas about `inclusion`, the injection of subtypes induced by `⊆` -/
1694
+
1681
1695
section inclusion
1682
1696
variable {α : Type *}
1683
1697
0 commit comments