Pre-sets #
A pre-set is inductively defined by its indexing type and its members, which are themselves pre-sets.
After defining pre-sets we define extensional equality over them, also inductively. We construct a
Setoid
instance from it, and in Mathlib.SetTheory.ZFC.Basic
we define ZFC sets as the quotient
of pre-sets by extensional equality.
Main definitions #
PSet
: Pre-set.PSet.Type
: Underlying type of a pre-set.PSet.Func
: Underlying family of pre-sets of a pre-set.PSet.Equiv
: Extensional equivalence of pre-sets. Defined inductively.PSet.omega
: The von Neumann ordinalω
as aPSet
.
The underlying pre-set family of a pre-set
Instances For
Two pre-sets are extensionally equivalent if every element of the first family is extensionally equivalent to some element of the second family and vice-versa.
Equations
Instances For
Equations
- PSet.setoid = { r := PSet.Equiv, iseqv := PSet.setoid.proof_1 }
A pre-set is a subset of another pre-set if every element of the first family is extensionally equivalent to some element of the second family.
Instances For
Equations
- PSet.instHasSubset = { Subset := PSet.Subset }
Equations
- PSet.instMembership = { mem := PSet.Mem }
Equations
- PSet.instWellFoundedRelation = { rel := fun (x1 x2 : PSet.{?u.5}) => x1 ∈ x2, wf := PSet.mem_wf }
A nonempty set is one that contains some element.
Instances For
Two pre-sets are equivalent iff they have the same members.
Equations
- PSet.instCoeSet = { coe := PSet.toSet }
The empty pre-set
Equations
Instances For
Equations
- PSet.instEmptyCollection = { emptyCollection := PSet.empty }
Equations
- PSet.instInhabited = { default := ∅ }
Insert an element into a pre-set
Instances For
Equations
- PSet.instInsert = { insert := PSet.insert }
Equations
- PSet.instSingleton = { singleton := fun (s : PSet.{?u.4}) => insert s ∅ }
Equations
- x.instInhabitedTypeInsert y = inferInstanceAs (Inhabited (Option y.Type))
The n-th von Neumann ordinal
Equations
- PSet.ofNat 0 = ∅
- PSet.ofNat n.succ = insert (PSet.ofNat n) (PSet.ofNat n)
Instances For
The von Neumann ordinal ω
Equations
- PSet.omega = PSet.mk (ULift.{?u.4, 0} ℕ) fun (n : ULift.{?u.4, 0} ℕ) => PSet.ofNat n.down
Instances For
The pre-set union operator
Equations
Instances For
The pre-set union operator
Equations
- PSet.«term⋃₀_» = Lean.ParserDescr.node `PSet.«term⋃₀_» 110 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "⋃₀ ") (Lean.ParserDescr.cat `term 110))
Instances For
Universe lift operation
Equations
- (PSet.mk α A).Lift = PSet.mk (ULift.{?u.125, ?u.126} α) fun (x : ULift.{?u.125, ?u.126} α) => match x with | { down := x } => (A x).Lift
Instances For
Embedding of one universe in another
Equations
- PSet.embed = PSet.mk (ULift.{?u.6, ?u.7 + 1} PSet.{?u.7}) fun (x : ULift.{?u.6, ?u.7 + 1} PSet.{?u.7}) => match x with | { down := x } => x.Lift