Independent checkers for the certificates of decide. A checker takes a certificate that holds the original operands and the evidence, replays the evidence with its own small algorithms, and returns a CheckedCertificate or a rejection. It reuses no producer, parser or solver, so a checked decision does not depend on the code that found it. The package exports CHECKERS, one checker for each CertificateKind, the types Checker and CheckedCertificate, and machineFamily, which tells whether an operand is a machine.
The former checkReplay, ReplayBody and ReplayEvidence exports represented bounded replay as a certificate. checkBoundedAgreement checks bounded agreement described by BoundedAgreementEvidence, which the scheduler can record as a fact. Agreement through a bound does not establish equivalence.
CHECKERS[CertificateKind.Pump])checkBoundedAgreement)CHECKERS[CertificateKind.Word])CHECKERS[CertificateKind.Derivation])CHECKERS[CertificateKind.Run])CHECKERS[CertificateKind.TwoTrees])CHECKERS[CertificateKind.TwoTrees])Algebraic census. Checks both original parser-table unambiguity premises and one original induction inclusion, derives a finite degree horizon from the original productions and independently counts every coefficient through it. (CHECKERS[CertificateKind.Census])
Expression isomorphism. Checks a terminal bijection and compares the original and renamed expression trees after sorting union arguments. The original literal trees must match. (CHECKERS[CertificateKind.Isomorphism])
Greibach bisimulation. Checks a finite relation on sequences of variables, including the start pair, empty acceptance and matching successors in both directions. (CHECKERS[CertificateKind.Bisimulation])
Isomorphism. Checks a renaming of variables, states or controls between two grammars or machines. The forms cover grammar renaming, machine renaming, state elimination, the alphabet-star form and accepting-epsilon equality of two DPDAs. (CHECKERS[CertificateKind.Isomorphism])
Grammar rewrite chain. Checks a sequence of steps from one grammar to another, where each step is compared with the previous endpoint and no step is trusted. The steps are useful reduction, unit closure, fresh start, terminal isolation, binary factoring, nullable removal and concatenation closure, plus structural merge, acyclic inlining and redundant rule removal. The two endpoints are compared by a complete named bijection. (CHECKERS[CertificateKind.GrammarRewrite])
Bisimulation. Checks a relation between the state sets of two DFAs, NFAs or regexes (over the Thompson states of an expression, or in the form PartialDerivative over the Antimirov partial derivatives of an expression, which the checker computes itself), a partition of the control states of two machines, a synchronized linear relation of two linear grammars, or, in the form SimpleGrammar, a bisimulation up to congruence between two simple grammars, or, in the form OneCounter, a bisimulation between two real-time deterministic one-counter automata that the checker reads from the original pushdown machines, with single pairs and families of pairs whose counters grow together and whose steps keep both counters positive, whose successor pairs each have an explicit derivation by reflexivity, symmetry, transitivity and congruence under concatenation. (CHECKERS[CertificateKind.Bisimulation])
Composite. Checks a graph of logical steps where each premise is an earlier node. Steps are leaf certificates, symmetry, transitivity, union and concatenation of equal parts, both inclusions, action-trace projections, closure constructions and transports of translations. Closure steps check the construction frames against their original operands and bind them to equality premises. The standalone checker verifies a closure frame without asserting equality between the source and target. The projection checker rebuilds the complete actions of the original machines and checks the map to the NFA premises. The transports cover DFA quotients, NFA determinization, regex to NFA, NFA to right-linear grammar, finite and marked tape machines, CFG to PDA, PDA to CFG, two-way DFA to DFA, CNF to LBA parse forests, CNF to Greibach form, reverse CSG to LBA, entry LBA to CSG window grammars and Turing machine to unrestricted grammar. (CHECKERS[CertificateKind.Composite], checkClosureFrame)
The NfaToRegex and CfgToCnf conversions have independently checked state-elimination and grammar-rewrite proofs through conversion-proof. The CfgToTm, PdaToLba and PdaToTm forest routes use checked component proofs through coldTapeProof. The shared-image rule binds both original operands, both complete converted targets and one total injective letter map on the original alphabet union. Two checked equalities relate the renamed originals to the targets. The CFG image equality uses the forest route, and the unrestricted image equality uses an independent reverse grammar queue and complete tape simulation check. Compatible nonidentity maps are admitted. (CompositeRule.Encoding, Registry.imageProof)
The direct CsgToLba checker covers the reverse-rewrite construction. A CFG-shaped CSG uses a checked grammar isomorphism, a grammar rewrite and the CNF forest transport. The direct LbaToCsg checker covers both the original entry window grammar and the normalized grammar with virtual marker visits. It reconstructs the fresh controls and every simulation rule from the original LBA and checks empty-word acceptance with independent machine replay. Rejecting starts and rejecting dead ends keep their rejection. A deterministic read-only entry LBA uses checked regular transports, a grammar rewrite and a grammar isomorphism. These decompositions need supplied intermediate evidence. UnrestrictedToTm keeps its injective-image metadata. Its reverse queue checker verifies equality for the exact encoded grammar, and a checked rewrite supplies a normalized intermediate when needed.
The later IDs RegularGrammarToNfa, RegularComponentsToNfa, RegexToGlushkov, RegexToAntimirov and KurodaForm have no transport or checked route established here. CfgToUnrestricted can use a grammar isomorphism for its unchanged productions. CfgToCsg can use a grammar rewrite followed by a grammar isomorphism. Neither ID has a direct transport here.
Composite parser transports verify the original LL(1) or LR(1) table and independently
reconstruct the entire DPDA, including exact end-of-input predecessor summaries. The
reconstructed machine must equal the claimed conversion endpoint. The checker imports
no table builder or pushdown constructor. (CompositeRule.ParserTranslation)
Unary and strongly regular grammar transports independently rebuild the target NFA from the original grammar. The unary check reconstructs the bounded multiset graph. The strongly regular check reconstructs the oriented component templates and their copies.
Finite enumeration. Checks that a context-free grammar has no productive start variable, or that its language is finite and equals a listed set of words, by a productivity and reachability argument. Unary DFA, NFA, regex and two-way DFA claims use independent finite-state reachability, a bounded path potential that excludes useful consuming cycles and complete state-word closure. Regexes expand independently to Thompson automata, and two-way DFAs use exact boundary summaries. (CHECKERS[CertificateKind.Enumeration])
Semilinear equality. Checks that two context-free grammars with bounded letters have equal Parikh images, using covers by linear sets. A word-block descriptor binds the original languages to fresh tokens through checked inverse and intersection frames. The checker independently proves original containment in the supplied word envelope and verifies the exact ordered-token monitor before checking the covers. (CHECKERS[CertificateKind.Semilinear])
Induction. Checks that one grammar lies inside another, or that each of two grammars lies inside the other, by induction on derivations. An inclusion claim carries the forward proof alone, and an equivalence claim carries both proofs. For each useful variable of the contained grammar, the proof lists forms of the containing grammar. For each useful production and each choice of one listed form per symbol, the joined form must rewrite from a listed form of the head, after lemmas contract occurrences of a variable followed by a fixed tail into one form. The checker proves each lemma by induction on the derivation of its variable, from the right sides of that variable's productions. The rewrite test is its own span fixed point over the productions. A unary guard checks the count of each useful source production and derives the resulting singleton word from the target start. (CHECKERS[CertificateKind.Induction])
Type closure. Checks a finite table of paired types of two grammars whose rules split their terminals into internal, call and return roles. A table closed under every constructor proves that the two languages of well-matched words are equal. (CHECKERS[CertificateKind.TypeClosure])
The same checker accepts two pushdown machines after independently checking one shared visible partition, empty initial and final stack requirements and the absence of rejecting controls. Each call pushes one symbol, each return pops one matching symbol, and each internal step leaves the stack unchanged. The checker reconstructs both balanced return grammars from the original transitions before checking the paired types.
CHECKERS[CertificateKind.Valuation])CHECKERS[CertificateKind.ParikhSeparation])CHECKERS[CertificateKind.RegularSeparation])CHECKERS[CertificateKind.BlockExponents])checkUnboundedWitness)CHECKERS[CertificateKind.Antichain])CHECKERS[CertificateKind.RegularInvariant])Position pairs. Rebuilds the original-production position graph and checks initial reachability, successor closure and absence of completed conflicting pairs. It includes distinct exposed reductions and structural end markers. (CHECKERS[CertificateKind.PairInvariant])
Regular overlap. Checks summary closure under every original production and containment of both regular approximations for every original alternative pair and split. It independently builds each exact regular overlap and verifies its regular-invariant proof of inclusion in the empty DFA. (CHECKERS[CertificateKind.RegularDisjointness])
Regular unambiguity recheck. Runs the path-product check on the original finite automaton or classical regular expression and reports agreement, disagreement or exhaustion. It issues no certificate and leaves verdict trust unchanged. Both the procedure and recheck use the same algorithm, so this is a repeated check rather than independent proof evidence. (recheckRegularUnambiguity, RecheckAgreement)
LL(1) table. Checks the first, follow and nullable sets of a grammar and the absence of table conflicts. (CHECKERS[CertificateKind.LlTable])
LR(1) table. Checks a closed LR(1) automaton of a grammar and the absence of conflicts. Closed item sets may merge canonical states, as in an LALR table. (CHECKERS[CertificateKind.LrTable])