Introduce homogeneous coordinates

This commit is contained in:
Kiana Sheibani 2022-06-15 00:33:19 -04:00
parent acd0cb6aa5
commit 4b293d7e2a
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
5 changed files with 69 additions and 0 deletions

View file

@ -17,6 +17,10 @@ Matrix' : Nat -> Type -> Type
Matrix' n = Matrix n n
export
withDims : {0 m',n' : Nat} -> {0 b : Nat -> Nat -> Type} -> Matrix m' n' a -> ((m,n : Nat) -> Matrix m n a -> b m n) -> b m' n'
withDims mat f = rewrite shapeEq mat in f (head $ shape mat) (index 1 $ shape mat) (rewrite sym (shapeEq mat) in mat)
--------------------------------------------------------------------------------
-- Matrix constructors
--------------------------------------------------------------------------------