Sets #
This file sets up the theory of sets whose elements have a given type.
Main definitions #
Given a type X
and a predicate p : X → Prop
:
Set X
: the type of sets whose elements have typeX
{a : X | p a} : Set X
: the set of all elements ofX
satisfyingp
{a | p a} : Set X
: a more concise notation for{a : X | p a}
{a ∈ S | p a} : Set X
: givenS : Set X
, the subset ofS
consisting of its elements satisfyingp
.
Implementation issues #
As in Lean 3, Set X := X → Prop
I didn't call this file Data.Set.Basic because it contains core Lean 3
stuff which happens before mathlib3's data.set.basic .
This file is a port of the core Lean 3 file lib/lean/library/init/data/set.lean
.
Equations
- Set.instMembershipSet = { mem := Set.Mem }
Equations
- Set.Subset s₁ s₂ = ∀ ⦃a : α⦄, a ∈ s₁ → a ∈ s₂
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Set.insert a s = {b | b = a ∨ b ∈ s}
Instances For
Equations
- Set.singleton a = {b | b = a}
Instances For
Equations
- Set.term𝒫_ = Lean.ParserDescr.node `Set.term𝒫_ 100 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "𝒫") (Lean.ParserDescr.cat `term 100))
Instances For
Equations
- Set.instFunctorSet = { map := @Set.image, mapConst := fun {α β} => Set.image ∘ Function.const β }