statement
stringlengths
1
2.88k
proof
stringlengths
0
13.9k
type
stringclasses
10 values
symbolic_name
stringlengths
1
131
library
stringclasses
417 values
filename
stringlengths
17
80
imports
listlengths
0
16
deps
listlengths
0
64
docstring
stringlengths
0
10.2k
source_url
stringclasses
1 value
commit
stringclasses
1 value
map (f : Set → Set) [H : definable 1 f] : Set → Set
image (λ y, pair y (f y))
def
Set.map
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set" ]
Graph of a function: `map f x` is the ZFC function which maps `a ∈ x` to `f a`
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_map {f : Set → Set} [H : definable 1 f] {x y : Set} : y ∈ map f x ↔ ∃ z ∈ x, pair z (f z) = y
mem_image
theorem
Set.mem_map
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set", "mem_map" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
map_unique {f : Set.{u} → Set.{u}} [H : definable 1 f] {x z : Set.{u}} (zx : z ∈ x) : ∃! w, pair z w ∈ map f x
⟨f z, image.mk _ _ zx, λ y yx, let ⟨w, wx, we⟩ := mem_image.1 yx, ⟨wz, fy⟩ := pair_injective we in by rw[←fy, wz]⟩
theorem
Set.map_unique
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
map_is_func {f : Set → Set} [H : definable 1 f] {x y : Set} : is_func x y (map f x) ↔ ∀ z ∈ x, f z ∈ y
⟨λ ⟨ss, h⟩ z zx, let ⟨t, t1, t2⟩ := h z zx in (t2 (f z) (image.mk _ _ zx)).symm ▸ (pair_mem_prod.1 (ss t1)).right, λ h, ⟨λ y yx, let ⟨z, zx, ze⟩ := mem_image.1 yx in ze ▸ pair_mem_prod.2 ⟨zx, h z zx⟩, λ z, map_unique⟩⟩
theorem
Set.map_is_func
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
hereditarily (p : Set → Prop) : Set → Prop
| x := p x ∧ ∀ y ∈ x, hereditarily y using_well_founded { dec_tac := `[assumption] }
def
Set.hereditarily
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set" ]
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`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
hereditarily_iff : hereditarily p x ↔ p x ∧ ∀ y ∈ x, hereditarily p y
by rw [← hereditarily]
lemma
Set.hereditarily_iff
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
hereditarily.self (h : x.hereditarily p) : p x
h.def.1
lemma
Set.hereditarily.self
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
hereditarily.mem (h : x.hereditarily p) (hy : y ∈ x) : y.hereditarily p
h.def.2 _ hy
lemma
Set.hereditarily.mem
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
hereditarily.empty : hereditarily p x → p ∅
begin apply x.induction_on, intros y IH h, rcases Set.eq_empty_or_nonempty y with (rfl|⟨a, ha⟩), { exact h.self }, { exact IH a ha (h.mem ha) } end
lemma
Set.hereditarily.empty
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set.eq_empty_or_nonempty" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Class
set Set
def
Class
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set" ]
The collection of all classes. We define `Class` as `set Set`, as this allows us to get many instances automatically. However, in practice, we treat it as (the definitionally equal) `Set → Prop`. This means, the preferred way to state that `x : Set` belongs to `A : Class` is to write `A x`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ext {x y : Class.{u}} : (∀ z : Set.{u}, x z ↔ y z) → x = y
set.ext
theorem
Class.ext
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "set.ext" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ext_iff {x y : Class.{u}} : x = y ↔ ∀ z, x z ↔ y z
set.ext_iff
theorem
Class.ext_iff
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "set.ext_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_Set (x : Set.{u}) : Class.{u}
{y | y ∈ x}
def
Class.of_Set
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
Coerce a ZFC set into a class
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
univ : Class
set.univ
def
Class.univ
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Class" ]
The universal class
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_Set (B : Class.{u}) (A : Class.{u}) : Prop
∃ x, ↑x = A ∧ B x
def
Class.to_Set
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
Assert that `A` is a ZFC set satisfying `B`
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem (A B : Class.{u}) : Prop
to_Set.{u} B A
def
Class.mem
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
`A ∈ B` if `A` is a ZFC set which satisfies `B`
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_def (A B : Class.{u}) : A ∈ B ↔ ∃ x, ↑x = A ∧ B x
iff.rfl
theorem
Class.mem_def
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
not_mem_empty (x : Class.{u}) : x ∉ (∅ : Class.{u})
λ ⟨_, _, h⟩, h
theorem
Class.not_mem_empty
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
not_empty_hom (x : Set.{u}) : ¬ (∅ : Class.{u}) x
id
theorem
Class.not_empty_hom
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_univ {A : Class.{u}} : A ∈ univ.{u} ↔ ∃ x : Set.{u}, ↑x = A
exists_congr $ λ x, and_true _
theorem
Class.mem_univ
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_univ_hom (x : Set.{u}) : univ.{u} x
trivial
theorem
Class.mem_univ_hom
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
eq_univ_iff_forall {A : Class.{u}} : A = univ ↔ ∀ x : Set, A x
set.eq_univ_iff_forall
theorem
Class.eq_univ_iff_forall
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set", "set.eq_univ_iff_forall" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
eq_univ_of_forall {A : Class.{u}} : (∀ x : Set, A x) → A = univ
set.eq_univ_of_forall
theorem
Class.eq_univ_of_forall
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set", "set.eq_univ_of_forall" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_wf : @well_founded Class.{u} (∈)
⟨begin have H : ∀ x : Set.{u}, @acc Class.{u} (∈) ↑x, { refine λ a, Set.induction_on a (λ x IH, ⟨x, _⟩), rintros A ⟨z, rfl, hz⟩, exact IH z hz }, { refine λ A, ⟨A, _⟩, rintros B ⟨x, rfl, hx⟩, exact H x } end⟩
theorem
Class.mem_wf
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set.induction_on" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_asymm {x y : Class} : x ∈ y → y ∉ x
asymm
theorem
Class.mem_asymm
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Class" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_irrefl (x : Class) : x ∉ x
irrefl x
theorem
Class.mem_irrefl
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Class" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
univ_not_mem_univ : univ ∉ univ
mem_irrefl _
theorem
Class.univ_not_mem_univ
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
**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).
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Cong_to_Class (x : set Class.{u}) : Class.{u}
{y | ↑y ∈ x}
def
Class.Cong_to_Class
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
Convert a conglomerate (a collection of classes) into a class
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Cong_to_Class_empty : Cong_to_Class ∅ = ∅
by { ext, simp [Cong_to_Class] }
theorem
Class.Cong_to_Class_empty
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Class_to_Cong (x : Class.{u}) : set Class.{u}
{y | y ∈ x}
def
Class.Class_to_Cong
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
Convert a class into a conglomerate (a collection of classes)
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Class_to_Cong_empty : Class_to_Cong ∅ = ∅
by { ext, simp [Class_to_Cong] }
theorem
Class.Class_to_Cong_empty
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
powerset (x : Class) : Class
Cong_to_Class (set.powerset x)
def
Class.powerset
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Class", "set.powerset" ]
The power class of a class is the class of all subclasses that are ZFC sets
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sUnion (x : Class) : Class
⋃₀ (Class_to_Cong x)
def
Class.sUnion
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Class" ]
The union of a class is the class of all members of ZFC sets in the class
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sInter (x : Class) : Class
⋂₀ Class_to_Cong x
def
Class.sInter
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Class" ]
The intersection of a class is the class of all members of ZFC sets in the class
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_Set.inj {x y : Set.{u}} (h : (x : Class.{u}) = y) : x = y
Set.ext $ λ z, by { change (x : Class.{u}) z ↔ (y : Class.{u}) z, rw h }
theorem
Class.of_Set.inj
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set.ext" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_Set_of_Set (A : Class.{u}) (x : Set.{u}) : to_Set A x ↔ A x
⟨λ ⟨y, yx, py⟩, by rwa of_Set.inj yx at py, λ px, ⟨x, rfl, px⟩⟩
theorem
Class.to_Set_of_Set
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_mem {x : Set.{u}} {A : Class.{u}} : (x : Class.{u}) ∈ A ↔ A x
to_Set_of_Set _ _
theorem
Class.coe_mem
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_apply {x y : Set.{u}} : (y : Class.{u}) x ↔ x ∈ y
iff.rfl
theorem
Class.coe_apply
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_subset (x y : Set.{u}) : (x : Class.{u}) ⊆ y ↔ x ⊆ y
iff.rfl
theorem
Class.coe_subset
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_sep (p : Class.{u}) (x : Set.{u}) : (↑{y ∈ x | p y} : Class.{u}) = {y ∈ x | p y}
ext $ λ y, Set.mem_sep
theorem
Class.coe_sep
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set.mem_sep" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_empty : ↑(∅ : Set.{u}) = (∅ : Class.{u})
ext $ λ y, (iff_false _).2 $ Set.not_mem_empty y
theorem
Class.coe_empty
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set.not_mem_empty" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_insert (x y : Set.{u}) : ↑(insert x y) = @insert Set.{u} Class.{u} _ x y
ext $ λ z, Set.mem_insert_iff
theorem
Class.coe_insert
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set.mem_insert_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_union (x y : Set.{u}) : ↑(x ∪ y) = (x : Class.{u}) ∪ y
ext $ λ z, Set.mem_union
theorem
Class.coe_union
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set.mem_union" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_inter (x y : Set.{u}) : ↑(x ∩ y) = (x : Class.{u}) ∩ y
ext $ λ z, Set.mem_inter
theorem
Class.coe_inter
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set.mem_inter" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_diff (x y : Set.{u}) : ↑(x \ y) = (x : Class.{u}) \ y
ext $ λ z, Set.mem_diff
theorem
Class.coe_diff
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set.mem_diff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_powerset (x : Set.{u}) : ↑x.powerset = powerset.{u} x
ext $ λ z, Set.mem_powerset
theorem
Class.coe_powerset
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set.mem_powerset" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
powerset_apply {A : Class.{u}} {x : Set.{u}} : powerset A x ↔ ↑x ⊆ A
iff.rfl
theorem
Class.powerset_apply
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sUnion_apply {x : Class} {y : Set} : (⋃₀ x) y ↔ ∃ z : Set, x z ∧ y ∈ z
begin split, { rintro ⟨-, ⟨z, rfl, hxz⟩, hyz⟩, exact ⟨z, hxz, hyz⟩ }, { exact λ ⟨z, hxz, hyz⟩, ⟨_, coe_mem.2 hxz, hyz⟩ } end
theorem
Class.sUnion_apply
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Class", "Set" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_sUnion (x : Set.{u}) : ↑(⋃₀ x) = ⋃₀ (x : Class.{u})
ext $ λ y, Set.mem_sUnion.trans (sUnion_apply.trans $ by simp_rw [coe_apply, exists_prop]).symm
theorem
Class.coe_sUnion
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "exists_prop" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_sUnion {x y : Class.{u}} : y ∈ ⋃₀ x ↔ ∃ z, z ∈ x ∧ y ∈ z
begin split, { 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⟩ } end
theorem
Class.mem_sUnion
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sInter_apply {x : Class.{u}} {y : Set.{u}} : (⋂₀ x) y ↔ ∀ z : Set.{u}, x z → y ∈ z
begin refine ⟨λ hxy z hxz, hxy _ ⟨z, rfl, hxz⟩, _⟩, rintro H - ⟨z, rfl, hxz⟩, exact H _ hxz end
theorem
Class.sInter_apply
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_sInter {x : Set.{u}} (h : x.nonempty) : ↑(⋂₀ x) = ⋂₀ (x : Class.{u})
set.ext $ λ y, (Set.mem_sInter h).trans sInter_apply.symm
theorem
Class.coe_sInter
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set.mem_sInter", "set.ext" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
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
Class.mem_of_mem_sInter
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Class" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_sInter {x y : Class.{u}} (h : x.nonempty) : y ∈ ⋂₀ x ↔ ∀ z, z ∈ x → y ∈ z
begin refine ⟨λ hy z, mem_of_mem_sInter hy, λ H, _⟩, simp_rw [mem_def, sInter_apply], obtain ⟨z, hz⟩ := h, obtain ⟨y, rfl, hzy⟩ := H z (coe_mem.2 hz), refine ⟨y, rfl, λ w hxw, _⟩, simpa only [coe_mem, coe_apply] using H w (coe_mem.2 hxw), end
theorem
Class.mem_sInter
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sUnion_empty : ⋃₀ (∅ : Class.{u}) = ∅
by { ext, simp }
theorem
Class.sUnion_empty
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sInter_empty : ⋂₀ (∅ : Class.{u}) = univ
by { ext, simp [sInter, ←univ] }
theorem
Class.sInter_empty
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
eq_univ_of_powerset_subset {A : Class} (hA : powerset A ⊆ A) : A = univ
eq_univ_of_forall begin by_contra' hnA, exact well_founded.min_mem Set.mem_wf _ hnA (hA $ λ x hx, not_not.1 $ λ hB, well_founded.not_lt_min Set.mem_wf _ hnA hB $ coe_apply.1 hx) end
theorem
Class.eq_univ_of_powerset_subset
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Class", "Set.mem_wf", "well_founded.min_mem", "well_founded.not_lt_min" ]
An induction principle for sets. If every subset of a class is a member, then the class is universal.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
iota (A : Class) : Class
⋃₀ {x | ∀ y, A y ↔ y = x}
def
Class.iota
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Class" ]
The definite description operator, which is `{x}` if `{y | A y} = {x}` and `∅` otherwise.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
iota_val (A : Class) (x : Set) (H : ∀ y, A y ↔ y = x) : iota A = ↑x
ext $ λ y, ⟨λ ⟨._, ⟨x', rfl, h⟩, yx'⟩, by rwa ←((H x').1 $ (h x').2 rfl), λ yx, ⟨_, ⟨x, rfl, H⟩, yx⟩⟩
theorem
Class.iota_val
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Class", "Set" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
iota_ex (A) : iota.{u} A ∈ univ.{u}
mem_univ.2 $ or.elim (classical.em $ ∃ x, ∀ y, A y ↔ y = x) (λ ⟨x, h⟩, ⟨x, eq.symm $ iota_val A x h⟩) (λ hn, ⟨∅, ext (λ z, coe_empty.symm ▸ ⟨false.rec _, λ ⟨._, ⟨x, rfl, H⟩, zA⟩, hn ⟨x, H⟩⟩)⟩)
theorem
Class.iota_ex
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
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.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
fval (F A : Class.{u}) : Class.{u}
iota (λ y, to_Set (λ x, F (Set.pair x y)) A)
def
Class.fval
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set.pair" ]
Function value
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
fval_ex (F A : Class.{u}) : F ′ A ∈ univ.{u}
iota_ex _
theorem
Class.fval_ex
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
map_fval {f : Set.{u} → Set.{u}} [H : pSet.definable 1 f] {x y : Set.{u}} (h : y ∈ x) : (Set.map f x ′ y : Class.{u}) = f y
Class.iota_val _ _ (λ z, by { rw [Class.to_Set_of_Set, Class.coe_apply, mem_map], exact ⟨λ ⟨w, wz, pr⟩, let ⟨wy, fw⟩ := Set.pair_injective pr in by rw[←fw, wy], λ e, by { subst e, exact ⟨_, h, rfl⟩ }⟩ })
theorem
Set.map_fval
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Class.coe_apply", "Class.iota_val", "Class.to_Set_of_Set", "Set.map", "Set.pair_injective", "mem_map", "pSet.definable" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
choice : Set
@map (λ y, classical.epsilon (λ z, z ∈ y)) (classical.all_definable _) x
def
Set.choice
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Set", "classical.all_definable" ]
A choice function on the class of nonempty ZFC sets.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
choice_mem_aux (y : Set.{u}) (yx : y ∈ x) : classical.epsilon (λ z : Set.{u}, z ∈ y) ∈ y
@classical.epsilon_spec _ (λ z : Set.{u}, z ∈ y) $ classical.by_contradiction $ λ n, h $ by rwa ←((eq_empty y).2 $ λ z zx, n ⟨z, zx⟩)
theorem
Set.choice_mem_aux
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
choice_is_func : is_func x (⋃₀ x) (choice x)
(@map_is_func _ (classical.all_definable _) _ _).2 $ λ y yx, mem_sUnion.2 ⟨y, yx, choice_mem_aux x h y yx⟩
theorem
Set.choice_is_func
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "classical.all_definable" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
choice_mem (y : Set.{u}) (yx : y ∈ x) : (choice x ′ y : Class.{u}) ∈ (y : Class.{u})
begin delta choice, rw [map_fval yx, Class.coe_mem, Class.coe_apply], exact choice_mem_aux x h y yx end
theorem
Set.choice_mem
set_theory.zfc
src/set_theory/zfc/basic.lean
[ "data.set.lattice", "logic.small.basic", "order.well_founded" ]
[ "Class.coe_apply", "Class.coe_mem" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_transitive (x : Set) : Prop
∀ y ∈ x, y ⊆ x
def
Set.is_transitive
set_theory.zfc
src/set_theory/zfc/ordinal.lean
[ "set_theory.zfc.basic" ]
[ "Set" ]
A transitive set is one where every element is a subset.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
empty_is_transitive : is_transitive ∅
λ y hy, (not_mem_empty y hy).elim
theorem
Set.empty_is_transitive
set_theory.zfc
src/set_theory/zfc/ordinal.lean
[ "set_theory.zfc.basic" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_transitive.subset_of_mem (h : x.is_transitive) : y ∈ x → y ⊆ x
h y
theorem
Set.is_transitive.subset_of_mem
set_theory.zfc
src/set_theory/zfc/ordinal.lean
[ "set_theory.zfc.basic" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_transitive_iff_mem_trans : z.is_transitive ↔ ∀ {x y : Set}, x ∈ y → y ∈ z → x ∈ z
⟨λ h x y hx hy, h.subset_of_mem hy hx, λ H x hx y hy, H hy hx⟩
theorem
Set.is_transitive_iff_mem_trans
set_theory.zfc
src/set_theory/zfc/ordinal.lean
[ "set_theory.zfc.basic" ]
[ "Set" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_transitive.inter (hx : x.is_transitive) (hy : y.is_transitive) : (x ∩ y).is_transitive
λ z hz w hw, by { rw mem_inter at hz ⊢, exact ⟨hx.mem_trans hw hz.1, hy.mem_trans hw hz.2⟩ }
theorem
Set.is_transitive.inter
set_theory.zfc
src/set_theory/zfc/ordinal.lean
[ "set_theory.zfc.basic" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_transitive.sUnion (h : x.is_transitive) : (⋃₀ x).is_transitive
λ y hy z hz, begin rcases mem_sUnion.1 hy with ⟨w, hw, hw'⟩, exact mem_sUnion_of_mem hz (h.mem_trans hw' hw) end
theorem
Set.is_transitive.sUnion
set_theory.zfc
src/set_theory/zfc/ordinal.lean
[ "set_theory.zfc.basic" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_transitive.sUnion' (H : ∀ y ∈ x, is_transitive y) : (⋃₀ x).is_transitive
λ y hy z hz, begin rcases mem_sUnion.1 hy with ⟨w, hw, hw'⟩, exact mem_sUnion_of_mem ((H w hw).mem_trans hz hw') hw end
theorem
Set.is_transitive.sUnion'
set_theory.zfc
src/set_theory/zfc/ordinal.lean
[ "set_theory.zfc.basic" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_transitive.union (hx : x.is_transitive) (hy : y.is_transitive) : (x ∪ y).is_transitive
begin rw ←sUnion_pair, apply is_transitive.sUnion' (λ z, _), rw mem_pair, rintro (rfl | rfl), assumption' end
theorem
Set.is_transitive.union
set_theory.zfc
src/set_theory/zfc/ordinal.lean
[ "set_theory.zfc.basic" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_transitive.powerset (h : x.is_transitive) : (powerset x).is_transitive
λ y hy z hz, by { rw mem_powerset at ⊢ hy, exact h.subset_of_mem (hy hz) }
theorem
Set.is_transitive.powerset
set_theory.zfc
src/set_theory/zfc/ordinal.lean
[ "set_theory.zfc.basic" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_transitive_iff_sUnion_subset : x.is_transitive ↔ ⋃₀ x ⊆ x
⟨λ h y hy, by { rcases mem_sUnion.1 hy with ⟨z, hz, hz'⟩, exact h.mem_trans hz' hz }, λ H y hy z hz, H $ mem_sUnion_of_mem hz hy⟩
theorem
Set.is_transitive_iff_sUnion_subset
set_theory.zfc
src/set_theory/zfc/ordinal.lean
[ "set_theory.zfc.basic" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_transitive_iff_subset_powerset : x.is_transitive ↔ x ⊆ powerset x
⟨λ h y hy, mem_powerset.2 $ h.subset_of_mem hy, λ H y hy z hz, mem_powerset.1 (H hy) hz⟩
theorem
Set.is_transitive_iff_subset_powerset
set_theory.zfc
src/set_theory/zfc/ordinal.lean
[ "set_theory.zfc.basic" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
context
(red : transparency) (α : expr) (univ : level) (α0 : expr) (is_group : bool) (inst : expr)
structure
tactic.abel.context
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[]
The `context` for a call to `abel`. Stores a few options for this call, and caches some common subexpressions such as typeclass instances and `0 : α`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mk_context (red : transparency) (e : expr) : tactic context
do α ← infer_type e, c ← mk_app ``add_comm_monoid [α] >>= mk_instance, cg ← try_core (mk_app ``add_comm_group [α] >>= mk_instance), u ← mk_meta_univ, infer_type α >>= unify (expr.sort (level.succ u)), u ← get_univ_assignment u, α0 ← expr.of_nat α 0, match cg with | (some cg) := return ⟨red, α, u...
def
tactic.abel.mk_context
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[ "add_comm_group", "add_comm_monoid", "expr.of_nat" ]
Populate a `context` object for evaluating `e`, up to reducibility level `red`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
context.app (c : context) (n : name) (inst : expr) : list expr → expr
(@expr.const tt n [c.univ] c.α inst).mk_app
def
tactic.abel.context.app
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[]
Apply the function `n : ∀ {α} [inst : add_whatever α], _` to the implicit parameters in the context, and the given list of arguments.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
context.mk_app (c : context) (n inst : name) (l : list expr) : tactic expr
do m ← mk_instance ((expr.const inst [c.univ] : expr) c.α), return $ c.app n m l
def
tactic.abel.context.mk_app
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[]
Apply the function `n : ∀ {α} [inst α], _` to the implicit parameters in the context, and the given list of arguments. Compared to `context.app`, this takes the name of the typeclass, rather than an inferred typeclass instance.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_g : name → name
| (name.mk_string s p) := name.mk_string (s ++ "g") p | n := n
def
tactic.abel.add_g
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[]
Add the letter "g" to the end of the name, e.g. turning `term` into `termg`. This is used to choose between declarations taking `add_comm_monoid` and those taking `add_comm_group` instances.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
context.iapp (c : context) (n : name) : list expr → expr
c.app (if c.is_group then add_g n else n) c.inst
def
tactic.abel.context.iapp
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[]
Apply the function `n : ∀ {α} [add_comm_{monoid,group} α]` to the given list of arguments. Will use the `add_comm_{monoid,group}` instance that has been cached in the context.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
term {α} [add_comm_monoid α] (n : ℕ) (x a : α) : α
n • x + a
def
tactic.abel.term
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[ "add_comm_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
termg {α} [add_comm_group α] (n : ℤ) (x a : α) : α
n • x + a
def
tactic.abel.termg
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[ "add_comm_group" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
context.mk_term (c : context) (n x a : expr) : expr
c.iapp ``term [n, x, a]
def
tactic.abel.context.mk_term
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[]
Evaluate a term with coefficient `n`, atom `x` and successor terms `a`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
context.int_to_expr (c : context) (n : ℤ) : tactic expr
expr.of_int (if c.is_group then `(ℤ) else `(ℕ)) n
def
tactic.abel.context.int_to_expr
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[ "expr.of_int" ]
Interpret an integer as a coefficient to a term.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normal_expr : Type | zero (e : expr) : normal_expr | nterm (e : expr) (n : expr × ℤ) (x : expr) (a : normal_expr) : normal_expr
inductive
tactic.abel.normal_expr
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normal_expr.e : normal_expr → expr
| (normal_expr.zero e) := e | (normal_expr.nterm e _ _ _) := e
def
tactic.abel.normal_expr.e
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normal_expr.term' (c : context) (n : expr × ℤ) (x : expr) (a : normal_expr) : normal_expr
normal_expr.nterm (c.mk_term n.1 x a) n x a
def
tactic.abel.normal_expr.term'
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normal_expr.zero' (c : context) : normal_expr
normal_expr.zero c.α0
def
tactic.abel.normal_expr.zero'
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normal_expr.to_list : normal_expr → list (ℤ × expr)
| (normal_expr.zero _) := [] | (normal_expr.nterm _ (_, n) x a) := (n, x) :: a.to_list
def
tactic.abel.normal_expr.to_list
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normal_expr.to_string (e : normal_expr) : string
" + ".intercalate $ (to_list e).map $ λ ⟨n, e⟩, to_string n ++ " • (" ++ to_string e ++ ")"
def
tactic.abel.normal_expr.to_string
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normal_expr.pp (e : normal_expr) : tactic format
do l ← (to_list e).mmap (λ ⟨n, e⟩, do pe ← pp e, return (to_fmt n ++ " • (" ++ pe ++ ")")), return $ format.join $ l.intersperse ↑" + "
def
tactic.abel.normal_expr.pp
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
normal_expr.refl_conv (e : normal_expr) : tactic (normal_expr × expr)
do p ← mk_eq_refl e, return (e, p)
def
tactic.abel.normal_expr.refl_conv
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
const_add_term {α} [add_comm_monoid α] (k n x a a') (h : k + a = a') : k + @term α _ n x a = term n x a'
by simp [h.symm, term]; ac_refl
theorem
tactic.abel.const_add_term
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[ "add_comm_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
const_add_termg {α} [add_comm_group α] (k n x a a') (h : k + a = a') : k + @termg α _ n x a = termg n x a'
by simp [h.symm, termg]; ac_refl
theorem
tactic.abel.const_add_termg
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[ "add_comm_group" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
term_add_const {α} [add_comm_monoid α] (n x a k a') (h : a + k = a') : @term α _ n x a + k = term n x a'
by simp [h.symm, term, add_assoc]
theorem
tactic.abel.term_add_const
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[ "add_comm_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
term_add_constg {α} [add_comm_group α] (n x a k a') (h : a + k = a') : @termg α _ n x a + k = termg n x a'
by simp [h.symm, termg, add_assoc]
theorem
tactic.abel.term_add_constg
tactic
src/tactic/abel.lean
[ "tactic.norm_num" ]
[ "add_comm_group" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83