Documentation

Mathlib.Tactic.Inclusion.Core.ToSet

Definition of ToSet and basic API #

This file defines the ToSet class and its API needed for the inclusion tactic.

Implimentation Notes #

class Inclusion.ToSet ( : Type u_1) (α : outParam (Type u_2)) :
Type (max u_1 u_2)

A ToSet Iα α instance provides a way of interpreting elements of as sets of α, through a function toSet : Iα → Set α. In its use in the inclusion tactic, will be a type with good computational properties (such as Interval Dyadic) and α will be some type that appears in the user's expression, such as .

  • toSet : Set α

    The mapping of elements of to sets in α.

Instances
    @[instance_reducible]
    instance Inclusion.instMembershipOfToSet { : Type u_1} {α : Type u_2} [ToSet α] :
    Membership α
    Equations
    theorem Inclusion.ToSet.mem_def { : Type u_1} {α : Type u_2} [ToSet α] (a : α) (s : ) :
    a s a toSet s
    theorem Inclusion.ToSet.mem_of_eq_of_mem { : Type u_1} {α : Type u_2} [ToSet α] {x y : α} {s : } (hxy : x = y) (hy : y s) :
    x s
    theorem Inclusion.ToSet.mem_of_mem_of_eq { : Type u_1} {α : Type u_2} [ToSet α] {x y : α} {s : } (hxy : x = y) (hx : x s) :
    y s
    class Inclusion.Univ ( : Type u_1) (α : Type u_2) [ToSet α] :
    Type u_1

    A Univ Iα α instance is a specification of an element univ : Iα such that every element of α belongs to univ. This is useful for assigning a container to inclusion variables that have no inclusion hypotheses.

    • univ :

      A (computational) representative of the universal set.

    • mem_univ (x : α) : x univ α

      Every element of α belongs to univ.

    Instances
      class Inclusion.Refine ( : Type u_1) (α : Type u_2) [ToSet α] :
      Type u_1

      A Refine Iα α instance is a specification of a (computable) function refine : Iα → Iα → Iα such that for any s t : Iα, s ∩ t ⊆ refine s t as sets of α. This is useful for merging multiple inclusion hypotheses of a single inclusion variable.

      • refine :

        A (computable) function to refine two inclusion hypotheses.

      • mem_refine {x : α} {s t : } (hs : x s) (ht : x t) : x refine α s t

        If x ∈ s and x ∈ t then x ∈ refine s t.

      Instances
        class Inclusion.Coarsen ( : Type u_1) (α : Type u_2) [ToSet α] :
        Type u_1

        A Coarsen Iα α instance is a specification of a (computable) function coarsen : Iα → Iα → Iα such that for any s t : Iα, s ∪ t ⊆ coarsen s t. This is useful for applying an inclusion function to a cover of the input and then merging the results.

        • coarsen :

          A represented set containing both input sets.

        • mem_coarsen_left {x : α} {s t : } (hx : x s) : x coarsen α s t

          If x ∈ s then x ∈ coarsen s t.

        • mem_coarsen_right {x : α} {s t : } (hx : x t) : x coarsen α s t

          If x ∈ t then x ∈ coarsen s t.

        Instances
          structure Inclusion.Cover ( : Type u_1) (α : Type u_2) [ToSet α] :
          Type (max (u + 1) u_1)

          A Cover Iα α specifies a function coverMap to compute a "refined" inclusion of F s for s : Iα and an inclusion function F : Iα → Iβ, by computing F on each element of a cover of s and then using coarsen to merge the results. Schematically

          coverMap s F = fold coarsen (map F (cover s))

          where cover : Iα → Array would specify the underlying cover, but the coverMap formulation allows this function to be implemented more efficiently for kernel reduction.

          • coverMap {β : Type u} [ToSet β] [Coarsen β] (s : ) (F : ) :

            Compute an inclusion for F s using a cover of s.

          • mem_coverMap {β : Type u} [ToSet β] [Coarsen β] {s : } {F : } {x : α} {y : β} (hx : x s) (hy : ∀ (t : ), x ty F t) : y self.coverMap s F

            If x ∈ s and ∀ t, x ∈ t → y ∈ F t then y ∈ coverMap s F.

          Instances For

            An IntervalBool represents the result of a Prop inclusion and is either true (if the proposition is computed true), false (if the proposition is computed false), or undetermined (if the computation is indeterminate).

            Instances For

              The mapping from IntervalBool to Set Prop which identifies each option (true, false, undetermined) with its set of possible outcomes ({True}, {False}, {True, False} respectively).

              Equations
              Instances For
                theorem Inclusion.IntervalBool.not_mem {p : Prop} {a : IntervalBool} (hp : p a) :
                (¬p) a.not
                theorem Inclusion.IntervalBool.and_mem {p q : Prop} {a b : IntervalBool} (hp : p a) (hq : q b) :
                (p q) a.and b
                theorem Inclusion.IntervalBool.or_mem {p q : Prop} {a b : IntervalBool} (hp : p a) (hq : q b) :
                (p q) a.or b
                @[instance_reducible]
                Equations
                • One or more equations did not get rendered due to their size.