Two-variate power series.

- newtype T a = Cons {}
- type Core a = [[a]]
- isValid :: [[a]] -> Bool
- check :: [[a]] -> [[a]]
- fromCoeffs :: [[a]] -> T a
- fromPowerSeries0 :: C a => T a -> T a
- fromPowerSeries1 :: C a => T a -> T a
- lift0 :: Core a -> T a
- lift1 :: (Core a -> Core a) -> T a -> T a
- lift2 :: (Core a -> Core a -> Core a) -> T a -> T a -> T a
- lift0fromPowerSeries :: [T a] -> Core a
- lift1fromPowerSeries :: ([T a] -> [T a]) -> Core a -> Core a
- lift2fromPowerSeries :: ([T a] -> [T a] -> [T a]) -> Core a -> Core a -> Core a
- const :: a -> T a
- appPrec :: Int
- sub :: C a => Core a -> Core a -> Core a
- add :: C a => Core a -> Core a -> Core a
- negate :: C a => Core a -> Core a
- scale :: C a => a -> Core a -> Core a
- mul :: C a => Core a -> Core a -> Core a
- divide :: C a => Core a -> Core a -> Core a
- sqrt :: C a => (a -> a) -> Core a -> Core a
- swapVariables :: Core a -> Core a
- differentiate0 :: C a => Core a -> Core a
- differentiate1 :: C a => Core a -> Core a
- integrate0 :: C a => [a] -> Core a -> Core a
- integrate1 :: C a => [a] -> Core a -> Core a
- comp :: C a => [a] -> Core a -> Core a

# Documentation

In order to handle both variables equivalently we maintain a list of coefficients for terms of the same total degree. That is

eval [[a], [b,c], [d,e,f]] (x,y) == a + b*x+c*y + d*x^2+e*x*y+f*y^2

Although the sub-lists are always finite and thus are more like polynomials than power series, division and square root computation are easier to implement for power series.

fromCoeffs :: [[a]] -> T aSource

fromPowerSeries0 :: C a => T a -> T aSource

fromPowerSeries1 :: C a => T a -> T aSource

lift0fromPowerSeries :: [T a] -> Core aSource

# Series arithmetic

swapVariables :: Core a -> Core aSource

differentiate0 :: C a => Core a -> Core aSource

differentiate1 :: C a => Core a -> Core aSource

integrate0 :: C a => [a] -> Core a -> Core aSource

integrate1 :: C a => [a] -> Core a -> Core aSource