Documentation

Signals.Plabic

Finite bicolored strand routing with explicit rotation and exit data.

A rotation system is not by itself a planar disk embedding. Same-color edges are allowed. Termination, the bijective boundary map, fixed-point decorations, and any later identification with positroid cells must not be inferred merely from the existence of a finite graph.

Internal vertex colors for the prescribed strand-turning convention.

Instances For
    @[instance_reducible]
    @[instance_reducible]
    Instances For
      structure Signals.Plabic.DecoratedPermutation (boundaryCount : ℕ) :

      A permutation with a color supplied exactly where a fixed point needs decoration.

      • perm : Equiv.Perm (Fin boundaryCount)
      • fixedColor (index : Fin boundaryCount) : self.perm index = index → NodeColor
      Instances For

        Identity boundary routing with every fixed point decorated white.

        Instances For
          @[reducible, inline]
          abbrev Signals.Plabic.Vertex (boundaryCount internalCount : ℕ) :

          Distinct boundary and internal vertex identifiers; each internal identifier has one color.

          Instances For
            structure Signals.Plabic.RotationSystem (boundaryCount internalCount : ℕ) :

            A finite graph with one incident edge per boundary vertex and cyclic internal rotations.

            rotation is interpreted as counterclockwise; black uses it and white uses its inverse. singleOrbit rules out a purported cyclic order consisting of several cycles. A genus-zero disk embedding and reducedness are not supplied here.

            • graph : SimpleGraph (Vertex boundaryCount internalCount)
            • color : Fin internalCount → NodeColor
            • rotation (vertex : Vertex boundaryCount internalCount) : Equiv.Perm ↑(self.graph.neighborSet vertex)
            • singleOrbit (internal : Fin internalCount) (first second : ↑(self.graph.neighborSet (Sum.inr internal))) : ∃ (steps : ℕ), (⇑(self.rotation (Sum.inr internal)))^[steps] first = second
            • boundaryNeighbor : Fin boundaryCount → Vertex boundaryCount internalCount
            • boundaryAdjacent (index : Fin boundaryCount) : self.graph.Adj (Sum.inl index) (self.boundaryNeighbor index)
            • boundaryUnique (index : Fin boundaryCount) (vertex : Vertex boundaryCount internalCount) : self.graph.Adj (Sum.inl index) vertex → vertex = self.boundaryNeighbor index
            Instances For
              structure Signals.Plabic.DirectedEdge {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) :

              A directed edge carries its adjacency proof throughout routing.

              • src : Vertex boundaryCount internalCount
              • dst : Vertex boundaryCount internalCount
              • adjacent : system.graph.Adj self.src self.dst
              Instances For
                def Signals.Plabic.DirectedEdge.outgoingEquiv {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) :
                DirectedEdge system ≃ (vertex : Vertex boundaryCount internalCount) × ↑(system.graph.neighborSet vertex)

                Directed edges are equivalent to a vertex paired with one of its outgoing neighbors.

                Instances For
                  instance Signals.Plabic.instFiniteDirectedEdge {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) :
                  Finite (DirectedEdge system)

                  Finite vertex and neighbor sets give a finite directed-edge carrier without extra graph data.

                  theorem Signals.Plabic.DirectedEdge.ext {boundaryCount internalCount : ℕ} {system : RotationSystem boundaryCount internalCount} (first second : DirectedEdge system) (sources : first.src = second.src) (destinations : first.dst = second.dst) :
                  first = second

                  Directed edges agree once their source and destination agree; adjacency proofs are irrelevant.

                  theorem Signals.Plabic.DirectedEdge.ext_iff {boundaryCount internalCount : ℕ} {system : RotationSystem boundaryCount internalCount} {first second : DirectedEdge system} :
                  first = second ↔ first.src = second.src ∧ first.dst = second.dst
                  def Signals.Plabic.DirectedEdge.reverse {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) :
                  Equiv.Perm (DirectedEdge system)

                  Reverse each directed edge; graph symmetry makes this an involutive permutation.

                  Instances For
                    def Signals.Plabic.RotationSystem.turnRotation {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (vertex : Vertex boundaryCount internalCount) :
                    Equiv.Perm ↑(system.graph.neighborSet vertex)

                    Neighbor turns use the chosen color internally and the unique boundary edge externally.

                    Instances For
                      def Signals.Plabic.RotationSystem.dartTurn {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) :
                      Equiv.Perm (DirectedEdge system)

                      Continue strands through boundaries to obtain a derived permutation on all directed edges.

                      Instances For
                        theorem Signals.Plabic.RotationSystem.dartTurn_source {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (edge : DirectedEdge system) :
                        (system.dartTurn edge).src = edge.dst

                        Each continuing turn leaves from the previous directed edge's destination.

                        theorem Signals.Plabic.RotationSystem.dartTurn_period {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (edge : DirectedEdge system) :
                        ∃ period > 0, period ≤ Nat.card (DirectedEdge system) ∧ (⇑system.dartTurn)^[period] edge = edge

                        Every dart returns in a positive number of turns bounded by the finite dart count.

                        def Signals.Plabic.RotationSystem.start {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (index : Fin boundaryCount) :

                        The unique outgoing edge at a boundary vertex initializes its strand.

                        Instances For
                          def Signals.Plabic.RotationSystem.step {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (edge : DirectedEdge system) :

                          One routing step: black takes the next neighbor, white the previous, and boundary stops.

                          Instances For
                            theorem Signals.Plabic.RotationSystem.step_boundary {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (edge : DirectedEdge system) (index : Fin boundaryCount) (terminal : edge.dst = Sum.inl index) :
                            system.step edge = edge

                            Routing at an exit boundary leaves the directed edge unchanged.

                            theorem Signals.Plabic.RotationSystem.dartTurn_internal {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (edge : DirectedEdge system) (internal : Fin internalCount) (destination : edge.dst = Sum.inr internal) :
                            system.dartTurn edge = system.step edge

                            At an internal destination the continuing dart turn agrees with the original strand step.

                            theorem Signals.Plabic.RotationSystem.dartTurn_boundary {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (edge : DirectedEdge system) (index : Fin boundaryCount) (destination : edge.dst = Sum.inl index) :
                            system.dartTurn edge = system.start index

                            A boundary arrival continues through its unique incident edge to the corresponding start.

                            def Signals.Plabic.RotationSystem.route {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) :
                            ℕ → DirectedEdge system → DirectedEdge system

                            Evaluate a strand for a bounded number of steps, retaining a valid directed edge.

                            Instances For
                              theorem Signals.Plabic.RotationSystem.route_boundary {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (edge : DirectedEdge system) (index : Fin boundaryCount) (terminal : edge.dst = Sum.inl index) (steps : ℕ) :
                              system.route steps edge = edge

                              Once a strand reaches a boundary, every further bounded evaluation preserves the exit.

                              theorem Signals.Plabic.RotationSystem.route_succ_start {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (steps : ℕ) (edge : DirectedEdge system) :
                              system.route (steps + 1) edge = system.route steps (system.step edge)

                              Moving the first step outside a bounded route leaves the same strand endpoint.

                              theorem Signals.Plabic.RotationSystem.route_add {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (steps extra : ℕ) (edge : DirectedEdge system) :
                              system.route (steps + extra) edge = system.route extra (system.route steps edge)

                              Splitting a route into two consecutive bounded evaluations preserves its endpoint.

                              def Signals.Plabic.RotationSystem.firstExit {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) :
                              ℕ → DirectedEdge system → Option (ℕ × Fin boundaryCount)

                              Search for the first boundary exit, returning its step count or an explicit fuel failure.

                              Instances For
                                theorem Signals.Plabic.RotationSystem.firstExit_spec {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (fuel : ℕ) (edge : DirectedEdge system) (steps : ℕ) (index : Fin boundaryCount) (result : system.firstExit fuel edge = some (steps, index)) :
                                steps ≤ fuel ∧ (system.route steps edge).dst = Sum.inl index ∧ ∀ earlier < steps, ∀ (other : Fin boundaryCount), (system.route earlier edge).dst ≠ Sum.inl other

                                A successful search reaches the reported boundary within fuel, with no earlier boundary exit.

                                theorem Signals.Plabic.RotationSystem.firstExit_exists {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (fuel : ℕ) (edge : DirectedEdge system) (index : Fin boundaryCount) (terminal : (system.route fuel edge).dst = Sum.inl index) :
                                ∃ steps ≤ fuel, system.firstExit fuel edge = some (steps, index)

                                Any boundary reached by the fuel-limited route is found by the first-exit search.

                                theorem Signals.Plabic.RotationSystem.firstExit_none_iff {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (fuel : ℕ) (edge : DirectedEdge system) :
                                system.firstExit fuel edge = none ↔ ∀ (index : Fin boundaryCount), (system.route fuel edge).dst ≠ Sum.inl index

                                Fuel exhaustion is equivalent to reaching no boundary by the bounded route endpoint.

                                theorem Signals.Plabic.RotationSystem.route_eq_dartIterate {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (steps : ℕ) (edge : DirectedEdge system) (noBoundary : ∀ earlier < steps, ∀ (index : Fin boundaryCount), (system.route earlier edge).dst ≠ Sum.inl index) :
                                system.route steps edge = (⇑system.dartTurn)^[steps] edge

                                Before any boundary arrival, the absorbing route agrees with continuing dart iteration.

                                theorem Signals.Plabic.RotationSystem.firstExit_none_earlier {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (fuel : ℕ) (edge : DirectedEdge system) (result : system.firstExit fuel edge = none) (earlier : ℕ) (bound : earlier ≤ fuel) (index : Fin boundaryCount) :
                                (system.route earlier edge).dst ≠ Sum.inl index

                                An exhausted search budget also excludes all boundary arrivals at earlier steps.

                                theorem Signals.Plabic.RotationSystem.boundary_firstExit_exists {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (index : Fin boundaryCount) :
                                ∃ (steps : ℕ) (destination : Fin boundaryCount), system.firstExit (Nat.card (DirectedEdge system)) (system.start index) = some (steps, destination)

                                Every boundary start has an exit found using at most the finite dart count as search fuel.

                                noncomputable def Signals.Plabic.RotationSystem.boundaryExitData {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (index : Fin boundaryCount) :
                                ℕ × Fin boundaryCount

                                Extract the guaranteed first exit from the computed dart-count search, not a supplied match.

                                Instances For
                                  theorem Signals.Plabic.RotationSystem.boundaryExitData_found {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (index : Fin boundaryCount) :
                                  system.firstExit (Nat.card (DirectedEdge system)) (system.start index) = some (system.boundaryExitData index)

                                  The derived boundary data are exactly the successful finite search result.

                                  theorem Signals.Plabic.RotationSystem.boundaryExitData_spec {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (index : Fin boundaryCount) :
                                  (system.boundaryExitData index).1 ≤ Nat.card (DirectedEdge system) ∧ (system.route (system.boundaryExitData index).1 (system.start index)).dst = Sum.inl (system.boundaryExitData index).2 ∧ ∀ earlier < (system.boundaryExitData index).1, ∀ (other : Fin boundaryCount), (system.route earlier (system.start index)).dst ≠ Sum.inl other

                                  Derived boundary data retain the dart-count bound, route endpoint and earliest-exit condition.

                                  theorem Signals.Plabic.RotationSystem.boundary_return_eq {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (index : Fin boundaryCount) :
                                  (⇑system.dartTurn)^[(system.boundaryExitData index).1 + 1] (system.start index) = system.start (system.boundaryExitData index).2

                                  One turn after the earliest boundary arrival reaches the derived destination's start edge.

                                  theorem Signals.Plabic.RotationSystem.boundary_no_early_start {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (first other : Fin boundaryCount) (turns : ℕ) (bound : turns ≤ (system.boundaryExitData first).1) (returns : (⇑system.dartTurn)^[turns] (system.start first) = system.start other) :
                                  turns = 0 ∧ first = other

                                  No positive iterate reaches any boundary start before the derived first-return time.

                                  theorem Signals.Plabic.RotationSystem.boundary_return_bound {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (index : Fin boundaryCount) :
                                  (system.boundaryExitData index).1 + 1 ≤ Nat.card (DirectedEdge system)

                                  The positive boundary first-return time is bounded by the finite dart count.

                                  theorem Signals.Plabic.RotationSystem.boundaryExit_injective {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) :
                                  Function.Injective fun (index : Fin boundaryCount) => (system.boundaryExitData index).2

                                  Invertible dart dynamics and first-return minimality prevent two starts sharing an exit.

                                  noncomputable def Signals.Plabic.RotationSystem.boundaryPerm {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) :
                                  Equiv.Perm (Fin boundaryCount)

                                  Construct the boundary permutation from guaranteed earliest exits, without a supplied permutation.

                                  Instances For
                                    theorem Signals.Plabic.RotationSystem.boundaryPerm_apply {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (index : Fin boundaryCount) :
                                    system.boundaryPerm index = (system.boundaryExitData index).2

                                    The constructed boundary permutation is exactly the label returned by the first-exit search.

                                    theorem Signals.Plabic.RotationSystem.firstExit_unique {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (fuel otherFuel : ℕ) (edge : DirectedEdge system) (steps otherSteps : ℕ) (index otherIndex : Fin boundaryCount) (result : system.firstExit fuel edge = some (steps, index)) (otherResult : system.firstExit otherFuel edge = some (otherSteps, otherIndex)) :
                                    steps = otherSteps ∧ index = otherIndex

                                    Any two successful fuel budgets return the same earliest step count and boundary label.

                                    structure Signals.Plabic.BoundaryRouting {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) :

                                    A checked finite exit certificate and bijective boundary labeling.

                                    The permutation and finite step counts are supplied and checked against the route evaluator, not derived from unproved termination or planarity premises.

                                    • perm : Equiv.Perm (Fin boundaryCount)
                                    • steps : Fin boundaryCount → ℕ
                                    • exits (index : Fin boundaryCount) : (system.route (self.steps index) (system.start index)).dst = Sum.inl (self.perm index)
                                    • fixedColor (index : Fin boundaryCount) : self.perm index = index → NodeColor
                                    Instances For
                                      def Signals.Plabic.BoundaryRouting.decorated {boundaryCount internalCount : ℕ} {system : RotationSystem boundaryCount internalCount} (routing : BoundaryRouting system) :
                                      DecoratedPermutation boundaryCount

                                      Extract a decorated permutation only from checked boundary routing data.

                                      Instances For
                                        theorem Signals.Plabic.BoundaryRouting.route_destination {boundaryCount internalCount : ℕ} {system : RotationSystem boundaryCount internalCount} (routing : BoundaryRouting system) (index : Fin boundaryCount) :
                                        (system.route (routing.steps index) (system.start index)).dst = Sum.inl (routing.decorated.perm index)

                                        The extracted permutation agrees with each finite routed endpoint.

                                        theorem Signals.Plabic.BoundaryRouting.perm_bijective {boundaryCount internalCount : ℕ} {system : RotationSystem boundaryCount internalCount} (routing : BoundaryRouting system) :
                                        Function.Bijective ⇑routing.decorated.perm

                                        Bijectivity is available only through the checked routing certificate's permutation.

                                        noncomputable def Signals.Plabic.RotationSystem.derivedRouting {boundaryCount internalCount : ℕ} (system : RotationSystem boundaryCount internalCount) (fixedColor : (index : Fin boundaryCount) → system.boundaryPerm index = index → NodeColor) :

                                        Populate the compatibility certificate from derived exits; fixed-point decorations remain explicit.

                                        Instances For
                                          structure Signals.Plabic.WeightedAcyclicNetwork (vertexCount height : ℕ) :

                                          Nonnegative edge weights with a checked strict level increase on every nonzero edge.

                                          • level : Fin vertexCount → Fin (height + 1)
                                          • weight : Matrix (Fin vertexCount) (Fin vertexCount) NNReal
                                          • ascending (first second : Fin vertexCount) : self.weight first second ≠ 0 → ↑(self.level first) < ↑(self.level second)
                                          Instances For
                                            theorem Signals.Plabic.WeightedAcyclicNetwork.pathWeight_zero {vertexCount height : ℕ} (network : WeightedAcyclicNetwork vertexCount height) (length : ℕ) (first second : Fin vertexCount) (tooLong : ↑(network.level second) < ↑(network.level first) + length) :
                                            (network.weight ^ length) first second = 0

                                            Matrix-power path weights vanish when their length exceeds the available level difference.

                                            theorem Signals.Plabic.WeightedAcyclicNetwork.nilpotent {vertexCount height : ℕ} (network : WeightedAcyclicNetwork vertexCount height) :
                                            network.weight ^ (height + 1) = 0

                                            The checked level bound derives nilpotency; no cyclic-series convergence is assumed.

                                            noncomputable def Signals.Plabic.WeightedAcyclicNetwork.transfer {vertexCount height : ℕ} (network : WeightedAcyclicNetwork vertexCount height) :
                                            Matrix (Fin vertexCount) (Fin vertexCount) NNReal

                                            Sum all weighted path lengths allowed by the certified acyclic height, including length zero.

                                            Instances For
                                              theorem Signals.Plabic.WeightedAcyclicNetwork.transfer_stable {vertexCount height : ℕ} (network : WeightedAcyclicNetwork vertexCount height) (extra : ℕ) :
                                              ∑ length ∈ Finset.range (height + 1 + extra), network.weight ^ length = network.transfer

                                              Increasing the finite path cutoff adds only zero terms, rather than a convergence assumption.

                                              theorem Signals.Plabic.WeightedAcyclicNetwork.transfer_equation {vertexCount height : ℕ} (network : WeightedAcyclicNetwork vertexCount height) :
                                              network.transfer = 1 + network.weight * network.transfer

                                              The finite path sum satisfies the exact identity-plus-one-edge continuation equation.

                                              noncomputable def Signals.Plabic.WeightedAcyclicNetwork.boundaryMeasurement {vertexCount height : ℕ} (network : WeightedAcyclicNetwork vertexCount height) {sourceCount sinkCount : ℕ} (sources : Fin sourceCount → Fin vertexCount) (sinks : Fin sinkCount → Fin vertexCount) :
                                              Matrix (Fin sourceCount) (Fin sinkCount) NNReal

                                              Boundary measurements select source/sink entries of the derived finite weighted path sum.

                                              Instances For

                                                A single weighted directed edge with source zero and sink one.

                                                Instances For

                                                  A subdivided directed edge with an intermediate vertex and two independently supplied weights.

                                                  Instances For

                                                    A single edge's actual finite path sum recovers its supplied edge weight.

                                                    theorem Signals.Plabic.WeightedAcyclicNetwork.twoEdgePath_transfer (firstWeight secondWeight : NNReal) :
                                                    (twoEdgePath firstWeight secondWeight).transfer 0 2 = firstWeight * secondWeight

                                                    A two-edge path's actual finite sum multiplies its two edge weights.

                                                    theorem Signals.Plabic.WeightedAcyclicNetwork.subdivision_boundary (weight factor : NNReal) (nonzero : factor ≠ 0) :
                                                    ((twoEdgePath factor (weight / factor)).boundaryMeasurement (fun (x : Fin 1) => 0) fun (x : Fin 1) => 2) = (oneEdgePath weight).boundaryMeasurement (fun (x : Fin 1) => 0) fun (x : Fin 1) => 1

                                                    Subdivision by a nonzero factor preserves the complete one-source/one-sink boundary matrix.

                                                    def Signals.Plabic.WeightedAcyclicNetwork.fork (firstWeight secondWeight : NNReal) :

                                                    One source feeding two sinks with independent nonnegative edge weights.

                                                    Instances For
                                                      theorem Signals.Plabic.WeightedAcyclicNetwork.fork_boundary (firstWeight secondWeight : NNReal) :
                                                      (fork firstWeight secondWeight).boundaryMeasurement (fun (x : Fin 1) => 0) Fin.succ = ![![firstWeight, secondWeight]]

                                                      The fork's two boundary entries are derived from its finite weighted-path sum.

                                                      def Signals.Plabic.WeightedAcyclicNetwork.twoChannel (firstFirst firstSecond secondFirst secondSecond : NNReal) :

                                                      Two sources at level zero feed two sinks at level one with independent edge weights.

                                                      Instances For
                                                        theorem Signals.Plabic.WeightedAcyclicNetwork.twoChannel_boundary (firstFirst firstSecond secondFirst secondSecond : NNReal) :
                                                        (twoChannel firstFirst firstSecond secondFirst secondSecond).boundaryMeasurement (Fin.castAdd 2) (Fin.natAdd 2) = !![firstFirst, firstSecond; secondFirst, secondSecond]

                                                        The complete two-channel boundary matrix is derived from the finite weighted path sum.

                                                        def Signals.Plabic.WeightedAcyclicNetwork.singleHub (firstIn secondIn firstOut secondOut : NNReal) :

                                                        Two sources feed two sinks through one shared intermediate vertex.

                                                        Instances For
                                                          theorem Signals.Plabic.WeightedAcyclicNetwork.singleHub_boundary (firstIn secondIn firstOut secondOut : NNReal) :
                                                          (singleHub firstIn secondIn firstOut secondOut).boundaryMeasurement (Fin.castAdd 3) (Fin.natAdd 3) = !![firstIn * firstOut, firstIn * secondOut; secondIn * firstOut, secondIn * secondOut]

                                                          Each measured hub entry is the product of its independently supplied incoming and outgoing edge.

                                                          def Signals.Plabic.WeightedAcyclicNetwork.diamond (firstIn secondIn firstOut secondOut : NNReal) :

                                                          One source at level zero feeds two parallel intermediate vertices at level one, which both feed one sink at level two.

                                                          Instances For
                                                            theorem Signals.Plabic.WeightedAcyclicNetwork.diamond_transfer (firstIn secondIn firstOut secondOut : NNReal) :
                                                            (diamond firstIn secondIn firstOut secondOut).transfer 0 3 = firstIn * firstOut + secondIn * secondOut

                                                            The diamond network's source-to-sink transfer sums the two parallel two-edge path products.

                                                            theorem Signals.Plabic.WeightedAcyclicNetwork.parallel_reduction_boundary (firstIn secondIn firstOut secondOut : NNReal) :
                                                            ((diamond firstIn secondIn firstOut secondOut).boundaryMeasurement (fun (x : Fin 1) => 0) fun (x : Fin 1) => 3) = (oneEdgePath (firstIn * firstOut + secondIn * secondOut)).boundaryMeasurement (fun (x : Fin 1) => 0) fun (x : Fin 1) => 1

                                                            Reducing two parallel two-edge paths into a single edge with summed path-product weight preserves the complete one-source/one-sink boundary measurement matrix.

                                                            Multi-Layer Lindström–Gessel–Viennot (LGV) Disjoint-Path Composition & Three-Channel ($k = 3$) LGV Positivity #

                                                            theorem Signals.Plabic.lgv_multiLayer_det_prod {k : ℕ} (layers : List (Matrix (Fin k) (Fin k) ℝ)) :
                                                            layers.prod.det = (List.map Matrix.det layers).prod

                                                            The determinant of a finite list of composable $k \times k$ layer transfer matrices $L = [M_1, M_2, \dots, M_m]$ equals the product of the individual layer determinants: $\det\bigl(\prod_{r=1}^m M_r\bigr) = \prod_{r=1}^m \det(M_r)$.

                                                            theorem Signals.Plabic.lgv_multiLayer_det_nonnegative {k : ℕ} (layers : List (Matrix (Fin k) (Fin k) ℝ)) (h_nonneg : ∀ M ∈ layers, 0 ≤ M.det) :
                                                            0 ≤ layers.prod.det

                                                            Multi-Layer Lindström–Gessel–Viennot (LGV) Total Nonnegativity Preservation: If every layer transfer matrix $M_r \in L$ in an arbitrary-length planar acyclic cascade has nonnegative $k$-channel determinant $\det(M_r) \ge 0$, then the composite multi-step transfer matrix $T = \prod_{r=1}^m M_r$ has $\det(T) \ge 0$.

                                                            theorem Signals.Plabic.lgv_multiLayer_det_positive {k : ℕ} (layers : List (Matrix (Fin k) (Fin k) ℝ)) (h_pos : ∀ M ∈ layers, 0 < M.det) :
                                                            0 < layers.prod.det

                                                            Multi-Layer Lindström–Gessel–Viennot (LGV) Strict Disjoint-Path Positivity: If every layer transfer matrix $M_r \in L$ in an arbitrary-length planar acyclic cascade admits a strictly positive $k$-tuple of vertex-disjoint paths ($\det(M_r) > 0$), then the composite multi-step transfer matrix $T = \prod_{r=1}^m M_r$ has strictly positive determinant $\det(T) > 0$.

                                                            def Signals.Plabic.planarThreeChannelUpperStep (d0 d1 d2 u01 u12 : ℝ) :
                                                            Matrix (Fin 3) (Fin 3) ℝ

                                                            Planar upper-bidiagonal elementary $3 \times 3$ step matrix $E_{\mathrm{upper}}^{(3)}(d_0, d_1, d_2, u_{01}, u_{12})$ with horizontal channel weights $d_0, d_1, d_2$ and non-crossing upward steps $0 \to 1$ ($u_{01}$) and $1 \to 2$ ($u_{12}$).

                                                            Instances For
                                                              def Signals.Plabic.planarThreeChannelLowerStep (d0 d1 d2 l10 l21 : ℝ) :
                                                              Matrix (Fin 3) (Fin 3) ℝ

                                                              Planar lower-bidiagonal elementary $3 \times 3$ step matrix $E_{\mathrm{lower}}^{(3)}(d_0, d_1, d_2, l_{10}, l_{21})$ with horizontal channel weights $d_0, d_1, d_2$ and non-crossing downward steps $1 \to 0$ ($l_{10}$) and $2 \to 1$ ($l_{21}$).

                                                              Instances For
                                                                theorem Signals.Plabic.planar_threeChannel_lgv_and_bottleneck_identities (d0 d1 d2 u01 u12 l10 l21 : ℝ) (hd0 : 0 < d0) (hd1 : 0 < d1) (hd2 : 0 < d2) (A : Matrix (Fin 3) (Fin 2) ℝ) (B : Matrix (Fin 2) (Fin 3) ℝ) :
                                                                (planarThreeChannelUpperStep d0 d1 d2 u01 u12).det = d0 * d1 * d2 ∧ (planarThreeChannelLowerStep d0 d1 d2 l10 l21).det = d0 * d1 * d2 ∧ (planarThreeChannelLowerStep 1 1 1 l10 l21 * planarThreeChannelUpperStep d0 d1 d2 u01 u12).det = d0 * d1 * d2 ∧ 0 < (planarThreeChannelLowerStep 1 1 1 l10 l21 * planarThreeChannelUpperStep d0 d1 d2 u01 u12).det ∧ (A * B).det = 0

                                                                Three-Channel ($k = 3$) Lindström–Gessel–Viennot Disjoint-Path Determinant & Shared-Vertex Obstruction Theorem:

                                                                1. For any planar upper-bidiagonal or lower-bidiagonal 3-channel step, every intersecting path triple cancels or vanishes by planarity, leaving the unique vertex-disjoint horizontal path-triple product: $$\det E_{\mathrm{upper}}^{(3)}(d_0, d_1, d_2, u_{01}, u_{12}) = d_0 d_1 d_2, \qquad \det E_{\mathrm{lower}}^{(3)}(d_0, d_1, d_2, l_{10}, l_{21}) = d_0 d_1 d_2,$$
                                                                2. For their two-step planar composite $T^{(3)} = E_{\mathrm{lower}}^{(3)}(1, 1, 1, l_{10}, l_{21}) \, E_{\mathrm{upper}}^{(3)}(d_0, d_1, d_2, u_{01}, u_{12})$, the 3-channel LGV determinant equals $\det T^{(3)} = d_0 d_1 d_2 > 0$ whenever $d_0, d_1, d_2 > 0$,
                                                                3. Conversely, if three sources route through a two-vertex bottleneck (A : Matrix (Fin 3) (Fin 2) ℝ composed with B : Matrix (Fin 2) (Fin 3) ℝ), the pigeonhole principle forces every path triple to share an intermediate vertex and the $3 \times 3$ determinant vanishes identically: $\det(A B) = 0$.

                                                                Vector-Relation Configurations (VRC) for Complex Grassmannian $\mathrm{Gr}_{\mathbb{C}}(k, n)$ Plabic Networks #

                                                                Standard Postnikov plabic graphs (WeightedAcyclicNetwork above) assign strictly positive real weights $x_e \in \mathbb{R}_{>0}$ (or nonnegative ℝ≥0 weights) to parameterize positroid cells of the Totally Nonnegative Grassmannian $\mathrm{Gr}_{\ge 0}(k, n)$, where boundary-measurement denominators and cluster-mutation denominators $x_X + 1 > 1 > 0$ never vanish.

                                                                When moving to the Complex Grassmannian $\mathrm{Gr}_{\mathbb{C}}(k, n)$—as required for off-shell virtual states, complex Kohn-Sham / QED-DFT electronic orbitals, hybrid polariton and plasmon superpositions, and quantum causal channels—rational face weights $x_e \in \mathbb{C}^*$ parameterize only an open algebraic torus chart $(\mathbb{C}^*)^{k(n-k)}$ and suffer from two fundamental obstructions:

                                                                1. On-Shell Resonance / Destructive-Interference Poles ($x_X = -1$): Under the complex square move (urban renewal) $x_X' = 1 / x_X$, $x_1' = (x_1 x_X + x_2) / (x_X + 1)$, the denominator $x_X + 1$ vanishes at $x_X = -1$ (on-shell polaritonic resonance or destructive loop interference).
                                                                2. Chart-Boundary Degeneration ($x_X = 0$): Rational entries such as $x_X^{-1}$ blow up on lower-rank positroid / Schubert boundary strata.

                                                                Following Lam (2015) and Affolter, Glick, Pylyavskyy, & Ramassamy (2019, arXiv:1908.06959), a Vector-Relation Configuration (VectorRelationConfiguration) resolves both obstructions by placing vectors $v_w \in R^k$ on the white vertices $w \in W$ (vectors : Matrix (Fin rankK) (Fin whiteCount) R) and homogeneous linear relations $\sum_{w} K_{b,w} v_w = 0$ on the black vertices $b \in B$ (relations : Matrix (Fin blackCount) (Fin whiteCount) R), governed by the polynomial matrix identity $V K^\top = 0$ (vectors * relations.transpose = 0).

                                                                structure Signals.Plabic.VectorRelationConfiguration (rankK whiteCount blackCount boundaryCount : ℕ) (R : Type u_1) [CommRing R] :
                                                                Type u_1

                                                                A Vector-Relation Configuration (VRC) on a bicolored network over a commutative ring $R$:

                                                                • vectors : Matrix (Fin rankK) (Fin whiteCount) R assigns a column vector $v_w \in R^{\mathrm{rankK}}$ to each white vertex $w \in \mathrm{Fin}\,\mathrm{whiteCount}$,
                                                                • relations : Matrix (Fin blackCount) (Fin whiteCount) R assigns linear relation coefficients $K_{b, w} \in R$ to each black vertex $b \in \mathrm{Fin}\,\mathrm{blackCount}$,
                                                                • boundaryWhite : Fin boundaryCount → Fin whiteCount identifies the $n$ boundary white vertices,
                                                                • relation_satisfied : vectors * relations.transpose = 0 enforces $\sum_w K_{b, w} v_w = 0$ at every black vertex $b$ without any division or non-vanishing denominator assumption.
                                                                • vectors : Matrix (Fin rankK) (Fin whiteCount) R
                                                                • relations : Matrix (Fin blackCount) (Fin whiteCount) R
                                                                • boundaryWhite : Fin boundaryCount → Fin whiteCount
                                                                • relation_satisfied : self.vectors * self.relations.transpose = 0
                                                                Instances For
                                                                  def Signals.Plabic.VectorRelationConfiguration.boundaryMatrix {rankK whiteCount blackCount boundaryCount : ℕ} {R : Type u_1} [CommRing R] (vrc : VectorRelationConfiguration rankK whiteCount blackCount boundaryCount R) :
                                                                  Matrix (Fin rankK) (Fin boundaryCount) R

                                                                  Extract the $k \times n$ boundary generator matrix $C_{\mathrm{bdry}} \in R^{k \times n}$ whose $j$-th column is the vector at boundary white vertex boundaryWhite j.

                                                                  Instances For
                                                                    theorem Signals.Plabic.VectorRelationConfiguration.blackLinearCombination_eq_zero {rankK whiteCount blackCount boundaryCount : ℕ} {R : Type u_1} [CommRing R] (vrc : VectorRelationConfiguration rankK whiteCount blackCount boundaryCount R) (i : Fin rankK) (b : Fin blackCount) :
                                                                    ∑ w : Fin whiteCount, vrc.vectors i w * vrc.relations b w = 0

                                                                    At every black vertex $b$ and vector component $i$, the weighted sum of white-vertex vectors vanishes identically: $\sum_w V_{i, w} K_{b, w} = 0$.

                                                                    def Signals.Plabic.VectorRelationConfiguration.transformGL {rankK whiteCount blackCount boundaryCount : ℕ} {R : Type u_1} [CommRing R] (vrc : VectorRelationConfiguration rankK whiteCount blackCount boundaryCount R) (g : Matrix (Fin rankK) (Fin rankK) R) :
                                                                    VectorRelationConfiguration rankK whiteCount blackCount boundaryCount R

                                                                    Global $\mathrm{GL}_k(R)$ / Unitary Orbital Rotation Gauge Invariance of a VRC: Left-multiplying all white-vertex vectors by $g \in R^{k \times k}$ (such as a unitary orbital transformation $U \in U(N_{\mathrm{occ}})$ in Kohn-Sham DFT) preserves all black-vertex relations $V K^\top = 0$.

                                                                    Instances For
                                                                      theorem Signals.Plabic.VectorRelationConfiguration.transformGL_boundaryMatrix {rankK whiteCount blackCount boundaryCount : ℕ} {R : Type u_1} [CommRing R] (vrc : VectorRelationConfiguration rankK whiteCount blackCount boundaryCount R) (g : Matrix (Fin rankK) (Fin rankK) R) :

                                                                      Global $\mathrm{GL}_k(R)$ action on a VRC acts by left multiplication on the boundary matrix: $(g \cdot \mathrm{vrc}).\mathrm{boundaryMatrix} = g \cdot \mathrm{vrc}.\mathrm{boundaryMatrix}$.

                                                                      def Signals.Plabic.VectorRelationConfiguration.transformBlackRelations {rankK whiteCount blackCount blackCount' boundaryCount : ℕ} {R : Type u_1} [CommRing R] (vrc : VectorRelationConfiguration rankK whiteCount blackCount boundaryCount R) (m : Matrix (Fin blackCount') (Fin blackCount) R) :
                                                                      VectorRelationConfiguration rankK whiteCount blackCount' boundaryCount R

                                                                      Black-Vertex Row-Operation / Urban-Renewal Elimination Invariance of a VRC: Left-multiplying the black-vertex relation matrix $K$ by any row-mixing matrix $M \in R^{|B'| \times |B|}$ preserves $V (M K)^\top = (V K^\top) M^\top = 0$ and leaves the boundary Grassmannian generator matrix unchanged.

                                                                      Instances For
                                                                        theorem Signals.Plabic.VectorRelationConfiguration.transformBlackRelations_boundaryMatrix {rankK whiteCount blackCount blackCount' boundaryCount : ℕ} {R : Type u_1} [CommRing R] (vrc : VectorRelationConfiguration rankK whiteCount blackCount boundaryCount R) (m : Matrix (Fin blackCount') (Fin blackCount) R) :

                                                                        Black-vertex relation row operations leave the boundary subspace matrix identically unchanged.

                                                                        def Signals.Plabic.plucker2x4Minor {R : Type u_1} [CommRing R] (C : Matrix (Fin 2) (Fin 4) R) (j1 j2 : Fin 4) :
                                                                        R

                                                                        The $2 \times 2$ Plücker minor $p_{j_1, j_2}(C) = C_{0, j_1} C_{1, j_2} - C_{0, j_2} C_{1, j_1}$ of a $2 \times 4$ generator matrix $C \in R^{2 \times 4}$.

                                                                        Instances For
                                                                          def Signals.Plabic.pluckerQuadraticRelation2x4 {R : Type u_1} [CommRing R] (C : Matrix (Fin 2) (Fin 4) R) :
                                                                          R

                                                                          The quadratic Plücker relation residual $\mathcal{R}_{\mathrm{Pl\ddot{u}cker}}(C) = p_{01} p_{23} - p_{02} p_{13} + p_{03} p_{12}$ (in 1-based indexing: $p_{12} p_{34} - p_{13} p_{24} + p_{14} p_{23}$) for $C \in R^{2 \times 4}$.

                                                                          Instances For
                                                                            theorem Signals.Plabic.pluckerQuadraticRelation2x4_eq_zero {R : Type u_1} [CommRing R] (C : Matrix (Fin 2) (Fin 4) R) :

                                                                            Universal Quadratic Plücker Identity on $\mathrm{Gr}_R(2, 4)$: Every $2 \times 4$ matrix $C \in R^{2 \times 4}$ over any commutative ring $R$ (including every VRC boundary matrix over $\mathbb{C}$) identically satisfies the quadratic Plücker relation $p_{01} p_{23} - p_{02} p_{13} + p_{03} p_{12} = 0$.

                                                                            def Signals.Plabic.gr24RationalChartMatrix {F : Type u_1} [Field F] (x1 x2 xX : F) :
                                                                            Matrix (Fin 2) (Fin 4) F

                                                                            The rational face-weight generator matrix $C_{\mathrm{rat}}(x_1, x_2, x_X)$ on $\mathrm{Gr}_F(2, 4)$ from the QCI-GXC / polariton plabic network (Google-Search_Density-Functional-Theory_20261105-1512.md, lines 576–580, 735–739, 1118–1122): $$C_{\mathrm{rat}}(x_1, x_2, x_X) = \begin{pmatrix} 1 & 0 & -x_1 & -x_X \\ 0 & 1 & x_X^{-1} & -x_2 \end{pmatrix}.$$

                                                                            Instances For
                                                                              def Signals.Plabic.gr24ClusterMutation {F : Type u_1} [Field F] (x1 x2 xX : F) :
                                                                              F × F × F

                                                                              The rational complex cluster mutation (square move) around the central face $x_X$ (Google-Search_Density-Functional-Theory_20261105-1512.md, lines 373–378, 761–763, 1129–1135): $$(x_1', x_2', x_X') = \left(\frac{x_1 x_X + x_2}{x_X + 1},\; x_2,\; \frac{1}{x_X}\right).$$

                                                                              Instances For
                                                                                def Signals.Plabic.gr24HomogeneousVRC {R : Type u_1} [CommRing R] (x1 x2 xX : R) :

                                                                                Pole-Free Homogeneous Vector-Relation Configuration (gr24HomogeneousVRC) for the $\mathrm{Gr}_R(2, 4)$ Plabic Network: Clears the rational chart singularity $x_X^{-1}$ by scaling white vertex $w_2$ by $x_X$, yielding white-vertex vectors $$V_{\mathrm{hom}}(x_1, x_2, x_X) = \begin{pmatrix} 1 & 0 & -x_1 x_X & -x_X \\ 0 & 1 & 1 & -x_2 \end{pmatrix}$$ and black-vertex linear relations $$K_{\mathrm{hom}}(x_1, x_2, x_X) = \begin{pmatrix} x_1 x_X & -1 & 1 & 0 \\ x_X & x_2 & 0 & 1 \end{pmatrix},$$ which satisfy $V_{\mathrm{hom}} K_{\mathrm{hom}}^\top = 0$ over any commutative ring $R$ (including at $x_X = 0$ and $x_X = -1$)!

                                                                                Instances For
                                                                                  def Signals.Plabic.gr24MutatedHomogeneousVRC {R : Type u_1} [CommRing R] (x1 x2 xX : R) :

                                                                                  Pole-Free Mutated Vector-Relation Configuration (gr24MutatedHomogeneousVRC) Across the $x_X = -1$ On-Shell Polaritonic Resonance: In the rational cluster mutation (gr24ClusterMutation), $x_1' = (x_1 x_X + x_2)/(x_X + 1)$ and $x_X' = 1 / x_X$ exhibit rational poles at the on-shell polariton resonance $x_X = -1$ ($x_X + 1 = 0$) and at $x_X = 0$. In the Vector-Relation Configuration framework, scaling white vertex $w_2$ by $x_X + 1$ and white vertex $w_3$ by $x_X$ produces the polynomial VRC: $$V_{\mathrm{mut}}^{\mathrm{VRC}}(x_1, x_2, x_X) = \begin{pmatrix} 1 & 0 & -(x_1 x_X + x_2) & -1 \\ 0 & 1 & x_X(x_X + 1) & -x_2 x_X \end{pmatrix},$$ $$K_{\mathrm{mut}}^{\mathrm{VRC}}(x_1, x_2, x_X) = \begin{pmatrix} x_1 x_X + x_2 & -x_X(x_X + 1) & 1 & 0 \\ 1 & x_2 x_X & 0 & 1 \end{pmatrix},$$ which satisfies $V_{\mathrm{mut}}^{\mathrm{VRC}} (K_{\mathrm{mut}}^{\mathrm{VRC}})^\top = 0$ and the quadratic Plücker relation identically for all $x_1, x_2, x_X \in R$, remaining completely smooth through the on-shell polariton resonance $x_X = -1$!

                                                                                  Instances For
                                                                                    theorem Signals.Plabic.complex_plabic_vrc_and_sympy_check_figures (x1 x2 xX : ℂ) (hxX : xX ≠ 0) :
                                                                                    have C_rat := gr24RationalChartMatrix x1 x2 xX; have vrc_pre := gr24HomogeneousVRC x1 x2 xX; have vrc_res := gr24MutatedHomogeneousVRC x1 x2 (-1); have test_x1 := 1 / 2 + 1 / 5 * Complex.I; have test_x2 := -(3 / 10) + 7 / 10 * Complex.I; have test_xX := 6 / 5 - 2 / 5 * Complex.I; plucker2x4Minor C_rat 0 1 = 1 ∧ plucker2x4Minor C_rat 0 2 = xX⁻¹ ∧ plucker2x4Minor C_rat 0 3 = -x2 ∧ plucker2x4Minor C_rat 1 2 = x1 ∧ plucker2x4Minor C_rat 1 3 = xX ∧ plucker2x4Minor C_rat 2 3 = x1 * x2 + 1 ∧ pluckerQuadraticRelation2x4 C_rat = 0 ∧ vrc_pre.vectors * vrc_pre.relations.transpose = 0 ∧ pluckerQuadraticRelation2x4 vrc_pre.boundaryMatrix = 0 ∧ vrc_res.vectors * vrc_res.relations.transpose = 0 ∧ pluckerQuadraticRelation2x4 vrc_res.boundaryMatrix = 0 ∧ plucker2x4Minor vrc_res.boundaryMatrix 0 2 = 0 ∧ plucker2x4Minor vrc_res.boundaryMatrix 1 2 = x2 - x1 ∧ plucker2x4Minor vrc_res.boundaryMatrix 2 3 = x2 * (x1 - x2) ∧ plucker2x4Minor (gr24RationalChartMatrix test_x1 test_x2 test_xX) 0 3 = 3 / 10 - 7 / 10 * Complex.I ∧ (gr24ClusterMutation test_x1 test_x2 test_xX).2.2 = 3 / 4 + 1 / 4 * Complex.I

                                                                                    Master Theorem: Complex Grassmannian Vector-Relation Configurations, Pole-Free Square-Move Resonance at $x_X = -1$, and Exact SymPy Benchmark Check Figures:

                                                                                    1. Every $2 \times 4$ rational chart matrix $C_{\mathrm{rat}}(x_1, x_2, x_X)$ ($x_X \neq 0$) has exact Plücker minors $p_{01} = 1$, $p_{02} = x_X^{-1}$, $p_{03} = -x_2$, $p_{12} = x_1$, $p_{13} = x_X$, $p_{23} = x_1 x_2 + 1$, and satisfies pluckerQuadraticRelation2x4 = 0,
                                                                                    2. Both the pre-mutation gr24HomogeneousVRC and post-mutation gr24MutatedHomogeneousVRC satisfy $V K^\top = 0$ and pluckerQuadraticRelation2x4 = 0 for all $x_1, x_2, x_X \in \mathbb{C}$,
                                                                                    3. At the on-shell polariton resonance pole $x_X = -1$ ($x_X + 1 = 0$), where the rational cluster mutation divides by zero, gr24MutatedHomogeneousVRC x1 x2 (-1) remains regular with finite Plücker minors $P_{01} = 1$, $P_{02} = 0$, $P_{03} = x_2$, $P_{12} = x_2 - x_1$, $P_{13} = 1$, and $P_{23} = x_2(x_1 - x_2)$,
                                                                                    4. On the concrete off-shell complex test point from qci_gxc_sympy.py (lines 1190–1212), $x_1 = \frac{1}{2} + \frac{1}{5}i$, $x_2 = -\frac{3}{10} + \frac{7}{10}i$, $x_X = \frac{6}{5} - \frac{2}{5}i$:
                                                                                      • $p_{03}(C_{\mathrm{rat}}(x_1, x_2, x_X)) = -x_2 = \frac{3}{10} - \frac{7}{10}i$, and
                                                                                      • $(\operatorname{gr24ClusterMutation}(x_1, x_2, x_X)).2.2 = x_X^{-1} = \frac{3}{4} + \frac{1}{4}i$.