Transitive closures with parameters, as relations a formula may read #
DescriptiveComplexity.TCSpec defines a sentence: a walk on tuples, and the
question whether an accepting node is reachable from a starting one. A
reduction needs more than that – its defining formulas have free variables, so
what they may consult is a relation, not an answer. This file provides it:
a DescriptiveComplexity.ParamTCSpec is a walk whose step formula may mention
par parameters besides its two tuples, and the relation it defines is
reachability itself,
R[m,m'](x̄, ȳ, z̄) – “from the node (m, x̄) the node (m', ȳ) is reachable,
the parameters being z̄” –
one relation per ordered pair of modes. A finite family of such walks
(DescriptiveComplexity.TCFamily) is a block of relation variables
(DescriptiveComplexity.TCFamily.block) whose assignment is fixed, not
guessed: DescriptiveComplexity.TCFamily.reachAssign. A structure expanded by
it is what the formulas of an FO(TC) reduction are read over
(DescriptiveComplexity.TransitiveClosureReduction).
Reachability is an inflationary induction #
The theorem of this file is
DescriptiveComplexity.TCFamily.inflLimit_toStepDef: the reachability
relations of a family are the value of one simultaneous inflationary induction
(DescriptiveComplexity.TCFamily.toStepDef), namely the rules
R[m,m](x̄, x̄, z̄), andR[m,m'](x̄, ȳ, z̄) ← R[m,m''](x̄, ȳ', z̄) ∧ step[m'',m'](ȳ', ȳ, z̄).
They are positive in the relation variables, so the inflationary iteration
computes the least fixed point, which is Relation.ReflTransGen of the step –
the mode pairs being static, each rule is one step formula, and no clausal
apparatus is needed.
That theorem is what makes an FO(TC) reduction an FO(LFP) reduction, and so what gives the FO(TC) reductions their closure properties without a second development. It is also the honest statement of where FO(TC) sits: a walk is a fixed point of a very restricted shape.
Reading an FO(TC) sentence off the relations #
DescriptiveComplexity.TCSpec.acceptsF turns any existing
DescriptiveComplexity.TCSpec into a formula over the expansion by its own
reachability relations: “some accepting node is reachable from some starting
node”, with the walk itself now an atom rather than an operator
(DescriptiveComplexity.TCSpec.realize_acceptsF). Every FO(TC) definable
property is thereby available to an FO(TC) reduction as a formula, which is how
DescriptiveComplexity.EVEN enters DescriptiveComplexity.TCReduction.
Walks with parameters #
A parameterized transitive-closure specification: a walk on k-tuples
carrying a finite mode, whose step formula may mention par parameters beside
the current and the next tuple. Unlike DescriptiveComplexity.TCSpec it has no
src/tgt formulas: what it defines is the reachability relation, and where
a sentence is wanted the endpoints are supplied by the formula that reads it.
The vocabulary is a parameter, not the ordered expansion: the ordered reading
is the instance L := L₀.sum Language.order, as for
DescriptiveComplexity.StepDef.
- Mode : Type
The modes: the finite control the walk carries beside its tuple.
Modes are finite.
- k : ℕ
The walk runs on
k-tuples of elements. - par : ℕ
The number of parameters the step formula may mention.
The step formula, one per pair of modes: the current tuple, the next tuple, then the parameters.
Instances For
Dependency graph
A node of the walk: a mode together with a k-tuple.
Instances For
Dependency graph
One step of the walk, at a valuation of the parameters.
Instances For
Dependency graph
Reachability in the walk, at a valuation of the parameters.
Equations
- s.ReachAt z = Relation.ReflTransGen (s.StepAt z)
Instances For
Dependency graph
Packing a tuple, two endpoints and the parameters #
The position of the i-th coordinate of the first tuple.
Instances For
Dependency graph
The position of the i-th coordinate of the second tuple.
Instances For
Dependency graph
The position of the j-th parameter.
Instances For
Dependency graph
The tuple assembled from two endpoints and a valuation of the parameters.
Equations
Instances For
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Every tuple is packed from its three parts.
Dependency graph
Post-composing a packed tuple with a function packs the components.
Dependency graph
A family of walks, as a block of relation variables #
A finite family of parameterized walks. Its relation variables – one per walk and ordered pair of that walk's modes – are what an FO(TC) reduction's formulas may read.
- Ix : Type
The index type of the family.
The family is finite.
- spec : self.Ix → ParamTCSpec L
The walk of each index.
Instances For
Dependency graph
The block of relation variables of a family: one variable per walk and ordered pair of modes, of arity “two tuples and the parameters”.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The assignment the block has, as opposed to one a second-order quantifier would guess: each variable holds the reachability relation of its walk, at the parameters read off the tuple.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The reachability assignment, unfolded at a tuple.
Dependency graph
Dependency graph
The induction that computes reachability #
The reflexivity rule, as a formula: the two tuples agree – and the two modes, which is decided statically.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The atom “the first tuple reaches the freshly quantified one, in mode
m”.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The last step of the walk: from the freshly quantified tuple, in mode m,
to the second tuple, in the variable's second mode.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The step formula of a relation variable: reflexivity, or one more step after a shorter walk. Both disjuncts are positive in the relation variables, so the inflationary iteration computes the least fixed point.
Equations
- F.stepF q = F.diagF q ⊔ FirstOrder.Language.Formula.iExs (Fin (F.spec q.fst).k) (FirstOrder.Language.Formula.iSup fun (m : (F.spec q.fst).Mode) => F.reachAtomF q m ⊓ F.lastStepF q m)
Instances For
Dependency graph
The induction of a family: one simultaneous inflationary induction
whose relation variables are the family's, and whose value is its
reachability relations (DescriptiveComplexity.TCFamily.inflLimit_toStepDef).
Its output sentence is never read.
Instances For
Dependency graph
Realization of the step formulas #
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The value of the induction is the reachability relations #
Reachability is an inflationary induction: the value of
DescriptiveComplexity.TCFamily.toStepDef is the family's reachability
relations.
Dependency graph
An FO(TC) sentence, as a formula over the reachability relations #
A DescriptiveComplexity.TCSpec read as a parameterized walk with no
parameters, over the ordered expansion its formulas already live in.
Reducible, so that the modes and the arity of the reading are those of the specification transparently – a node of one is a node of the other.
Equations
Instances For
Dependency graph
The one-element family of walks of a DescriptiveComplexity.TCSpec.
Instances For
Dependency graph
Dependency graph
Dependency graph
The reachability atom of the walk, with both endpoints quantified.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Dependency graph
The walk as an atom: “some accepting node is reachable from some starting node”, written over the vocabulary expanded by the walk's own reachability relations. This is what makes every FO(TC) definable property available to an FO(TC) reduction.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The walk-as-an-atom formula says acceptance, when the relation variables hold the reachability relations they are meant to.