Multiseries definitions #
In this file, we define the multiseries and its main properties: sortedness and approximation.
A multiseries in a basis [b₁, ..., bₙ] represents a multivariate series:
it is a formal series made from monomials b₁ ^ e₁ * ... * bₙ ^ eₙ where e₁, ..., eₙ are real
numbers. We treat multivariate series in a basis [b₁, ..., bₙ] as a univariate series in the
variable b₁ (basis_hd) with coefficients being multiseries
in the basis [b₂, ..., bₙ] (basis_tl).
Main definitions #
Basisis the list of functions used to construct monomials in multiseries.Multiseries basis_hd basis_tlis the type of multiseries in a basisbasis_hd :: basis_tl.MultiseriesExpansion basisis a multiseries expansion of some functionf : ℝ → ℝ. Ifbasis = [], then the multiseries represents a constant function, otherwise it is a pair of a multiseriesms : Multiseries basis_hd basis_tland a functionf : ℝ → ℝ.
Implementation details #
Multiseries basis_hd basis_tlis defined as aSeq (ℝ × MultiseriesExpansion basis_tl), so we need to port someSeqAPI toMultiseries.
List of functions used to construct monomials in multiseries.
Equations
- ComputeAsymptotics.Basis = List (ℝ → ℝ)
Instances For
Multiseries representing a given function f : ℝ → ℝ.
MultiseriesExpansion [] is just ℝ: multiseries representing constant functions.
Otherwise it is a pair of a Multiseries basis_hd basis_tl and a function ℝ → ℝ. We call
the former an expansion of the latter.
Note: most of the theory can be formulated in terms of Multiseries, but we need to explicitly
store the approximated function to be able to use the eventual zeroness oracle at the trimming step.
Equations
- ComputeAsymptotics.MultiseriesExpansion [] = ℝ
- ComputeAsymptotics.MultiseriesExpansion (head :: basis_tl) = (Stream'.Seq (ℝ × ComputeAsymptotics.MultiseriesExpansion basis_tl) × (ℝ → ℝ))
Instances For
Multiseries in a basis basis_hd :: basis_tl. It is a generalisation of asymptotic expansions.
A multiseries in a basis [b₁, ..., bₙ] is a formal series made from monomials
b₁ ^ e₁ * ... * bₙ ^ eₙ where e₁, ..., eₙ are real numbers. We treat multivariate series in
a basis [b₁, ..., bₙ] as a univariate series in the variable b₁ (basis_hd) with coefficients
being multiseries in the basis [b₂, ..., bₙ] (basis_tl). We represent such a series as a lazy
list (Seq) of pairs (exp, coef) where exp is the exponent of b₁ and coef is the
coefficient (a multiseries in basis_tl).
MultiseriesExpansion is a Multiseries with an attached real function.
Equations
- ComputeAsymptotics.MultiseriesExpansion.Multiseries basis_hd basis_tl = Stream'.Seq (ℝ × ComputeAsymptotics.MultiseriesExpansion basis_tl)
Instances For
Converts a Multiseries basis_hd basis_tl to a Seq (ℝ × MultiseriesExpansion basis_tl).
Instances For
The empty multiseries.
Instances For
Prepend a monomial to a multiseries.
Equations
- ComputeAsymptotics.MultiseriesExpansion.Multiseries.cons exp coef tl = Stream'.Seq.cons (exp, coef) tl
Instances For
Recursion principle for Multiseries basis_hd basis_tl. It is equivalent to
Stream'.Seq.recOn but provides some convenience.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Destruct a multiseries into a triple (exp, coef, tl), where exp is the leading exponent,
coef is the leading coefficient, and tl is the tail.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The head of a multiseries, i.e. the first two entries of the tuple returned by destruct.
Equations
- ms.head = Stream'.Seq.head ms
Instances For
The tail of a multiseries, i.e. the last entry of the tuple returned by destruct.
Equations
- ms.tail = Stream'.Seq.tail ms
Instances For
Given two functions f : ℝ → ℝ and
g : MultiseriesExpansion basis_tl → MultiseriesExpansion basis_tl', apply them to exponents and
coefficients of a multiseries.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Corecursor for Multiseries basis_hd basis_tl.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Convert a real number to a multiseries in an empty basis.
Equations
Instances For
Convert a multiseries in an empty basis to a real number.
Instances For
Convert a multiseries in a non-empty basis to a sequence of pairs (exp, coef).
Instances For
Constructs a multiseries from a Multiseries basis_hd basis_tl and a function.
Equations
Instances For
Recursion principle for MultiseriesExpansion (basis_hd :: basis_tl).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Replace the function attached to a multiseries.