Skip to content

Commit

Permalink
feat(set_theory/zfc): Ø ⊆ x (#15223)
Browse files Browse the repository at this point in the history
  • Loading branch information
vihdzp committed Jul 19, 2022
1 parent e1c8bde commit c70a787
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/set_theory/zfc.lean
Expand Up @@ -219,6 +219,8 @@ instance : is_empty (type (∅)) := pempty.is_empty

@[simp] theorem mem_empty (x : pSet.{u}) : x ∉ (∅ : pSet.{u}) := is_empty.exists_iff.1

@[simp] theorem empty_subset (x : pSet.{u}) : (∅ : pSet) ⊆ x := λ x, x.elim

/-- Insert an element into a pre-set -/
protected def insert (x y : pSet) : pSet := ⟨option y.type, λ o, option.rec x y.func o⟩

Expand Down Expand Up @@ -429,7 +431,7 @@ instance has_subset : has_subset Set :=

lemma subset_def {x y : Set.{u}} : x ⊆ y ↔ ∀ ⦃z⦄, z ∈ x → z ∈ y := iff.rfl

@[simp] theorem subset_iff : Π (x y : pSet), mk x ⊆ mk y ↔ x ⊆ y
@[simp] theorem subset_iff : Π {x y : pSet}, mk x ⊆ mk y ↔ x ⊆ y
| ⟨α, A⟩ ⟨β, B⟩ := ⟨λ h a, @h ⟦A a⟧ (mem.mk A a),
λ h z, quotient.induction_on z (λ z ⟨a, za⟩, let ⟨b, ab⟩ := h a in ⟨b, za.trans ab⟩)⟩

Expand All @@ -447,6 +449,9 @@ instance : inhabited Set := ⟨∅⟩
@[simp] theorem mem_empty (x) : x ∉ (∅ : Set.{u}) :=
quotient.induction_on x pSet.mem_empty

@[simp] theorem empty_subset (x : Set.{u}) : (∅ : Set) ⊆ x :=
quotient.induction_on x $ λ y, subset_iff.2 $ pSet.empty_subset y

theorem eq_empty (x : Set.{u}) : x = ∅ ↔ ∀ y : Set.{u}, y ∉ x :=
⟨λ h y, (h.symm ▸ mem_empty y),
λ h, ext (λ y, ⟨λ yx, absurd yx (h y), λ y0, absurd y0 (mem_empty _)⟩)⟩
Expand Down

0 comments on commit c70a787

Please sign in to comment.