Documentation

Regex.Compiler.Lemmas.Basic

instantiate mvar, mspec with a precondition like fun s => s = states ∧ P gives a uninstantiated mvar

Equations
Instances For

    instantiate mvars, mspec with a precondition like fun s => s = states ∧ P gives a uninstantiated mvar

    Equations
    Instances For
      @[simp]
      theorem Compiler.Lemmas.isAppend_trans {s1 s2 s3 : Array NFA.Unchecked.State} (h1 : isAppend s1 s2) (h2 : isAppend s2 s3) :
      isAppend s1 s3
      theorem Compiler.Lemmas.lift_StackT_to_EStateM_spec {σ α : Type} {n : σ} {ε : Type} (v : StateT σ Id α) {P : σProp} (Q : σασProp) (hspec : fun (s : σ) => s = n P n v (fun (a : α) (s : σ) => Q n a s, ())) :
      fun (s : σ) => s = n P n liftM v (fun (a : α) (s : σ) => Q n a s, fun (x : ε) => False, ())
      def Compiler.Lemmas.coe_spec_StackT_to_EStateM {σ α ε : Type} {v : StateT σ Id α} {P : σProp} {Q : ασProp} (hspec : fun (s : σ) => P s v (fun (a : α) (s : σ) => Q a s, ())) :
      fun (s : σ) => P s liftM v (fun (a : α) (s : σ) => Q a s, fun (x : ε) (x_1 : σ) => False, ())
      Equations
      • = hspec
      Instances For
        instance Compiler.Lemmas.instCoeTripleStateTIdPureEStateMLiftM_regex {σ α ε : Type} {v : StateT σ Id α} {P : σProp} {Q : ασProp} :
        Coe (fun (s : σ) => P s v (fun (a : α) (s : σ) => Q a s, ())) (fun (s : σ) => P s liftM v (fun (a : α) (s : σ) => Q a s, fun (x : ε) (x_1 : σ) => False, ()))
        Equations
        Equations
        Instances For
          Equations
          Instances For
            Equations
            Instances For
              theorem Compiler.Lemmas.cValid_of_empty (captures : Array NFA.Capture) (h : captures.size = 0) :
              cValid captures
              @[simp]
              theorem Compiler.Lemmas.cMemAndValid_of_cValid_of_eq (captures s : Array NFA.Capture) :
              s = captures cValid capturescMemAndValid captures s
              @[simp]
              theorem Compiler.Lemmas.cMemAndValid_of_push_of_role_start (captures : Array NFA.Capture) (capture : NFA.Capture) (hr : capture.role = NFA.Capture.Role.Start) (hc : cValid captures) :
              cMemAndValid captures (captures.push capture)
              theorem Compiler.Lemmas.cMemAndValid_of_push_of_role_end (captures : Array NFA.Capture) (capture : NFA.Capture) (hc : cValid captures) (h : (c : NFA.Capture), c captures c.role = NFA.Capture.Role.Start c.group = capture.group) :
              cMemAndValid captures (captures.push capture)
              theorem Compiler.Lemmas.coe_spec_EStateM_to_EStateM_Prod {ε σ₁ α σ₂ : Type} (σ₃ : Type) {v₁ : EStateM ε σ₁ α} {P₁ : σ₁Prop} {Q₁ : ασ₁Prop} (hspec₁ : fun (s : σ₁) => P₁ s v₁ (fun (a : α) (s : σ₁) => Q₁ a s, fun (x : ε) => False, ())) (P₂ Q₂ : σ₂Prop) (hpq : ∀ (s : σ₂), P₂ sQ₂ s) :
              fun (s : σ₁ × σ₂ × σ₃) => P₁ s.fst P₂ s.snd.fst liftM v₁ (fun (r : α) (s : σ₁ × σ₂ × σ₃) => Q₁ r s.fst Q₂ s.snd.fst, fun (x : ε) (x_1 : σ₁ × σ₂ × σ₃) => False, ())
              theorem Compiler.Lemmas.coe_spec_EStateM_to_CompilerM {ε σ₁ α : Type} {captures : Array NFA.Capture} {v₁ : EStateM ε σ₁ α} {P₁ : σ₁Prop} {Q₁ : ασ₁Prop} (hspec₁ : fun (s : σ₁) => P₁ s v₁ (fun (a : α) (s : σ₁) => Q₁ a s, fun (x : ε) => False, ())) :
              fun (s : σ₁ × Array NFA.Capture × Array Nat) => P₁ s.fst s.snd.fst = captures cValid captures liftM v₁ (fun (r : α) (s : σ₁ × Array NFA.Capture × Array Nat) => Q₁ r s.fst s.snd.fst = captures cMemAndValid captures s.snd.fst, fun (x : ε) (x_1 : σ₁ × Array NFA.Capture × Array Nat) => False, ())
              theorem Compiler.Lemmas.coe_spec_StateT_to_CompilerM {σ₁ α ε : Type} {captures : Array NFA.Capture} {v : StateT σ₁ Id α} {P₁ : σ₁Prop} {Q₁ : ασ₁Prop} (hspec : fun (s : σ₁) => P₁ s v (fun (a : α) (s : σ₁) => Q₁ a s, ())) :
              fun (s : σ₁ × Array NFA.Capture × Array Nat) => P₁ s.fst s.snd.fst = captures cValid captures liftM v (fun (r : α) (s : σ₁ × Array NFA.Capture × Array Nat) => Q₁ r s.fst s.snd.fst = captures cMemAndValid captures s.snd.fst, fun (x : ε) (x_1 : σ₁ × Array NFA.Capture × Array Nat) => False, ())
              theorem Compiler.Lemmas.pure_of_imp_spec {α σ ε : Type} {x : α} {P1 P2 : ασProp} (h : ∀ (a : α) (s : σ), P1 a sP2 a s) :
              fun (s : σ) => P1 x s EStateM.pure x (fun (r : α) (s : σ) => P2 r s, fun (x : ε) => False, ())