$SPAD/src/input allfact.input

Timothy Daly December 3, 2016

Abstract

Contents

2

1 License

— license —

--Copyright The Numerical Algorithms Group Limited 1991.

———-

— * —

)set break resume
)spool allfact.output
)set message test on
)set message auto off
)clear all
-- factorization of integer numbers
--S 1 of 21
n:=45234258258293
--R
--R
--R   (1)  45234258258293
--R                                                        Type: PositiveInteger
--E 1
--S 2 of 21
factor n
--R
--R
--R   (2)  13 19 269 8387 81173
--R                                                      Type: Factored(Integer)
--E 2
-- factorization of gaussian integers
--S 3 of 21
m:(Complex Integer) := 1324567+%i*53523582
--R
--R
--R   (3)  1324567 + 53523582%i
--R                                                       Type: Complex(Integer)
--E 3
--S 4 of 21
factor m
--R
--R
--R   (4)  (2 + 7%i)(7119136 + 1844815%i)
--R                                             Type: Factored(Complex(Integer))
--E 4
-- factorization of polynomials over finite fields

--S 5 of 21
u:UP(x,PF(19)) :=3*x**4+2*x**2+15*x+18
--R
--R
--R          4     2
--R   (5)  3x  + 2x  + 15x + 18
--R                                 Type: UnivariatePolynomial(x,PrimeField(19))
--E 5
--S 6 of 21
factor u
--R
--R
--R                   3    2
--R   (6)  3(x + 18)(x  + x  + 8x + 13)
--R                       Type: Factored(UnivariatePolynomial(x,PrimeField(19)))
--E 6
-- factorization of polynomials over the integers
--S 7 of 21
v:UP(x,INT):= (4*x**3+2*x**2+1)*(12*x**5-x**3+12)
--R
--R
--R           8      7     6      5      3      2
--R   (7)  48x  + 24x  - 4x  + 10x  + 47x  + 24x  + 12
--R                                        Type: UnivariatePolynomial(x,Integer)
--E 7
--S 8 of 21
factor v
--R
--R
--R           3     2         5    3
--R   (8)  (4x  + 2x  + 1)(12x  - x  + 12)
--R                              Type: Factored(UnivariatePolynomial(x,Integer))
--E 8
-- factorization of multivariate polynomial over the integers
--S 9 of 21
w:MPOLY([x,y,z],INT) :=(x**2-y**2-z**2)*(x**2+y**2+z**2)*(z*y+3*z)
--R
--R
--R                   4      5       4     3 3     3 2    5      5
--R   (9)  (z y + 3z)x  - z y  - 3z y  - 2z y  - 6z y  - z y - 3z
--R                                Type: MultivariatePolynomial([x,y,z],Integer)
--E 9
--S 10 of 21
factor w
--R

--R
--R                   2    2    2   2    2    2
--R   (10)  z(y + 3)(x  - y  - z )(x  + y  + z )
--R                      Type: Factored(MultivariatePolynomial([x,y,z],Integer))
--E 10
-- factorization of univariate and multivariate over the rational numbers
--S 11 of 21
f:MPOLY([x,y,z],FRAC INT) :=(4/9*x**2-1/16)*(x**3/27+125)
--R
--R
--R          4   5    1   3   500  2   125
--R   (11)  --- x  - --- x  + --- x  - ---
--R         243      432       9        16
--R                      Type: MultivariatePolynomial([x,y,z],Fraction(Integer))
--E 11
--S 12 of 21
factor f
--R
--R
--R          4       3      3           2
--R   (12)  --- (x - -)(x + -)(x + 15)(x  - 15x + 225)
--R         243      8      8
--R            Type: Factored(MultivariatePolynomial([x,y,z],Fraction(Integer)))
--E 12
-- factorization over rational functions
--S 13 of 21
g:DMP([x,y],FRAC POLY INT):=a**2*x**2/b**2 -c**2*y**2/d**2
--R
--R
--R          2       2
--R         a   2   c   2
--R   (13)  -- x  - -- y
--R          2       2
--R         b       d
--R Type: DistributedMultivariatePolynomial([x,y],Fraction(Polynomial(Integer)))
--E 13
--S 14 of 21
factor g
--R
--R
--R          2
--R         a       b c        b c
--R   (14)  -- (x - --- y)(x + --- y)
--R          2      a d        a d
--R         b
--IType: Factored ...

--E 14
-- decomposition of a rational function
--S 15 of 21
r:FRAC POLY INT:= (a**3/b**3-c**3/(b+1)**3)*(a*d+a/c)
--R
--R
--R   (15)
--R         3 4     4 3     4 2     4     4          3 3    4 3     4 2     4     4
--R   (- a b c  + (a b  + 3a b  + 3a b + a )c)d - a b c  + a b  + 3a b  + 3a b + a
--R   -----------------------------------------------------------------------------
--R                                 6     5     4    3
--R                               (b  + 3b  + 3b  + b )c
--R                                          Type: Fraction(Polynomial(Integer))
--E 15
--S 16 of 21
factorFraction r
--R
--R
--R                             2 2       2            2 2     2     2
--R           a(b c - a b - a)(b c  + (a b  + a b)c + a b  + 2a b + a )(c d + 1)
--R   (16)  - ------------------------------------------------------------------
--R                                        3       3
--R                                       b (b + 1) c
--R                                Type: Fraction(Factored(Polynomial(Integer)))
--E 16
-- factorization over simple algebraic extensions
--S 17 of 21
aa|aa**2+aa+1
--R
--R   Your statement has resulted in the following assignments and
--R      declaration:
--R
--I   SAEaa := SimpleAlgebraicExtension(Fraction Integer,...
--R   aa : SAEaa := aa
--R
--R   (17)  aa
--IType: SimpleAlgebraicExtension(Fraction Integer,...
--E 17
--S 18 of 21
p:UP(x,SAEaa) :=(x**3+aa**2*x+1)*(aa*x**2+aa*x+aa)**2
--R
--R
--R   (18)
--R                7               6               5              4     3
--R     (- aa - 1)x  + (- 2aa - 2)x  + (- 2aa - 3)x  + (- aa - 3)x  - 3x
--R   +

--R                2
--R     (- aa - 3)x  + (- aa - 2)x - aa - 1
--IType: UnivariatePolynomial(x,SimpleAlgebraicExtension(...
--E 18
--S 19 of 21
factor(p)$SAEFACT(UP('aa,FRAC INT),SAEaa,UP(x,SAEaa))
--R
--R
--R                           2            2  3
--R   (19)  (- aa - 1)(x - aa) (x + aa + 1) (x  + (- aa - 1)x + 1)
--IType: Factored UnivariatePolynomial(x,SimpleAlgebraicExtension(...
--E 19
-- factorization over algebraic numbers
--S 20 of 21
a:=rootOf(a**2+3)$AN
--R
--R
--R   (20)  a
--R                                                        Type: AlgebraicNumber
--E 20
--S 21 of 21
factor(x**2+x+1,[a])
--R
--R
--R              - a + 1      a + 1
--R   (21)  (x + -------)(x + -----)
--R                 2           2
--R                                  Type: Factored(Polynomial(AlgebraicNumber))
--E 21
)spool
)lisp (bye)

———-

References^{[1] nothing}

8