Two-way complementation: nesting #
Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a.
Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Combinatorics/TwoWayAutomata/Nesting.lean
Imports, namespaces, module visibility, documentation, and formatting are adapted for complexitylib. The source theorem statements and mathematical arguments are retained.
theorem
Complexity.FiniteAutomaton.Complementation.Internal.Diagram.loopClosure_subset_of_corner
{m : ℕ}
(e d : Diagram m)
(hd : d ∈ e.corner)
(positive : Bool)
:
e.loopClosure positive ⊆ d.loopClosure positive
theorem
Complexity.FiniteAutomaton.Complementation.Internal.Diagram.nested_forward_loop_absorption
{m : ℕ}
(e d : Diagram m)
(hd : d ∈ e.corner)
:
Two finite-path rearrangements for absorption under nesting.
theorem
Complexity.FiniteAutomaton.Complementation.Internal.Diagram.nested_through_loop_absorption
{m : ℕ}
(e d : Diagram m)
(hd : d ∈ e.corner)
(positive : Bool)
:
((e.through positive).comp (d.loopClosure positive)).comp (d.through positive) ⊆
(d.loopClosure positive).comp (d.through positive) ∧ ((d.through positive).comp (d.loopClosure positive)).comp (e.through positive) ⊆
(d.through positive).comp (d.loopClosure positive)
theorem
Complexity.FiniteAutomaton.Complementation.Internal.Diagram.nested_through_absorption
{m : ℕ}
(e d : Diagram m)
(hd : d ∈ e.corner)
(positive : Bool)
:
(e.through positive).comp (d.recurrence positive) ⊆ d.recurrence positive ∧ (d.recurrence positive).comp (e.through positive) ⊆ d.recurrence positive
theorem
Complexity.FiniteAutomaton.Complementation.Internal.Diagram.nested_recurrence_absorption
{m : ℕ}
(e d : Diagram m)
(hd : d ∈ e.corner)
(positive : Bool)
:
(e.recurrence positive).comp (d.recurrence positive) ⊆ d.recurrence positive ∧ (d.recurrence positive).comp (e.recurrence positive) ⊆ d.recurrence positive
Mixed recurrent relations are absorbed under nesting.
theorem
Complexity.FiniteAutomaton.Complementation.Internal.Diagram.nested_recurrent_witness
{m : ℕ}
(e d : Diagram m)
(he : e.comp e = e)
(hd : d ∈ e.corner)
{positive : Bool}
{x : Fin m}
(hxx : (x, x) ∈ d.recurrence positive)
:
A recurrent loop in a nested corner contains two recurrent points of its parent.
theorem
Complexity.FiniteAutomaton.Complementation.Internal.Diagram.nested_chain_bound
{m k : ℕ}
(b : ℕ → Diagram m)
(hidemp : ∀ j ≤ k, (b j).comp (b j) = b j)
(hnest : ∀ j < k, (b (j + 1), b j) ∈ nesting m)
(J : Set (Bool × Set (Fin m)))
(hJ : ∀ j ≤ k, (b 0).missing (b j) ⊆ J)
:
A common initial missing set pays for all later losses.