10 lines
461 B
Lean4
10 lines
461 B
Lean4
-- This module serves as the root of the `ProvableParser` library.
|
||
-- Import modules here that should be built as part of the library.
|
||
import ProvableParser.Basic
|
||
|
||
inductive Grammar {α : Type} : (List α -> Prop) -> Type where
|
||
| epsilon : Grammar (· = [])
|
||
| char : (p: α -> Prop) -> Grammar (fun s => ∃ c, p c ∧ s = [c])
|
||
| seq : Grammar L₁ -> Grammar L₂ ->
|
||
Grammar (fun s => ∃ s₁ s₂ , s = s₁ ++ s₂ ∧ L₁ s₁ ∧ L₂ s₂ )
|