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
protected isTrans (h : x.IsOrdinal) : IsTrans _ (Subrel (· ∈ ·) (· ∈ x)) := ⟨fun _ _ c hab hbc => h.mem_trans' hab hbc c.2⟩
theorem
SetTheory
[ "Mathlib.Order.GameAdd", "Mathlib.Order.RelIso.Set", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Ordinal.lean
isTrans
null
_root_.ZFSet.isOrdinal_iff_isTrans : x.IsOrdinal ↔ x.IsTransitive ∧ IsTrans _ (Subrel (· ∈ ·) (· ∈ x)) where mp h := ⟨h.isTransitive, h.isTrans⟩ mpr := by rintro ⟨h₁, ⟨h₂⟩⟩ refine ⟨h₁, fun {y z w} hyz hzw hwx ↦ ?_⟩ have hzx := h₁.mem_trans hzw hwx exact h₂ ⟨y, h₁.mem_trans hyz hzx⟩ ⟨z, hzx⟩ ⟨w, hwx⟩ hyz hzw
theorem
SetTheory
[ "Mathlib.Order.GameAdd", "Mathlib.Order.RelIso.Set", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Ordinal.lean
_root_.ZFSet.isOrdinal_iff_isTrans
The simplified form of transitivity used within `IsOrdinal` yields an equivalent definition to the standard one.
protected mem (hx : x.IsOrdinal) (hy : y ∈ x) : y.IsOrdinal := have := hx.isTrans let f : _ ↪r Subrel (· ∈ ·) (· ∈ x) := Subrel.inclusionEmbedding (· ∈ ·) (hx.subset_of_mem hy) isOrdinal_iff_isTrans.2 ⟨fun _ hz _ ha ↦ hx.mem_trans' ha hz hy, f.isTrans⟩
theorem
SetTheory
[ "Mathlib.Order.GameAdd", "Mathlib.Order.RelIso.Set", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Ordinal.lean
mem
null
_root_.ZFSet.isOrdinal_iff_forall_mem_isTransitive : x.IsOrdinal ↔ x.IsTransitive ∧ ∀ y ∈ x, y.IsTransitive where mp h := ⟨h.isTransitive, fun _ hy ↦ (h.mem hy).isTransitive⟩ mpr := fun ⟨h₁, h₂⟩ ↦ ⟨h₁, fun hyz hzw hwx ↦ (h₂ _ hwx).mem_trans hyz hzw⟩
theorem
SetTheory
[ "Mathlib.Order.GameAdd", "Mathlib.Order.RelIso.Set", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Ordinal.lean
_root_.ZFSet.isOrdinal_iff_forall_mem_isTransitive
An ordinal is a transitive set of transitive sets.
_root_.ZFSet.isOrdinal_iff_forall_mem_isOrdinal : x.IsOrdinal ↔ x.IsTransitive ∧ ∀ y ∈ x, y.IsOrdinal where mp h := ⟨h.isTransitive, fun _ ↦ h.mem⟩ mpr := fun ⟨h₁, h₂⟩ ↦ isOrdinal_iff_forall_mem_isTransitive.2 ⟨h₁, fun y hy ↦ (h₂ y hy).isTransitive⟩
theorem
SetTheory
[ "Mathlib.Order.GameAdd", "Mathlib.Order.RelIso.Set", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Ordinal.lean
_root_.ZFSet.isOrdinal_iff_forall_mem_isOrdinal
An ordinal is a transitive set of ordinals.
subset_iff_eq_or_mem (hx : x.IsOrdinal) (hy : y.IsOrdinal) : x ⊆ y ↔ x = y ∨ x ∈ y := by constructor · revert hx hy apply Sym2.GameAdd.induction mem_wf _ x y intro x y IH hx hy hxy by_cases hyx : y ⊆ x · exact Or.inl (subset_antisymm hxy hyx) · obtain ⟨m, hm, hm'⟩ := mem_wf.has_min (y.toSet \ x.toSet) (Set.diff_nonempty.2 hyx) have hmy : m ∈ y := show m ∈ y.toSet from Set.mem_of_mem_diff hm have hmx : m ⊆ x := by intro z hzm by_contra hzx exact hm' _ ⟨hy.mem_trans hzm hmy, hzx⟩ hzm obtain rfl | H := IH m x (Sym2.GameAdd.fst_snd hmy) (hy.mem hmy) hx hmx · exact Or.inr hmy · cases Set.notMem_of_mem_diff hm H · rintro (rfl | h) · rfl · exact hy.subset_of_mem h alias ⟨eq_or_mem_of_subset, _⟩ := subset_iff_eq_or_mem
theorem
SetTheory
[ "Mathlib.Order.GameAdd", "Mathlib.Order.RelIso.Set", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Ordinal.lean
subset_iff_eq_or_mem
null
mem_of_subset_of_mem (h : x.IsOrdinal) (hz : z.IsOrdinal) (hx : x ⊆ y) (hy : y ∈ z) : x ∈ z := by obtain rfl | hx := h.eq_or_mem_of_subset (hz.mem hy) hx · exact hy · exact hz.mem_trans hx hy
theorem
SetTheory
[ "Mathlib.Order.GameAdd", "Mathlib.Order.RelIso.Set", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Ordinal.lean
mem_of_subset_of_mem
null
notMem_iff_subset (hx : x.IsOrdinal) (hy : y.IsOrdinal) : x ∉ y ↔ y ⊆ x := by refine ⟨?_, fun hxy hyx ↦ mem_irrefl _ (hxy hyx)⟩ revert hx hy apply Sym2.GameAdd.induction mem_wf _ x y intro x y IH hx hy hyx z hzy by_contra hzx exact hyx (mem_of_subset_of_mem hx hy (IH z x (Sym2.GameAdd.fst_snd hzy) (hy.mem hzy) hx hzx) hzy) @[deprecated (since := "2025-05-23")] alias not_mem_iff_subset := notMem_iff_subset
theorem
SetTheory
[ "Mathlib.Order.GameAdd", "Mathlib.Order.RelIso.Set", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Ordinal.lean
notMem_iff_subset
null
not_subset_iff_mem (hx : x.IsOrdinal) (hy : y.IsOrdinal) : ¬ x ⊆ y ↔ y ∈ x := by rw [not_iff_comm, notMem_iff_subset hy hx]
theorem
SetTheory
[ "Mathlib.Order.GameAdd", "Mathlib.Order.RelIso.Set", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Ordinal.lean
not_subset_iff_mem
null
mem_or_subset (hx : x.IsOrdinal) (hy : y.IsOrdinal) : x ∈ y ∨ y ⊆ x := by rw [or_iff_not_imp_left, notMem_iff_subset hx hy] exact id
theorem
SetTheory
[ "Mathlib.Order.GameAdd", "Mathlib.Order.RelIso.Set", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Ordinal.lean
mem_or_subset
null
subset_total (hx : x.IsOrdinal) (hy : y.IsOrdinal) : x ⊆ y ∨ y ⊆ x := by obtain h | h := mem_or_subset hx hy · exact Or.inl (hy.subset_of_mem h) · exact Or.inr h
theorem
SetTheory
[ "Mathlib.Order.GameAdd", "Mathlib.Order.RelIso.Set", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Ordinal.lean
subset_total
null
mem_trichotomous (hx : x.IsOrdinal) (hy : y.IsOrdinal) : x ∈ y ∨ x = y ∨ y ∈ x := by rw [eq_comm, ← subset_iff_eq_or_mem hy hx] exact mem_or_subset hx hy
theorem
SetTheory
[ "Mathlib.Order.GameAdd", "Mathlib.Order.RelIso.Set", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Ordinal.lean
mem_trichotomous
null
protected isTrichotomous (h : x.IsOrdinal) : IsTrichotomous _ (Subrel (· ∈ ·) (· ∈ x)) := ⟨fun ⟨a, ha⟩ ⟨b, hb⟩ ↦ by simpa using mem_trichotomous (h.mem ha) (h.mem hb)⟩
theorem
SetTheory
[ "Mathlib.Order.GameAdd", "Mathlib.Order.RelIso.Set", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Ordinal.lean
isTrichotomous
null
_root_.ZFSet.isOrdinal_iff_isTrichotomous : x.IsOrdinal ↔ x.IsTransitive ∧ IsTrichotomous _ (Subrel (· ∈ ·) (· ∈ x)) where mp h := ⟨h.isTransitive, h.isTrichotomous⟩ mpr := by rintro ⟨h₁, h₂⟩ rw [isOrdinal_iff_isTrans] refine ⟨h₁, ⟨@fun y z w hyz hzw ↦ ?_⟩⟩ obtain hyw | rfl | hwy := trichotomous_of (Subrel (· ∈ ·) (· ∈ x)) y w · exact hyw · cases asymm hyz hzw · cases mem_wf.asymmetric₃ _ _ _ hyz hzw hwy
theorem
SetTheory
[ "Mathlib.Order.GameAdd", "Mathlib.Order.RelIso.Set", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Ordinal.lean
_root_.ZFSet.isOrdinal_iff_isTrichotomous
An ordinal is a transitive set, trichotomous under membership.
protected isWellOrder (h : x.IsOrdinal) : IsWellOrder _ (Subrel (· ∈ ·) (· ∈ x)) where wf := (Subrel.relEmbedding _ _).wellFounded mem_wf trans := h.isTrans.1 trichotomous := h.isTrichotomous.1
theorem
SetTheory
[ "Mathlib.Order.GameAdd", "Mathlib.Order.RelIso.Set", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Ordinal.lean
isWellOrder
null
_root_.ZFSet.isOrdinal_iff_isWellOrder : x.IsOrdinal ↔ x.IsTransitive ∧ IsWellOrder _ (Subrel (· ∈ ·) (· ∈ x)) := by use fun h ↦ ⟨h.isTransitive, h.isWellOrder⟩ rintro ⟨h₁, h₂⟩ refine isOrdinal_iff_isTrans.2 ⟨h₁, ?_⟩ infer_instance
theorem
SetTheory
[ "Mathlib.Order.GameAdd", "Mathlib.Order.RelIso.Set", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Ordinal.lean
_root_.ZFSet.isOrdinal_iff_isWellOrder
An ordinal is a transitive set, well-ordered under membership.
@[simp] isOrdinal_empty : IsOrdinal ∅ := ⟨isTransitive_empty, fun _ _ H ↦ (notMem_empty _ H).elim⟩
theorem
SetTheory
[ "Mathlib.Order.GameAdd", "Mathlib.Order.RelIso.Set", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Ordinal.lean
isOrdinal_empty
null
@[pp_with_univ] PSet : Type (u + 1) | mk (α : Type u) (A : α → PSet) : PSet
inductive
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
PSet
The type of pre-sets in universe `u`. A pre-set is a family of pre-sets indexed by a type in `Type u`. The ZFC universe is defined as a quotient of this to ensure extensionality.
Func : ∀ x : PSet, x.Type → PSet | ⟨_, A⟩ => A @[simp]
def
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Func
The underlying type of a pre-set -/ def «Type» : PSet → Type u | ⟨α, _⟩ => α /-- The underlying pre-set family of a pre-set
mk_type (α A) : «Type» ⟨α, A⟩ = α := rfl @[simp]
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
mk_type
null
mk_func (α A) : Func ⟨α, A⟩ = A := rfl @[simp]
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
mk_func
null
eta : ∀ x : PSet, mk x.Type x.Func = x | ⟨_, _⟩ => rfl
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
eta
null
Equiv : PSet → PSet → Prop | ⟨_, A⟩, ⟨_, B⟩ => (∀ a, ∃ b, Equiv (A a) (B b)) ∧ (∀ b, ∃ a, Equiv (A a) (B b))
def
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Equiv
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.
equiv_iff : ∀ {x y : PSet}, Equiv x y ↔ (∀ i, ∃ j, Equiv (x.Func i) (y.Func j)) ∧ ∀ j, ∃ i, Equiv (x.Func i) (y.Func j) | ⟨_, _⟩, ⟨_, _⟩ => Iff.rfl
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
equiv_iff
null
Equiv.exists_left {x y : PSet} (h : Equiv x y) : ∀ i, ∃ j, Equiv (x.Func i) (y.Func j) := (equiv_iff.1 h).1
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Equiv.exists_left
null
Equiv.exists_right {x y : PSet} (h : Equiv x y) : ∀ j, ∃ i, Equiv (x.Func i) (y.Func j) := (equiv_iff.1 h).2 @[refl]
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Equiv.exists_right
null
protected Equiv.refl : ∀ x, Equiv x x | ⟨_, _⟩ => ⟨fun a => ⟨a, Equiv.refl _⟩, fun a => ⟨a, Equiv.refl _⟩⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Equiv.refl
null
protected Equiv.rfl {x} : Equiv x x := Equiv.refl x
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Equiv.rfl
null
protected Equiv.euc : ∀ {x y z}, Equiv x y → Equiv z y → Equiv x z | ⟨_, _⟩, ⟨_, _⟩, ⟨_, _⟩, ⟨αβ, βα⟩, ⟨γβ, βγ⟩ => ⟨ fun a => let ⟨b, ab⟩ := αβ a let ⟨c, bc⟩ := βγ b ⟨c, Equiv.euc ab bc⟩, fun c => let ⟨b, cb⟩ := γβ c let ⟨a, ba⟩ := βα b ⟨a, Equiv.euc ba cb⟩ ⟩ @[symm]
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Equiv.euc
null
protected Equiv.symm {x y} : Equiv x y → Equiv y x := (Equiv.refl y).euc
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Equiv.symm
null
protected Equiv.comm {x y} : Equiv x y ↔ Equiv y x := ⟨Equiv.symm, Equiv.symm⟩ @[trans]
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Equiv.comm
null
protected Equiv.trans {x y z} (h1 : Equiv x y) (h2 : Equiv y z) : Equiv x z := h1.euc h2.symm
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Equiv.trans
null
protected equiv_of_isEmpty (x y : PSet) [IsEmpty x.Type] [IsEmpty y.Type] : Equiv x y := equiv_iff.2 <| by simp
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
equiv_of_isEmpty
null
setoid : Setoid PSet := ⟨PSet.Equiv, Equiv.refl, Equiv.symm, Equiv.trans⟩
instance
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
setoid
null
protected Subset (x y : PSet) : Prop := ∀ a, ∃ b, Equiv (x.Func a) (y.Func b)
def
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Subset
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.
Equiv.ext : ∀ x y : PSet, Equiv x y ↔ x ⊆ y ∧ y ⊆ x | ⟨_, _⟩, ⟨_, _⟩ => ⟨fun ⟨αβ, βα⟩ => ⟨αβ, fun b => let ⟨a, h⟩ := βα b ⟨a, Equiv.symm h⟩⟩, fun ⟨αβ, βα⟩ => ⟨αβ, fun b => let ⟨a, h⟩ := βα b ⟨a, Equiv.symm h⟩⟩⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Equiv.ext
null
Subset.congr_left : ∀ {x y z : PSet}, Equiv x y → (x ⊆ z ↔ y ⊆ z) | ⟨_, _⟩, ⟨_, _⟩, ⟨_, _⟩, ⟨αβ, βα⟩ => ⟨fun αγ b => let ⟨a, ba⟩ := βα b let ⟨c, ac⟩ := αγ a ⟨c, (Equiv.symm ba).trans ac⟩, fun βγ a => let ⟨b, ab⟩ := αβ a let ⟨c, bc⟩ := βγ b ⟨c, Equiv.trans ab bc⟩⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Subset.congr_left
null
Subset.congr_right : ∀ {x y z : PSet}, Equiv x y → (z ⊆ x ↔ z ⊆ y) | ⟨_, _⟩, ⟨_, _⟩, ⟨_, _⟩, ⟨αβ, βα⟩ => ⟨fun γα c => let ⟨a, ca⟩ := γα c let ⟨b, ab⟩ := αβ a ⟨b, ca.trans ab⟩, fun γβ c => let ⟨b, cb⟩ := γβ c let ⟨a, ab⟩ := βα b ⟨a, cb.trans (Equiv.symm ab)⟩⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Subset.congr_right
null
@[simp] le_def (x y : PSet) : x ≤ y ↔ x ⊆ y := Iff.rfl @[simp]
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
le_def
null
lt_def (x y : PSet) : x < y ↔ x ⊂ y := Iff.rfl
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
lt_def
null
protected Mem (y x : PSet.{u}) : Prop := ∃ b, Equiv x (y.Func b)
def
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Mem
`x ∈ y` as pre-sets if `x` is extensionally equivalent to a member of the family `y`.
Mem.mk {α : Type u} (A : α → PSet) (a : α) : A a ∈ mk α A := ⟨a, Equiv.refl (A a)⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Mem.mk
null
func_mem (x : PSet) (i : x.Type) : x.Func i ∈ x := by cases x apply Mem.mk
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
func_mem
null
Mem.ext : ∀ {x y : PSet.{u}}, (∀ w : PSet.{u}, w ∈ x ↔ w ∈ y) → Equiv x y | ⟨_, A⟩, ⟨_, B⟩, h => ⟨fun a => (h (A a)).1 (Mem.mk A a), fun b => let ⟨a, ha⟩ := (h (B b)).2 (Mem.mk B b) ⟨a, ha.symm⟩⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Mem.ext
null
Mem.congr_right : ∀ {x y : PSet.{u}}, Equiv x y → ∀ {w : PSet.{u}}, w ∈ x ↔ w ∈ y | ⟨_, _⟩, ⟨_, _⟩, ⟨αβ, βα⟩, _ => ⟨fun ⟨a, ha⟩ => let ⟨b, hb⟩ := αβ a ⟨b, ha.trans hb⟩, fun ⟨b, hb⟩ => let ⟨a, ha⟩ := βα b ⟨a, hb.euc ha⟩⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Mem.congr_right
null
equiv_iff_mem {x y : PSet.{u}} : Equiv x y ↔ ∀ {w : PSet.{u}}, w ∈ x ↔ w ∈ y := ⟨Mem.congr_right, match x, y with | ⟨_, A⟩, ⟨_, B⟩ => fun h => ⟨fun a => h.1 (Mem.mk A a), fun b => let ⟨a, h⟩ := h.2 (Mem.mk B b) ⟨a, h.symm⟩⟩⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
equiv_iff_mem
null
Mem.congr_left : ∀ {x y : PSet.{u}}, Equiv x y → ∀ {w : PSet.{u}}, x ∈ w ↔ y ∈ w | _, _, h, ⟨_, _⟩ => ⟨fun ⟨a, ha⟩ => ⟨a, h.symm.trans ha⟩, fun ⟨a, ha⟩ => ⟨a, h.trans ha⟩⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Mem.congr_left
null
mem_of_subset {x y z : PSet} : x ⊆ y → z ∈ x → z ∈ y | h₁, ⟨a, h₂⟩ => (h₁ a).elim fun b h₃ => ⟨b, h₂.trans h₃⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
mem_of_subset
null
subset_iff {x y : PSet} : x ⊆ y ↔ ∀ ⦃z⦄, z ∈ x → z ∈ y := ⟨fun h _ => mem_of_subset h, fun h a => h (Mem.mk _ a)⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
subset_iff
null
private mem_wf_aux : ∀ {x y : PSet.{u}}, Equiv x y → Acc (· ∈ ·) y | ⟨α, A⟩, ⟨β, B⟩, H => ⟨_, by rintro ⟨γ, C⟩ ⟨b, hc⟩ obtain ⟨a, ha⟩ := H.exists_right b have H := ha.trans hc.symm rw [mk_func] at H exact mem_wf_aux H⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
mem_wf_aux
null
mem_wf : @WellFounded PSet (· ∈ ·) := ⟨fun x => mem_wf_aux <| Equiv.refl x⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
mem_wf
null
mem_asymm {x y : PSet} : x ∈ y → y ∉ x := asymm_of (· ∈ ·)
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
mem_asymm
null
mem_irrefl (x : PSet) : x ∉ x := irrefl_of (· ∈ ·) x
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
mem_irrefl
null
not_subset_of_mem {x y : PSet} (h : x ∈ y) : ¬ y ⊆ x := fun h' ↦ mem_irrefl _ <| mem_of_subset h' h
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
not_subset_of_mem
null
notMem_of_subset {x y : PSet} (h : x ⊆ y) : y ∉ x := imp_not_comm.2 not_subset_of_mem h @[deprecated (since := "2025-05-23")] alias not_mem_of_subset := notMem_of_subset
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
notMem_of_subset
null
toSet (u : PSet.{u}) : Set PSet.{u} := { x | x ∈ u } @[simp]
def
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
toSet
Convert a pre-set to a `Set` of pre-sets.
mem_toSet (a u : PSet.{u}) : a ∈ u.toSet ↔ a ∈ u := Iff.rfl
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
mem_toSet
null
protected Nonempty (u : PSet) : Prop := u.toSet.Nonempty
def
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Nonempty
A nonempty set is one that contains some element.
nonempty_def (u : PSet) : u.Nonempty ↔ ∃ x, x ∈ u := Iff.rfl
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
nonempty_def
null
nonempty_of_mem {x u : PSet} (h : x ∈ u) : u.Nonempty := ⟨x, h⟩ @[simp]
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
nonempty_of_mem
null
nonempty_toSet_iff {u : PSet} : u.toSet.Nonempty ↔ u.Nonempty := Iff.rfl
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
nonempty_toSet_iff
null
nonempty_type_iff_nonempty {x : PSet} : Nonempty x.Type ↔ PSet.Nonempty x := ⟨fun ⟨i⟩ => ⟨_, func_mem _ i⟩, fun ⟨_, j, _⟩ => ⟨j⟩⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
nonempty_type_iff_nonempty
null
nonempty_of_nonempty_type (x : PSet) [h : Nonempty x.Type] : PSet.Nonempty x := nonempty_type_iff_nonempty.1 h
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
nonempty_of_nonempty_type
null
Equiv.eq {x y : PSet} : Equiv x y ↔ toSet x = toSet y := equiv_iff_mem.trans Set.ext_iff.symm
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Equiv.eq
Two pre-sets are equivalent iff they have the same members.
protected empty : PSet := ⟨_, PEmpty.elim⟩
def
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
empty
The empty pre-set
empty_def : (∅ : PSet) = ⟨_, PEmpty.elim⟩ := by simp [EmptyCollection.emptyCollection, PSet.empty] @[simp]
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
empty_def
null
notMem_empty (x : PSet.{u}) : x ∉ (∅ : PSet.{u}) := IsEmpty.exists_iff.1 @[deprecated (since := "2025-05-23")] alias not_mem_empty := notMem_empty @[simp]
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
notMem_empty
null
toSet_empty : toSet ∅ = ∅ := by simp [toSet] @[simp]
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
toSet_empty
null
empty_subset (x : PSet.{u}) : (∅ : PSet) ⊆ x := fun x => x.elim @[simp]
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
empty_subset
null
not_nonempty_empty : ¬PSet.Nonempty ∅ := by simp [PSet.Nonempty]
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
not_nonempty_empty
null
protected equiv_empty (x : PSet) [IsEmpty x.Type] : Equiv x ∅ := PSet.equiv_of_isEmpty x _
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
equiv_empty
null
protected insert (x y : PSet) : PSet := ⟨Option y.Type, fun o => Option.casesOn o x y.Func⟩
def
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
insert
Insert an element into a pre-set
@[simp] mem_insert_iff : ∀ {x y z : PSet.{u}}, x ∈ insert y z ↔ Equiv x y ∨ x ∈ z | x, y, ⟨α, A⟩ => show (x ∈ PSet.mk (Option α) fun o => Option.rec y A o) ↔ Equiv x y ∨ x ∈ PSet.mk α A from ⟨fun m => match m with | ⟨some a, ha⟩ => Or.inr ⟨a, ha⟩ | ⟨none, h⟩ => Or.inl h, fun m => match m with | Or.inr ⟨a, ha⟩ => ⟨some a, ha⟩ | Or.inl h => ⟨none, h⟩⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
mem_insert_iff
null
mem_insert (x y : PSet) : x ∈ insert x y := mem_insert_iff.2 <| Or.inl Equiv.rfl
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
mem_insert
null
mem_insert_of_mem {y z : PSet} (x) (h : z ∈ y) : z ∈ insert x y := mem_insert_iff.2 <| Or.inr h @[simp]
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
mem_insert_of_mem
null
mem_singleton {x y : PSet} : x ∈ ({y} : PSet) ↔ Equiv x y := mem_insert_iff.trans ⟨fun o => Or.rec id (fun n => absurd n (notMem_empty _)) o, Or.inl⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
mem_singleton
null
mem_pair {x y z : PSet} : x ∈ ({y, z} : PSet) ↔ Equiv x y ∨ Equiv x z := by simp
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
mem_pair
null
ofNat : ℕ → PSet | 0 => ∅ | n + 1 => insert (ofNat n) (ofNat n)
def
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
ofNat
The n-th von Neumann ordinal
omega : PSet := ⟨ULift ℕ, fun n => ofNat n.down⟩
def
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
omega
The von Neumann ordinal ω
protected sep (p : PSet → Prop) (x : PSet) : PSet := ⟨{ a // p (x.Func a) }, fun y => x.Func y.1⟩
def
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
sep
The pre-set separation operation `{x ∈ a | p x}`
mem_sep {p : PSet → Prop} (H : ∀ x y, Equiv x y → p x → p y) : ∀ {x y : PSet}, y ∈ PSet.sep p x ↔ y ∈ x ∧ p y | ⟨_, _⟩, _ => ⟨fun ⟨⟨a, pa⟩, h⟩ => ⟨⟨a, h⟩, H _ _ h.symm pa⟩, fun ⟨⟨a, h⟩, pa⟩ => ⟨⟨a, H _ _ h pa⟩, h⟩⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
mem_sep
null
powerset (x : PSet) : PSet := ⟨Set x.Type, fun p => ⟨{ a // p a }, fun y => x.Func y.1⟩⟩ @[simp]
def
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
powerset
The pre-set powerset operator
mem_powerset : ∀ {x y : PSet}, y ∈ powerset x ↔ y ⊆ x | ⟨_, A⟩, ⟨_, B⟩ => ⟨fun ⟨_, e⟩ => (Subset.congr_left e).2 fun ⟨a, _⟩ => ⟨a, Equiv.refl (A a)⟩, fun βα => ⟨{ a | ∃ b, Equiv (B b) (A a) }, fun b => let ⟨a, ba⟩ := βα b ⟨⟨a, b, ba⟩, ba⟩, fun ⟨_, b, ba⟩ => ⟨b, ba⟩⟩⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
mem_powerset
null
sUnion (a : PSet) : PSet := ⟨Σ x, (a.Func x).Type, fun ⟨x, y⟩ => (a.Func x).Func y⟩ @[inherit_doc] prefix:110 "⋃₀ " => sUnion @[simp]
def
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
sUnion
The pre-set union operator
mem_sUnion : ∀ {x y : PSet.{u}}, y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z | ⟨α, A⟩, y => ⟨fun ⟨⟨a, c⟩, (e : Equiv y ((A a).Func c))⟩ => have : Func (A a) c ∈ mk (A a).Type (A a).Func := Mem.mk (A a).Func c ⟨_, Mem.mk _ _, (Mem.congr_left e).2 (by rwa [eta] at this)⟩, fun ⟨⟨β, B⟩, ⟨a, (e : Equiv (mk β B) (A a))⟩, ⟨b, yb⟩⟩ => by rw [← eta (A a)] at e exact let ⟨βt, _⟩ := e let ⟨c, bc⟩ := βt b ⟨⟨a, c⟩, yb.trans bc⟩⟩ @[simp]
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
mem_sUnion
null
toSet_sUnion (x : PSet.{u}) : (⋃₀ x).toSet = ⋃₀ (toSet '' x.toSet) := by ext simp
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
toSet_sUnion
null
image (f : PSet.{u} → PSet.{u}) (x : PSet.{u}) : PSet := ⟨x.Type, f ∘ x.Func⟩
def
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
image
The image of a function from pre-sets to pre-sets.
mem_image {f : PSet.{u} → PSet.{u}} (H : ∀ x y, Equiv x y → Equiv (f x) (f y)) : ∀ {x y : PSet.{u}}, y ∈ image f x ↔ ∃ z ∈ x, Equiv y (f z) | ⟨_, A⟩, _ => ⟨fun ⟨a, ya⟩ => ⟨A a, Mem.mk A a, ya⟩, fun ⟨_, ⟨a, za⟩, yz⟩ => ⟨a, yz.trans <| H _ _ za⟩⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
mem_image
null
protected Lift : PSet.{u} → PSet.{max u v} | ⟨α, A⟩ => ⟨ULift.{v, u} α, fun ⟨x⟩ => PSet.Lift (A x)⟩
def
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
Lift
Universe lift operation
@[nolint checkUnivs] embed : PSet.{max (u + 1) v} := ⟨ULift.{v, u + 1} PSet, fun ⟨x⟩ => PSet.Lift.{u, max (u + 1) v} x⟩
def
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
embed
Embedding of one universe in another
lift_mem_embed : ∀ x : PSet.{u}, PSet.Lift.{u, max (u + 1) v} x ∈ embed.{u, v} := fun x => ⟨⟨x⟩, Equiv.rfl⟩
theorem
SetTheory
[ "Mathlib.Data.Set.Lattice" ]
Mathlib/SetTheory/ZFC/PSet.lean
lift_mem_embed
null
noncomputable rank : PSet.{u} → Ordinal.{u} | ⟨_, A⟩ => ⨆ a, succ (rank (A a))
def
SetTheory
[ "Mathlib.Logic.UnivLE", "Mathlib.SetTheory.Ordinal.Rank", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Rank.lean
rank
The ordinal rank of a pre-set
rank_congr : ∀ {x y : PSet}, Equiv x y → rank x = rank y | ⟨_, _⟩, ⟨_, _⟩, ⟨αβ, βα⟩ => by apply congr_arg sSup ext constructor <;> simp only [Set.mem_range, forall_exists_index] <;> intro a h · obtain ⟨b, h'⟩ := αβ a exists b rw [← h, rank_congr h'] · obtain ⟨b, h'⟩ := βα a exists b rw [← h, rank_congr h']
theorem
SetTheory
[ "Mathlib.Logic.UnivLE", "Mathlib.SetTheory.Ordinal.Rank", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Rank.lean
rank_congr
null
rank_lt_of_mem : ∀ {x y : PSet}, y ∈ x → rank y < rank x | ⟨_, _⟩, _, ⟨_, h⟩ => by rw [rank_congr h, ← succ_le_iff] apply Ordinal.le_iSup
theorem
SetTheory
[ "Mathlib.Logic.UnivLE", "Mathlib.SetTheory.Ordinal.Rank", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Rank.lean
rank_lt_of_mem
null
rank_le_iff {o : Ordinal} : ∀ {x : PSet}, rank x ≤ o ↔ ∀ ⦃y⦄, y ∈ x → rank y < o | ⟨_, A⟩ => by refine ⟨fun h _ h' => (rank_lt_of_mem h').trans_le h, fun h ↦ Ordinal.iSup_le fun a ↦ ?_⟩ rw [succ_le_iff] exact h (Mem.mk A a)
theorem
SetTheory
[ "Mathlib.Logic.UnivLE", "Mathlib.SetTheory.Ordinal.Rank", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Rank.lean
rank_le_iff
null
lt_rank_iff {o : Ordinal} {x : PSet} : o < rank x ↔ ∃ y ∈ x, o ≤ rank y := by rw [← not_iff_not, not_lt, rank_le_iff] simp variable {x y : PSet.{u}} @[gcongr] theorem rank_mono (h : x ⊆ y) : rank x ≤ rank y := rank_le_iff.2 fun _ h₁ => rank_lt_of_mem (mem_of_subset h h₁) @[simp]
theorem
SetTheory
[ "Mathlib.Logic.UnivLE", "Mathlib.SetTheory.Ordinal.Rank", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Rank.lean
lt_rank_iff
null
rank_empty : rank ∅ = 0 := by simp [empty_def, rank] @[simp]
theorem
SetTheory
[ "Mathlib.Logic.UnivLE", "Mathlib.SetTheory.Ordinal.Rank", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Rank.lean
rank_empty
null
rank_insert (x y : PSet) : rank (insert x y) = max (succ (rank x)) (rank y) := by apply le_antisymm · simp_rw [rank_le_iff, mem_insert_iff] rintro _ (h | h) · simp [rank_congr h] · simp [rank_lt_of_mem h] · apply max_le · exact (rank_lt_of_mem (mem_insert x y)).succ_le · exact rank_mono (subset_iff.2 fun z => mem_insert_of_mem x) @[simp]
theorem
SetTheory
[ "Mathlib.Logic.UnivLE", "Mathlib.SetTheory.Ordinal.Rank", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Rank.lean
rank_insert
null
rank_singleton (x : PSet) : rank {x} = succ (rank x) := (rank_insert _ _).trans (by simp)
theorem
SetTheory
[ "Mathlib.Logic.UnivLE", "Mathlib.SetTheory.Ordinal.Rank", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Rank.lean
rank_singleton
null
rank_pair (x y : PSet) : rank {x, y} = max (succ (rank x)) (succ (rank y)) := by simp @[simp]
theorem
SetTheory
[ "Mathlib.Logic.UnivLE", "Mathlib.SetTheory.Ordinal.Rank", "Mathlib.SetTheory.ZFC.Basic" ]
Mathlib/SetTheory/ZFC/Rank.lean
rank_pair
null