Budgets for deterministic walks #
A deterministic machine that simulates a functional walk – one where every node has at most one successor – cannot afford to follow it forever: the walk may cycle, and the machine would then never come back to try anything else. It must give up after a number of steps it can count, and the two halves of that argument are here, both independent of any machine.
The walk is an iterated function #
A functional relation is a partial function, and
DescriptiveComplexity.stepNext makes it total by leaving a node without successor
where it is. Reachability is then iteration
(DescriptiveComplexity.reach_iff_iterate), and the budget is the pigeonhole:
a reachable node is reachable in fewer steps than the type has elements
(DescriptiveComplexity.exists_iterate_lt_card), because a shortest walk cannot
visit a node twice – splicing out the loop would shorten it.
The counter can count that far #
The counter a machine can afford is an element of a finite linear order walked
along covers, so what it must be shown is that enough covers are available:
DescriptiveComplexity.Ticks n z says n of them are, and
DescriptiveComplexity.ticks_of_orank says that this holds as soon as
DescriptiveComplexity.orank z + n is less than the number of elements – at the
bottom, one cover short of the whole order. Matching the two halves is then a
matter of counting the nodes and the counter values with the same number.
A functional relation, walked as a function #
The successor along a functional relation, a node without one being left where it is: the walk as a total function, so that reachability becomes iteration.
Equations
- DescriptiveComplexity.stepNext R a = if h : ∃ (b : N), R a b then h.choose else a
Instances For
Dependency graph
Dependency graph
Dependency graph
On a functional relation the walk follows the only step there is.
Dependency graph
Reachability along a functional relation is iteration.
Dependency graph
The step budget: a node reachable along a functional relation is reachable in fewer steps than the type has elements. A shortest walk visits distinct nodes – a repeat could be spliced out.
Dependency graph
How far a counter can count #
n covers are available above z: what a counter must have left for a
machine to afford n more steps.
Equations
- DescriptiveComplexity.Ticks 0 x✝ = True
- DescriptiveComplexity.Ticks n.succ x✝ = ∃ (z' : C), x✝ ⋖ z' ∧ DescriptiveComplexity.Ticks n z'
Instances For
Dependency graph
Dependency graph
Dependency graph
A counter can tick as often as its rank leaves room: at the bottom, one tick short of the whole order.
Dependency graph
The bottom of the order can tick through all of it.