The graph of an expanded schedule
Lax833301.Realization · concepts/Lax833301/Realization.lean · lax-833301
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
An event has fibers indexed by -bit words. Arcs read one bit of the successor. Each interval has marker groups and a private auxiliary event. A marker sees its opening through a fixed bit, its auxiliary event through a group code, and its designated coordinate vertices through its own word. All edges are given by these rules.
Concept map
In the paper
- page 5 of this submission's paper
Lean source view on GitHub
| 1 | import Lax833301.Expansion |
| 2 | import Mathlib.Combinatorics.SimpleGraph.Basic |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: The graph of an expanded schedule |
| 7 | type: definition |
| 8 | --- |
| 9 | An event has fibers indexed by -bit words. Arcs read one bit of the |
| 10 | successor. Each interval has marker groups and a private auxiliary |
| 11 | event. A marker sees its opening through a fixed bit, its auxiliary event |
| 12 | through a group code, and its designated coordinate vertices through its |
| 13 | own word. All edges are given by these rules. |
| 14 | -/ |
| 15 | |
| 16 | namespace Lax833301.Realization |
| 17 | |
| 18 | open Schedules Expansion |
| 19 | |
| 20 | abbrev Bits (t : ℕ) := Fin t → Bool |
| 21 | abbrev Group (t : ℕ) := Fin t × Fin t |
| 22 | abbrev Node (T : Template) (d : ℕ) := Event T d ⊕ Interval T d |
| 23 | abbrev Vertex (T : Template) (d t : ℕ) := |
| 24 | (Node T d × Fin t × Bits t) ⊕ (Coord d × Fin t) ⊕ (Interval T d × Group t × Bits t) |
| 25 | |
| 26 | def nodeArc {T : Template} {d : ℕ} : Node T d → Node T d → Prop |
| 27 | | .inl u, .inl v => arc T d u v |
| 28 | | .inl u, .inr i => u = endpoint T d i true |
| 29 | | _, _ => False |
| 30 | |
| 31 | def code {t : ℕ} (k : Group t) (j : Fin t) : Bool := |
| 32 | (k.1.val * t + k.2.val + 1).testBit j.val |
| 33 | |
| 34 | def edge {T : Template} {d t : ℕ} : Vertex T d t → Vertex T d t → Prop |
| 35 | | .inl (u,j,_), .inl (v,_,x) => nodeArc u v ∧ x j = true |
| 36 | | .inr (.inr (i,k,_)), .inl (.inl v,_,y) => v = endpoint T d i false ∧ y k.1 = true |
| 37 | | .inr (.inr (i,k,_)), .inl (.inr i',j,_) => i = i' ∧ code k j = true |
| 38 | | .inr (.inr (i,_,x)), .inr (.inl (q,j)) => uses T d i q ∧ x j = true |
| 39 | | _, _ => False |
| 40 | |
| 41 | def graph (T : Template) (d t : ℕ) : SimpleGraph (Vertex T d t) := |
| 42 | SimpleGraph.fromRel edge |
| 43 | |
| 44 | end Lax833301.Realization |
| 45 |
Builds on
From Mathlib
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments