Documentation

HexMatrix.Notation

#m[a, b; c, d] is the Hex.Matrix with rows [a, b] and [c, d]. Rows are ;-separated and entries ,-separated.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    def Hex.Matrix.render {R : Type u_1} {n m : Nat} [Repr R] (M : Matrix R n m) :

    Render M in #m[...] notation, with entries right-justified per column so the columns line up. The output is copy-pasteable as input. For example,

    #m[ 0, 2,  1;
       -6, 0, -8;
        5, 6,  0]
    

    This is what the Repr instance shows under #eval.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[instance_reducible, instance 10000]
      instance Hex.Matrix.instRepr {R : Type u_1} {n m : Nat} [Repr R] :
      Repr (Matrix R n m)

      Show matrices in copy-pasteable #m[...] notation under #eval/Repr. Higher priority than the #v[...] vector instance below so a matrix renders as a grid rather than as a nested vector of vectors.

      Equations
      @[instance_reducible]
      instance Hex.Matrix.instToStringOfRepr {R : Type u_1} {n m : Nat} [Repr R] :

      The #m[...] rendering as a String.

      Equations
      @[instance_reducible, instance 10000]
      instance Hex.Matrix.reprVector {R : Type u_1} {n : Nat} [Repr R] :
      Repr (Vector R n)

      Render a vector in copy-pasteable #v[...] notation under #eval/Repr, mirroring the #m[...] matrix rendering. Higher priority than the core deriving Repr instance, so a bare vector (for example a matrix row or an LLL short vector) prints as #v[...] and can be pasted straight back as input.

      Equations