Skip to content

Commit

Permalink
Merge pull request #21 from cdepillabout/add-fixme-about-banach-laws
Browse files Browse the repository at this point in the history
Add a FIXME about the Banach laws.
  • Loading branch information
mikeizbicki committed Sep 10, 2015
2 parents 407b9aa + ff93cef commit b5433b9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/SubHask/Algebra.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2118,6 +2118,12 @@ class (VectorSpace v, Normed v, Metric v) => Banach v where
normalize :: v -> v
normalize v = v ./ size v

-- | These laws correspond to the actual math class, but they don't
-- actually hold for 'Float' and 'Double'.
--
-- FIXME:
-- Find a way to actually test these laws and add them to
-- "SubHask.TemplateHaskell.Test".
law_Banach_distance :: Banach v => v -> v -> Logic (Scalar v)
law_Banach_distance v1 v2 = size (v1 - v2) == distance v1 v2

Expand Down

0 comments on commit b5433b9

Please sign in to comment.