Safe Haskell | None |
---|---|
Language | Haskell2010 |
Partial fraction decomposition for unary polynomials
Synopsis
- data PartialFractionDecomp k = PartialFraction {
- residualPoly :: Unipol k
- partialFracs :: NonEmpty (Unipol k, IntMap (Unipol k))
- partialFractionDecomposition :: (Field k, CoeffRing k, Functor m) => (Unipol k -> m (k, NonEmpty (Unipol k, Natural))) -> Fraction (Unipol k) -> m (PartialFractionDecomp k)
- scalePF :: CoeffRing k => k -> PartialFractionDecomp k -> PartialFractionDecomp k
- partialFractionDecompositionWith :: (CoeffRing k, Field k) => Unipol k -> NonEmpty (Unipol k, Natural) -> PartialFractionDecomp k
- pAdicExpansion :: (Field k, CoeffRing k) => Unipol k -> Unipol k -> IntMap (Unipol k)
- poweredPartialFraction :: forall k. (Field k, CoeffRing k) => Unipol k -> NonEmpty (Unipol k, Natural) -> NonEmpty ((Unipol k, Natural), Unipol k)
- scanZipper :: (NonEmpty a -> [a] -> b) -> NonEmpty a -> NonEmpty b
Documentation
data PartialFractionDecomp k Source #
PartialFraction | |
|
Instances
partialFractionDecomposition :: (Field k, CoeffRing k, Functor m) => (Unipol k -> m (k, NonEmpty (Unipol k, Natural))) -> Fraction (Unipol k) -> m (PartialFractionDecomp k) Source #
scalePF :: CoeffRing k => k -> PartialFractionDecomp k -> PartialFractionDecomp k Source #
partialFractionDecompositionWith Source #
:: (CoeffRing k, Field k) | |
=> Unipol k | Numerator |
-> NonEmpty (Unipol k, Natural) | Pairwise coprime (partial) factorisation of denominator \(f = \sum_i f_i^{e_i}\) with each \(f_i\) monic and non-constant. |
-> PartialFractionDecomp k |
Calculates the partial fraction decomposition with respect to the given pairwise coprime monic factorisation of the denominator.
>>>
partialFractionDecompositionWith (#x ^ 3 + 4 * #x^2 - #x - 2 :: Unipol Rational) ((#x, 2) :| [(#x - 1, 1), (#x + 1, 1)])
(x,fromList [(1,1),(2,2)]) :| [(x - 1,fromList [(1,1)]),(x + 1,fromList [(1,-1)])]
pAdicExpansion :: (Field k, CoeffRing k) => Unipol k -> Unipol k -> IntMap (Unipol k) Source #
gives a pAdicExpansion
f pp
-adic expansion of f
by a monic nonconstant polynomial p
; i.e. \(a_i \in k[X]\) such that \(\deg a_i < \deg p\)_{i < k}, \(\deg f < km\), and:
\[ f = a_{k - 1} p^{k-1} + \cdots + a_1 p + a_0. \]
>>>
pAdicExpansion (#x + 2 :: Unipol Rational) #x
fromList [(0,2),(1,1)]
poweredPartialFraction Source #
:: forall k. (Field k, CoeffRing k) | |
=> Unipol k | Numerator |
-> NonEmpty (Unipol k, Natural) | Pairwise coprime (partial) factorisation of denominator \(f = \sum_i f_i^{e_i}\) with each \(f_i\) monic and non-constant. |
-> NonEmpty ((Unipol k, Natural), Unipol k) |
Pseudo-partial fraction decomposition