Definition of ToSet and basic API #
This file defines the ToSet class and its API needed for the inclusion tactic.
Implimentation Notes #
Inclusion.IntervalBoolis nearly identical toLean.LBoolbut with a seperate API and documentation which is catered to the needs of the inclusion tactic.
A ToSet Iα α instance provides a way of interpreting elements of Iα as sets of α,
through a function toSet : Iα → Set α. In its use in the inclusion tactic, Iα 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 : Iα → Set α
The mapping of elements of
Iαto sets inα.
Instances
Equations
- Inclusion.instMembershipOfToSet = { mem := fun (s : Iα) (a : α) => Inclusion.ToSet.toSet s a }
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 : Iα
A (computational) representative of the universal set.
Every element of
αbelongs touniv.
Instances
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 : Iα → Iα → Iα
A (computable) function to refine two inclusion hypotheses.
If
x ∈ sandx ∈ tthenx ∈ refine s t.
Instances
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 : Iα → Iα → Iα
A represented set containing both input sets.
If
x ∈ sthenx ∈ coarsen s t.If
x ∈ tthenx ∈ coarsen s t.
Instances
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 Iα would specify the underlying cover, but the coverMap formulation
allows this function to be implemented more efficiently for kernel reduction.
Compute an inclusion for
F susing a cover ofs.- mem_coverMap {Iβ β : Type u} [ToSet Iβ β] [Coarsen Iβ β] {s : Iα} {F : Iα → Iβ} {x : α} {y : β} (hx : x ∈ s) (hy : ∀ (t : Iα), x ∈ t → y ∈ F t) : y ∈ self.coverMap s F
If
x ∈ sand∀ t, x ∈ t → y ∈ F ttheny ∈ 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).
- true : IntervalBool
- false : IntervalBool
- undetermined : IntervalBool
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
Equations
Equations
- One or more equations did not get rendered due to their size.