{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE StandaloneDeriving #-}
module Numeric.LAPACK.Matrix.Block.Private (
   Matrix(Diagonal, Above, Beside, Square, Upper, Lower, Symmetric),
   Diagonal,
   Append, aboveFromFull, besideFromFull,
   Square,
   Triangular,
   Symmetric, squareFromSymmetric, schurComplement,
   ) where

import qualified Numeric.LAPACK.Matrix as Matrix
import qualified Numeric.LAPACK.Matrix.Class as MatrixClass
import qualified Numeric.LAPACK.Matrix.Divide as Divide
import qualified Numeric.LAPACK.Matrix.Multiply as Multiply
import qualified Numeric.LAPACK.Matrix.Square as Square
import qualified Numeric.LAPACK.Matrix.Array.Private as ArrMatrix
import qualified Numeric.LAPACK.Matrix.Plain.Format as ArrFormat
import qualified Numeric.LAPACK.Matrix.Shape.Omni as Omni
import qualified Numeric.LAPACK.Matrix.Layout as Layout
import qualified Numeric.LAPACK.Matrix.Extent.Private as Extent
import qualified Numeric.LAPACK.Vector.Private as Vector
import qualified Numeric.LAPACK.Output as Output
import qualified Numeric.Netlib.Class as Class
import Numeric.LAPACK.Matrix.Divide (determinant)
import Numeric.LAPACK.Matrix.Type.Private
         (Matrix, Layout(layout), LayoutExtra, Quadratic, squareSize)
import Numeric.LAPACK.Matrix.Layout.Private (Filled)
import Numeric.LAPACK.Matrix.Extent.Private (Size, Big)
import Numeric.LAPACK.Matrix ((#*#), (#*##), (##*#), (#+#), (#-#), (===), (|||))
import Numeric.LAPACK.Vector (Vector, (|+|))
import Numeric.LAPACK.Shape.Private (Unchecked(Unchecked), deconsUnchecked)

import qualified Data.Array.Comfort.Storable as Array
import qualified Data.Array.Comfort.Boxed as BoxedArray
import qualified Data.Array.Comfort.Shape as Shape
import Data.Array.Comfort.Shape ((::+)((::+)))

import qualified Data.Stream as Stream
import Data.Function.HT (powerAssociative)
import Data.Tuple.HT (swap)

import qualified Type.Data.Bool as TBool


type family ShapeHead sh; type instance ShapeHead (sh0::+sh1) = sh0
type family ShapeTail sh; type instance ShapeTail (sh0::+sh1) = sh1


data Diagonal typ0 typ1
data instance
   Matrix (Diagonal typ0 typ1) xl xu
      lower upper meas vert horiz height width a where
   Diagonal ::
      (Shape.C sh0, Eq sh0, Shape.C sh1, Eq sh1) =>
      Quadratic typ0 xl0 xu0 lower upper sh0 a ->
      Quadratic typ1 xl1 xu1 lower upper sh1 a ->
      Quadratic
         (Diagonal typ0 typ1) (xl0,xl1) (xu0,xu1)
         lower upper (sh0::+sh1) a

type family Diagonal0 extra; type instance Diagonal0 (x0,x1) = x0
type family Diagonal1 extra; type instance Diagonal1 (x0,x1) = x1

deriving instance
   (Show (Quadratic typ0 (Diagonal0 xl) (Diagonal0 xu)
            lower upper (ShapeHead height) a),
    Show (Quadratic typ1 (Diagonal1 xl) (Diagonal1 xu)
            lower upper (ShapeTail height) a),
    Shape.C height, Shape.C width, Show height, Show width, Show a) =>
   Show (Matrix (Diagonal typ0 typ1) xl xu
            lower upper meas vert horiz height width a)

instance
   (Matrix.Box typ0, Matrix.Box typ1) =>
      Matrix.Box (Diagonal typ0 typ1) where
   type BoxExtra (Diagonal typ0 typ1) extra =
         (Matrix.BoxExtra typ0 (Diagonal0 extra),
          Matrix.BoxExtra typ1 (Diagonal1 extra))
   extent :: Matrix
  (Diagonal typ0 typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Extent meas vert horiz height width
extent (Diagonal a b) = (sh0 ::+ sh1) -> Square (sh0 ::+ sh1)
forall sh. sh -> Square sh
Extent.square (Quadratic typ0 xl0 xu0 lower upper sh0 a -> sh0
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Quadratic typ0 xl0 xu0 lower upper sh0 a
a sh0 -> sh1 -> sh0 ::+ sh1
forall sh0 sh1. sh0 -> sh1 -> sh0 ::+ sh1
::+ Quadratic typ1 xl1 xu1 lower upper sh1 a -> sh1
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Quadratic typ1 xl1 xu1 lower upper sh1 a
b)

instance
   (Matrix.Transpose typ0, Matrix.Transpose typ1) =>
      Matrix.Transpose (Diagonal typ0 typ1) where
   type TransposeExtra (Diagonal typ0 typ1) extra =
         (Matrix.TransposeExtra typ0 (Diagonal0 extra),
          Matrix.TransposeExtra typ1 (Diagonal1 extra))
   transpose :: Matrix
  (Diagonal typ0 typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Diagonal typ0 typ1)
     xu
     xl
     upper
     lower
     meas
     horiz
     vert
     width
     height
     a
transpose (Diagonal a b) =
      Quadratic typ0 xu0 xl0 upper lower sh0 a
-> Quadratic typ1 xu1 xl1 upper lower sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xu0, xu1)
     (xl0, xl1)
     upper
     lower
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower upper a typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
Diagonal (Matrix typ0 xl0 xu0 lower upper Shape Small Small sh0 sh0 a
-> Quadratic typ0 xu0 xl0 upper lower sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typ0 xl0 xu0 lower upper Shape Small Small sh0 sh0 a
a) (Matrix typ1 xl1 xu1 lower upper Shape Small Small sh1 sh1 a
-> Quadratic typ1 xu1 xl1 upper lower sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typ1 xl1 xu1 lower upper Shape Small Small sh1 sh1 a
b)

instance
   (Matrix.Box typ0, Matrix.Box typ1) =>
      Matrix.ToQuadratic (Diagonal typ0 typ1) where
   heightToQuadratic :: QuadraticMeas
  (Diagonal typ0 typ1) xl xu lower upper meas height width a
-> Quadratic (Diagonal typ0 typ1) xl xu lower upper height a
heightToQuadratic a :: QuadraticMeas
  (Diagonal typ0 typ1) xl xu lower upper meas height width a
a@(Diagonal _ _) = QuadraticMeas
  (Diagonal typ0 typ1) xl xu lower upper meas height width a
Quadratic (Diagonal typ0 typ1) xl xu lower upper height a
a
   widthToQuadratic :: QuadraticMeas
  (Diagonal typ0 typ1) xl xu lower upper meas height width a
-> Quadratic (Diagonal typ0 typ1) xl xu lower upper width a
widthToQuadratic a :: QuadraticMeas
  (Diagonal typ0 typ1) xl xu lower upper meas height width a
a@(Diagonal _ _) = QuadraticMeas
  (Diagonal typ0 typ1) xl xu lower upper meas height width a
Quadratic (Diagonal typ0 typ1) xl xu lower upper width a
a

instance (Layout typ0, Layout typ1) => Layout (Diagonal typ0 typ1) where
   type LayoutExtra (Diagonal typ0 typ1) extra =
         (Matrix.BoxExtra typ0 (Diagonal0 extra),
          Matrix.BoxExtra typ1 (Diagonal1 extra),
          LayoutExtra typ0 (Diagonal0 extra),
          LayoutExtra typ1 (Diagonal1 extra))
   layout :: Matrix
  (Diagonal typ0 typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Array (height, width) (Separator, Maybe (Style, a))
layout (Diagonal a b) =
      ((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> Array (sh0 ::+ sh1, sh0 ::+ sh1) (Separator, Maybe (Style, a))
forall shape a. C shape => (shape, [[a]]) -> Array shape a
finalizeLayout (((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
 -> Array (sh0 ::+ sh1, sh0 ::+ sh1) (Separator, Maybe (Style, a)))
-> ((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> Array (sh0 ::+ sh1, sh0 ::+ sh1) (Separator, Maybe (Style, a))
forall a b. (a -> b) -> a -> b
$
      let sha :: sh0
sha = Quadratic typ0 xl0 xu0 lower upper sh0 a -> sh0
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Quadratic typ0 xl0 xu0 lower upper sh0 a
a in
      let shb :: sh1
shb = Quadratic typ1 xl1 xu1 lower upper sh1 a -> sh1
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Quadratic typ1 xl1 xu1 lower upper sh1 a
b in
      Quadratic typ0 xl0 xu0 lower upper sh0 a
-> ((sh0, sh0), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Quadratic typ0 xl0 xu0 lower upper sh0 a
a ((sh0, sh0), [[(Separator, Maybe (Style, a))]])
-> ((sh0, sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh0, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
forall height widthA a widthB.
Eq height =>
((height, widthA), [[a]])
-> ((height, widthB), [[a]])
-> ((height, widthA ::+ widthB), [[a]])
|||# sh0 -> sh1 -> ((sh0, sh1), [[(Separator, Maybe (Style, a))]])
forall height width a.
(C height, C width) =>
height -> width -> ((height, width), [[(Separator, Maybe a)]])
layoutEmpty sh0
sha sh1
shb
      ((sh0, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
forall width heightA a heightB.
Eq width =>
((heightA, width), [a])
-> ((heightB, width), [a]) -> ((heightA ::+ heightB, width), [a])
===#
      sh1 -> sh0 -> ((sh1, sh0), [[(Separator, Maybe (Style, a))]])
forall height width a.
(C height, C width) =>
height -> width -> ((height, width), [[(Separator, Maybe a)]])
layoutEmpty sh1
shb sh0
sha ((sh1, sh0), [[(Separator, Maybe (Style, a))]])
-> ((sh1, sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
forall height widthA a widthB.
Eq height =>
((height, widthA), [[a]])
-> ((height, widthB), [[a]])
-> ((height, widthA ::+ widthB), [[a]])
|||# Quadratic typ1 xl1 xu1 lower upper sh1 a
-> ((sh1, sh1), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Quadratic typ1 xl1 xu1 lower upper sh1 a
b

instance (Layout typ0, Layout typ1) => Matrix.Format (Diagonal typ0 typ1) where
   type FormatExtra (Diagonal typ0 typ1) extra =
         (Matrix.BoxExtra typ0 (Diagonal0 extra),
          Matrix.BoxExtra typ1 (Diagonal1 extra),
          LayoutExtra typ0 (Diagonal0 extra),
          LayoutExtra typ1 (Diagonal1 extra))
   format :: Config
-> Matrix
     (Diagonal typ0 typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> out
format = Config
-> Matrix
     (Diagonal typ0 typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> out
forall typ xl xu meas vert horiz height width a out lower upper.
(Layout typ, LayoutExtra typ xl, LayoutExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a, Output out) =>
Config
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> out
Matrix.formatWithLayout

instance
   (Matrix.SquareShape typ0, Matrix.SquareShape typ1) =>
      Matrix.SquareShape (Diagonal typ0 typ1) where
   type SquareShapeExtra (Diagonal typ0 typ1) extra =
         (Matrix.SquareShapeExtra typ0 (Diagonal0 extra),
          Matrix.SquareShapeExtra typ1 (Diagonal1 extra))
   takeDiagonal :: Quadratic (Diagonal typ0 typ1) xl xu lower upper sh a
-> Vector sh a
takeDiagonal (Diagonal a b) =
      Array sh0 a -> Array sh1 a -> Array (sh0 ::+ sh1) a
forall shx shy a.
(C shx, C shy, Storable a) =>
Array shx a -> Array shy a -> Array (shx ::+ shy) a
Array.append (Quadratic typ0 xl0 xu0 lower upper sh0 a -> Array sh0 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> Vector sh a
MatrixClass.takeDiagonal Quadratic typ0 xl0 xu0 lower upper sh0 a
a) (Quadratic typ1 xl1 xu1 lower upper sh1 a -> Array sh1 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> Vector sh a
MatrixClass.takeDiagonal Quadratic typ1 xl1 xu1 lower upper sh1 a
b)
   identityFrom :: Quadratic (Diagonal typ0 typ1) xl xu lower upper sh a
-> Quadratic (Diagonal typ0 typ1) xl xu lower upper sh a
identityFrom (Diagonal a b) =
      Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower upper a typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
Diagonal (Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ0 xl0 xu0 lower upper sh0 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
MatrixClass.identityFrom Quadratic typ0 xl0 xu0 lower upper sh0 a
a) (Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
MatrixClass.identityFrom Quadratic typ1 xl1 xu1 lower upper sh1 a
b)

instance
   (Matrix.Unpack typ0, Matrix.Unpack typ1) =>
      Matrix.Unpack (Diagonal typ0 typ1) where
   type UnpackExtra (Diagonal typ0 typ1) extra =
         (Matrix.UnpackExtra typ0 (Diagonal0 extra),
          Matrix.UnpackExtra typ1 (Diagonal1 extra))
   unpack :: Matrix
  (Diagonal typ0 typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> ArrayMatrix
     Unpacked Arbitrary lower upper meas vert horiz height width a
unpack (Diagonal a0 b0) =
      let a :: Full Shape Small Small sh0 sh0 a
a = Matrix typ0 xl0 xu0 lower upper Shape Small Small sh0 sh0 a
-> Full Shape Small Small sh0 sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix typ0 xl0 xu0 lower upper Shape Small Small sh0 sh0 a
a0 in
      let b :: Full Shape Small Small sh1 sh1 a
b = Matrix typ1 xl1 xu1 lower upper Shape Small Small sh1 sh1 a
-> Full Shape Small Small sh1 sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix typ1 xl1 xu1 lower upper Shape Small Small sh1 sh1 a
b0 in
      let zero :: Omni Unpacked Arbitrary Filled Filled Size Big Big height width
-> General height width a
zero Omni Unpacked Arbitrary Filled Filled Size Big Big height width
shape = Id (General height width a)
forall height width a. Id (General height width a)
Matrix.asGeneral Id (General height width a) -> Id (General height width a)
forall a b. (a -> b) -> a -> b
$ Omni Unpacked Arbitrary Filled Filled Size Big Big height width
-> General height width a
forall property meas vert horiz height width a pack lower upper.
(Homogeneous property, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Omni pack property lower upper meas vert horiz height width
-> ArrayMatrix
     pack property lower upper meas vert horiz height width a
Matrix.zero Omni Unpacked Arbitrary Filled Filled Size Big Big height width
shape in
      let order :: Order
order = Full Shape Small Small sh1 sh1 a -> Order
forall pack property lower upper meas vert horiz height width a.
ArrayMatrix
  pack property lower upper meas vert horiz height width a
-> Order
ArrMatrix.order Full Shape Small Small sh1 sh1 a
b in
      let dims :: (sh0, sh1)
dims = (Full Shape Small Small sh0 sh0 a -> sh0
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Full Shape Small Small sh0 sh0 a
a, Full Shape Small Small sh1 sh1 a -> sh1
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Full Shape Small Small sh1 sh1 a
b) in
      (FullArray Shape Small Small (sh0 ::+ sh1) (sh0 ::+ sh1) a
 -> FullArray Shape Small Small (sh0 ::+ sh1) (sh0 ::+ sh1) a)
-> UnpackedMatrix
     Arbitrary
     Filled
     Filled
     Shape
     Small
     Small
     (sh0 ::+ sh1)
     (sh0 ::+ sh1)
     a
-> UnpackedMatrix
     Arbitrary
     lower
     upper
     Shape
     Small
     Small
     (sh0 ::+ sh1)
     (sh0 ::+ sh1)
     a
forall propertyA lowerA upperA propertyB lowerB upperB measA vertA
       horizA heightA widthA a measB vertB horizB heightB widthB b.
(Property propertyA, Strip lowerA, Strip upperA,
 Property propertyB, Strip lowerB, Strip upperB) =>
(FullArray measA vertA horizA heightA widthA a
 -> FullArray measB vertB horizB heightB widthB b)
-> UnpackedMatrix
     propertyA lowerA upperA measA vertA horizA heightA widthA a
-> UnpackedMatrix
     propertyB lowerB upperB measB vertB horizB heightB widthB b
ArrMatrix.liftUnpacked1 FullArray Shape Small Small (sh0 ::+ sh1) (sh0 ::+ sh1) a
-> FullArray Shape Small Small (sh0 ::+ sh1) (sh0 ::+ sh1) a
forall a. a -> a
id (UnpackedMatrix
   Arbitrary
   Filled
   Filled
   Shape
   Small
   Small
   (sh0 ::+ sh1)
   (sh0 ::+ sh1)
   a
 -> UnpackedMatrix
      Arbitrary
      lower
      upper
      Shape
      Small
      Small
      (sh0 ::+ sh1)
      (sh0 ::+ sh1)
      a)
-> UnpackedMatrix
     Arbitrary
     Filled
     Filled
     Shape
     Small
     Small
     (sh0 ::+ sh1)
     (sh0 ::+ sh1)
     a
-> UnpackedMatrix
     Arbitrary
     lower
     upper
     Shape
     Small
     Small
     (sh0 ::+ sh1)
     (sh0 ::+ sh1)
     a
forall a b. (a -> b) -> a -> b
$
      Full Shape Small Small sh0 sh0 a
-> Full Size Big Big sh0 sh1 a
-> Full Size Big Big sh1 sh0 a
-> Full Shape Small Small sh1 sh1 a
-> UnpackedMatrix
     Arbitrary
     Filled
     Filled
     Shape
     Small
     Small
     (sh0 ::+ sh1)
     (sh0 ::+ sh1)
     a
forall meas vert horiz sizeA sizeB a.
(Measure meas, C vert, C horiz, C sizeA, Eq sizeA, C sizeB,
 Eq sizeB, Floating a) =>
Square sizeA a
-> Full meas vert horiz sizeA sizeB a
-> Full meas horiz vert sizeB sizeA a
-> Square sizeB a
-> Square (sizeA ::+ sizeB) a
Square.stack
         Full Shape Small Small sh0 sh0 a
a             (Omni Unpacked Arbitrary Filled Filled Size Big Big sh0 sh1
-> Full Size Big Big sh0 sh1 a
forall height width a.
(C height, C width, Floating a) =>
Omni Unpacked Arbitrary Filled Filled Size Big Big height width
-> General height width a
zero (Omni Unpacked Arbitrary Filled Filled Size Big Big sh0 sh1
 -> Full Size Big Big sh0 sh1 a)
-> Omni Unpacked Arbitrary Filled Filled Size Big Big sh0 sh1
-> Full Size Big Big sh0 sh1 a
forall a b. (a -> b) -> a -> b
$ Order
-> Dimension Size sh0 sh1
-> Omni Unpacked Arbitrary Filled Filled Size Big Big sh0 sh1
forall pack property lower upper meas vert horiz height width.
(Cons pack property lower upper meas vert horiz, C height, C width,
 MeasureTarget meas height ~ MeasureTarget meas width) =>
Order
-> Dimension meas height width
-> Omni pack property lower upper meas vert horiz height width
Omni.cons Order
order (sh0, sh1)
Dimension Size sh0 sh1
dims)
         (Omni Unpacked Arbitrary Filled Filled Size Big Big sh1 sh0
-> Full Size Big Big sh1 sh0 a
forall height width a.
(C height, C width, Floating a) =>
Omni Unpacked Arbitrary Filled Filled Size Big Big height width
-> General height width a
zero (Omni Unpacked Arbitrary Filled Filled Size Big Big sh1 sh0
 -> Full Size Big Big sh1 sh0 a)
-> Omni Unpacked Arbitrary Filled Filled Size Big Big sh1 sh0
-> Full Size Big Big sh1 sh0 a
forall a b. (a -> b) -> a -> b
$ Order
-> Dimension Size sh1 sh0
-> Omni Unpacked Arbitrary Filled Filled Size Big Big sh1 sh0
forall pack property lower upper meas vert horiz height width.
(Cons pack property lower upper meas vert horiz, C height, C width,
 MeasureTarget meas height ~ MeasureTarget meas width) =>
Order
-> Dimension meas height width
-> Omni pack property lower upper meas vert horiz height width
Omni.cons Order
order (Dimension Size sh1 sh0
 -> Omni Unpacked Arbitrary Filled Filled Size Big Big sh1 sh0)
-> Dimension Size sh1 sh0
-> Omni Unpacked Arbitrary Filled Filled Size Big Big sh1 sh0
forall a b. (a -> b) -> a -> b
$ (sh0, sh1) -> (sh1, sh0)
forall a b. (a, b) -> (b, a)
swap (sh0, sh1)
dims)      Full Shape Small Small sh1 sh1 a
b

instance
   (Matrix.Homogeneous typ0, Matrix.Homogeneous typ1) =>
      Matrix.Homogeneous (Diagonal typ0 typ1) where
   type HomogeneousExtra (Diagonal typ0 typ1) extra =
         (Matrix.HomogeneousExtra typ0 (Diagonal0 extra),
          Matrix.HomogeneousExtra typ1 (Diagonal1 extra))
   zeroFrom :: Matrix
  (Diagonal typ0 typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Diagonal typ0 typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
zeroFrom (Diagonal a b) = Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower upper a typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
Diagonal (Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ0 xl0 xu0 lower upper sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.zeroFrom Quadratic typ0 xl0 xu0 lower upper sh0 a
a) (Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.zeroFrom Quadratic typ1 xl1 xu1 lower upper sh1 a
b)
   negate :: Matrix
  (Diagonal typ0 typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Diagonal typ0 typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
negate (Diagonal a b) = Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower upper a typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
Diagonal (Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ0 xl0 xu0 lower upper sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate Quadratic typ0 xl0 xu0 lower upper sh0 a
a) (Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate Quadratic typ1 xl1 xu1 lower upper sh1 a
b)
   scaleReal :: RealOf a
-> Matrix
     (Diagonal typ0 typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Diagonal typ0 typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
scaleReal RealOf a
k (Diagonal a b) =
      Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower upper a typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
Diagonal (RealOf a
-> Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ0 xl0 xu0 lower upper sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
RealOf a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scaleReal RealOf a
k Quadratic typ0 xl0 xu0 lower upper sh0 a
a) (RealOf a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
RealOf a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scaleReal RealOf a
k Quadratic typ1 xl1 xu1 lower upper sh1 a
b)

instance
   (Matrix.Scale typ0, Matrix.Scale typ1) =>
      Matrix.Scale (Diagonal typ0 typ1) where
   type ScaleExtra (Diagonal typ0 typ1) extra =
         (Matrix.ScaleExtra typ0 (Diagonal0 extra),
          Matrix.ScaleExtra typ1 (Diagonal1 extra))
   scale :: a
-> Matrix
     (Diagonal typ0 typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Diagonal typ0 typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
scale a
k (Diagonal a b) = Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower upper a typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
Diagonal (a
-> Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ0 xl0 xu0 lower upper sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Scale typ, ScaleExtra typ xl, ScaleExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scale a
k Quadratic typ0 xl0 xu0 lower upper sh0 a
a) (a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Scale typ, ScaleExtra typ xl, ScaleExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scale a
k Quadratic typ1 xl1 xu1 lower upper sh1 a
b)

instance
   (Matrix.Additive typ0, Matrix.Additive typ1) =>
      Matrix.Additive (Diagonal typ0 typ1) where
   type AdditiveExtra (Diagonal typ0 typ1) extra =
         (Matrix.AdditiveExtra typ0 (Diagonal0 extra),
          Matrix.AdditiveExtra typ1 (Diagonal1 extra))
   add :: Matrix
  (Diagonal typ0 typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Diagonal typ0 typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Diagonal typ0 typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
add (Diagonal a0 b0) (Diagonal a1 b1) =
      Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower upper a typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
Diagonal (Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ0 xl0 xu0 lower upper sh0 a
forall typ meas vert horiz xl xu height width a lower upper.
(Additive typ, Measure meas, C vert, C horiz, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.add Quadratic typ0 xl0 xu0 lower upper sh0 a
a0 Quadratic typ0 xl0 xu0 lower upper sh0 a
Quadratic typ0 xl0 xu0 lower upper sh0 a
a1) (Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
forall typ meas vert horiz xl xu height width a lower upper.
(Additive typ, Measure meas, C vert, C horiz, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.add Quadratic typ1 xl1 xu1 lower upper sh1 a
b0 Quadratic typ1 xl1 xu1 lower upper sh1 a
Quadratic typ1 xl1 xu1 lower upper sh1 a
b1)

instance
   (Matrix.Subtractive typ0, Matrix.Subtractive typ1) =>
      Matrix.Subtractive (Diagonal typ0 typ1) where
   type SubtractiveExtra (Diagonal typ0 typ1) extra =
         (Matrix.SubtractiveExtra typ0 (Diagonal0 extra),
          Matrix.SubtractiveExtra typ1 (Diagonal1 extra))
   sub :: Matrix
  (Diagonal typ0 typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Diagonal typ0 typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Diagonal typ0 typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
sub (Diagonal a0 b0) (Diagonal a1 b1) =
      Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower upper a typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
Diagonal (Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ0 xl0 xu0 lower upper sh0 a
forall typ meas vert horiz xl xu height width a lower upper.
(Subtractive typ, Measure meas, C vert, C horiz,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.sub Quadratic typ0 xl0 xu0 lower upper sh0 a
a0 Quadratic typ0 xl0 xu0 lower upper sh0 a
Quadratic typ0 xl0 xu0 lower upper sh0 a
a1) (Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
forall typ meas vert horiz xl xu height width a lower upper.
(Subtractive typ, Measure meas, C vert, C horiz,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.sub Quadratic typ1 xl1 xu1 lower upper sh1 a
b0 Quadratic typ1 xl1 xu1 lower upper sh1 a
Quadratic typ1 xl1 xu1 lower upper sh1 a
b1)

instance
   (Multiply.MultiplyVector typ0, Multiply.MultiplyVector typ1) =>
      Multiply.MultiplyVector (Diagonal typ0 typ1) where
   type MultiplyVectorExtra (Diagonal typ0 typ1) extra =
         (Multiply.MultiplyVectorExtra typ0 (Diagonal0 extra),
          Multiply.MultiplyVectorExtra typ1 (Diagonal1 extra))
   matrixVector :: Matrix
  (Diagonal typ0 typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Vector width a -> Vector height a
matrixVector (Diagonal a b) Vector width a
x =
      let (Array sh0 a
x0,Array sh1 a
x1) = Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
forall sh0 sh1 a.
(C sh0, C sh1, Storable a) =>
Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
Array.split Vector width a
Array (sh0 ::+ sh1) a
x
      in Array sh0 a -> Array sh1 a -> Array (sh0 ::+ sh1) a
forall shx shy a.
(C shx, C shy, Storable a) =>
Array shx a -> Array shy a -> Array (shx ::+ shy) a
Array.append (Matrix typ0 xl0 xu0 lower upper Shape Small Small sh0 sh0 a
-> Array sh0 a -> Array sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typ0 xl0 xu0 lower upper Shape Small Small sh0 sh0 a
a Array sh0 a
x0) (Matrix typ1 xl1 xu1 lower upper Shape Small Small sh1 sh1 a
-> Array sh1 a -> Array sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typ1 xl1 xu1 lower upper Shape Small Small sh1 sh1 a
b Array sh1 a
x1)
   vectorMatrix :: Vector height a
-> Matrix
     (Diagonal typ0 typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Vector width a
vectorMatrix Vector height a
x (Diagonal a b) =
      let (Array sh0 a
x0,Array sh1 a
x1) = Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
forall sh0 sh1 a.
(C sh0, C sh1, Storable a) =>
Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
Array.split Vector height a
Array (sh0 ::+ sh1) a
x
      in Array sh0 a -> Array sh1 a -> Array (sh0 ::+ sh1) a
forall shx shy a.
(C shx, C shy, Storable a) =>
Array shx a -> Array shy a -> Array (shx ::+ shy) a
Array.append (Array sh0 a
-> Matrix typ0 xl0 xu0 lower upper Shape Small Small sh0 sh0 a
-> Array sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Array sh0 a
x0 Matrix typ0 xl0 xu0 lower upper Shape Small Small sh0 sh0 a
a) (Array sh1 a
-> Matrix typ1 xl1 xu1 lower upper Shape Small Small sh1 sh1 a
-> Array sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Array sh1 a
x1 Matrix typ1 xl1 xu1 lower upper Shape Small Small sh1 sh1 a
b)

instance
   (Multiply.MultiplySquare typ0, Multiply.MultiplySquare typ1) =>
      Multiply.MultiplySquare (Diagonal typ0 typ1) where
   type MultiplySquareExtra (Diagonal typ0 typ1) extra =
         (Multiply.MultiplySquareExtra typ0 (Diagonal0 extra),
          Multiply.MultiplySquareExtra typ1 (Diagonal1 extra))
   squareFull :: Quadratic (Diagonal typ0 typ1) xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
squareFull (Diagonal a b) =
      (AboveGeneral sh0 sh1 (Unchecked width) a
 -> AboveGeneral sh0 sh1 (Unchecked width) a)
-> Full meas vert horiz (sh0 ::+ sh1) width a
-> Full meas vert horiz (sh0 ::+ sh1) width a
forall meas vert horiz height0 height1 width a.
(Measure meas, C vert, C horiz, C height0, C height1, C width,
 Floating a) =>
(AboveGeneral height0 height1 (Unchecked width) a
 -> AboveGeneral height0 height1 (Unchecked width) a)
-> Full meas vert horiz (height0 ::+ height1) width a
-> Full meas vert horiz (height0 ::+ height1) width a
withVerticalSplit ((AboveGeneral sh0 sh1 (Unchecked width) a
  -> AboveGeneral sh0 sh1 (Unchecked width) a)
 -> Full meas vert horiz (sh0 ::+ sh1) width a
 -> Full meas vert horiz (sh0 ::+ sh1) width a)
-> (AboveGeneral sh0 sh1 (Unchecked width) a
    -> AboveGeneral sh0 sh1 (Unchecked width) a)
-> Full meas vert horiz (sh0 ::+ sh1) width a
-> Full meas vert horiz (sh0 ::+ sh1) width a
forall a b. (a -> b) -> a -> b
$ \(Above top bottom) ->
         Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> AboveGeneral sh0 sh1 (Unchecked width) a
forall sh0 sh1 width typ0 xl0 xu0 horiz a typ1 xl1 xu1.
(C sh0, C sh1, Eq width) =>
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
Above (Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, Eq height, C width, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Multiply.squareFull Quadratic typ0 xl0 xu0 lower upper sh0 a
a Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
top) (Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, Eq height, C width, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Multiply.squareFull Quadratic typ1 xl1 xu1 lower upper sh1 a
b Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
bottom)
   fullSquare :: Full meas vert horiz height width a
-> Quadratic (Diagonal typ0 typ1) xl xu lower upper width a
-> Full meas vert horiz height width a
fullSquare Full meas vert horiz height width a
x (Diagonal a b) =
      Full meas vert horiz height (sh0 ::+ sh1) a
-> (BesideGeneral (Unchecked height) sh0 sh1 a
    -> BesideGeneral (Unchecked height) sh0 sh1 a)
-> Full meas vert horiz height (sh0 ::+ sh1) a
forall meas vert horiz height width0 width1 a.
(Measure meas, C vert, C horiz, C height, C width0, C width1,
 Floating a) =>
Full meas vert horiz height (width0 ::+ width1) a
-> (BesideGeneral (Unchecked height) width0 width1 a
    -> BesideGeneral (Unchecked height) width0 width1 a)
-> Full meas vert horiz height (width0 ::+ width1) a
withHorizontalSplit Full meas vert horiz height width a
Full meas vert horiz height (sh0 ::+ sh1) a
x ((BesideGeneral (Unchecked height) sh0 sh1 a
  -> BesideGeneral (Unchecked height) sh0 sh1 a)
 -> Full meas vert horiz height (sh0 ::+ sh1) a)
-> (BesideGeneral (Unchecked height) sh0 sh1 a
    -> BesideGeneral (Unchecked height) sh0 sh1 a)
-> Full meas vert horiz height (sh0 ::+ sh1) a
forall a b. (a -> b) -> a -> b
$ \(Beside left right) ->
         Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
-> BesideGeneral (Unchecked height) sh0 sh1 a
forall sh0 sh1 height typ0 xl0 xu0 vert a typ1 xl1 xu1.
(C sh0, C sh1, Eq height) =>
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
Beside (Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Multiply.fullSquare Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
left Quadratic typ0 xl0 xu0 lower upper sh0 a
a) (Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Multiply.fullSquare Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
right Quadratic typ1 xl1 xu1 lower upper sh1 a
b)

instance
   (Matrix.MultiplySame typ0, Matrix.MultiplySame typ1) =>
      Matrix.MultiplySame (Diagonal typ0 typ1) where
   type MultiplySameExtra (Diagonal typ0 typ1) extra =
         (Matrix.MultiplySameExtra typ0 (Diagonal0 extra),
          Matrix.MultiplySameExtra typ1 (Diagonal1 extra))
   multiplySame :: matrix -> matrix -> matrix
multiplySame (Diagonal a0 b0) (Diagonal a1 b1) =
      Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower upper a typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
Diagonal (Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ0 xl0 xu0 lower upper sh0 a
forall typ matrix xl xu lower upper meas vert horiz sh a.
(MultiplySame typ,
 matrix ~ Matrix typ xl xu lower upper meas vert horiz sh sh a,
 MultiplySameExtra typ xl, MultiplySameExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C vert, C horiz,
 C sh, Eq sh, Floating a) =>
matrix -> matrix -> matrix
Matrix.multiplySame Quadratic typ0 xl0 xu0 lower upper sh0 a
a0 Quadratic typ0 xl0 xu0 lower upper sh0 a
Quadratic typ0 xl0 xu0 lower upper sh0 a
a1) (Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
forall typ matrix xl xu lower upper meas vert horiz sh a.
(MultiplySame typ,
 matrix ~ Matrix typ xl xu lower upper meas vert horiz sh sh a,
 MultiplySameExtra typ xl, MultiplySameExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C vert, C horiz,
 C sh, Eq sh, Floating a) =>
matrix -> matrix -> matrix
Matrix.multiplySame Quadratic typ1 xl1 xu1 lower upper sh1 a
b0 Quadratic typ1 xl1 xu1 lower upper sh1 a
Quadratic typ1 xl1 xu1 lower upper sh1 a
b1)

instance
   (Multiply.Power typ0, Multiply.Power typ1) =>
      Multiply.Power (Diagonal typ0 typ1) where
   type PowerExtra (Diagonal typ0 typ1) extra =
         (Multiply.PowerExtra typ0 (Diagonal0 extra),
          Multiply.PowerExtra typ1 (Diagonal1 extra))
   square :: Quadratic (Diagonal typ0 typ1) xl xu lower upper sh a
-> Quadratic (Diagonal typ0 typ1) xl xu lower upper sh a
square (Diagonal a b) = Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower upper a typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
Diagonal (Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ0 xl0 xu0 lower upper sh0 a
forall typ xl xu lower upper sh a.
(Power typ, PowerExtra typ xl, PowerExtra typ xu, PowerStrip lower,
 PowerStrip upper, C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
Multiply.square Quadratic typ0 xl0 xu0 lower upper sh0 a
a) (Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
forall typ xl xu lower upper sh a.
(Power typ, PowerExtra typ xl, PowerExtra typ xu, PowerStrip lower,
 PowerStrip upper, C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
Multiply.square Quadratic typ1 xl1 xu1 lower upper sh1 a
b)
   power :: Integer
-> Quadratic (Diagonal typ0 typ1) xl xu lower upper sh a
-> Quadratic (Diagonal typ0 typ1) xl xu lower upper sh a
power Integer
n (Diagonal a b) = Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower upper a typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
Diagonal (Integer
-> Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ0 xl0 xu0 lower upper sh0 a
forall typ xl xu lower upper sh a.
(Power typ, PowerExtra typ xl, PowerExtra typ xu, PowerStrip lower,
 PowerStrip upper, C sh, Floating a) =>
Integer
-> Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
Multiply.power Integer
n Quadratic typ0 xl0 xu0 lower upper sh0 a
a) (Integer
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
forall typ xl xu lower upper sh a.
(Power typ, PowerExtra typ xl, PowerExtra typ xu, PowerStrip lower,
 PowerStrip upper, C sh, Floating a) =>
Integer
-> Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
Multiply.power Integer
n Quadratic typ1 xl1 xu1 lower upper sh1 a
b)
   powers1 :: Quadratic (Diagonal typ0 typ1) xl xu lower upper sh a
-> Stream (Quadratic (Diagonal typ0 typ1) xl xu lower upper sh a)
powers1 (Diagonal a b) =
      (Quadratic typ0 xl0 xu0 lower upper sh0 a
 -> Quadratic typ1 xl1 xu1 lower upper sh1 a
 -> Quadratic
      (Diagonal typ0 typ1)
      (xl0, xl1)
      (xu0, xu1)
      lower
      upper
      (sh0 ::+ sh1)
      a)
-> Stream (Quadratic typ0 xl0 xu0 lower upper sh0 a)
-> Stream (Quadratic typ1 xl1 xu1 lower upper sh1 a)
-> Stream
     (Quadratic
        (Diagonal typ0 typ1)
        (xl0, xl1)
        (xu0, xu1)
        lower
        upper
        (sh0 ::+ sh1)
        a)
forall a b c. (a -> b -> c) -> Stream a -> Stream b -> Stream c
Stream.zipWith Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower upper a typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
Diagonal (Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Stream (Quadratic typ0 xl0 xu0 lower upper sh0 a)
forall typ xl xu lower upper sh a.
(Power typ, PowerExtra typ xl, PowerExtra typ xu, PowerStrip lower,
 PowerStrip upper, C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Stream (Quadratic typ xl xu lower upper sh a)
Multiply.powers1 Quadratic typ0 xl0 xu0 lower upper sh0 a
a) (Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Stream (Quadratic typ1 xl1 xu1 lower upper sh1 a)
forall typ xl xu lower upper sh a.
(Power typ, PowerExtra typ xl, PowerExtra typ xu, PowerStrip lower,
 PowerStrip upper, C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Stream (Quadratic typ xl xu lower upper sh a)
Multiply.powers1 Quadratic typ1 xl1 xu1 lower upper sh1 a
b)

instance
   (Divide.Determinant typ0, Divide.Determinant typ1) =>
      Divide.Determinant (Diagonal typ0 typ1) where
   type DeterminantExtra (Diagonal typ0 typ1) extra =
         (Matrix.DeterminantExtra typ0 (Diagonal0 extra),
          Matrix.DeterminantExtra typ1 (Diagonal1 extra))
   determinant :: Quadratic (Diagonal typ0 typ1) xl xu lower upper sh a -> a
determinant (Diagonal a b) = Quadratic typ0 xl0 xu0 lower upper sh0 a -> a
forall typ xl xu lower upper sh a.
(Determinant typ, DeterminantExtra typ xl, DeterminantExtra typ xu,
 Strip lower, Strip upper, C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> a
determinant Quadratic typ0 xl0 xu0 lower upper sh0 a
a a -> a -> a
forall a. Num a => a -> a -> a
* Quadratic typ1 xl1 xu1 lower upper sh1 a -> a
forall typ xl xu lower upper sh a.
(Determinant typ, DeterminantExtra typ xl, DeterminantExtra typ xu,
 Strip lower, Strip upper, C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> a
determinant Quadratic typ1 xl1 xu1 lower upper sh1 a
b

instance
   (Divide.Solve typ0, Divide.Solve typ1) =>
      Divide.Solve (Diagonal typ0 typ1) where
   type SolveExtra (Diagonal typ0 typ1) extra =
         (Divide.SolveExtra typ0 (Diagonal0 extra),
          Divide.SolveExtra typ1 (Diagonal1 extra))
   solveRight :: Quadratic (Diagonal typ0 typ1) xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
solveRight (Diagonal a b) =
      (AboveGeneral sh0 sh1 (Unchecked width) a
 -> AboveGeneral sh0 sh1 (Unchecked width) a)
-> Full meas vert horiz (sh0 ::+ sh1) width a
-> Full meas vert horiz (sh0 ::+ sh1) width a
forall meas vert horiz height0 height1 width a.
(Measure meas, C vert, C horiz, C height0, C height1, C width,
 Floating a) =>
(AboveGeneral height0 height1 (Unchecked width) a
 -> AboveGeneral height0 height1 (Unchecked width) a)
-> Full meas vert horiz (height0 ::+ height1) width a
-> Full meas vert horiz (height0 ::+ height1) width a
withVerticalSplit ((AboveGeneral sh0 sh1 (Unchecked width) a
  -> AboveGeneral sh0 sh1 (Unchecked width) a)
 -> Full meas vert horiz (sh0 ::+ sh1) width a
 -> Full meas vert horiz (sh0 ::+ sh1) width a)
-> (AboveGeneral sh0 sh1 (Unchecked width) a
    -> AboveGeneral sh0 sh1 (Unchecked width) a)
-> Full meas vert horiz (sh0 ::+ sh1) width a
-> Full meas vert horiz (sh0 ::+ sh1) width a
forall a b. (a -> b) -> a -> b
$ \(Above top bottom) ->
         Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> AboveGeneral sh0 sh1 (Unchecked width) a
forall sh0 sh1 width typ0 xl0 xu0 horiz a typ1 xl1 xu1.
(C sh0, C sh1, Eq width) =>
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
Above (Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq height, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solveRight Quadratic typ0 xl0 xu0 lower upper sh0 a
a Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
top) (Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq height, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solveRight Quadratic typ1 xl1 xu1 lower upper sh1 a
b Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
bottom)
   solveLeft :: Full meas vert horiz height width a
-> Quadratic (Diagonal typ0 typ1) xl xu lower upper width a
-> Full meas vert horiz height width a
solveLeft Full meas vert horiz height width a
x (Diagonal a b) =
      Full meas vert horiz height (sh0 ::+ sh1) a
-> (BesideGeneral (Unchecked height) sh0 sh1 a
    -> BesideGeneral (Unchecked height) sh0 sh1 a)
-> Full meas vert horiz height (sh0 ::+ sh1) a
forall meas vert horiz height width0 width1 a.
(Measure meas, C vert, C horiz, C height, C width0, C width1,
 Floating a) =>
Full meas vert horiz height (width0 ::+ width1) a
-> (BesideGeneral (Unchecked height) width0 width1 a
    -> BesideGeneral (Unchecked height) width0 width1 a)
-> Full meas vert horiz height (width0 ::+ width1) a
withHorizontalSplit Full meas vert horiz height width a
Full meas vert horiz height (sh0 ::+ sh1) a
x ((BesideGeneral (Unchecked height) sh0 sh1 a
  -> BesideGeneral (Unchecked height) sh0 sh1 a)
 -> Full meas vert horiz height (sh0 ::+ sh1) a)
-> (BesideGeneral (Unchecked height) sh0 sh1 a
    -> BesideGeneral (Unchecked height) sh0 sh1 a)
-> Full meas vert horiz height (sh0 ::+ sh1) a
forall a b. (a -> b) -> a -> b
$ \(Beside left right) ->
         Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
-> BesideGeneral (Unchecked height) sh0 sh1 a
forall sh0 sh1 height typ0 xl0 xu0 vert a typ1 xl1 xu1.
(C sh0, C sh1, Eq height) =>
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
Beside (Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Divide.solveLeft Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
left Quadratic typ0 xl0 xu0 lower upper sh0 a
a) (Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Divide.solveLeft Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
right Quadratic typ1 xl1 xu1 lower upper sh1 a
b)

instance
   (Divide.Inverse typ0, Divide.Inverse typ1) =>
      Divide.Inverse (Diagonal typ0 typ1) where
   type InverseExtra (Diagonal typ0 typ1) extra =
         (Divide.InverseExtra typ0 (Diagonal0 extra),
          Divide.InverseExtra typ1 (Diagonal1 extra))
   inverse :: QuadraticMeas
  (Diagonal typ0 typ1) xl xu lower upper meas height width a
-> QuadraticMeas
     (Diagonal typ0 typ1) xl xu lower upper meas width height a
inverse (Diagonal a b) = Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower upper a typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic
     (Diagonal typ0 typ1)
     (xl0, xl1)
     (xu0, xu1)
     lower
     upper
     (sh0 ::+ sh1)
     a
Diagonal (Quadratic typ0 xl0 xu0 lower upper sh0 a
-> Quadratic typ0 xl0 xu0 lower upper sh0 a
forall typ xl xu lower upper meas height width a.
(Inverse typ, InverseExtra typ xl, InverseExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C height,
 C width, Floating a) =>
QuadraticMeas typ xl xu lower upper meas height width a
-> QuadraticMeas typ xl xu lower upper meas width height a
Divide.inverse Quadratic typ0 xl0 xu0 lower upper sh0 a
a) (Quadratic typ1 xl1 xu1 lower upper sh1 a
-> Quadratic typ1 xl1 xu1 lower upper sh1 a
forall typ xl xu lower upper meas height width a.
(Inverse typ, InverseExtra typ xl, InverseExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C height,
 C width, Floating a) =>
QuadraticMeas typ xl xu lower upper meas height width a
-> QuadraticMeas typ xl xu lower upper meas width height a
Divide.inverse Quadratic typ1 xl1 xu1 lower upper sh1 a
b)


data Square typ00 measOff vertOff horizOff typ11
data instance
   Matrix (Square typ00 measOff vertOff horizOff typ11) xl xu
      lower upper meas vert horiz height width a where
   Square ::
      (Extent.Measure measOff, Extent.C vertOff, Extent.C horizOff,
       Shape.C sh0, Eq sh0, Shape.C sh1, Eq sh1) =>
      Quadratic typ00 xl00 xu00 Filled Filled sh0 a ->
      Matrix typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a ->
      Matrix typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a ->
      Quadratic typ11 xl11 xu11 Filled Filled sh1 a ->
      Quadratic
         (Square typ00 measOff vertOff horizOff typ11)
         (xl00,xl11,(typ10,xl10,xu10))
         (xu00,xu11,(typ01,xu01,xl01))
         Filled Filled (sh0::+sh1) a

type family SquareType extra
type instance SquareType (x00,x11,(typ,x10,x01)) = typ
type family Square00 extra
type family Square01 extra
type family Square10 extra
type family Square11 extra
type instance Square00 (x00,x11,(typ,x10,x01)) = x00
type instance Square01 (x00,x11,(typ,x10,x01)) = x01
type instance Square10 (x00,x11,(typ,x10,x01)) = x10
type instance Square11 (x00,x11,(typ,x10,x01)) = x11

deriving instance
   (Show (Quadratic typ00 (Square00 xl) (Square00 xu)
            Filled Filled (ShapeHead height) a),
    Show (Quadratic typ11 (Square11 xl) (Square11 xu)
            Filled Filled (ShapeTail height) a),
    Show (Matrix (SquareType xu) (Square01 xu) (Square10 xu)
            Filled Filled measOff vertOff horizOff
            (ShapeHead height) (ShapeTail width) a),
    Show (Matrix (SquareType xl) (Square10 xl) (Square01 xl)
            Filled Filled measOff horizOff vertOff
            (ShapeTail height) (ShapeHead width) a),
    Shape.C height, Shape.C width, Show height, Show width, Show a) =>
   Show (Matrix (Square typ00 measOff vertOff horizOff typ11) xl xu
            lower upper meas vert horiz height width a)

instance
   (Matrix.Box typ00, Matrix.Box typ11) =>
      Matrix.Box (Square typ00 measOff vertOff horizOff typ11) where
   type BoxExtra (Square typ00 measOff vertOff horizOff typ11) extra =
         (Matrix.BoxExtra typ00 (Square00 extra),
          Matrix.BoxExtra typ11 (Square11 extra))
   extent :: Matrix
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Extent meas vert horiz height width
extent (Square a _b _c d) = (sh0 ::+ sh1) -> Square (sh0 ::+ sh1)
forall sh. sh -> Square sh
Extent.square (Quadratic typ00 xl00 xu00 Filled Filled sh0 a -> sh0
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Quadratic typ00 xl00 xu00 Filled Filled sh0 a
a sh0 -> sh1 -> sh0 ::+ sh1
forall sh0 sh1. sh0 -> sh1 -> sh0 ::+ sh1
::+ Quadratic typ11 xl11 xu11 Filled Filled sh1 a -> sh1
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d)

instance
   (Matrix.Transpose typ00, Matrix.Transpose typ11) =>
      Matrix.Transpose (Square typ00 measOff vertOff horizOff typ11) where
   type TransposeExtra (Square typ00 measOff vertOff horizOff typ11) extra =
         (Matrix.Transpose (SquareType extra),
          Matrix.TransposeExtra typ00 (Square00 extra),
          Matrix.TransposeExtra (SquareType extra) (Square01 extra),
          Matrix.TransposeExtra (SquareType extra) (Square10 extra),
          Matrix.TransposeExtra typ11 (Square11 extra))
   transpose :: Matrix
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Square typ00 measOff vertOff horizOff typ11)
     xu
     xl
     upper
     lower
     meas
     horiz
     vert
     width
     height
     a
transpose (Square a b c d) =
      Quadratic typ00 xu00 xl00 Filled Filled sh0 a
-> Matrix
     typ10 xu10 xl10 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ01 xu01 xl01 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xu11 xl11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xu00, xu11, (typ01, xu01, xl01))
     (xl00, xl11, (typ10, xl10, xu10))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall measOff vertOff horizOff sh0 sh1 typ00 xl00 xu00 a typ01
       xl01 xu01 typ10 xl10 xu10 typ11 xl11 xu11.
(Measure measOff, C vertOff, C horizOff, C sh0, Eq sh0, C sh1,
 Eq sh1) =>
Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Square
         (Matrix typ00 xl00 xu00 Filled Filled Shape Small Small sh0 sh0 a
-> Quadratic typ00 xu00 xl00 Filled Filled sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typ00 xl00 xu00 Filled Filled Shape Small Small sh0 sh0 a
a) (Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Matrix
     typ10 xu10 xl10 Filled Filled measOff vertOff horizOff sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
c)
         (Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ01 xu01 xl01 Filled Filled measOff horizOff vertOff sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
b) (Matrix typ11 xl11 xu11 Filled Filled Shape Small Small sh1 sh1 a
-> Quadratic typ11 xu11 xl11 Filled Filled sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typ11 xl11 xu11 Filled Filled Shape Small Small sh1 sh1 a
d)

instance
   (Matrix.Box typ00, Matrix.Box typ11) =>
      Matrix.ToQuadratic (Square typ00 measOff vertOff horizOff typ11) where
   heightToQuadratic :: QuadraticMeas
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  meas
  height
  width
  a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     height
     a
heightToQuadratic a :: QuadraticMeas
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  meas
  height
  width
  a
a@(Square _ _ _ _) = QuadraticMeas
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  meas
  height
  width
  a
Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  height
  a
a
   widthToQuadratic :: QuadraticMeas
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  meas
  height
  width
  a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     width
     a
widthToQuadratic a :: QuadraticMeas
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  meas
  height
  width
  a
a@(Square _ _ _ _) = QuadraticMeas
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  meas
  height
  width
  a
Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  width
  a
a

instance
   (Layout typ00, Layout typ11) =>
      Layout (Square typ00 measOff vertOff horizOff typ11) where
   type LayoutExtra (Square typ00 measOff vertOff horizOff typ11) extra =
         (Matrix.BoxExtra typ00 (Square00 extra),
          Matrix.BoxExtra typ11 (Square11 extra),
          Matrix.BoxExtra (SquareType extra) (Square01 extra),
          Matrix.BoxExtra (SquareType extra) (Square10 extra),
          Layout (SquareType extra),
          LayoutExtra typ00 (Square00 extra),
          LayoutExtra typ11 (Square11 extra),
          LayoutExtra (SquareType extra) (Square01 extra),
          LayoutExtra (SquareType extra) (Square10 extra))
   layout :: Matrix
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Array (height, width) (Separator, Maybe (Style, a))
layout (Square a b c d) = ((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> Array (sh0 ::+ sh1, sh0 ::+ sh1) (Separator, Maybe (Style, a))
forall shape a. C shape => (shape, [[a]]) -> Array shape a
finalizeLayout (((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
 -> Array (sh0 ::+ sh1, sh0 ::+ sh1) (Separator, Maybe (Style, a)))
-> ((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> Array (sh0 ::+ sh1, sh0 ::+ sh1) (Separator, Maybe (Style, a))
forall a b. (a -> b) -> a -> b
$
      Matrix typ00 xl00 xu00 Filled Filled Shape Small Small sh0 sh0 a
-> ((sh0, sh0), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Matrix typ00 xl00 xu00 Filled Filled Shape Small Small sh0 sh0 a
a ((sh0, sh0), [[(Separator, Maybe (Style, a))]])
-> ((sh0, sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh0, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
forall height widthA a widthB.
Eq height =>
((height, widthA), [[a]])
-> ((height, widthB), [[a]])
-> ((height, widthA ::+ widthB), [[a]])
|||# Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> ((sh0, sh1), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
b
      ((sh0, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
forall width heightA a heightB.
Eq width =>
((heightA, width), [a])
-> ((heightB, width), [a]) -> ((heightA ::+ heightB, width), [a])
===#
      Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> ((sh1, sh0), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
c ((sh1, sh0), [[(Separator, Maybe (Style, a))]])
-> ((sh1, sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
forall height widthA a widthB.
Eq height =>
((height, widthA), [[a]])
-> ((height, widthB), [[a]])
-> ((height, widthA ::+ widthB), [[a]])
|||# Matrix typ11 xl11 xu11 Filled Filled Shape Small Small sh1 sh1 a
-> ((sh1, sh1), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Matrix typ11 xl11 xu11 Filled Filled Shape Small Small sh1 sh1 a
d

instance
   (Layout typ00, Layout typ11) =>
      Matrix.Format (Square typ00 measOff vertOff horizOff typ11) where
   type FormatExtra (Square typ00 measOff vertOff horizOff typ11) extra =
         (Matrix.BoxExtra typ00 (Square00 extra),
          Matrix.BoxExtra typ11 (Square11 extra),
          Matrix.BoxExtra (SquareType extra) (Square01 extra),
          Matrix.BoxExtra (SquareType extra) (Square10 extra),
          Layout (SquareType extra),
          LayoutExtra typ00 (Square00 extra),
          LayoutExtra typ11 (Square11 extra),
          LayoutExtra (SquareType extra) (Square01 extra),
          LayoutExtra (SquareType extra) (Square10 extra))
   format :: Config
-> Matrix
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> out
format = Config
-> Matrix
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> out
forall typ xl xu meas vert horiz height width a out lower upper.
(Layout typ, LayoutExtra typ xl, LayoutExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a, Output out) =>
Config
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> out
Matrix.formatWithLayout

instance
   (Matrix.SquareShape typ00, Matrix.SquareShape typ11) =>
      Matrix.SquareShape (Square typ00 measOff vertOff horizOff typ11) where
   type SquareShapeExtra (Square typ00 measOff vertOff horizOff typ11) extra =
         (Matrix.SquareShape (SquareType extra),
          Matrix.SquareShapeExtra typ00 (Square00 extra),
          Matrix.SquareShapeExtra typ11 (Square11 extra),
          Matrix.SquareShapeExtra (SquareType extra) (Square01 extra),
          Matrix.SquareShapeExtra (SquareType extra) (Square10 extra),
          Matrix.Homogeneous (SquareType extra),
          Matrix.HomogeneousExtra (SquareType extra) (Square01 extra),
          Matrix.HomogeneousExtra (SquareType extra) (Square10 extra))
   takeDiagonal :: Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  sh
  a
-> Vector sh a
takeDiagonal (Square a _b _c d) =
      Array sh0 a -> Array sh1 a -> Array (sh0 ::+ sh1) a
forall shx shy a.
(C shx, C shy, Storable a) =>
Array shx a -> Array shy a -> Array (shx ::+ shy) a
Array.append (Quadratic typ00 xl00 xu00 Filled Filled sh0 a -> Array sh0 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> Vector sh a
MatrixClass.takeDiagonal Quadratic typ00 xl00 xu00 Filled Filled sh0 a
a) (Quadratic typ11 xl11 xu11 Filled Filled sh1 a -> Array sh1 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> Vector sh a
MatrixClass.takeDiagonal Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d)
   identityFrom :: Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  sh
  a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     sh
     a
identityFrom (Square a b c d) =
      Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall measOff vertOff horizOff sh0 sh1 typ00 xl00 xu00 a typ01
       xl01 xu01 typ10 xl10 xu10 typ11 xl11 xu11.
(Measure measOff, C vertOff, C horizOff, C sh0, Eq sh0, C sh1,
 Eq sh1) =>
Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Square
         (Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Quadratic typ00 xl00 xu00 Filled Filled sh0 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
MatrixClass.identityFrom Quadratic typ00 xl00 xu00 Filled Filled sh0 a
a)
         (Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.zeroFrom Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
b)
         (Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.zeroFrom Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
c)
         (Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
MatrixClass.identityFrom Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d)

instance
   (Matrix.Unpack typ00, Matrix.Unpack typ11) =>
      Matrix.Unpack (Square typ00 measOff vertOff horizOff typ11) where
   type UnpackExtra (Square typ00 measOff vertOff horizOff typ11) extra =
         (Matrix.Unpack (SquareType extra),
          Matrix.UnpackExtra typ00 (Square00 extra),
          Matrix.UnpackExtra typ11 (Square11 extra),
          Matrix.UnpackExtra (SquareType extra) (Square01 extra),
          Matrix.UnpackExtra (SquareType extra) (Square10 extra))
   unpack :: Matrix
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> ArrayMatrix
     Unpacked Arbitrary lower upper meas vert horiz height width a
unpack (Square a b c d) =
      Square sh0 a
-> Full measOff vertOff horizOff sh0 sh1 a
-> Full measOff horizOff vertOff sh1 sh0 a
-> Square sh1 a
-> Square (sh0 ::+ sh1) a
forall meas vert horiz sizeA sizeB a.
(Measure meas, C vert, C horiz, C sizeA, Eq sizeA, C sizeB,
 Eq sizeB, Floating a) =>
Square sizeA a
-> Full meas vert horiz sizeA sizeB a
-> Full meas horiz vert sizeB sizeA a
-> Square sizeB a
-> Square (sizeA ::+ sizeB) a
Square.stack
         (Matrix typ00 xl00 xu00 Filled Filled Shape Small Small sh0 sh0 a
-> Square sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix typ00 xl00 xu00 Filled Filled Shape Small Small sh0 sh0 a
a) (Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Full measOff vertOff horizOff sh0 sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
b)
         (Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Full measOff horizOff vertOff sh1 sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
c) (Matrix typ11 xl11 xu11 Filled Filled Shape Small Small sh1 sh1 a
-> Square sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix typ11 xl11 xu11 Filled Filled Shape Small Small sh1 sh1 a
d)

instance
   (Matrix.Homogeneous typ00, Matrix.Homogeneous typ11) =>
      Matrix.Homogeneous (Square typ00 measOff vertOff horizOff typ11) where
   type HomogeneousExtra (Square typ00 measOff vertOff horizOff typ11) extra =
         (Matrix.Homogeneous (SquareType extra),
          Matrix.HomogeneousExtra typ00 (Square00 extra),
          Matrix.HomogeneousExtra typ11 (Square11 extra),
          Matrix.HomogeneousExtra (SquareType extra) (Square01 extra),
          Matrix.HomogeneousExtra (SquareType extra) (Square10 extra))
   zeroFrom :: Matrix
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
zeroFrom (Square a b c d) =
      Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall measOff vertOff horizOff sh0 sh1 typ00 xl00 xu00 a typ01
       xl01 xu01 typ10 xl10 xu10 typ11 xl11 xu11.
(Measure measOff, C vertOff, C horizOff, C sh0, Eq sh0, C sh1,
 Eq sh1) =>
Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Square
         (Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Quadratic typ00 xl00 xu00 Filled Filled sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.zeroFrom Quadratic typ00 xl00 xu00 Filled Filled sh0 a
a) (Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.zeroFrom Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
b)
         (Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.zeroFrom Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
c) (Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.zeroFrom Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d)
   negate :: Matrix
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
negate (Square a b c d) =
      Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall measOff vertOff horizOff sh0 sh1 typ00 xl00 xu00 a typ01
       xl01 xu01 typ10 xl10 xu10 typ11 xl11 xu11.
(Measure measOff, C vertOff, C horizOff, C sh0, Eq sh0, C sh1,
 Eq sh1) =>
Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Square
         (Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Quadratic typ00 xl00 xu00 Filled Filled sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.negate Quadratic typ00 xl00 xu00 Filled Filled sh0 a
a) (Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.negate Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
b)
         (Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.negate Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
c) (Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.negate Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d)
   scaleReal :: RealOf a
-> Matrix
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
scaleReal RealOf a
k (Square a b c d) =
      Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall measOff vertOff horizOff sh0 sh1 typ00 xl00 xu00 a typ01
       xl01 xu01 typ10 xl10 xu10 typ11 xl11 xu11.
(Measure measOff, C vertOff, C horizOff, C sh0, Eq sh0, C sh1,
 Eq sh1) =>
Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Square
         (RealOf a
-> Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Quadratic typ00 xl00 xu00 Filled Filled sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
RealOf a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.scaleReal RealOf a
k Quadratic typ00 xl00 xu00 Filled Filled sh0 a
a) (RealOf a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
RealOf a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.scaleReal RealOf a
k Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
b)
         (RealOf a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
RealOf a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.scaleReal RealOf a
k Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
c) (RealOf a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
RealOf a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.scaleReal RealOf a
k Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d)

instance
   (Matrix.Scale typ00, Matrix.Scale typ11) =>
      Matrix.Scale (Square typ00 measOff vertOff horizOff typ11) where
   type ScaleExtra (Square typ00 measOff vertOff horizOff typ11) extra =
         (Matrix.Scale (SquareType extra),
          Matrix.ScaleExtra typ00 (Square00 extra),
          Matrix.ScaleExtra typ11 (Square11 extra),
          Matrix.ScaleExtra (SquareType extra) (Square01 extra),
          Matrix.ScaleExtra (SquareType extra) (Square10 extra))
   scale :: a
-> Matrix
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
scale a
k (Square a b c d) =
      Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall measOff vertOff horizOff sh0 sh1 typ00 xl00 xu00 a typ01
       xl01 xu01 typ10 xl10 xu10 typ11 xl11 xu11.
(Measure measOff, C vertOff, C horizOff, C sh0, Eq sh0, C sh1,
 Eq sh1) =>
Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Square
         (a
-> Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Quadratic typ00 xl00 xu00 Filled Filled sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Scale typ, ScaleExtra typ xl, ScaleExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.scale a
k Quadratic typ00 xl00 xu00 Filled Filled sh0 a
a) (a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Scale typ, ScaleExtra typ xl, ScaleExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.scale a
k Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
b)
         (a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Scale typ, ScaleExtra typ xl, ScaleExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.scale a
k Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
c) (a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Scale typ, ScaleExtra typ xl, ScaleExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.scale a
k Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d)

instance
   (Matrix.Additive typ00, Matrix.Additive typ11) =>
      Matrix.Additive (Square typ00 measOff vertOff horizOff typ11) where
   type AdditiveExtra (Square typ00 measOff vertOff horizOff typ11) extra =
         (Matrix.Additive (SquareType extra),
          Matrix.AdditiveExtra typ00 (Square00 extra),
          Matrix.AdditiveExtra typ11 (Square11 extra),
          Matrix.AdditiveExtra (SquareType extra) (Square01 extra),
          Matrix.AdditiveExtra (SquareType extra) (Square10 extra))
   add :: Matrix
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
add (Square a0 b0 c0 d0) (Square a1 b1 c1 d1) =
      Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall measOff vertOff horizOff sh0 sh1 typ00 xl00 xu00 a typ01
       xl01 xu01 typ10 xl10 xu10 typ11 xl11 xu11.
(Measure measOff, C vertOff, C horizOff, C sh0, Eq sh0, C sh1,
 Eq sh1) =>
Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Square
         (Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Quadratic typ00 xl00 xu00 Filled Filled sh0 a
forall typ meas vert horiz xl xu height width a lower upper.
(Additive typ, Measure meas, C vert, C horiz, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.add Quadratic typ00 xl00 xu00 Filled Filled sh0 a
a0 Quadratic typ00 xl00 xu00 Filled Filled sh0 a
Quadratic typ00 xl00 xu00 Filled Filled sh0 a
a1) (Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
forall typ meas vert horiz xl xu height width a lower upper.
(Additive typ, Measure meas, C vert, C horiz, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.add Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
b0 Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
b1)
         (Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
forall typ meas vert horiz xl xu height width a lower upper.
(Additive typ, Measure meas, C vert, C horiz, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.add Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
c0 Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
c1) (Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
forall typ meas vert horiz xl xu height width a lower upper.
(Additive typ, Measure meas, C vert, C horiz, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.add Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d0 Quadratic typ11 xl11 xu11 Filled Filled sh1 a
Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d1)

instance
   (Matrix.Subtractive typ00, Matrix.Subtractive typ11) =>
      Matrix.Subtractive (Square typ00 measOff vertOff horizOff typ11) where
   type SubtractiveExtra (Square typ00 measOff vertOff horizOff typ11) extra =
         (Matrix.Subtractive (SquareType extra),
          Matrix.SubtractiveExtra typ00 (Square00 extra),
          Matrix.SubtractiveExtra typ11 (Square11 extra),
          Matrix.SubtractiveExtra (SquareType extra) (Square01 extra),
          Matrix.SubtractiveExtra (SquareType extra) (Square10 extra))
   sub :: Matrix
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
sub (Square a0 b0 c0 d0) (Square a1 b1 c1 d1) =
      Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall measOff vertOff horizOff sh0 sh1 typ00 xl00 xu00 a typ01
       xl01 xu01 typ10 xl10 xu10 typ11 xl11 xu11.
(Measure measOff, C vertOff, C horizOff, C sh0, Eq sh0, C sh1,
 Eq sh1) =>
Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Square
         (Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Quadratic typ00 xl00 xu00 Filled Filled sh0 a
forall typ meas vert horiz xl xu height width a lower upper.
(Subtractive typ, Measure meas, C vert, C horiz,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.sub Quadratic typ00 xl00 xu00 Filled Filled sh0 a
a0 Quadratic typ00 xl00 xu00 Filled Filled sh0 a
Quadratic typ00 xl00 xu00 Filled Filled sh0 a
a1) (Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
forall typ meas vert horiz xl xu height width a lower upper.
(Subtractive typ, Measure meas, C vert, C horiz,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.sub Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
b0 Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
b1)
         (Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
forall typ meas vert horiz xl xu height width a lower upper.
(Subtractive typ, Measure meas, C vert, C horiz,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.sub Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
c0 Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
c1) (Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
forall typ meas vert horiz xl xu height width a lower upper.
(Subtractive typ, Measure meas, C vert, C horiz,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.sub Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d0 Quadratic typ11 xl11 xu11 Filled Filled sh1 a
Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d1)

instance
   (Multiply.MultiplyVector typ00, Multiply.MultiplyVector typ11) =>
      Multiply.MultiplyVector (Square typ00 measOff vertOff horizOff typ11)
         where
   type
      MultiplyVectorExtra (Square typ00 measOff vertOff horizOff typ11) extra =
         (Multiply.MultiplyVector (SquareType extra),
          Multiply.MultiplyVectorExtra typ00 (Square00 extra),
          Multiply.MultiplyVectorExtra (SquareType extra) (Square01 extra),
          Multiply.MultiplyVectorExtra (SquareType extra) (Square10 extra),
          Multiply.MultiplyVectorExtra typ11 (Square11 extra))
   matrixVector :: Matrix
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Vector width a -> Vector height a
matrixVector (Square a b c d) Vector width a
x =
      let (Array sh0 a
x0,Array sh1 a
x1) = Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
forall sh0 sh1 a.
(C sh0, C sh1, Storable a) =>
Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
Array.split Vector width a
Array (sh0 ::+ sh1) a
x
      in Array sh0 a -> Array sh1 a -> Array (sh0 ::+ sh1) a
forall shx shy a.
(C shx, C shy, Storable a) =>
Array shx a -> Array shy a -> Array (shx ::+ shy) a
Array.append
            (Matrix typ00 xl00 xu00 Filled Filled Shape Small Small sh0 sh0 a
-> Array sh0 a -> Array sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typ00 xl00 xu00 Filled Filled Shape Small Small sh0 sh0 a
a Array sh0 a
x0 Array sh0 a -> Array sh0 a -> Array sh0 a
forall sh a.
(C sh, Eq sh, Floating a) =>
Vector sh a -> Vector sh a -> Vector sh a
|+| Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Array sh1 a -> Array sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
b Array sh1 a
x1)
            (Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Array sh0 a -> Array sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
c Array sh0 a
x0 Array sh1 a -> Array sh1 a -> Array sh1 a
forall sh a.
(C sh, Eq sh, Floating a) =>
Vector sh a -> Vector sh a -> Vector sh a
|+| Matrix typ11 xl11 xu11 Filled Filled Shape Small Small sh1 sh1 a
-> Array sh1 a -> Array sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typ11 xl11 xu11 Filled Filled Shape Small Small sh1 sh1 a
d Array sh1 a
x1)
   vectorMatrix :: Vector height a
-> Matrix
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Vector width a
vectorMatrix Vector height a
x (Square a b c d) =
      let (Array sh0 a
x0,Array sh1 a
x1) = Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
forall sh0 sh1 a.
(C sh0, C sh1, Storable a) =>
Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
Array.split Vector height a
Array (sh0 ::+ sh1) a
x
      in Array sh0 a -> Array sh1 a -> Array (sh0 ::+ sh1) a
forall shx shy a.
(C shx, C shy, Storable a) =>
Array shx a -> Array shy a -> Array (shx ::+ shy) a
Array.append
            (Array sh0 a
-> Matrix typ00 xl00 xu00 Filled Filled Shape Small Small sh0 sh0 a
-> Array sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Array sh0 a
x0 Matrix typ00 xl00 xu00 Filled Filled Shape Small Small sh0 sh0 a
a Array sh0 a -> Array sh0 a -> Array sh0 a
forall sh a.
(C sh, Eq sh, Floating a) =>
Vector sh a -> Vector sh a -> Vector sh a
|+| Array sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Array sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Array sh1 a
x1 Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
c)
            (Array sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Array sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Array sh0 a
x0 Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
b Array sh1 a -> Array sh1 a -> Array sh1 a
forall sh a.
(C sh, Eq sh, Floating a) =>
Vector sh a -> Vector sh a -> Vector sh a
|+| Array sh1 a
-> Matrix typ11 xl11 xu11 Filled Filled Shape Small Small sh1 sh1 a
-> Array sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Array sh1 a
x1 Matrix typ11 xl11 xu11 Filled Filled Shape Small Small sh1 sh1 a
d)

instance
   (Multiply.MultiplySquare typ00, Multiply.MultiplySquare typ11) =>
      Multiply.MultiplySquare (Square typ00 measOff vertOff horizOff typ11)
         where
   type
      MultiplySquareExtra (Square typ00 measOff vertOff horizOff typ11) extra =
         (SquareType extra ~ TypeFull,
          Square01 extra ~ (), Square10 extra ~ (),
          Multiply.MultiplySquareExtra typ00 (Square00 extra),
          Multiply.MultiplySquareExtra typ11 (Square11 extra))
   squareFull :: Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  height
  a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
squareFull (Square a b c d) =
      (AboveGeneral sh0 sh1 (Unchecked width) a
 -> AboveGeneral sh0 sh1 (Unchecked width) a)
-> Full meas vert horiz (sh0 ::+ sh1) width a
-> Full meas vert horiz (sh0 ::+ sh1) width a
forall meas vert horiz height0 height1 width a.
(Measure meas, C vert, C horiz, C height0, C height1, C width,
 Floating a) =>
(AboveGeneral height0 height1 (Unchecked width) a
 -> AboveGeneral height0 height1 (Unchecked width) a)
-> Full meas vert horiz (height0 ::+ height1) width a
-> Full meas vert horiz (height0 ::+ height1) width a
withVerticalSplit ((AboveGeneral sh0 sh1 (Unchecked width) a
  -> AboveGeneral sh0 sh1 (Unchecked width) a)
 -> Full meas vert horiz (sh0 ::+ sh1) width a
 -> Full meas vert horiz (sh0 ::+ sh1) width a)
-> (AboveGeneral sh0 sh1 (Unchecked width) a
    -> AboveGeneral sh0 sh1 (Unchecked width) a)
-> Full meas vert horiz (sh0 ::+ sh1) width a
-> Full meas vert horiz (sh0 ::+ sh1) width a
forall a b. (a -> b) -> a -> b
$ \(Above x0 x1) ->
         Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> AboveGeneral sh0 sh1 (Unchecked width) a
forall sh0 sh1 width typ0 xl0 xu0 horiz a typ1 xl1 xu1.
(C sh0, C sh1, Eq width) =>
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
Above
            (Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, Eq height, C width, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Multiply.squareFull Quadratic typ00 xl00 xu00 Filled Filled sh0 a
a Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
x0 Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Full measOff vertOff horizOff sh0 sh1 a -> General sh0 sh1 a
forall meas vert horiz height width a.
(Measure meas, C vert, C horiz) =>
Full meas vert horiz height width a -> General height width a
Matrix.fromFull Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
Full measOff vertOff horizOff sh0 sh1 a
b General sh0 sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     xl1
     xu1
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*# Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
x1)
            (Full measOff horizOff vertOff sh1 sh0 a -> General sh1 sh0 a
forall meas vert horiz height width a.
(Measure meas, C vert, C horiz) =>
Full meas vert horiz height width a -> General height width a
Matrix.fromFull Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
Full measOff horizOff vertOff sh1 sh0 a
c General sh1 sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*# Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
x0 Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, Eq height, C width, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Multiply.squareFull Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
x1)
   fullSquare :: Full meas vert horiz height width a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     width
     a
-> Full meas vert horiz height width a
fullSquare Full meas vert horiz height width a
x (Square a b c d) =
      Full meas vert horiz height (sh0 ::+ sh1) a
-> (BesideGeneral (Unchecked height) sh0 sh1 a
    -> BesideGeneral (Unchecked height) sh0 sh1 a)
-> Full meas vert horiz height (sh0 ::+ sh1) a
forall meas vert horiz height width0 width1 a.
(Measure meas, C vert, C horiz, C height, C width0, C width1,
 Floating a) =>
Full meas vert horiz height (width0 ::+ width1) a
-> (BesideGeneral (Unchecked height) width0 width1 a
    -> BesideGeneral (Unchecked height) width0 width1 a)
-> Full meas vert horiz height (width0 ::+ width1) a
withHorizontalSplit Full meas vert horiz height width a
Full meas vert horiz height (sh0 ::+ sh1) a
x ((BesideGeneral (Unchecked height) sh0 sh1 a
  -> BesideGeneral (Unchecked height) sh0 sh1 a)
 -> Full meas vert horiz height (sh0 ::+ sh1) a)
-> (BesideGeneral (Unchecked height) sh0 sh1 a
    -> BesideGeneral (Unchecked height) sh0 sh1 a)
-> Full meas vert horiz height (sh0 ::+ sh1) a
forall a b. (a -> b) -> a -> b
$ \(Beside x0 x1) ->
         Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
-> BesideGeneral (Unchecked height) sh0 sh1 a
forall sh0 sh1 height typ0 xl0 xu0 vert a typ1 xl1 xu1.
(C sh0, C sh1, Eq height) =>
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
Beside
            (Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Multiply.fullSquare Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
x0 Quadratic typ00 xl00 xu00 Filled Filled sh0 a
a Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
x1 Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     sh0
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*# Full measOff horizOff vertOff sh1 sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     sh0
     a
forall meas vert horiz height width a.
(Measure meas, C vert, C horiz) =>
Full meas vert horiz height width a -> General height width a
Matrix.fromFull Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
Full measOff horizOff vertOff sh1 sh0 a
c)
            (Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
x0 Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*# Full measOff vertOff horizOff sh0 sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
forall meas vert horiz height width a.
(Measure meas, C vert, C horiz) =>
Full meas vert horiz height width a -> General height width a
Matrix.fromFull Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
Full measOff vertOff horizOff sh0 sh1 a
b Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Multiply.fullSquare Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
x1 Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d)

infixl 7 ##*##

(##*##) ::
   (Shape.C height, Shape.C width, Eq height, Eq width, Class.Floating a,
    Extent.Measure meas0, Extent.C vert0, Extent.C horiz0,
    Extent.Measure meas1, Extent.C vert1, Extent.C horiz1) =>
   ArrMatrix.Full meas0 vert0 horiz0 height width a ->
   ArrMatrix.Full meas1 vert1 horiz1 width height a ->
   ArrMatrix.Square height a
Full meas0 vert0 horiz0 height width a
a ##*## :: Full meas0 vert0 horiz0 height width a
-> Full meas1 vert1 horiz1 width height a -> Square height a
##*## Full meas1 vert1 horiz1 width height a
b = Full Size Big Big height height a -> Square height a
forall meas vert horiz sh a.
(Measure meas, C vert, C horiz, Eq sh) =>
Full meas vert horiz sh sh a -> Square sh a
Square.fromFull (Full meas0 vert0 horiz0 height width a -> General height width a
forall meas vert horiz height width a.
(Measure meas, C vert, C horiz) =>
Full meas vert horiz height width a -> General height width a
Matrix.fromFull Full meas0 vert0 horiz0 height width a
a General height width a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     width
     height
     a
-> Full Size Big Big height height a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*# Full meas1 vert1 horiz1 width height a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     width
     height
     a
forall meas vert horiz height width a.
(Measure meas, C vert, C horiz) =>
Full meas vert horiz height width a -> General height width a
Matrix.fromFull Full meas1 vert1 horiz1 width height a
b)

instance
   (typ00 ~ TypeFull, typ11 ~ TypeFull) =>
      Matrix.MultiplySame (Square typ00 measOff vertOff horizOff typ11) where
   type MultiplySameExtra (Square typ00 measOff vertOff horizOff typ11) extra =
         (SquareType extra ~ TypeFull,
          Square00 extra ~ (), Square11 extra ~ (),
          Square01 extra ~ (), Square10 extra ~ ())
   multiplySame :: matrix -> matrix -> matrix
multiplySame (Square a0 b0 c0 d0) (Square a1 b1 c1 d1) =
      Quadratic (Array Unpacked Arbitrary) () () Filled Filled sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     measOff
     vertOff
     horizOff
     sh0
     sh1
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     measOff
     horizOff
     vertOff
     sh1
     sh0
     a
-> Quadratic (Array Unpacked Arbitrary) () () Filled Filled sh1 a
-> Quadratic
     (Square
        (Array Unpacked Arbitrary)
        measOff
        vertOff
        horizOff
        (Array Unpacked Arbitrary))
     ((), (), (Array Unpacked Arbitrary, (), ()))
     ((), (), (Array Unpacked Arbitrary, (), ()))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall measOff vertOff horizOff sh0 sh1 typ00 xl00 xu00 a typ01
       xl01 xu01 typ10 xl10 xu10 typ11 xl11 xu11.
(Measure measOff, C vertOff, C horizOff, C sh0, Eq sh0, C sh1,
 Eq sh1) =>
Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Square
         (Quadratic (Array Unpacked Arbitrary) xl00 xu00 Filled Filled sh0 a
a0Quadratic (Array Unpacked Arbitrary) xl00 xu00 Filled Filled sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     xl00
     xu00
     Filled
     Filled
     Shape
     Small
     Small
     sh0
     sh0
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Shape
     Small
     Small
     sh0
     sh0
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*#Matrix
  (Array Unpacked Arbitrary)
  xl00
  xu00
  Filled
  Filled
  Shape
  Small
  Small
  sh0
  sh0
  a
Quadratic (Array Unpacked Arbitrary) xl00 xu00 Filled Filled sh0 a
a1 Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Shape
  Small
  Small
  sh0
  sh0
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Shape
     Small
     Small
     sh0
     sh0
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Shape
     Small
     Small
     sh0
     sh0
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  measOff
  vertOff
  horizOff
  sh0
  sh1
  a
b0Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  measOff
  vertOff
  horizOff
  sh0
  sh1
  a
-> Full measOff horizOff vertOff sh1 sh0 a
-> Quadratic (Array Unpacked Arbitrary) () () Filled Filled sh0 a
forall height width a meas0 vert0 horiz0 meas1 vert1 horiz1.
(C height, C width, Eq height, Eq width, Floating a, Measure meas0,
 C vert0, C horiz0, Measure meas1, C vert1, C horiz1) =>
Full meas0 vert0 horiz0 height width a
-> Full meas1 vert1 horiz1 width height a -> Square height a
##*##Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
Full measOff horizOff vertOff sh1 sh0 a
c1) (Quadratic (Array Unpacked Arbitrary) xl00 xu00 Filled Filled sh0 a
a0Quadratic (Array Unpacked Arbitrary) xl00 xu00 Filled Filled sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     measOff
     vertOff
     horizOff
     sh0
     sh1
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     measOff
     vertOff
     horizOff
     sh0
     sh1
     a
forall typ xl xu lowerA upperA lowerB upperB lowerC upperC measA
       measB measC vert horiz height fuse width a.
(MultiplySquare typ, ToQuadratic typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, BoxExtra typ xl, BoxExtra typ xu,
 Strip lowerA, Strip upperA, Strip lowerB, Strip upperB,
 Strip lowerC, Strip upperC, MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA,
 Measure measB, Measure measC, MultiplyMeasure measA measB ~ measC,
 C vert, C horiz, C height, C fuse, Eq fuse, C width, Floating a) =>
QuadraticMeas typ xl xu lowerA upperA measA height fuse a
-> Unpacked lowerB upperB measB vert horiz fuse width a
-> Unpacked lowerC upperC measC vert horiz height width a
#*##Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  measOff
  vertOff
  horizOff
  sh0
  sh1
  a
b1 Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  measOff
  vertOff
  horizOff
  sh0
  sh1
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     measOff
     vertOff
     horizOff
     sh0
     sh1
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     measOff
     vertOff
     horizOff
     sh0
     sh1
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  measOff
  vertOff
  horizOff
  sh0
  sh1
  a
b0Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  measOff
  vertOff
  horizOff
  sh0
  sh1
  a
-> QuadraticMeas
     (Array Unpacked Arbitrary) xl11 xu11 Filled Filled Shape sh1 sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     measOff
     vertOff
     horizOff
     sh0
     sh1
     a
forall typ xl xu lowerA upperA lowerB upperB lowerC upperC measA
       measB measC vert horiz height fuse width a.
(MultiplySquare typ, ToQuadratic typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, BoxExtra typ xl, BoxExtra typ xu,
 Strip lowerA, Strip upperA, Strip lowerB, Strip upperB,
 Strip lowerC, Strip upperC, MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA,
 Measure measB, Measure measC, MultiplyMeasure measA measB ~ measC,
 C vert, C horiz, C height, C fuse, Eq fuse, C width, Floating a) =>
Unpacked lowerB upperB measB vert horiz height fuse a
-> QuadraticMeas typ xl xu lowerA upperA measA fuse width a
-> Unpacked lowerC upperC measC vert horiz height width a
##*#QuadraticMeas
  (Array Unpacked Arbitrary) xl11 xu11 Filled Filled Shape sh1 sh1 a
Quadratic (Array Unpacked Arbitrary) xl11 xu11 Filled Filled sh1 a
d1)
         (Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
Full measOff horizOff vertOff sh1 sh0 a
c0Full measOff horizOff vertOff sh1 sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     xl00
     xu00
     Filled
     Filled
     Shape
     Small
     Small
     sh0
     sh0
     a
-> Unpacked Filled Filled measOff horizOff vertOff sh1 sh0 a
forall typ xl xu lowerA upperA lowerB upperB lowerC upperC measA
       measB measC vert horiz height fuse width a.
(MultiplySquare typ, ToQuadratic typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, BoxExtra typ xl, BoxExtra typ xu,
 Strip lowerA, Strip upperA, Strip lowerB, Strip upperB,
 Strip lowerC, Strip upperC, MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA,
 Measure measB, Measure measC, MultiplyMeasure measA measB ~ measC,
 C vert, C horiz, C height, C fuse, Eq fuse, C width, Floating a) =>
Unpacked lowerB upperB measB vert horiz height fuse a
-> QuadraticMeas typ xl xu lowerA upperA measA fuse width a
-> Unpacked lowerC upperC measC vert horiz height width a
##*#Matrix
  (Array Unpacked Arbitrary)
  xl00
  xu00
  Filled
  Filled
  Shape
  Small
  Small
  sh0
  sh0
  a
Quadratic (Array Unpacked Arbitrary) xl00 xu00 Filled Filled sh0 a
a1 Unpacked Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Unpacked Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Unpacked Filled Filled measOff horizOff vertOff sh1 sh0 a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Quadratic (Array Unpacked Arbitrary) xl11 xu11 Filled Filled sh1 a
d0Quadratic (Array Unpacked Arbitrary) xl11 xu11 Filled Filled sh1 a
-> Unpacked Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Unpacked Filled Filled measOff horizOff vertOff sh1 sh0 a
forall typ xl xu lowerA upperA lowerB upperB lowerC upperC measA
       measB measC vert horiz height fuse width a.
(MultiplySquare typ, ToQuadratic typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, BoxExtra typ xl, BoxExtra typ xu,
 Strip lowerA, Strip upperA, Strip lowerB, Strip upperB,
 Strip lowerC, Strip upperC, MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA,
 Measure measB, Measure measC, MultiplyMeasure measA measB ~ measC,
 C vert, C horiz, C height, C fuse, Eq fuse, C width, Floating a) =>
QuadraticMeas typ xl xu lowerA upperA measA height fuse a
-> Unpacked lowerB upperB measB vert horiz fuse width a
-> Unpacked lowerC upperC measC vert horiz height width a
#*##Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
Unpacked Filled Filled measOff horizOff vertOff sh1 sh0 a
c1) (Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
Full measOff horizOff vertOff sh1 sh0 a
c0Full measOff horizOff vertOff sh1 sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     measOff
     vertOff
     horizOff
     sh0
     sh1
     a
-> Square sh1 a
forall height width a meas0 vert0 horiz0 meas1 vert1 horiz1.
(C height, C width, Eq height, Eq width, Floating a, Measure meas0,
 C vert0, C horiz0, Measure meas1, C vert1, C horiz1) =>
Full meas0 vert0 horiz0 height width a
-> Full meas1 vert1 horiz1 width height a -> Square height a
##*##Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  measOff
  vertOff
  horizOff
  sh0
  sh1
  a
b1 Square sh1 a -> Square sh1 a -> Square sh1 a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Quadratic (Array Unpacked Arbitrary) xl11 xu11 Filled Filled sh1 a
d0Quadratic (Array Unpacked Arbitrary) xl11 xu11 Filled Filled sh1 a
-> QuadraticMeas
     (Array Unpacked Arbitrary) xl11 xu11 Filled Filled Shape sh1 sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Shape
     Small
     Small
     sh1
     sh1
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*#QuadraticMeas
  (Array Unpacked Arbitrary) xl11 xu11 Filled Filled Shape sh1 sh1 a
Quadratic (Array Unpacked Arbitrary) xl11 xu11 Filled Filled sh1 a
d1)

instance
   (typ00 ~ TypeFull, typ11 ~ TypeFull) =>
      Multiply.Power (Square typ00 measOff vertOff horizOff typ11) where
   type PowerExtra (Square typ00 measOff vertOff horizOff typ11) extra =
         (SquareType extra ~ TypeFull,
          Square00 extra ~ (), Square11 extra ~ (),
          Square01 extra ~ (), Square10 extra ~ ())
   square :: Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  sh
  a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     sh
     a
square a :: Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  sh
  a
a@(Square _ _ _ _) = Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  sh
  a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     sh
     a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     sh
     a
forall typ matrix xl xu lower upper meas vert horiz sh a.
(MultiplySame typ,
 matrix ~ Matrix typ xl xu lower upper meas vert horiz sh sh a,
 MultiplySameExtra typ xl, MultiplySameExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C vert, C horiz,
 C sh, Eq sh, Floating a) =>
matrix -> matrix -> matrix
Matrix.multiplySame Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  sh
  a
a Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  sh
  a
a
   power :: Integer
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     sh
     a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     sh
     a
power Integer
n m :: Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  sh
  a
m@(Square a b c d) =
      (Quadratic
   (Square typ00 measOff vertOff horizOff typ11)
   (xl00, xl11, (typ10, xl10, xu10))
   (xu00, xu11, (typ01, xu01, xl01))
   Filled
   Filled
   (sh0 ::+ sh1)
   a
 -> Quadratic
      (Square typ00 measOff vertOff horizOff typ11)
      (xl00, xl11, (typ10, xl10, xu10))
      (xu00, xu11, (typ01, xu01, xl01))
      Filled
      Filled
      (sh0 ::+ sh1)
      a
 -> Quadratic
      (Square typ00 measOff vertOff horizOff typ11)
      (xl00, xl11, (typ10, xl10, xu10))
      (xu00, xu11, (typ01, xu01, xl01))
      Filled
      Filled
      (sh0 ::+ sh1)
      a)
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
-> Integer
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall a. (a -> a -> a) -> a -> a -> Integer -> a
powerAssociative Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  (xl00, xl11, (typ10, xl10, xu10))
  (xu00, xu11, (typ01, xu01, xl01))
  Filled
  Filled
  (sh0 ::+ sh1)
  a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall typ matrix xl xu lower upper meas vert horiz sh a.
(MultiplySame typ,
 matrix ~ Matrix typ xl xu lower upper meas vert horiz sh sh a,
 MultiplySameExtra typ xl, MultiplySameExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C vert, C horiz,
 C sh, Eq sh, Floating a) =>
matrix -> matrix -> matrix
Matrix.multiplySame
         (Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall measOff vertOff horizOff sh0 sh1 typ00 xl00 xu00 a typ01
       xl01 xu01 typ10 xl10 xu10 typ11 xl11 xu11.
(Measure measOff, C vertOff, C horizOff, C sh0, Eq sh0, C sh1,
 Eq sh1) =>
Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Square
            (Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Quadratic typ00 xl00 xu00 Filled Filled sh0 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
Matrix.identityFrom Quadratic typ00 xl00 xu00 Filled Filled sh0 a
a) (Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.zeroFrom Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
b)
            (Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.zeroFrom Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
c) (Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
Matrix.identityFrom Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d))
         Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  sh
  a
Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  (xl00, xl11, (typ10, xl10, xu10))
  (xu00, xu11, (typ01, xu01, xl01))
  Filled
  Filled
  (sh0 ::+ sh1)
  a
m Integer
n
   powers1 :: Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  sh
  a
-> Stream
     (Quadratic
        (Square typ00 measOff vertOff horizOff typ11)
        xl
        xu
        lower
        upper
        sh
        a)
powers1 a :: Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  sh
  a
a@(Square _ _ _ _) = (Quadratic
   (Square typ00 measOff vertOff horizOff typ11)
   xl
   xu
   lower
   upper
   sh
   a
 -> Quadratic
      (Square typ00 measOff vertOff horizOff typ11)
      xl
      xu
      lower
      upper
      sh
      a)
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     sh
     a
-> Stream
     (Quadratic
        (Square typ00 measOff vertOff horizOff typ11)
        xl
        xu
        lower
        upper
        sh
        a)
forall a. (a -> a) -> a -> Stream a
Stream.iterate ((Quadratic
   (Square typ00 measOff vertOff horizOff typ11)
   xl
   xu
   lower
   upper
   sh
   a
 -> Quadratic
      (Square typ00 measOff vertOff horizOff typ11)
      xl
      xu
      lower
      upper
      sh
      a
 -> Quadratic
      (Square typ00 measOff vertOff horizOff typ11)
      xl
      xu
      lower
      upper
      sh
      a)
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     sh
     a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     sh
     a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     sh
     a
forall a b c. (a -> b -> c) -> b -> a -> c
flip Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  sh
  a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     sh
     a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     sh
     a
forall typ matrix xl xu lower upper meas vert horiz sh a.
(MultiplySame typ,
 matrix ~ Matrix typ xl xu lower upper meas vert horiz sh sh a,
 MultiplySameExtra typ xl, MultiplySameExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C vert, C horiz,
 C sh, Eq sh, Floating a) =>
matrix -> matrix -> matrix
Matrix.multiplySame Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  sh
  a
a) Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  sh
  a
a


schurComplement ::
   (Divide.Solve typ11,
    Divide.SolveExtra typ11 xl11, Divide.SolveExtra typ11 xu11,
    Class.Floating a) =>
   Quadratic
      (Square TypeFull measOff vertOff horizOff typ11)
      ((),xl11,(TypeFull,(),())) ((),xu11,(TypeFull,(),()))
      Filled Filled (sh0::+sh1) a ->
   Square.Square sh0 a
schurComplement :: Quadratic
  (Square (Array Unpacked Arbitrary) measOff vertOff horizOff typ11)
  ((), xl11, (Array Unpacked Arbitrary, (), ()))
  ((), xu11, (Array Unpacked Arbitrary, (), ()))
  Filled
  Filled
  (sh0 ::+ sh1)
  a
-> Square sh0 a
schurComplement (Square a b c d) = Quadratic (Array Unpacked Arbitrary) xl00 xu00 Filled Filled sh0 a
a Quadratic (Array Unpacked Arbitrary) xl00 xu00 Filled Filled sh0 a
-> Quadratic
     (Array Unpacked Arbitrary) xl00 xu00 Filled Filled sh0 a
-> Quadratic
     (Array Unpacked Arbitrary) xl00 xu00 Filled Filled sh0 a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Subtractive typ,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#-# Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  measOff
  vertOff
  horizOff
  sh0
  sh1
  a
b Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  measOff
  vertOff
  horizOff
  sh0
  sh1
  a
-> Full measOff horizOff vertOff sh1 sh0 a -> Square sh0 a
forall height width a meas0 vert0 horiz0 meas1 vert1 horiz1.
(C height, C width, Eq height, Eq width, Floating a, Measure meas0,
 C vert0, C horiz0, Measure meas1, C vert1, C horiz1) =>
Full meas0 vert0 horiz0 height width a
-> Full meas1 vert1 horiz1 width height a -> Square height a
##*## Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Full measOff horizOff vertOff sh1 sh0 a
-> Full measOff horizOff vertOff sh1 sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq height, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solveRight Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
Full measOff horizOff vertOff sh1 sh0 a
c

{- |
Requires that the bottom right sub-matrix is regular.

The order is chosen such that no nested Schur complements are necessary.
However, in some common examples like the resistor network
and Lagrange multiplicators we have a zero bottom right sub-matrix
and the top left matrix is regular.
-}
instance
   (typ00 ~ TypeFull, Divide.Solve typ11, Divide.Determinant typ11) =>
      Divide.Determinant (Square typ00 measOff vertOff horizOff typ11) where
   type DeterminantExtra (Square typ00 measOff vertOff horizOff typ11) extra =
         (SquareType extra ~ TypeFull,
          Square01 extra ~ (), Square10 extra ~ (),
          Matrix.DeterminantExtra typ00 (Square00 extra),
          Matrix.DeterminantExtra typ11 (Square11 extra),
          Divide.SolveExtra typ11 (Square11 extra))
   determinant :: Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  sh
  a
-> a
determinant sq :: Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  sh
  a
sq@(Square _a _b _c d) =
      Quadratic typ11 xl11 xu11 Filled Filled sh1 a -> a
forall typ xl xu lower upper sh a.
(Determinant typ, DeterminantExtra typ xl, DeterminantExtra typ xu,
 Strip lower, Strip upper, C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> a
determinant Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d a -> a -> a
forall a. Num a => a -> a -> a
* Quadratic (Array Unpacked Arbitrary) () () Filled Filled sh0 a -> a
forall typ xl xu lower upper sh a.
(Determinant typ, DeterminantExtra typ xl, DeterminantExtra typ xu,
 Strip lower, Strip upper, C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> a
determinant (Quadratic
  (Square (Array Unpacked Arbitrary) measOff vertOff horizOff typ11)
  ((), Square11 xl, (Array Unpacked Arbitrary, (), ()))
  ((), Square11 xu, (Array Unpacked Arbitrary, (), ()))
  Filled
  Filled
  (sh0 ::+ sh1)
  a
-> Quadratic (Array Unpacked Arbitrary) () () Filled Filled sh0 a
forall typ11 xl11 xu11 a measOff vertOff horizOff sh0 sh1.
(Solve typ11, SolveExtra typ11 xl11, SolveExtra typ11 xu11,
 Floating a) =>
Quadratic
  (Square (Array Unpacked Arbitrary) measOff vertOff horizOff typ11)
  ((), xl11, (Array Unpacked Arbitrary, (), ()))
  ((), xu11, (Array Unpacked Arbitrary, (), ()))
  Filled
  Filled
  (sh0 ::+ sh1)
  a
-> Square sh0 a
schurComplement Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  sh
  a
Quadratic
  (Square (Array Unpacked Arbitrary) measOff vertOff horizOff typ11)
  ((), Square11 xl, (Array Unpacked Arbitrary, (), ()))
  ((), Square11 xu, (Array Unpacked Arbitrary, (), ()))
  Filled
  Filled
  (sh0 ::+ sh1)
  a
sq)

{- |
Requires that the bottom right sub-matrix is regular.
-}
instance
   (typ00 ~ TypeFull, Divide.Solve typ11) =>
      Divide.Solve (Square typ00 measOff vertOff horizOff typ11) where
   type SolveExtra (Square typ00 measOff vertOff horizOff typ11) extra =
         (SquareType extra ~ TypeFull,
          Square01 extra ~ (), Square10 extra ~ (),
          Divide.SolveExtra typ00 (Square00 extra),
          Divide.SolveExtra typ11 (Square11 extra))
   solveRight :: Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  height
  a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
solveRight sq :: Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  height
  a
sq@(Square _a b c d) =
      (AboveGeneral sh0 sh1 (Unchecked width) a
 -> AboveGeneral sh0 sh1 (Unchecked width) a)
-> Full meas vert horiz (sh0 ::+ sh1) width a
-> Full meas vert horiz (sh0 ::+ sh1) width a
forall meas vert horiz height0 height1 width a.
(Measure meas, C vert, C horiz, C height0, C height1, C width,
 Floating a) =>
(AboveGeneral height0 height1 (Unchecked width) a
 -> AboveGeneral height0 height1 (Unchecked width) a)
-> Full meas vert horiz (height0 ::+ height1) width a
-> Full meas vert horiz (height0 ::+ height1) width a
withVerticalSplit ((AboveGeneral sh0 sh1 (Unchecked width) a
  -> AboveGeneral sh0 sh1 (Unchecked width) a)
 -> Full meas vert horiz (sh0 ::+ sh1) width a
 -> Full meas vert horiz (sh0 ::+ sh1) width a)
-> (AboveGeneral sh0 sh1 (Unchecked width) a
    -> AboveGeneral sh0 sh1 (Unchecked width) a)
-> Full meas vert horiz (sh0 ::+ sh1) width a
-> Full meas vert horiz (sh0 ::+ sh1) width a
forall a b. (a -> b) -> a -> b
$ \(Above x0 x1) ->
      let xComplement :: Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
xComplement = Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
x0 Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Subtractive typ,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#-# Full measOff vertOff horizOff sh0 sh1 a -> General sh0 sh1 a
forall meas vert horiz height width a.
(Measure meas, C vert, C horiz) =>
Full meas vert horiz height width a -> General height width a
Matrix.fromFull Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
Full measOff vertOff horizOff sh0 sh1 a
b General sh0 sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*# Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq height, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solveRight Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
x1
          y :: Full Size Big Big sh0 (Unchecked width) a
y = Quadratic (Array Unpacked Arbitrary) () () Filled Filled sh0 a
-> Full Size Big Big sh0 (Unchecked width) a
-> Full Size Big Big sh0 (Unchecked width) a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq height, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solveRight (Quadratic
  (Square (Array Unpacked Arbitrary) measOff vertOff horizOff typ11)
  ((), Square11 xl, (Array Unpacked Arbitrary, (), ()))
  ((), Square11 xu, (Array Unpacked Arbitrary, (), ()))
  Filled
  Filled
  (sh0 ::+ sh1)
  a
-> Quadratic (Array Unpacked Arbitrary) () () Filled Filled sh0 a
forall typ11 xl11 xu11 a measOff vertOff horizOff sh0 sh1.
(Solve typ11, SolveExtra typ11 xl11, SolveExtra typ11 xu11,
 Floating a) =>
Quadratic
  (Square (Array Unpacked Arbitrary) measOff vertOff horizOff typ11)
  ((), xl11, (Array Unpacked Arbitrary, (), ()))
  ((), xu11, (Array Unpacked Arbitrary, (), ()))
  Filled
  Filled
  (sh0 ::+ sh1)
  a
-> Square sh0 a
schurComplement Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  height
  a
Quadratic
  (Square (Array Unpacked Arbitrary) measOff vertOff horizOff typ11)
  ((), Square11 xl, (Array Unpacked Arbitrary, (), ()))
  ((), Square11 xu, (Array Unpacked Arbitrary, (), ()))
  Filled
  Filled
  (sh0 ::+ sh1)
  a
sq) Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
Full Size Big Big sh0 (Unchecked width) a
xComplement
      in Full Size Big Big sh0 (Unchecked width) a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> AboveGeneral sh0 sh1 (Unchecked width) a
forall sh0 sh1 width typ0 xl0 xu0 horiz a typ1 xl1 xu1.
(C sh0, C sh1, Eq width) =>
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
Above Full Size Big Big sh0 (Unchecked width) a
y (Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq height, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solveRight Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d (Matrix
   (Array Unpacked Arbitrary)
   ()
   ()
   Filled
   Filled
   Size
   Big
   Big
   sh1
   (Unchecked width)
   a
 -> Matrix
      (Array Unpacked Arbitrary)
      ()
      ()
      Filled
      Filled
      Size
      Big
      Big
      sh1
      (Unchecked width)
      a)
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall a b. (a -> b) -> a -> b
$ Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
x1 Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     xl1
     xu1
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     xl1
     xu1
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Subtractive typ,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#-# Full measOff horizOff vertOff sh1 sh0 a -> General sh1 sh0 a
forall meas vert horiz height width a.
(Measure meas, C vert, C horiz) =>
Full meas vert horiz height width a -> General height width a
Matrix.fromFull Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
Full measOff horizOff vertOff sh1 sh0 a
c General sh1 sh0 a
-> Full Size Big Big sh0 (Unchecked width) a
-> Matrix
     (Array Unpacked Arbitrary)
     xl1
     xu1
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*# Full Size Big Big sh0 (Unchecked width) a
y)
   solveLeft :: Full meas vert horiz height width a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     width
     a
-> Full meas vert horiz height width a
solveLeft Full meas vert horiz height width a
x sq :: Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  width
  a
sq@(Square _a b c d) =
      Full meas vert horiz height (sh0 ::+ sh1) a
-> (BesideGeneral (Unchecked height) sh0 sh1 a
    -> BesideGeneral (Unchecked height) sh0 sh1 a)
-> Full meas vert horiz height (sh0 ::+ sh1) a
forall meas vert horiz height width0 width1 a.
(Measure meas, C vert, C horiz, C height, C width0, C width1,
 Floating a) =>
Full meas vert horiz height (width0 ::+ width1) a
-> (BesideGeneral (Unchecked height) width0 width1 a
    -> BesideGeneral (Unchecked height) width0 width1 a)
-> Full meas vert horiz height (width0 ::+ width1) a
withHorizontalSplit Full meas vert horiz height width a
Full meas vert horiz height (sh0 ::+ sh1) a
x ((BesideGeneral (Unchecked height) sh0 sh1 a
  -> BesideGeneral (Unchecked height) sh0 sh1 a)
 -> Full meas vert horiz height (sh0 ::+ sh1) a)
-> (BesideGeneral (Unchecked height) sh0 sh1 a
    -> BesideGeneral (Unchecked height) sh0 sh1 a)
-> Full meas vert horiz height (sh0 ::+ sh1) a
forall a b. (a -> b) -> a -> b
$ \(Beside x0 x1) ->
      let xComplement :: Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
xComplement = Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
x0 Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Subtractive typ,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#-# Full Size Big Big (Unchecked height) sh1 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Full Size Big Big (Unchecked height) sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Divide.solveLeft Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
Full Size Big Big (Unchecked height) sh1 a
x1 Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d Full Size Big Big (Unchecked height) sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     sh0
     a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*# Full measOff horizOff vertOff sh1 sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     sh0
     a
forall meas vert horiz height width a.
(Measure meas, C vert, C horiz) =>
Full meas vert horiz height width a -> General height width a
Matrix.fromFull Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
Full measOff horizOff vertOff sh1 sh0 a
c
          y :: Full Size Big Big (Unchecked height) sh0 a
y = Full Size Big Big (Unchecked height) sh0 a
-> Quadratic (Array Unpacked Arbitrary) () () Filled Filled sh0 a
-> Full Size Big Big (Unchecked height) sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Divide.solveLeft Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
Full Size Big Big (Unchecked height) sh0 a
xComplement (Quadratic
  (Square (Array Unpacked Arbitrary) measOff vertOff horizOff typ11)
  ((), Square11 xl, (Array Unpacked Arbitrary, (), ()))
  ((), Square11 xu, (Array Unpacked Arbitrary, (), ()))
  Filled
  Filled
  (sh0 ::+ sh1)
  a
-> Quadratic (Array Unpacked Arbitrary) () () Filled Filled sh0 a
forall typ11 xl11 xu11 a measOff vertOff horizOff sh0 sh1.
(Solve typ11, SolveExtra typ11 xl11, SolveExtra typ11 xu11,
 Floating a) =>
Quadratic
  (Square (Array Unpacked Arbitrary) measOff vertOff horizOff typ11)
  ((), xl11, (Array Unpacked Arbitrary, (), ()))
  ((), xu11, (Array Unpacked Arbitrary, (), ()))
  Filled
  Filled
  (sh0 ::+ sh1)
  a
-> Square sh0 a
schurComplement Quadratic
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  width
  a
Quadratic
  (Square (Array Unpacked Arbitrary) measOff vertOff horizOff typ11)
  ((), Square11 xl, (Array Unpacked Arbitrary, (), ()))
  ((), Square11 xu, (Array Unpacked Arbitrary, (), ()))
  Filled
  Filled
  (sh0 ::+ sh1)
  a
sq)
      in Full Size Big Big (Unchecked height) sh0 a
-> Full Size Big Big (Unchecked height) sh1 a
-> BesideGeneral (Unchecked height) sh0 sh1 a
forall sh0 sh1 height typ0 xl0 xu0 vert a typ1 xl1 xu1.
(C sh0, C sh1, Eq height) =>
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
Beside Full Size Big Big (Unchecked height) sh0 a
y (Full Size Big Big (Unchecked height) sh1 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Full Size Big Big (Unchecked height) sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Divide.solveLeft (Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
x1 Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
-> Matrix
     (Array Unpacked Arbitrary)
     xl1
     xu1
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
-> Matrix
     (Array Unpacked Arbitrary)
     xl1
     xu1
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Subtractive typ,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#-# Full Size Big Big (Unchecked height) sh0 a
y Full Size Big Big (Unchecked height) sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
-> Matrix
     (Array Unpacked Arbitrary)
     xl1
     xu1
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*# Full measOff vertOff horizOff sh0 sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
forall meas vert horiz height width a.
(Measure meas, C vert, C horiz) =>
Full meas vert horiz height width a -> General height width a
Matrix.fromFull Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
Full measOff vertOff horizOff sh0 sh1 a
b) Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d)

instance
   (typ00 ~ TypeFull, typ11 ~ TypeFull) =>
      Divide.Inverse (Square typ00 measOff vertOff horizOff typ11) where
   type InverseExtra (Square typ00 measOff vertOff horizOff typ11) extra =
         (SquareType extra ~ TypeFull,
          Square01 extra ~ (), Square10 extra ~ (),
          Divide.SolveExtra typ00 (Square00 extra),
          Divide.SolveExtra typ11 (Square11 extra))
   inverse :: QuadraticMeas
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  meas
  height
  width
  a
-> QuadraticMeas
     (Square typ00 measOff vertOff horizOff typ11)
     xl
     xu
     lower
     upper
     meas
     width
     height
     a
inverse sq :: QuadraticMeas
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  meas
  height
  width
  a
sq@(Square a b c d) =
      if Bool
False
         then
            let s :: Square sh1 a
s = Quadratic
  (Square (Array Unpacked Arbitrary) measOff horizOff vertOff typ00)
  ((), xl00, (Array Unpacked Arbitrary, (), ()))
  ((), xu00, (Array Unpacked Arbitrary, (), ()))
  Filled
  Filled
  (sh1 ::+ sh0)
  a
-> Square sh1 a
forall typ11 xl11 xu11 a measOff vertOff horizOff sh0 sh1.
(Solve typ11, SolveExtra typ11 xl11, SolveExtra typ11 xu11,
 Floating a) =>
Quadratic
  (Square (Array Unpacked Arbitrary) measOff vertOff horizOff typ11)
  ((), xl11, (Array Unpacked Arbitrary, (), ()))
  ((), xu11, (Array Unpacked Arbitrary, (), ()))
  Filled
  Filled
  (sh0 ::+ sh1)
  a
-> Square sh0 a
schurComplement (Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Quadratic
     (Square typ11 measOff horizOff vertOff typ00)
     (xl11, xl00, (typ01, xl01, xu01))
     (xu11, xu00, (typ10, xu10, xl10))
     Filled
     Filled
     (sh1 ::+ sh0)
     a
forall measOff vertOff horizOff sh0 sh1 typ00 xl00 xu00 a typ01
       xl01 xu01 typ10 xl10 xu10 typ11 xl11 xu11.
(Measure measOff, C vertOff, C horizOff, C sh0, Eq sh0, C sh1,
 Eq sh1) =>
Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Square Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
c Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
b Quadratic typ00 xl00 xu00 Filled Filled sh0 a
a)
                cainv :: Full measOff horizOff vertOff sh1 sh0 a
cainv = Full measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Full measOff horizOff vertOff sh1 sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Divide.solveLeft Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
Full measOff horizOff vertOff sh1 sh0 a
c Quadratic typ00 xl00 xu00 Filled Filled sh0 a
a
                ainvb :: Full measOff vertOff horizOff sh0 sh1 a
ainvb = Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Full measOff vertOff horizOff sh0 sh1 a
-> Full measOff vertOff horizOff sh0 sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq height, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solveRight Quadratic typ00 xl00 xu00 Filled Filled sh0 a
a Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
Full measOff vertOff horizOff sh0 sh1 a
b
                br :: Full measOff vertOff horizOff sh0 sh1 a
br = Full measOff vertOff horizOff sh0 sh1 a
-> Square sh1 a -> Full measOff vertOff horizOff sh0 sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Divide.solveLeft Full measOff vertOff horizOff sh0 sh1 a
ainvb Square sh1 a
s
                cr :: Full measOff horizOff vertOff sh1 sh0 a
cr = Square sh1 a
-> Full measOff horizOff vertOff sh1 sh0 a
-> Full measOff horizOff vertOff sh1 sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq height, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solveRight Square sh1 a
s Full measOff horizOff vertOff sh1 sh0 a
cainv
            in Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Full measOff vertOff horizOff sh0 sh1 a
-> Full measOff horizOff vertOff sh1 sh0 a
-> Square sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff (Array Unpacked Arbitrary))
     (xl00, (), (Array Unpacked Arbitrary, (), ()))
     (xu00, (), (Array Unpacked Arbitrary, (), ()))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall measOff vertOff horizOff sh0 sh1 typ00 xl00 xu00 a typ01
       xl01 xu01 typ10 xl10 xu10 typ11 xl11 xu11.
(Measure measOff, C vertOff, C horizOff, C sh0, Eq sh0, C sh1,
 Eq sh1) =>
Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Square
                  (Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Quadratic typ00 xl00 xu00 Filled Filled sh0 a
forall typ xl xu lower upper meas height width a.
(Inverse typ, InverseExtra typ xl, InverseExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C height,
 C width, Floating a) =>
QuadraticMeas typ xl xu lower upper meas height width a
-> QuadraticMeas typ xl xu lower upper meas width height a
Matrix.inverse Quadratic typ00 xl00 xu00 Filled Filled sh0 a
a Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Quadratic typ00 xl00 xu00 Filled Filled sh0 a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Full measOff vertOff horizOff sh0 sh1 a
br Full measOff vertOff horizOff sh0 sh1 a
-> Full measOff horizOff vertOff sh1 sh0 a -> Square sh0 a
forall height width a meas0 vert0 horiz0 meas1 vert1 horiz1.
(C height, C width, Eq height, Eq width, Floating a, Measure meas0,
 C vert0, C horiz0, Measure meas1, C vert1, C horiz1) =>
Full meas0 vert0 horiz0 height width a
-> Full meas1 vert1 horiz1 width height a -> Square height a
##*## Full measOff horizOff vertOff sh1 sh0 a
cainv)
                  (Full measOff vertOff horizOff sh0 sh1 a
-> Full measOff vertOff horizOff sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate Full measOff vertOff horizOff sh0 sh1 a
br)
                  (Full measOff horizOff vertOff sh1 sh0 a
-> Full measOff horizOff vertOff sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate Full measOff horizOff vertOff sh1 sh0 a
cr)
                  (Square sh1 a -> Square sh1 a
forall typ xl xu lower upper meas height width a.
(Inverse typ, InverseExtra typ xl, InverseExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C height,
 C width, Floating a) =>
QuadraticMeas typ xl xu lower upper meas height width a
-> QuadraticMeas typ xl xu lower upper meas width height a
Matrix.inverse Square sh1 a
s)

         else
            let s :: Square sh0 a
s = Quadratic
  (Square (Array Unpacked Arbitrary) measOff vertOff horizOff typ11)
  ((), (), (Array Unpacked Arbitrary, (), ()))
  ((), (), (Array Unpacked Arbitrary, (), ()))
  Filled
  Filled
  (sh0 ::+ sh1)
  a
-> Square sh0 a
forall typ11 xl11 xu11 a measOff vertOff horizOff sh0 sh1.
(Solve typ11, SolveExtra typ11 xl11, SolveExtra typ11 xu11,
 Floating a) =>
Quadratic
  (Square (Array Unpacked Arbitrary) measOff vertOff horizOff typ11)
  ((), xl11, (Array Unpacked Arbitrary, (), ()))
  ((), xu11, (Array Unpacked Arbitrary, (), ()))
  Filled
  Filled
  (sh0 ::+ sh1)
  a
-> Square sh0 a
schurComplement QuadraticMeas
  (Square typ00 measOff vertOff horizOff typ11)
  xl
  xu
  lower
  upper
  meas
  height
  width
  a
Quadratic
  (Square (Array Unpacked Arbitrary) measOff vertOff horizOff typ11)
  ((), (), (Array Unpacked Arbitrary, (), ()))
  ((), (), (Array Unpacked Arbitrary, (), ()))
  Filled
  Filled
  (sh0 ::+ sh1)
  a
sq
                bdinv :: Full measOff vertOff horizOff sh0 sh1 a
bdinv = Full measOff vertOff horizOff sh0 sh1 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Full measOff vertOff horizOff sh0 sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Divide.solveLeft Matrix
  typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
Full measOff vertOff horizOff sh0 sh1 a
b Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d
                dinvc :: Full measOff horizOff vertOff sh1 sh0 a
dinvc = Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Full measOff horizOff vertOff sh1 sh0 a
-> Full measOff horizOff vertOff sh1 sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq height, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solveRight Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d Matrix
  typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
Full measOff horizOff vertOff sh1 sh0 a
c
                cr :: Full measOff horizOff vertOff sh1 sh0 a
cr = Full measOff horizOff vertOff sh1 sh0 a
-> Square sh0 a -> Full measOff horizOff vertOff sh1 sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Divide.solveLeft Full measOff horizOff vertOff sh1 sh0 a
dinvc Square sh0 a
s
                br :: Full measOff vertOff horizOff sh0 sh1 a
br = Square sh0 a
-> Full measOff vertOff horizOff sh0 sh1 a
-> Full measOff vertOff horizOff sh0 sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq height, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solveRight Square sh0 a
s Full measOff vertOff horizOff sh0 sh1 a
bdinv
            in Square sh0 a
-> Full measOff vertOff horizOff sh0 sh1 a
-> Full measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square (Array Unpacked Arbitrary) measOff vertOff horizOff typ11)
     ((), xl11, (Array Unpacked Arbitrary, (), ()))
     ((), xu11, (Array Unpacked Arbitrary, (), ()))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall measOff vertOff horizOff sh0 sh1 typ00 xl00 xu00 a typ01
       xl01 xu01 typ10 xl10 xu10 typ11 xl11 xu11.
(Measure measOff, C vertOff, C horizOff, C sh0, Eq sh0, C sh1,
 Eq sh1) =>
Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Square
                  (Square sh0 a -> Square sh0 a
forall typ xl xu lower upper meas height width a.
(Inverse typ, InverseExtra typ xl, InverseExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C height,
 C width, Floating a) =>
QuadraticMeas typ xl xu lower upper meas height width a
-> QuadraticMeas typ xl xu lower upper meas width height a
Matrix.inverse Square sh0 a
s)
                  (Full measOff vertOff horizOff sh0 sh1 a
-> Full measOff vertOff horizOff sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate Full measOff vertOff horizOff sh0 sh1 a
br)
                  (Full measOff horizOff vertOff sh1 sh0 a
-> Full measOff horizOff vertOff sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate Full measOff horizOff vertOff sh1 sh0 a
cr)
                  (Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
forall typ xl xu lower upper meas height width a.
(Inverse typ, InverseExtra typ xl, InverseExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C height,
 C width, Floating a) =>
QuadraticMeas typ xl xu lower upper meas height width a
-> QuadraticMeas typ xl xu lower upper meas width height a
Matrix.inverse Quadratic typ11 xl11 xu11 Filled Filled sh1 a
d Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Full measOff horizOff vertOff sh1 sh0 a
cr Full measOff horizOff vertOff sh1 sh0 a
-> Full measOff vertOff horizOff sh0 sh1 a -> Square sh1 a
forall height width a meas0 vert0 horiz0 meas1 vert1 horiz1.
(C height, C width, Eq height, Eq width, Floating a, Measure meas0,
 C vert0, C horiz0, Measure meas1, C vert1, C horiz1) =>
Full meas0 vert0 horiz0 height width a
-> Full meas1 vert1 horiz1 width height a -> Square height a
##*## Full measOff vertOff horizOff sh0 sh1 a
bdinv)


data Append typ0 typ1 sh0 sh1
data instance
   Matrix (Append typ0 typ1 sh0 sh1) xl xu
      lower upper meas vert horiz height width a where
   Above ::
      (Shape.C sh0, Shape.C sh1, Eq width) =>
      Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a ->
      Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a ->
      Matrix
         (Append typ0 typ1 sh0 sh1)
         (xl0,xl1,TBool.False) (xu0,xu1,TBool.True)
         Filled Filled Size Big horiz (sh0::+sh1) width a
   Beside ::
      (Shape.C sh0, Shape.C sh1, Eq height) =>
      Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a ->
      Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a ->
      Matrix
         (Append typ0 typ1 sh0 sh1)
         (xl0,xl1,TBool.True) (xu0,xu1,TBool.False)
         Filled Filled Size vert Big height (sh0::+sh1) a

type family Append0 extra; type instance Append0 (x0,x1,b) = x0
type family Append1 extra; type instance Append1 (x0,x1,b) = x1

type family AppendSelectShape xl sh part
type instance AppendSelectShape (xl0,xl1,TBool.False) sh part = part
type instance AppendSelectShape (xl0,xl1,TBool.True) sh part = sh

type AboveGeneral height0 height1 width =
   Matrix
      (Append TypeFull TypeFull height0 height1)
      ((),(),TBool.False) ((),(),TBool.True)
      Filled Filled Size Big Big (height0::+height1) width

type BesideGeneral height width0 width1 =
   Matrix
      (Append TypeFull TypeFull width0 width1)
      ((),(),TBool.True) ((),(),TBool.False)
      Filled Filled Size Big Big height (width0::+width1)

aboveFromFull ::
   (Shape.C height0, Eq height0, Shape.C height1, Eq height1,
    Shape.C width, Eq width, Class.Floating a) =>
   Matrix.General (height0 ::+ height1) width a ->
   AboveGeneral height0 height1 width a
aboveFromFull :: General (height0 ::+ height1) width a
-> AboveGeneral height0 height1 width a
aboveFromFull General (height0 ::+ height1) width a
a0 =
   let a :: General (height0 ::+ height1) width a
a = General (height0 ::+ height1) width a
-> General (height0 ::+ height1) width a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
Matrix.toFull General (height0 ::+ height1) width a
a0
   in Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  height0
  width
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     height1
     width
     a
-> AboveGeneral height0 height1 width a
forall sh0 sh1 width typ0 xl0 xu0 horiz a typ1 xl1 xu1.
(C sh0, C sh1, Eq width) =>
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
Above (General (height0 ::+ height1) width a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     height0
     width
     a
forall vert height0 height1 width a.
(C vert, C height0, C height1, C width, Floating a) =>
Full Size vert Big (height0 ::+ height1) width a
-> Full Size vert Big height0 width a
Matrix.takeTop General (height0 ::+ height1) width a
a) (General (height0 ::+ height1) width a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     height1
     width
     a
forall vert height0 height1 width a.
(C vert, C height0, C height1, C width, Floating a) =>
Full Size vert Big (height0 ::+ height1) width a
-> Full Size vert Big height1 width a
Matrix.takeBottom General (height0 ::+ height1) width a
a)

besideFromFull ::
   (Shape.C height, Eq height,
    Shape.C width0, Eq width0, Shape.C width1, Eq width1, Class.Floating a) =>
   Matrix.General height (width0 ::+ width1) a ->
   BesideGeneral height width0 width1 a
besideFromFull :: General height (width0 ::+ width1) a
-> BesideGeneral height width0 width1 a
besideFromFull General height (width0 ::+ width1) a
a0 =
   let a :: General height (width0 ::+ width1) a
a = General height (width0 ::+ width1) a
-> General height (width0 ::+ width1) a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
Matrix.toFull General height (width0 ::+ width1) a
a0
   in Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  height
  width0
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     height
     width1
     a
-> BesideGeneral height width0 width1 a
forall sh0 sh1 height typ0 xl0 xu0 vert a typ1 xl1 xu1.
(C sh0, C sh1, Eq height) =>
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
Beside (General height (width0 ::+ width1) a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     height
     width0
     a
forall vert height width0 width1 a.
(C vert, C height, C width0, C width1, Floating a) =>
Full Size Big vert height (width0 ::+ width1) a
-> Full Size Big vert height width0 a
Matrix.takeLeft General height (width0 ::+ width1) a
a) (General height (width0 ::+ width1) a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     height
     width1
     a
forall vert height width0 width1 a.
(C vert, C height, C width0, C width1, Floating a) =>
Full Size Big vert height (width0 ::+ width1) a
-> Full Size Big vert height width1 a
Matrix.takeRight General height (width0 ::+ width1) a
a)

deriving instance
   (Show (Matrix typ0 (Append0 xl) (Append0 xu)
            lower upper meas vert horiz
            (AppendSelectShape xl height sh0)
            (AppendSelectShape xu width sh0) a),
    Show (Matrix typ1 (Append1 xl) (Append1 xu)
            lower upper meas vert horiz
            (AppendSelectShape xl height sh1)
            (AppendSelectShape xu width sh1) a),
    Shape.C height, Shape.C width, Show height, Show width, Show a) =>
   Show (Matrix (Append typ0 typ1 sh0 sh1) xl xu
            lower upper meas vert horiz height width a)

instance
   (Matrix.Box typ0, Matrix.Box typ1) =>
      Matrix.Box (Append typ0 typ1 sh0 sh1) where
   type BoxExtra (Append typ0 typ1 sh0 sh1) extra =
         (Matrix.BoxExtra typ0 (Append0 extra),
          Matrix.BoxExtra typ1 (Append1 extra))
   extent :: Matrix
  (Append typ0 typ1 sh0 sh1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Extent meas vert horiz height width
extent (Above a b) =
      case AppendMode horiz horiz horiz width sh0 sh1
forall vert height widthA widthB.
C vert =>
AppendMode vert vert vert height widthA widthB
Extent.appendSame of
         Extent.AppendMode Extent Size horiz Big width sh0
-> Extent Size horiz Big width sh1
-> Extent Size horiz Big width (sh0 ::+ sh1)
append ->
            Extent Size horiz Big width (sh0 ::+ sh1)
-> Extent Size Big horiz (sh0 ::+ sh1) width
forall meas vert horiz height width.
(Measure meas, C vert, C horiz) =>
Extent meas vert horiz height width
-> Extent meas horiz vert width height
Extent.transpose (Extent Size horiz Big width (sh0 ::+ sh1)
 -> Extent Size Big horiz (sh0 ::+ sh1) width)
-> Extent Size horiz Big width (sh0 ::+ sh1)
-> Extent Size Big horiz (sh0 ::+ sh1) width
forall a b. (a -> b) -> a -> b
$
            Extent Size horiz Big width sh0
-> Extent Size horiz Big width sh1
-> Extent Size horiz Big width (sh0 ::+ sh1)
append
               (Extent Size Big horiz sh0 width -> Extent Size horiz Big width sh0
forall meas vert horiz height width.
(Measure meas, C vert, C horiz) =>
Extent meas vert horiz height width
-> Extent meas horiz vert width height
Extent.transpose (Extent Size Big horiz sh0 width
 -> Extent Size horiz Big width sh0)
-> Extent Size Big horiz sh0 width
-> Extent Size horiz Big width sh0
forall a b. (a -> b) -> a -> b
$ Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Extent Size Big horiz sh0 width
forall typ xl xu meas vert horiz lower upper height width a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu, Measure meas, C vert,
 C horiz) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Extent meas vert horiz height width
Matrix.extent Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
a)
               (Extent Size Big horiz sh1 width -> Extent Size horiz Big width sh1
forall meas vert horiz height width.
(Measure meas, C vert, C horiz) =>
Extent meas vert horiz height width
-> Extent meas horiz vert width height
Extent.transpose (Extent Size Big horiz sh1 width
 -> Extent Size horiz Big width sh1)
-> Extent Size Big horiz sh1 width
-> Extent Size horiz Big width sh1
forall a b. (a -> b) -> a -> b
$ Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Extent Size Big horiz sh1 width
forall typ xl xu meas vert horiz lower upper height width a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu, Measure meas, C vert,
 C horiz) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Extent meas vert horiz height width
Matrix.extent Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
b)
   extent (Beside a b) =
      case AppendMode vert vert vert height sh0 sh1
forall vert height widthA widthB.
C vert =>
AppendMode vert vert vert height widthA widthB
Extent.appendSame of
         Extent.AppendMode Extent Size vert Big height sh0
-> Extent Size vert Big height sh1
-> Extent Size vert Big height (sh0 ::+ sh1)
append ->
            Extent Size vert Big height sh0
-> Extent Size vert Big height sh1
-> Extent Size vert Big height (sh0 ::+ sh1)
append (Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Extent Size vert Big height sh0
forall typ xl xu meas vert horiz lower upper height width a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu, Measure meas, C vert,
 C horiz) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Extent meas vert horiz height width
Matrix.extent Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
a) (Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Extent Size vert Big height sh1
forall typ xl xu meas vert horiz lower upper height width a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu, Measure meas, C vert,
 C horiz) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Extent meas vert horiz height width
Matrix.extent Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
b)

instance
   (Matrix.Transpose typ0, Matrix.Transpose typ1) =>
      Matrix.Transpose (Append typ0 typ1 sh0 sh1) where
   type TransposeExtra (Append typ0 typ1 sh0 sh1) extra =
         (Matrix.TransposeExtra typ0 (Append0 extra),
          Matrix.TransposeExtra typ1 (Append1 extra))
   transpose :: Matrix
  (Append typ0 typ1 sh0 sh1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     xu
     xl
     upper
     lower
     meas
     horiz
     vert
     width
     height
     a
transpose (Above a b) = Matrix typ0 xu0 xl0 Filled Filled Size horiz Big width sh0 a
-> Matrix typ1 xu1 xl1 Filled Filled Size horiz Big width sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xu0, xu1, True)
     (xl0, xl1, False)
     Filled
     Filled
     Size
     horiz
     Big
     width
     (sh0 ::+ sh1)
     a
forall sh0 sh1 height typ0 xl0 xu0 vert a typ1 xl1 xu1.
(C sh0, C sh1, Eq height) =>
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
Beside (Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ0 xu0 xl0 Filled Filled Size horiz Big width sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
a) (Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix typ1 xu1 xl1 Filled Filled Size horiz Big width sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
b)
   transpose (Beside a b) = Matrix typ0 xu0 xl0 Filled Filled Size Big vert sh0 height a
-> Matrix typ1 xu1 xl1 Filled Filled Size Big vert sh1 height a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xu0, xu1, False)
     (xl0, xl1, True)
     Filled
     Filled
     Size
     Big
     vert
     (sh0 ::+ sh1)
     height
     a
forall sh0 sh1 width typ0 xl0 xu0 horiz a typ1 xl1 xu1.
(C sh0, C sh1, Eq width) =>
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
Above (Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ0 xu0 xl0 Filled Filled Size Big vert sh0 height a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
a) (Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix typ1 xu1 xl1 Filled Filled Size Big vert sh1 height a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
b)

instance
   (Layout typ0, Layout typ1) =>
      Layout (Append typ0 typ1 sh0 sh1) where
   type LayoutExtra (Append typ0 typ1 sh0 sh1) extra =
         (Matrix.BoxExtra typ0 (Append0 extra),
          Matrix.BoxExtra typ1 (Append1 extra),
          LayoutExtra typ0 (Append0 extra),
          LayoutExtra typ1 (Append1 extra))
   layout :: Matrix
  (Append typ0 typ1 sh0 sh1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Array (height, width) (Separator, Maybe (Style, a))
layout (Above a b) = ((sh0 ::+ sh1, width), [[(Separator, Maybe (Style, a))]])
-> Array (sh0 ::+ sh1, width) (Separator, Maybe (Style, a))
forall shape a. C shape => (shape, [[a]]) -> Array shape a
finalizeLayout (((sh0 ::+ sh1, width), [[(Separator, Maybe (Style, a))]])
 -> Array (sh0 ::+ sh1, width) (Separator, Maybe (Style, a)))
-> ((sh0 ::+ sh1, width), [[(Separator, Maybe (Style, a))]])
-> Array (sh0 ::+ sh1, width) (Separator, Maybe (Style, a))
forall a b. (a -> b) -> a -> b
$ Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> ((sh0, width), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
a ((sh0, width), [[(Separator, Maybe (Style, a))]])
-> ((sh1, width), [[(Separator, Maybe (Style, a))]])
-> ((sh0 ::+ sh1, width), [[(Separator, Maybe (Style, a))]])
forall width heightA a heightB.
Eq width =>
((heightA, width), [a])
-> ((heightB, width), [a]) -> ((heightA ::+ heightB, width), [a])
===# Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> ((sh1, width), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
b
   layout (Beside a b) = ((height, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> Array (height, sh0 ::+ sh1) (Separator, Maybe (Style, a))
forall shape a. C shape => (shape, [[a]]) -> Array shape a
finalizeLayout (((height, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
 -> Array (height, sh0 ::+ sh1) (Separator, Maybe (Style, a)))
-> ((height, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> Array (height, sh0 ::+ sh1) (Separator, Maybe (Style, a))
forall a b. (a -> b) -> a -> b
$ Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> ((height, sh0), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
a ((height, sh0), [[(Separator, Maybe (Style, a))]])
-> ((height, sh1), [[(Separator, Maybe (Style, a))]])
-> ((height, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
forall height widthA a widthB.
Eq height =>
((height, widthA), [[a]])
-> ((height, widthB), [[a]])
-> ((height, widthA ::+ widthB), [[a]])
|||# Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> ((height, sh1), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
b

instance
   (Layout typ0, Layout typ1) =>
      Matrix.Format (Append typ0 typ1 sh0 sh1) where
   type FormatExtra (Append typ0 typ1 sh0 sh1) extra =
         (Matrix.BoxExtra typ0 (Append0 extra),
          Matrix.BoxExtra typ1 (Append1 extra),
          LayoutExtra typ0 (Append0 extra),
          LayoutExtra typ1 (Append1 extra))
   format :: Config
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> out
format = Config
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> out
forall typ xl xu meas vert horiz height width a out lower upper.
(Layout typ, LayoutExtra typ xl, LayoutExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a, Output out) =>
Config
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> out
Matrix.formatWithLayout

instance
   (Matrix.Unpack typ0, Matrix.Unpack typ1) =>
      Matrix.Unpack (Append typ0 typ1 sh0 sh1) where
   type UnpackExtra (Append typ0 typ1 sh0 sh1) extra =
         (Matrix.UnpackExtra typ0 (Append0 extra),
          Matrix.UnpackExtra typ1 (Append1 extra))
   unpack :: Matrix
  (Append typ0 typ1 sh0 sh1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> ArrayMatrix
     Unpacked Arbitrary lower upper meas vert horiz height width a
unpack (Above a b) =
      OrderBias
-> AppendMode horiz horiz horiz width sh0 sh1
-> Full Size Big horiz sh0 width a
-> Full Size Big horiz sh1 width a
-> Full Size Big horiz (sh0 ::+ sh1) width a
forall horizA horizB horizC width heightA heightB a.
(C horizA, C horizB, C horizC, C width, Eq width, C heightA,
 C heightB, Floating a) =>
OrderBias
-> AppendMode horizA horizB horizC width heightA heightB
-> Full Size Big horizA heightA width a
-> Full Size Big horizB heightB width a
-> Full Size Big horizC (heightA ::+ heightB) width a
Matrix.above OrderBias
Matrix.rightBias AppendMode horiz horiz horiz width sh0 sh1
forall vert height widthA widthB.
C vert =>
AppendMode vert vert vert height widthA widthB
Extent.appendSame
         (Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Full Size Big horiz sh0 width a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
a)
         (Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Full Size Big horiz sh1 width a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
b)
   unpack (Beside a b) =
      OrderBias
-> AppendMode vert vert vert height sh0 sh1
-> Full Size vert Big height sh0 a
-> Full Size vert Big height sh1 a
-> Full Size vert Big height (sh0 ::+ sh1) a
forall vertA vertB vertC height widthA widthB a.
(C vertA, C vertB, C vertC, C height, Eq height, C widthA,
 C widthB, Floating a) =>
OrderBias
-> AppendMode vertA vertB vertC height widthA widthB
-> Full Size vertA Big height widthA a
-> Full Size vertB Big height widthB a
-> Full Size vertC Big height (widthA ::+ widthB) a
Matrix.beside OrderBias
Matrix.rightBias AppendMode vert vert vert height sh0 sh1
forall vert height widthA widthB.
C vert =>
AppendMode vert vert vert height widthA widthB
Extent.appendSame
         (Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Full Size vert Big height sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
a)
         (Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Full Size vert Big height sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
b)

instance
   (Matrix.Homogeneous typ0, Matrix.Homogeneous typ1) =>
      Matrix.Homogeneous (Append typ0 typ1 sh0 sh1) where
   type HomogeneousExtra (Append typ0 typ1 sh0 sh1) extra =
         (Matrix.HomogeneousExtra typ0 (Append0 extra),
          Matrix.HomogeneousExtra typ1 (Append1 extra))
   zeroFrom :: Matrix
  (Append typ0 typ1 sh0 sh1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
zeroFrom (Above a b) = Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
forall sh0 sh1 width typ0 xl0 xu0 horiz a typ1 xl1 xu1.
(C sh0, C sh1, Eq width) =>
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
Above (Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.zeroFrom Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
a) (Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.zeroFrom Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
b)
   zeroFrom (Beside a b) = Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
forall sh0 sh1 height typ0 xl0 xu0 vert a typ1 xl1 xu1.
(C sh0, C sh1, Eq height) =>
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
Beside (Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.zeroFrom Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
a) (Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.zeroFrom Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
b)
   negate :: Matrix
  (Append typ0 typ1 sh0 sh1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
negate (Above a b) = Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
forall sh0 sh1 width typ0 xl0 xu0 horiz a typ1 xl1 xu1.
(C sh0, C sh1, Eq width) =>
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
Above (Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
a) (Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
b)
   negate (Beside a b) = Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
forall sh0 sh1 height typ0 xl0 xu0 vert a typ1 xl1 xu1.
(C sh0, C sh1, Eq height) =>
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
Beside (Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
a) (Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
b)
   scaleReal :: RealOf a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
scaleReal RealOf a
k (Above a b) =
      Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
forall sh0 sh1 width typ0 xl0 xu0 horiz a typ1 xl1 xu1.
(C sh0, C sh1, Eq width) =>
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
Above (RealOf a
-> Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
RealOf a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scaleReal RealOf a
k Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
a) (RealOf a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
RealOf a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scaleReal RealOf a
k Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
b)
   scaleReal RealOf a
k (Beside a b) =
      Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
forall sh0 sh1 height typ0 xl0 xu0 vert a typ1 xl1 xu1.
(C sh0, C sh1, Eq height) =>
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
Beside (RealOf a
-> Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
RealOf a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scaleReal RealOf a
k Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
a) (RealOf a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
RealOf a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scaleReal RealOf a
k Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
b)

instance
   (Matrix.Scale typ0, Matrix.Scale typ1) =>
      Matrix.Scale (Append typ0 typ1 sh0 sh1) where
   type ScaleExtra (Append typ0 typ1 sh0 sh1) extra =
         (Matrix.ScaleExtra typ0 (Append0 extra),
          Matrix.ScaleExtra typ1 (Append1 extra))
   scale :: a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
scale a
k (Above a b) = Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
forall sh0 sh1 width typ0 xl0 xu0 horiz a typ1 xl1 xu1.
(C sh0, C sh1, Eq width) =>
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
Above (a
-> Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
forall typ xl xu meas vert horiz height width a lower upper.
(Scale typ, ScaleExtra typ xl, ScaleExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scale a
k Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
a) (a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
forall typ xl xu meas vert horiz height width a lower upper.
(Scale typ, ScaleExtra typ xl, ScaleExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scale a
k Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
b)
   scale a
k (Beside a b) = Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
forall sh0 sh1 height typ0 xl0 xu0 vert a typ1 xl1 xu1.
(C sh0, C sh1, Eq height) =>
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
Beside (a
-> Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Scale typ, ScaleExtra typ xl, ScaleExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scale a
k Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
a) (a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Scale typ, ScaleExtra typ xl, ScaleExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scale a
k Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
b)

instance
   (Matrix.Additive typ0, Matrix.Additive typ1, Eq sh0, Eq sh1) =>
      Matrix.Additive (Append typ0 typ1 sh0 sh1) where
   type AdditiveExtra (Append typ0 typ1 sh0 sh1) extra =
         (Matrix.AdditiveExtra typ0 (Append0 extra),
          Matrix.AdditiveExtra typ1 (Append1 extra))
   add :: Matrix
  (Append typ0 typ1 sh0 sh1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
add (Above a0 b0) (Above a1 b1) =
      Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
forall sh0 sh1 width typ0 xl0 xu0 horiz a typ1 xl1 xu1.
(C sh0, C sh1, Eq width) =>
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
Above (Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
forall typ meas vert horiz xl xu height width a lower upper.
(Additive typ, Measure meas, C vert, C horiz, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.add Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
a0 Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
a1) (Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
forall typ meas vert horiz xl xu height width a lower upper.
(Additive typ, Measure meas, C vert, C horiz, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.add Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
b0 Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
b1)
   add (Beside a0 b0) (Beside a1 b1) =
      Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
forall sh0 sh1 height typ0 xl0 xu0 vert a typ1 xl1 xu1.
(C sh0, C sh1, Eq height) =>
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
Beside (Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
forall typ meas vert horiz xl xu height width a lower upper.
(Additive typ, Measure meas, C vert, C horiz, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.add Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
a0 Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
a1) (Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
forall typ meas vert horiz xl xu height width a lower upper.
(Additive typ, Measure meas, C vert, C horiz, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.add Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
b0 Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
b1)

instance
   (Matrix.Subtractive typ0, Matrix.Subtractive typ1, Eq sh0, Eq sh1) =>
      Matrix.Subtractive (Append typ0 typ1 sh0 sh1) where
   type SubtractiveExtra (Append typ0 typ1 sh0 sh1) extra =
         (Matrix.SubtractiveExtra typ0 (Append0 extra),
          Matrix.SubtractiveExtra typ1 (Append1 extra))
   sub :: Matrix
  (Append typ0 typ1 sh0 sh1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
sub (Above a0 b0) (Above a1 b1) =
      Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
forall sh0 sh1 width typ0 xl0 xu0 horiz a typ1 xl1 xu1.
(C sh0, C sh1, Eq width) =>
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
Above (Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
forall typ meas vert horiz xl xu height width a lower upper.
(Subtractive typ, Measure meas, C vert, C horiz,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.sub Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
a0 Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
a1) (Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
forall typ meas vert horiz xl xu height width a lower upper.
(Subtractive typ, Measure meas, C vert, C horiz,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.sub Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
b0 Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
b1)
   sub (Beside a0 b0) (Beside a1 b1) =
      Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
forall sh0 sh1 height typ0 xl0 xu0 vert a typ1 xl1 xu1.
(C sh0, C sh1, Eq height) =>
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
Beside (Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
forall typ meas vert horiz xl xu height width a lower upper.
(Subtractive typ, Measure meas, C vert, C horiz,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.sub Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
a0 Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
a1) (Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
forall typ meas vert horiz xl xu height width a lower upper.
(Subtractive typ, Measure meas, C vert, C horiz,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.sub Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
b0 Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
b1)

instance
   (Multiply.MultiplyVector typ0, Multiply.MultiplyVector typ1,
    Eq sh0, Eq sh1) =>
      Multiply.MultiplyVector (Append typ0 typ1 sh0 sh1) where
   type MultiplyVectorExtra (Append typ0 typ1 sh0 sh1) extra =
         (Multiply.MultiplyVectorExtra typ0 (Append0 extra),
          Multiply.MultiplyVectorExtra typ1 (Append1 extra))
   matrixVector :: Matrix
  (Append typ0 typ1 sh0 sh1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Vector width a -> Vector height a
matrixVector (Above a b) Vector width a
x =
      Array sh0 a -> Array sh1 a -> Array (sh0 ::+ sh1) a
forall shx shy a.
(C shx, C shy, Storable a) =>
Array shx a -> Array shy a -> Array (shx ::+ shy) a
Array.append (Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Vector width a -> Array sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
a Vector width a
x) (Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Vector width a -> Array sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
b Vector width a
x)
   matrixVector (Beside a b) Vector width a
x =
      let (Array sh0 a
x0,Array sh1 a
x1) = Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
forall sh0 sh1 a.
(C sh0, C sh1, Storable a) =>
Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
Array.split Vector width a
Array (sh0 ::+ sh1) a
x
      in (Vector (Unchecked height) a
 -> Vector (Unchecked height) a -> Vector (Unchecked height) a)
-> Vector height a -> Vector height a -> Vector height a
forall sh0 a0 sh1 a1 sh2 a2.
(Vector (Unchecked sh0) a0
 -> Vector (Unchecked sh1) a1 -> Vector (Unchecked sh2) a2)
-> Vector sh0 a0 -> Vector sh1 a1 -> Vector sh2 a2
withoutSizeCheck Vector (Unchecked height) a
-> Vector (Unchecked height) a -> Vector (Unchecked height) a
forall sh a.
(C sh, Eq sh, Floating a) =>
Vector sh a -> Vector sh a -> Vector sh a
(|+|)
            (Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Array sh0 a -> Vector height a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
a Array sh0 a
x0)
            (Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Array sh1 a -> Vector height a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
b Array sh1 a
x1)
   vectorMatrix :: Vector height a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Vector width a
vectorMatrix Vector height a
x (Above a b) =
      let (Array sh0 a
x0,Array sh1 a
x1) = Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
forall sh0 sh1 a.
(C sh0, C sh1, Storable a) =>
Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
Array.split Vector height a
Array (sh0 ::+ sh1) a
x
      in (Vector (Unchecked width) a
 -> Vector (Unchecked width) a -> Vector (Unchecked width) a)
-> Vector width a -> Vector width a -> Vector width a
forall sh0 a0 sh1 a1 sh2 a2.
(Vector (Unchecked sh0) a0
 -> Vector (Unchecked sh1) a1 -> Vector (Unchecked sh2) a2)
-> Vector sh0 a0 -> Vector sh1 a1 -> Vector sh2 a2
withoutSizeCheck Vector (Unchecked width) a
-> Vector (Unchecked width) a -> Vector (Unchecked width) a
forall sh a.
(C sh, Eq sh, Floating a) =>
Vector sh a -> Vector sh a -> Vector sh a
(|+|)
            (Array sh0 a
-> Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Vector width a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Array sh0 a
x0 Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
a)
            (Array sh1 a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Vector width a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Array sh1 a
x1 Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
b)
   vectorMatrix Vector height a
x (Beside a b) =
      Array sh0 a -> Array sh1 a -> Array (sh0 ::+ sh1) a
forall shx shy a.
(C shx, C shy, Storable a) =>
Array shx a -> Array shy a -> Array (shx ::+ shy) a
Array.append (Vector height a
-> Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Array sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Vector height a
x Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
a) (Vector height a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Array sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Vector height a
x Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
b)


data Triangular typ0 typOff typ1
data instance
   Matrix (Triangular typ0 typOff typ1) xl xu
      lower upper meas vert horiz height width a where
   Upper ::
      (Shape.C sh0, Eq sh0, Shape.C sh1, Eq sh1) =>
      Quadratic typ0 xl0 xu0 lower Filled sh0 a ->
      Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a ->
      Quadratic typ1 xl1 xu1 lower Filled sh1 a ->
      Quadratic
         (Triangular typ0 typOff typ1)
         (xl0,xlOff,xl1,TBool.False) (xu0,xuOff,xu1,TBool.True)
         lower Filled (sh0::+sh1) a
   Lower ::
      (Shape.C sh0, Eq sh0, Shape.C sh1, Eq sh1) =>
      Quadratic typ0 xl0 xu0 Filled upper sh0 a ->
      Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a ->
      Quadratic typ1 xl1 xu1 Filled upper sh1 a ->
      Quadratic
         (Triangular typ0 typOff typ1)
         (xl0,xlOff,xl1,TBool.True) (xu0,xuOff,xu1,TBool.False)
         Filled upper (sh0::+sh1) a

type family Triangular0 extra; type instance Triangular0 (x0,xo,x1,b) = x0
type family Triangular1 extra; type instance Triangular1 (x0,xo,x1,b) = x1
type family TriangularOff extra; type instance TriangularOff (x0,xo,x1,b) = xo

type family TriangularFstShape xl xu sh
type family TriangularSndShape xl xu sh
type instance
   TriangularFstShape
      (xl0,xlo,xl1,TBool.False) (xu0,xuo,xu1,TBool.True) (sh0::+sh1) = sh0
type instance
   TriangularSndShape
      (xl0,xlo,xl1,TBool.False) (xu0,xuo,xu1,TBool.True) (sh0::+sh1) = sh1
type instance
   TriangularFstShape
      (xl0,xlo,xl1,TBool.True) (xu0,xuo,xu1,TBool.False) (sh0::+sh1) = sh1
type instance
   TriangularSndShape
      (xl0,xlo,xl1,TBool.True) (xu0,xuo,xu1,TBool.False) (sh0::+sh1) = sh0

deriving instance
   (Show (Quadratic typ0 (Triangular0 xl) (Triangular0 xu)
            lower upper (ShapeHead height) a),
    Show (Quadratic typ1 (Triangular1 xl) (Triangular1 xu)
            lower upper (ShapeTail height) a),
    Show (Matrix typOff (TriangularOff xl) (TriangularOff xu)
            Filled Filled Size Big Big
            (TriangularFstShape xl xu height)
            (TriangularSndShape xl xu height)
            a),
    Shape.C height, Shape.C width, Show height, Show width, Show a) =>
   Show (Matrix (Triangular typ0 typOff typ1) xl xu
            lower upper meas vert horiz height width a)

instance
   (Matrix.Box typ0, Matrix.Box typOff, Matrix.Box typ1) =>
      Matrix.Box (Triangular typ0 typOff typ1) where
   type BoxExtra (Triangular typ0 typOff typ1) extra =
         (Matrix.BoxExtra typ0 (Triangular0 extra),
          Matrix.BoxExtra typ1 (Triangular1 extra),
          Matrix.BoxExtra typOff (TriangularOff extra))
   extent :: Matrix
  (Triangular typ0 typOff typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Extent meas vert horiz height width
extent (Upper a _ b) = (sh0 ::+ sh1) -> Square (sh0 ::+ sh1)
forall sh. sh -> Square sh
Extent.square (Quadratic typ0 xl0 xu0 lower Filled sh0 a -> sh0
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Quadratic typ0 xl0 xu0 lower Filled sh0 a
a sh0 -> sh1 -> sh0 ::+ sh1
forall sh0 sh1. sh0 -> sh1 -> sh0 ::+ sh1
::+ Quadratic typ1 xl1 xu1 lower Filled sh1 a -> sh1
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Quadratic typ1 xl1 xu1 lower Filled sh1 a
b)
   extent (Lower a _ b) = (sh0 ::+ sh1) -> Square (sh0 ::+ sh1)
forall sh. sh -> Square sh
Extent.square (Quadratic typ0 xl0 xu0 Filled upper sh0 a -> sh0
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Quadratic typ0 xl0 xu0 Filled upper sh0 a
a sh0 -> sh1 -> sh0 ::+ sh1
forall sh0 sh1. sh0 -> sh1 -> sh0 ::+ sh1
::+ Quadratic typ1 xl1 xu1 Filled upper sh1 a -> sh1
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Quadratic typ1 xl1 xu1 Filled upper sh1 a
b)

instance
   (Matrix.Box typ0, Matrix.Box typOff, Matrix.Box typ1) =>
      Matrix.ToQuadratic (Triangular typ0 typOff typ1) where
   heightToQuadratic :: QuadraticMeas
  (Triangular typ0 typOff typ1) xl xu lower upper meas height width a
-> Quadratic
     (Triangular typ0 typOff typ1) xl xu lower upper height a
heightToQuadratic a :: QuadraticMeas
  (Triangular typ0 typOff typ1) xl xu lower upper meas height width a
a@(Upper _ _ _) = QuadraticMeas
  (Triangular typ0 typOff typ1) xl xu lower upper meas height width a
Quadratic (Triangular typ0 typOff typ1) xl xu lower upper height a
a
   heightToQuadratic a :: QuadraticMeas
  (Triangular typ0 typOff typ1) xl xu lower upper meas height width a
a@(Lower _ _ _) = QuadraticMeas
  (Triangular typ0 typOff typ1) xl xu lower upper meas height width a
Quadratic (Triangular typ0 typOff typ1) xl xu lower upper height a
a
   widthToQuadratic :: QuadraticMeas
  (Triangular typ0 typOff typ1) xl xu lower upper meas height width a
-> Quadratic
     (Triangular typ0 typOff typ1) xl xu lower upper width a
widthToQuadratic a :: QuadraticMeas
  (Triangular typ0 typOff typ1) xl xu lower upper meas height width a
a@(Upper _ _ _) = QuadraticMeas
  (Triangular typ0 typOff typ1) xl xu lower upper meas height width a
Quadratic (Triangular typ0 typOff typ1) xl xu lower upper width a
a
   widthToQuadratic a :: QuadraticMeas
  (Triangular typ0 typOff typ1) xl xu lower upper meas height width a
a@(Lower _ _ _) = QuadraticMeas
  (Triangular typ0 typOff typ1) xl xu lower upper meas height width a
Quadratic (Triangular typ0 typOff typ1) xl xu lower upper width a
a

instance
   (Matrix.Transpose typ0, Matrix.Transpose typOff, Matrix.Transpose typ1) =>
      Matrix.Transpose (Triangular typ0 typOff typ1) where
   type TransposeExtra (Triangular typ0 typOff typ1) extra =
         (Matrix.TransposeExtra typ0 (Triangular0 extra),
          Matrix.TransposeExtra typ1 (Triangular1 extra),
          Matrix.TransposeExtra typOff (TriangularOff extra))
   transpose :: Matrix
  (Triangular typ0 typOff typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Triangular typ0 typOff typ1)
     xu
     xl
     upper
     lower
     meas
     horiz
     vert
     width
     height
     a
transpose (Upper a o b) =
      Quadratic typ0 xu0 xl0 Filled lower sh0 a
-> Matrix typOff xuOff xlOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xu1 xl1 Filled lower sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xu0, xuOff, xu1, True)
     (xl0, xlOff, xl1, False)
     Filled
     lower
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 upper a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
Lower (Matrix typ0 xl0 xu0 lower Filled Shape Small Small sh0 sh0 a
-> Quadratic typ0 xu0 xl0 Filled lower sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typ0 xl0 xu0 lower Filled Shape Small Small sh0 sh0 a
a) (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xuOff xlOff Filled Filled Size Big Big sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o) (Matrix typ1 xl1 xu1 lower Filled Shape Small Small sh1 sh1 a
-> Quadratic typ1 xu1 xl1 Filled lower sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typ1 xl1 xu1 lower Filled Shape Small Small sh1 sh1 a
b)
   transpose (Lower a o b) =
      Quadratic typ0 xu0 xl0 upper Filled sh0 a
-> Matrix typOff xuOff xlOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xu1 xl1 upper Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xu0, xuOff, xu1, False)
     (xl0, xlOff, xl1, True)
     upper
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
Upper (Matrix typ0 xl0 xu0 Filled upper Shape Small Small sh0 sh0 a
-> Quadratic typ0 xu0 xl0 upper Filled sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typ0 xl0 xu0 Filled upper Shape Small Small sh0 sh0 a
a) (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Matrix typOff xuOff xlOff Filled Filled Size Big Big sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
o) (Matrix typ1 xl1 xu1 Filled upper Shape Small Small sh1 sh1 a
-> Quadratic typ1 xu1 xl1 upper Filled sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typ1 xl1 xu1 Filled upper Shape Small Small sh1 sh1 a
b)

instance
   (Layout typ0, Layout typOff, Layout typ1) =>
      Layout (Triangular typ0 typOff typ1) where
   type LayoutExtra (Triangular typ0 typOff typ1) extra =
         (Matrix.BoxExtra typ0 (Triangular0 extra),
          Matrix.BoxExtra typ1 (Triangular1 extra),
          Matrix.BoxExtra typOff (TriangularOff extra),
          LayoutExtra typ0 (Triangular0 extra),
          LayoutExtra typ1 (Triangular1 extra),
          LayoutExtra typOff (TriangularOff extra))
   layout :: Matrix
  (Triangular typ0 typOff typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Array (height, width) (Separator, Maybe (Style, a))
layout (Upper a o b) = ((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> Array (sh0 ::+ sh1, sh0 ::+ sh1) (Separator, Maybe (Style, a))
forall shape a. C shape => (shape, [[a]]) -> Array shape a
finalizeLayout (((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
 -> Array (sh0 ::+ sh1, sh0 ::+ sh1) (Separator, Maybe (Style, a)))
-> ((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> Array (sh0 ::+ sh1, sh0 ::+ sh1) (Separator, Maybe (Style, a))
forall a b. (a -> b) -> a -> b
$
      Matrix typ0 xl0 xu0 lower Filled Shape Small Small sh0 sh0 a
-> ((sh0, sh0), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Matrix typ0 xl0 xu0 lower Filled Shape Small Small sh0 sh0 a
a ((sh0, sh0), [[(Separator, Maybe (Style, a))]])
-> ((sh0, sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh0, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
forall height widthA a widthB.
Eq height =>
((height, widthA), [[a]])
-> ((height, widthB), [[a]])
-> ((height, widthA ::+ widthB), [[a]])
|||# Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> ((sh0, sh1), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o
      ((sh0, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
forall width heightA a heightB.
Eq width =>
((heightA, width), [a])
-> ((heightB, width), [a]) -> ((heightA ::+ heightB, width), [a])
===#
      sh1 -> sh0 -> ((sh1, sh0), [[(Separator, Maybe (Style, a))]])
forall height width a.
(C height, C width) =>
height -> width -> ((height, width), [[(Separator, Maybe a)]])
layoutEmpty (Quadratic typ1 xl1 xu1 lower Filled sh1 a -> sh1
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Quadratic typ1 xl1 xu1 lower Filled sh1 a
b) (Matrix typ0 xl0 xu0 lower Filled Shape Small Small sh0 sh0 a -> sh0
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Matrix typ0 xl0 xu0 lower Filled Shape Small Small sh0 sh0 a
a) ((sh1, sh0), [[(Separator, Maybe (Style, a))]])
-> ((sh1, sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
forall height widthA a widthB.
Eq height =>
((height, widthA), [[a]])
-> ((height, widthB), [[a]])
-> ((height, widthA ::+ widthB), [[a]])
|||# Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> ((sh1, sh1), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Quadratic typ1 xl1 xu1 lower Filled sh1 a
b
   layout (Lower a o b) = ((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> Array (sh0 ::+ sh1, sh0 ::+ sh1) (Separator, Maybe (Style, a))
forall shape a. C shape => (shape, [[a]]) -> Array shape a
finalizeLayout (((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
 -> Array (sh0 ::+ sh1, sh0 ::+ sh1) (Separator, Maybe (Style, a)))
-> ((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> Array (sh0 ::+ sh1, sh0 ::+ sh1) (Separator, Maybe (Style, a))
forall a b. (a -> b) -> a -> b
$
      Matrix typ0 xl0 xu0 Filled upper Shape Small Small sh0 sh0 a
-> ((sh0, sh0), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Matrix typ0 xl0 xu0 Filled upper Shape Small Small sh0 sh0 a
a ((sh0, sh0), [[(Separator, Maybe (Style, a))]])
-> ((sh0, sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh0, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
forall height widthA a widthB.
Eq height =>
((height, widthA), [[a]])
-> ((height, widthB), [[a]])
-> ((height, widthA ::+ widthB), [[a]])
|||# sh0 -> sh1 -> ((sh0, sh1), [[(Separator, Maybe (Style, a))]])
forall height width a.
(C height, C width) =>
height -> width -> ((height, width), [[(Separator, Maybe a)]])
layoutEmpty (Matrix typ0 xl0 xu0 Filled upper Shape Small Small sh0 sh0 a -> sh0
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Matrix typ0 xl0 xu0 Filled upper Shape Small Small sh0 sh0 a
a) (Quadratic typ1 xl1 xu1 Filled upper sh1 a -> sh1
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Quadratic typ1 xl1 xu1 Filled upper sh1 a
b)
      ((sh0, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
forall width heightA a heightB.
Eq width =>
((heightA, width), [a])
-> ((heightB, width), [a]) -> ((heightA ::+ heightB, width), [a])
===#
      Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> ((sh1, sh0), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
o ((sh1, sh0), [[(Separator, Maybe (Style, a))]])
-> ((sh1, sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
forall height widthA a widthB.
Eq height =>
((height, widthA), [[a]])
-> ((height, widthB), [[a]])
-> ((height, widthA ::+ widthB), [[a]])
|||# Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> ((sh1, sh1), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Quadratic typ1 xl1 xu1 Filled upper sh1 a
b

instance
   (Layout typ0, Layout typOff, Layout typ1) =>
      Matrix.Format (Triangular typ0 typOff typ1) where
   type FormatExtra (Triangular typ0 typOff typ1) extra =
         (Matrix.BoxExtra typ0 (Triangular0 extra),
          Matrix.BoxExtra typ1 (Triangular1 extra),
          Matrix.BoxExtra typOff (TriangularOff extra),
          LayoutExtra typ0 (Triangular0 extra),
          LayoutExtra typ1 (Triangular1 extra),
          LayoutExtra typOff (TriangularOff extra))
   format :: Config
-> Matrix
     (Triangular typ0 typOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> out
format = Config
-> Matrix
     (Triangular typ0 typOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> out
forall typ xl xu meas vert horiz height width a out lower upper.
(Layout typ, LayoutExtra typ xl, LayoutExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a, Output out) =>
Config
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> out
Matrix.formatWithLayout

instance
   (Matrix.SquareShape typ0, Matrix.SquareShape typ1,
    Matrix.Box typOff, Matrix.Homogeneous typOff) =>
      Matrix.SquareShape (Triangular typ0 typOff typ1) where
   type SquareShapeExtra (Triangular typ0 typOff typ1) extra =
         (Matrix.SquareShapeExtra typ0 (Triangular0 extra),
          Matrix.SquareShapeExtra typ1 (Triangular1 extra),
          Matrix.SquareShapeExtra typOff (TriangularOff extra),
          Matrix.HomogeneousExtra typOff (TriangularOff extra))
   takeDiagonal :: Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
-> Vector sh a
takeDiagonal (Upper a _b c) =
      Array sh0 a -> Array sh1 a -> Array (sh0 ::+ sh1) a
forall shx shy a.
(C shx, C shy, Storable a) =>
Array shx a -> Array shy a -> Array (shx ::+ shy) a
Array.append (Quadratic typ0 xl0 xu0 lower Filled sh0 a -> Array sh0 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> Vector sh a
MatrixClass.takeDiagonal Quadratic typ0 xl0 xu0 lower Filled sh0 a
a) (Quadratic typ1 xl1 xu1 lower Filled sh1 a -> Array sh1 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> Vector sh a
MatrixClass.takeDiagonal Quadratic typ1 xl1 xu1 lower Filled sh1 a
c)
   takeDiagonal (Lower a _b c) =
      Array sh0 a -> Array sh1 a -> Array (sh0 ::+ sh1) a
forall shx shy a.
(C shx, C shy, Storable a) =>
Array shx a -> Array shy a -> Array (shx ::+ shy) a
Array.append (Quadratic typ0 xl0 xu0 Filled upper sh0 a -> Array sh0 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> Vector sh a
MatrixClass.takeDiagonal Quadratic typ0 xl0 xu0 Filled upper sh0 a
a) (Quadratic typ1 xl1 xu1 Filled upper sh1 a -> Array sh1 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> Vector sh a
MatrixClass.takeDiagonal Quadratic typ1 xl1 xu1 Filled upper sh1 a
c)
   identityFrom :: Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
identityFrom (Upper a b c) =
      Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
Upper
         (Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Quadratic typ0 xl0 xu0 lower Filled sh0 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
MatrixClass.identityFrom Quadratic typ0 xl0 xu0 lower Filled sh0 a
a)
         (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.zeroFrom Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
b)
         (Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
MatrixClass.identityFrom Quadratic typ1 xl1 xu1 lower Filled sh1 a
c)
   identityFrom (Lower a b c) =
      Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 upper a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
Lower
         (Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Quadratic typ0 xl0 xu0 Filled upper sh0 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
MatrixClass.identityFrom Quadratic typ0 xl0 xu0 Filled upper sh0 a
a)
         (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.zeroFrom Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
b)
         (Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
MatrixClass.identityFrom Quadratic typ1 xl1 xu1 Filled upper sh1 a
c)

instance
   (Matrix.Unpack typ0, Matrix.Unpack typOff, Matrix.Unpack typ1) =>
      Matrix.Unpack (Triangular typ0 typOff typ1) where
   type UnpackExtra (Triangular typ0 typOff typ1) extra =
         (Matrix.UnpackExtra typ0 (Triangular0 extra),
          Matrix.UnpackExtra typ1 (Triangular1 extra),
          Matrix.UnpackExtra typOff (TriangularOff extra))
   unpack :: Matrix
  (Triangular typ0 typOff typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> ArrayMatrix
     Unpacked Arbitrary lower upper meas vert horiz height width a
unpack (Upper a0 o0 b0) =
      let a :: Full Shape Small Small sh0 sh0 a
a = Matrix typ0 xl0 xu0 lower Filled Shape Small Small sh0 sh0 a
-> Full Shape Small Small sh0 sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix typ0 xl0 xu0 lower Filled Shape Small Small sh0 sh0 a
a0 in
      let b :: Full Shape Small Small sh1 sh1 a
b = Matrix typ1 xl1 xu1 lower Filled Shape Small Small sh1 sh1 a
-> Full Shape Small Small sh1 sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix typ1 xl1 xu1 lower Filled Shape Small Small sh1 sh1 a
b0 in
      let o :: Full Size Big Big sh0 sh1 a
o = Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Full Size Big Big sh0 sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o0 in
      let zero :: Omni Unpacked Arbitrary Filled Filled Size Big Big height width
-> General height width a
zero Omni Unpacked Arbitrary Filled Filled Size Big Big height width
shape = Id (General height width a)
forall height width a. Id (General height width a)
Matrix.asGeneral Id (General height width a) -> Id (General height width a)
forall a b. (a -> b) -> a -> b
$ Omni Unpacked Arbitrary Filled Filled Size Big Big height width
-> General height width a
forall property meas vert horiz height width a pack lower upper.
(Homogeneous property, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Omni pack property lower upper meas vert horiz height width
-> ArrayMatrix
     pack property lower upper meas vert horiz height width a
Matrix.zero Omni Unpacked Arbitrary Filled Filled Size Big Big height width
shape in
      let order :: Order
order = Full Shape Small Small sh1 sh1 a -> Order
forall pack property lower upper meas vert horiz height width a.
ArrayMatrix
  pack property lower upper meas vert horiz height width a
-> Order
ArrMatrix.order Full Shape Small Small sh1 sh1 a
b in
      let dims :: (sh1, sh0)
dims = (Full Shape Small Small sh1 sh1 a -> sh1
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Full Shape Small Small sh1 sh1 a
b, Full Shape Small Small sh0 sh0 a -> sh0
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Full Shape Small Small sh0 sh0 a
a) in
      (FullArray Shape Small Small (sh0 ::+ sh1) (sh0 ::+ sh1) a
 -> FullArray Shape Small Small (sh0 ::+ sh1) (sh0 ::+ sh1) a)
-> UnpackedMatrix
     Arbitrary
     Filled
     Filled
     Shape
     Small
     Small
     (sh0 ::+ sh1)
     (sh0 ::+ sh1)
     a
-> UnpackedMatrix
     Arbitrary
     lower
     upper
     Shape
     Small
     Small
     (sh0 ::+ sh1)
     (sh0 ::+ sh1)
     a
forall propertyA lowerA upperA propertyB lowerB upperB measA vertA
       horizA heightA widthA a measB vertB horizB heightB widthB b.
(Property propertyA, Strip lowerA, Strip upperA,
 Property propertyB, Strip lowerB, Strip upperB) =>
(FullArray measA vertA horizA heightA widthA a
 -> FullArray measB vertB horizB heightB widthB b)
-> UnpackedMatrix
     propertyA lowerA upperA measA vertA horizA heightA widthA a
-> UnpackedMatrix
     propertyB lowerB upperB measB vertB horizB heightB widthB b
ArrMatrix.liftUnpacked1 FullArray Shape Small Small (sh0 ::+ sh1) (sh0 ::+ sh1) a
-> FullArray Shape Small Small (sh0 ::+ sh1) (sh0 ::+ sh1) a
forall a. a -> a
id (UnpackedMatrix
   Arbitrary
   Filled
   Filled
   Shape
   Small
   Small
   (sh0 ::+ sh1)
   (sh0 ::+ sh1)
   a
 -> UnpackedMatrix
      Arbitrary
      lower
      upper
      Shape
      Small
      Small
      (sh0 ::+ sh1)
      (sh0 ::+ sh1)
      a)
-> UnpackedMatrix
     Arbitrary
     Filled
     Filled
     Shape
     Small
     Small
     (sh0 ::+ sh1)
     (sh0 ::+ sh1)
     a
-> UnpackedMatrix
     Arbitrary
     lower
     upper
     Shape
     Small
     Small
     (sh0 ::+ sh1)
     (sh0 ::+ sh1)
     a
forall a b. (a -> b) -> a -> b
$
      Full Shape Small Small sh0 sh0 a
-> Full Size Big Big sh0 sh1 a
-> Full Size Big Big sh1 sh0 a
-> Full Shape Small Small sh1 sh1 a
-> UnpackedMatrix
     Arbitrary
     Filled
     Filled
     Shape
     Small
     Small
     (sh0 ::+ sh1)
     (sh0 ::+ sh1)
     a
forall meas vert horiz sizeA sizeB a.
(Measure meas, C vert, C horiz, C sizeA, Eq sizeA, C sizeB,
 Eq sizeB, Floating a) =>
Square sizeA a
-> Full meas vert horiz sizeA sizeB a
-> Full meas horiz vert sizeB sizeA a
-> Square sizeB a
-> Square (sizeA ::+ sizeB) a
Square.stack
         Full Shape Small Small sh0 sh0 a
a                              Full Size Big Big sh0 sh1 a
o
         (Omni Unpacked Arbitrary Filled Filled Size Big Big sh1 sh0
-> Full Size Big Big sh1 sh0 a
forall height width a.
(C height, C width, Floating a) =>
Omni Unpacked Arbitrary Filled Filled Size Big Big height width
-> General height width a
zero (Omni Unpacked Arbitrary Filled Filled Size Big Big sh1 sh0
 -> Full Size Big Big sh1 sh0 a)
-> Omni Unpacked Arbitrary Filled Filled Size Big Big sh1 sh0
-> Full Size Big Big sh1 sh0 a
forall a b. (a -> b) -> a -> b
$ Order
-> Dimension Size sh1 sh0
-> Omni Unpacked Arbitrary Filled Filled Size Big Big sh1 sh0
forall pack property lower upper meas vert horiz height width.
(Cons pack property lower upper meas vert horiz, C height, C width,
 MeasureTarget meas height ~ MeasureTarget meas width) =>
Order
-> Dimension meas height width
-> Omni pack property lower upper meas vert horiz height width
Omni.cons Order
order (sh1, sh0)
Dimension Size sh1 sh0
dims)  Full Shape Small Small sh1 sh1 a
b
   unpack (Lower a0 o0 b0) =
      let a :: Full Shape Small Small sh0 sh0 a
a = Matrix typ0 xl0 xu0 Filled upper Shape Small Small sh0 sh0 a
-> Full Shape Small Small sh0 sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix typ0 xl0 xu0 Filled upper Shape Small Small sh0 sh0 a
a0 in
      let b :: Full Shape Small Small sh1 sh1 a
b = Matrix typ1 xl1 xu1 Filled upper Shape Small Small sh1 sh1 a
-> Full Shape Small Small sh1 sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix typ1 xl1 xu1 Filled upper Shape Small Small sh1 sh1 a
b0 in
      let o :: Full Size Big Big sh1 sh0 a
o = Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Full Size Big Big sh1 sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
o0 in
      let zero :: Omni Unpacked Arbitrary Filled Filled Size Big Big height width
-> General height width a
zero Omni Unpacked Arbitrary Filled Filled Size Big Big height width
shape = Id (General height width a)
forall height width a. Id (General height width a)
Matrix.asGeneral Id (General height width a) -> Id (General height width a)
forall a b. (a -> b) -> a -> b
$ Omni Unpacked Arbitrary Filled Filled Size Big Big height width
-> General height width a
forall property meas vert horiz height width a pack lower upper.
(Homogeneous property, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Omni pack property lower upper meas vert horiz height width
-> ArrayMatrix
     pack property lower upper meas vert horiz height width a
Matrix.zero Omni Unpacked Arbitrary Filled Filled Size Big Big height width
shape in
      let order :: Order
order = Full Shape Small Small sh1 sh1 a -> Order
forall pack property lower upper meas vert horiz height width a.
ArrayMatrix
  pack property lower upper meas vert horiz height width a
-> Order
ArrMatrix.order Full Shape Small Small sh1 sh1 a
b in
      let dims :: (sh0, sh1)
dims = (Full Shape Small Small sh0 sh0 a -> sh0
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Full Shape Small Small sh0 sh0 a
a, Full Shape Small Small sh1 sh1 a -> sh1
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Full Shape Small Small sh1 sh1 a
b) in
      (FullArray Shape Small Small (sh0 ::+ sh1) (sh0 ::+ sh1) a
 -> FullArray Shape Small Small (sh0 ::+ sh1) (sh0 ::+ sh1) a)
-> UnpackedMatrix
     Arbitrary
     Filled
     Filled
     Shape
     Small
     Small
     (sh0 ::+ sh1)
     (sh0 ::+ sh1)
     a
-> UnpackedMatrix
     Arbitrary
     lower
     upper
     Shape
     Small
     Small
     (sh0 ::+ sh1)
     (sh0 ::+ sh1)
     a
forall propertyA lowerA upperA propertyB lowerB upperB measA vertA
       horizA heightA widthA a measB vertB horizB heightB widthB b.
(Property propertyA, Strip lowerA, Strip upperA,
 Property propertyB, Strip lowerB, Strip upperB) =>
(FullArray measA vertA horizA heightA widthA a
 -> FullArray measB vertB horizB heightB widthB b)
-> UnpackedMatrix
     propertyA lowerA upperA measA vertA horizA heightA widthA a
-> UnpackedMatrix
     propertyB lowerB upperB measB vertB horizB heightB widthB b
ArrMatrix.liftUnpacked1 FullArray Shape Small Small (sh0 ::+ sh1) (sh0 ::+ sh1) a
-> FullArray Shape Small Small (sh0 ::+ sh1) (sh0 ::+ sh1) a
forall a. a -> a
id (UnpackedMatrix
   Arbitrary
   Filled
   Filled
   Shape
   Small
   Small
   (sh0 ::+ sh1)
   (sh0 ::+ sh1)
   a
 -> UnpackedMatrix
      Arbitrary
      lower
      upper
      Shape
      Small
      Small
      (sh0 ::+ sh1)
      (sh0 ::+ sh1)
      a)
-> UnpackedMatrix
     Arbitrary
     Filled
     Filled
     Shape
     Small
     Small
     (sh0 ::+ sh1)
     (sh0 ::+ sh1)
     a
-> UnpackedMatrix
     Arbitrary
     lower
     upper
     Shape
     Small
     Small
     (sh0 ::+ sh1)
     (sh0 ::+ sh1)
     a
forall a b. (a -> b) -> a -> b
$
      Full Shape Small Small sh0 sh0 a
-> Full Size Big Big sh0 sh1 a
-> Full Size Big Big sh1 sh0 a
-> Full Shape Small Small sh1 sh1 a
-> UnpackedMatrix
     Arbitrary
     Filled
     Filled
     Shape
     Small
     Small
     (sh0 ::+ sh1)
     (sh0 ::+ sh1)
     a
forall meas vert horiz sizeA sizeB a.
(Measure meas, C vert, C horiz, C sizeA, Eq sizeA, C sizeB,
 Eq sizeB, Floating a) =>
Square sizeA a
-> Full meas vert horiz sizeA sizeB a
-> Full meas horiz vert sizeB sizeA a
-> Square sizeB a
-> Square (sizeA ::+ sizeB) a
Square.stack
         Full Shape Small Small sh0 sh0 a
a  (Omni Unpacked Arbitrary Filled Filled Size Big Big sh0 sh1
-> Full Size Big Big sh0 sh1 a
forall height width a.
(C height, C width, Floating a) =>
Omni Unpacked Arbitrary Filled Filled Size Big Big height width
-> General height width a
zero (Omni Unpacked Arbitrary Filled Filled Size Big Big sh0 sh1
 -> Full Size Big Big sh0 sh1 a)
-> Omni Unpacked Arbitrary Filled Filled Size Big Big sh0 sh1
-> Full Size Big Big sh0 sh1 a
forall a b. (a -> b) -> a -> b
$ Order
-> Dimension Size sh0 sh1
-> Omni Unpacked Arbitrary Filled Filled Size Big Big sh0 sh1
forall pack property lower upper meas vert horiz height width.
(Cons pack property lower upper meas vert horiz, C height, C width,
 MeasureTarget meas height ~ MeasureTarget meas width) =>
Order
-> Dimension meas height width
-> Omni pack property lower upper meas vert horiz height width
Omni.cons Order
order (sh0, sh1)
Dimension Size sh0 sh1
dims)
         Full Size Big Big sh1 sh0 a
o  Full Shape Small Small sh1 sh1 a
b

instance
   (Matrix.Homogeneous typ0, Matrix.Homogeneous typOff,
    Matrix.Homogeneous typ1) =>
      Matrix.Homogeneous (Triangular typ0 typOff typ1) where
   type HomogeneousExtra (Triangular typ0 typOff typ1) extra =
         (Matrix.HomogeneousExtra typ0 (Triangular0 extra),
          Matrix.HomogeneousExtra typ1 (Triangular1 extra),
          Matrix.HomogeneousExtra typOff (TriangularOff extra))
   zeroFrom :: Matrix
  (Triangular typ0 typOff typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Triangular typ0 typOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
zeroFrom (Upper a o b) =
      Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
Upper (Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Quadratic typ0 xl0 xu0 lower Filled sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.zeroFrom Quadratic typ0 xl0 xu0 lower Filled sh0 a
a) (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.zeroFrom Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o) (Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.zeroFrom Quadratic typ1 xl1 xu1 lower Filled sh1 a
b)
   zeroFrom (Lower a o b) =
      Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 upper a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
Lower (Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Quadratic typ0 xl0 xu0 Filled upper sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.zeroFrom Quadratic typ0 xl0 xu0 Filled upper sh0 a
a) (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.zeroFrom Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
o) (Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.zeroFrom Quadratic typ1 xl1 xu1 Filled upper sh1 a
b)
   negate :: Matrix
  (Triangular typ0 typOff typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Triangular typ0 typOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
negate (Upper a o b) =
      Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
Upper (Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Quadratic typ0 xl0 xu0 lower Filled sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate Quadratic typ0 xl0 xu0 lower Filled sh0 a
a) (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o) (Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate Quadratic typ1 xl1 xu1 lower Filled sh1 a
b)
   negate (Lower a o b) =
      Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 upper a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
Lower (Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Quadratic typ0 xl0 xu0 Filled upper sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate Quadratic typ0 xl0 xu0 Filled upper sh0 a
a) (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
o) (Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate Quadratic typ1 xl1 xu1 Filled upper sh1 a
b)
   scaleReal :: RealOf a
-> Matrix
     (Triangular typ0 typOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Triangular typ0 typOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
scaleReal RealOf a
k (Upper a o b) =
      Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
Upper (RealOf a
-> Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Quadratic typ0 xl0 xu0 lower Filled sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
RealOf a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scaleReal RealOf a
k Quadratic typ0 xl0 xu0 lower Filled sh0 a
a) (RealOf a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
RealOf a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scaleReal RealOf a
k Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o) (RealOf a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
RealOf a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scaleReal RealOf a
k Quadratic typ1 xl1 xu1 lower Filled sh1 a
b)
   scaleReal RealOf a
k (Lower a o b) =
      Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 upper a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
Lower (RealOf a
-> Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Quadratic typ0 xl0 xu0 Filled upper sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
RealOf a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scaleReal RealOf a
k Quadratic typ0 xl0 xu0 Filled upper sh0 a
a) (RealOf a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
RealOf a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scaleReal RealOf a
k Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
o) (RealOf a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
RealOf a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scaleReal RealOf a
k Quadratic typ1 xl1 xu1 Filled upper sh1 a
b)

instance
   (Matrix.Scale typ0, Matrix.Scale typOff, Matrix.Scale typ1) =>
      Matrix.Scale (Triangular typ0 typOff typ1) where
   type ScaleExtra (Triangular typ0 typOff typ1) extra =
         (Matrix.ScaleExtra typ0 (Triangular0 extra),
          Matrix.ScaleExtra typ1 (Triangular1 extra),
          Matrix.ScaleExtra typOff (TriangularOff extra))
   scale :: a
-> Matrix
     (Triangular typ0 typOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Triangular typ0 typOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
scale a
k (Upper a o b) =
      Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
Upper (a
-> Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Quadratic typ0 xl0 xu0 lower Filled sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Scale typ, ScaleExtra typ xl, ScaleExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scale a
k Quadratic typ0 xl0 xu0 lower Filled sh0 a
a) (a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Scale typ, ScaleExtra typ xl, ScaleExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scale a
k Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o) (a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Scale typ, ScaleExtra typ xl, ScaleExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scale a
k Quadratic typ1 xl1 xu1 lower Filled sh1 a
b)
   scale a
k (Lower a o b) =
      Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 upper a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
Lower (a
-> Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Quadratic typ0 xl0 xu0 Filled upper sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Scale typ, ScaleExtra typ xl, ScaleExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scale a
k Quadratic typ0 xl0 xu0 Filled upper sh0 a
a) (a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Scale typ, ScaleExtra typ xl, ScaleExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scale a
k Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
o) (a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Scale typ, ScaleExtra typ xl, ScaleExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scale a
k Quadratic typ1 xl1 xu1 Filled upper sh1 a
b)

instance
   (Matrix.Additive typ0, Matrix.Additive typOff, Matrix.Additive typ1) =>
      Matrix.Additive (Triangular typ0 typOff typ1) where
   type AdditiveExtra (Triangular typ0 typOff typ1) extra =
         (Matrix.AdditiveExtra typ0 (Triangular0 extra),
          Matrix.AdditiveExtra typ1 (Triangular1 extra),
          Matrix.AdditiveExtra typOff (TriangularOff extra))
   add :: Matrix
  (Triangular typ0 typOff typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Triangular typ0 typOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Triangular typ0 typOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
add (Upper a0 o0 b0) (Upper a1 o1 b1) =
      Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
Upper (Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Quadratic typ0 xl0 xu0 lower Filled sh0 a
forall typ meas vert horiz xl xu height width a lower upper.
(Additive typ, Measure meas, C vert, C horiz, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.add Quadratic typ0 xl0 xu0 lower Filled sh0 a
a0 Quadratic typ0 xl0 xu0 lower Filled sh0 a
Quadratic typ0 xl0 xu0 lower Filled sh0 a
a1) (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
forall typ meas vert horiz xl xu height width a lower upper.
(Additive typ, Measure meas, C vert, C horiz, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.add Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o0 Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o1) (Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
forall typ meas vert horiz xl xu height width a lower upper.
(Additive typ, Measure meas, C vert, C horiz, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.add Quadratic typ1 xl1 xu1 lower Filled sh1 a
b0 Quadratic typ1 xl1 xu1 lower Filled sh1 a
Quadratic typ1 xl1 xu1 lower Filled sh1 a
b1)
   add (Lower a0 o0 b0) (Lower a1 o1 b1) =
      Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 upper a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
Lower (Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Quadratic typ0 xl0 xu0 Filled upper sh0 a
forall typ meas vert horiz xl xu height width a lower upper.
(Additive typ, Measure meas, C vert, C horiz, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.add Quadratic typ0 xl0 xu0 Filled upper sh0 a
a0 Quadratic typ0 xl0 xu0 Filled upper sh0 a
Quadratic typ0 xl0 xu0 Filled upper sh0 a
a1) (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
forall typ meas vert horiz xl xu height width a lower upper.
(Additive typ, Measure meas, C vert, C horiz, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.add Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
o0 Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
o1) (Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
forall typ meas vert horiz xl xu height width a lower upper.
(Additive typ, Measure meas, C vert, C horiz, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.add Quadratic typ1 xl1 xu1 Filled upper sh1 a
b0 Quadratic typ1 xl1 xu1 Filled upper sh1 a
Quadratic typ1 xl1 xu1 Filled upper sh1 a
b1)

instance
   (Matrix.Subtractive typ0, Matrix.Subtractive typOff,
    Matrix.Subtractive typ1) =>
      Matrix.Subtractive (Triangular typ0 typOff typ1) where
   type SubtractiveExtra (Triangular typ0 typOff typ1) extra =
         (Matrix.SubtractiveExtra typ0 (Triangular0 extra),
          Matrix.SubtractiveExtra typ1 (Triangular1 extra),
          Matrix.SubtractiveExtra typOff (TriangularOff extra))
   sub :: Matrix
  (Triangular typ0 typOff typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Triangular typ0 typOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Triangular typ0 typOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
sub (Upper a0 o0 b0) (Upper a1 o1 b1) =
      Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
Upper (Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Quadratic typ0 xl0 xu0 lower Filled sh0 a
forall typ meas vert horiz xl xu height width a lower upper.
(Subtractive typ, Measure meas, C vert, C horiz,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.sub Quadratic typ0 xl0 xu0 lower Filled sh0 a
a0 Quadratic typ0 xl0 xu0 lower Filled sh0 a
Quadratic typ0 xl0 xu0 lower Filled sh0 a
a1) (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
forall typ meas vert horiz xl xu height width a lower upper.
(Subtractive typ, Measure meas, C vert, C horiz,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.sub Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o0 Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o1) (Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
forall typ meas vert horiz xl xu height width a lower upper.
(Subtractive typ, Measure meas, C vert, C horiz,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.sub Quadratic typ1 xl1 xu1 lower Filled sh1 a
b0 Quadratic typ1 xl1 xu1 lower Filled sh1 a
Quadratic typ1 xl1 xu1 lower Filled sh1 a
b1)
   sub (Lower a0 o0 b0) (Lower a1 o1 b1) =
      Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 upper a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
Lower (Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Quadratic typ0 xl0 xu0 Filled upper sh0 a
forall typ meas vert horiz xl xu height width a lower upper.
(Subtractive typ, Measure meas, C vert, C horiz,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.sub Quadratic typ0 xl0 xu0 Filled upper sh0 a
a0 Quadratic typ0 xl0 xu0 Filled upper sh0 a
Quadratic typ0 xl0 xu0 Filled upper sh0 a
a1) (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
forall typ meas vert horiz xl xu height width a lower upper.
(Subtractive typ, Measure meas, C vert, C horiz,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.sub Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
o0 Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
o1) (Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
forall typ meas vert horiz xl xu height width a lower upper.
(Subtractive typ, Measure meas, C vert, C horiz,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.sub Quadratic typ1 xl1 xu1 Filled upper sh1 a
b0 Quadratic typ1 xl1 xu1 Filled upper sh1 a
Quadratic typ1 xl1 xu1 Filled upper sh1 a
b1)

instance
   (Multiply.MultiplyVector typ0, Multiply.MultiplyVector typ1,
    Multiply.MultiplyVector typOff) =>
      Multiply.MultiplyVector (Triangular typ0 typOff typ1) where
   type MultiplyVectorExtra (Triangular typ0 typOff typ1) extra =
         (Multiply.MultiplyVectorExtra typ0 (Triangular0 extra),
          Multiply.MultiplyVectorExtra typ1 (Triangular1 extra),
          Multiply.MultiplyVectorExtra typOff (TriangularOff extra))
   matrixVector :: Matrix
  (Triangular typ0 typOff typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Vector width a -> Vector height a
matrixVector (Upper a o b) Vector width a
x =
      let (Array sh0 a
x0,Array sh1 a
x1) = Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
forall sh0 sh1 a.
(C sh0, C sh1, Storable a) =>
Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
Array.split Vector width a
Array (sh0 ::+ sh1) a
x
      in Array sh0 a -> Array sh1 a -> Array (sh0 ::+ sh1) a
forall shx shy a.
(C shx, C shy, Storable a) =>
Array shx a -> Array shy a -> Array (shx ::+ shy) a
Array.append
            (Matrix typ0 xl0 xu0 lower Filled Shape Small Small sh0 sh0 a
-> Array sh0 a -> Array sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typ0 xl0 xu0 lower Filled Shape Small Small sh0 sh0 a
a Array sh0 a
x0 Array sh0 a -> Array sh0 a -> Array sh0 a
forall sh a.
(C sh, Eq sh, Floating a) =>
Vector sh a -> Vector sh a -> Vector sh a
|+| Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Array sh1 a -> Array sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o Array sh1 a
x1)
            (Matrix typ1 xl1 xu1 lower Filled Shape Small Small sh1 sh1 a
-> Array sh1 a -> Array sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typ1 xl1 xu1 lower Filled Shape Small Small sh1 sh1 a
b Array sh1 a
x1)
   matrixVector (Lower a o b) Vector width a
x =
      let (Array sh0 a
x0,Array sh1 a
x1) = Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
forall sh0 sh1 a.
(C sh0, C sh1, Storable a) =>
Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
Array.split Vector width a
Array (sh0 ::+ sh1) a
x
      in Array sh0 a -> Array sh1 a -> Array (sh0 ::+ sh1) a
forall shx shy a.
(C shx, C shy, Storable a) =>
Array shx a -> Array shy a -> Array (shx ::+ shy) a
Array.append
            (Matrix typ0 xl0 xu0 Filled upper Shape Small Small sh0 sh0 a
-> Array sh0 a -> Array sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typ0 xl0 xu0 Filled upper Shape Small Small sh0 sh0 a
a Array sh0 a
x0)
            (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Array sh0 a -> Array sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
o Array sh0 a
x0 Array sh1 a -> Array sh1 a -> Array sh1 a
forall sh a.
(C sh, Eq sh, Floating a) =>
Vector sh a -> Vector sh a -> Vector sh a
|+| Matrix typ1 xl1 xu1 Filled upper Shape Small Small sh1 sh1 a
-> Array sh1 a -> Array sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typ1 xl1 xu1 Filled upper Shape Small Small sh1 sh1 a
b Array sh1 a
x1)
   vectorMatrix :: Vector height a
-> Matrix
     (Triangular typ0 typOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Vector width a
vectorMatrix Vector height a
x (Upper a o b) =
      let (Array sh0 a
x0,Array sh1 a
x1) = Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
forall sh0 sh1 a.
(C sh0, C sh1, Storable a) =>
Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
Array.split Vector height a
Array (sh0 ::+ sh1) a
x
      in Array sh0 a -> Array sh1 a -> Array (sh0 ::+ sh1) a
forall shx shy a.
(C shx, C shy, Storable a) =>
Array shx a -> Array shy a -> Array (shx ::+ shy) a
Array.append
            (Array sh0 a
-> Matrix typ0 xl0 xu0 lower Filled Shape Small Small sh0 sh0 a
-> Array sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Array sh0 a
x0 Matrix typ0 xl0 xu0 lower Filled Shape Small Small sh0 sh0 a
a)
            (Array sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Array sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Array sh0 a
x0 Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o Array sh1 a -> Array sh1 a -> Array sh1 a
forall sh a.
(C sh, Eq sh, Floating a) =>
Vector sh a -> Vector sh a -> Vector sh a
|+| Array sh1 a
-> Matrix typ1 xl1 xu1 lower Filled Shape Small Small sh1 sh1 a
-> Array sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Array sh1 a
x1 Matrix typ1 xl1 xu1 lower Filled Shape Small Small sh1 sh1 a
b)
   vectorMatrix Vector height a
x (Lower a o b) =
      let (Array sh0 a
x0,Array sh1 a
x1) = Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
forall sh0 sh1 a.
(C sh0, C sh1, Storable a) =>
Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
Array.split Vector height a
Array (sh0 ::+ sh1) a
x
      in Array sh0 a -> Array sh1 a -> Array (sh0 ::+ sh1) a
forall shx shy a.
(C shx, C shy, Storable a) =>
Array shx a -> Array shy a -> Array (shx ::+ shy) a
Array.append
            (Array sh0 a
-> Matrix typ0 xl0 xu0 Filled upper Shape Small Small sh0 sh0 a
-> Array sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Array sh0 a
x0 Matrix typ0 xl0 xu0 Filled upper Shape Small Small sh0 sh0 a
a Array sh0 a -> Array sh0 a -> Array sh0 a
forall sh a.
(C sh, Eq sh, Floating a) =>
Vector sh a -> Vector sh a -> Vector sh a
|+| Array sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Array sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Array sh1 a
x1 Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
o)
            (Array sh1 a
-> Matrix typ1 xl1 xu1 Filled upper Shape Small Small sh1 sh1 a
-> Array sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Array sh1 a
x1 Matrix typ1 xl1 xu1 Filled upper Shape Small Small sh1 sh1 a
b)

instance
   (Multiply.MultiplySquare typ0, Multiply.MultiplySquare typ1,
    typOff ~ TypeFull) =>
      Multiply.MultiplySquare (Triangular typ0 typOff typ1) where
   type MultiplySquareExtra (Triangular typ0 typOff typ1) extra =
         (Matrix.MultiplySquareExtra typ0 (Triangular0 extra),
          Matrix.MultiplySquareExtra typ1 (Triangular1 extra),
          TriangularOff extra ~ ())

   squareFull :: Quadratic (Triangular typ0 typOff typ1) xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
squareFull (Upper a o b) =
      (AboveGeneral sh0 sh1 (Unchecked width) a
 -> AboveGeneral sh0 sh1 (Unchecked width) a)
-> Full meas vert horiz (sh0 ::+ sh1) width a
-> Full meas vert horiz (sh0 ::+ sh1) width a
forall meas vert horiz height0 height1 width a.
(Measure meas, C vert, C horiz, C height0, C height1, C width,
 Floating a) =>
(AboveGeneral height0 height1 (Unchecked width) a
 -> AboveGeneral height0 height1 (Unchecked width) a)
-> Full meas vert horiz (height0 ::+ height1) width a
-> Full meas vert horiz (height0 ::+ height1) width a
withVerticalSplit ((AboveGeneral sh0 sh1 (Unchecked width) a
  -> AboveGeneral sh0 sh1 (Unchecked width) a)
 -> Full meas vert horiz (sh0 ::+ sh1) width a
 -> Full meas vert horiz (sh0 ::+ sh1) width a)
-> (AboveGeneral sh0 sh1 (Unchecked width) a
    -> AboveGeneral sh0 sh1 (Unchecked width) a)
-> Full meas vert horiz (sh0 ::+ sh1) width a
-> Full meas vert horiz (sh0 ::+ sh1) width a
forall a b. (a -> b) -> a -> b
$ \(Above top bottom) ->
         Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> AboveGeneral sh0 sh1 (Unchecked width) a
forall sh0 sh1 width typ0 xl0 xu0 horiz a typ1 xl1 xu1.
(C sh0, C sh1, Eq width) =>
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
Above
            (Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, Eq height, C width, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Multiply.squareFull Quadratic typ0 xl0 xu0 lower Filled sh0 a
a Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
top Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
oMatrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     xl1
     xu1
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*#Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
bottom)
            (Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, Eq height, C width, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Multiply.squareFull Quadratic typ1 xl1 xu1 lower Filled sh1 a
b Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
bottom)
   squareFull (Lower a o b) =
      (AboveGeneral sh0 sh1 (Unchecked width) a
 -> AboveGeneral sh0 sh1 (Unchecked width) a)
-> Full meas vert horiz (sh0 ::+ sh1) width a
-> Full meas vert horiz (sh0 ::+ sh1) width a
forall meas vert horiz height0 height1 width a.
(Measure meas, C vert, C horiz, C height0, C height1, C width,
 Floating a) =>
(AboveGeneral height0 height1 (Unchecked width) a
 -> AboveGeneral height0 height1 (Unchecked width) a)
-> Full meas vert horiz (height0 ::+ height1) width a
-> Full meas vert horiz (height0 ::+ height1) width a
withVerticalSplit ((AboveGeneral sh0 sh1 (Unchecked width) a
  -> AboveGeneral sh0 sh1 (Unchecked width) a)
 -> Full meas vert horiz (sh0 ::+ sh1) width a
 -> Full meas vert horiz (sh0 ::+ sh1) width a)
-> (AboveGeneral sh0 sh1 (Unchecked width) a
    -> AboveGeneral sh0 sh1 (Unchecked width) a)
-> Full meas vert horiz (sh0 ::+ sh1) width a
-> Full meas vert horiz (sh0 ::+ sh1) width a
forall a b. (a -> b) -> a -> b
$ \(Above top bottom) ->
         Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> AboveGeneral sh0 sh1 (Unchecked width) a
forall sh0 sh1 width typ0 xl0 xu0 horiz a typ1 xl1 xu1.
(C sh0, C sh1, Eq width) =>
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
Above
            (Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, Eq height, C width, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Multiply.squareFull Quadratic typ0 xl0 xu0 Filled upper sh0 a
a Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
top)
            (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
oMatrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*#Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
top Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, Eq height, C width, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Multiply.squareFull Quadratic typ1 xl1 xu1 Filled upper sh1 a
b Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
bottom)
   fullSquare :: Full meas vert horiz height width a
-> Quadratic
     (Triangular typ0 typOff typ1) xl xu lower upper width a
-> Full meas vert horiz height width a
fullSquare Full meas vert horiz height width a
x (Lower a o b) =
      Full meas vert horiz height (sh0 ::+ sh1) a
-> (BesideGeneral (Unchecked height) sh0 sh1 a
    -> BesideGeneral (Unchecked height) sh0 sh1 a)
-> Full meas vert horiz height (sh0 ::+ sh1) a
forall meas vert horiz height width0 width1 a.
(Measure meas, C vert, C horiz, C height, C width0, C width1,
 Floating a) =>
Full meas vert horiz height (width0 ::+ width1) a
-> (BesideGeneral (Unchecked height) width0 width1 a
    -> BesideGeneral (Unchecked height) width0 width1 a)
-> Full meas vert horiz height (width0 ::+ width1) a
withHorizontalSplit Full meas vert horiz height width a
Full meas vert horiz height (sh0 ::+ sh1) a
x ((BesideGeneral (Unchecked height) sh0 sh1 a
  -> BesideGeneral (Unchecked height) sh0 sh1 a)
 -> Full meas vert horiz height (sh0 ::+ sh1) a)
-> (BesideGeneral (Unchecked height) sh0 sh1 a
    -> BesideGeneral (Unchecked height) sh0 sh1 a)
-> Full meas vert horiz height (sh0 ::+ sh1) a
forall a b. (a -> b) -> a -> b
$ \(Beside left right) ->
         Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
-> BesideGeneral (Unchecked height) sh0 sh1 a
forall sh0 sh1 height typ0 xl0 xu0 vert a typ1 xl1 xu1.
(C sh0, C sh1, Eq height) =>
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
Beside
            (Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Multiply.fullSquare Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
left Quadratic typ0 xl0 xu0 Filled upper sh0 a
a Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
rightMatrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*#Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
o)
            (Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Multiply.fullSquare Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
right Quadratic typ1 xl1 xu1 Filled upper sh1 a
b)
   fullSquare Full meas vert horiz height width a
x (Upper a o b) =
      Full meas vert horiz height (sh0 ::+ sh1) a
-> (BesideGeneral (Unchecked height) sh0 sh1 a
    -> BesideGeneral (Unchecked height) sh0 sh1 a)
-> Full meas vert horiz height (sh0 ::+ sh1) a
forall meas vert horiz height width0 width1 a.
(Measure meas, C vert, C horiz, C height, C width0, C width1,
 Floating a) =>
Full meas vert horiz height (width0 ::+ width1) a
-> (BesideGeneral (Unchecked height) width0 width1 a
    -> BesideGeneral (Unchecked height) width0 width1 a)
-> Full meas vert horiz height (width0 ::+ width1) a
withHorizontalSplit Full meas vert horiz height width a
Full meas vert horiz height (sh0 ::+ sh1) a
x ((BesideGeneral (Unchecked height) sh0 sh1 a
  -> BesideGeneral (Unchecked height) sh0 sh1 a)
 -> Full meas vert horiz height (sh0 ::+ sh1) a)
-> (BesideGeneral (Unchecked height) sh0 sh1 a
    -> BesideGeneral (Unchecked height) sh0 sh1 a)
-> Full meas vert horiz height (sh0 ::+ sh1) a
forall a b. (a -> b) -> a -> b
$ \(Beside left right) ->
         Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
-> BesideGeneral (Unchecked height) sh0 sh1 a
forall sh0 sh1 height typ0 xl0 xu0 vert a typ1 xl1 xu1.
(C sh0, C sh1, Eq height) =>
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
Beside
            (Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Multiply.fullSquare Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
left Quadratic typ0 xl0 xu0 lower Filled sh0 a
a)
            (Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
leftMatrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*#Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Multiply.fullSquare Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
right Quadratic typ1 xl1 xu1 lower Filled sh1 a
b)

instance
   (typ0 ~ TypeFull, typOff ~ TypeFull, typ1 ~ TypeFull) =>
      Matrix.MultiplySame (Triangular typ0 typOff typ1) where
   type MultiplySameExtra (Triangular typ0 typOff typ1) extra =
         (Triangular0 extra ~ (), Triangular1 extra ~ (),
          TriangularOff extra ~ ())
   multiplySame :: matrix -> matrix -> matrix
multiplySame (Upper a0 b0 c0) (Upper a1 b1 c1) =
      case Omni Unpacked Arbitrary lower Filled Shape Small Small sh0 sh0
-> (PowerStripSingleton lower, PowerStripSingleton Filled)
forall lower upper pack property meas vert horiz height width.
(PowerStrip lower, PowerStrip upper) =>
Omni pack property lower upper meas vert horiz height width
-> (PowerStripSingleton lower, PowerStripSingleton upper)
Omni.powerStrips (Omni Unpacked Arbitrary lower Filled Shape Small Small sh0 sh0
 -> (PowerStripSingleton lower, PowerStripSingleton Filled))
-> Omni Unpacked Arbitrary lower Filled Shape Small Small sh0 sh0
-> (PowerStripSingleton lower, PowerStripSingleton Filled)
forall a b. (a -> b) -> a -> b
$ ArrayMatrix
  Unpacked Arbitrary lower Filled Shape Small Small sh0 sh0 a
-> Omni Unpacked Arbitrary lower Filled Shape Small Small sh0 sh0
forall pack property lower upper meas vert horiz height width a.
ArrayMatrix
  pack property lower upper meas vert horiz height width a
-> Omni pack property lower upper meas vert horiz height width
ArrMatrix.shape Quadratic (Array Unpacked Arbitrary) xl0 xu0 lower Filled sh0 a
ArrayMatrix
  Unpacked Arbitrary lower Filled Shape Small Small sh0 sh0 a
a0 of
         (PowerStripSingleton lower
Omni.Empty,  PowerStripSingleton Filled
_) -> Quadratic (Array Unpacked Arbitrary) () () (Bands U0) Filled sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
-> Quadratic
     (Array Unpacked Arbitrary) () () (Bands U0) Filled sh1 a
-> Quadratic
     (Triangular
        (Array Unpacked Arbitrary)
        (Array Unpacked Arbitrary)
        (Array Unpacked Arbitrary))
     ((), (), (), False)
     ((), (), (), True)
     (Bands U0)
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
Upper (Quadratic (Array Unpacked Arbitrary) xl0 xu0 lower Filled sh0 a
a0Quadratic (Array Unpacked Arbitrary) xl0 xu0 lower Filled sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     lower
     Filled
     Shape
     Small
     Small
     sh0
     sh0
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     (Bands U0)
     Filled
     Shape
     Small
     Small
     sh0
     sh0
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*#Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  lower
  Filled
  Shape
  Small
  Small
  sh0
  sh0
  a
Quadratic (Array Unpacked Arbitrary) xl0 xu0 lower Filled sh0 a
a1) (Quadratic (Array Unpacked Arbitrary) xl0 xu0 lower Filled sh0 a
a0Quadratic (Array Unpacked Arbitrary) xl0 xu0 lower Filled sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
forall typ xl xu lowerA upperA lowerB upperB lowerC upperC measA
       measB measC vert horiz height fuse width a.
(MultiplySquare typ, ToQuadratic typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, BoxExtra typ xl, BoxExtra typ xu,
 Strip lowerA, Strip upperA, Strip lowerB, Strip upperB,
 Strip lowerC, Strip upperC, MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA,
 Measure measB, Measure measC, MultiplyMeasure measA measB ~ measC,
 C vert, C horiz, C height, C fuse, Eq fuse, C width, Floating a) =>
QuadraticMeas typ xl xu lowerA upperA measA height fuse a
-> Unpacked lowerB upperB measB vert horiz fuse width a
-> Unpacked lowerC upperC measC vert horiz height width a
#*##Matrix
  (Array Unpacked Arbitrary)
  xlOff
  xuOff
  Filled
  Filled
  Size
  Big
  Big
  sh0
  sh1
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  sh1
  a
b1 Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  sh1
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Matrix
  (Array Unpacked Arbitrary)
  xlOff
  xuOff
  Filled
  Filled
  Size
  Big
  Big
  sh0
  sh1
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  sh1
  a
b0Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  sh1
  a
-> QuadraticMeas
     (Array Unpacked Arbitrary) xl1 xu1 lower Filled Shape sh1 sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
forall typ xl xu lowerA upperA lowerB upperB lowerC upperC measA
       measB measC vert horiz height fuse width a.
(MultiplySquare typ, ToQuadratic typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, BoxExtra typ xl, BoxExtra typ xu,
 Strip lowerA, Strip upperA, Strip lowerB, Strip upperB,
 Strip lowerC, Strip upperC, MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA,
 Measure measB, Measure measC, MultiplyMeasure measA measB ~ measC,
 C vert, C horiz, C height, C fuse, Eq fuse, C width, Floating a) =>
Unpacked lowerB upperB measB vert horiz height fuse a
-> QuadraticMeas typ xl xu lowerA upperA measA fuse width a
-> Unpacked lowerC upperC measC vert horiz height width a
##*#QuadraticMeas
  (Array Unpacked Arbitrary) xl1 xu1 lower Filled Shape sh1 sh1 a
Quadratic (Array Unpacked Arbitrary) xl1 xu1 lower Filled sh1 a
c1) (Quadratic (Array Unpacked Arbitrary) xl1 xu1 lower Filled sh1 a
c0Quadratic (Array Unpacked Arbitrary) xl1 xu1 lower Filled sh1 a
-> QuadraticMeas
     (Array Unpacked Arbitrary) xl1 xu1 lower Filled Shape sh1 sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     (Bands U0)
     Filled
     Shape
     Small
     Small
     sh1
     sh1
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*#QuadraticMeas
  (Array Unpacked Arbitrary) xl1 xu1 lower Filled Shape sh1 sh1 a
Quadratic (Array Unpacked Arbitrary) xl1 xu1 lower Filled sh1 a
c1)
         (PowerStripSingleton lower
Omni.Filled, PowerStripSingleton Filled
_) -> Quadratic (Array Unpacked Arbitrary) () () Filled Filled sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
-> Quadratic (Array Unpacked Arbitrary) () () Filled Filled sh1 a
-> Quadratic
     (Triangular
        (Array Unpacked Arbitrary)
        (Array Unpacked Arbitrary)
        (Array Unpacked Arbitrary))
     ((), (), (), False)
     ((), (), (), True)
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
Upper (Quadratic (Array Unpacked Arbitrary) xl0 xu0 lower Filled sh0 a
a0Quadratic (Array Unpacked Arbitrary) xl0 xu0 lower Filled sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     lower
     Filled
     Shape
     Small
     Small
     sh0
     sh0
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Shape
     Small
     Small
     sh0
     sh0
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*#Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  lower
  Filled
  Shape
  Small
  Small
  sh0
  sh0
  a
Quadratic (Array Unpacked Arbitrary) xl0 xu0 lower Filled sh0 a
a1) (Quadratic (Array Unpacked Arbitrary) xl0 xu0 lower Filled sh0 a
a0Quadratic (Array Unpacked Arbitrary) xl0 xu0 lower Filled sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
forall typ xl xu lowerA upperA lowerB upperB lowerC upperC measA
       measB measC vert horiz height fuse width a.
(MultiplySquare typ, ToQuadratic typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, BoxExtra typ xl, BoxExtra typ xu,
 Strip lowerA, Strip upperA, Strip lowerB, Strip upperB,
 Strip lowerC, Strip upperC, MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA,
 Measure measB, Measure measC, MultiplyMeasure measA measB ~ measC,
 C vert, C horiz, C height, C fuse, Eq fuse, C width, Floating a) =>
QuadraticMeas typ xl xu lowerA upperA measA height fuse a
-> Unpacked lowerB upperB measB vert horiz fuse width a
-> Unpacked lowerC upperC measC vert horiz height width a
#*##Matrix
  (Array Unpacked Arbitrary)
  xlOff
  xuOff
  Filled
  Filled
  Size
  Big
  Big
  sh0
  sh1
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  sh1
  a
b1 Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  sh1
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Matrix
  (Array Unpacked Arbitrary)
  xlOff
  xuOff
  Filled
  Filled
  Size
  Big
  Big
  sh0
  sh1
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  sh1
  a
b0Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  sh1
  a
-> QuadraticMeas
     (Array Unpacked Arbitrary) xl1 xu1 lower Filled Shape sh1 sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
forall typ xl xu lowerA upperA lowerB upperB lowerC upperC measA
       measB measC vert horiz height fuse width a.
(MultiplySquare typ, ToQuadratic typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, BoxExtra typ xl, BoxExtra typ xu,
 Strip lowerA, Strip upperA, Strip lowerB, Strip upperB,
 Strip lowerC, Strip upperC, MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA,
 Measure measB, Measure measC, MultiplyMeasure measA measB ~ measC,
 C vert, C horiz, C height, C fuse, Eq fuse, C width, Floating a) =>
Unpacked lowerB upperB measB vert horiz height fuse a
-> QuadraticMeas typ xl xu lowerA upperA measA fuse width a
-> Unpacked lowerC upperC measC vert horiz height width a
##*#QuadraticMeas
  (Array Unpacked Arbitrary) xl1 xu1 lower Filled Shape sh1 sh1 a
Quadratic (Array Unpacked Arbitrary) xl1 xu1 lower Filled sh1 a
c1) (Quadratic (Array Unpacked Arbitrary) xl1 xu1 lower Filled sh1 a
c0Quadratic (Array Unpacked Arbitrary) xl1 xu1 lower Filled sh1 a
-> QuadraticMeas
     (Array Unpacked Arbitrary) xl1 xu1 lower Filled Shape sh1 sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Shape
     Small
     Small
     sh1
     sh1
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*#QuadraticMeas
  (Array Unpacked Arbitrary) xl1 xu1 lower Filled Shape sh1 sh1 a
Quadratic (Array Unpacked Arbitrary) xl1 xu1 lower Filled sh1 a
c1)
   multiplySame (Lower a0 b0 c0) (Lower a1 b1 c1) =
      case Omni Unpacked Arbitrary Filled upper Shape Small Small sh0 sh0
-> (PowerStripSingleton Filled, PowerStripSingleton upper)
forall lower upper pack property meas vert horiz height width.
(PowerStrip lower, PowerStrip upper) =>
Omni pack property lower upper meas vert horiz height width
-> (PowerStripSingleton lower, PowerStripSingleton upper)
Omni.powerStrips (Omni Unpacked Arbitrary Filled upper Shape Small Small sh0 sh0
 -> (PowerStripSingleton Filled, PowerStripSingleton upper))
-> Omni Unpacked Arbitrary Filled upper Shape Small Small sh0 sh0
-> (PowerStripSingleton Filled, PowerStripSingleton upper)
forall a b. (a -> b) -> a -> b
$ ArrayMatrix
  Unpacked Arbitrary Filled upper Shape Small Small sh0 sh0 a
-> Omni Unpacked Arbitrary Filled upper Shape Small Small sh0 sh0
forall pack property lower upper meas vert horiz height width a.
ArrayMatrix
  pack property lower upper meas vert horiz height width a
-> Omni pack property lower upper meas vert horiz height width
ArrMatrix.shape Quadratic (Array Unpacked Arbitrary) xl0 xu0 Filled upper sh0 a
ArrayMatrix
  Unpacked Arbitrary Filled upper Shape Small Small sh0 sh0 a
a0 of
         (PowerStripSingleton Filled
_, PowerStripSingleton upper
Omni.Empty ) -> Quadratic (Array Unpacked Arbitrary) () () Filled (Bands U0) sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     sh0
     a
-> Quadratic
     (Array Unpacked Arbitrary) () () Filled (Bands U0) sh1 a
-> Quadratic
     (Triangular
        (Array Unpacked Arbitrary)
        (Array Unpacked Arbitrary)
        (Array Unpacked Arbitrary))
     ((), (), (), True)
     ((), (), (), False)
     Filled
     (Bands U0)
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 upper a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
Lower (Quadratic (Array Unpacked Arbitrary) xl0 xu0 Filled upper sh0 a
a0Quadratic (Array Unpacked Arbitrary) xl0 xu0 Filled upper sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     Filled
     upper
     Shape
     Small
     Small
     sh0
     sh0
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     (Bands U0)
     Shape
     Small
     Small
     sh0
     sh0
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*#Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  upper
  Shape
  Small
  Small
  sh0
  sh0
  a
Quadratic (Array Unpacked Arbitrary) xl0 xu0 Filled upper sh0 a
a1) (Matrix
  (Array Unpacked Arbitrary)
  xlOff
  xuOff
  Filled
  Filled
  Size
  Big
  Big
  sh1
  sh0
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh1
  sh0
  a
b0Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh1
  sh0
  a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     Filled
     upper
     Shape
     Small
     Small
     sh0
     sh0
     a
-> Unpacked Filled Filled Size Big Big sh1 sh0 a
forall typ xl xu lowerA upperA lowerB upperB lowerC upperC measA
       measB measC vert horiz height fuse width a.
(MultiplySquare typ, ToQuadratic typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, BoxExtra typ xl, BoxExtra typ xu,
 Strip lowerA, Strip upperA, Strip lowerB, Strip upperB,
 Strip lowerC, Strip upperC, MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA,
 Measure measB, Measure measC, MultiplyMeasure measA measB ~ measC,
 C vert, C horiz, C height, C fuse, Eq fuse, C width, Floating a) =>
Unpacked lowerB upperB measB vert horiz height fuse a
-> QuadraticMeas typ xl xu lowerA upperA measA fuse width a
-> Unpacked lowerC upperC measC vert horiz height width a
##*#Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  upper
  Shape
  Small
  Small
  sh0
  sh0
  a
Quadratic (Array Unpacked Arbitrary) xl0 xu0 Filled upper sh0 a
a1 Unpacked Filled Filled Size Big Big sh1 sh0 a
-> Unpacked Filled Filled Size Big Big sh1 sh0 a
-> Unpacked Filled Filled Size Big Big sh1 sh0 a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Quadratic (Array Unpacked Arbitrary) xl1 xu1 Filled upper sh1 a
c0Quadratic (Array Unpacked Arbitrary) xl1 xu1 Filled upper sh1 a
-> Unpacked Filled Filled Size Big Big sh1 sh0 a
-> Unpacked Filled Filled Size Big Big sh1 sh0 a
forall typ xl xu lowerA upperA lowerB upperB lowerC upperC measA
       measB measC vert horiz height fuse width a.
(MultiplySquare typ, ToQuadratic typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, BoxExtra typ xl, BoxExtra typ xu,
 Strip lowerA, Strip upperA, Strip lowerB, Strip upperB,
 Strip lowerC, Strip upperC, MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA,
 Measure measB, Measure measC, MultiplyMeasure measA measB ~ measC,
 C vert, C horiz, C height, C fuse, Eq fuse, C width, Floating a) =>
QuadraticMeas typ xl xu lowerA upperA measA height fuse a
-> Unpacked lowerB upperB measB vert horiz fuse width a
-> Unpacked lowerC upperC measC vert horiz height width a
#*##Matrix
  (Array Unpacked Arbitrary)
  xlOff
  xuOff
  Filled
  Filled
  Size
  Big
  Big
  sh1
  sh0
  a
Unpacked Filled Filled Size Big Big sh1 sh0 a
b1) (Quadratic (Array Unpacked Arbitrary) xl1 xu1 Filled upper sh1 a
c0Quadratic (Array Unpacked Arbitrary) xl1 xu1 Filled upper sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     xl1
     xu1
     Filled
     upper
     Shape
     Small
     Small
     sh1
     sh1
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     (Bands U0)
     Shape
     Small
     Small
     sh1
     sh1
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*#Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  upper
  Shape
  Small
  Small
  sh1
  sh1
  a
Quadratic (Array Unpacked Arbitrary) xl1 xu1 Filled upper sh1 a
c1)
         (PowerStripSingleton Filled
_, PowerStripSingleton upper
Omni.Filled) -> Quadratic (Array Unpacked Arbitrary) () () Filled Filled sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     sh0
     a
-> Quadratic (Array Unpacked Arbitrary) () () Filled Filled sh1 a
-> Quadratic
     (Triangular
        (Array Unpacked Arbitrary)
        (Array Unpacked Arbitrary)
        (Array Unpacked Arbitrary))
     ((), (), (), True)
     ((), (), (), False)
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 upper a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
Lower (Quadratic (Array Unpacked Arbitrary) xl0 xu0 Filled upper sh0 a
a0Quadratic (Array Unpacked Arbitrary) xl0 xu0 Filled upper sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     Filled
     upper
     Shape
     Small
     Small
     sh0
     sh0
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Shape
     Small
     Small
     sh0
     sh0
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*#Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  upper
  Shape
  Small
  Small
  sh0
  sh0
  a
Quadratic (Array Unpacked Arbitrary) xl0 xu0 Filled upper sh0 a
a1) (Matrix
  (Array Unpacked Arbitrary)
  xlOff
  xuOff
  Filled
  Filled
  Size
  Big
  Big
  sh1
  sh0
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh1
  sh0
  a
b0Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh1
  sh0
  a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     Filled
     upper
     Shape
     Small
     Small
     sh0
     sh0
     a
-> Unpacked Filled Filled Size Big Big sh1 sh0 a
forall typ xl xu lowerA upperA lowerB upperB lowerC upperC measA
       measB measC vert horiz height fuse width a.
(MultiplySquare typ, ToQuadratic typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, BoxExtra typ xl, BoxExtra typ xu,
 Strip lowerA, Strip upperA, Strip lowerB, Strip upperB,
 Strip lowerC, Strip upperC, MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA,
 Measure measB, Measure measC, MultiplyMeasure measA measB ~ measC,
 C vert, C horiz, C height, C fuse, Eq fuse, C width, Floating a) =>
Unpacked lowerB upperB measB vert horiz height fuse a
-> QuadraticMeas typ xl xu lowerA upperA measA fuse width a
-> Unpacked lowerC upperC measC vert horiz height width a
##*#Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  upper
  Shape
  Small
  Small
  sh0
  sh0
  a
Quadratic (Array Unpacked Arbitrary) xl0 xu0 Filled upper sh0 a
a1 Unpacked Filled Filled Size Big Big sh1 sh0 a
-> Unpacked Filled Filled Size Big Big sh1 sh0 a
-> Unpacked Filled Filled Size Big Big sh1 sh0 a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Quadratic (Array Unpacked Arbitrary) xl1 xu1 Filled upper sh1 a
c0Quadratic (Array Unpacked Arbitrary) xl1 xu1 Filled upper sh1 a
-> Unpacked Filled Filled Size Big Big sh1 sh0 a
-> Unpacked Filled Filled Size Big Big sh1 sh0 a
forall typ xl xu lowerA upperA lowerB upperB lowerC upperC measA
       measB measC vert horiz height fuse width a.
(MultiplySquare typ, ToQuadratic typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, BoxExtra typ xl, BoxExtra typ xu,
 Strip lowerA, Strip upperA, Strip lowerB, Strip upperB,
 Strip lowerC, Strip upperC, MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA,
 Measure measB, Measure measC, MultiplyMeasure measA measB ~ measC,
 C vert, C horiz, C height, C fuse, Eq fuse, C width, Floating a) =>
QuadraticMeas typ xl xu lowerA upperA measA height fuse a
-> Unpacked lowerB upperB measB vert horiz fuse width a
-> Unpacked lowerC upperC measC vert horiz height width a
#*##Matrix
  (Array Unpacked Arbitrary)
  xlOff
  xuOff
  Filled
  Filled
  Size
  Big
  Big
  sh1
  sh0
  a
Unpacked Filled Filled Size Big Big sh1 sh0 a
b1) (Quadratic (Array Unpacked Arbitrary) xl1 xu1 Filled upper sh1 a
c0Quadratic (Array Unpacked Arbitrary) xl1 xu1 Filled upper sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     xl1
     xu1
     Filled
     upper
     Shape
     Small
     Small
     sh1
     sh1
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Shape
     Small
     Small
     sh1
     sh1
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*#Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  upper
  Shape
  Small
  Small
  sh1
  sh1
  a
Quadratic (Array Unpacked Arbitrary) xl1 xu1 Filled upper sh1 a
c1)

instance
   (typ0 ~ TypeFull, typOff ~ TypeFull, typ1 ~ TypeFull) =>
      Multiply.Power (Triangular typ0 typOff typ1) where
   type PowerExtra (Triangular typ0 typOff typ1) extra =
         (Triangular0 extra ~ (), Triangular1 extra ~ (),
          TriangularOff extra ~ ())
   square :: Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
square a :: Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
a@(Upper _ _ _) = Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
forall typ matrix xl xu lower upper meas vert horiz sh a.
(MultiplySame typ,
 matrix ~ Matrix typ xl xu lower upper meas vert horiz sh sh a,
 MultiplySameExtra typ xl, MultiplySameExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C vert, C horiz,
 C sh, Eq sh, Floating a) =>
matrix -> matrix -> matrix
Matrix.multiplySame Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
a Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
a
   square a :: Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
a@(Lower _ _ _) = Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
forall typ matrix xl xu lower upper meas vert horiz sh a.
(MultiplySame typ,
 matrix ~ Matrix typ xl xu lower upper meas vert horiz sh sh a,
 MultiplySameExtra typ xl, MultiplySameExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C vert, C horiz,
 C sh, Eq sh, Floating a) =>
matrix -> matrix -> matrix
Matrix.multiplySame Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
a Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
a
   power :: Integer
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
power Integer
n m :: Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
m@(Upper a b c) =
      (Quadratic
   (Triangular typ0 typOff typ1)
   (xl0, xlOff, xl1, False)
   (xu0, xuOff, xu1, True)
   lower
   Filled
   (sh0 ::+ sh1)
   a
 -> Quadratic
      (Triangular typ0 typOff typ1)
      (xl0, xlOff, xl1, False)
      (xu0, xuOff, xu1, True)
      lower
      Filled
      (sh0 ::+ sh1)
      a
 -> Quadratic
      (Triangular typ0 typOff typ1)
      (xl0, xlOff, xl1, False)
      (xu0, xuOff, xu1, True)
      lower
      Filled
      (sh0 ::+ sh1)
      a)
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
-> Integer
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
forall a. (a -> a -> a) -> a -> a -> Integer -> a
powerAssociative Quadratic
  (Triangular typ0 typOff typ1)
  (xl0, xlOff, xl1, False)
  (xu0, xuOff, xu1, True)
  lower
  Filled
  (sh0 ::+ sh1)
  a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
forall typ matrix xl xu lower upper meas vert horiz sh a.
(MultiplySame typ,
 matrix ~ Matrix typ xl xu lower upper meas vert horiz sh sh a,
 MultiplySameExtra typ xl, MultiplySameExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C vert, C horiz,
 C sh, Eq sh, Floating a) =>
matrix -> matrix -> matrix
Matrix.multiplySame
         (Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
Upper (Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Quadratic typ0 xl0 xu0 lower Filled sh0 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
Matrix.identityFrom Quadratic typ0 xl0 xu0 lower Filled sh0 a
a)
            (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.zeroFrom Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
b) (Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
Matrix.identityFrom Quadratic typ1 xl1 xu1 lower Filled sh1 a
c))
         Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
Quadratic
  (Triangular typ0 typOff typ1)
  (xl0, xlOff, xl1, False)
  (xu0, xuOff, xu1, True)
  lower
  Filled
  (sh0 ::+ sh1)
  a
m Integer
n
   power Integer
n m :: Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
m@(Lower a b c) =
      (Quadratic
   (Triangular typ0 typOff typ1)
   (xl0, xlOff, xl1, True)
   (xu0, xuOff, xu1, False)
   Filled
   upper
   (sh0 ::+ sh1)
   a
 -> Quadratic
      (Triangular typ0 typOff typ1)
      (xl0, xlOff, xl1, True)
      (xu0, xuOff, xu1, False)
      Filled
      upper
      (sh0 ::+ sh1)
      a
 -> Quadratic
      (Triangular typ0 typOff typ1)
      (xl0, xlOff, xl1, True)
      (xu0, xuOff, xu1, False)
      Filled
      upper
      (sh0 ::+ sh1)
      a)
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
-> Integer
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
forall a. (a -> a -> a) -> a -> a -> Integer -> a
powerAssociative Quadratic
  (Triangular typ0 typOff typ1)
  (xl0, xlOff, xl1, True)
  (xu0, xuOff, xu1, False)
  Filled
  upper
  (sh0 ::+ sh1)
  a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
forall typ matrix xl xu lower upper meas vert horiz sh a.
(MultiplySame typ,
 matrix ~ Matrix typ xl xu lower upper meas vert horiz sh sh a,
 MultiplySameExtra typ xl, MultiplySameExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C vert, C horiz,
 C sh, Eq sh, Floating a) =>
matrix -> matrix -> matrix
Matrix.multiplySame
         (Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 upper a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
Lower (Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Quadratic typ0 xl0 xu0 Filled upper sh0 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
Matrix.identityFrom Quadratic typ0 xl0 xu0 Filled upper sh0 a
a)
            (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.zeroFrom Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
b) (Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
Matrix.identityFrom Quadratic typ1 xl1 xu1 Filled upper sh1 a
c))
         Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
Quadratic
  (Triangular typ0 typOff typ1)
  (xl0, xlOff, xl1, True)
  (xu0, xuOff, xu1, False)
  Filled
  upper
  (sh0 ::+ sh1)
  a
m Integer
n
   powers1 :: Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
-> Stream
     (Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a)
powers1 a :: Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
a@(Upper _ _ _) = (Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
 -> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a)
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
-> Stream
     (Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a)
forall a. (a -> a) -> a -> Stream a
Stream.iterate ((Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
 -> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
 -> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a)
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
forall a b c. (a -> b -> c) -> b -> a -> c
flip Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
forall typ matrix xl xu lower upper meas vert horiz sh a.
(MultiplySame typ,
 matrix ~ Matrix typ xl xu lower upper meas vert horiz sh sh a,
 MultiplySameExtra typ xl, MultiplySameExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C vert, C horiz,
 C sh, Eq sh, Floating a) =>
matrix -> matrix -> matrix
Matrix.multiplySame Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
a) Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
a
   powers1 a :: Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
a@(Lower _ _ _) = (Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
 -> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a)
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
-> Stream
     (Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a)
forall a. (a -> a) -> a -> Stream a
Stream.iterate ((Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
 -> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
 -> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a)
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
forall a b c. (a -> b -> c) -> b -> a -> c
flip Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
-> Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
forall typ matrix xl xu lower upper meas vert horiz sh a.
(MultiplySame typ,
 matrix ~ Matrix typ xl xu lower upper meas vert horiz sh sh a,
 MultiplySameExtra typ xl, MultiplySameExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C vert, C horiz,
 C sh, Eq sh, Floating a) =>
matrix -> matrix -> matrix
Matrix.multiplySame Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
a) Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a
a

instance
   (Divide.Determinant typ0, Matrix.Box typOff, Divide.Determinant typ1) =>
      Divide.Determinant (Triangular typ0 typOff typ1) where
   type DeterminantExtra (Triangular typ0 typOff typ1) extra =
         (Matrix.DeterminantExtra typ0 (Triangular0 extra),
          Matrix.DeterminantExtra typ1 (Triangular1 extra),
          Matrix.BoxExtra typOff (TriangularOff extra))
   determinant :: Quadratic (Triangular typ0 typOff typ1) xl xu lower upper sh a -> a
determinant (Upper a _ b) = Quadratic typ0 xl0 xu0 lower Filled sh0 a -> a
forall typ xl xu lower upper sh a.
(Determinant typ, DeterminantExtra typ xl, DeterminantExtra typ xu,
 Strip lower, Strip upper, C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> a
determinant Quadratic typ0 xl0 xu0 lower Filled sh0 a
a a -> a -> a
forall a. Num a => a -> a -> a
* Quadratic typ1 xl1 xu1 lower Filled sh1 a -> a
forall typ xl xu lower upper sh a.
(Determinant typ, DeterminantExtra typ xl, DeterminantExtra typ xu,
 Strip lower, Strip upper, C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> a
determinant Quadratic typ1 xl1 xu1 lower Filled sh1 a
b
   determinant (Lower a _ b) = Quadratic typ0 xl0 xu0 Filled upper sh0 a -> a
forall typ xl xu lower upper sh a.
(Determinant typ, DeterminantExtra typ xl, DeterminantExtra typ xu,
 Strip lower, Strip upper, C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> a
determinant Quadratic typ0 xl0 xu0 Filled upper sh0 a
a a -> a -> a
forall a. Num a => a -> a -> a
* Quadratic typ1 xl1 xu1 Filled upper sh1 a -> a
forall typ xl xu lower upper sh a.
(Determinant typ, DeterminantExtra typ xl, DeterminantExtra typ xu,
 Strip lower, Strip upper, C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> a
determinant Quadratic typ1 xl1 xu1 Filled upper sh1 a
b

instance
   (Divide.Solve typ0, Divide.Solve typ1, typOff ~ TypeFull) =>
      Divide.Solve (Triangular typ0 typOff typ1) where
   type SolveExtra (Triangular typ0 typOff typ1) extra =
         (Matrix.SolveExtra typ0 (Triangular0 extra),
          Matrix.SolveExtra typ1 (Triangular1 extra),
          TriangularOff extra ~ ())

   solveRight :: Quadratic (Triangular typ0 typOff typ1) xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
solveRight (Upper a o b) =
      (AboveGeneral sh0 sh1 (Unchecked width) a
 -> AboveGeneral sh0 sh1 (Unchecked width) a)
-> Full meas vert horiz (sh0 ::+ sh1) width a
-> Full meas vert horiz (sh0 ::+ sh1) width a
forall meas vert horiz height0 height1 width a.
(Measure meas, C vert, C horiz, C height0, C height1, C width,
 Floating a) =>
(AboveGeneral height0 height1 (Unchecked width) a
 -> AboveGeneral height0 height1 (Unchecked width) a)
-> Full meas vert horiz (height0 ::+ height1) width a
-> Full meas vert horiz (height0 ::+ height1) width a
withVerticalSplit ((AboveGeneral sh0 sh1 (Unchecked width) a
  -> AboveGeneral sh0 sh1 (Unchecked width) a)
 -> Full meas vert horiz (sh0 ::+ sh1) width a
 -> Full meas vert horiz (sh0 ::+ sh1) width a)
-> (AboveGeneral sh0 sh1 (Unchecked width) a
    -> AboveGeneral sh0 sh1 (Unchecked width) a)
-> Full meas vert horiz (sh0 ::+ sh1) width a
-> Full meas vert horiz (sh0 ::+ sh1) width a
forall a b. (a -> b) -> a -> b
$ \(Above rhsTop rhsBottom) ->
      let xBottom :: Full Size Big Big sh1 (Unchecked width) a
xBottom = Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Full Size Big Big sh1 (Unchecked width) a
-> Full Size Big Big sh1 (Unchecked width) a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq height, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solveRight Quadratic typ1 xl1 xu1 lower Filled sh1 a
b Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
Full Size Big Big sh1 (Unchecked width) a
rhsBottom
      in Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
-> Full Size Big Big sh1 (Unchecked width) a
-> AboveGeneral sh0 sh1 (Unchecked width) a
forall sh0 sh1 width typ0 xl0 xu0 horiz a typ1 xl1 xu1.
(C sh0, C sh1, Eq width) =>
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
Above (Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq height, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solveRight Quadratic typ0 xl0 xu0 lower Filled sh0 a
a (Matrix
   (Array Unpacked Arbitrary)
   ()
   ()
   Filled
   Filled
   Size
   Big
   Big
   sh0
   (Unchecked width)
   a
 -> Matrix
      (Array Unpacked Arbitrary)
      ()
      ()
      Filled
      Filled
      Size
      Big
      Big
      sh0
      (Unchecked width)
      a)
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
forall a b. (a -> b) -> a -> b
$ Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
rhsTop Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Subtractive typ,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#-# Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Full Size Big Big sh1 (Unchecked width) a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*# Full Size Big Big sh1 (Unchecked width) a
xBottom) Full Size Big Big sh1 (Unchecked width) a
xBottom
   solveRight (Lower a o b) =
      (AboveGeneral sh0 sh1 (Unchecked width) a
 -> AboveGeneral sh0 sh1 (Unchecked width) a)
-> Full meas vert horiz (sh0 ::+ sh1) width a
-> Full meas vert horiz (sh0 ::+ sh1) width a
forall meas vert horiz height0 height1 width a.
(Measure meas, C vert, C horiz, C height0, C height1, C width,
 Floating a) =>
(AboveGeneral height0 height1 (Unchecked width) a
 -> AboveGeneral height0 height1 (Unchecked width) a)
-> Full meas vert horiz (height0 ::+ height1) width a
-> Full meas vert horiz (height0 ::+ height1) width a
withVerticalSplit ((AboveGeneral sh0 sh1 (Unchecked width) a
  -> AboveGeneral sh0 sh1 (Unchecked width) a)
 -> Full meas vert horiz (sh0 ::+ sh1) width a
 -> Full meas vert horiz (sh0 ::+ sh1) width a)
-> (AboveGeneral sh0 sh1 (Unchecked width) a
    -> AboveGeneral sh0 sh1 (Unchecked width) a)
-> Full meas vert horiz (sh0 ::+ sh1) width a
-> Full meas vert horiz (sh0 ::+ sh1) width a
forall a b. (a -> b) -> a -> b
$ \(Above rhsTop rhsBottom) ->
      let xTop :: Full Size Big Big sh0 (Unchecked width) a
xTop = Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Full Size Big Big sh0 (Unchecked width) a
-> Full Size Big Big sh0 (Unchecked width) a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq height, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solveRight Quadratic typ0 xl0 xu0 Filled upper sh0 a
a Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
Full Size Big Big sh0 (Unchecked width) a
rhsTop
      in Full Size Big Big sh0 (Unchecked width) a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> AboveGeneral sh0 sh1 (Unchecked width) a
forall sh0 sh1 width typ0 xl0 xu0 horiz a typ1 xl1 xu1.
(C sh0, C sh1, Eq width) =>
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
Above Full Size Big Big sh0 (Unchecked width) a
xTop (Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq height, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solveRight Quadratic typ1 xl1 xu1 Filled upper sh1 a
b (Matrix
   (Array Unpacked Arbitrary)
   ()
   ()
   Filled
   Filled
   Size
   Big
   Big
   sh1
   (Unchecked width)
   a
 -> Matrix
      (Array Unpacked Arbitrary)
      ()
      ()
      Filled
      Filled
      Size
      Big
      Big
      sh1
      (Unchecked width)
      a)
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall a b. (a -> b) -> a -> b
$ Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
rhsBottom Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     xl1
     xu1
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     xl1
     xu1
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Subtractive typ,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#-# Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
o Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Full Size Big Big sh0 (Unchecked width) a
-> Matrix
     (Array Unpacked Arbitrary)
     xl1
     xu1
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*# Full Size Big Big sh0 (Unchecked width) a
xTop)

   solveLeft :: Full meas vert horiz height width a
-> Quadratic
     (Triangular typ0 typOff typ1) xl xu lower upper width a
-> Full meas vert horiz height width a
solveLeft Full meas vert horiz height width a
rhs (Lower a o b) =
      Full meas vert horiz height (sh0 ::+ sh1) a
-> (BesideGeneral (Unchecked height) sh0 sh1 a
    -> BesideGeneral (Unchecked height) sh0 sh1 a)
-> Full meas vert horiz height (sh0 ::+ sh1) a
forall meas vert horiz height width0 width1 a.
(Measure meas, C vert, C horiz, C height, C width0, C width1,
 Floating a) =>
Full meas vert horiz height (width0 ::+ width1) a
-> (BesideGeneral (Unchecked height) width0 width1 a
    -> BesideGeneral (Unchecked height) width0 width1 a)
-> Full meas vert horiz height (width0 ::+ width1) a
withHorizontalSplit Full meas vert horiz height width a
Full meas vert horiz height (sh0 ::+ sh1) a
rhs ((BesideGeneral (Unchecked height) sh0 sh1 a
  -> BesideGeneral (Unchecked height) sh0 sh1 a)
 -> Full meas vert horiz height (sh0 ::+ sh1) a)
-> (BesideGeneral (Unchecked height) sh0 sh1 a
    -> BesideGeneral (Unchecked height) sh0 sh1 a)
-> Full meas vert horiz height (sh0 ::+ sh1) a
forall a b. (a -> b) -> a -> b
$ \(Beside rhsLeft rhsRight) ->
      let xRight :: Full Size Big Big (Unchecked height) sh1 a
xRight = Full Size Big Big (Unchecked height) sh1 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Full Size Big Big (Unchecked height) sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Divide.solveLeft Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
Full Size Big Big (Unchecked height) sh1 a
rhsRight Quadratic typ1 xl1 xu1 Filled upper sh1 a
b
      in Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Full Size Big Big (Unchecked height) sh1 a
-> BesideGeneral (Unchecked height) sh0 sh1 a
forall sh0 sh1 height typ0 xl0 xu0 vert a typ1 xl1 xu1.
(C sh0, C sh1, Eq height) =>
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
Beside (Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Divide.solveLeft (Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
rhsLeft Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Subtractive typ,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#-# Full Size Big Big (Unchecked height) sh1 a
xRight Full Size Big Big (Unchecked height) sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*# Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
o) Quadratic typ0 xl0 xu0 Filled upper sh0 a
a) Full Size Big Big (Unchecked height) sh1 a
xRight
   solveLeft Full meas vert horiz height width a
rhs (Upper a o b) =
      Full meas vert horiz height (sh0 ::+ sh1) a
-> (BesideGeneral (Unchecked height) sh0 sh1 a
    -> BesideGeneral (Unchecked height) sh0 sh1 a)
-> Full meas vert horiz height (sh0 ::+ sh1) a
forall meas vert horiz height width0 width1 a.
(Measure meas, C vert, C horiz, C height, C width0, C width1,
 Floating a) =>
Full meas vert horiz height (width0 ::+ width1) a
-> (BesideGeneral (Unchecked height) width0 width1 a
    -> BesideGeneral (Unchecked height) width0 width1 a)
-> Full meas vert horiz height (width0 ::+ width1) a
withHorizontalSplit Full meas vert horiz height width a
Full meas vert horiz height (sh0 ::+ sh1) a
rhs ((BesideGeneral (Unchecked height) sh0 sh1 a
  -> BesideGeneral (Unchecked height) sh0 sh1 a)
 -> Full meas vert horiz height (sh0 ::+ sh1) a)
-> (BesideGeneral (Unchecked height) sh0 sh1 a
    -> BesideGeneral (Unchecked height) sh0 sh1 a)
-> Full meas vert horiz height (sh0 ::+ sh1) a
forall a b. (a -> b) -> a -> b
$ \(Beside rhsLeft rhsRight) ->
      let xLeft :: Full Size Big Big (Unchecked height) sh0 a
xLeft = Full Size Big Big (Unchecked height) sh0 a
-> Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Full Size Big Big (Unchecked height) sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Divide.solveLeft Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
Full Size Big Big (Unchecked height) sh0 a
rhsLeft Quadratic typ0 xl0 xu0 lower Filled sh0 a
a
      in Full Size Big Big (Unchecked height) sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
-> BesideGeneral (Unchecked height) sh0 sh1 a
forall sh0 sh1 height typ0 xl0 xu0 vert a typ1 xl1 xu1.
(C sh0, C sh1, Eq height) =>
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
Beside Full Size Big Big (Unchecked height) sh0 a
xLeft (Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Divide.solveLeft (Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
rhsRight Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
-> Matrix
     (Array Unpacked Arbitrary)
     xl1
     xu1
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
-> Matrix
     (Array Unpacked Arbitrary)
     xl1
     xu1
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Subtractive typ,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#-# Full Size Big Big (Unchecked height) sh0 a
xLeft Full Size Big Big (Unchecked height) sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     xl1
     xu1
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*# Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o) Quadratic typ1 xl1 xu1 lower Filled sh1 a
b)

instance
   (Divide.Inverse typ0, Divide.Inverse typ1, typOff ~ TypeFull) =>
      Divide.Inverse (Triangular typ0 typOff typ1) where
   type InverseExtra (Triangular typ0 typOff typ1) extra =
         (Matrix.InverseExtra typ0 (Triangular0 extra),
          Matrix.InverseExtra typ1 (Triangular1 extra),
          Matrix.SolveExtra typ0 (Triangular0 extra),
          Matrix.SolveExtra typ1 (Triangular1 extra),
          TriangularOff extra ~ ())
   inverse :: QuadraticMeas
  (Triangular typ0 typOff typ1) xl xu lower upper meas height width a
-> QuadraticMeas
     (Triangular typ0 typOff typ1) xl xu lower upper meas width height a
inverse (Upper a o b) =
      Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 (Array Unpacked Arbitrary) typ1)
     (xl0, (), xl1, False)
     (xu0, (), xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 lower a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, False)
     (xu0, xuOff, xu1, True)
     lower
     Filled
     (sh0 ::+ sh1)
     a
Upper
         (Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Quadratic typ0 xl0 xu0 lower Filled sh0 a
forall typ xl xu lower upper meas height width a.
(Inverse typ, InverseExtra typ xl, InverseExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C height,
 C width, Floating a) =>
QuadraticMeas typ xl xu lower upper meas height width a
-> QuadraticMeas typ xl xu lower upper meas width height a
Divide.inverse Quadratic typ0 xl0 xu0 lower Filled sh0 a
a)
         (Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  sh1
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate (Matrix
   (Array Unpacked Arbitrary)
   ()
   ()
   Filled
   Filled
   Size
   Big
   Big
   sh0
   sh1
   a
 -> Matrix
      (Array Unpacked Arbitrary)
      ()
      ()
      Filled
      Filled
      Size
      Big
      Big
      sh0
      sh1
      a)
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
forall a b. (a -> b) -> a -> b
$ Quadratic typ0 xl0 xu0 lower Filled sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq height, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solveRight Quadratic typ0 xl0 xu0 lower Filled sh0 a
a (Matrix
   (Array Unpacked Arbitrary)
   ()
   ()
   Filled
   Filled
   Size
   Big
   Big
   sh0
   sh1
   a
 -> Matrix
      (Array Unpacked Arbitrary)
      ()
      ()
      Filled
      Filled
      Size
      Big
      Big
      sh0
      sh1
      a)
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
forall a b. (a -> b) -> a -> b
$ Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  sh1
  a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     sh1
     a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Divide.solveLeft Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  sh1
  a
o Quadratic typ1 xl1 xu1 lower Filled sh1 a
b)
         (Quadratic typ1 xl1 xu1 lower Filled sh1 a
-> Quadratic typ1 xl1 xu1 lower Filled sh1 a
forall typ xl xu lower upper meas height width a.
(Inverse typ, InverseExtra typ xl, InverseExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C height,
 C width, Floating a) =>
QuadraticMeas typ xl xu lower upper meas height width a
-> QuadraticMeas typ xl xu lower upper meas width height a
Divide.inverse Quadratic typ1 xl1 xu1 lower Filled sh1 a
b)
   inverse (Lower a o b) =
      Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     sh0
     a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 (Array Unpacked Arbitrary) typ1)
     (xl0, (), xl1, True)
     (xu0, (), xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 upper a typOff xlOff xuOff typ1 xl1
       xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic
     (Triangular typ0 typOff typ1)
     (xl0, xlOff, xl1, True)
     (xu0, xuOff, xu1, False)
     Filled
     upper
     (sh0 ::+ sh1)
     a
Lower
         (Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Quadratic typ0 xl0 xu0 Filled upper sh0 a
forall typ xl xu lower upper meas height width a.
(Inverse typ, InverseExtra typ xl, InverseExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C height,
 C width, Floating a) =>
QuadraticMeas typ xl xu lower upper meas height width a
-> QuadraticMeas typ xl xu lower upper meas width height a
Divide.inverse Quadratic typ0 xl0 xu0 Filled upper sh0 a
a)
         (Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh1
  sh0
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     sh0
     a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate (Matrix
   (Array Unpacked Arbitrary)
   ()
   ()
   Filled
   Filled
   Size
   Big
   Big
   sh1
   sh0
   a
 -> Matrix
      (Array Unpacked Arbitrary)
      ()
      ()
      Filled
      Filled
      Size
      Big
      Big
      sh1
      sh0
      a)
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     sh0
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     sh0
     a
forall a b. (a -> b) -> a -> b
$ Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     sh0
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     sh0
     a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq height, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solveRight Quadratic typ1 xl1 xu1 Filled upper sh1 a
b (Matrix
   (Array Unpacked Arbitrary)
   ()
   ()
   Filled
   Filled
   Size
   Big
   Big
   sh1
   sh0
   a
 -> Matrix
      (Array Unpacked Arbitrary)
      ()
      ()
      Filled
      Filled
      Size
      Big
      Big
      sh1
      sh0
      a)
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     sh0
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     sh0
     a
forall a b. (a -> b) -> a -> b
$ Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh1
  sh0
  a
-> Quadratic typ0 xl0 xu0 Filled upper sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     sh0
     a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Divide.solveLeft Matrix typOff xlOff xuOff Filled Filled Size Big Big sh1 sh0 a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh1
  sh0
  a
o Quadratic typ0 xl0 xu0 Filled upper sh0 a
a)
         (Quadratic typ1 xl1 xu1 Filled upper sh1 a
-> Quadratic typ1 xl1 xu1 Filled upper sh1 a
forall typ xl xu lower upper meas height width a.
(Inverse typ, InverseExtra typ xl, InverseExtra typ xu,
 PowerStrip lower, PowerStrip upper, Measure meas, C height,
 C width, Floating a) =>
QuadraticMeas typ xl xu lower upper meas height width a
-> QuadraticMeas typ xl xu lower upper meas width height a
Divide.inverse Quadratic typ1 xl1 xu1 Filled upper sh1 a
b)


{- |
It is not necessary that the square blocks on the diagonal are symmetric.
But if they are, according specialised algorithms are used.

We have no algorithms that benefit from this structure.
Using this data type merely documents the structure
and saves a field in the record
(which comes in handy for nested block matrices).
-}
data Symmetric typ0 typOff xlOff xuOff typ1
data instance
   Matrix (Symmetric typ0 typOff xlOff xuOff typ1) xl xu
      lower upper meas vert horiz height width a where
   Symmetric ::
      (Shape.C sh0, Eq sh0, Shape.C sh1, Eq sh1) =>
      Quadratic typ0 xl0 xu0 Filled Filled sh0 a ->
      Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a ->
      Quadratic typ1 xl1 xu1 Filled Filled sh1 a ->
      Quadratic
         (Symmetric typ0 typOff xlOff xuOff typ1)
         (xl0,xl1) (xu0,xu1)
         Filled Filled (sh0::+sh1) a

squareFromSymmetric ::
   (Matrix.Transpose typOff,
    Matrix.TransposeExtra typOff xlOff,
    Matrix.TransposeExtra typOff xuOff,
    Class.Floating a) =>
   Quadratic
      (Symmetric typ0 typOff xlOff xuOff typ1)
      (xl0,xl1) (xu0,xu1)
      lower upper sh a ->
   Quadratic
      (Square typ0 Size Big Big typ1)
      (xl0,xl1,(typOff,xuOff,xlOff))
      (xu0,xu1,(typOff,xuOff,xlOff))
      lower upper sh a
squareFromSymmetric :: Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1)
  (xl0, xl1)
  (xu0, xu1)
  lower
  upper
  sh
  a
-> Quadratic
     (Square typ0 Size Big Big typ1)
     (xl0, xl1, (typOff, xuOff, xlOff))
     (xu0, xu1, (typOff, xuOff, xlOff))
     lower
     upper
     sh
     a
squareFromSymmetric (Symmetric a o b) = Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xuOff xlOff Filled Filled Size Big Big sh1 sh0 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic
     (Square typ0 Size Big Big typ1)
     (xl0, xl1, (typOff, xuOff, xlOff))
     (xu0, xu1, (typOff, xuOff, xlOff))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall measOff vertOff horizOff sh0 sh1 typ00 xl00 xu00 a typ01
       xl01 xu01 typ10 xl10 xu10 typ11 xl11 xu11.
(Measure measOff, C vertOff, C horizOff, C sh0, Eq sh0, C sh1,
 Eq sh1) =>
Quadratic typ00 xl00 xu00 Filled Filled sh0 a
-> Matrix
     typ01 xl01 xu01 Filled Filled measOff vertOff horizOff sh0 sh1 a
-> Matrix
     typ10 xl10 xu10 Filled Filled measOff horizOff vertOff sh1 sh0 a
-> Quadratic typ11 xl11 xu11 Filled Filled sh1 a
-> Quadratic
     (Square typ00 measOff vertOff horizOff typ11)
     (xl00, xl11, (typ10, xl10, xu10))
     (xu00, xu11, (typ01, xu01, xl01))
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Square Quadratic typ0 xl0 xu0 Filled Filled sh0 a
a Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xuOff xlOff Filled Filled Size Big Big sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o) Quadratic typ1 xl1 xu1 Filled Filled sh1 a
b

type family Symmetric0 extra; type instance Symmetric0 (x0,x1) = x0
type family Symmetric1 extra; type instance Symmetric1 (x0,x1) = x1

deriving instance
   (Show (Quadratic typ0 (Symmetric0 xl) (Symmetric0 xu)
            lower upper (ShapeHead height) a),
    Show (Quadratic typ1 (Symmetric1 xl) (Symmetric1 xu)
            lower upper (ShapeTail height) a),
    Show (Matrix typOff xlOff xuOff Filled Filled Size Big Big
            (ShapeHead height) (ShapeTail height) a),
    Shape.C height, Shape.C width, Show height, Show width, Show a) =>
   Show (Matrix (Symmetric typ0 typOff xlOff xuOff typ1) xl xu
            lower upper meas vert horiz height width a)

instance
   (Matrix.Box typ0, Matrix.Box typ1, Matrix.Box typOff,
    Matrix.BoxExtra typOff xlOff, Matrix.BoxExtra typOff xuOff) =>
      Matrix.Box (Symmetric typ0 typOff xlOff xuOff typ1) where
   type BoxExtra (Symmetric typ0 typOff xlOff xuOff typ1) extra =
         (Matrix.BoxExtra typ0 (Symmetric0 extra),
          Matrix.BoxExtra typ1 (Symmetric1 extra))
   extent :: Matrix
  (Symmetric typ0 typOff xlOff xuOff typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Extent meas vert horiz height width
extent (Symmetric a _ b) = (sh0 ::+ sh1) -> Square (sh0 ::+ sh1)
forall sh. sh -> Square sh
Extent.square (Quadratic typ0 xl0 xu0 Filled Filled sh0 a -> sh0
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Quadratic typ0 xl0 xu0 Filled Filled sh0 a
a sh0 -> sh1 -> sh0 ::+ sh1
forall sh0 sh1. sh0 -> sh1 -> sh0 ::+ sh1
::+ Quadratic typ1 xl1 xu1 Filled Filled sh1 a -> sh1
forall typ xl xu lower upper sh a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu) =>
Quadratic typ xl xu lower upper sh a -> sh
squareSize Quadratic typ1 xl1 xu1 Filled Filled sh1 a
b)

instance
   (Matrix.Transpose typ0, Matrix.Transpose typ1, Matrix.Transpose typOff,
    Matrix.BoxExtra typOff xlOff, Matrix.BoxExtra typOff xuOff,
    Matrix.TransposeExtra typOff xlOff, Matrix.TransposeExtra typOff xuOff) =>
      Matrix.Transpose (Symmetric typ0 typOff xlOff xuOff typ1) where
   type TransposeExtra (Symmetric typ0 typOff xlOff xuOff typ1) extra =
         (Matrix.TransposeExtra typ0 (Symmetric0 extra),
          Matrix.TransposeExtra typ1 (Symmetric1 extra))
   transpose :: Matrix
  (Symmetric typ0 typOff xlOff xuOff typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Symmetric typ0 typOff xlOff xuOff typ1)
     xu
     xl
     upper
     lower
     meas
     horiz
     vert
     width
     height
     a
transpose (Symmetric a o b) =
      Quadratic typ0 xu0 xl0 Filled Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xu1 xl1 Filled Filled sh1 a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1)
     (xu0, xu1)
     (xl0, xl1)
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 a typOff xlOff xuOff typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1)
     (xl0, xl1)
     (xu0, xu1)
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Symmetric (Matrix typ0 xl0 xu0 Filled Filled Shape Small Small sh0 sh0 a
-> Quadratic typ0 xu0 xl0 Filled Filled sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typ0 xl0 xu0 Filled Filled Shape Small Small sh0 sh0 a
a) Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o (Matrix typ1 xl1 xu1 Filled Filled Shape Small Small sh1 sh1 a
-> Quadratic typ1 xu1 xl1 Filled Filled sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typ1 xl1 xu1 Filled Filled Shape Small Small sh1 sh1 a
b)

instance
   (Matrix.Box typ0, Matrix.Box typOff, Matrix.Box typ1,
    Matrix.BoxExtra typOff xlOff, Matrix.BoxExtra typOff xuOff) =>
      Matrix.ToQuadratic (Symmetric typ0 typOff xlOff xuOff typ1) where
   heightToQuadratic :: QuadraticMeas
  (Symmetric typ0 typOff xlOff xuOff typ1)
  xl
  xu
  lower
  upper
  meas
  height
  width
  a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1) xl xu lower upper height a
heightToQuadratic a :: QuadraticMeas
  (Symmetric typ0 typOff xlOff xuOff typ1)
  xl
  xu
  lower
  upper
  meas
  height
  width
  a
a@(Symmetric _ _ _) = QuadraticMeas
  (Symmetric typ0 typOff xlOff xuOff typ1)
  xl
  xu
  lower
  upper
  meas
  height
  width
  a
Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1) xl xu lower upper height a
a
   widthToQuadratic :: QuadraticMeas
  (Symmetric typ0 typOff xlOff xuOff typ1)
  xl
  xu
  lower
  upper
  meas
  height
  width
  a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1) xl xu lower upper width a
widthToQuadratic a :: QuadraticMeas
  (Symmetric typ0 typOff xlOff xuOff typ1)
  xl
  xu
  lower
  upper
  meas
  height
  width
  a
a@(Symmetric _ _ _) = QuadraticMeas
  (Symmetric typ0 typOff xlOff xuOff typ1)
  xl
  xu
  lower
  upper
  meas
  height
  width
  a
Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1) xl xu lower upper width a
a

instance
   (Matrix.BoxExtra typOff xlOff, Matrix.BoxExtra typOff xuOff,
    Layout typ0, Layout typ1,
    Layout typOff, LayoutExtra typOff xlOff, LayoutExtra typOff xuOff) =>
      Layout (Symmetric typ0 typOff xlOff xuOff typ1) where
   type LayoutExtra (Symmetric typ0 typOff xlOff xuOff typ1) extra =
         (Matrix.BoxExtra typ0 (Symmetric0 extra),
          Matrix.BoxExtra typ1 (Symmetric1 extra),
          LayoutExtra typ0 (Symmetric0 extra),
          LayoutExtra typ1 (Symmetric1 extra))
   layout :: Matrix
  (Symmetric typ0 typOff xlOff xuOff typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Array (height, width) (Separator, Maybe (Style, a))
layout (Symmetric a o b) = ((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> Array (sh0 ::+ sh1, sh0 ::+ sh1) (Separator, Maybe (Style, a))
forall shape a. C shape => (shape, [[a]]) -> Array shape a
finalizeLayout (((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
 -> Array (sh0 ::+ sh1, sh0 ::+ sh1) (Separator, Maybe (Style, a)))
-> ((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> Array (sh0 ::+ sh1, sh0 ::+ sh1) (Separator, Maybe (Style, a))
forall a b. (a -> b) -> a -> b
$
      Matrix typ0 xl0 xu0 Filled Filled Shape Small Small sh0 sh0 a
-> ((sh0, sh0), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Matrix typ0 xl0 xu0 Filled Filled Shape Small Small sh0 sh0 a
a ((sh0, sh0), [[(Separator, Maybe (Style, a))]])
-> ((sh0, sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh0, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
forall height widthA a widthB.
Eq height =>
((height, widthA), [[a]])
-> ((height, widthB), [[a]])
-> ((height, widthA ::+ widthB), [[a]])
|||# Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> ((sh0, sh1), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o
      ((sh0, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh0 ::+ sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
forall width heightA a heightB.
Eq width =>
((heightA, width), [a])
-> ((heightB, width), [a]) -> ((heightA ::+ heightB, width), [a])
===#
      Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> ((sh1, sh0), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((width, height), [[(Separator, Maybe (Style, a))]])
toColumns Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o ((sh1, sh0), [[(Separator, Maybe (Style, a))]])
-> ((sh1, sh1), [[(Separator, Maybe (Style, a))]])
-> ((sh1, sh0 ::+ sh1), [[(Separator, Maybe (Style, a))]])
forall height widthA a widthB.
Eq height =>
((height, widthA), [[a]])
-> ((height, widthB), [[a]])
-> ((height, widthA ::+ widthB), [[a]])
|||# Matrix typ1 xl1 xu1 Filled Filled Shape Small Small sh1 sh1 a
-> ((sh1, sh1), [[(Separator, Maybe (Style, a))]])
forall typ xl xu meas vert horiz height width a lower upper.
(BoxExtra typ xl, BoxExtra typ xu, Layout typ, LayoutExtra typ xl,
 LayoutExtra typ xu, Measure meas, C vert, C horiz, C height,
 C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Matrix typ1 xl1 xu1 Filled Filled Shape Small Small sh1 sh1 a
b

instance
   (Matrix.BoxExtra typOff xlOff, Matrix.BoxExtra typOff xuOff,
    Layout typ0, Layout typ1,
    Layout typOff, LayoutExtra typOff xlOff, LayoutExtra typOff xuOff) =>
      Matrix.Format (Symmetric typ0 typOff xlOff xuOff typ1) where
   type FormatExtra (Symmetric typ0 typOff xlOff xuOff typ1) extra =
         (Matrix.BoxExtra typ0 (Symmetric0 extra),
          Matrix.BoxExtra typ1 (Symmetric1 extra),
          LayoutExtra typ0 (Symmetric0 extra),
          LayoutExtra typ1 (Symmetric1 extra))
   format :: Config
-> Matrix
     (Symmetric typ0 typOff xlOff xuOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> out
format = Config
-> Matrix
     (Symmetric typ0 typOff xlOff xuOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> out
forall typ xl xu meas vert horiz height width a out lower upper.
(Layout typ, LayoutExtra typ xl, LayoutExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a, Output out) =>
Config
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> out
Matrix.formatWithLayout

instance
   (Matrix.SquareShape typ0, Matrix.SquareShape typ1,
    Matrix.Box typOff, Matrix.Homogeneous typOff,
    Matrix.BoxExtra typOff xlOff, Matrix.BoxExtra typOff xuOff,
    MatrixClass.HomogeneousExtra typOff xlOff,
    MatrixClass.HomogeneousExtra typOff xuOff) =>
      Matrix.SquareShape (Symmetric typ0 typOff xlOff xuOff typ1) where
   type SquareShapeExtra (Symmetric typ0 typOff xlOff xuOff typ1) extra =
         (Matrix.SquareShapeExtra typ0 (Symmetric0 extra),
          Matrix.SquareShapeExtra typ1 (Symmetric1 extra))
   takeDiagonal :: Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1) xl xu lower upper sh a
-> Vector sh a
takeDiagonal (Symmetric a _b c) =
      Array sh0 a -> Array sh1 a -> Array (sh0 ::+ sh1) a
forall shx shy a.
(C shx, C shy, Storable a) =>
Array shx a -> Array shy a -> Array (shx ::+ shy) a
Array.append (Quadratic typ0 xl0 xu0 Filled Filled sh0 a -> Array sh0 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> Vector sh a
MatrixClass.takeDiagonal Quadratic typ0 xl0 xu0 Filled Filled sh0 a
a) (Quadratic typ1 xl1 xu1 Filled Filled sh1 a -> Array sh1 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> Vector sh a
MatrixClass.takeDiagonal Quadratic typ1 xl1 xu1 Filled Filled sh1 a
c)
   identityFrom :: Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1) xl xu lower upper sh a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1) xl xu lower upper sh a
identityFrom (Symmetric a b c) =
      Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1)
     (xl0, xl1)
     (xu0, xu1)
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 a typOff xlOff xuOff typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1)
     (xl0, xl1)
     (xu0, xu1)
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Symmetric
         (Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Quadratic typ0 xl0 xu0 Filled Filled sh0 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
MatrixClass.identityFrom Quadratic typ0 xl0 xu0 Filled Filled sh0 a
a)
         (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
MatrixClass.zeroFrom Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
b)
         (Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
forall typ xl xu sh a lower upper.
(SquareShape typ, SquareShapeExtra typ xl, SquareShapeExtra typ xu,
 C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a
-> Quadratic typ xl xu lower upper sh a
MatrixClass.identityFrom Quadratic typ1 xl1 xu1 Filled Filled sh1 a
c)

instance
   (Matrix.Unpack typ0, Matrix.Unpack typOff, Matrix.Unpack typ1,
    MatrixClass.UnpackExtra typOff xlOff,
    MatrixClass.UnpackExtra typOff xuOff) =>
      Matrix.Unpack (Symmetric typ0 typOff xlOff xuOff typ1) where
   type UnpackExtra (Symmetric typ0 typOff xlOff xuOff typ1) extra =
         (Matrix.UnpackExtra typ0 (Symmetric0 extra),
          Matrix.UnpackExtra typ1 (Symmetric1 extra))
   unpack :: Matrix
  (Symmetric typ0 typOff xlOff xuOff typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> ArrayMatrix
     Unpacked Arbitrary lower upper meas vert horiz height width a
unpack (Symmetric a0 o0 b0) =
      let o :: Full Size Big Big sh0 sh1 a
o = Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Full Size Big Big sh0 sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o0 in
      Square sh0 a
-> Full Size Big Big sh0 sh1 a
-> Full Size Big Big sh1 sh0 a
-> Square sh1 a
-> Square (sh0 ::+ sh1) a
forall meas vert horiz sizeA sizeB a.
(Measure meas, C vert, C horiz, C sizeA, Eq sizeA, C sizeB,
 Eq sizeB, Floating a) =>
Square sizeA a
-> Full meas vert horiz sizeA sizeB a
-> Full meas horiz vert sizeB sizeA a
-> Square sizeB a
-> Square (sizeA ::+ sizeB) a
Square.stack
         (Matrix typ0 xl0 xu0 Filled Filled Shape Small Small sh0 sh0 a
-> Square sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix typ0 xl0 xu0 Filled Filled Shape Small Small sh0 sh0 a
a0)  Full Size Big Big sh0 sh1 a
o
         (Full Size Big Big sh0 sh1 a -> Full Size Big Big sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Full Size Big Big sh0 sh1 a
o)     (Matrix typ1 xl1 xu1 Filled Filled Shape Small Small sh1 sh1 a
-> Square sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(Unpack typ, UnpackExtra typ xl, UnpackExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Full meas vert horiz height width a
MatrixClass.toFull Matrix typ1 xl1 xu1 Filled Filled Shape Small Small sh1 sh1 a
b0)

instance
   (Matrix.Homogeneous typ0, Matrix.Homogeneous typOff, Matrix.Homogeneous typ1,
    MatrixClass.HomogeneousExtra typOff xlOff,
    MatrixClass.HomogeneousExtra typOff xuOff) =>
      Matrix.Homogeneous (Symmetric typ0 typOff xlOff xuOff typ1) where
   type HomogeneousExtra (Symmetric typ0 typOff xlOff xuOff typ1) extra =
         (Matrix.HomogeneousExtra typ0 (Symmetric0 extra),
          Matrix.HomogeneousExtra typ1 (Symmetric1 extra))
   zeroFrom :: Matrix
  (Symmetric typ0 typOff xlOff xuOff typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Symmetric typ0 typOff xlOff xuOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
zeroFrom (Symmetric a o b) =
      Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1)
     (xl0, xl1)
     (xu0, xu1)
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 a typOff xlOff xuOff typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1)
     (xl0, xl1)
     (xu0, xu1)
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Symmetric (Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Quadratic typ0 xl0 xu0 Filled Filled sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.zeroFrom Quadratic typ0 xl0 xu0 Filled Filled sh0 a
a) (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.zeroFrom Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o) (Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.zeroFrom Quadratic typ1 xl1 xu1 Filled Filled sh1 a
b)
   negate :: Matrix
  (Symmetric typ0 typOff xlOff xuOff typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Symmetric typ0 typOff xlOff xuOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
negate (Symmetric a o b) =
      Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1)
     (xl0, xl1)
     (xu0, xu1)
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 a typOff xlOff xuOff typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1)
     (xl0, xl1)
     (xu0, xu1)
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Symmetric (Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Quadratic typ0 xl0 xu0 Filled Filled sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate Quadratic typ0 xl0 xu0 Filled Filled sh0 a
a) (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o) (Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.negate Quadratic typ1 xl1 xu1 Filled Filled sh1 a
b)
   scaleReal :: RealOf a
-> Matrix
     (Symmetric typ0 typOff xlOff xuOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Symmetric typ0 typOff xlOff xuOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
scaleReal RealOf a
k (Symmetric a o b) =
      Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1)
     (xl0, xl1)
     (xu0, xu1)
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 a typOff xlOff xuOff typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1)
     (xl0, xl1)
     (xu0, xu1)
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Symmetric
         (RealOf a
-> Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Quadratic typ0 xl0 xu0 Filled Filled sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
RealOf a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scaleReal RealOf a
k Quadratic typ0 xl0 xu0 Filled Filled sh0 a
a) (RealOf a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
RealOf a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scaleReal RealOf a
k Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o) (RealOf a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Homogeneous typ, HomogeneousExtra typ xl, HomogeneousExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
RealOf a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scaleReal RealOf a
k Quadratic typ1 xl1 xu1 Filled Filled sh1 a
b)

instance
   (Matrix.Scale typ0, Matrix.Scale typOff, Matrix.Scale typ1,
    MatrixClass.ScaleExtra typOff xlOff,
    MatrixClass.ScaleExtra typOff xuOff,
    MatrixClass.HomogeneousExtra typOff xlOff,
    MatrixClass.HomogeneousExtra typOff xuOff) =>
      Matrix.Scale (Symmetric typ0 typOff xlOff xuOff typ1) where
   type ScaleExtra (Symmetric typ0 typOff xlOff xuOff typ1) extra =
         (Matrix.ScaleExtra typ0 (Symmetric0 extra),
          Matrix.ScaleExtra typ1 (Symmetric1 extra))
   scale :: a
-> Matrix
     (Symmetric typ0 typOff xlOff xuOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Symmetric typ0 typOff xlOff xuOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
scale a
k (Symmetric a o b) =
      Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1)
     (xl0, xl1)
     (xu0, xu1)
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 a typOff xlOff xuOff typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1)
     (xl0, xl1)
     (xu0, xu1)
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Symmetric (a
-> Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Quadratic typ0 xl0 xu0 Filled Filled sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Scale typ, ScaleExtra typ xl, ScaleExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scale a
k Quadratic typ0 xl0 xu0 Filled Filled sh0 a
a) (a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Scale typ, ScaleExtra typ xl, ScaleExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scale a
k Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o) (a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
forall typ xl xu meas vert horiz height width a lower upper.
(Scale typ, ScaleExtra typ xl, ScaleExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.scale a
k Quadratic typ1 xl1 xu1 Filled Filled sh1 a
b)

instance
   (Matrix.Additive typ0, Matrix.Additive typOff, Matrix.Additive typ1,
    MatrixClass.AdditiveExtra typOff xlOff,
    MatrixClass.AdditiveExtra typOff xuOff) =>
      Matrix.Additive (Symmetric typ0 typOff xlOff xuOff typ1) where
   type AdditiveExtra (Symmetric typ0 typOff xlOff xuOff typ1) extra =
         (Matrix.AdditiveExtra typ0 (Symmetric0 extra),
          Matrix.AdditiveExtra typ1 (Symmetric1 extra))
   add :: Matrix
  (Symmetric typ0 typOff xlOff xuOff typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Symmetric typ0 typOff xlOff xuOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Symmetric typ0 typOff xlOff xuOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
add (Symmetric a0 o0 b0) (Symmetric a1 o1 b1) =
      Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1)
     (xl0, xl1)
     (xu0, xu1)
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 a typOff xlOff xuOff typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1)
     (xl0, xl1)
     (xu0, xu1)
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Symmetric (Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Quadratic typ0 xl0 xu0 Filled Filled sh0 a
forall typ meas vert horiz xl xu height width a lower upper.
(Additive typ, Measure meas, C vert, C horiz, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.add Quadratic typ0 xl0 xu0 Filled Filled sh0 a
a0 Quadratic typ0 xl0 xu0 Filled Filled sh0 a
Quadratic typ0 xl0 xu0 Filled Filled sh0 a
a1) (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
forall typ meas vert horiz xl xu height width a lower upper.
(Additive typ, Measure meas, C vert, C horiz, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.add Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o0 Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o1) (Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
forall typ meas vert horiz xl xu height width a lower upper.
(Additive typ, Measure meas, C vert, C horiz, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.add Quadratic typ1 xl1 xu1 Filled Filled sh1 a
b0 Quadratic typ1 xl1 xu1 Filled Filled sh1 a
Quadratic typ1 xl1 xu1 Filled Filled sh1 a
b1)

instance
   (Matrix.Subtractive typ0, Matrix.Subtractive typOff, Matrix.Subtractive typ1,
    MatrixClass.SubtractiveExtra typOff xlOff,
    MatrixClass.SubtractiveExtra typOff xuOff,
    MatrixClass.AdditiveExtra typOff xlOff,
    MatrixClass.AdditiveExtra typOff xuOff) =>
      Matrix.Subtractive (Symmetric typ0 typOff xlOff xuOff typ1) where
   type SubtractiveExtra (Symmetric typ0 typOff xlOff xuOff typ1) extra =
         (Matrix.SubtractiveExtra typ0 (Symmetric0 extra),
          Matrix.SubtractiveExtra typ1 (Symmetric1 extra))
   sub :: Matrix
  (Symmetric typ0 typOff xlOff xuOff typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Matrix
     (Symmetric typ0 typOff xlOff xuOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Matrix
     (Symmetric typ0 typOff xlOff xuOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
sub (Symmetric a0 o0 b0) (Symmetric a1 o1 b1) =
      Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1)
     (xl0, xl1)
     (xu0, xu1)
     Filled
     Filled
     (sh0 ::+ sh1)
     a
forall sh0 sh1 typ0 xl0 xu0 a typOff xlOff xuOff typ1 xl1 xu1.
(C sh0, Eq sh0, C sh1, Eq sh1) =>
Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1)
     (xl0, xl1)
     (xu0, xu1)
     Filled
     Filled
     (sh0 ::+ sh1)
     a
Symmetric (Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Quadratic typ0 xl0 xu0 Filled Filled sh0 a
forall typ meas vert horiz xl xu height width a lower upper.
(Subtractive typ, Measure meas, C vert, C horiz,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.sub Quadratic typ0 xl0 xu0 Filled Filled sh0 a
a0 Quadratic typ0 xl0 xu0 Filled Filled sh0 a
Quadratic typ0 xl0 xu0 Filled Filled sh0 a
a1) (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
forall typ meas vert horiz xl xu height width a lower upper.
(Subtractive typ, Measure meas, C vert, C horiz,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.sub Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o0 Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o1) (Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
forall typ meas vert horiz xl xu height width a lower upper.
(Subtractive typ, Measure meas, C vert, C horiz,
 SubtractiveExtra typ xl, SubtractiveExtra typ xu, C height,
 Eq height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
Matrix.sub Quadratic typ1 xl1 xu1 Filled Filled sh1 a
b0 Quadratic typ1 xl1 xu1 Filled Filled sh1 a
Quadratic typ1 xl1 xu1 Filled Filled sh1 a
b1)

instance
   (Multiply.MultiplyVector typ0, Multiply.MultiplyVector typ1,
    Matrix.BoxExtra typOff xlOff, Matrix.BoxExtra typOff xuOff,
    Multiply.MultiplyVector typOff,
    Multiply.MultiplyVectorExtra typOff xlOff,
    Multiply.MultiplyVectorExtra typOff xuOff) =>
      Multiply.MultiplyVector (Symmetric typ0 typOff xlOff xuOff typ1) where
   type MultiplyVectorExtra (Symmetric typ0 typOff xlOff xuOff typ1) extra =
         (Multiply.MultiplyVectorExtra typ0 (Symmetric0 extra),
          Multiply.MultiplyVectorExtra typ1 (Symmetric1 extra))
   matrixVector :: Matrix
  (Symmetric typ0 typOff xlOff xuOff typ1)
  xl
  xu
  lower
  upper
  meas
  vert
  horiz
  height
  width
  a
-> Vector width a -> Vector height a
matrixVector (Symmetric a o b) Vector width a
x =
      let (Array sh0 a
x0,Array sh1 a
x1) = Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
forall sh0 sh1 a.
(C sh0, C sh1, Storable a) =>
Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
Array.split Vector width a
Array (sh0 ::+ sh1) a
x
      in Array sh0 a -> Array sh1 a -> Array (sh0 ::+ sh1) a
forall shx shy a.
(C shx, C shy, Storable a) =>
Array shx a -> Array shy a -> Array (shx ::+ shy) a
Array.append
            (Matrix typ0 xl0 xu0 Filled Filled Shape Small Small sh0 sh0 a
-> Array sh0 a -> Array sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typ0 xl0 xu0 Filled Filled Shape Small Small sh0 sh0 a
a Array sh0 a
x0 Array sh0 a -> Array sh0 a -> Array sh0 a
forall sh a.
(C sh, Eq sh, Floating a) =>
Vector sh a -> Vector sh a -> Vector sh a
|+| Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Array sh1 a -> Array sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o Array sh1 a
x1)
            (Array sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Array sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Array sh0 a
x0 Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o Array sh1 a -> Array sh1 a -> Array sh1 a
forall sh a.
(C sh, Eq sh, Floating a) =>
Vector sh a -> Vector sh a -> Vector sh a
|+| Matrix typ1 xl1 xu1 Filled Filled Shape Small Small sh1 sh1 a
-> Array sh1 a -> Array sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typ1 xl1 xu1 Filled Filled Shape Small Small sh1 sh1 a
b Array sh1 a
x1)
   vectorMatrix :: Vector height a
-> Matrix
     (Symmetric typ0 typOff xlOff xuOff typ1)
     xl
     xu
     lower
     upper
     meas
     vert
     horiz
     height
     width
     a
-> Vector width a
vectorMatrix Vector height a
x (Symmetric a o b) =
      let (Array sh0 a
x0,Array sh1 a
x1) = Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
forall sh0 sh1 a.
(C sh0, C sh1, Storable a) =>
Array (sh0 ::+ sh1) a -> (Array sh0 a, Array sh1 a)
Array.split Vector height a
Array (sh0 ::+ sh1) a
x
      in Array sh0 a -> Array sh1 a -> Array (sh0 ::+ sh1) a
forall shx shy a.
(C shx, C shy, Storable a) =>
Array shx a -> Array shy a -> Array (shx ::+ shy) a
Array.append
            (Array sh0 a
-> Matrix typ0 xl0 xu0 Filled Filled Shape Small Small sh0 sh0 a
-> Array sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Array sh0 a
x0 Matrix typ0 xl0 xu0 Filled Filled Shape Small Small sh0 sh0 a
a Array sh0 a -> Array sh0 a -> Array sh0 a
forall sh a.
(C sh, Eq sh, Floating a) =>
Vector sh a -> Vector sh a -> Vector sh a
|+| Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Array sh1 a -> Array sh0 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a -> Vector height a
Multiply.matrixVector Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o Array sh1 a
x1)
            (Array sh0 a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Array sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Array sh0 a
x0 Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o Array sh1 a -> Array sh1 a -> Array sh1 a
forall sh a.
(C sh, Eq sh, Floating a) =>
Vector sh a -> Vector sh a -> Vector sh a
|+| Array sh1 a
-> Matrix typ1 xl1 xu1 Filled Filled Shape Small Small sh1 sh1 a
-> Array sh1 a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplyVector typ, MultiplyVectorExtra typ xl,
 MultiplyVectorExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq height, Floating a) =>
Vector height a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Vector width a
Multiply.vectorMatrix Array sh1 a
x1 Matrix typ1 xl1 xu1 Filled Filled Shape Small Small sh1 sh1 a
b)

instance
   (Multiply.MultiplySquare typ0, Multiply.MultiplySquare typ1,
    typOff ~ TypeFull, xlOff ~ (), xuOff ~ ()) =>
      Multiply.MultiplySquare (Symmetric typ0 typOff xlOff xuOff typ1) where
   type MultiplySquareExtra (Symmetric typ0 typOff xlOff xuOff typ1) extra =
         (Matrix.MultiplySquareExtra typ0 (Symmetric0 extra),
          Matrix.MultiplySquareExtra typ1 (Symmetric1 extra))

   squareFull :: Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1) xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
squareFull (Symmetric a o b) =
      (AboveGeneral sh0 sh1 (Unchecked width) a
 -> AboveGeneral sh0 sh1 (Unchecked width) a)
-> Full meas vert horiz (sh0 ::+ sh1) width a
-> Full meas vert horiz (sh0 ::+ sh1) width a
forall meas vert horiz height0 height1 width a.
(Measure meas, C vert, C horiz, C height0, C height1, C width,
 Floating a) =>
(AboveGeneral height0 height1 (Unchecked width) a
 -> AboveGeneral height0 height1 (Unchecked width) a)
-> Full meas vert horiz (height0 ::+ height1) width a
-> Full meas vert horiz (height0 ::+ height1) width a
withVerticalSplit ((AboveGeneral sh0 sh1 (Unchecked width) a
  -> AboveGeneral sh0 sh1 (Unchecked width) a)
 -> Full meas vert horiz (sh0 ::+ sh1) width a
 -> Full meas vert horiz (sh0 ::+ sh1) width a)
-> (AboveGeneral sh0 sh1 (Unchecked width) a
    -> AboveGeneral sh0 sh1 (Unchecked width) a)
-> Full meas vert horiz (sh0 ::+ sh1) width a
-> Full meas vert horiz (sh0 ::+ sh1) width a
forall a b. (a -> b) -> a -> b
$ \(Above top bottom) ->
         Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> AboveGeneral sh0 sh1 (Unchecked width) a
forall sh0 sh1 width typ0 xl0 xu0 horiz a typ1 xl1 xu1.
(C sh0, C sh1, Eq width) =>
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
Above
            (Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, Eq height, C width, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Multiply.squareFull Quadratic typ0 xl0 xu0 Filled Filled sh0 a
a Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
top Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
oMatrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     xl1
     xu1
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*#Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
bottom)
            (Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xuOff xlOff Filled Filled Size Big Big sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o Matrix typOff xuOff xlOff Filled Filled Size Big Big sh1 sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     xl0
     xu0
     Filled
     Filled
     Size
     Big
     Big
     sh0
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*# Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  sh0
  (Unchecked width)
  a
top Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     sh1
     (Unchecked width)
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, Eq height, C width, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Multiply.squareFull Quadratic typ1 xl1 xu1 Filled Filled sh1 a
b Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  sh1
  (Unchecked width)
  a
bottom)
   fullSquare :: Full meas vert horiz height width a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1) xl xu lower upper width a
-> Full meas vert horiz height width a
fullSquare Full meas vert horiz height width a
x (Symmetric a o b) =
      Full meas vert horiz height (sh0 ::+ sh1) a
-> (BesideGeneral (Unchecked height) sh0 sh1 a
    -> BesideGeneral (Unchecked height) sh0 sh1 a)
-> Full meas vert horiz height (sh0 ::+ sh1) a
forall meas vert horiz height width0 width1 a.
(Measure meas, C vert, C horiz, C height, C width0, C width1,
 Floating a) =>
Full meas vert horiz height (width0 ::+ width1) a
-> (BesideGeneral (Unchecked height) width0 width1 a
    -> BesideGeneral (Unchecked height) width0 width1 a)
-> Full meas vert horiz height (width0 ::+ width1) a
withHorizontalSplit Full meas vert horiz height width a
Full meas vert horiz height (sh0 ::+ sh1) a
x ((BesideGeneral (Unchecked height) sh0 sh1 a
  -> BesideGeneral (Unchecked height) sh0 sh1 a)
 -> Full meas vert horiz height (sh0 ::+ sh1) a)
-> (BesideGeneral (Unchecked height) sh0 sh1 a
    -> BesideGeneral (Unchecked height) sh0 sh1 a)
-> Full meas vert horiz height (sh0 ::+ sh1) a
forall a b. (a -> b) -> a -> b
$ \(Beside left right) ->
         Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
-> BesideGeneral (Unchecked height) sh0 sh1 a
forall sh0 sh1 height typ0 xl0 xu0 vert a typ1 xl1 xu1.
(C sh0, C sh1, Eq height) =>
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
Beside
            (Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Quadratic typ0 xl0 xu0 Filled Filled sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Multiply.fullSquare Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
left Quadratic typ0 xl0 xu0 Filled Filled sh0 a
a Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
right Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
-> Matrix typOff xuOff xlOff Filled Filled Size Big Big sh1 sh0 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh0
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*# Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix typOff xuOff xlOff Filled Filled Size Big Big sh1 sh0 a
forall typ xl xu meas vert horiz height width a lower upper.
(Transpose typ, TransposeExtra typ xl, TransposeExtra typ xu,
 Measure meas, C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xu xl upper lower meas horiz vert width height a
Matrix.transpose Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o)
            (Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
leftMatrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh0
  a
-> Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
forall typA lowerA upperA typB lowerB upperB typC lowerC upperC xlA
       xuA xlB xuB measC xlC xuC measA vertA horizA measB vertB horizB
       vertC horizC height fuse width a.
(Box typA, Strip lowerA, Strip upperA, Box typB, Strip lowerB,
 Strip upperB, Box typC, Strip lowerC, Strip upperC,
 Multiply typA xlA xuA typB xlB xuB lowerC upperC measC,
 Multiplied typA xlA xuA typB xlB xuB lowerC upperC measC ~ typC,
 MultipliedExtra typA xlA xuA typB xlB xuB ~ xlC,
 MultipliedExtra typA xuA xlA typB xuB xlB ~ xuC,
 MultipliedStrip lowerA lowerB ~ lowerC,
 MultipliedStrip lowerB lowerA ~ lowerC,
 MultipliedStrip upperA upperB ~ upperC,
 MultipliedStrip upperB upperA ~ upperC,
 MultipliedBands lowerA lowerB ~ lowerC,
 MultipliedBands lowerB lowerA ~ lowerC,
 MultipliedBands upperA upperB ~ upperC,
 MultipliedBands upperB upperA ~ upperC, Measure measA, C vertA,
 C horizA, Measure measB, C vertB, C horizB,
 MultiplyMeasure measA measB ~ measC,
 MultiplyMeasure measB measA ~ measC, Multiply vertA vertB ~ vertC,
 Multiply vertB vertA ~ vertC, Multiply horizA horizB ~ horizC,
 Multiply horizB horizA ~ horizC, C height, C fuse, Eq fuse,
 C width, Floating a) =>
Matrix typA xlA xuA lowerA upperA measA vertA horizA height fuse a
-> Matrix
     typB xlB xuB lowerB upperB measB vertB horizB fuse width a
-> Matrix
     typC xlC xuC lowerC upperC measC vertC horizC height width a
#*#Matrix typOff xlOff xuOff Filled Filled Size Big Big sh0 sh1 a
o Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
forall meas vert horiz typ xl xu height width a lower upper.
(Measure meas, C vert, C horiz, Additive typ, AdditiveExtra typ xl,
 AdditiveExtra typ xu, C height, Eq height, C width, Eq width,
 Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
-> Matrix typ xl xu lower upper meas vert horiz height width a
#+# Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
-> Quadratic typ1 xl1 xu1 Filled Filled sh1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     sh1
     a
forall typ xl xu lower upper meas vert horiz height width a.
(MultiplySquare typ, MultiplySquareExtra typ xl,
 MultiplySquareExtra typ xu, Strip lower, Strip upper, Measure meas,
 C vert, C horiz, C height, C width, Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Multiply.fullSquare Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  sh1
  a
right Quadratic typ1 xl1 xu1 Filled Filled sh1 a
b)

instance
   (typ0 ~ TypeFull, Divide.Solve typ1,
    typOff ~ TypeFull, xlOff ~ (), xuOff ~ ()) =>
      Divide.Determinant (Symmetric typ0 typOff xlOff xuOff typ1) where
   type DeterminantExtra (Symmetric typ0 typOff xlOff xuOff typ1) extra =
         (Matrix.DeterminantExtra typ1 (Symmetric1 extra),
          Matrix.Determinant typ1,
          Divide.SolveExtra typ1 (Symmetric1 extra),
          Symmetric0 extra ~ ())
   determinant :: Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1) xl xu lower upper sh a
-> a
determinant a :: Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1) xl xu lower upper sh a
a@(Symmetric _ _ _) = Quadratic
  (Square typ0 Size Big Big typ1)
  ((), Symmetric1 xl, (typOff, xuOff, xlOff))
  ((), Symmetric1 xu, (typOff, xuOff, xlOff))
  lower
  upper
  sh
  a
-> a
forall typ xl xu lower upper sh a.
(Determinant typ, DeterminantExtra typ xl, DeterminantExtra typ xu,
 Strip lower, Strip upper, C sh, Floating a) =>
Quadratic typ xl xu lower upper sh a -> a
determinant (Quadratic
   (Square typ0 Size Big Big typ1)
   ((), Symmetric1 xl, (typOff, xuOff, xlOff))
   ((), Symmetric1 xu, (typOff, xuOff, xlOff))
   lower
   upper
   sh
   a
 -> a)
-> Quadratic
     (Square typ0 Size Big Big typ1)
     ((), Symmetric1 xl, (typOff, xuOff, xlOff))
     ((), Symmetric1 xu, (typOff, xuOff, xlOff))
     lower
     upper
     sh
     a
-> a
forall a b. (a -> b) -> a -> b
$ Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1)
  ((), Symmetric1 xl)
  ((), Symmetric1 xu)
  lower
  upper
  sh
  a
-> Quadratic
     (Square typ0 Size Big Big typ1)
     ((), Symmetric1 xl, (typOff, xuOff, xlOff))
     ((), Symmetric1 xu, (typOff, xuOff, xlOff))
     lower
     upper
     sh
     a
forall typOff xlOff xuOff a typ0 typ1 xl0 xl1 xu0 xu1 lower upper
       sh.
(Transpose typOff, TransposeExtra typOff xlOff,
 TransposeExtra typOff xuOff, Floating a) =>
Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1)
  (xl0, xl1)
  (xu0, xu1)
  lower
  upper
  sh
  a
-> Quadratic
     (Square typ0 Size Big Big typ1)
     (xl0, xl1, (typOff, xuOff, xlOff))
     (xu0, xu1, (typOff, xuOff, xlOff))
     lower
     upper
     sh
     a
squareFromSymmetric Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1) xl xu lower upper sh a
Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1)
  ((), Symmetric1 xl)
  ((), Symmetric1 xu)
  lower
  upper
  sh
  a
a

instance
   (typ0 ~ TypeFull, Divide.Solve typ1,
    typOff ~ TypeFull, xlOff ~ (), xuOff ~ ()) =>
      Divide.Solve (Symmetric typ0 typOff xlOff xuOff typ1) where
   type SolveExtra (Symmetric typ0 typOff xlOff xuOff typ1) extra =
         (Matrix.SolveExtra typ0 (Symmetric0 extra),
          Matrix.SolveExtra typ1 (Symmetric1 extra))

   solveRight :: Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1) xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
solveRight a :: Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1) xl xu lower upper height a
a@(Symmetric _ _ _) =
      Quadratic
  (Square typ0 Size Big Big typ1)
  ((), Symmetric1 xl, (typOff, xuOff, xlOff))
  ((), Symmetric1 xu, (typOff, xuOff, xlOff))
  lower
  upper
  height
  a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq height, Floating a) =>
Quadratic typ xl xu lower upper height a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
Divide.solveRight (Quadratic
   (Square typ0 Size Big Big typ1)
   ((), Symmetric1 xl, (typOff, xuOff, xlOff))
   ((), Symmetric1 xu, (typOff, xuOff, xlOff))
   lower
   upper
   height
   a
 -> Full meas vert horiz height width a
 -> Full meas vert horiz height width a)
-> Quadratic
     (Square typ0 Size Big Big typ1)
     ((), Symmetric1 xl, (typOff, xuOff, xlOff))
     ((), Symmetric1 xu, (typOff, xuOff, xlOff))
     lower
     upper
     height
     a
-> Full meas vert horiz height width a
-> Full meas vert horiz height width a
forall a b. (a -> b) -> a -> b
$ Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1)
  ((), Symmetric1 xl)
  ((), Symmetric1 xu)
  lower
  upper
  height
  a
-> Quadratic
     (Square typ0 Size Big Big typ1)
     ((), Symmetric1 xl, (typOff, xuOff, xlOff))
     ((), Symmetric1 xu, (typOff, xuOff, xlOff))
     lower
     upper
     height
     a
forall typOff xlOff xuOff a typ0 typ1 xl0 xl1 xu0 xu1 lower upper
       sh.
(Transpose typOff, TransposeExtra typOff xlOff,
 TransposeExtra typOff xuOff, Floating a) =>
Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1)
  (xl0, xl1)
  (xu0, xu1)
  lower
  upper
  sh
  a
-> Quadratic
     (Square typ0 Size Big Big typ1)
     (xl0, xl1, (typOff, xuOff, xlOff))
     (xu0, xu1, (typOff, xuOff, xlOff))
     lower
     upper
     sh
     a
squareFromSymmetric Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1) xl xu lower upper height a
Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1)
  ((), Symmetric1 xl)
  ((), Symmetric1 xu)
  lower
  upper
  height
  a
a
   solveLeft :: Full meas vert horiz height width a
-> Quadratic
     (Symmetric typ0 typOff xlOff xuOff typ1) xl xu lower upper width a
-> Full meas vert horiz height width a
solveLeft Full meas vert horiz height width a
rhs a :: Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1) xl xu lower upper width a
a@(Symmetric _ _ _) =
      Full meas vert horiz height width a
-> Quadratic
     (Square typ0 Size Big Big typ1)
     ((), Symmetric1 xl, (typOff, xuOff, xlOff))
     ((), Symmetric1 xu, (typOff, xuOff, xlOff))
     lower
     upper
     width
     a
-> Full meas vert horiz height width a
forall typ xl xu lower upper meas vert horiz height width a.
(Solve typ, SolveExtra typ xl, SolveExtra typ xu, Strip lower,
 Strip upper, Measure meas, C vert, C horiz, C height, C width,
 Eq width, Floating a) =>
Full meas vert horiz height width a
-> Quadratic typ xl xu lower upper width a
-> Full meas vert horiz height width a
Divide.solveLeft Full meas vert horiz height width a
rhs (Quadratic
   (Square typ0 Size Big Big typ1)
   ((), Symmetric1 xl, (typOff, xuOff, xlOff))
   ((), Symmetric1 xu, (typOff, xuOff, xlOff))
   lower
   upper
   width
   a
 -> Full meas vert horiz height width a)
-> Quadratic
     (Square typ0 Size Big Big typ1)
     ((), Symmetric1 xl, (typOff, xuOff, xlOff))
     ((), Symmetric1 xu, (typOff, xuOff, xlOff))
     lower
     upper
     width
     a
-> Full meas vert horiz height width a
forall a b. (a -> b) -> a -> b
$ Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1)
  ((), Symmetric1 xl)
  ((), Symmetric1 xu)
  lower
  upper
  width
  a
-> Quadratic
     (Square typ0 Size Big Big typ1)
     ((), Symmetric1 xl, (typOff, xuOff, xlOff))
     ((), Symmetric1 xu, (typOff, xuOff, xlOff))
     lower
     upper
     width
     a
forall typOff xlOff xuOff a typ0 typ1 xl0 xl1 xu0 xu1 lower upper
       sh.
(Transpose typOff, TransposeExtra typOff xlOff,
 TransposeExtra typOff xuOff, Floating a) =>
Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1)
  (xl0, xl1)
  (xu0, xu1)
  lower
  upper
  sh
  a
-> Quadratic
     (Square typ0 Size Big Big typ1)
     (xl0, xl1, (typOff, xuOff, xlOff))
     (xu0, xu1, (typOff, xuOff, xlOff))
     lower
     upper
     sh
     a
squareFromSymmetric Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1) xl xu lower upper width a
Quadratic
  (Symmetric typ0 typOff xlOff xuOff typ1)
  ((), Symmetric1 xl)
  ((), Symmetric1 xu)
  lower
  upper
  width
  a
a



-- * Helper types and functions

type TypeFull = ArrMatrix.Array Layout.Unpacked Omni.Arbitrary


withoutSizeCheck ::
   (Vector (Unchecked sh0) a0 ->
    Vector (Unchecked sh1) a1 ->
    Vector (Unchecked sh2) a2) ->
   Vector sh0 a0 -> Vector sh1 a1 -> Vector sh2 a2
withoutSizeCheck :: (Vector (Unchecked sh0) a0
 -> Vector (Unchecked sh1) a1 -> Vector (Unchecked sh2) a2)
-> Vector sh0 a0 -> Vector sh1 a1 -> Vector sh2 a2
withoutSizeCheck Vector (Unchecked sh0) a0
-> Vector (Unchecked sh1) a1 -> Vector (Unchecked sh2) a2
op Vector sh0 a0
a Vector sh1 a1
b =
   Vector (Unchecked sh2) a2 -> Vector sh2 a2
forall sh a. Array (Unchecked sh) a -> Array sh a
Vector.recheck (Vector (Unchecked sh2) a2 -> Vector sh2 a2)
-> Vector (Unchecked sh2) a2 -> Vector sh2 a2
forall a b. (a -> b) -> a -> b
$ Vector sh0 a0 -> Vector (Unchecked sh0) a0
forall sh a. Array sh a -> Array (Unchecked sh) a
Vector.uncheck Vector sh0 a0
a Vector (Unchecked sh0) a0
-> Vector (Unchecked sh1) a1 -> Vector (Unchecked sh2) a2
`op` Vector sh1 a1 -> Vector (Unchecked sh1) a1
forall sh a. Array sh a -> Array (Unchecked sh) a
Vector.uncheck Vector sh1 a1
b


withVerticalSplit ::
   (Extent.Measure meas, Extent.C vert, Extent.C horiz,
    Shape.C height0, Shape.C height1, Shape.C width, Class.Floating a) =>
   (AboveGeneral height0 height1 (Unchecked width) a ->
    AboveGeneral height0 height1 (Unchecked width) a) ->
   Matrix.Full meas vert horiz (height0::+height1) width a ->
   Matrix.Full meas vert horiz (height0::+height1) width a
withVerticalSplit :: (AboveGeneral height0 height1 (Unchecked width) a
 -> AboveGeneral height0 height1 (Unchecked width) a)
-> Full meas vert horiz (height0 ::+ height1) width a
-> Full meas vert horiz (height0 ::+ height1) width a
withVerticalSplit AboveGeneral height0 height1 (Unchecked width) a
-> AboveGeneral height0 height1 (Unchecked width) a
f Full meas vert horiz (height0 ::+ height1) width a
x =
   Full meas vert horiz (height0 ::+ height1) width a
-> General (height0 ::+ height1) width a
-> Full meas vert horiz (height0 ::+ height1) width a
forall meas vert horiz height width a.
(Measure meas, C vert, C horiz, C height, C width) =>
Full meas vert horiz height width a
-> General height width a -> Full meas vert horiz height width a
restoreShape Full meas vert horiz (height0 ::+ height1) width a
x (General (height0 ::+ height1) width a
 -> Full meas vert horiz (height0 ::+ height1) width a)
-> General (height0 ::+ height1) width a
-> Full meas vert horiz (height0 ::+ height1) width a
forall a b. (a -> b) -> a -> b
$ (Unchecked width -> width)
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (height0 ::+ height1)
     (Unchecked width)
     a
-> General (height0 ::+ height1) width a
forall typ vert horiz height widthA widthB extraLower extraUpper
       lower upper a.
(MapSize typ, C vert, C horiz, C height, C widthA, C widthB) =>
(widthA -> widthB)
-> Matrix
     typ
     extraLower
     extraUpper
     lower
     upper
     Size
     vert
     horiz
     height
     widthA
     a
-> Matrix
     typ
     extraLower
     extraUpper
     lower
     upper
     Size
     vert
     horiz
     height
     widthB
     a
Matrix.mapWidth Unchecked width -> width
forall sh. Unchecked sh -> sh
deconsUnchecked (Matrix
   (Array Unpacked Arbitrary)
   ()
   ()
   Filled
   Filled
   Size
   Big
   Big
   (height0 ::+ height1)
   (Unchecked width)
   a
 -> General (height0 ::+ height1) width a)
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (height0 ::+ height1)
     (Unchecked width)
     a
-> General (height0 ::+ height1) width a
forall a b. (a -> b) -> a -> b
$
      (\(Above a b) -> Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  height0
  (Unchecked width)
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  height0
  (Unchecked width)
  a
aMatrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  height0
  (Unchecked width)
  a
-> Full Size Big Big height1 (Unchecked width) a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (height0 ::+ height1)
     (Unchecked width)
     a
forall horizA horizB horizC width heightA heightB a.
(C horizA, C horizB, C horizC, Append horizA horizB ~ horizC,
 C width, Eq width, C heightA, C heightB, Floating a) =>
Full Size Big horizA heightA width a
-> Full Size Big horizB heightB width a
-> Full Size Big horizC (heightA ::+ heightB) width a
===Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  height1
  (Unchecked width)
  a
Full Size Big Big height1 (Unchecked width) a
b) (AboveGeneral height0 height1 (Unchecked width) a
 -> Matrix
      (Array Unpacked Arbitrary)
      ()
      ()
      Filled
      Filled
      Size
      Big
      Big
      (height0 ::+ height1)
      (Unchecked width)
      a)
-> AboveGeneral height0 height1 (Unchecked width) a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (height0 ::+ height1)
     (Unchecked width)
     a
forall a b. (a -> b) -> a -> b
$ AboveGeneral height0 height1 (Unchecked width) a
-> AboveGeneral height0 height1 (Unchecked width) a
f (AboveGeneral height0 height1 (Unchecked width) a
 -> AboveGeneral height0 height1 (Unchecked width) a)
-> AboveGeneral height0 height1 (Unchecked width) a
-> AboveGeneral height0 height1 (Unchecked width) a
forall a b. (a -> b) -> a -> b
$ Full meas vert horiz (height0 ::+ height1) width a
-> AboveGeneral height0 height1 (Unchecked width) a
forall meas vert horiz height0 height1 width a.
(Measure meas, C vert, C horiz, C height0, C height1, C width,
 Floating a) =>
Full meas vert horiz (height0 ::+ height1) width a
-> AboveGeneral height0 height1 (Unchecked width) a
splitVertically Full meas vert horiz (height0 ::+ height1) width a
x

withHorizontalSplit ::
   (Extent.Measure meas, Extent.C vert, Extent.C horiz,
    Shape.C height, Shape.C width0, Shape.C width1, Class.Floating a) =>
   Matrix.Full meas vert horiz height (width0::+width1) a ->
   (BesideGeneral (Unchecked height) width0 width1 a ->
    BesideGeneral (Unchecked height) width0 width1 a) ->
   Matrix.Full meas vert horiz height (width0::+width1) a
withHorizontalSplit :: Full meas vert horiz height (width0 ::+ width1) a
-> (BesideGeneral (Unchecked height) width0 width1 a
    -> BesideGeneral (Unchecked height) width0 width1 a)
-> Full meas vert horiz height (width0 ::+ width1) a
withHorizontalSplit Full meas vert horiz height (width0 ::+ width1) a
x BesideGeneral (Unchecked height) width0 width1 a
-> BesideGeneral (Unchecked height) width0 width1 a
f =
   Full meas vert horiz height (width0 ::+ width1) a
-> General height (width0 ::+ width1) a
-> Full meas vert horiz height (width0 ::+ width1) a
forall meas vert horiz height width a.
(Measure meas, C vert, C horiz, C height, C width) =>
Full meas vert horiz height width a
-> General height width a -> Full meas vert horiz height width a
restoreShape Full meas vert horiz height (width0 ::+ width1) a
x (General height (width0 ::+ width1) a
 -> Full meas vert horiz height (width0 ::+ width1) a)
-> General height (width0 ::+ width1) a
-> Full meas vert horiz height (width0 ::+ width1) a
forall a b. (a -> b) -> a -> b
$ (Unchecked height -> height)
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     (width0 ::+ width1)
     a
-> General height (width0 ::+ width1) a
forall typ vert horiz heightA heightB width extraLower extraUpper
       lower upper a.
(MapSize typ, C vert, C horiz, C heightA, C heightB, C width) =>
(heightA -> heightB)
-> Matrix
     typ
     extraLower
     extraUpper
     lower
     upper
     Size
     vert
     horiz
     heightA
     width
     a
-> Matrix
     typ
     extraLower
     extraUpper
     lower
     upper
     Size
     vert
     horiz
     heightB
     width
     a
Matrix.mapHeight Unchecked height -> height
forall sh. Unchecked sh -> sh
deconsUnchecked (Matrix
   (Array Unpacked Arbitrary)
   ()
   ()
   Filled
   Filled
   Size
   Big
   Big
   (Unchecked height)
   (width0 ::+ width1)
   a
 -> General height (width0 ::+ width1) a)
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     (width0 ::+ width1)
     a
-> General height (width0 ::+ width1) a
forall a b. (a -> b) -> a -> b
$
      (\(Beside a b) -> Matrix
  (Array Unpacked Arbitrary)
  xl0
  xu0
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  width0
  a
Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  width0
  a
aMatrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  width0
  a
-> Full Size Big Big (Unchecked height) width1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     (width0 ::+ width1)
     a
forall vertA vertB vertC height widthA widthB a.
(C vertA, C vertB, C vertC, Append vertA vertB ~ vertC, C height,
 Eq height, C widthA, C widthB, Floating a) =>
Full Size vertA Big height widthA a
-> Full Size vertB Big height widthB a
-> Full Size vertC Big height (widthA ::+ widthB) a
|||Matrix
  (Array Unpacked Arbitrary)
  xl1
  xu1
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  width1
  a
Full Size Big Big (Unchecked height) width1 a
b) (BesideGeneral (Unchecked height) width0 width1 a
 -> Matrix
      (Array Unpacked Arbitrary)
      ()
      ()
      Filled
      Filled
      Size
      Big
      Big
      (Unchecked height)
      (width0 ::+ width1)
      a)
-> BesideGeneral (Unchecked height) width0 width1 a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     (width0 ::+ width1)
     a
forall a b. (a -> b) -> a -> b
$ BesideGeneral (Unchecked height) width0 width1 a
-> BesideGeneral (Unchecked height) width0 width1 a
f (BesideGeneral (Unchecked height) width0 width1 a
 -> BesideGeneral (Unchecked height) width0 width1 a)
-> BesideGeneral (Unchecked height) width0 width1 a
-> BesideGeneral (Unchecked height) width0 width1 a
forall a b. (a -> b) -> a -> b
$ Full meas vert horiz height (width0 ::+ width1) a
-> BesideGeneral (Unchecked height) width0 width1 a
forall meas vert horiz height width0 width1 a.
(Measure meas, C vert, C horiz, C height, C width0, C width1,
 Floating a) =>
Full meas vert horiz height (width0 ::+ width1) a
-> BesideGeneral (Unchecked height) width0 width1 a
splitHorizontally Full meas vert horiz height (width0 ::+ width1) a
x

splitVertically ::
   (Extent.Measure meas, Extent.C vert, Extent.C horiz,
    Shape.C height0, Shape.C height1, Shape.C width, Class.Floating a) =>
   Matrix.Full meas vert horiz (height0 ::+ height1) width a ->
   AboveGeneral height0 height1 (Unchecked width) a
splitVertically :: Full meas vert horiz (height0 ::+ height1) width a
-> AboveGeneral height0 height1 (Unchecked width) a
splitVertically Full meas vert horiz (height0 ::+ height1) width a
a0 =
   let a :: Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (height0 ::+ height1)
  (Unchecked width)
  a
a = (width -> Unchecked width)
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (height0 ::+ height1)
     width
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (height0 ::+ height1)
     (Unchecked width)
     a
forall typ vert horiz height widthA widthB extraLower extraUpper
       lower upper a.
(MapSize typ, C vert, C horiz, C height, C widthA, C widthB) =>
(widthA -> widthB)
-> Matrix
     typ
     extraLower
     extraUpper
     lower
     upper
     Size
     vert
     horiz
     height
     widthA
     a
-> Matrix
     typ
     extraLower
     extraUpper
     lower
     upper
     Size
     vert
     horiz
     height
     widthB
     a
Matrix.mapWidth width -> Unchecked width
forall sh. sh -> Unchecked sh
Unchecked (Matrix
   (Array Unpacked Arbitrary)
   ()
   ()
   Filled
   Filled
   Size
   Big
   Big
   (height0 ::+ height1)
   width
   a
 -> Matrix
      (Array Unpacked Arbitrary)
      ()
      ()
      Filled
      Filled
      Size
      Big
      Big
      (height0 ::+ height1)
      (Unchecked width)
      a)
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (height0 ::+ height1)
     width
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (height0 ::+ height1)
     (Unchecked width)
     a
forall a b. (a -> b) -> a -> b
$ Full meas vert horiz (height0 ::+ height1) width a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (height0 ::+ height1)
     width
     a
forall meas vert horiz height width a.
(Measure meas, C vert, C horiz) =>
Full meas vert horiz height width a -> General height width a
Matrix.fromFull Full meas vert horiz (height0 ::+ height1) width a
a0
   in Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  height0
  (Unchecked width)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     height1
     (Unchecked width)
     a
-> AboveGeneral height0 height1 (Unchecked width) a
forall sh0 sh1 width typ0 xl0 xu0 horiz a typ1 xl1 xu1.
(C sh0, C sh1, Eq width) =>
Matrix typ0 xl0 xu0 Filled Filled Size Big horiz sh0 width a
-> Matrix typ1 xl1 xu1 Filled Filled Size Big horiz sh1 width a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, False)
     (xu0, xu1, True)
     Filled
     Filled
     Size
     Big
     horiz
     (sh0 ::+ sh1)
     width
     a
Above (Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (height0 ::+ height1)
  (Unchecked width)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     height0
     (Unchecked width)
     a
forall vert height0 height1 width a.
(C vert, C height0, C height1, C width, Floating a) =>
Full Size vert Big (height0 ::+ height1) width a
-> Full Size vert Big height0 width a
Matrix.takeTop Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (height0 ::+ height1)
  (Unchecked width)
  a
a) (Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (height0 ::+ height1)
  (Unchecked width)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     height1
     (Unchecked width)
     a
forall vert height0 height1 width a.
(C vert, C height0, C height1, C width, Floating a) =>
Full Size vert Big (height0 ::+ height1) width a
-> Full Size vert Big height1 width a
Matrix.takeBottom Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (height0 ::+ height1)
  (Unchecked width)
  a
a)

splitHorizontally ::
   (Extent.Measure meas, Extent.C vert, Extent.C horiz,
    Shape.C height, Shape.C width0, Shape.C width1, Class.Floating a) =>
   Matrix.Full meas vert horiz height (width0 ::+ width1) a ->
   BesideGeneral (Unchecked height) width0 width1 a
splitHorizontally :: Full meas vert horiz height (width0 ::+ width1) a
-> BesideGeneral (Unchecked height) width0 width1 a
splitHorizontally Full meas vert horiz height (width0 ::+ width1) a
a0 =
   let a :: Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  (width0 ::+ width1)
  a
a = (height -> Unchecked height)
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     height
     (width0 ::+ width1)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     (width0 ::+ width1)
     a
forall typ vert horiz heightA heightB width extraLower extraUpper
       lower upper a.
(MapSize typ, C vert, C horiz, C heightA, C heightB, C width) =>
(heightA -> heightB)
-> Matrix
     typ
     extraLower
     extraUpper
     lower
     upper
     Size
     vert
     horiz
     heightA
     width
     a
-> Matrix
     typ
     extraLower
     extraUpper
     lower
     upper
     Size
     vert
     horiz
     heightB
     width
     a
Matrix.mapHeight height -> Unchecked height
forall sh. sh -> Unchecked sh
Unchecked (Matrix
   (Array Unpacked Arbitrary)
   ()
   ()
   Filled
   Filled
   Size
   Big
   Big
   height
   (width0 ::+ width1)
   a
 -> Matrix
      (Array Unpacked Arbitrary)
      ()
      ()
      Filled
      Filled
      Size
      Big
      Big
      (Unchecked height)
      (width0 ::+ width1)
      a)
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     height
     (width0 ::+ width1)
     a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     (width0 ::+ width1)
     a
forall a b. (a -> b) -> a -> b
$ Full meas vert horiz height (width0 ::+ width1) a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     height
     (width0 ::+ width1)
     a
forall meas vert horiz height width a.
(Measure meas, C vert, C horiz) =>
Full meas vert horiz height width a -> General height width a
Matrix.fromFull Full meas vert horiz height (width0 ::+ width1) a
a0
   in Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  width0
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     width1
     a
-> BesideGeneral (Unchecked height) width0 width1 a
forall sh0 sh1 height typ0 xl0 xu0 vert a typ1 xl1 xu1.
(C sh0, C sh1, Eq height) =>
Matrix typ0 xl0 xu0 Filled Filled Size vert Big height sh0 a
-> Matrix typ1 xl1 xu1 Filled Filled Size vert Big height sh1 a
-> Matrix
     (Append typ0 typ1 sh0 sh1)
     (xl0, xl1, True)
     (xu0, xu1, False)
     Filled
     Filled
     Size
     vert
     Big
     height
     (sh0 ::+ sh1)
     a
Beside (Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  (width0 ::+ width1)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     width0
     a
forall vert height width0 width1 a.
(C vert, C height, C width0, C width1, Floating a) =>
Full Size Big vert height (width0 ::+ width1) a
-> Full Size Big vert height width0 a
Matrix.takeLeft Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  (width0 ::+ width1)
  a
a) (Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  (width0 ::+ width1)
  a
-> Matrix
     (Array Unpacked Arbitrary)
     ()
     ()
     Filled
     Filled
     Size
     Big
     Big
     (Unchecked height)
     width1
     a
forall vert height width0 width1 a.
(C vert, C height, C width0, C width1, Floating a) =>
Full Size Big vert height (width0 ::+ width1) a
-> Full Size Big vert height width1 a
Matrix.takeRight Matrix
  (Array Unpacked Arbitrary)
  ()
  ()
  Filled
  Filled
  Size
  Big
  Big
  (Unchecked height)
  (width0 ::+ width1)
  a
a)

restoreShape ::
   (Extent.Measure meas, Extent.C vert, Extent.C horiz) =>
   (Shape.C height, Shape.C width) =>
   Matrix.Full meas vert horiz height width a ->
   Matrix.General height width a ->
   Matrix.Full meas vert horiz height width a
restoreShape :: Full meas vert horiz height width a
-> General height width a -> Full meas vert horiz height width a
restoreShape Full meas vert horiz height width a
a General height width a
b =
   Omni Unpacked Arbitrary Filled Filled meas vert horiz height width
-> General height width a -> Full meas vert horiz height width a
forall measA vertA horizA measB vertB horizB heightA widthA heightB
       widthB packB propB lowerB upperB packA propA lowerA upperA a.
(Measure measA, C vertA, C horizA, Measure measB, C vertB,
 C horizB, C heightA, C widthA, C heightB, C widthB) =>
Omni packB propB lowerB upperB measB vertB horizB heightB widthB
-> ArrayMatrix
     packA propA lowerA upperA measA vertA horizA heightA widthA a
-> ArrayMatrix
     packB propB lowerB upperB measB vertB horizB heightB widthB a
ArrMatrix.reshape
      (case Full meas vert horiz height width a
-> Omni
     Unpacked Arbitrary Filled Filled meas vert horiz height width
forall pack property lower upper meas vert horiz height width a.
ArrayMatrix
  pack property lower upper meas vert horiz height width a
-> Omni pack property lower upper meas vert horiz height width
ArrMatrix.shape Full meas vert horiz height width a
a of
         Omni.Full Full meas vert horiz height width
shape ->
            Full meas vert horiz height width
-> Omni
     Unpacked Arbitrary Filled Filled meas vert horiz height width
forall property lower upper meas vert horiz height width.
(Property property, Strip lower, Strip upper) =>
Full meas vert horiz height width
-> Omni Unpacked property lower upper meas vert horiz height width
Omni.Full (Full meas vert horiz height width
shape{fullOrder :: Order
Layout.fullOrder = General height width a -> Order
forall pack property lower upper meas vert horiz height width a.
ArrayMatrix
  pack property lower upper meas vert horiz height width a
-> Order
ArrMatrix.order General height width a
b}))
      General height width a
b




finalizeLayout :: (Shape.C shape) => (shape, [[a]]) -> BoxedArray.Array shape a
finalizeLayout :: (shape, [[a]]) -> Array shape a
finalizeLayout (shape
shape, [[a]]
a) = shape -> [a] -> Array shape a
forall sh a. C sh => sh -> [a] -> Array sh a
BoxedArray.fromList shape
shape ([a] -> Array shape a) -> [a] -> Array shape a
forall a b. (a -> b) -> a -> b
$ [[a]] -> [a]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat [[a]]
a

infixr 3 |||#
infixr 2 ===#

(|||#) ::
   (Eq height) =>
   ((height, widthA), [[a]]) ->
   ((height, widthB), [[a]]) ->
   ((height, widthA ::+ widthB), [[a]])
((height
heightA,widthA
widthA),[[a]]
a) |||# :: ((height, widthA), [[a]])
-> ((height, widthB), [[a]])
-> ((height, widthA ::+ widthB), [[a]])
|||# ((height
heightB,widthB
widthB),[[a]]
b) =
   if height
heightA height -> height -> Bool
forall a. Eq a => a -> a -> Bool
== height
heightB
      then ((height
heightA,widthA
widthAwidthA -> widthB -> widthA ::+ widthB
forall sh0 sh1. sh0 -> sh1 -> sh0 ::+ sh1
::+widthB
widthB), ([a] -> [a] -> [a]) -> [[a]] -> [[a]] -> [[a]]
forall a b c. (a -> b -> c) -> [a] -> [b] -> [c]
zipWith [a] -> [a] -> [a]
forall a. [a] -> [a] -> [a]
(++) [[a]]
a [[a]]
b)
      else String -> ((height, widthA ::+ widthB), [[a]])
forall a. HasCallStack => String -> a
error String
"Block.beside: mismatching heights"

(===#) ::
   (Eq width) =>
   ((heightA, width), [a]) ->
   ((heightB, width), [a]) ->
   ((heightA ::+ heightB, width), [a])
((heightA
heightA,width
widthA),[a]
a) ===# :: ((heightA, width), [a])
-> ((heightB, width), [a]) -> ((heightA ::+ heightB, width), [a])
===# ((heightB
heightB,width
widthB),[a]
b) =
   if width
widthA width -> width -> Bool
forall a. Eq a => a -> a -> Bool
== width
widthB
      then ((heightA
heightAheightA -> heightB -> heightA ::+ heightB
forall sh0 sh1. sh0 -> sh1 -> sh0 ::+ sh1
::+heightB
heightB,width
widthA), [a]
a [a] -> [a] -> [a]
forall a. [a] -> [a] -> [a]
++ [a]
b)
      else String -> ((heightA ::+ heightB, width), [a])
forall a. HasCallStack => String -> a
error String
"Block.above: mismatching widths"

toRows ::
   (Matrix.BoxExtra typ xl, Matrix.BoxExtra typ xu,
    Layout typ, LayoutExtra typ xl, LayoutExtra typ xu) =>
   (Extent.Measure meas, Extent.C vert, Extent.C horiz) =>
   (Shape.C height, Shape.C width, Class.Floating a) =>
   Matrix typ xl xu lower upper meas vert horiz height width a ->
   ((height, width), [[(Output.Separator, Maybe (Output.Style, a))]])
toRows :: Matrix typ xl xu lower upper meas vert horiz height width a
-> ((height, width), [[(Separator, Maybe (Style, a))]])
toRows Matrix typ xl xu lower upper meas vert horiz height width a
a = ((Matrix typ xl xu lower upper meas vert horiz height width a
-> height
forall typ xl xu meas vert horiz lower upper height width a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu, Measure meas, C vert,
 C horiz) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> height
Matrix.height Matrix typ xl xu lower upper meas vert horiz height width a
a, Matrix typ xl xu lower upper meas vert horiz height width a
-> width
forall typ xl xu meas vert horiz lower upper height width a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu, Measure meas, C vert,
 C horiz) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> width
Matrix.width Matrix typ xl xu lower upper meas vert horiz height width a
a), Array (height, width) (Separator, Maybe (Style, a))
-> [[(Separator, Maybe (Style, a))]]
forall height width a.
(C height, C width) =>
Array (height, width) a -> [[a]]
ArrFormat.toRows (Matrix typ xl xu lower upper meas vert horiz height width a
-> Array (height, width) (Separator, Maybe (Style, a))
forall typ xl xu meas vert horiz height width a lower upper.
(Layout typ, LayoutExtra typ xl, LayoutExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Array (height, width) (Separator, Maybe (Style, a))
layout Matrix typ xl xu lower upper meas vert horiz height width a
a))

toColumns ::
   (Matrix.BoxExtra typ xl, Matrix.BoxExtra typ xu,
    Layout typ, LayoutExtra typ xl, LayoutExtra typ xu) =>
   (Extent.Measure meas, Extent.C vert, Extent.C horiz) =>
   (Shape.C height, Shape.C width, Class.Floating a) =>
   Matrix typ xl xu lower upper meas vert horiz height width a ->
   ((width, height), [[(Output.Separator, Maybe (Output.Style, a))]])
toColumns :: Matrix typ xl xu lower upper meas vert horiz height width a
-> ((width, height), [[(Separator, Maybe (Style, a))]])
toColumns Matrix typ xl xu lower upper meas vert horiz height width a
a =
   ((Matrix typ xl xu lower upper meas vert horiz height width a
-> width
forall typ xl xu meas vert horiz lower upper height width a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu, Measure meas, C vert,
 C horiz) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> width
Matrix.width Matrix typ xl xu lower upper meas vert horiz height width a
a, Matrix typ xl xu lower upper meas vert horiz height width a
-> height
forall typ xl xu meas vert horiz lower upper height width a.
(Box typ, BoxExtra typ xl, BoxExtra typ xu, Measure meas, C vert,
 C horiz) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> height
Matrix.height Matrix typ xl xu lower upper meas vert horiz height width a
a), Array (height, width) (Separator, Maybe (Style, a))
-> [[(Separator, Maybe (Style, a))]]
forall height width a.
(C height, C width) =>
Array (height, width) a -> [[a]]
ArrFormat.toColumns (Matrix typ xl xu lower upper meas vert horiz height width a
-> Array (height, width) (Separator, Maybe (Style, a))
forall typ xl xu meas vert horiz height width a lower upper.
(Layout typ, LayoutExtra typ xl, LayoutExtra typ xu, Measure meas,
 C vert, C horiz, C height, C width, Floating a) =>
Matrix typ xl xu lower upper meas vert horiz height width a
-> Array (height, width) (Separator, Maybe (Style, a))
layout Matrix typ xl xu lower upper meas vert horiz height width a
a))

layoutEmpty ::
   (Shape.C height, Shape.C width) =>
   height -> width -> ((height, width), [[(Output.Separator, Maybe a)]])
layoutEmpty :: height -> width -> ((height, width), [[(Separator, Maybe a)]])
layoutEmpty height
height width
width =
   (,) (height
height, width
width) ([[(Separator, Maybe a)]]
 -> ((height, width), [[(Separator, Maybe a)]]))
-> [[(Separator, Maybe a)]]
-> ((height, width), [[(Separator, Maybe a)]])
forall a b. (a -> b) -> a -> b
$
   Int -> [(Separator, Maybe a)] -> [[(Separator, Maybe a)]]
forall a. Int -> a -> [a]
replicate (height -> Int
forall sh. C sh => sh -> Int
Shape.size height
height) ([(Separator, Maybe a)] -> [[(Separator, Maybe a)]])
-> [(Separator, Maybe a)] -> [[(Separator, Maybe a)]]
forall a b. (a -> b) -> a -> b
$
   Int -> (Separator, Maybe a) -> [(Separator, Maybe a)]
forall a. Int -> a -> [a]
replicate (width -> Int
forall sh. C sh => sh -> Int
Shape.size width
width) (Separator
Output.Space, Maybe a
forall a. Maybe a
Nothing)