diff --git a/src/Data/Maclaurin.hs b/src/Data/Maclaurin.hs
--- a/src/Data/Maclaurin.hs
+++ b/src/Data/Maclaurin.hs
@@ -42,6 +42,8 @@
   ) 
     where
 
+-- import Control.Applicative (liftA2)
+import Data.Function (on)
 
 import Data.VectorSpace
 import Data.NumInstances ()
@@ -49,6 +51,7 @@
 import Data.Basis
 import Data.LinearMap
 
+import Data.Boolean
 
 infixr 9 `D`
 -- | Tower of derivatives.
@@ -61,17 +64,11 @@
 noOv :: String -> a
 noOv op = error (op ++ ": not defined on a :> b")
 
--- -- | Derivative tower full of 'zeroV'.
--- dZero :: (AdditiveGroup b, HasBasis a, HasTrie (Basis a)) => a:>b
--- dZero = pureD zeroV
-
 -- | Constant derivative tower.
 pureD :: (AdditiveGroup b, HasBasis a, HasTrie (Basis a)) => b -> a:>b
 pureD b = b `D` zeroV
 
--- pureD b = b `D` pure dZero
 
-
 infixl 4 <$>>
 -- | Map a /linear/ function over a derivative tower.
 fmapD, (<$>>) :: (HasBasis a, HasTrie (Basis a), AdditiveGroup b) =>
@@ -191,10 +188,26 @@
   show (D b0 _) = "D " ++ show b0  ++ " ..."
 
 instance Eq   b => Eq   (a :> b) where (==)    = noOv "(==)"
-instance Ord  b => Ord  (a :> b) where compare = noOv "compare"
 
+instance (AdditiveGroup v, HasBasis u, HasTrie (Basis u), IfB b v) =>
+      IfB b (u :> v) where
+  ifB = liftD2 . ifB
+
+instance (AdditiveGroup v, HasBasis u, HasTrie (Basis u), OrdB b v) =>
+         OrdB b (u :> v) where
+  (<*) = (<*) `on` powVal
+
+instance ( AdditiveGroup b, HasBasis a, HasTrie (Basis a)
+         , OrdB bool b, IfB bool b, Ord  b) => Ord  (a :> b) where
+  compare = compare `on` powVal
+  min     = minB
+  max     = maxB
+
+-- minB & maxB use ifB, and so can work even if b is an expression type,
+-- as in deep DSELs.
+
 instance (HasBasis a, HasTrie (Basis a), AdditiveGroup u) => AdditiveGroup (a :> u) where
-  zeroV   = pureD  zeroV    -- or dZero
+  zeroV   = pureD  zeroV
   negateV = fmapD  negateV
   D a0 a' ^+^ D b0 b' = D (a0 ^+^ b0) (a' ^+^ b')
   -- Less efficient: adds zero
@@ -247,7 +260,7 @@
          , Fractional s, VectorSpace s, Scalar s ~ s)
          => Fractional (a:>s) where
   fromRational = pureD . fromRational
-  recip        = recip >-< recip sqr
+  recip        = recip >-< - recip sqr
 
 sqr :: Num a => a -> a
 sqr x = x*x
diff --git a/vector-space.cabal b/vector-space.cabal
--- a/vector-space.cabal
+++ b/vector-space.cabal
@@ -1,5 +1,5 @@
 Name:                vector-space
-Version:             0.5.7
+Version:             0.5.9
 Cabal-Version:       >= 1.2
 Synopsis:            Vector & affine spaces, linear maps, and derivatives (requires ghc 6.9 or better)
 Category:            math
@@ -28,7 +28,7 @@
 Library
   hs-Source-Dirs:      src
   Extensions:          
-  Build-Depends:       base, MemoTrie >= 0.4.2
+  Build-Depends:       base, MemoTrie >= 0.4.2, Boolean
   Exposed-Modules:     
                      Data.AdditiveGroup
                      Data.VectorSpace
