Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

ShiftPencilBlocks

Abstract

ShiftPencilBlocks supplies the width-three bridge max-flow proof.

Formulas retain the Lean parameter types and all hypotheses. HDiv.hDiv and HMod.hMod are displayed infix: on natural and integer carriers they mean the respective Lean integer division and remainder operations; on rational carriers division is field division. Coe.coe denotes the coercion determined by the displayed target type. Finite and dependent-pair constructors omit proof fields, which do not change their values. A dash in a match pattern is an anonymous wildcard. CoeFun.coe and CoeSort.coe retain coercions to functions and types. All dimensions use ℕ, all construction coefficients use ℚ, and max-flow uses ℂ.

Definition 1.1 (ParameterizedBaseWitness).

Formalization. D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.ParameterizedBaseWitness (✓ std3).

Source. Repository-derived.

Commentary.

ParameterizedBaseWitness asserts rational full-rank flows for pairs whose dimensions are sums of short and long shift-block dimensions, with positive depths and positive long-block multiplicities; base_of_parameterized uses the decomposition of strict base pairs to recover BaseWitness.

Theorem 1.2 (base_of_parameterized).

Proof. Machine-checked in Lean as D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.base_of_parameterized (✓ std3). ∎

Source. Repository-derived.

Commentary.

Every strict base dimension pair can be decomposed into short and long shift blocks, so full rank for the parameterized family implies BaseWitness; LongReservoir.base_witness applies this implication to its constructions.

Definition 1.3 (rectExtend).

Formalization. D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.rectExtend (✓ std3).

Source. Repository-derived.

Commentary.

rectExtend extends a finite rectangular array by zero to natural-number coordinates; pencil_mulVec uses it to express the pencil recurrence uniformly at the boundary.

Definition 1.4 (shift1).

Formalization. D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.shift1 (✓ std3).

Source. Repository-derived.

Commentary.

shift1 has entry one when the column index is one greater than the row index and zero elsewhere; pencil combines it with the rectangular identity to couple adjacent coordinates.

Definition 1.5 (pencil).

Formalization. D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.pencil (✓ std3).

Source. Repository-derived.

Commentary.

pencil is the sum of the unshifted and shifted Kronecker terms, mapping (x+1)y input coordinates to x(y+1) output coordinates; pencil_rank_of_le proves full row rank when x ≤ y.

Theorem 1.6 (pencil_rank_of_le).

Proof. Machine-checked in Lean as D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.pencil_rank_of_le (✓ std3). ∎

Source. Repository-derived.

Commentary.

When x ≤ y, pencil has full row rank x*(y+1), because its transpose recurrence propagates to a zero boundary. widthTwo_rank_of_lt applies this blockwise to dimension pairs with increasing depths.

Theorem 1.7 (block_mulVec).

Proof. Machine-checked in Lean as D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.block_mulVec (✓ std3). ∎

Source. Repository-derived.

Commentary.

Multiplication by a block-diagonal matrix acts on each block using only the corresponding input coordinates; blockKernelEquiv uses this identity to identify its kernel with the product of the individual kernels.

Definition 1.8 (tensorBlockEquiv).

Formalization. D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.tensorBlockEquiv (✓ std3).

Source. Repository-derived.

Commentary.

tensorBlockEquiv groups a pair of dependent block indices into a single index for the pair of blocks; widthTwo_block_decomposition uses this reindexing to express the tensor matrix as a block-diagonal family of pencils.

Theorem 1.9 (pencil_mulVec).

Proof. Machine-checked in Lean as D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.pencil_mulVec (✓ std3). ∎

Source. Repository-derived.

Commentary.

At each output position, pencil multiplication adds the current input coordinate and the adjacent shifted coordinate, with zero extension at the boundary; antiDiagonal_kernel uses this recurrence to cancel successive alternating signs.

Definition 1.10 (antiDiagonal).

Formalization. D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.antiDiagonal (✓ std3).

Source. Repository-derived.

Commentary.

antiDiagonal is supported where the two coordinate indices sum to p and has alternating signs there; antiDiagonal_kernel shows that it lies in the kernel of the short-long pencil.

Theorem 1.11 (antiDiagonal_kernel).

Proof. Machine-checked in Lean as D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.antiDiagonal_kernel (✓ std3). ∎

Source. Repository-derived.

Commentary.

The alternating anti-diagonal vector is annihilated by pencil p (p+1); ReservoirSchur.widthTwo_kernelEmbedding applies this in every short-long block to construct kernel vectors.

Definition 1.12 (blockLength).

Formalization. D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.blockLength (✓ std3).

Source. Repository-derived.

Commentary.

blockLength assigns length p to each of the alpha short blocks and p+1 to each of the beta long blocks; arrow0 and arrow1 use these lengths to form their block-diagonal matrices.

Definition 1.13 (leftDim).

Formalization. D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.leftDim (✓ std3).

Source. Repository-derived.

Commentary.

leftDim is the total row dimension p*alpha+(p+1)*beta of the shift blocks; rows_card identifies it with the cardinality of the dependent row-index type.

Definition 1.14 (rightDim).

Formalization. D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.rightDim (✓ std3).

Source. Repository-derived.

Commentary.

rightDim is the total column dimension (p+1)*alpha+(p+2)*beta of the shift blocks; cols_card identifies it with the cardinality of the dependent column-index type.

Theorem 1.15 (rows_card).

Proof. Machine-checked in Lean as D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.rows_card (✓ std3). ∎

Source. Repository-derived.

Commentary.

The dependent row-index type has cardinality leftDim; same_depth_kernel_dimension uses this count with the rank calculation to compute the kernel dimension.

Theorem 1.16 (cols_card).

Proof. Machine-checked in Lean as D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.cols_card (✓ std3). ∎

Source. Repository-derived.

Commentary.

The dependent column-index type has cardinality rightDim; same_depth_kernel_dimension uses this count as the domain dimension in rank-nullity.

Definition 1.17 (arrow0).

Formalization. D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.arrow0 (✓ std3).

Source. Repository-derived.

Commentary.

arrow0 is the block-diagonal sum of the rectangular identity maps for the short and long blocks; widthTwoMatrix pairs it with the transpose of the second dimension pair’s unshifted map.

Definition 1.18 (arrow1).

Formalization. D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.arrow1 (✓ std3).

Source. Repository-derived.

Commentary.

arrow1 is the block-diagonal sum of the one-step shift maps for the short and long blocks; widthTwoMatrix pairs it with the transpose of the second dimension pair’s shifted map.

Definition 1.19 (widthTwoMatrix).

Formalization. D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.widthTwoMatrix (✓ std3).

Source. Repository-derived.

Commentary.

widthTwoMatrix is the sum of the two Kronecker products formed from arrow0 and arrow1; widthTwo_block_decomposition splits it into rectangular pencils indexed by pairs of blocks.

Theorem 1.20 (widthTwo_block_decomposition).

Proof. Machine-checked in Lean as D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.widthTwo_block_decomposition (✓ std3). ∎

Source. Repository-derived.

Commentary.

Reindexing the rows and columns identifies widthTwoMatrix with a block-diagonal family of rectangular pencils; widthTwo_rank_sum uses this decomposition to add their ranks.

Theorem 1.21 (witness_of_typed_slices).

Proof. Machine-checked in Lean as D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.witness_of_typed_slices (✓ std3). ∎

Source. Repository-derived.

Commentary.

A rational three-slice contraction attaining the smaller outer cut on arbitrary finite index types can be reindexed to Fin a, Fin b, Fin c and Fin d without changing rank; witness_of_widthTwo_rank applies this to the block-indexed construction.

Theorem 1.22 (different_depth_witness).

Proof. Machine-checked in Lean as D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.different_depth_witness (✓ std3). ∎

Source. Repository-derived.

Commentary.

When the two depths differ, the width-two pencil already gives rational matrices attaining min(ad,bc) for the parameterized dimensions; LongReservoir.parameterized_base_witness uses this for the unequal-depth case.

Theorem 1.23 (same_depth_kernel_dimension).

Proof. Machine-checked in Lean as D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.same_depth_kernel_dimension (✓ std3). ∎

Source. Repository-derived.

Commentary.

At equal depths, the kernel of widthTwoMatrix has dimension alpha*delta; ReservoirSchur.kernelEmbedding_range combines this count with its injective kernel parametrization to show that every kernel vector has those coordinates.

Theorem 1.24 (zero_defect_witness).

Proof. Machine-checked in Lean as D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.zero_defect_witness (✓ std3). ∎

Source. Repository-derived.

Commentary.

At equal depths, if alphadelta or betagamma vanishes, the width-two matrix attains the smaller outer cut; LongReservoir.parameterized_base_witness uses this for the zero-defect cases.

Theorem 1.25 (double_fin_pick).

Proof. Machine-checked in Lean as D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.double_fin_pick (✓ std3). ∎

Source. Repository-derived.

Commentary.

A double finite sum supported at a single pair of indices equals the product of the two coefficients times the zero-extended array value; ReservoirSchur.reservoirCross_SL_short_row uses this to compute the added slice at a short-row position.

Theorem 1.26 (neg_one_pow_square).

Proof. Machine-checked in Lean as D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.neg_one_pow_square (✓ std3). ∎

Source. Repository-derived.

Commentary.

The square of every integer power of -1 is one; ReservoirSchur.cokernel_reservoir_kernel uses this identity to cancel the two anti-diagonal signs in the projected reservoir equation.

Theorem 1.27 (short_short_cyclic_schur_rank).

Proof. Machine-checked in Lean as D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.short_short_cyclic_schur_rank (✓ std3). ∎

Source. Repository-derived.

Commentary.

For 0 < B ≤ A, 0 < D ≤ G and p > 0, the short reservoir Schur complement has rank min(AD,BG); ReservoirSchur.short_short_injective_witness combines this with the relevant dimension ordering to obtain an injective Schur map.

Theorem 1.28 (long_long_cyclic_schur_rank).

Proof. Machine-checked in Lean as D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.long_long_cyclic_schur_rank (✓ std3). ∎

Source. Repository-derived.

Commentary.

For 0 < A ≤ B, 0 < G ≤ D and p > 0, the long reservoir Schur complement has rank min(AD,BG); LongReservoir.long_long_injective_witness uses this rank to eliminate the remaining kernel coordinates.

Theorem 1.29 (matrix_injective_of_rank).

Proof. Machine-checked in Lean as D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.matrix_injective_of_rank (✓ std3). ∎

Source. Repository-derived.

Commentary.

A rational matrix whose rank equals its number of columns defines an injective linear map; LongReservoir.long_long_injective_witness applies this to its full-column-rank Schur complement.

Theorem 1.30 (schur_two_equations).

Proof. Machine-checked in Lean as D5/S3/Quantum/TensorNetworks/BridgeGraph/ShiftPencilBlocks.schur_two_equations (✓ std3). ∎

Source. Repository-derived.

Commentary.

If R is invertible and H-LR⁻¹T is injective, the two displayed coupled homogeneous equations imply v=w=0; ReservoirSchur.short_reservoir_injective and LongReservoir.long_reservoir_injective use this to prove injectivity of the augmented flow matrices.

References