login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for SandBoxDifferentialPolynomial revision 1 of 2

1 2
Editor: Bill Page
Time: 2009/07/29 09:16:52 GMT-7
Note: new

changed:
-
Description --
DifferentialSparseMultivariatePolynomial} implements an ordinary differential polynomial ring by combining a domain belonging to the category DifferentialVariableCategory with the domain SparseMultivariatePolynomial.

Author --  William Sit

Date Created -- 19 July 1990

Date Last Updated -- 13 September 1991

**Basic Operations**
\begin{axiom}
)show DifferentialPolynomialCategory
\end{axiom}

References -- Kolchin, E.R. "Differential Algebra and Algebraic Groups" (Academic Press, 1973).

**Example**
\begin{axiom}
odvar:=ODVAR Symbol
-- here are the first 5 derivatives of w
-- the i-th derivative of w is printed as w subscript 5
[makeVariable('w,i)$odvar for i in 5..0 by -1]
-- these are now algebraic indeterminates, ranked in an orderly way
-- in increasing order:
sort %
-- we now make a general differential polynomial ring
-- instead of ODVAR, one can also use SDVAR for sequential ordering
dpol:=DSMP (FRAC INT, Symbol, odvar);
-- instead of using makeVariable, it is easier to
-- think of a differential variable w as a map, where
-- w.n is n-th derivative of w as an algebraic indeterminate
w := makeVariable('w)$dpol
-- create another one called z, which is higher in rank than w
-- since we are ordering by Symbol
z := makeVariable('z)$dpol
-- now define some differential polynomial
(f,b):dpol
f:=w.4::dpol - w.1 * w.1 * z.3
b:=(z.1::dpol)^3 * (z.2)^2 - w.2
-- compute the leading derivative appearing in b
lb:=leader b
-- the separant is the partial derivative of b with respect to its leader
sb:=separant b
-- of course you can differentiate these differential polynomials
-- and try to reduce f modulo the differential ideal generated by b
-- first eliminate z.3 using the derivative of b
bprime:= differentiate b
-- find its leader
lbprime:= leader bprime
-- differentiate f partially with respect to lbprime
pbf:=differentiate (f, lbprime)
-- to obtain the partial remainder of f with respect to b
ftilde:=sb * f- pbf * bprime
-- note high powers of lb still appears in ftilde
-- the initial is the leading coefficient when b is written
-- as a univariate polynomial in its leader
ib:=initial b
-- compute the leading coefficient of ftilde
-- as a polynomial in its leader
lcef:=leadingCoefficient univariate(ftilde, lb)
-- now to continue eliminating the high powers of lb appearing in ftilde:
-- to obtain the remainder of f modulo b and its derivatives

f0:=ib * ftilde - lcef * b * lb

\end{axiom}


Description
DifferentialSparseMultivariatePolynomial?} implements an ordinary differential polynomial ring by combining a domain belonging to the category DifferentialVariableCategory? with the domain SparseMultivariatePolynomial?.
Author
William Sit
Date Created
19 July 1990
Date Last Updated
13 September 1991

Basic Operations

axiom
)show DifferentialPolynomialCategory
DifferentialPolynomialCategory(R: Ring,S: OrderedSet,V: DifferentialVariableCategory t#2,E: OrderedAbelianMonoidSup) is a category constructor Abbreviation for DifferentialPolynomialCategory is DPOLCAT This constructor is exposed in this frame. Issue )edit /usr/local/lib/axiom/target/x86_64-unknown- linux/../../src/algebra/DPOLCAT.spad to see algebra source code for DPOLCAT
------------------------------- Operations -------------------------------- ?*? : (%,R) -> % ?*? : (R,%) -> % ?*? : (%,%) -> % ?*? : (Integer,%) -> % ?*? : (PositiveInteger,%) -> % ?**? : (%,PositiveInteger) -> % ?+? : (%,%) -> % ?-? : (%,%) -> % -? : % -> % ?=? : (%,%) -> Boolean D : (%,(R -> R)) -> % D : % -> % if R has DIFRING D : (%,List V) -> % D : (%,V) -> % 1 : () -> % 0 : () -> % ?^? : (%,PositiveInteger) -> % coefficient : (%,E) -> R coefficients : % -> List R coerce : S -> % coerce : V -> % coerce : R -> % coerce : Integer -> % coerce : % -> OutputForm degree : % -> E differentiate : (%,List V) -> % differentiate : (%,V) -> % eval : (%,List V,List %) -> % eval : (%,V,%) -> % eval : (%,List V,List R) -> % eval : (%,V,R) -> % eval : (%,List %,List %) -> % eval : (%,%,%) -> % eval : (%,Equation %) -> % eval : (%,List Equation %) -> % ground : % -> R ground? : % -> Boolean hash : % -> SingleInteger initial : % -> % isobaric? : % -> Boolean latex : % -> String leader : % -> V leadingCoefficient : % -> R leadingMonomial : % -> % map : ((R -> R),%) -> % mapExponents : ((E -> E),%) -> % minimumDegree : % -> E monomial : (R,E) -> % monomial? : % -> Boolean monomials : % -> List % one? : % -> Boolean order : % -> NonNegativeInteger pomopo! : (%,R,E,%) -> % primitiveMonomials : % -> List % recip : % -> Union(%,"failed") reductum : % -> % retract : % -> S retract : % -> V retract : % -> R sample : () -> % separant : % -> % variables : % -> List V weight : % -> NonNegativeInteger zero? : % -> Boolean ?~=? : (%,%) -> Boolean ?*? : (Fraction Integer,%) -> % if R has ALGEBRA FRAC INT ?*? : (%,Fraction Integer) -> % if R has ALGEBRA FRAC INT ?*? : (NonNegativeInteger,%) -> % ?**? : (%,NonNegativeInteger) -> % ?/? : (%,R) -> % if R has FIELD ?<? : (%,%) -> Boolean if R has ORDSET ?<=? : (%,%) -> Boolean if R has ORDSET ?>? : (%,%) -> Boolean if R has ORDSET ?>=? : (%,%) -> Boolean if R has ORDSET D : (%,(R -> R),NonNegativeInteger) -> % D : (%,List Symbol,List NonNegativeInteger) -> % if R has PDRING SYMBOL D : (%,Symbol,NonNegativeInteger) -> % if R has PDRING SYMBOL D : (%,List Symbol) -> % if R has PDRING SYMBOL D : (%,Symbol) -> % if R has PDRING SYMBOL D : (%,NonNegativeInteger) -> % if R has DIFRING D : (%,List V,List NonNegativeInteger) -> % D : (%,V,NonNegativeInteger) -> % ?^? : (%,NonNegativeInteger) -> % associates? : (%,%) -> Boolean if R has INTDOM binomThmExpt : (%,%,NonNegativeInteger) -> % if R has COMRING characteristic : () -> NonNegativeInteger charthRoot : % -> Union(%,"failed") if and(has($,CharacteristicNonZero),has(R,PolynomialFactorizationExplicit)) or R has CHARNZ coefficient : (%,List V,List NonNegativeInteger) -> % coefficient : (%,V,NonNegativeInteger) -> % coerce : % -> % if R has INTDOM coerce : Fraction Integer -> % if R has RETRACT FRAC INT or R has ALGEBRA FRAC INT conditionP : Matrix % -> Union(Vector %,"failed") if and(has($,CharacteristicNonZero),has(R,PolynomialFactorizationExplicit)) content : (%,V) -> % if R has GCDDOM content : % -> R if R has GCDDOM convert : % -> InputForm if V has KONVERT INFORM and R has KONVERT INFORM convert : % -> Pattern Integer if V has KONVERT PATTERN INT and R has KONVERT PATTERN INT convert : % -> Pattern Float if V has KONVERT PATTERN FLOAT and R has KONVERT PATTERN FLOAT degree : (%,S) -> NonNegativeInteger degree : (%,List V) -> List NonNegativeInteger degree : (%,V) -> NonNegativeInteger differentialVariables : % -> List S differentiate : (%,(R -> R)) -> % differentiate : (%,(R -> R),NonNegativeInteger) -> % differentiate : (%,List Symbol,List NonNegativeInteger) -> % if R has PDRING SYMBOL differentiate : (%,Symbol,NonNegativeInteger) -> % if R has PDRING SYMBOL differentiate : (%,List Symbol) -> % if R has PDRING SYMBOL differentiate : (%,Symbol) -> % if R has PDRING SYMBOL differentiate : (%,NonNegativeInteger) -> % if R has DIFRING differentiate : % -> % if R has DIFRING differentiate : (%,List V,List NonNegativeInteger) -> % differentiate : (%,V,NonNegativeInteger) -> % discriminant : (%,V) -> % if R has COMRING eval : (%,List S,List R) -> % if R has DIFRING eval : (%,S,R) -> % if R has DIFRING eval : (%,List S,List %) -> % if R has DIFRING eval : (%,S,%) -> % if R has DIFRING exquo : (%,%) -> Union(%,"failed") if R has INTDOM exquo : (%,R) -> Union(%,"failed") if R has INTDOM factor : % -> Factored % if R has PFECAT factorPolynomial : SparseUnivariatePolynomial % -> Factored SparseUnivariatePolynomial % if R has PFECAT factorSquareFreePolynomial : SparseUnivariatePolynomial % -> Factored SparseUnivariatePolynomial % if R has PFECAT gcd : (%,%) -> % if R has GCDDOM gcd : List % -> % if R has GCDDOM gcdPolynomial : (SparseUnivariatePolynomial %,SparseUnivariatePolynomial %) -> SparseUnivariatePolynomial % if R has GCDDOM isExpt : % -> Union(Record(var: V,exponent: NonNegativeInteger),"failed") isPlus : % -> Union(List %,"failed") isTimes : % -> Union(List %,"failed") lcm : (%,%) -> % if R has GCDDOM lcm : List % -> % if R has GCDDOM mainVariable : % -> Union(V,"failed") makeVariable : % -> (NonNegativeInteger -> %) if R has DIFRING makeVariable : S -> (NonNegativeInteger -> %) max : (%,%) -> % if R has ORDSET min : (%,%) -> % if R has ORDSET minimumDegree : (%,List V) -> List NonNegativeInteger minimumDegree : (%,V) -> NonNegativeInteger monicDivide : (%,%,V) -> Record(quotient: %,remainder: %) monomial : (%,List V,List NonNegativeInteger) -> % monomial : (%,V,NonNegativeInteger) -> % multivariate : (SparseUnivariatePolynomial %,V) -> % multivariate : (SparseUnivariatePolynomial R,V) -> % numberOfMonomials : % -> NonNegativeInteger order : (%,S) -> NonNegativeInteger patternMatch : (%,Pattern Integer,PatternMatchResult(Integer,%)) -> PatternMatchResult(Integer,%) if V has PATMAB INT and R has PATMAB INT patternMatch : (%,Pattern Float,PatternMatchResult(Float,%)) -> PatternMatchResult(Float,%) if V has PATMAB FLOAT and R has PATMAB FLOAT prime? : % -> Boolean if R has PFECAT primitivePart : (%,V) -> % if R has GCDDOM primitivePart : % -> % if R has GCDDOM reducedSystem : Matrix % -> Matrix R reducedSystem : (Matrix %,Vector %) -> Record(mat: Matrix R,vec: Vector R) reducedSystem : (Matrix %,Vector %) -> Record(mat: Matrix Integer,vec: Vector Integer) if R has LINEXP INT reducedSystem : Matrix % -> Matrix Integer if R has LINEXP INT resultant : (%,%,V) -> % if R has COMRING retract : % -> Integer if R has RETRACT INT retract : % -> Fraction Integer if R has RETRACT FRAC INT retractIfCan : % -> Union(S,"failed") retractIfCan : % -> Union(V,"failed") retractIfCan : % -> Union(Integer,"failed") if R has RETRACT INT retractIfCan : % -> Union(Fraction Integer,"failed") if R has RETRACT FRAC INT retractIfCan : % -> Union(R,"failed") solveLinearPolynomialEquation : (List SparseUnivariatePolynomial %,SparseUnivariatePolynomial %) -> Union(List SparseUnivariatePolynomial %,"failed") if R has PFECAT squareFree : % -> Factored % if R has GCDDOM squareFreePart : % -> % if R has GCDDOM squareFreePolynomial : SparseUnivariatePolynomial % -> Factored SparseUnivariatePolynomial % if R has PFECAT subtractIfCan : (%,%) -> Union(%,"failed") totalDegree : (%,List V) -> NonNegativeInteger totalDegree : % -> NonNegativeInteger unit? : % -> Boolean if R has INTDOM unitCanonical : % -> % if R has INTDOM unitNormal : % -> Record(unit: %,canonical: %,associate: %) if R has INTDOM univariate : % -> SparseUnivariatePolynomial R univariate : (%,V) -> SparseUnivariatePolynomial % weight : (%,S) -> NonNegativeInteger weights : (%,S) -> List NonNegativeInteger weights : % -> List NonNegativeInteger

References
Kolchin, E.R. "Differential Algebra and Algebraic Groups" (Academic Press, 1973).

Example

axiom
odvar:=ODVAR Symbol
LatexWiki Image(1)
Type: Domain
axiom
-- here are the first 5 derivatives of w
-- the i-th derivative of w is printed as w subscript 5
[makeVariable('w,i)$odvar for i in 5..0 by -1]
LatexWiki Image(2)
Type: List OrderlyDifferentialVariable? Symbol
axiom
-- these are now algebraic indeterminates, ranked in an orderly way
-- in increasing order:
sort %
LatexWiki Image(3)
Type: List OrderlyDifferentialVariable? Symbol
axiom
-- we now make a general differential polynomial ring
-- instead of ODVAR, one can also use SDVAR for sequential ordering
dpol:=DSMP (FRAC INT, Symbol, odvar);
Type: Domain
axiom
-- instead of using makeVariable, it is easier to
-- think of a differential variable w as a map, where
-- w.n is n-th derivative of w as an algebraic indeterminate
w := makeVariable('w)$dpol
LatexWiki Image(4)
Type: (NonNegativeInteger? -> DifferentialSparseMultivariatePolynomial?(Fraction Integer,Symbol,OrderlyDifferentialVariable? Symbol))
axiom
-- create another one called z, which is higher in rank than w
-- since we are ordering by Symbol
z := makeVariable('z)$dpol
LatexWiki Image(5)
Type: (NonNegativeInteger? -> DifferentialSparseMultivariatePolynomial?(Fraction Integer,Symbol,OrderlyDifferentialVariable? Symbol))
axiom
-- now define some differential polynomial
(f,b):dpol
Type: Void
axiom
f:=w.4::dpol - w.1 * w.1 * z.3
LatexWiki Image(6)
Type: DifferentialSparseMultivariatePolynomial?(Fraction Integer,Symbol,OrderlyDifferentialVariable? Symbol)
axiom
b:=(z.1::dpol)^3 * (z.2)^2 - w.2
LatexWiki Image(7)
Type: DifferentialSparseMultivariatePolynomial?(Fraction Integer,Symbol,OrderlyDifferentialVariable? Symbol)
axiom
-- compute the leading derivative appearing in b
lb:=leader b
LatexWiki Image(8)
Type: OrderlyDifferentialVariable? Symbol
axiom
-- the separant is the partial derivative of b with respect to its leader
sb:=separant b
LatexWiki Image(9)
Type: DifferentialSparseMultivariatePolynomial?(Fraction Integer,Symbol,OrderlyDifferentialVariable? Symbol)
axiom
-- of course you can differentiate these differential polynomials
-- and try to reduce f modulo the differential ideal generated by b
-- first eliminate z.3 using the derivative of b
bprime:= differentiate b
LatexWiki Image(10)
Type: DifferentialSparseMultivariatePolynomial?(Fraction Integer,Symbol,OrderlyDifferentialVariable? Symbol)
axiom
-- find its leader
lbprime:= leader bprime
LatexWiki Image(11)
Type: OrderlyDifferentialVariable? Symbol
axiom
-- differentiate f partially with respect to lbprime
pbf:=differentiate (f, lbprime)
LatexWiki Image(12)
Type: DifferentialSparseMultivariatePolynomial?(Fraction Integer,Symbol,OrderlyDifferentialVariable? Symbol)
axiom
-- to obtain the partial remainder of f with respect to b
ftilde:=sb * f- pbf * bprime
LatexWiki Image(13)
Type: DifferentialSparseMultivariatePolynomial?(Fraction Integer,Symbol,OrderlyDifferentialVariable? Symbol)
axiom
-- note high powers of lb still appears in ftilde
-- the initial is the leading coefficient when b is written
-- as a univariate polynomial in its leader
ib:=initial b
LatexWiki Image(14)
Type: DifferentialSparseMultivariatePolynomial?(Fraction Integer,Symbol,OrderlyDifferentialVariable? Symbol)
axiom
-- compute the leading coefficient of ftilde
-- as a polynomial in its leader
lcef:=leadingCoefficient univariate(ftilde, lb)
LatexWiki Image(15)
Type: DifferentialSparseMultivariatePolynomial?(Fraction Integer,Symbol,OrderlyDifferentialVariable? Symbol)
axiom
-- now to continue eliminating the high powers of lb appearing in ftilde:
-- to obtain the remainder of f modulo b and its derivatives
f0:=ib * ftilde - lcef * b * lb
LatexWiki Image(16)
Type: DifferentialSparseMultivariatePolynomial?(Fraction Integer,Symbol,OrderlyDifferentialVariable? Symbol)