Documentation

HexMatrixTheory.Rational

Decode a scalar; used only in the soundness layer.

Equations
Instances For

    Decode a common-denominator matrix.

    Equations
    Instances For
      theorem HexMatrixTheory.decodeScalar_eq (q : ℚ) (z : ℤ) (d : ℕ) (hd : 0 < d) (h : q.num * ↑d = z * ↑q.den) :
      theorem HexMatrixTheory.scaleRow_sound (d : ℕ) (q : List ℚ) (z : List ℤ) (hd : 0 < d) (h : Hex.Matrix.Lists.scaleRow d q z = true) :
      theorem HexMatrixTheory.scaleRows_sound (d : ℕ) (q : List (List ℚ)) (z : List (List ℤ)) (hd : 0 < d) (h : Hex.Matrix.Lists.scaleRows d q z = true) :
      q = decodeRows { denom := d, nums := z }

      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.