Documentation

BasicLeanDatastructures.Set.Basic

Set #

This file introduces a very basic Set type, which is merely a function from the element type into Prop.

def Set (α : Type u) :
Equations
Instances For
    Equations
    instance instMembershipSet {α : Type u_1} :
    Membership α (Set α)
    Equations
    instance instUnionSet {α : Type u_1} :
    Union (Set α)
    Equations
    instance instHasSubsetSet {α : Type u_1} :
    Equations
    instance instHasSSubsetSet {α : Type u_1} :
    Equations
    theorem Set.ext {α : Type u_1} (X Y : Set α) :
    (∀ (e : α), e X e Y)X = Y

    Two sets are the same if they feature the same elements.

    theorem Set.ext_iff {α : Type u_1} (X Y : Set α) :
    (∀ (e : α), e X e Y) X = Y
    theorem Set.not_empty_contains_element {α : Type u_1} (X : Set α) :
    X (e : α), e X

    A non-empty set contains at least one element.

    def Set.map {α : Type u_1} {β : Type u_2} (X : Set α) (f : αβ) :
    Set β

    Apply a mapping function to each member of a set yielding a new set; think of List.map.

    Equations
    Instances For
      theorem Set.mem_map_of_mem {α : Type u_1} {β : Type u_2} {e : α} {X : Set α} {f : αβ} :
      e Xf e X.map f

      For a set element, the mapped version of the element is in the mapped set.

      theorem Set.subset_refl {α : Type u_1} {X : Set α} :
      X X

      The subset relation on sets is reflexive.

      theorem Set.subset_trans {α : Type u_1} {a b c : Set α} :
      a bb ca c

      The subset relation on sets is transitive.

      theorem Set.subset_union_of_subset_left {α : Type u_1} {a b c : Set α} :
      a ba b c

      When a is a subset of b, then a is still a subset of the union of b with c.

      theorem Set.subset_union_of_subset_right {α : Type u_1} (a b c : Set α) :
      a ca b c

      When a is a subset of c, then a is still a subset of the union of b with c.

      theorem Set.union_subset_iff_both_subset {α : Type u_1} (a b c : Set α) :
      a b c a c b c

      The union of a and b is a subset of c if and only if a and b are both subsets of c.