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 ℝ.
Instances
Equations
- Inclusion.instMembershipOfToSet = { mem := fun (s : Iα) (a : α) => Inclusion.ToSet.toSet s a }
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.
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.
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.
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.