add proof for transpose

This commit is contained in:
rnhmjoj 2016-11-16 22:06:19 +01:00
parent c631d24d38
commit 358fb280ae
No known key found for this signature in database
GPG Key ID: 362BB82B7E496B7C

View File

@ -175,7 +175,8 @@ intercalate xs xss = concat (intersperse xs xss)
-- --
transpose SingI n Vec (Vec a n) m Vec (Vec a m) n transpose SingI n Vec (Vec a n) m Vec (Vec a m) n
transpose Nil = replicate Nil transpose Nil = replicate Nil
transpose (xs :- xss) = zipWith (:-) xs (transpose xss) transpose (xs :- xss) = gcastWith proof (zipWith (:-) xs (transpose xss))
where proof = min_self (sLength xs)
-- | 'foldl' applied to a binary operator, a starting value -- | 'foldl' applied to a binary operator, a starting value