Morphisms between DFAs #
This file defines morphisms between DFAs, which are bundled functions between the state spaces that respect the transition function, start state, and accept states of the DFAs.
We then define a partial order on AccessibleFinDFAs where M ≤ N iff there exists a surjective
morphism from N.toDFA to M.toDFA.
Main definitions #
DFA.Hom- A morphism from theDFAMto theDFAN, notatedM →ₗ N.DFA.Equiv- An equivalence ofDFAs, which is a bijective morphism, notatedM ≃ₗ N.AccessibleFinDFA.HomSurj- A morphism on the underlyingDFAs of theAccessibleFinDFAs that is surjective on states. NotatedM ↠ N.AccessibleFinDFA.le- Notated≤, the partial order onAccessibleFinDFAs.AccessibleFinDFA.IsMinimal- A predicate thatMis minimal by the partial order, up to equivalence of the underlyingDFAs.
Main theorems #
DFA.hom_pres_lang-M.accepts = N.acceptswhen there existsf : M →ₗ N.AccessibleFinDFA.le_refl- Reflexivity of≤.AccessibleFinDFA.le_trans- Transitivity of≤.AccessibleFinDFA.le_antisymm- Antisymmetry of≤up to equivalence of underlying DFAs.
Notation #
M →ₗ N- Notation forDFA.Hom M N.M ≃ₗ N- Notation forDFA.Equiv M N.M ↠ N- Notation forAccessibleFinDFA.HomSurj M N.M ≤ N- Notation for the partial order onAccessibleFinDFAs.
Blueprint #
One DEF entry for
DFA.HomandDFA.Equiv. Label : dfa-hom Lean defs :DFA.Hom,DFA.EquivContent : explain the structures Dependencies : dfaOne DEF entry for the partial order on
AccessibleFinDFAs. Label : accessible-fin-dfa-le Lean defs :AccessibleFinDFA.HomSurjAccessibleFinDFA.leAccessibleFinDFA.le_reflAccessibleFinDFA.le_transAccessibleFinDFA.le_antisymmAccessibleFinDFA.isMinimalContent : explain how we can define a partial order onAccessibleFinDFAs by the existence of a surjective morphism between their underlying DFAs. Prove that this is a partial order up to equivalence of the underlying DFAs. Explain whatIsMinimalmeans by this definition. Dependencies : accessible-fin-dfa, dfa-hom
A morphism of DFAs from M to N.
- toFun : σ₁ → σ₂
Underlying function map from states of
Mto states ofN. The function preserves the start state.
The function preserves the set of accepting states.
The function preserves state transitions.
Instances For
M →ₗ N denotes the type of DFA.Hom M N.
Equations
- DFA.«term_→ₗ_» = Lean.ParserDescr.trailingNode `DFA.«term_→ₗ_» 25 26 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " →ₗ ") (Lean.ParserDescr.cat `term 25))
Instances For
An equivalence of DFAs is a bijective morphism.
- left_inv : Function.LeftInverse self.toInvDFAHom.toFun self.toDFAHom.toFun
- right_inv : Function.RightInverse self.toInvDFAHom.toFun self.toDFAHom.toFun
Instances For
M ≃ₗ N denotes the type of DFA.Equiv M N.
Equations
- DFA.«term_≃ₗ_» = Lean.ParserDescr.trailingNode `DFA.«term_≃ₗ_» 25 26 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ≃ₗ ") (Lean.ParserDescr.cat `term 25))
Instances For
The identity equivalence on a DFA.
Equations
- DFA.Equiv.refl M = { toDFAHom := DFA.Hom.refl M, toInvDFAHom := DFA.Hom.refl M, left_inv := ⋯, right_inv := ⋯ }
Instances For
Surjective Morphisms of AccessibleFinDFAs #
A surjective morphism between the underlying DFAs of AccessibleFinDFAs.
- toFun : σ₁ → σ₂
- surjective : Function.Surjective self.toFun
The function is surjective.
Instances For
M ↠ N denotes the type of AccessibleFinDFA.HomSurj M N.
Equations
- AccessibleFinDFA.«term_↠_» = Lean.ParserDescr.trailingNode `AccessibleFinDFA.«term_↠_» 25 26 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ↠ ") (Lean.ParserDescr.cat `term 25))
Instances For
Forget the surjectivity proof and view HomSurj as a DFA morphism.
Instances For
Partial Order on AccessibleFinDFAs #
The preorder on AccessibleFinDFAs: M ≤ N iff there is a surjective morphism N ↠ M.
Instances For
M ≤ N denotes the proposition le M N.
Equations
- AccessibleFinDFA.«term_≤_» = Lean.ParserDescr.trailingNode `AccessibleFinDFA.«term_≤_» 25 26 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ≤ ") (Lean.ParserDescr.cat `term 26))
Instances For
Reflexivity of the preorder on AccessibleFinDFAs.
Transitivity of the preorder on AccessibleFinDFAs.
Antisymmetry of the preorder up to equivalence of the underlying DFAs.