Lax979537.OrderedStructures
Finite ordered relational structures and queries
concepts/Lax979537/OrderedStructures.lean · lax-979537
No public endorsements yet.
Loading review…
Sign in with ORCIDConcept map
Definition
A finite relational vocabulary is a finite list of arities. An ordered structure of size has universe , its usual strict order, and an interpretation of each relation symbol. This is the canonical representative of a finite linearly ordered structure up to isomorphism. The order is available to formulas as a distinguished atomic predicate.
A pointed structure additionally carries a -tuple of elements. A -ary query is a property of these pointed structures; gives Boolean queries. Empty universes and nullary relation symbols are allowed. The vocabulary and query arity are fixed independently of the input structure.
Lean source view on GitHub
| 1 | import Mathlib.Data.Fin.Tuple.Basic |
| 2 | import Mathlib.Data.List.FinRange |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Finite ordered relational structures and queries |
| 7 | type: definition |
| 8 | --- |
| 9 | A finite relational vocabulary is a finite list of arities. An ordered |
| 10 | structure of size has universe , its usual strict |
| 11 | order, and an interpretation of each relation symbol. This is the canonical |
| 12 | representative of a finite linearly ordered structure up to isomorphism. |
| 13 | The order is available to formulas as a distinguished atomic predicate. |
| 14 | |
| 15 | A pointed structure additionally carries a -tuple of elements. A -ary |
| 16 | query is a property of these pointed structures; gives Boolean queries. |
| 17 | Empty universes and nullary relation symbols are allowed. The vocabulary and |
| 18 | query arity are fixed independently of the input structure. |
| 19 | -/ |
| 20 | |
| 21 | namespace Lax979537.OrderedStructures |
| 22 | |
| 23 | abbrev Vocabulary := List Nat |
| 24 | |
| 25 | /-- Relation symbols are numbered in the order of the vocabulary. -/ |
| 26 | abbrev Symbol (σ : Vocabulary) := Fin σ.length |
| 27 | |
| 28 | structure OrderedStructure (σ : Vocabulary) where |
| 29 | size : Nat |
| 30 | relation : (r : Symbol σ) → (Fin (σ.get r) → Fin size) → Bool |
| 31 | |
| 32 | structure PointedStructure (σ : Vocabulary) (k : Nat) where |
| 33 | structureValue : OrderedStructure σ |
| 34 | tuple : Fin k → Fin structureValue.size |
| 35 | |
| 36 | abbrev Query (σ : Vocabulary) (k : Nat) := PointedStructure σ k → Prop |
| 37 | |
| 38 | end Lax979537.OrderedStructures |
| 39 |
Builds on
none
Community review
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above; your ORCID profile must share a public name.
0 comments