\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input lodof.input}
\author{The Axiom Team}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
\section{License}
<<license>>=
--Copyright The Numerical Algorithms Group Limited 1991.
@
<<*>>=
<<license>>
--------------------------------- lodof.input -----------------------------
)set break resume
)expose UnittestCount UnittestAux Unittest
testsuite "factor$LODOF"
testcase "factor"
P := UP(t, AN)
Q := FRAC P
L := LODO1 Q
)expose LODOF
testFactor(l: List L): Void ==
    free l1
    free l2
    l1 := reduce(*, l)
    l2 := l
    testEquals("factor l1", "l2")

xftestFactor(l: List L): Void ==
    free l1
    free l2
    l1 := reduce(*, l)
    l2 := l
    xftestEquals("factor l1", "l2")


d := D()$L
t := t::P::Q

-- reducible order 2 operator (1-1)
testFactor [d, d+t]

-- irreducible order 2 operator
testFactor [2*t^3 * d^2 + 3*t^2 * d - 2]

-- reducible order 3 operator (1-2)
xftestFactor [t-d, -2*t^3*d^2 - 3*t^2*d + 2]

xftestFactor [t-d, d^2 + t^2*d + 1]

-- reducible order 3 operator (1-1-1)
testFactor [(t^9 + t^3)*d +(-sqrt 91+7)*t^8+(-sqrt 91 + 1)*t^2, _
            d + ((sqrt 91 + 6)*t^6 + sqrt 91)/(t^7+t), _
            d + (5*t^6 - 1)/(t^7 + t)]

-- irreducible order 3 operator
testFactor [d^3 + 2 * d^2 + 5 / t * d + 7 / t^2]

-- reducible order 6 operator (1-1-1-1-1-1)
testFactor [t^6*d + (- sqrt(-1) + 5)*t^5, _
            d + (sqrt(-1)+4)/t, _
            d + 5/t, _
            d + 4/t, _
            d + 3*t^2/(t^3-1), _
            d + (-t^3-2)/(t^4-t)]

-- reducible order 4 operator (2-2)
xftestFactor [2*t^3 * d^2 + 3*t^2 * d - 2, 2*t^3 * d^2 + 3*t^2 * d - 2]

statistics()

@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}
