From: Antonio Jimenez Pastor Date: Tue, 16 Jul 2019 10:56:00 +0000 (+0200) Subject: Imprived the documentation of ddFunction.py file. X-Git-Url: http://git.risc.jku.at/gitweb/?a=commitdiff_plain;h=915949e59dbd8833f9c37646fa242cede1550b28;p=ajpastor%2Fdiff_defined_functions.git Imprived the documentation of ddFunction.py file. Slightly improved the demo adding the creation of a more elaborate element (for ISSAC'19 conference) --- diff --git a/ajpastor/dd_functions/ddFunction.py b/ajpastor/dd_functions/ddFunction.py index fb23363..b7df0ef 100644 --- a/ajpastor/dd_functions/ddFunction.py +++ b/ajpastor/dd_functions/ddFunction.py @@ -44,6 +44,7 @@ from sage.rings.polynomial.multi_polynomial import is_MPolynomial; from sage.rings.polynomial.polynomial_ring import is_PolynomialRing; from sage.structure.element import IntegralDomainElement; from sage.categories.integral_domains import IntegralDomains; +from sage.categories.fields import Fields; from sage.categories.pushout import pushout; from sage.categories.pushout import ConstructionFunctor; @@ -664,16 +665,112 @@ class DDRing (Ring_w_Sequence, IntegralDomain): OUTPUT:: List of generators provided by this ``DDRing``. + + EXAMPLES:: + sage: from ajpastor.dd_functions import *; + sage: DFinite.gens() + () + sage: R = ParametrizedDDRing(DFinite, ['a']); R.gens() + (a,) + sage: ParametrizedDDRing(R, ['b']).gens() + (b, a) ''' return (); def ngens(self): - return 0 ; + ''' + Return the number of generators of ``self``. + + General method for Parent structures that returns the number of generators required to generate ``self``. + + OUTPUT:: + Number of generators obtainded by ``selg.gens()``. + + EXAMPLES:: + sage: from ajpastor.dd_functions import *; + sage: DFinite.ngens() + 0 + sage: DDFinite.ngens() + 0 + sage: R = ParametrizedDDRing(DFinite, ['a']); R.ngens() + 1 + sage: ParametrizedDDRing(R, ['b']).ngens() + 2 + ''' + return len(self.gens()); def construction(self): + ''' + Returns a functor that built the DDRing. + + Method that returns a functor `F` and an Integral Domain `R` such that ``self == F(R)``. This method allows the + coerce system in Sage to handle ``DDFunctions`` and ``DDRings`` appropriately. + + OUTPUT:: + - A DDRingFunctor `F` + - An Integral Domain `R` + Such that ``F(R) == self``. Moreover, ``R in IntegralDomains()`` and ``isintance(DDRingFunctor, F)`` are both True. + + EXAMPLES:: + sage: from ajpastor.dd_functions import *; + sage: from ajpastor.dd_functions.ddFunction import DDRingFunctor; + sage: from ajpastor.dd_functions.ddFunction import ParametrizedDDRingFunctor; + sage: F,R = DFinite.construction(); + sage: F == DDRingFunctor(1,QQ) + True + sage: R == QQ[x] + True + sage: F,R = DDFinite.construction(); + sage: F == DDRingFunctor(2,QQ) + True + sage: R == QQ[x] + True + + The functor for Paramterized DDRings works a bit differently: it adds the parameters to the appropriate DDRing + sage: S = ParametrizedDDRing(DDFinite, ['a','b']) + sage: F, R = S.construction(); + sage: F == ParametrizedDDRingFunctor(2, QQ, set([var('a'), var('b')])) + True + sage: R == QQ[x] + True + ''' return (DDRingFunctor(self.depth(), self.base_field), self.__original); def __contains__(self, X): + ''' + Decide if an element belongs to ``self``. + + The method is implemented in a very generic way, looking if the parent of the input is related or has a coercion + with ``self``. In addition, we try to call the method ``_element_onstructor_`` of ``self`` to build an element from the input X, + whatever it is. + + See ``self._element_onstructor_?``, and ``self._has_coerce_map_from?`` for furhter information. + + OUTPUT:: + ``True`` or ``False`` depending if ``X`` can be casted to an element of ``self`` or not. + + EXAMPLES:: + sage: from ajpastor.dd_functions import *; + sage: Exp(x) in DFinite + True + sage: Exp(Sin(x)) in DFinite + False + sage: Exp(Sin(x)) in DDFinite + True + sage: var('s2'); F. = NumberField(s2^2 - 2); + sage: R = DDRing(F[x]); + sage: Exp(x) in R + True + sage: Exp(x) in DDFinite + True + sage: e2 = R.element([-s2,1], [1]); + sage: e2 in R + True + sage: e2 in DFinite + False + sage: e2 in DDFinite + False + ''' try: if((X.parent() is self) or (self._has_coerce_map_from(X.parent()))): return True; @@ -689,6 +786,26 @@ class DDRing (Ring_w_Sequence, IntegralDomain): ### Magic python methods ################################################# def __eq__(self, other): + ''' + Method to check equality of this Parent structure + + We consider that a Parent structure is equal to another if there are coercion maps from both structures. + + INPUT:: + * ``other`` -- a Sage object. + + OUTPUT:: + ``True`` if ``self`` and ``other`` are the same parent structure. + + TESTS:: + sage: from ajpastor.dd_functions import * + sage: DFinite == DFinite # implicit test + True + sage: DDFinite == DDFinite # implicit test + True + sage: DFinite == DDFinite # implicit test + False + ''' if(isinstance(other, DDRing)): return self._has_coerce_map_from(other) and other._has_coerce_map_from(self); return False; @@ -696,11 +813,29 @@ class DDRing (Ring_w_Sequence, IntegralDomain): ## Other magic methods def _repr_(self): ''' - Method implementing the __repr__ magic python method. Returns a string telling that self is a DDRing and which Ring is its base. + Method implementing the __repr__ magic python method. + + Returns a string telling that self is a DDRing and which Ring is its base. ''' return "DD-Ring over (%s)" %(self.base()); + + def _latex_(self): + ''' + Method creating the LaTeX representation for a DDRing. + + Returns a valid LaTeX string in math mode to print the DDRing in appropriate notation + ''' + return "\\text{D}\\left(%s\\right)" %latex(self.base()); def _to_command_(self): + ''' + Return the Sage command to create again the same DDRing + + This method returns a string that can be directly executed in Sage (once loaded the package) that + can recreate the object DDRing. + + This methos is called by the more general methos ``command`` provided by ``ajpastor.dd_functions``. + ''' return "DDRing(%s)" %command(self.base()); ################################################# @@ -708,18 +843,24 @@ class DDRing (Ring_w_Sequence, IntegralDomain): ################################################# def _an_element_(self): ''' + Create the element `1` for this ring. + Method inherited from Ring SAGE class. It returns an example of object that is in the DDRing. It simply returns the 1 element. + + OUTPUT:: + A DDFunction representing the element `1` in ``self``. ''' return self.one(); def random_element(self,**kwds): ''' - Method to compute a random element in this ring. This method relies in a random generator of the self.base() ring and a generator of - elements of the ring self.base_ring(). + Method to compute a random element in this ring. + + This method relies in a random generator of the self.base() ring and a generator of elements of the ring self.base_ring(). This method accepts different named arguments: - - "min_order": minimal order for the equation we would get (default to 1) - - "max_order": maximal order for the equation we would get (default to 3) - - "simple": if True, the leading coefficient will always be one (default True) + * "min_order" -- minimal order for the equation we would get (default to 1) + * "max_order" -- maximal order for the equation we would get (default to 3) + * "simple" -- if True, the leading coefficient will always be one (default True) ''' ## Getting the arguments values min_order = kwds.get("min_order", 1); @@ -758,12 +899,84 @@ class DDRing (Ring_w_Sequence, IntegralDomain): return self.base().characteristic(); def base_ring(self): + ''' + Return the base field for the coefficients of the elements. + + This is a required method for extending rings. In this case, we return the same as ``self.base_field()``. + + EXAMPLES:: + sage: from ajpastor.dd_functions import *; + sage: DFinite.base_ring() is DFinite.base_field() + True + sage: DFinite.base_ring() == QQ + True + sage: DDFinite.base_ring() == QQ + True + sage: var('s2'); F. = NumberField(s2^2 - 2); + sage: R = DDRing(F[x]); + sage: R.base_ring() == QQ + False + sage: R.base_ring() == F + True + sage: R.base_ring() is R.base_field() + + In the case of ParametrizedDDRing, the base field contains the parameters:: + sage: S = ParametrizedDDRing(DFinite, ['a','b']); + sage: pars = S.parameters(); + sage: S.base_ring() == FractionField(PolynomialRing(QQ, pars)); + True + ''' return self.base_field; def original_ring(self): + ''' + Return the original ring from which we build the iterative DDRing. + + This method returns the original ring from which `self` can be constructed iteratively as a DDRing. + See ``self.depth?`` for further information. + + OUTPUT:: + A integral domain `R` such that ``DDRing(R, depth=self.depth())`` is ``self``. + + EXAMPLES:: + sage: from ajpastor.dd_functions import * + sage: DFinite.original_ring() == QQ[x] + True + sage: DDFinite.original_ring() == QQ[x] + True + + As usual, the ParametrizedDDRing will include the parameters in the base field:: + sage: R = ParametrizedDDRing(DDFinite, ['a','b']); + sage: vars = R.parameters(); + sage: R.original_ring() == FractionField(PolynomialRing(QQ, vars))[x] + True + ''' return self.__original; def depth(self): + ''' + Return the depth on iteration of the construction of ``self`` as a Differentially Definable Ring. + + The method returns the depth of ``self`` as a DDRing. This is measure on how many times we iterate the + process of building a differentially definable ring from ``self.original_field()``. See + ``self.original_ring?`` for further information. + + OUTPUT:: + A (strictly) positive integer `n` such that ``DDRing(self.original_ring(), n)`` is ``self``. + + EXAMPLES:: + sage: from ajpastor.dd_functions import * + sage: DFinite.depth() + 1 + sage: DDFinite.depth() + 2 + + The ParametrizedDDRing will share the depth of the rings from where they are built:: + sage: ParametrizedDDRing(DDFinite, ['a','b']).depth() + 2 + sage: ParametrizedDDRing(DDRing(QQ[x], depth=10), ['a','b']).depth() + 10 + ''' return self.__depth; def to_depth(self, dest): @@ -773,12 +986,51 @@ class DDRing (Ring_w_Sequence, IntegralDomain): return DDRing(pushout(self.original_ring(), new_field), depth = self.depth(), base_field = pushout(self.base_field, new_field), invertibility = self.base_inversionCriteria, derivation = self.base_derivation, default_operator = self.default_operator); def is_field(self, **kwds): + ''' + Generic method for checking if ``self`` is a field. + + As we always work on the Formal Ring of power series on ``self.base_ring()``, this is never a field + + OUTPUT:: + False + + TESTS:: + sage: from ajpastor.dd_functions import * + sage: all(F.is_field() is False for F in [DFinite, DDFinite]) + True + ''' return False; def is_finite(self, **kwds): + ''' + Generic method for checking if ``self`` is finite. + + As we always work on the Formal Ring of power series on ``self.base_ring()``, this is never finite + + OUTPUT:: + False + + TESTS:: + sage: from ajpastor.dd_functions import * + sage: all(F.is_finite() is False for F in [DFinite, DDFinite]) + True + ''' return False; def is_noetherian(self, **kwds): + ''' + Generic method for checking if ``self`` is noetherian. + + As we always work on the Formal Ring of power series on ``self.base_ring()``, this is always noetherian. + + OUTPUT:: + True + + TESTS:: + sage: from ajpastor.dd_functions import * + sage: all(F.is_noetherian() is True for F in [DFinite, DDFinite]) + True + ''' return True; ################################################# @@ -876,18 +1128,7 @@ class DDRing (Ring_w_Sequence, IntegralDomain): if(len(self.__variables) == 0 and fill): return tuple([self.base()(var(DDRing._Default_variable))]); return tuple(self.base()(el) for el in self.__variables); - - #def getBaseMatrixSpace(self,nrows, ncols): - # ''' - # Method to get a MatrixSpace with coefficients in the coefficient Ring of the current DDRing with an specified dimension. - # - # INPUT: - # - ``nrows``: number or rows of the new MatrixSpace. - # - ``rcols``: number of columns of the new MatrixSpace. - # ''' - # return self.matrixSpace.matrix_space(nrows,ncols); - - + ############################################################################# ### ### Ring class for Parametrized DD Functions @@ -983,7 +1224,7 @@ class ParametrizedDDRing(DDRing): return not(not(coer)); def construction(self): - return (ParametrizedDDRingFunctor(self.depth(), self.base_field, set(self.__parameters)), self.__baseDDRing); + return (ParametrizedDDRingFunctor(self.depth(), self.__baseDDRing.base_field, set(self.__parameters)), self.__baseDDRing._DDRing__original); def base_ddRing(self): ''' @@ -2719,6 +2960,11 @@ class DDFunction (IntegralDomainElement): ##################################################### class DDRingFunctor (ConstructionFunctor): def __init__(self, depth, base_field): + if(depth <= 0): + raise ValueError("Depth can not be lower than 1 (DDRingFunctor)"); + if(not (base_field in Fields())): + raise TypeError("The base field must be a field (DDRingFunctor"); + self.rank = 11 ; self.__depth = depth; self.__base_field = base_field; @@ -2728,8 +2974,8 @@ class DDRingFunctor (ConstructionFunctor): def _coerce_into_domain(self, x): if(x not in self.domain()): raise TypeError("The object [%s] is not an element of [%s]" %(x, self.domain())); - if(isinstance(x, DDRing)): - return x.base(); + #if(isinstance(x, DDRing)): + # return x.base(); return x; def _apply_functor(self, x): @@ -2741,9 +2987,25 @@ class DDRingFunctor (ConstructionFunctor): def __eq__(self, other): if(other.__class__ == self.__class__): return ((other.__depth == self.__depth) and (other.__base_field == self.__base_field)) + + def merge(self, other): + ''' + Merging two DDRingFunctors or return None. + + For merging two DDRingFunctors, we need to be able to compute a common base field from both functors + and then go to the highest depth. It is interesting to remark that this is not the same as composing + two of these functors. + ''' + if(other.__class__ == self.__class__): + return DDRingFunctor(max(self.depth(), other.depth()), pushout(self.__base_field, other.__base_field)); + + return None; def depth(self): return self.__depth; + + def base_field(self): + return self.__base_field; class ParametrizedDDRingFunctor (DDRingFunctor): def __init__(self, depth, base_field, var = set([])): @@ -2758,19 +3020,29 @@ class ParametrizedDDRingFunctor (DDRingFunctor): return x; def _repr_(self): - return "ParametrizedDDRing(*,%s)" %(self.__vars); + return "ParametrizedDDRing(*,%d,%s,%s)" %(self.depth(), self.base_field(),self.__vars); def _apply_functor(self, x): - return ParametrizedDDRing(x, self.__vars); + return ParametrizedDDRing(DDRing(x, depth = self.depth(), base_field = self.base_field), self.__vars); def merge(self, other): - if(isinstance(other, ParametrizedDDRingFunctor)): - return ParametrizedDDRingFunctor(self.__vars.union(other.__vars)); + ''' + Merging ``self`` with another DDRingFunctor or return None. + + This method is able to merge the functor with a DDRingFunctor in addition with the standard ParametrizedDDRingFunctor. + The merging goes as follows: getting a common base field, computing the union of the (possibly empty) set of parameters + and going to the bigges depth provided in the functors + ''' + if(isinstance(other, DDRingFunctor)): + depth = max(self.depth(), other.depth()); + vars = self.__vars; + base_field = pushout(self.base_field(), other.base_field()); + if(isinstance(other, ParametrizedDDRingFunctor)): + vars = vars.union(other.__vars); + + return ParametrizedDDRingFunctor(depth, base_field, vars); return None; - def __repr__(self): - return super(ParametrizedDDRingFunctor, self).__repr__() + " - " + repr(self.__vars); - ##################################################### ### General Morphism for return to basic rings ##################################################### diff --git a/dd_functions_demo.ipynb b/dd_functions_demo.ipynb index 52413ea..458b830 100644 --- a/dd_functions_demo.ipynb +++ b/dd_functions_demo.ipynb @@ -168,7 +168,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 6, "metadata": {}, "outputs": [ { @@ -183,7 +183,7 @@ "(1:1:1)DD-Function in (DD-Ring over (Univariate Polynomial Ring in x over Rational Field))" ] }, - "execution_count": 7, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -202,7 +202,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -219,7 +219,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -239,7 +239,7 @@ "(2:2:7)DD-Function in (DD-Ring over (DD-Ring over (Univariate Polynomial Ring in x over Rational Field)))" ] }, - "execution_count": 9, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -258,7 +258,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -273,7 +273,7 @@ "(3:3:3)DD-Function in (DD-Ring over (Univariate Polynomial Ring in x over Rational Field))" ] }, - "execution_count": 11, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -284,7 +284,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -299,7 +299,7 @@ "(4:4:4)DD-Function in (DD-Ring over (Univariate Polynomial Ring in x over Rational Field))" ] }, - "execution_count": 12, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -320,7 +320,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 11, "metadata": {}, "outputs": [ { @@ -335,7 +335,7 @@ "(3:3:5)DD-Function in (DD-Ring over (Univariate Polynomial Ring in x over Number Field in s2 with defining polynomial x^2 - 2))" ] }, - "execution_count": 24, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -347,7 +347,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 12, "metadata": {}, "outputs": [ { @@ -383,7 +383,7 @@ "(4:4:35)DD-Function in (DD-Ring over (DD-Ring over (Univariate Polynomial Ring in x over Rational Field)))" ] }, - "execution_count": 13, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -395,7 +395,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 13, "metadata": {}, "outputs": [ { @@ -423,7 +423,7 @@ "(3:3:12)DD-Function in (DD-Ring over (DD-Ring over (Univariate Polynomial Ring in x over Rational Field)))" ] }, - "execution_count": 14, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -442,7 +442,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 14, "metadata": {}, "outputs": [ { @@ -454,7 +454,7 @@ "True" ] }, - "execution_count": 15, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } @@ -473,7 +473,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -485,7 +485,7 @@ "[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]" ] }, - "execution_count": 16, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -496,7 +496,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -508,7 +508,7 @@ "[1, 1, 1/2, 1/6, 1/24, 1/120, 1/720, 1/5040, 1/40320, 1/362880]" ] }, - "execution_count": 17, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -526,7 +526,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -546,7 +546,7 @@ "(1:1:3)DD-Function in (DD-Ring over (DD-Ring over (Univariate Polynomial Ring in x over Rational Field)))" ] }, - "execution_count": 18, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -557,7 +557,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -585,7 +585,7 @@ "(2:2:10)DD-Function in (DD-Ring over (DD-Ring over (Univariate Polynomial Ring in x over Rational Field)))" ] }, - "execution_count": 19, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } @@ -606,7 +606,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -642,7 +642,7 @@ "(4:4:35)DD-Function in (DD-Ring over (DD-Ring over (Univariate Polynomial Ring in x over Rational Field)))" ] }, - "execution_count": 20, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -660,7 +660,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 20, "metadata": {}, "outputs": [ { @@ -672,7 +672,7 @@ "True" ] }, - "execution_count": 21, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } @@ -690,7 +690,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 21, "metadata": {}, "outputs": [ { @@ -702,7 +702,7 @@ "True" ] }, - "execution_count": 22, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -714,7 +714,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 22, "metadata": {}, "outputs": [ { @@ -726,7 +726,7 @@ "True" ] }, - "execution_count": 23, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } @@ -747,7 +747,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 23, "metadata": {}, "outputs": [ { @@ -779,7 +779,7 @@ "1" ] }, - "execution_count": 27, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } @@ -802,7 +802,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 24, "metadata": {}, "outputs": [ { @@ -814,7 +814,7 @@ "True" ] }, - "execution_count": 28, + "execution_count": 24, "metadata": {}, "output_type": "execute_result" } @@ -835,89 +835,97 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 28, "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - " Welcome to ddExamples documentation. Here we describe the functions\n", - " available in this module. For further information on each function, \n", - " please access the documentation for that particular function.\n", - " \n", - " All the elements that are returned in this module are DDFunction, i.e.,\n", - " formal power series defined with a linear differential equation and\n", - " some appropriate initial values.\n", - " \n", - " When possible, the functions returned by this module are associated with\n", - " the usual implementation of those functions in SAGE, so using the \n", - " method \"to_symbolic()\" returns the same object in the Symbolic Ring.\n", - " \n", - " The functions available in this module are the following:\n", - " \n", - " ** TRIGONOMETRIC FUNCTIONS\n", - " - Sin\n", - " - Cos\n", - " - Tan\n", - " - Sinh\n", - " - Cosh\n", - " - Tanh\n", - " - Arcsin\n", - " - Arccos\n", - " - Arctan\n", - " - Arcsinh\n", - " - Arccosh\n", - " - Arctanh\n", - " ** EXPONENTIAL FUNCTIONS\n", - " - Exp\n", - " - Log\n", - " - Log1\n", - " ** BESSEL TYPE FUNCTIONS (see chapters 10, 11 in https://dlmf.nist.gov)\n", - " - BesselD\n", - " - StruveD\n", - " ** ORTHOGONAL POLRNOMAILS\n", - " - LegendreD (see chapter 14 in https://dlmf.nist.gov)\n", - " - ChebyshevD (see chapter 18 in https://dlmf.nist.gov)\n", - " ** HYPERGEOMETRIC FUNCTIONS (see chapters 15, 16 in https://dlmf.nist.gov)\n", - " - HypergeometricFunction\n", - " - GenericHypergeometricFunction\n", - " - Polylogarithms\n", - " ** RICCATI EQUATION (see https://en.wikipedia.org/wiki/Riccati_equation)\n", - " - RiccatiD\n", - " ** MATHIEU TYPE FUNCTIONS (see chapter 28 in https://dlmf.nist.gov)\n", - " - MathieuD\n", - " - MathieuSin\n", - " - MathieuCos\n", - " - MathieuH\n", - " - MathieuSinh\n", - " - MathieuCosh\n", - " - HillD\n", - " ** AIRY'S FUNCTIONS\n", - " - AiryD\n", - " ** PARABOLIC-CYLINDER TYPE FUNCTIONS\n", - " - ParabolicCylinderD\n", - " ** ELLIPTIC INTEGRALS (see chapter 19 in https://dlmf.nist.gov)\n", - " - EllipticLegendreD\n", - " ** SPHEROIDAL WAVE FUNCTIONS (see chapter 30 in https://dlmf.nist.gov)\n", - " - CoulombSpheroidalFunctionD\n", - " - SpheroidalWaveFunctionD\n", - " ** HEUN'S FUNCTIONS (see chapter 31 in https://dlmf.nist.gov)\n", - " - FuschianD\n", - " - HeunD\n", - " ** COULOMB WAVE FUNCTION (see chapter 33 in https://dlmf.nist.gov)\n", - " - CoulombF\n", - " \n", - " ** COMBINATORIAL FUNCTIONS\n", - " - Catalan\n", - " - Fibonacci\n", - " \n" - ] + "data": { + "text/html": [ + "" + ], + "text/plain": [ + "'\\n Welcome to ddExamples documentation. Here we describe the functions\\n available in this module. For further information on each function, \\n please access the documentation for that particular function.\\n \\n All the elements that are returned in this module are DDFunction, i.e.,\\n formal power series defined with a linear differential equation and\\n some appropriate initial values.\\n \\n When possible, the functions returned by this module are associated with\\n the usual implementation of those functions in SAGE, so using the \\n method \"to_symbolic()\" returns the same object in the Symbolic Ring.\\n \\n The functions available in this module are the following:\\n \\n ** TRIGONOMETRIC FUNCTIONS\\n - Sin\\n - Cos\\n - Tan\\n - Sinh\\n - Cosh\\n - Tanh\\n - Arcsin\\n - Arccos\\n - Arctan\\n - Arcsinh\\n - Arccosh\\n - Arctanh\\n ** EXPONENTIAL FUNCTIONS\\n - Exp\\n - Log\\n - Log1\\n ** BESSEL TYPE FUNCTIONS (see chapters 10, 11 in https://dlmf.nist.gov)\\n - BesselD\\n - StruveD\\n ** ORTHOGONAL POLRNOMAILS\\n - LegendreD (see chapter 14 in https://dlmf.nist.gov)\\n - ChebyshevD (see chapter 18 in https://dlmf.nist.gov)\\n ** HYPERGEOMETRIC FUNCTIONS (see chapters 15, 16 in https://dlmf.nist.gov)\\n - HypergeometricFunction\\n - GenericHypergeometricFunction\\n - Polylogarithms (see section 25.12 in https://dlmf.nist.gov)\\n ** RICCATI EQUATION (see https://en.wikipedia.org/wiki/Riccati_equation)\\n - RiccatiD\\n ** MATHIEU TYPE FUNCTIONS (see chapter 28 in https://dlmf.nist.gov)\\n - MathieuD\\n - MathieuSin\\n - MathieuCos\\n - MathieuH\\n - MathieuSinh\\n - MathieuCosh\\n - HillD\\n ** AIRY\\'S FUNCTIONS\\n - AiryD\\n ** PARABOLIC-CYLINDER TYPE FUNCTIONS\\n - ParabolicCylinderD\\n ** ELLIPTIC INTEGRALS (see chapter 19 in https://dlmf.nist.gov)\\n - EllipticLegendreD\\n ** SPHEROIDAL WAVE FUNCTIONS (see chapter 30 in https://dlmf.nist.gov)\\n - CoulombSpheroidalFunctionD\\n - SpheroidalWaveFunctionD\\n ** HEUN\\'S FUNCTIONS (see chapter 31 in https://dlmf.nist.gov)\\n - FuschianD\\n - HeunD\\n ** COULOMB WAVE FUNCTION (see chapter 33 in https://dlmf.nist.gov)\\n - CoulombF\\n \\n ** COMBINATORIAL FUNCTIONS\\n - Catalan\\n - Fibonacci\\n '" + ] + }, + "execution_count": 28, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ - "ddExamples()" + "ddExamples_log.__doc__" ] }, { @@ -931,7 +939,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 31, "metadata": {}, "outputs": [ { @@ -955,6 +963,29 @@ ] }, { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "" + ], + "text/plain": [ + "True" + ] + }, + "execution_count": 32, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "Exp(Exp(x)-1) == DDFinite.element([-Exp(x),1],[1])" + ] + }, + { "cell_type": "markdown", "metadata": {}, "source": [ @@ -972,8 +1003,8 @@ ], "metadata": { "kernelspec": { - "display_name": "SageMath 8.8.beta3", - "language": "", + "display_name": "SageMath 8.8", + "language": "sage", "name": "sagemath" }, "language_info": {