Words over an ordered alphabet
Lax503819.Words · concepts/Lax503819/Words.lean · lax-503819
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
A word is a finite list of letters, including the empty list. Positions are numbered from zero. The order on words compares words of equal length, letter by letter. A language is monotone if it is upward closed for this order; its upward closure consists of words above one of its members. These are the definitions of Section 2 of Kuperberg (2023).
Concept map
Lean source view on GitHub
| 1 | import Mathlib.Computability.Language |
| 2 | import Mathlib.Data.List.Forall2 |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Words over an ordered alphabet |
| 7 | type: definition |
| 8 | --- |
| 9 | A word is a finite list of letters, including the empty list. Positions are |
| 10 | numbered from zero. The order on words compares words of equal length, |
| 11 | letter by letter. A language is monotone if it is upward closed for this |
| 12 | order; its upward closure consists of words above one of its members. |
| 13 | These are the definitions of Section 2 of Kuperberg (2023). |
| 14 | -/ |
| 15 | |
| 16 | namespace Lax503819.Words |
| 17 | |
| 18 | abbrev Position {A : Type} (w : List A) := Fin w.length |
| 19 | |
| 20 | def Below {A : Type} [LE A] (u v : List A) : Prop := |
| 21 | List.Forall₂ (· ≤ ·) u v |
| 22 | |
| 23 | def MonotoneLanguage {A : Type} [LE A] (L : Language A) : Prop := |
| 24 | ∀ u v, Below u v → u ∈ L → v ∈ L |
| 25 | |
| 26 | def upwardClosure {A : Type} [LE A] (L : Language A) : Language A := |
| 27 | {v | ∃ u ∈ L, Below u v} |
| 28 | |
| 29 | end Lax503819.Words |
| 30 |
Builds on
none
Used by
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments