A logical operator has at least one nonzero winding.
ProvedToricCode.winding_ne_zero_of_not_boundaryaether-cataloggeometry
A logical operator has at least one nonzero winding.
theorem ToricCode.winding_ne_zero_of_not_boundary{z : Edge M N → F2} (hz : z ∈ cycles M N)
(hnb : z ∉ boundaries M N) : hWind M N z 0 ≠ 0 ∨ vWind M N z 0 ≠ 0 := by sorry
Formalization Note Transplanted verbatim from the Aether Catalog source Geometry/ToricCode/Distance.lean; the statement is byte-identical to the source declaration, elaborated with autoImplicit disabled in the platform environment.
Preamble
-- Thm stub generated from Geometry/ToricCode/Distance.lean import Mathlib import Definitions.Def_Geometry_ToricCode_Basic import Definitions.Def_Geometry_ToricCode_Distance import Definitions.Def_Geometry_ToricCode_Homology /-! # The `Z`-distance of the `M × N` toric code is exactly `min M N` This is the geometric heart of the development. For the grid cellulation of the torus `(ℤ/M) × (ℤ/N)` we prove `distance M N = min M N`, i.e. the minimal Hamming weight of a cellular one-cycle that is not a boundary is exactly the smaller of the two side lengths. Together with `ToricCode.toric_homologyRank` this establishes the parameters `[[2MN, 2, min M N]]`, specialising to the classical `[[2L², 2, L]]` for the square torus. ## Strategy For each `i : ZMod M` the *column cut* consists of the `N` horizontal edges `(false, (i, y))`. The parity of a chain on this cut is `hWind z i`. Dually `vWind z j` is the parity on the *row cut* of vertical edges `(true, (x, j))`. * `hWind_const` / `vWind_const`: for a cycle these parities do not depend on the cut. (This is discrete Stokes: the difference of two neighbouring cut parities is the sum of the vertex boundary over a column.) * `hWind_of_boundary` / `vWind_of_boundary`: they vanish on boundaries. * `winding_ne_zero_of_not_boundary`: conversely, a cycle with both windings zero *is* a boundary. This is proved by a dimension count: the winding map `cycles → 𝔽₂²` is onto, so its kernel has dimension `MN - 1`, which is exactly the dimension of the boundary space computed in `ToricCode.Homology`. * Hence a logical operator has odd parity on each of the `M` pairwise disjoint column cuts, or on each of the `N` pairwise disjoint row cuts, so it uses at least `min M N` edges; and the two coordinate loops, of weights `M` and `N`, realise the bound. -/ -- open removed: section is not a namespace open ToricCode variable (M N : ℕ) [NeZero M] [NeZero N] /-! ### Winding parities -/ /-! ### Windings vanish on boundaries -/ /-! ### The winding map and its surjectivity -/ /-! ### The kernel of the winding map is exactly the boundary space -/
Formal statement
theorem ToricCode.winding_ne_zero_of_not_boundary{z : Edge M N → F2} (hz : z ∈ cycles M N)
(hnb : z ∉ boundaries M N) : hWind M N z 0 ≠ 0 ∨ vWind M N z 0 ≠ 0 := by sorrySource