Safe Haskell | None |
---|---|
Language | Haskell2010 |
Crunch together all constraints with same linear function
Synopsis
- crunchProgram :: (Ord z, Ord r, Rep c) => Program z r c -> Program z r c
- crunchConstraint :: (Ord z, Ord r, Rep c) => Constraint z r c -> Constraint z r c
Documentation
crunchProgram :: (Ord z, Ord r, Rep c) => Program z r c -> Program z r c Source #
Crunch the constraints in some program
crunchConstraint :: (Ord z, Ord r, Rep c) => Constraint z r c -> Constraint z r c Source #
Crunch some constraints. Constraints with the same function, for example
2x + y < 5 && 0 < 2x + y && 2x + y < 10
becomes
0 < 2x + y < 5
This should satisfy:
forall a c. check a c == check a (crunchConstraint c) forall a. length (checkConstraint c) <= length c