Finite values and conditions within a fixed workspace budget #
These fun_prop rules extend those of InSpace.FunProp to values of finite types. A function of
a value of a finite type (budget_finite) costs no workspace beyond the value. Conditions may be
decidable propositions (budget_iteProp), their negations (budget_decideNot), equalities on a
finite type (budget_decideEq) or Boolean connectives.
The rules reach fun_prop only where this module is imported, directly or through
CslibFrontier.Tactic.Space. A direct fun_prop client that needs them imports this module.
The intermediate encoding of budget_finite and budget_decideEq is not determined by the goal.
When no premise determines it, as for a finite function of a component of a finite value,
budget_finite_encFinite and budget_decideEq_encFinite pass through the canonical encoding
encFinite. Such a value used as a component of the argument of another finite function, as in
g ((r x).opp, b x), still needs its encoding stated, for example
have := budget_finite (encC := encFinEnum Guard) Ref.guardOf hr.
budget_decideEq_encFinite, conjunctions and disjunctions (budget_decideAnd, budget_decideOr)
and comparisons ≤ of numbers (budget_natLe) are not registered: each would be tried, and fail,
on every decidable condition, which doubles the search on small certificates. The space tactic
adds them when a first search without them fails; a direct fun_prop client can use
attribute [local fun_prop].
Main results #
budget_iteProp,budget_decideNot,budget_decideEq: decidable conditions within the budget.budget_finite_encFinite: a function of a finite value, through its canonical encoding.budget_decideEq_encFinite,budget_decideAnd,budget_decideOr,budget_natLe: further conditions, whichspacetries after the registered rules.budget_boolNot,budget_boolAnd,budget_boolOr: Boolean connectives within the budget.
A conditional on a decidable proposition, within the budget.
The negation of a decidable proposition, within the budget. This covers ≠ conditions.
Equality of two values of a finite type, within the budget.
The negation of a Boolean, within the budget.
The conjunction of two Booleans, within the budget.
The disjunction of two Booleans, within the budget.
A function of a value of a finite type, through the canonical encoding of the value.
Equality of two values of a finite type, through the canonical encoding of the type. Not
registered with fun_prop; space tries it after the registered rules.
The conjunction of two decidable propositions, within the budget. Not registered with
fun_prop; space tries it after the registered rules.
The disjunction of two decidable propositions, within the budget. Not registered with
fun_prop; space tries it after the registered rules.
The comparison ≤ of numbers, within the budget. Not registered with fun_prop; space
tries it after the registered rules.