Explicit Zig-Zag Family and Path Replacement
Lax920634.ZigZagConstruction · concepts/Lax920634/ZigZagConstruction.lean · lax-920634
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
Starting with the fixed powered seed of degree , square it. Repeatedly square the current graph and take its zig-zag product with the same seed. The level- graph has degree and vertices. Replace every vertex by a path of ports to obtain the subcubic graph on vertices.
The rotation query below gives the construction directly in integer arithmetic. Each recursive level makes two queries at the preceding level and two queries to the fixed seed. Thus the number of fixed-seed calls is , bounded by a constant times . Each integer manipulated has bits. Enumerating all edges is consequently polynomial in . The fixed seed search has an enormous constant cost.
Concept map
Lean source view on GitHub
| 1 | import Lax920634.SeedRotation |
| 2 | import Lax920634.EdgeExpansion |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Explicit Zig-Zag Family and Path Replacement |
| 7 | type: definition |
| 8 | --- |
| 9 | Starting with the fixed powered seed of degree , square it. Repeatedly |
| 10 | square the current graph and take its zig-zag product with the same seed. |
| 11 | The level- graph has degree and vertices. |
| 12 | Replace every vertex by a path of ports to obtain the subcubic graph |
| 13 | on vertices. |
| 14 | |
| 15 | The rotation query below gives the construction directly in integer |
| 16 | arithmetic. Each recursive level makes two queries at the preceding level |
| 17 | and two queries to the fixed seed. Thus the number of fixed-seed calls is |
| 18 | , bounded by a constant times . Each integer manipulated has |
| 19 | bits. Enumerating all edges is consequently polynomial in |
| 20 | . The fixed seed search has an enormous constant cost. |
| 21 | |
| 22 | # Formalization notes |
| 23 | |
| 24 | The construction uses numerical vertex labels and the concrete deterministic |
| 25 | seed scan. The graph is the simple undirected closure of the generated path |
| 26 | and matching edges. The proof connects this executable recurrence to the |
| 27 | numbered zig-zag tower and verifies every returned matching endpoint's bounds. |
| 28 | -/ |
| 29 | |
| 30 | namespace Lax920634.ZigZagConstruction |
| 31 | |
| 32 | open SeedSearch |
| 33 | |
| 34 | /-- The fixed degree of each regular graph in the tower. -/ |
| 35 | def degree : ℕ := seedDegree ^ 2 |
| 36 | |
| 37 | /-- The number of vertices in the regular graph at a given level. -/ |
| 38 | def baseOrder (k : ℕ) : ℕ := (seedDegree ^ 4) ^ (k + 1) |
| 39 | |
| 40 | /-- The number of vertices after path replacement at a given level. -/ |
| 41 | def order (k : ℕ) : ℕ := baseOrder k * degree |
| 42 | |
| 43 | /-- A total numerical query to the fixed seed's edge rotation. -/ |
| 44 | def seedValue (p : ℕ × ℕ) : ℕ × ℕ := |
| 45 | if h : p.1 < seedOrder ∧ p.2 < seedDegree then |
| 46 | let r := SeedRotation.rotation (⟨p.1, h.1⟩, ⟨p.2, h.2⟩) |
| 47 | (r.1.val, r.2.val) |
| 48 | else (0, 0) |
| 49 | |
| 50 | /-- The regular tower's rotation, computed by squaring and zig-zag steps. -/ |
| 51 | def rotation : ℕ → ℕ × ℕ → ℕ × ℕ |
| 52 | | 0, (v, i) => |
| 53 | let p₀ := seedValue (v, i / seedDegree) |
| 54 | let p₁ := seedValue (p₀.1, i % seedDegree) |
| 55 | (p₁.1, p₀.2 + seedDegree * p₁.2) |
| 56 | | k + 1, (v, i) => |
| 57 | let p := seedValue (v % seedDegree ^ 4, i / seedDegree) |
| 58 | let q₀ := rotation k (v / seedDegree ^ 4, p.1 / degree) |
| 59 | let q₁ := rotation k (q₀.1, p.1 % degree) |
| 60 | let r := seedValue (q₀.2 + degree * q₁.2, i % seedDegree) |
| 61 | (r.1 + seedDegree ^ 4 * q₁.1, p.2 + seedDegree * r.2) |
| 62 | |
| 63 | /-- The matching endpoint of a port, in the canonical vertex numbering. -/ |
| 64 | def matchingNeighbor (k v : ℕ) : ℕ := |
| 65 | let r := rotation k (v / degree, v % degree) |
| 66 | r.2 + degree * r.1 |
| 67 | |
| 68 | /-- The subcubic graph defined by the explicit tower and path-edge formulas. -/ |
| 69 | def graph (k : ℕ) : SimpleGraph (Fin (order k)) := |
| 70 | SimpleGraph.fromRel (fun u v => |
| 71 | (u.val / degree = v.val / degree ∧ u.val + 1 = v.val) ∨ |
| 72 | v.val = matchingNeighbor k u.val) |
| 73 | |
| 74 | /-- The candidate neighbors, omitting nonexistent endpoint edges of a path. -/ |
| 75 | def neighbors (k v : ℕ) : List ℕ := |
| 76 | (if 0 < v % degree then [v - 1] else []) ++ |
| 77 | (if v % degree + 1 < degree then [v + 1] else []) ++ |
| 78 | [matchingNeighbor k v] |
| 79 | |
| 80 | end Lax920634.ZigZagConstruction |
| 81 |
Formalization notes
The construction uses numerical vertex labels and the concrete deterministic seed scan. The graph is the simple undirected closure of the generated path and matching edges. The proof connects this executable recurrence to the numbered zig-zag tower and verifies every returned matching endpoint's bounds.
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments