This repository contains a formalization of Mazurkiewicz trace theory in the Lean theorem prover.
Defs.leancontains fundamental definitions for traces.Basic.leancontains basic properties of the algebra of traces.DependenceMorphism.leanprovides a way to show isomorphism to the algebra of traces via dependence morphisms.
DependenceGraph.leancontains a definition of the algebra of dependence graphs and proof of its isomorphism to traces.Histories.leancontains a definition of the algebra of histories and proof of its isomorphism to traces.
Language.leancontains basic definitions and lemmas for trace languages.MyhillNerode.leansupplies a proof of the Myhill-Nerode theorem in the context of monoids.Hashiguchi.leancontains a proof of Hashiguchi's theorem on recognizable trace closures.RegularExpressions.leanreinterprets mathlib4'sRegularExpressionon traces.Ochmanski.leancontains the proof of Ochmański's theorem on recognizable trace languages and lemmas leading up to it.
List.leancontains misc. definitions and lemmas forList(string) manipulation.Occurrence.leanformalizes ordering of symbol occurrences.EdgeSubset.leanis a proof of the negation of a claim in The Book of Traces (Proposition 1.4.2).Computability.leansupplies a full proof of Kleene's theorem together with mathlib4.
General guideline:
a, b, c, d, efor symbols.i, j, kfor indices.n, mfor sizes.u, v, w, x, y, zfor strings,x', x''orx₁, x₂orp, q, rfor factoring.s, t, u, vfor traces or monoid elements.Sfor (subsets of) alphabets.Xfor word (string) languages.Tfor trace langauges.