Soundness of the inductive-counting machine #
Every accepting run of DescriptiveComplexity.InductiveCounting.CfgStep proves what it claims:
no target is reachable from a source. The proof is a phase-indexed invariant,
DescriptiveComplexity.InductiveCounting.Inv, preserved by every transition.
The delicate part is the inner loop, where the machine guesses which nodes
belong to the current layer. A guess is certified, so the guessed set is always
a subset of the layer; what rules out a guess that is too small is the count:
the invariant records that the counter is at most the number of layer nodes
already scanned, and that it is strictly below that number as soon as a node
that would have mattered – a target, or a node putting the outer node into the
next layer – has been skipped
(DescriptiveComplexity.InductiveCounting.InnerInv, last clause). At the end of the scan the
counter is checked against |Rset d|, which leaves no room for a skipped node.
Reading a configuration #
The layer index recorded by the stage register.
Equations
Instances For
Dependency graph
A node y witnessing that the outer register's node lies in the next
layer: it is that node, or has an edge to it.
Equations
- DescriptiveComplexity.InductiveCounting.Wit E r y = (↑y = r ∨ DescriptiveComplexity.InductiveCounting.EW E (↑y) r)
Instances For
Dependency graph
Dependency graph
Dependency graph
The next layer is exactly the nodes witnessed by the current one.
Dependency graph
The invariant #
The invariant of the inner loop, relative to the set P of nodes already
scanned by it: the stage count is exact, the outer count is exact for the part
of the next layer already scanned, and the inner count is at most – and, as
soon as something was skipped that should not have been, strictly below – the
number of layer nodes scanned.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The invariant, phase by phase.
Equations
- One or more equations did not get rendered due to their size.
- DescriptiveComplexity.InductiveCounting.PhaseInv E S T DescriptiveComplexity.InductiveCounting.Phase.check s = DescriptiveComplexity.InductiveCounting.InnerInv E S T s Set.univ
- DescriptiveComplexity.InductiveCounting.PhaseInv E S T DescriptiveComplexity.InductiveCounting.Phase.accept s = ¬∃ (a : V) (b : V), S a ∧ T b ∧ Relation.ReflTransGen E a b
Instances For
Dependency graph
The invariant of a configuration.
Equations
Instances For
Dependency graph
Two steps of the inner loop #
Scanning one more node without certifying it.
Dependency graph
Scanning one more node and certifying it: the count goes up, and the flag goes up exactly when the node witnesses the outer node.
Dependency graph
Preservation, phase by phase #
The inner invariant only reads the registers named here.
Dependency graph
Counting the sources, one node at a time.
Dependency graph
The inner loop: skipping a node, certifying a node, or ending the scan.
Dependency graph
The certifying walk: one more edge backwards, or a source is reached.
Dependency graph
The end of a stage: either the counts agree, and the reachable set is the current layer, or the machine moves on to the next layer.
Dependency graph
At the end of the inner scan the count check leaves no room: the certified nodes are exactly the layer, so no target lies in it and the flag says exactly whether the outer node has entered the next layer.
Dependency graph
A certified node is counted in, and tested against the outer node.
Dependency graph
The count check: the outer count is updated and the scan restarts, or the stage is over.
Dependency graph
Nothing leaves the accepting phase.
Dependency graph
Soundness #
The invariant is preserved by every transition.
Dependency graph
The invariant holds at every initial configuration.
Dependency graph
The invariant survives any number of transitions.
Dependency graph
Soundness: if the machine accepts, no target is reachable from a source.