The axioms of Zermelo-Frankel theory with atoms.
Instances
Definition 3.1.1 (objects can be elements of sets)
Equations
- Chapter3.SetTheory.objects_mem_sets = { mem := fun (X : Chapter3.Set) (x : Chapter3.Object) => Chapter3.SetTheory.mem x X }
Axiom 3.1 (Sets are objects)
Equations
- Chapter3.SetTheory.sets_are_objects = { coe := fun (X : Chapter3.Set) => Chapter3.SetTheory.set_to_object X }
Axiom 3.1 (Sets are objects)
Axiom 3.1 (Sets are objects)
Equations
- Chapter3.SetTheory.Set.instEmpty = { emptyCollection := Chapter3.SetTheory.emptyset }
Equations
- Chapter3.SetTheory.Set.instSingleton = { singleton := Chapter3.SetTheory.singleton }
Equations
Equations
- Chapter3.SetTheory.Set.instInsert = { insert := fun (x : Chapter3.Object) (X : Chapter3.Set) => {x} ∪ X }
Equations
Instances For
Equations
Instances For
Equations
Instances For
Exercise 3.1.2
Exercise 3.1.2
Exercise 3.1.2
Definition 3.1.14.
Equations
- Chapter3.SetTheory.Set.instSubset = { Subset := fun (X Y : Chapter3.Set) => ∀ x ∈ X, x ∈ Y }
Definition 3.1.14.
Note that the strict subset operation in Mathlib is denoted ⊂ rather than ⊊.
Equations
- Chapter3.SetTheory.Set.instSSubset = { SSubset := fun (X Y : Chapter3.Set) => X ⊆ Y ∧ X ≠ Y }
Examples 3.1.16
This defines the subtype A.toSubtype for any A:Set.
Note that A.toSubtype gives you a type, similar to how Object or Set are types.
A value x' of type A.toSubtype combines some x : Object with a proof that hx : x ∈ A.
To produce an element x' of this subtype, use ⟨ x, hx ⟩, where x: Object and hx: x ∈ A.
The object x associated to a subtype element x' is recovered as x'.val, and
the property hx that x belongs to A is recovered as x'.property.
Instances For
Equations
- Chapter3.instCoeSortSetType = { coe := fun (A : Chapter3.Set) => A.toSubtype }
If one has a proof hx of x ∈ A, then A.subtype_mk hx will then make the element of A
(viewed as a subtype) corresponding to x.
Equations
- A.subtype_mk hx = ⟨x, hx⟩
Instances For
Equations
- Chapter3.SetTheory.Set.instIntersection = { inter := fun (X Y : Chapter3.Set) => X.specify fun (x : X.toSubtype) => ↑x ∈ Y }
Equations
- Chapter3.SetTheory.Set.instSDiff = { sdiff := fun (X Y : Chapter3.Set) => X.specify fun (x : X.toSubtype) => ↑x ∉ Y }
Not from textbook: sets form a distributive lattice.
Equations
- One or more equations did not get rendered due to their size.
Sets have a minimal element.
Equations
- Chapter3.SetTheory.Set.instOrderBot = { bot := ∅, bot_le := ⋯ }
Equations
Instances For
Axiom 3.8 (Axiom of infinity)
Instances For
Equations
Equations
- Chapter3.SetTheory.Set.instNatCast = { natCast := fun (n : ℕ) => Chapter3.SetTheory.Set.nat_equiv n }
Equations
- Chapter3.SetTheory.Set.toNat = { coe := fun (n : Chapter3.Nat.toSubtype) => Chapter3.SetTheory.Set.nat_equiv.symm n }
Equations
- Chapter3.SetTheory.Object.instNatCast = { natCast := fun (n : ℕ) => ↑↑n }
Equations
- Chapter3.SetTheory.Object.instOfNat = { ofNat := ↑↑n }
Exercise 3.1.10.
You may find Function.onFun_apply and the fin_cases tactic useful.
Exercise 3.1.11.
The challenge is to prove this without using Set.specify, Set.specification_axiom,
Set.specification_axiom', or anything built from them (like differences and intersections).
Equations
- Chapter3.SetTheory.Set.inst_coe_set = { coe := fun (X : Chapter3.Set) => {x : Chapter3.Object | x ∈ X} }