Decode a scalar; used only in the soundness layer.
Equations
- HexMatrixTheory.decodeScalar d z = ↑z / ↑d
Instances For
Decode a common-denominator vector.
Equations
Instances For
Decode a common-denominator matrix.
Equations
- HexMatrixTheory.decodeRows s = List.map (fun (row : List ℤ) => List.map (HexMatrixTheory.decodeScalar s.denom) row) s.nums
Instances For
theorem
HexMatrixTheory.scaleRow_sound
(d : ℕ)
(q : List ℚ)
(z : List ℤ)
(hd : 0 < d)
(h : Hex.Matrix.Lists.scaleRow d q z = true)
:
The actual common-denominator producer always chooses a positive denominator, including for the empty list.
Every entry denominator divides the denominator chosen by the producer.
Clearing denominators in the shared producer passes the literal integer cross-product checker.
Decoding the producer output recovers every rational entry in its original order.
Matrix encoding preserves empty rows, dimensions and entry order.