Documentation

Regex.NFA.Basic

inductive Regex.NFA.Node :
Instances For
    def Regex.NFA.Node.inBounds (n : Node) (size : Nat) :
    Equations
    Instances For
      @[simp]
      theorem Regex.NFA.Node.inBounds.epsilon {size next : Nat} (h : next < size) :
      @[simp]
      theorem Regex.NFA.Node.inBounds.anchor {size next : Nat} {a : Data.Anchor} (h : next < size) :
      (Node.anchor a next).inBounds size
      @[simp]
      theorem Regex.NFA.Node.inBounds.char {size next : Nat} {c : Char} (h : next < size) :
      (Node.char c next).inBounds size
      @[simp]
      theorem Regex.NFA.Node.inBounds.split {size next₁ next₂ : Nat} (h₁ : next₁ < size) (h₂ : next₂ < size) :
      (Node.split next₁ next₂).inBounds size
      @[simp]
      theorem Regex.NFA.Node.inBounds.save {size offset next : Nat} (h : next < size) :
      (Node.save offset next).inBounds size
      theorem Regex.NFA.Node.lt_of_inBounds.epsilon {size next : Nat} (h : (Node.epsilon next).inBounds size) :
      next < size
      theorem Regex.NFA.Node.lt_of_inBounds.char {size next : Nat} {c : Char} (h : (Node.char c next).inBounds size) :
      next < size
      theorem Regex.NFA.Node.lt_of_inBounds.split {size next₁ next₂ : Nat} (h : (Node.split next₁ next₂).inBounds size) :
      next₁ < size next₂ < size
      theorem Regex.NFA.Node.lt_of_inBounds.split_left {size next₁ next₂ : Nat} (h : (Node.split next₁ next₂).inBounds size) :
      next₁ < size
      theorem Regex.NFA.Node.lt_of_inBounds.split_right {size next₁ next₂ : Nat} (h : (Node.split next₁ next₂).inBounds size) :
      next₂ < size
      theorem Regex.NFA.Node.lt_of_inBounds.save {size offset next : Nat} (h : (Node.save offset next).inBounds size) :
      next < size
      theorem Regex.NFA.Node.inBounds_of_inBounds_of_le {n : Node} {size size' : Nat} (h : n.inBounds size) (le : size size') :
      n.inBounds size'
      structure Regex.NFA :

      A NFA consists an array of nodes and a designated start node.

      The transition relation and accept nodes are embedded in the nodes themselves.

      Instances For
        Equations
        Equations
        Equations
        Instances For
          def Regex.NFA.get (nfa : NFA) (i : Nat) (h : i < nfa.nodes.size) :
          Equations
          Instances For
            Equations
            theorem Regex.NFA.get_eq_nodes_get (nfa : NFA) (i : Nat) (h : i < nfa.nodes.size) :
            nfa[i] = nfa.nodes[i]
            def Regex.NFA.maxTag (nfa : NFA) :
            Equations
            Instances For
              theorem Regex.NFA.le_maxTag {tag next : Nat} (nfa : NFA) (i : Fin nfa.nodes.size) (eq : nfa[i] = Node.save tag next) :
              tag nfa.maxTag
              structure Regex.NFA.WellFormed (nfa : NFA) :
              Instances For
                theorem Regex.NFA.WellFormed.iff {nfa : NFA} :
                nfa.WellFormed nfa.start < nfa.nodes.size ∀ (i : Fin nfa.nodes.size), nfa[i].inBounds nfa.nodes.size
                theorem Regex.NFA.WellFormed.inBounds' {nfa : NFA} {node : Node} (wf : nfa.WellFormed) (i : Fin nfa.nodes.size) (hn : nfa[i] = node) :
                Equations
                • One or more equations did not get rendered due to their size.