Affinity constraints #
After shape unification and decomposition, inference is left with atomic constraints a ≤ b
between affinities in the order G ≤ E. Each side is a variable or an affinity fixed by the
program. A variable must be G in every solution if it lies below a G, directly or through other
such variables; solveAffinities collects these variables, sets them to G and every other
variable to E, and checks the result. Proof/Frontend/Affinity.lean proves that it returns the
greatest solution, and fails exactly when there is none.
One side of an affinity constraint.
- var {V : Type} (name : V) : AffinityTerm V
- fixed {V : Type} (affinity : Spec.Paper.Affinity) : AffinityTerm V
Instances For
Equations
- Determinize.Frontend.instDecidableEqAffinityTerm.decEq (Determinize.Frontend.AffinityTerm.var a) (Determinize.Frontend.AffinityTerm.var b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- Determinize.Frontend.instDecidableEqAffinityTerm.decEq (Determinize.Frontend.AffinityTerm.var name) (Determinize.Frontend.AffinityTerm.fixed affinity) = isFalse ⋯
- Determinize.Frontend.instDecidableEqAffinityTerm.decEq (Determinize.Frontend.AffinityTerm.fixed affinity) (Determinize.Frontend.AffinityTerm.var name) = isFalse ⋯
- Determinize.Frontend.instDecidableEqAffinityTerm.decEq (Determinize.Frontend.AffinityTerm.fixed a) (Determinize.Frontend.AffinityTerm.fixed b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
lower ≤ upper in the order G ≤ E.
Equations
Instances For
G ≤ E, the order of Ty.Sub.general.
Equations
Instances For
The variables on the lower side of some constraint.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The term is G, or a variable in general.
Equations
Instances For
The variables v with a constraint v ≤ t where t is G or a variable in general.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Close general under below. Started from ∅, this gives the variables that every
solution sets to G.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The greatest solution: G on the variables that every solution sets to G, E elsewhere; or
none if that assignment, and hence every assignment, violates a constraint.
Equations
- One or more equations did not get rendered due to their size.