The semantic parameters, filled in: the comparison atoms #
The rule shapes of the program were closed before a single semantic choice
was made, the content riding in parameter packs
(DescriptiveComplexity.Draw.StageArgs and friends). This file begins filling
them, at the kind whose loop is simplest: a comparison – an equality or
an order atom between two levels of the prefix.
What the machine does there, and what the packs say (the anchor is
DescriptiveComplexity.Problems.Wide.DrawCmp): walk the canonically padded
cells of the two argument blocks in the lexicographic order of their dd₀
coordinates, reading one bit from each block per cell – which is why
these are element loops and not file tests – and keep three bits of
bookkeeping: whether every cell so far agreed, whether a difference has been
seen, and, at the first difference, whether it was the second block that
held the cell. An equality atom's verdict is the first bit; an order atom's
is «agreed throughout, or the first difference went the right way».
Where a level's point lives is fixed here too
(DescriptiveComplexity.Draw.Data.lvBlk / lvTrack), in the dictionary of
DescriptiveComplexity.Problems.Wide.DrawLeaf: the free levels in the outer
blocks of the MIRROR register – the working address – and the quantified ones
in the inner blocks of VAL.
Where a level's point lives #
The argument block a level's point occupies: an outer block – of the working address – below the variable's arity, an inner one – of the VAL register – above it.
Instances For
Dependency graph
The register a level's point is read from: MIRROR for a free level, VAL for a quantified one.
Equations
Instances For
Dependency graph
The comparison loops' bookkeeping #
Every cell so far agreed.
Instances For
Dependency graph
A difference has been seen.
Instances For
Dependency graph
At the first difference, the second block held the cell.
Instances For
Dependency graph
The two paired reads of a comparison's round.
Equations
- dt.cmpRdC hnf k = dt.rdfC (Fin.castLE hnf k)
Instances For
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
One round of a comparison #
The bookkeeping of one round: the pair of bits just read is folded into the three flags – agreement so far, a difference has been seen, and the verdict at the first difference, which is why the last is written only while none has been seen.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
What a comparison concludes: an equality atom holds when every cell agreed; an order atom when they did, or when the first difference was the second block's.
Equations
Instances For
Dependency graph
The loop's first round starts from agreement: nothing differs yet, no difference has been seen, and the tuple is the least.
Equations
Instances For
Dependency graph
The read-backs a run cites #
Dependency graph
Dependency graph
Dependency graph
The loop element rides along the bookkeeping, so a round may fold and advance in one step.
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The pack #
The parameters of a comparison atom's loop: the two paired reads – one in each level's block, at the padded cell of the control's narrow tuple – the three bookkeeping flags, and the narrow tuple enumeration. The verdict lands in the atom's own slot.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
A comparison's exit reads the control alone: the atom's verdict is folded out of the flags, not off the tape.
Dependency graph
The tag witnesses of an expansion atom #
An expansion atom must know the tags of its argument points before it can
pick the defining sentence to run: it reads, for each argument position and
each tag, whether that tag's witness cell belongs to the position's block
(DescriptiveComplexity.Draw.Data.blk_encTagTup_iff – the read is the
point's tag test), and files the answer in a flag. The branch checkpoint then
dispatches on the whole tuple, which the flags decode one-hot: that is
what makes its dispatches exclusive, and it is the only hypothesis
DescriptiveComplexity.Draw.tagSep asks for.
The tag inventory as a Fintype, so that positions and tags can be
numbered together.
Equations
- dt.instFintypeTagX = Fintype.ofFinite dt.X.Tag
Dependency graph
The flag of one witness read: argument position ℓ, tag t.
Equations
- dt.tagIx hk ℓ t = dt.tgfC (Fin.castLE hk (finProdFinEquiv (ℓ, (Fintype.equivFin dt.X.Tag) t)))
Instances For
Dependency graph
Dependency graph
What the flags say: the tuple of tags they decode, read as a one-hot family – position by position, exactly the tag of that position is flagged.
Equations
Instances For
Dependency graph
The witness read's guard: the tag witness cell of the tag t in the
block of the level the position reads. Its digit is the point's tag test.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The decoding is exclusive: a one-hot family determines its tuple, so
the branch checkpoint's dispatches never co-fire. This is the hypothesis
DescriptiveComplexity.Draw.tagSep carries.
Dependency graph
The read leaves of an expansion atom #
A round of an expansion atom's element loop makes one trip per block atom
of the defining sentence's matrix: the atom names a copy – which argument
point – a relation variable of that point's block, and the levels its payload
reads. The trip goes to the cell of that member tuple, in the block the copy's
level occupies, and its digit is the assignment bit
(DescriptiveComplexity.Draw.Data.blk_encAsgTup_iff).
The data of the r-th read leaf: the block atom's variable – a copy
of the block, so an argument position paired with one of the point's
relation variables – and the levels its payload reads.
Instances For
Dependency graph
The leaf is that block atom: what the trip's digit has to mean.
Dependency graph
The payload a read leaf spells: the block atom's levels, read out of
the loop's wide tuple and padded to the block's arity bound – which is
exactly the payload of the member tuple
DescriptiveComplexity.Draw.encAsgTup.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The track a read leaf reads: the register the copy's level lives in.
Equations
- dt.expRdTrack v ts e τ r = dt.lvTrack v (ts (DescriptiveComplexity.Draw.Data.relLeafData e τ r).fst.1)
Instances For
Dependency graph
The cell a read leaf goes to: the member tuple of the copy's point, in the block that point occupies.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Where a read leaf files its bit: the leaf-read flag of its index.
Equations
- dt.expSetFlag zero one e τ r hrd b f _g = dt.setCtl zero one (dt.rdfC (Fin.castLE hrd r)) (b = true) f
Instances For
Dependency graph
The leaf of a branch, as the control computes it #
The value of a branch's matrix, from the control alone: its block atoms are the leaf-read flags the round has just filed, its base atoms are guards – equalities, base relations and order comparisons on the loop's own tuple, which the transition table evaluates where they stand.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
What the control computes is the branch's leaf. Given that every
leaf-read flag holds its block atom's value – which
DescriptiveComplexity.Draw.Data.regBit_expMatch is what the trip
delivers – the Boolean function of the flags and the guards is the leaf
predicate DescriptiveComplexity.Draw.Data.expLeaf of
DescriptiveComplexity.Problems.Wide.DrawExp.
Dependency graph
A branch's loop, wired #
A branch's loop, started: the wide tuple at the least, the sub-fold's accumulators at the polarity's units.
Instances For
Dependency graph
A branch's round, folded and advanced: the leaf the round just
computed is filed, the accumulators fold at the coordinate the tuple carries
(DescriptiveComplexity.Draw.tupCarry), and the tuple steps.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
A branch's last round: the final leaf is filed and the sub-fold's verdict lands in the atom's slot.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The witness reads of an expansion atom, numbered: one per argument position and tag.
Equations
- dt.wIx i = ((finProdFinEquiv.symm i).1, (Fintype.equivFin dt.X.Tag).symm (finProdFinEquiv.symm i).2)
Instances For
Dependency graph
The parameter pack of an expansion atom's machinery: the tag witnesses and their one-hot decoding, then, per branch, the read leaves of the defining sentence and the sub-fold over its prefix.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
An expansion atom's exit reads the control alone.
Dependency graph
The gates #
A gate asks of one outer block of the working address – held in MIRROR –
that it encode a point: which tag its witness carries, that every member is
well-shaped for that tag, and that the tag's domain sentence hold of the
decoded assignment (DescriptiveComplexity.Draw.isEnc_iff_parts). The last is
the element loop again, at the domain pack, and all of its read leaves go to
the same block – the domain sentence is over the un-replicated block, so
every block atom is about the gated point itself.
The tag-witness guard of a block: the cell of the tag's witness tuple.
Equations
- dt.tagWitnessMatch zero one b t = dt.nameGF one b (dt.encCoord zero one (Sum.inl t) fun (x : dt.CtlIx → A) (x_1 : Fin (DescriptiveComplexity.blockArityBound dt.X.B)) => zero)
Instances For
Dependency graph
A gate's tag flag: one per tag of the block it gates.
Equations
- dt.gateTagC hc t = dt.tgfC (Fin.castLE hc ((Fintype.equivFin dt.X.Tag) t))
Instances For
Dependency graph
What a gate's flags say: the tag they decode, one-hot.
Equations
Instances For
Dependency graph
A gate's decoding is exclusive, so its branch never co-fires.
Dependency graph
The data of the r-th read leaf of a domain sentence: the point's
relation variable and the levels its payload reads – all at the gated block,
since the sentence is over the block itself.
Instances For
Dependency graph
The leaf is that block atom.
Dependency graph
The payload a domain read leaf spells.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The cell a domain read leaf goes to: the member tuple of the gated point, in the block being gated.
Equations
Instances For
Dependency graph
Where a domain read leaf files its bit.
Equations
- dt.domSetFlag zero one t r hrd b f _g = dt.setCtl zero one (dt.rdfC (Fin.castLE hrd r)) (b = true) f
Instances For
Dependency graph
The value of a domain sentence's matrix, from the control alone.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
What the control computes is the domain sentence's leaf, given that every leaf-read flag holds its block atom's bit.
Dependency graph
A gate's domain loop, started.
Instances For
Dependency graph
A gate's domain round, folded and advanced.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The dispatch's default tag. A gate's branch checkpoint dispatches on the decoded tag of its block value; where the witness flags are not one-hot – block values the sweeps and the VAL enumeration produce and no point encodes – the checkpoint fires into this tag's branch instead, and the branch's conjoining exit reads the non-one-hotness off the surviving witness flags and clears the flag. Any tag serves.
That last sentence is what permits the choice, and is why the tag is chosen from a
nonemptiness of the tags rather than from a point: an interpretation names
this tag in a formula, so it must be the same tag at every instance, and by
proof irrelevance a Classical.ofNonempty at a Prop is (the structure only
witnesses that the tags are inhabited, and which structure witnessed it does
not survive into the value). Choosing a point instead would give a different
tag at a different instance, and no formula could name it.
Equations
Instances For
Dependency graph
What a gate's branch checkpoint dispatches on: the decoded tag where the witness flags are one-hot, the default tag where they are not – so some dispatch always fires, on every block value. The exit's one-hotness conjunct makes the default branch clear the flag, so totality costs no wrong verdict. Shared by the outer gates (at MIRROR) and the inner ones (at VAL).
Equations
- dt.DspTagsAre one hc t f = (dt.GateTagsAre one hc t f ∨ t = dt.defTag ∧ ∀ (t' : dt.X.Tag), ¬dt.GateTagsAre one hc t' f)
Instances For
Dependency graph
The total dispatch is still exclusive, so the branch never co-fires.
Dependency graph
The tag a gate dispatches to: the unique tag whose witness the block value holds, where there is one; the default tag otherwise.
Equations
Instances For
Dependency graph
At a one-hot block value the dispatch is the decoded tag – how a gated address's per-block tag data pins the dispatch.
Dependency graph
A gate's conjoining exit: the flag keeps its value only if the block's witness flags are one-hot at the dispatched tag – so the default branch always clears – and the sub-fold of the tag's domain sentence holds.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The parameter pack of one gate block's domain evaluation: the tag witnesses of the block, their one-hot decoding, and per tag the read leaves of its domain sentence with the sub-fold over its prefix.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The stage atoms #
A stage atom is the random access: the argument points' blocks are copied into the outer blocks of TARGET – one coordinate loop per position, a read trip and a write trip per padded cell – the working cell is sought to that address, and the stage track is read under the head. Everything the pack names is already fixed: where a level's point lives, the narrow tuple enumeration, and the copied bit's flag.
The parameter pack of a stage atom's machinery: the source track and block of each argument position, the outer block of TARGET it is copied to, the coordinate loop and its copied bit, the stage track read under the head, and the atom's verdict slot.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
A stage atom's verdict store reads the control alone: what it files is the bit the random access came back with, and that bit is a hypothesis of the store, not a read of it.
Dependency graph
The dispatch: one pack per atom #
The pack of an atom, by its kind, with the budgets it needs as
hypotheses about that kind – so the match is on the kind itself and the
stuck DescriptiveComplexity.Draw.Data.kindOf never has to be unfolded.
Equations
- dt.kindArgsOf zero one v a (DescriptiveComplexity.Draw.MatAtom.eq j₁ j₂) x_4 x_5 hrd = dt.cmpArgs zero one v a hrd true j₁ j₂
- dt.kindArgsOf zero one v a (DescriptiveComplexity.Draw.MatAtom.ord j₁ j₂) x_4 x_5 hrd = dt.cmpArgs zero one v a hrd false j₁ j₂
- dt.kindArgsOf zero one v a (DescriptiveComplexity.Draw.MatAtom.stage i ts) x_4 x_5 x_6 = dt.stageArgs zero one v i ts a
- dt.kindArgsOf zero one v a (DescriptiveComplexity.Draw.MatAtom.exp e ts) hk hn hrd = dt.expArgs zero one v ts e a hk ⋯ ⋯
Instances For
Dependency graph
The pack of the a-th atom of a variable's matrix.
Equations
- dt.atomArgs zero one v a = dt.kindArgsOf zero one v (Fin.castLE ⋯ a) (dt.kindOf v a) ⋯ ⋯ ⋯
Instances For
Dependency graph
The whole pack of a variable #
The well-shapedness question of a gate, per cell: a cell of the gated
block whose digit is set must carry a canonically padded element whose name
slots spell an encoded tuple – the witness of some tag, or a member of some
relation variable. With the tag out of the members
(DescriptiveComplexity.Draw.PtCode) this is a question about the cell and
nothing else, which is what a file test can ask.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The well-shapedness question of an inner gate, per cell: the same
question as DescriptiveComplexity.Draw.Data.wellShapedG with the digit
read off the VAL register instead of the mirror.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
An inner gate's conjoining exit: as
DescriptiveComplexity.Draw.Data.gateExit, into the given flag – the
level's polarity chooses which of the round's two flags – with one
conjunct more: the witness flags must be one-hot at the dispatched
tag. On the genuine branch the conjunct is what the dispatch already
knew; on the default branch it is false, so the flag is cleared – which is
the right verdict, a block value with no one-hot witness encoding no
point.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The parameter pack of one inner gate block: the outer gates' pack with the read tracks on VAL and the verdict conjoined into the level's polarity flag.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The semantic pack of one variable's machinery, assembled: the atoms' packs by kind, the gates' per block, the fold updates in the control, and the stage slot the variable writes – the output's being the marker itself, which a true verdict rewrites with the value already there and a false one erases just as the machine halts.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
What a read leaf finds #
A read leaf's digit is the block atom's value. At a block holding the
encoding of the copy's point, the bit the trip finds at the member tuple is
exactly what
DescriptiveComplexity.Draw.BlkAtom.holds says of the atom, at the valuation
the loop's wide tuple spells. This is the join between
DescriptiveComplexity.Problems.Wide.DrawExp's leaf predicate and the
machine.