Certified structural representations for ranked-tree model checking
Lax842588.StructuralRepresentations · concepts/Lax842588/StructuralRepresentations.lean · lax-842588
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition and theorem
The finite automaton values used by the uniform evaluator have explicit
structural presentations. Product and list codes are built transitively from
the fixed vocabulary. Intrinsic formulas and ranked trees have
datatype-specific first-class certificates covering every constructor and
primitive field. Each invocation emits the encoder,
its proposition, and its witness. For example,
#print formulaStructure.Laws displays the full generated formula contract.
Field resolution is closed and never consults instances.
These presentations contain no compiled automaton, semantic annotation, or other advice. Their distinguished word-memory realization is the generic construction. Any evaluator-specific representation engineering belongs only to the proof package and is charged there.
Concept map
Evidence
This concept declares 2 statements. Each proof establishes one of them relative to its assumptions.
1 sentence_lawful proven
Lean source view on GitHub
| 1 | import Lax560851.CertifiedDerivationElab |
| 2 | import Lax560851.WordArena |
| 3 | import Lax842588.ValueTranslations |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: Certified structural representations for ranked-tree model checking |
| 8 | type: definition and theorem |
| 9 | --- |
| 10 | |
| 11 | The finite automaton values used by the uniform evaluator have explicit |
| 12 | structural presentations. Product and list codes are built transitively from |
| 13 | the fixed `lax-58` vocabulary. Intrinsic formulas and ranked trees have |
| 14 | datatype-specific first-class certificates covering every constructor and |
| 15 | primitive field. Each `derive_certified_encoding` invocation emits the encoder, |
| 16 | its `.Laws` proposition, and its `.certified` witness. For example, |
| 17 | `#print formulaStructure.Laws` displays the full generated formula contract. |
| 18 | Field resolution is closed and never consults `FieldEncoding` instances. |
| 19 | |
| 20 | These presentations contain no compiled automaton, semantic annotation, or |
| 21 | other advice. Their distinguished word-memory realization is the generic |
| 22 | `Lax560851.WordArena.encode` construction. Any evaluator-specific representation |
| 23 | engineering belongs only to the proof package and is charged there. |
| 24 | -/ |
| 25 | |
| 26 | namespace Lax842588.StructuralRepresentations |
| 27 | |
| 28 | open FirstOrder |
| 29 | open FirstOrder.Language |
| 30 | open Lax146103.MSOSyntax |
| 31 | open Lax842588.RankedTree |
| 32 | open Lax842588.TreeStructure |
| 33 | open Lax842588.ValueTranslations |
| 34 | open Lax560851.StructuralPresentation |
| 35 | open Lax560851.StructuralPresentation.Presentation |
| 36 | open Lax560851.StructuralCombinators |
| 37 | open Lax560851.CertifiedDerivation |
| 38 | |
| 39 | universe u |
| 40 | |
| 41 | /-- Structural presentation of the complete finite automaton value. Its |
| 42 | components are derived automatically from the `Nat`, product, and ordered-list |
| 43 | structure of `EncodedAutomaton`. -/ |
| 44 | def automatonPresentation : Presentation EncodedAutomaton := |
| 45 | derivedPresentation |
| 46 | |
| 47 | /-- Structural representation of a term in the ranked-tree signature. That |
| 48 | signature has no function symbols, so every term is intrinsically a variable; |
| 49 | the impossible function case carries no represented data. -/ |
| 50 | derive_certified_encoding termStructure (alphabet : RankedAlphabetCode) |
| 51 | indexed {n : Nat} : |
| 52 | (treeSignature alphabet.toRankedAlphabet).Term (Fin n) |
| 53 | |
| 54 | /-- Structural representation of a relation symbol in the ranked-tree |
| 55 | signature. Subtype proofs in child indices are erased; their natural value is |
| 56 | the complete computational content of the field. -/ |
| 57 | derive_certified_encoding relationStructure (alphabet : RankedAlphabetCode) |
| 58 | indexed {arity : Nat} : |
| 59 | (treeSignature alphabet.toRankedAlphabet).Relations arity |
| 60 | |
| 61 | /-- Constructor-derived structural representation of the existing intrinsic |
| 62 | Lax-52 formula syntax. Recursive occurrences are represented recursively and |
| 63 | finite term families are enumerated in their intrinsic order. This is not a |
| 64 | second formula datatype and performs no elaboration or semantic preprocessing. -/ |
| 65 | derive_certified_encoding formulaStructure (alphabet : RankedAlphabetCode) |
| 66 | indexed {n m : Nat} : |
| 67 | Formula (treeSignature alphabet.toRankedAlphabet) n m |
| 68 | |
| 69 | /-- Named structural presentation of intrinsically scoped MSO sentences. -/ |
| 70 | noncomputable def sentencePresentation (alphabet : RankedAlphabetCode) : |
| 71 | Presentation (Lax146103.MSOSyntax.Sentence |
| 72 | (treeSignature alphabet.toRankedAlphabet)) := |
| 73 | Lax560851.StructuralPresentation.presentationOf (formulaStructure alphabet) |
| 74 | |
| 75 | /-- Constructor-structural map for a ranked tree over an encoded alphabet. -/ |
| 76 | derive_certified_encoding treeStructure (alphabet : RankedAlphabetCode) |
| 77 | indexed : Tree alphabet.toRankedAlphabet |
| 78 | |
| 79 | /-- Named structural presentation of ranked trees. -/ |
| 80 | noncomputable def treePresentation (alphabet : RankedAlphabetCode) : |
| 81 | Presentation (Tree alphabet.toRankedAlphabet) := |
| 82 | Lax560851.StructuralPresentation.presentationOf (treeStructure alphabet) |
| 83 | |
| 84 | /-- The recursive tree presentation is a genuine round-tripping |
| 85 | presentation. Constructor-structurality is supplied by the generated |
| 86 | `treeStructure.certified.checked` certificate. -/ |
| 87 | axiom tree_lawful (alphabet : RankedAlphabetCode) : |
| 88 | (StructuralRepresentations.treePresentation alphabet).Lawful |
| 89 | |
| 90 | /-- The constructor-derived sentence representation is a genuine |
| 91 | round-tripping presentation. -/ |
| 92 | axiom sentence_lawful (alphabet : RankedAlphabetCode) : |
| 93 | (StructuralRepresentations.sentencePresentation alphabet).Lawful |
| 94 | |
| 95 | end Lax842588.StructuralRepresentations |
| 96 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments