Documentation

Complexitylib.Models.FiniteAutomaton.OneWayLiveness.Defs

One-way liveness #

OpenAI's relation-product language from An Exponential Two-Way Deterministic State Lower Bound for One-Way Liveness (25 September 2026). Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Combinatorics/Automata/Model.lean

A letter is a binary relation on Fin h. A word is Live when the product of its relations is nonempty, equivalently when it has a path through all layers. The alphabet is finite, but its size depends on h.

structure Complexity.FiniteAutomaton.BRel (H : Type u_1) :
Type u_1

Binary relations, with multiplication following the order of a path.

  • holds : H → H → Prop

    Whether a pair of endpoints belongs to the relation.

Instances For
    theorem Complexity.FiniteAutomaton.BRel.ext {H : Type u_1} {x y : BRel H} (holds : x.holds = y.holds) :
    x = y
    @[instance_reducible]
    Equations
    @[instance_reducible]
    Equations
    @[instance_reducible]
    Equations
    @[simp]
    theorem Complexity.FiniteAutomaton.BRel.one_holds {H : Type u_1} (x y : H) :
    holds 1 x y ↔ x = y
    @[simp]
    theorem Complexity.FiniteAutomaton.BRel.mul_holds {H : Type u_1} (a b : BRel H) (x z : H) :
    (a * b).holds x z ↔ ∃ (y : H), a.holds x y ∧ b.holds y z
    @[simp]
    theorem Complexity.FiniteAutomaton.BRel.zero_holds {H : Type u_1} (x y : H) :
    ¬holds 0 x y
    @[instance_reducible]
    Equations
    • One or more equations did not get rendered due to their size.

    The identity relation restricted to a set.

    Equations
    Instances For

      The product of the relations has at least one pair of related endpoints.

      Equations
      Instances For
        @[reducible, inline]

        The finite alphabet of all binary relations on h points.

        Equations
        Instances For

          The ordinary Mathlib NFA for one-way liveness, with h states and every state both initial and accepting. The endmarker model uses three additional states.

          Equations
          Instances For