Substitution after reindexing directions
Lax369799.PortReindexing · concepts/Lax369799/PortReindexing.lean · lax-369799
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
Reindexing the directions of an outer system and renaming the ports of its substituted pieces give the same flattened graph. Evaluation is therefore unchanged. All vertices and marks are retained.
Concept map
Lean source view on GitHub
| 1 | import Lax369799.DirectionReindexing |
| 2 | import Lax369799.SetSystemAlgebras |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Substitution after reindexing directions |
| 7 | type: theorem |
| 8 | --- |
| 9 | Reindexing the directions of an outer system and renaming the ports of |
| 10 | its substituted pieces give the same flattened graph. Evaluation is |
| 11 | therefore unchanged. All vertices and marks are retained. |
| 12 | -/ |
| 13 | namespace Lax369799.PortReindexing |
| 14 | open RankedSystems (RankedSet System) |
| 15 | open TransitionEncoding FinitePresentations SetSystemAlgebras DirectionReindexing |
| 16 | |
| 17 | def rename {Y : RankedSet} {m n : ℕ} (P : FiniteSystem Y m) (σ : Fin m → Fin n) : |
| 18 | FiniteSystem Y n where |
| 19 | size := P.size |
| 20 | graph := { |
| 21 | label := P.graph.label |
| 22 | initial := P.graph.initial |
| 23 | root := P.graph.root |
| 24 | edge := fun v d t => match t with |
| 25 | | .inl w => P.graph.edge v d (.inl w) |
| 26 | | .inr i => ∃ j, σ j = i ∧ P.graph.edge v d (.inr j) |
| 27 | direction_valid := by |
| 28 | intro v d t h |
| 29 | cases t with |
| 30 | | inl w => exact P.graph.direction_valid _ _ _ h |
| 31 | | inr i => obtain ⟨j, _, hj⟩ := h; exact P.graph.direction_valid _ _ _ hj } |
| 32 | |
| 33 | |
| 34 | axiom evaluation {P : Type} {Y : RankedSet} (S : System (TransitionAlphabet P) 0) |
| 35 | (R : Reindexing S) (B : ∀ v : S.val.Vertex, FiniteSystem Y (R.arity v)) (E : SetAlgebra Y) : |
| 36 | E.eval 0 (withLabels (ofSetSystem S.val) (fun v => E.eval _ (rename (B v) (R.map v)))) = |
| 37 | E.eval 0 (withLabels (ofSetSystem (DirectionReindexing.system S R).val) |
| 38 | (fun v => E.eval _ (B v))) |
| 39 | |
| 40 | end Lax369799.PortReindexing |
| 41 |
From Mathlib
none
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments