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

Edit detail for SandBoxCollect revision 3 of 7

1 2 3 4 5 6 7
Editor: Bill page
Time: 2014/09/24 02:24:38 GMT+0
Note:

changed:
-\begin{axiom}
\begin{spad}
)abbrev package COLL Collect

changed:
---collect(x:Expression Integer,k:Kernel Expression Integer):Expression Integer ==
-collect(x,k) ==
-  n1:=univariate(x::Expression Integer,k::Kernel Expression Integer)$QF
-  n2:=(leadingMonomial numer n1)/(denom n1)
-  n3:=multivariate(n2,k::Kernel Expression Integer)$QF
-  n4:=factor(numer n3)/factor(denom n3)
Collect(): with
    collect1:(Expression Integer,Kernel Expression Integer) -> Expression Integer
  == add
    collect1(x,k) ==
      n1:=univariate(x::Expression Integer,k::Kernel Expression Integer)$QF
      n2:=(leadingMonomial numer n1)/(denom n1)
      n3:=multivariate(n2,k::Kernel Expression Integer)$QF
\end{spad}

\begin{axiom}
collect(x:Expression Integer,k:Expression Integer):List Expression Integer ==
  s1:=solve(%k=k,variables(k)(1))
  collect2(x,k,s1)

changed:
-collector(x:Expression Integer,k:Expression Integer):List Expression Integer ==
-  s1:=solve(%k=k,variables(k)(1))
-  x2:=eval(collect(eval(x,s1),%k::Expression Integer::Kernel Expression Integer)::Expression Integer,%k=k)
collect2(x:Expression Integer,k:Expression Integer,s1:List Equation Expression Integer):List Expression Integer ==
  x2:=eval(collect1(eval(x,s1),%k::Expression Integer::Kernel Expression Integer)::Expression Integer,%k=k)

changed:
-  concat(x2,collector(x-x2,k))
---
-collector((r2-r1+1)^3,(r2-r1)::Expression Integer)
  concat(x2,collect2(x-x2,k,s1))
\end{axiom}

\begin{axiom}
collect((r2-r1+1)^3,(r2-r1)::Expression Integer)

Collect terms in x with given factor k.

spad
)abbrev package COLL Collect
QF==>PolynomialCategoryQuotientFunctions(IndexedExponents Kernel Expression Integer,_
                                         Kernel Expression Integer,_
                                         Integer,_
                                         SparseMultivariatePolynomial(Integer,Kernel Expression Integer),_
                                         Expression Integer)
Collect(): with
    collect1:(Expression Integer,Kernel Expression Integer) -> Expression Integer
  == add
    collect1(x,k) ==
      n1:=univariate(x::Expression Integer,k::Kernel Expression Integer)$QF
      n2:=(leadingMonomial numer n1)/(denom n1)
      n3:=multivariate(n2,k::Kernel Expression Integer)$QF
spad
   Compiling FriCAS source code from file 
      /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/2250057057241251926-25px001.spad
      using old system compiler.
   COLL abbreviates package Collect 
------------------------------------------------------------------------
   initializing NRLIB COLL for Collect 
   compiling into NRLIB COLL 
   compiling exported collect1 : (Expression Integer,Kernel Expression Integer) -> Expression Integer
Time: 0.04 SEC.
(time taken in buildFunctor: 0)
;;; *** |Collect| REDEFINED
;;; *** |Collect| REDEFINED Time: 0 SEC.
Cumulative Statistics for Constructor Collect Time: 0.04 seconds
finalizing NRLIB COLL Processing Collect for Browser database: --->-->Collect(constructor): Not documented!!!! --->-->Collect((collect1 ((Expression (Integer)) (Expression (Integer)) (Kernel (Expression (Integer)))))): Not documented!!!! --->-->Collect(): Missing Description ; compiling file "/var/aw/var/LatexWiki/COLL.NRLIB/COLL.lsp" (written 24 SEP 2014 02:24:32 AM):
; /var/aw/var/LatexWiki/COLL.NRLIB/COLL.fasl written ; compilation finished in 0:00:00.014 ------------------------------------------------------------------------ Collect is now explicitly exposed in frame initial Collect will be automatically loaded when needed from /var/aw/var/LatexWiki/COLL.NRLIB/COLL

fricas
collect(x:Expression Integer,k:Expression Integer):List Expression Integer ==
  s1:=solve(%k=k,variables(k)(1))
  collect2(x,k,s1)
Function declaration collect : (Expression(Integer),Expression( Integer)) -> List(Expression(Integer)) has been added to workspace.
Type: Void
fricas
--
collect2(x:Expression Integer,k:Expression Integer,s1:List Equation Expression Integer):List Expression Integer ==
  x2:=eval(collect1(eval(x,s1),%k::Expression Integer::Kernel Expression Integer)::Expression Integer,%k=k)
  x2=0 => []
  concat(x2,collect2(x-x2,k,s1))
Function declaration collect2 : (Expression(Integer),Expression( Integer),List(Equation(Expression(Integer)))) -> List(Expression( Integer)) has been added to workspace.
Type: Void

fricas
collect((r2-r1+1)^3,(r2-r1)::Expression Integer)
fricas
Compiling function collect2 with type (Expression(Integer),
      Expression(Integer),List(Equation(Expression(Integer)))) -> List(
      Expression(Integer))
fricas
Compiling function collect with type (Expression(Integer),Expression
      (Integer)) -> List(Expression(Integer))

\label{eq1}\begin{array}{@{}l}
\displaystyle
\left[{{{r 2}^{3}}-{3 \  r 1 \ {{r 2}^{2}}}+{3 \ {{r 1}^{2}}\  r 2}-{{r 1}^{3}}}, \:{{3 \ {{r 2}^{2}}}-{6 \  r 1 \  r 2}+{3 \ {{r 1}^{2}}}}, \: \right.
\
\
\displaystyle
\left.{{3 \  r 2}-{3 \  r 1}}, \: 1 \right] 
(1)
Type: List(Expression(Integer))
fricas
test(reduce(+,%) = (r2-r1+1)^3)

\label{eq2} \mbox{\rm true} (2)
Type: Boolean