Documentation

Complexitylib.Interop.Cslib

Interoperability with CSLib and Mathlib #

CSLib builds its automata and regular-language theory on Mathlib's Language α := Set (List α). Complexitylib's Complexity.Language is Set (List Bool), which is definitionally Mathlib's Language Bool, so a Complexitylib language can be passed to any CSLib or Mathlib statement about binary languages, and conversely, with no conversion. (Mathlib's Language is a separate definition with its own algebra, where + is union and * is concatenation; Complexitylib keeps plain set operations.)

This module connects the two libraries' foundations:

Main results #

theorem Complexity.TM.reachesIn_iff_relatesInSteps {n : ℕ} (tm : TM n) {t : ℕ} {c c' : Cfg n tm.Q} :

A run of exactly t steps is CSLib's RelatesInSteps for the one-step relation. The two definitions build runs from opposite ends: reachesIn adds steps at the front, RelatesInSteps at the back.