Interoperability #
Aggregation module for bridges to CSLib and Mathlib.
Complexitylib.Interop.Cslibconnects the machine model to CSLib's step relations and, throughComplexitylib.Interop.Cslib.Regular, to the regular-language and automata theory that CSLib builds on Mathlib'sLanguage: the finite-state scanner that runs a regular language's automaton places it inDSPACE(0), inL, and inP, each proved separately from that scanner (mem_DSPACE_zero_of_isRegular,mem_L_of_isRegular,mem_P_of_isRegular).Complexitylib.Interop.Cslib.MultiTaperuns our machines on CSLib's multi-tape machines, transferringDTIME,DTISP,P, andFPto CSLib's time and space measures.Complexitylib.Interop.Cslib.FromMultiTaperuns CSLib's machines on ours, giving equivalences for bothPandFP.Complexitylib.Interop.Cslib.Circuittranslates between our fan-in-two circuits and CSLib's De Morgan circuits, transferring CSLib's Shannon and Lupanov bounds and characterizingP/polyin CSLib's circuit model.Complexitylib.Interop.Cslib.CircuitClasseslifts these to theSIZEclasses, andComplexitylib.Interop.Cslib.CircuitDepthmatches circuit depth in both directions.Complexitylib.Interop.Mathlib.TM0simulates finite Mathlib machines with binary input and output on CSLib symbol tracks. Polynomial source time and output length on every input imply canonicalFPmembership. ItsGuardinterface validates regular input formats and returns empty output on malformed strings, extending source bounds on valid inputs toFP.Complexitylib.Interop.Mathlib.TM2proves quadratic transition overhead for Mathlib's existing stack-to-tape compiler, preserving the complete stack-track input and output tapes of bundledFinTM2computations.Complexitylib.Interop.Mathlib.TM2.FPtransfers total binary-string TM2 certificates with finite working alphabets to canonicalFP, including the marked empty-input representation and both reversals of stack order. Its DFA-guarded theorem requires source bounds only on valid strings and returns empty output on malformed strings. Its encoded interface supports independent finite input and output alphabets, including empty alphabets, through explicit palindromic symbol codes.Complexitylib.Interop.Mathlib.TM0.Markedhandles distinct input and output formats, including first-cell and empty-input markers.Complexitylib.Interop.Mathlib.TM0.Alphabetparses and emits codes for finite source alphabets, rejecting invalid symbol codes before source execution.Complexitylib.Interop.Cslib.Guardvalidates regular input domains before starting an arbitrary binary CSLib machine.