Preliminaries for Hyde's Theorem #
theorem
odd_tuples_aux
{A : Type u_1}
{k : ℕ}
{w : Fin (2 * k + 1) → A}
{v : Fin (2 * k + 1) → A}
{i : Fin (2 * k + 1)}
(g₀ : ¬↑i < k + 1)
(g₆ : ⟨2 * k + 1 - ↑i, ⋯⟩ = Fin.last k)
(h₂ : v i = w ⟨2 * k + 1 - ↑i, ⋯⟩ ∧ 2 * k + 1 - ↑i = 2 * k - ↑i ∨ v i = w ⟨2 * k + 1 - (2 * k + 1 - ↑i), ⋯⟩ ∧ 2 * k - ↑i + 1 = 2 * k + 1 - ↑i)
:
w i = v i
A strange auxiliary lemma about odd-length tuples.
theorem
accepts_path_of_accepts_word_path
{Q : Type u_1}
{A : Type u_2}
{n : ℕ}
(δ : A → Q → Set Q)
(w : Fin n → A)
(init : Q)
(final : Q)
(path : Fin (n + 1) → Q)
(h : accepts_word_path δ w init final path)
:
accepts_path δ init final path
If an NFA accepts a word along a path p
, then p
is an accepting path.
A word cannot have complexity 0, because then there'd be no initial state.
The empty word has A_N at most 1.
This version does not require the alphabet A to be nonempty,
hence does not follow using restricting
.
theorem
restricting_construction
{A : Type u_1}
{Q : Type}
{δ : A → Q → Set Q}
{init : Q}
{final : Q}
{n : ℕ}
{w₁ : Fin (n + 1) → A}
{p₁ : Fin (n + 1 + 1) → Q}
(h₁ : accepts_word_path δ w₁ init final p₁)
{w₀ : Fin n → A}
{p₀ : Fin (n + 1) → Q}
(h₀ : accepts_word_path δ w₀ init (p₁ (Fin.last n).castSucc) p₀)
:
If an NFA accepts a word then by changing the final state we can also accept its prefixes.
theorem
restricting
{A : Type u_1}
{n : ℕ}
{q : ℕ}
{w : Fin (n + 1) → A}
(h : A_N_at_most w q)
:
A_N_at_most (Fin.init w) q
Subword inequality for A_N.
theorem
A_Ne_le_A_N
{A : Type}
{n : ℕ}
{q : ℕ}
{w : Fin n → A}
(h : A_N_at_most w q)
:
A_Ne_at_most w q
theorem
A_N_le_A_minus
{A : Type}
{n : ℕ}
{q : ℕ}
{w : Fin n → A}
(h : A_minus_at_most w q)
:
A_N_at_most w q
theorem
A_Ne_le_A_minus
{A : Type}
{n : ℕ}
{q : ℕ}
{w : Fin n → A}
(h : A_minus_at_most w q)
:
A_Ne_at_most w q
theorem
A_minus_le_A
{A : Type}
{n : ℕ}
{q : ℕ}
{w : Fin n → A}
(h : A_at_most w q)
:
A_minus_at_most w q