|
|
|
last edited 6 months ago by test1 |
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | ||
|
Editor: Bill Page
Time: 2008/08/24 07:04:36 GMT-7 |
||
| Note: new | ||
changed: - http://en.wikipedia.org/wiki/Tensor_product A tensor product is "the most general bilinear operation" available in a specified domain of computation, satisfying: $$ (v_1+v_2)\otimes w - (v_1\otimes w+v_2\otimes w) = 0 $$ $$ v\otimes (w_1+w_2) - (v\otimes w_1+v\otimes w_2) = 0 $$ $$ cv\otimes w=v\otimes cw=c(v\otimes w) $$ We can use the domain constructor 'Sum' [SandBoxSum] \begin{axiom} )lib SUM \end{axiom} First we can define some recursive operations on the polynomials \begin{axiom} scanPoly(p,n) == _ (p=0 => 0; mapMonomial(leadingMonomial(p),n)+scanPoly(reductum p,n)) mapMonomial(p,n) == _ monomial(coefficient(p,degree p),scanIndex(degree(p),n))$SMP(Integer,Sum(Symbol,Symbol)) scanIndex(p,n) == _ (zero? p => 0$IndexedExponents(Sum(Symbol,Symbol)); _ monomial(leadingCoefficient(p), _ if n=1 then in1(leadingSupport(p))$Sum(Symbol,Symbol) _ else in2(leadingSupport(p))$Sum(Symbol,Symbol) _ )$IndexedExponents(Sum(Symbol,Symbol))+ _ scanIndex(reductum(p),n)) \end{axiom} For example: \begin{axiom} scanPoly(x,1) \end{axiom} injects the polynomial 'x' in to the tensor product. So now the full tensor product is just: \begin{axiom} tensorPoly(p,q) == _ scanPoly(p,1)*scanPoly(q,2) \end{axiom} For example: \begin{axiom} p:=2*x^2+3 q:=5*x*y+7*y+11 r:=tensorPoly(p,q) \end{axiom}
http://en.wikipedia.org/wiki/Tensor_product
A tensor product is "the most general bilinear operation" available in a specified domain of computation, satisfying:
We can use the domain constructor Sum [SandBoxSum]?
(1) -> )lib SUM
Sum is now explicitly exposed in frame initial Sum will be automatically loaded when needed from /var/aw/var/LatexWiki/SUM.NRLIB/SUM
First we can define some recursive operations on the polynomials
scanPoly(p,n) == _ (p=0 => 0; mapMonomial(leadingMonomial(p), n)+scanPoly(reductum p, n))
mapMonomial(p,n) == _ monomial(coefficient(p, degree p), scanIndex(degree(p), n))$SMP(Integer, Sum(Symbol, Symbol))
scanIndex(p,n) == _ (zero? p => 0$IndexedExponents(Sum(Symbol, Symbol)); _ monomial(leadingCoefficient(p), _ if n=1 then in1(leadingSupport(p))$Sum(Symbol, Symbol) _ else in2(leadingSupport(p))$Sum(Symbol, Symbol) _ )$IndexedExponents(Sum(Symbol, Symbol))+ _ scanIndex(reductum(p), n))
For example:
scanPoly(x,1)
There are 1 exposed and 3 unexposed library operations named leadingMonomial having 1 argument(s) but none was determined to be applicable. Use HyperDoc Browse,or issue )display op leadingMonomial to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation. Cannot find a definition or applicable library operation named leadingMonomial with argument type(s) Variable(x)
Perhaps you should use "@" to indicate the required return type,or "$" to specify which version of the function you need. FriCAS will attempt to step through and interpret the code. There are 1 exposed and 3 unexposed library operations named leadingMonomial having 1 argument(s) but none was determined to be applicable. Use HyperDoc Browse, or issue )display op leadingMonomial to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation.
Cannot find a definition or applicable library operation named leadingMonomial with argument type(s) Variable(x)
Perhaps you should use "@" to indicate the required return type,or "$" to specify which version of the function you need.
injects the polynomial x in to the tensor product. So
now the full tensor product is just:
tensorPoly(p,q) == _ scanPoly(p, 1)*scanPoly(q, 2)
For example:
p:=2*x^2+3
| (1) |
q:=5*x*y+7*y+11
| (2) |
r:=tensorPoly(p,q)
>> System error: The function BOOT::PUT is undefined.