All proofs
Project-declaredLean 4.33.0-rc1 · mathlib@169c26b52a38

Dfa num state ge

Language.dfa_num_state_ge

Plain-language statement

Given a set of strings all distinguishable by l (i.e., not related to each other by the Nerode congruence on l), the number of states in the DFA accepting l is at least the number of strings in the set.

Exact Lean statement

theorem dfa_num_state_ge
    {l : Language α} {ws : Set (List α)} [Finite ws]
    (hws : ws.Pairwise (¬ (l.NerodeCongruence).r · ·))
    {State : Type*} [Finite State] {M : DA.FinAcc State α} (hm : language M = l) :
    Nat.card State ≥ Nat.card ws

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem dfa_num_state_ge    {l : Language α} {ws : Set (List α)} [Finite ws]    (hws : ws.Pairwise (¬ (l.NerodeCongruence).r · ·))    {State : Type*} [Finite State] {M : DA.FinAcc State α} (hm : language M = l) :    Nat.card State  Nat.card ws := by  -- In this proof it is easier to work with `Fintype` rather than `Finite` because of the use of  -- the theorem `Fintype.exists_ne_map_eq_of_card_lt` below.  have : Fintype State := Fintype.ofFinite _  have : Fintype ws := Fintype.ofFinite _  simp only [Nat.card_eq_fintype_card]  by_contra! h  by_cases h_card : Fintype.card ws  1  · grind [Fintype.card_pos_iff.mpr M.start]  · obtain ⟨⟨x, hx, y, hy, _, _ :=      Fintype.exists_ne_map_eq_of_card_lt (f := fun w : ws  M.mtr M.start w) h    grind [hws hx hy, da_nerodeCongruence_iff M x y]
Project
Lean Computer Science Library
License
Apache-2.0
Commit
f36649cff2c9
Source
Cslib/Computability/Languages/MyhillNerode.lean:125-140

Reuse this declaration

Bring the exact result into your workflow

The import identifies the source module. Your project still needs the pinned package dependency shown on this page.

What this badge means

This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.

Continue in this project

Related declarations

Project-declaredLean 4.33.0-rc1

Unique minimal

Cslib.Automata.DA.FinAcc.unique_minimal

Plain-language statement

The minimal DFA M accepting the language l is unique up to unique isomorphism.

computer sciencecomputabilityprogram semantics

Source project: Lean Computer Science Library

Person-level attribution pending.

View proof record
Project-declaredLean 4.33.0-rc1

Buchi Family cover

Cslib.Automata.NA.Buchi.buchiFamily_cover

Project documentation

na.buchiFamily is a cover if na has only finitely many states. This theorem uses the Ramsey theorem for infinite graphs and does not depend on any details of na.BuchiCongruence other than that it is of finite index.

computer sciencecomputabilityprogram semantics

Source project: Lean Computer Science Library

Person-level attribution pending.

View proof record