Interface:Basic operations of Zermelo–Fraenkel set theory

This page covers some of the simplest operations of set theory including the empty set, singletons, unordered pairs, power set, and unions.

Variables, objects (classes), and membership
We build on propositional logic and first-order logic (including equality):

 param (CLASSICAL Interface:Classical_propositional_calculus ) param (FIRSTORDER Interface:First-order_logic_with_quantifiability (CLASSICAL) ) 

First-order logic provides us with two kinds:  is a variable, which represents a set and can be quantified over, and   is an expression which represents a set. For example, a variable might be,  , or  , but an object could be the singleton  , the unordered pair  , the ordered pair  , etc. To some extent the concepts of variable and object correspond to set and class in some theories (like metamath's set.mm), but one key difference is that we have no proper classes thanks to the axiom of quantifiability.

 var (variable x y z w) var (object A B C A0 A1 B0 B1) var (formula φ ψ φx φy antecedent) 

We can test whether one set is an element of another, and define an abbreviation for the negated version.  term (formula (∈ object object)) def ((∉ A B) (¬ (A ∈ B))) 

Here are two ways of combining membership with a substitution:  stmt (MembershipForAll ((x A) (x B))  ((A ∈ B) ↔ (∀ x (((value x) = A) → ((value x) ∈ B))))) stmt (MembershipThereExists ((x A) (x B))  ((A ∈ B) ↔ (∃ x (((value x) = A) ∧ ((value x) ∈ B))))) 

Empty set
We assert the existence of the empty set, a set with no elements.  term (object (∅)) stmt (EmptySet  (A ∉ (∅))) 

Singleton
Given a set, we can form a set  which has only it as an element.  term (object (singleton object)) stmt (Singleton  ((A ∈ (singleton B)) ↔ (A = B))) 

A set is an element of its singleton:.  stmt (SingletonMembership  (A ∈ (singleton A))) 

Unordered pair
Given two sets, we can form a unordered pair  which has only those sets as elements.  term (object (unorderedPair object object)) stmt (UnorderedPair  ((B ∈ (unorderedPair A0 A1)) ↔ ((B = A0) ∨ (B = A1)))) 

An unordered pair contains each of its members:.  stmt (UnorderedPairLeftMembership  (A ∈ (unorderedPair A B))) stmt (UnorderedPairRightMembership  (B ∈ (unorderedPair A B))) </jh>

Unordered pairs are unordered:.  stmt (UnorderedPairCommutativity  ((unorderedPair A B) = (unorderedPair B A))) </jh>

Unordered pair equality can imply equality of members:, and likewise if the unordered pairs are commuted.

 stmt (UnorderedPairFirstMembersEqual  (((unorderedPair A C) = (unorderedPair B C)) → (A = B))) stmt (UnorderedPairSecondMembersEqual  (((unorderedPair C A) = (unorderedPair C B)) → (A = B))) </jh>

A singleton is equal to an unordered pair with the same element listed twice.  stmt (SingletonUnorderedPair  ((singleton A) = (unorderedPair A A))) </jh>

Subset
The subset relationship is equivalent to various statements involving membership, unions, intersections, and set differences.  term (formula (⊆ object object)) stmt (Subset ((x A) (x B))  ((A ⊆ B) ↔ (∀ x (((value x) ∈ A) → ((value x) ∈ B))))) stmt (SubsetMembership  ((A ⊆ B) → ((C ∈ A) → (C ∈ B))))

stmt (SingletonSubset  ((A ∈ B) ↔ ((singleton A) ⊆ B))) stmt (UnorderedPairSubset   (((A ∈ C) ∧ (B ∈ C)) ↔ ((unorderedPair A B) ⊆ C))) </jh>

Partial order
The subset relationship has the three properties of a partial order. That is, it is reflexive, antisymmetric, and transitive.

 stmt (SubsetReflexivity  (A ⊆ A)) stmt (SubsetAntisymmetry  (((A ⊆ B) ∧ (B ⊆ A)) → (A = B))) stmt (SubsetTransitivity  (((A ⊆ B) ∧ (B ⊆ C)) → (A ⊆ C))) </jh>

Union
The union of a set has as its elements everything which is an element of some set in the given set.  term (object (⋃ object)) stmt (Union ((x A) (x B)) ((B ∈ (⋃ A)) ↔ (∃ x ((B ∈ (value x)) ∧ ((value x) ∈ A))))) </jh>

The union of two sets is just a special case of the union of a set.  def ((∪ A B) (⋃ (unorderedPair A B))) stmt (BinaryUnion  ((A ∈ (B ∪ C)) ↔ ((A ∈ B) ∨ (A ∈ C))))

stmt (MembershipUnionRightIntroduction  ((A ∈ B) → (A ∈ (B ∪ C)))) stmt (MembershipUnionLeftIntroduction  ((A ∈ C) → (A ∈ (B ∪ C))))

stmt (UnionIdempotence  ((A ∪ A) = A)) stmt (UnionSingleton  ((⋃ (singleton A)) = A)) </jh>

An unordered pair is the union of singletons for each of its elements.  stmt (UnorderedPairSingleton   ((unorderedPair A B) = ((singleton A) ∪ (singleton B)))) </jh>

Subsets and unions
 stmt (SubsetUnion  (((A ⊆ B) ∧ (B ∈ C)) → (A ⊆ (⋃ C)))) stmt (MembershipSubsetUnion  ((A ∈ B) → (A ⊆ (⋃ B))))

stmt (SubsetUnionRightIntroduction   ((A ⊆ B) → (A ⊆ (B ∪ C)))) </jh>

Power set
The power set of a set has as its elements all of the subsets of the given set.  term (object (power object)) stmt (PowerSet  ((B ∈ (power A)) ↔ (B ⊆ A))) </jh>

Separation
We define, the set of all elements in   which also satisfy. Although we write  informally, for JHilbert it needs to be.  term (object (separate variable object formula)) stmt (Separation ((x A))  ((C ∈ (separate x A φ)) ↔ ((C ∈ A) ∧ (subst C x φ)))) stmt (FormulaBound ((z A) (z B)) ((φ → ((value z) ∈ A))) ((B ∈ (separate z A φ)) ↔ (subst B z φ))) </jh>

The term  is like a quantifier in the sense that it binds , and we can change the variable in a similar manner.  stmt (ChangeVariableSeparation ((y φx) (x φy) (x y A))  ((((value x) = (value y)) → (φx ↔ φy)))  ((separate x A φx) = (separate y A φy))) </jh>

Builders
Equals can be substituted for equals, in the context of set operations.

 stmt (MembershipBuilderLL  ((B0 = B1) → ((A ∈ B0) ↔ (A ∈ B1)))) stmt (MembershipBuilderRR  ((A0 = A1) → ((A0 ∈ B) ↔ (A1 ∈ B)))) stmt (buildMembershipLL ((B0 = B1)) ((A ∈ B0) ↔ (A ∈ B1))) stmt (buildMembershipRR ((A0 = A1)) ((A0 ∈ B) ↔ (A1 ∈ B))) stmt (buildMembershipLLInConsequent  ((antecedent → (B0 = B1)))  (antecedent → ((A ∈ B0) ↔ (A ∈ B1)))) stmt (buildMembershipRRInConsequent  ((antecedent → (A0 = A1)))  (antecedent → ((A0 ∈ B) ↔ (A1 ∈ B))))

stmt (SingletonBuilder  ((A = B) → ((singleton A) = (singleton B))))

stmt (UnorderedPairBuilder  (((A0 = B0) ∧ (A1 = B1)) → ((unorderedPair A0 A1) = (unorderedPair B0 B1))))

stmt (SeparationBuilder ((x A) (x B))  (((A = B) ∧ (∀ x (φ ↔ ψ))) → ((separate x A φ) = (separate x B ψ)))) stmt (buildSeparation ((x A)) ((φ ↔ ψ)) ((separate x A φ) = (separate x A ψ)))

stmt (UnionBuilder  ((A = B) → ((⋃ A) = (⋃ B)))) stmt (buildUnion ((A = B)) ((⋃ A) = (⋃ B))) </jh>

Extensionality
Sets with the same elements are equal.  stmt (Extensionality ((A z) (B z)) ((∀ z (((value z) ∈ A) ↔ ((value z) ∈ B))) → (A = B))) stmt (applyExtensionality ((x A) (x B)) ((((value x) ∈ A) ↔ ((value x) ∈ B))) (A = B)) </jh>

Here's a variant with explicit freeness hypotheses rather than distinct variable constraints.  stmt (ExtensionalityNotFree ((y A) (y B) (y x)) ((x is-not-free-in ((value y) ∈ A)) (x is-not-free-in ((value y) ∈ B)) ) ((A = B) ↔ (∀ x (((value x) ∈ A) ↔ ((value x) ∈ B))))) </jh>