Writing quantitative terms #
Helpers for writing a term of quantitative first-order logic
(DescriptiveComplexity.QTerm) the way it is read, and for evaluating it.
A quantifier of DescriptiveComplexity.QTerm binds a block of variables,
named by position in a sum type. DescriptiveComplexity.QTerm.sumOver and
DescriptiveComplexity.QTerm.prodOver bind one variable and hand it to the
body by name: the body is a function of the bound variable, and of the way the
variables already in scope are read under the binder. So
sumOver fun up x => f (up y) x is Σx. f(y, x), and its value is a sum over
the elements (DescriptiveComplexity.QTerm.eval_sumOver).
DescriptiveComplexity.QTerm.cond is the choice between two terms by a
formula.
Σx. t: the body is given the reading of the variables in scope, and the
bound variable.
Equations
Instances For
Dependency graph
Πx. t: the body is given the reading of the variables in scope, and the
bound variable.
Equations
Instances For
Dependency graph
The choice between two terms: s where the formula holds, t where it
does not.