fact stringlengths 6 3.84k | type stringclasses 11 values | library stringclasses 32 values | imports listlengths 1 14 | filename stringlengths 20 95 | symbolic_name stringlengths 1 90 | docstring stringlengths 7 20k ⌀ |
|---|---|---|---|---|---|---|
noncomputable range {α} [Small.{u} α] (f : α → ZFSet.{u}) : ZFSet.{u} :=
⟦⟨_, Quotient.out ∘ f ∘ (equivShrink α).symm⟩⟧
@[simp] | def | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | range | The range of a type-indexed family of sets. |
mem_range {α} [Small.{u} α] {f : α → ZFSet.{u}} {x : ZFSet.{u}} :
x ∈ range f ↔ x ∈ Set.range f :=
Quotient.inductionOn x fun y => by
constructor
· rintro ⟨z, hz⟩
exact ⟨(equivShrink α).symm z, Quotient.eq_mk_iff_out.2 hz.symm⟩
· rintro ⟨z, hz⟩
use equivShrink α z
simpa [hz] using PSet.Equiv.symm (Quotient.mk_out y)
@[simp] | theorem | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | mem_range | null |
toSet_range {α} [Small.{u} α] (f : α → ZFSet.{u}) :
(range f).toSet = Set.range f := by
ext
simp | theorem | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | toSet_range | null |
mem_range_self {α} [Small.{u} α] {f : α → ZFSet.{u}} (a : α) : f a ∈ range f := by simp | theorem | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | mem_range_self | null |
pair (x y : ZFSet.{u}) : ZFSet.{u} :=
{{x}, {x, y}}
@[simp] | def | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | pair | Kuratowski ordered pair |
toSet_pair (x y : ZFSet.{u}) : (pair x y).toSet = {{x}, {x, y}} := by simp [pair] | theorem | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | toSet_pair | null |
pairSep (p : ZFSet.{u} → ZFSet.{u} → Prop) (x y : ZFSet.{u}) : ZFSet.{u} :=
(powerset (powerset (x ∪ y))).sep fun z => ∃ a ∈ x, ∃ b ∈ y, z = pair a b ∧ p a b
@[simp] | def | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | pairSep | A subset of pairs `{(a, b) ∈ x × y | p a b}` |
mem_pairSep {p} {x y z : ZFSet.{u}} :
z ∈ pairSep p x y ↔ ∃ a ∈ x, ∃ b ∈ y, z = pair a b ∧ p a b := by
refine mem_sep.trans ⟨And.right, fun e => ⟨?_, e⟩⟩
grind [mem_pair, mem_powerset, mem_singleton, mem_union, pair, subset_def] | theorem | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | mem_pairSep | null |
pair_injective : Function.Injective2 pair := by
intro x x' y y' H
simp_rw [ZFSet.ext_iff, pair, mem_pair] at H
obtain rfl : x = x' := And.left <| by simpa [or_and_left] using (H {x}).1 (Or.inl rfl)
have he : y = x → y = y' := by
rintro rfl
simpa [eq_comm] using H {y, y'}
have hx := H {x, y}
simp_rw [pair_eq_singleton_iff, true_and, or_true, true_iff] at hx
refine ⟨rfl, hx.elim he fun hy ↦ Or.elim ?_ he id⟩
simpa using ZFSet.ext_iff.1 hy y
@[simp] | theorem | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | pair_injective | null |
pair_inj {x y x' y' : ZFSet} : pair x y = pair x' y' ↔ x = x' ∧ y = y' :=
pair_injective.eq_iff | theorem | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | pair_inj | null |
prod : ZFSet.{u} → ZFSet.{u} → ZFSet.{u} :=
pairSep fun _ _ => True
@[simp] | def | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | prod | The Cartesian product, `{(a, b) | a ∈ x, b ∈ y}` |
mem_prod {x y z : ZFSet.{u}} : z ∈ prod x y ↔ ∃ a ∈ x, ∃ b ∈ y, z = pair a b := by
simp [prod] | theorem | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | mem_prod | null |
pair_mem_prod {x y a b : ZFSet.{u}} : pair a b ∈ prod x y ↔ a ∈ x ∧ b ∈ y := by
simp | theorem | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | pair_mem_prod | null |
IsFunc (x y f : ZFSet.{u}) : Prop :=
f ⊆ prod x y ∧ ∀ z : ZFSet.{u}, z ∈ x → ∃! w, pair z w ∈ f | def | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | IsFunc | `isFunc x y f` is the assertion that `f` is a subset of `x × y` which relates to each element
of `x` a unique element of `y`, so that we can consider `f` as a ZFC function `x → y`. |
funs (x y : ZFSet.{u}) : ZFSet.{u} :=
ZFSet.sep (IsFunc x y) (powerset (prod x y))
@[simp] | def | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | funs | `funs x y` is `y ^ x`, the set of all set functions `x → y` |
mem_funs {x y f : ZFSet.{u}} : f ∈ funs x y ↔ IsFunc x y f := by simp [funs, IsFunc] | theorem | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | mem_funs | null |
map (f : ZFSet → ZFSet) [Definable₁ f] : ZFSet → ZFSet :=
image fun y => pair y (f y)
@[simp] | def | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | map | Graph of a function: `map f x` is the ZFC function which maps `a ∈ x` to `f a` |
mem_map {f : ZFSet → ZFSet} [Definable₁ f] {x y : ZFSet} :
y ∈ map f x ↔ ∃ z ∈ x, pair z (f z) = y :=
mem_image | theorem | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | mem_map | null |
map_unique {f : ZFSet.{u} → ZFSet.{u}} [Definable₁ f] {x z : ZFSet.{u}}
(zx : z ∈ x) : ∃! w, pair z w ∈ map f x :=
⟨f z, image.mk _ _ zx, fun y yx => by
let ⟨w, _, we⟩ := mem_image.1 yx
let ⟨wz, fy⟩ := pair_injective we
rw [← fy, wz]⟩
@[simp] | theorem | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | map_unique | null |
map_isFunc {f : ZFSet → ZFSet} [Definable₁ f] {x y : ZFSet} :
IsFunc x y (map f x) ↔ ∀ z ∈ x, f z ∈ y :=
⟨fun ⟨ss, h⟩ z zx =>
let ⟨_, t1, t2⟩ := h z zx
(t2 (f z) (image.mk _ _ zx)).symm ▸ (pair_mem_prod.1 (ss t1)).right,
fun h =>
⟨fun _ yx =>
let ⟨z, zx, ze⟩ := mem_image.1 yx
ze ▸ pair_mem_prod.2 ⟨zx, h z zx⟩,
fun _ => map_unique⟩⟩ | theorem | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | map_isFunc | null |
Hereditarily (p : ZFSet → Prop) (x : ZFSet) : Prop :=
p x ∧ ∀ y ∈ x, Hereditarily p y
termination_by x | def | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | Hereditarily | Given a predicate `p` on ZFC sets. `Hereditarily p x` means that `x` has property `p` and the
members of `x` are all `Hereditarily p`. |
hereditarily_iff : Hereditarily p x ↔ p x ∧ ∀ y ∈ x, Hereditarily p y := by
rw [← Hereditarily]
alias ⟨Hereditarily.def, _⟩ := hereditarily_iff | theorem | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | hereditarily_iff | null |
Hereditarily.self (h : x.Hereditarily p) : p x :=
h.def.1 | theorem | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | Hereditarily.self | null |
Hereditarily.mem (h : x.Hereditarily p) (hy : y ∈ x) : y.Hereditarily p :=
h.def.2 _ hy | theorem | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | Hereditarily.mem | null |
Hereditarily.empty : Hereditarily p x → p ∅ := by
apply @ZFSet.inductionOn _ x
intro y IH h
rcases ZFSet.eq_empty_or_nonempty y with (rfl | ⟨a, ha⟩)
· exact h.self
· exact IH a ha (h.mem ha) | theorem | SetTheory | [
"Mathlib.Data.Fin.VecNotation",
"Mathlib.Data.SetLike.Basic",
"Mathlib.Logic.Small.Basic",
"Mathlib.SetTheory.ZFC.PSet"
] | Mathlib/SetTheory/ZFC/Basic.lean | Hereditarily.empty | null |
@[pp_with_univ]
Class :=
Set ZFSet deriving HasSubset, EmptyCollection, Nonempty, Union, Inter, HasCompl, SDiff | def | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | Class | The collection of all classes.
We define `Class` as `Set ZFSet`, as this allows us to get many instances automatically. However, in
practice, we treat it as (the definitionally equal) `ZFSet → Prop`. This means, the preferred way to
state that `x : ZFSet` belongs to `A : Class` is to write `A x`. |
protected sep (p : ZFSet → Prop) (A : Class) : Class :=
{y | A y ∧ p y}
@[ext] | def | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | sep | `{x ∈ A | p x}` is the class of elements in `A` satisfying `p` |
ext {x y : Class.{u}} : (∀ z : ZFSet.{u}, x z ↔ y z) → x = y :=
Set.ext | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | ext | null |
@[coe]
ofSet (x : ZFSet.{u}) : Class.{u} :=
{ y | y ∈ x } | def | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | ofSet | Coerce a ZFC set into a class |
univ : Class :=
Set.univ | def | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | univ | The universal class |
ToSet (B : Class.{u}) (A : Class.{u}) : Prop :=
∃ x : ZFSet, ↑x = A ∧ B x | def | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | ToSet | Assert that `A` is a ZFC set satisfying `B` |
protected Mem (B A : Class.{u}) : Prop :=
ToSet.{u} B A | def | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | Mem | `A ∈ B` if `A` is a ZFC set which satisfies `B` |
mem_def (A B : Class.{u}) : A ∈ B ↔ ∃ x : ZFSet, ↑x = A ∧ B x :=
Iff.rfl
@[simp] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | mem_def | null |
notMem_empty (x : Class.{u}) : x ∉ (∅ : Class.{u}) := fun ⟨_, _, h⟩ => h
@[deprecated (since := "2025-05-23")] alias not_mem_empty := notMem_empty
@[simp] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | notMem_empty | null |
not_empty_hom (x : ZFSet.{u}) : ¬(∅ : Class.{u}) x :=
id
@[simp] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | not_empty_hom | null |
mem_univ {A : Class.{u}} : A ∈ univ.{u} ↔ ∃ x : ZFSet.{u}, ↑x = A :=
exists_congr fun _ => iff_of_eq (and_true _)
@[simp] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | mem_univ | null |
mem_univ_hom (x : ZFSet.{u}) : univ.{u} x :=
trivial | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | mem_univ_hom | null |
eq_univ_iff_forall {A : Class.{u}} : A = univ ↔ ∀ x : ZFSet, A x :=
Set.eq_univ_iff_forall | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | eq_univ_iff_forall | null |
eq_univ_of_forall {A : Class.{u}} : (∀ x : ZFSet, A x) → A = univ :=
Set.eq_univ_of_forall | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | eq_univ_of_forall | null |
mem_wf : @WellFounded Class.{u} (· ∈ ·) :=
⟨by
have H : ∀ x : ZFSet.{u}, @Acc Class.{u} (· ∈ ·) ↑x := by
refine fun a => ZFSet.inductionOn a fun x IH => ⟨_, ?_⟩
rintro A ⟨z, rfl, hz⟩
exact IH z hz
refine fun A => ⟨A, ?_⟩
rintro B ⟨x, rfl, _⟩
exact H x⟩ | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | mem_wf | null |
mem_asymm {x y : Class} : x ∈ y → y ∉ x :=
asymm_of (· ∈ ·) | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | mem_asymm | null |
mem_irrefl (x : Class) : x ∉ x :=
irrefl_of (· ∈ ·) x | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | mem_irrefl | null |
univ_notMem_univ : univ ∉ univ :=
mem_irrefl _
@[deprecated (since := "2025-05-23")] alias univ_not_mem_univ := univ_notMem_univ | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | univ_notMem_univ | **There is no universal set.**
This is stated as `univ ∉ univ`, meaning that `univ` (the class of all sets) is proper (does not
belong to the class of all sets). |
congToClass (x : Set Class.{u}) : Class.{u} :=
{ y | ↑y ∈ x }
@[simp] | def | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | congToClass | Convert a conglomerate (a collection of classes) into a class |
congToClass_empty : congToClass ∅ = ∅ := by
rfl | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | congToClass_empty | null |
classToCong (x : Class.{u}) : Set Class.{u} :=
{ y | y ∈ x }
@[simp] | def | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | classToCong | Convert a class into a conglomerate (a collection of classes) |
classToCong_empty : classToCong ∅ = ∅ := by
simp [classToCong] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | classToCong_empty | null |
powerset (x : Class) : Class :=
congToClass (Set.powerset x) | def | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | powerset | The power class of a class is the class of all subclasses that are ZFC sets |
sUnion (x : Class) : Class :=
⋃₀ classToCong x
@[inherit_doc]
scoped prefix:110 "⋃₀ " => Class.sUnion | def | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | sUnion | The union of a class is the class of all members of ZFC sets in the class. Uses `⋃₀` notation,
scoped under the `Class` namespace. |
sInter (x : Class) : Class :=
⋂₀ classToCong x
@[inherit_doc]
scoped prefix:110 "⋂₀ " => Class.sInter | def | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | sInter | The intersection of a class is the class of all members of ZFC sets in the class .
Uses `⋂₀` notation, scoped under the `Class` namespace. |
ofSet.inj {x y : ZFSet.{u}} (h : (x : Class.{u}) = y) : x = y :=
ZFSet.ext fun z => by
change (x : Class.{u}) z ↔ (y : Class.{u}) z
rw [h]
@[simp] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | ofSet.inj | null |
toSet_of_ZFSet (A : Class.{u}) (x : ZFSet.{u}) : ToSet A x ↔ A x :=
⟨fun ⟨y, yx, py⟩ => by rwa [ofSet.inj yx] at py, fun px => ⟨x, rfl, px⟩⟩
@[simp, norm_cast] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | toSet_of_ZFSet | null |
coe_mem {x : ZFSet.{u}} {A : Class.{u}} : ↑x ∈ A ↔ A x :=
toSet_of_ZFSet _ _
@[simp] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | coe_mem | null |
coe_apply {x y : ZFSet.{u}} : (y : Class.{u}) x ↔ x ∈ y :=
Iff.rfl
@[simp, norm_cast] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | coe_apply | null |
coe_subset (x y : ZFSet.{u}) : (x : Class.{u}) ⊆ y ↔ x ⊆ y :=
Iff.rfl
@[simp, norm_cast] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | coe_subset | null |
coe_sep (p : Class.{u}) (x : ZFSet.{u}) :
(ZFSet.sep p x : Class) = { y ∈ x | p y } :=
ext fun _ => ZFSet.mem_sep
@[simp, norm_cast] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | coe_sep | null |
coe_empty : ↑(∅ : ZFSet.{u}) = (∅ : Class.{u}) :=
ext fun y => iff_false _ ▸ ZFSet.notMem_empty y
@[simp, norm_cast] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | coe_empty | null |
coe_insert (x y : ZFSet.{u}) : ↑(insert x y) = @insert ZFSet.{u} Class.{u} _ x y :=
ext fun _ => ZFSet.mem_insert_iff
@[simp, norm_cast] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | coe_insert | null |
coe_union (x y : ZFSet.{u}) : ↑(x ∪ y) = (x : Class.{u}) ∪ y :=
ext fun _ => ZFSet.mem_union
@[simp, norm_cast] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | coe_union | null |
coe_inter (x y : ZFSet.{u}) : ↑(x ∩ y) = (x : Class.{u}) ∩ y :=
ext fun _ => ZFSet.mem_inter
@[simp, norm_cast] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | coe_inter | null |
coe_diff (x y : ZFSet.{u}) : ↑(x \ y) = (x : Class.{u}) \ y :=
ext fun _ => ZFSet.mem_diff
@[simp, norm_cast] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | coe_diff | null |
coe_powerset (x : ZFSet.{u}) : ↑x.powerset = powerset.{u} x :=
ext fun _ => ZFSet.mem_powerset
@[simp] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | coe_powerset | null |
powerset_apply {A : Class.{u}} {x : ZFSet.{u}} : powerset A x ↔ ↑x ⊆ A :=
Iff.rfl
@[simp] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | powerset_apply | null |
sUnion_apply {x : Class} {y : ZFSet} : (⋃₀ x) y ↔ ∃ z : ZFSet, x z ∧ y ∈ z := by
constructor
· rintro ⟨-, ⟨z, rfl, hxz⟩, hyz⟩
exact ⟨z, hxz, hyz⟩
· exact fun ⟨z, hxz, hyz⟩ => ⟨_, coe_mem.2 hxz, hyz⟩
open scoped ZFSet in
@[simp, norm_cast] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | sUnion_apply | null |
coe_sUnion (x : ZFSet.{u}) : ↑(⋃₀ x : ZFSet) = ⋃₀ (x : Class.{u}) :=
ext fun y =>
ZFSet.mem_sUnion.trans (sUnion_apply.trans <| by rfl).symm
@[simp] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | coe_sUnion | null |
mem_sUnion {x y : Class.{u}} : y ∈ ⋃₀ x ↔ ∃ z, z ∈ x ∧ y ∈ z := by
constructor
· rintro ⟨w, rfl, z, hzx, hwz⟩
exact ⟨z, hzx, coe_mem.2 hwz⟩
· rintro ⟨w, hwx, z, rfl, hwz⟩
exact ⟨z, rfl, w, hwx, hwz⟩ | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | mem_sUnion | null |
sInter_apply {x : Class.{u}} {y : ZFSet.{u}} : (⋂₀ x) y ↔ ∀ z : ZFSet.{u}, x z → y ∈ z := by
refine ⟨fun hxy z hxz => hxy _ ⟨z, rfl, hxz⟩, ?_⟩
rintro H - ⟨z, rfl, hxz⟩
exact H _ hxz
open scoped ZFSet in
@[simp, norm_cast] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | sInter_apply | null |
coe_sInter {x : ZFSet.{u}} (h : x.Nonempty) : ↑(⋂₀ x : ZFSet) = ⋂₀ (x : Class.{u}) :=
Set.ext fun _ => (ZFSet.mem_sInter h).trans sInter_apply.symm | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | coe_sInter | null |
mem_of_mem_sInter {x y z : Class} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z := by
obtain ⟨w, rfl, hw⟩ := hy
exact coe_mem.2 (hw z hz) | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | mem_of_mem_sInter | null |
mem_sInter {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z, z ∈ x → y ∈ z := by
refine ⟨fun hy z => mem_of_mem_sInter hy, fun H => ?_⟩
simp_rw [mem_def, sInter_apply]
obtain ⟨z, hz⟩ := h
obtain ⟨y, rfl, _⟩ := H z (coe_mem.2 hz)
refine ⟨y, rfl, fun w hxw => ?_⟩
simpa only [coe_mem, coe_apply] using H w (coe_mem.2 hxw)
@[simp] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | mem_sInter | null |
sUnion_empty : ⋃₀ (∅ : Class.{u}) = (∅ : Class.{u}) := by
ext
simp
@[simp] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | sUnion_empty | null |
sInter_empty : ⋂₀ (∅ : Class.{u}) = univ := by
rw [sInter, classToCong_empty, Set.sInter_empty, univ] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | sInter_empty | null |
eq_univ_of_powerset_subset {A : Class} (hA : powerset A ⊆ A) : A = univ :=
eq_univ_of_forall
(by
by_contra! hnA
exact
WellFounded.min_mem ZFSet.mem_wf _ hnA
(hA fun x hx =>
Classical.not_not.1 fun hB =>
WellFounded.not_lt_min ZFSet.mem_wf _ hnA hB <| coe_apply.1 hx)) | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | eq_univ_of_powerset_subset | An induction principle for sets. If every subset of a class is a member, then the class is
universal. |
iota (A : Class) : Class :=
⋃₀ ({ x | ∀ y, A y ↔ y = x } : Class) | def | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | iota | The definite description operator, which is `{x}` if `{y | A y} = {x}` and `∅` otherwise. |
iota_val (A : Class) (x : ZFSet) (H : ∀ y, A y ↔ y = x) : iota A = ↑x :=
ext fun y =>
⟨fun ⟨_, ⟨x', rfl, h⟩, yx'⟩ => by rwa [← (H x').1 <| (h x').2 rfl], fun yx =>
⟨_, ⟨x, rfl, H⟩, yx⟩⟩ | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | iota_val | null |
iota_ex (A) : iota.{u} A ∈ univ.{u} :=
mem_univ.2 <|
Or.elim (Classical.em <| ∃ x, ∀ y, A y ↔ y = x) (fun ⟨x, h⟩ => ⟨x, Eq.symm <| iota_val A x h⟩)
fun hn =>
⟨∅, ext fun _ => coe_empty.symm ▸ ⟨False.rec, fun ⟨_, ⟨x, rfl, H⟩, _⟩ => hn ⟨x, H⟩⟩⟩ | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | iota_ex | Unlike the other set constructors, the `iota` definite descriptor
is a set for any set input, but not constructively so, so there is no
associated `Class → Set` function. |
fval (F A : Class.{u}) : Class.{u} :=
iota fun y => ToSet (fun x => F (ZFSet.pair x y)) A
@[inherit_doc]
infixl:100 " ′ " => fval | def | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | fval | Function value |
fval_ex (F A : Class.{u}) : F ′ A ∈ univ.{u} :=
iota_ex _ | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | fval_ex | null |
@[simp]
map_fval {f : ZFSet.{u} → ZFSet.{u}} [Definable₁ f] {x y : ZFSet.{u}}
(h : y ∈ x) : (ZFSet.map f x ′ y : Class.{u}) = f y :=
Class.iota_val _ _ fun z => by
rw [Class.toSet_of_ZFSet, Class.coe_apply, mem_map]
exact
⟨fun ⟨w, _, pr⟩ => by
let ⟨wy, fw⟩ := ZFSet.pair_injective pr
rw [← fw, wy], fun e => by
subst e
exact ⟨_, h, rfl⟩⟩
variable (x : ZFSet.{u}) | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | map_fval | null |
noncomputable choice : ZFSet :=
@map (fun y => Classical.epsilon fun z => z ∈ y) (Classical.allZFSetDefinable _) x | def | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | choice | A choice function on the class of nonempty ZFC sets. |
choice_mem_aux (h : ∅ ∉ x) (y : ZFSet.{u}) (yx : y ∈ x) :
(Classical.epsilon fun z : ZFSet.{u} => z ∈ y) ∈ y :=
(@Classical.epsilon_spec _ fun z : ZFSet.{u} => z ∈ y) <|
by_contradiction fun n => h <| by rwa [← (eq_empty y).2 fun z zx => n ⟨z, zx⟩] | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | choice_mem_aux | null |
choice_isFunc (h : ∅ ∉ x) : IsFunc x (⋃₀ x) (choice x) :=
(@map_isFunc _ (Classical.allZFSetDefinable _) _ _).2 fun y yx =>
mem_sUnion.2 ⟨y, yx, choice_mem_aux x h y yx⟩ | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | choice_isFunc | null |
choice_mem (h : ∅ ∉ x) (y : ZFSet.{u}) (yx : y ∈ x) :
(choice x ′ y : Class.{u}) ∈ (y : Class.{u}) := by
delta choice
rw [@map_fval _ (Classical.allZFSetDefinable _) x y yx, Class.coe_mem, Class.coe_apply]
exact choice_mem_aux x h y yx | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | choice_mem | null |
private toSet_equiv_aux {s : Set ZFSet.{u}} (hs : Small.{u} s) :
(mk <| PSet.mk (Shrink s) fun x ↦ ((equivShrink s).symm x).1.out).toSet = s := by
ext x
rw [mem_toSet, ← mk_out x, mk_mem_iff, mk_out]
refine ⟨?_, fun xs ↦ ⟨equivShrink s (Subtype.mk x xs), ?_⟩⟩
· rintro ⟨b, h2⟩
rw [← ZFSet.eq, ZFSet.mk_out] at h2
simp [h2]
· simp [PSet.Equiv.refl] | lemma | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | toSet_equiv_aux | null |
@[simps apply_coe]
noncomputable toSet_equiv : ZFSet.{u} ≃ {s : Set ZFSet.{u} // Small.{u, u+1} s} where
toFun x := ⟨x.toSet, x.small_toSet⟩
invFun := fun ⟨s, _⟩ ↦ mk <| PSet.mk (Shrink s) fun x ↦ ((equivShrink.{u, u + 1} s).symm x).1.out
left_inv := Function.rightInverse_of_injective_of_leftInverse (by intro _ _; simp)
fun s ↦ Subtype.coe_injective <| toSet_equiv_aux s.2
right_inv s := Subtype.coe_injective <| toSet_equiv_aux s.2 | def | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | toSet_equiv | `ZFSet.toSet` as an equivalence. |
isOrdinal_notMem_univ : IsOrdinal ∉ Class.univ.{u} := by
rintro ⟨x, hx, -⟩
suffices IsOrdinal x by
apply Class.mem_irrefl x
rwa [Class.coe_mem, hx]
refine ⟨fun y hy z hz ↦ ?_, fun hyz hzw hwx ↦ ?_⟩ <;> rw [← Class.coe_apply, hx] at *
exacts [hy.mem hz, hwx.mem_trans hyz hzw]
@[deprecated (since := "2025-05-23")] alias isOrdinal_not_mem_univ := isOrdinal_notMem_univ | theorem | SetTheory | [
"Mathlib.SetTheory.ZFC.Ordinal"
] | Mathlib/SetTheory/ZFC/Class.lean | isOrdinal_notMem_univ | The **Burali-Forti paradox**: ordinals form a proper class. |
IsTransitive (x : ZFSet) : Prop :=
∀ y ∈ x, y ⊆ x
@[simp] | def | SetTheory | [
"Mathlib.Order.GameAdd",
"Mathlib.Order.RelIso.Set",
"Mathlib.SetTheory.ZFC.Basic"
] | Mathlib/SetTheory/ZFC/Ordinal.lean | IsTransitive | A transitive set is one where every element is a subset.
This is equivalent to being an infinite-open interval in the transitive closure of membership. |
isTransitive_empty : IsTransitive ∅ := fun y hy => (notMem_empty y hy).elim | theorem | SetTheory | [
"Mathlib.Order.GameAdd",
"Mathlib.Order.RelIso.Set",
"Mathlib.SetTheory.ZFC.Basic"
] | Mathlib/SetTheory/ZFC/Ordinal.lean | isTransitive_empty | null |
IsTransitive.subset_of_mem (h : x.IsTransitive) : y ∈ x → y ⊆ x := h y | theorem | SetTheory | [
"Mathlib.Order.GameAdd",
"Mathlib.Order.RelIso.Set",
"Mathlib.SetTheory.ZFC.Basic"
] | Mathlib/SetTheory/ZFC/Ordinal.lean | IsTransitive.subset_of_mem | null |
isTransitive_iff_mem_trans : z.IsTransitive ↔ ∀ {x y : ZFSet}, x ∈ y → y ∈ z → x ∈ z :=
⟨fun h _ _ hx hy => h.subset_of_mem hy hx, fun H _ hx _ hy => H hy hx⟩
alias ⟨IsTransitive.mem_trans, _⟩ := isTransitive_iff_mem_trans | theorem | SetTheory | [
"Mathlib.Order.GameAdd",
"Mathlib.Order.RelIso.Set",
"Mathlib.SetTheory.ZFC.Basic"
] | Mathlib/SetTheory/ZFC/Ordinal.lean | isTransitive_iff_mem_trans | null |
protected IsTransitive.inter (hx : x.IsTransitive) (hy : y.IsTransitive) :
(x ∩ y).IsTransitive := fun z hz w hw => by
rw [mem_inter] at hz ⊢
exact ⟨hx.mem_trans hw hz.1, hy.mem_trans hw hz.2⟩ | theorem | SetTheory | [
"Mathlib.Order.GameAdd",
"Mathlib.Order.RelIso.Set",
"Mathlib.SetTheory.ZFC.Basic"
] | Mathlib/SetTheory/ZFC/Ordinal.lean | IsTransitive.inter | null |
protected IsTransitive.sUnion (h : x.IsTransitive) :
(⋃₀ x : ZFSet).IsTransitive := fun y hy z hz => by
rcases mem_sUnion.1 hy with ⟨w, hw, hw'⟩
exact mem_sUnion_of_mem hz (h.mem_trans hw' hw) | theorem | SetTheory | [
"Mathlib.Order.GameAdd",
"Mathlib.Order.RelIso.Set",
"Mathlib.SetTheory.ZFC.Basic"
] | Mathlib/SetTheory/ZFC/Ordinal.lean | IsTransitive.sUnion | The union of a transitive set is transitive. |
IsTransitive.sUnion' (H : ∀ y ∈ x, IsTransitive y) :
(⋃₀ x : ZFSet).IsTransitive := fun y hy z hz => by
rcases mem_sUnion.1 hy with ⟨w, hw, hw'⟩
exact mem_sUnion_of_mem ((H w hw).mem_trans hz hw') hw | theorem | SetTheory | [
"Mathlib.Order.GameAdd",
"Mathlib.Order.RelIso.Set",
"Mathlib.SetTheory.ZFC.Basic"
] | Mathlib/SetTheory/ZFC/Ordinal.lean | IsTransitive.sUnion' | The union of transitive sets is transitive. |
protected IsTransitive.union (hx : x.IsTransitive) (hy : y.IsTransitive) :
(x ∪ y).IsTransitive := by
rw [← sUnion_pair]
apply IsTransitive.sUnion'
intro
rw [mem_pair]
rintro (rfl | rfl)
assumption' | theorem | SetTheory | [
"Mathlib.Order.GameAdd",
"Mathlib.Order.RelIso.Set",
"Mathlib.SetTheory.ZFC.Basic"
] | Mathlib/SetTheory/ZFC/Ordinal.lean | IsTransitive.union | null |
protected IsTransitive.powerset (h : x.IsTransitive) : (powerset x).IsTransitive :=
fun y hy z hz => by
rw [mem_powerset] at hy ⊢
exact h.subset_of_mem (hy hz) | theorem | SetTheory | [
"Mathlib.Order.GameAdd",
"Mathlib.Order.RelIso.Set",
"Mathlib.SetTheory.ZFC.Basic"
] | Mathlib/SetTheory/ZFC/Ordinal.lean | IsTransitive.powerset | null |
isTransitive_iff_sUnion_subset : x.IsTransitive ↔ (⋃₀ x : ZFSet) ⊆ x := by
constructor <;>
intro h y hy
· obtain ⟨z, hz, hz'⟩ := mem_sUnion.1 hy
exact h.mem_trans hz' hz
· exact fun z hz ↦ h <| mem_sUnion_of_mem hz hy
alias ⟨IsTransitive.sUnion_subset, _⟩ := isTransitive_iff_sUnion_subset | theorem | SetTheory | [
"Mathlib.Order.GameAdd",
"Mathlib.Order.RelIso.Set",
"Mathlib.SetTheory.ZFC.Basic"
] | Mathlib/SetTheory/ZFC/Ordinal.lean | isTransitive_iff_sUnion_subset | null |
isTransitive_iff_subset_powerset : x.IsTransitive ↔ x ⊆ powerset x :=
⟨fun h _ hy => mem_powerset.2 <| h.subset_of_mem hy, fun H _ hy _ hz => mem_powerset.1 (H hy) hz⟩
alias ⟨IsTransitive.subset_powerset, _⟩ := isTransitive_iff_subset_powerset
/-! ### Ordinals -/ | theorem | SetTheory | [
"Mathlib.Order.GameAdd",
"Mathlib.Order.RelIso.Set",
"Mathlib.SetTheory.ZFC.Basic"
] | Mathlib/SetTheory/ZFC/Ordinal.lean | isTransitive_iff_subset_powerset | null |
IsOrdinal (x : ZFSet) : Prop where
/-- An ordinal is a transitive set. -/
isTransitive : x.IsTransitive
/-- The membership operation within an ordinal is transitive. -/
mem_trans' {y z w : ZFSet} : y ∈ z → z ∈ w → w ∈ x → y ∈ w | structure | SetTheory | [
"Mathlib.Order.GameAdd",
"Mathlib.Order.RelIso.Set",
"Mathlib.SetTheory.ZFC.Basic"
] | Mathlib/SetTheory/ZFC/Ordinal.lean | IsOrdinal | A set `x` is a von Neumann ordinal when it's a transitive set, that's transitive under `∈`. We
prove that this further implies that `x` is well-ordered under `∈` in `isOrdinal_iff_isWellOrder`.
The transitivity condition `a ∈ b → b ∈ c → a ∈ c` can be written without assuming `a ∈ x` and
`b ∈ x`. The lemma `isOrdinal_iff_isTrans` shows this condition is equivalent to the usual one. |
subset_of_mem (h : x.IsOrdinal) : y ∈ x → y ⊆ x :=
h.isTransitive.subset_of_mem | theorem | SetTheory | [
"Mathlib.Order.GameAdd",
"Mathlib.Order.RelIso.Set",
"Mathlib.SetTheory.ZFC.Basic"
] | Mathlib/SetTheory/ZFC/Ordinal.lean | subset_of_mem | null |
mem_trans (h : z.IsOrdinal) : x ∈ y → y ∈ z → x ∈ z :=
h.isTransitive.mem_trans | theorem | SetTheory | [
"Mathlib.Order.GameAdd",
"Mathlib.Order.RelIso.Set",
"Mathlib.SetTheory.ZFC.Basic"
] | Mathlib/SetTheory/ZFC/Ordinal.lean | mem_trans | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.