\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input equation.input}
\author{The Axiom Team}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
\section{License}
<<license>>=
--Copyright The Numerical Algorithms Group Limited 1996.
@
<<*>>=
<<license>>
--
--To ease the use of equation (more user friendly applications)
--I have enhanced the datatype Equation to have more
--mathematical richness.
--
--First of all now you can embed s from S to Equation S
--as s = s.
--This allows to easily manipulate equations bring terms
--from one side to the other by simply adding or multiplying
--or ... provided, that the equation domain inherits the
--structure of the underlying S.
--
--So I went through the code saying
--
--If S has BlaBla then BlaBla
--
--for the most important structures, please suggest others
--if necessary, Steve, do we have a more general method in
--the new compiler rather than repeating all these
--definitions as
--
--inv(eq) == inv lhs eq = inv rhs eq
--
--??
--
--
--Furthermore, we have function to put 0 or 1 on one side
--and factor the left hand side, after the right hand side
--is 0 and we have an IntegralDomain.
--
--Please comment and test.
--
--Johannes


eq1 := (-6*x^3+13*x^2+4)=(-x^4+12*x)
--
--
--            3      2         4
--   (1)  - 6x  + 13x  + 4= - x  + 12x
--                                            Type: Equation Polynomial Integer
--                                       Time: 1.61 (IN) + 1.47 (OT) = 3.08 sec
eq2 := x^4+13*x^2-12*x = 6*x^3-4
--
--
--         4      2          3
--   (2)  x  + 13x  - 12x= 6x  - 4
--                                            Type: Equation Polynomial Integer
--                                       Time: 0.16 (IN) + 0.11 (OT) = 0.27 sec
eq := eq1*y^2+eq2
--
--
--             3      2      2    4      2            4        2     3
--   (3)  (- 6x  + 13x  + 4)y  + x  + 13x  - 12x= (- x  + 12x)y  + 6x  - 4
--                                            Type: Equation Polynomial Integer
--               Time: 0.26 (IN) + 0.01 (EV) + 0.01 (OT) + 1.54 (GC) = 1.82 sec
swap %
--
--
--            4        2     3           3      2      2    4      2
--   (4)  (- x  + 12x)y  + 6x  - 4= (- 6x  + 13x  + 4)y  + x  + 13x  - 12x
--                                            Type: Equation Polynomial Integer
--                                                   Time: 0.07 (OT) = 0.07 sec
% + 4
--
--
--            4        2     3       3      2      2    4      2
--   (5)  (- x  + 12x)y  + 6x = (- 6x  + 13x  + 4)y  + x  + 13x  - 12x + 4
--                                            Type: Equation Polynomial Integer
--                                       Time: 0.69 (IN) + 0.01 (OT) = 0.70 sec
%-6*x^3
--
--
--            4        2       3      2      2    4     3      2
--   (6)  (- x  + 12x)y = (- 6x  + 13x  + 4)y  + x  - 6x  + 13x  - 12x + 4
--                                            Type: Equation Polynomial Integer
--                                       Time: 0.19 (IN) + 0.01 (OT) = 0.20 sec
leftZero %
--
--
--             4     3      2            2    4     3      2
--   (7)  0= (x  - 6x  + 13x  - 12x + 4)y  + x  - 6x  + 13x  - 12x + 4
--                                            Type: Equation Polynomial Integer
--                                       Time: 0.01 (IN) + 0.05 (OT) = 0.06 sec
swap %
--
--
--          4     3      2            2    4     3      2
--   (8)  (x  - 6x  + 13x  - 12x + 4)y  + x  - 6x  + 13x  - 12x + 4= 0
--                                            Type: Equation Polynomial Integer
--                                                   Time: 0.01 (IN) = 0.01 sec
factor lhs %
--
--
--               2       2  2
--   (9)  (x - 2) (x - 1) (y  + 1)
--                                            Type: Factored Polynomial Integer
--                           Time: 0.50 (IN) + 0.09 (EV) + 0.30 (OT) = 0.89 sec
factorAndSplit eq
--
--
--                             2
--   (10)  [x - 2= 0,x - 1= 0,y  + 1= 0]
--                                       Type: List Equation Polynomial Integer
--                                       Time: 0.09 (EV) + 0.21 (OT) = 0.30 sec
inv (eq :: EQ FRAC POLY INT)
--
--
--                            1                                1
--   (11)  - ------------------------------------= - ----------------------
--              3      2      2    4      2            4        2     3
--           (6x  - 13x  - 4)y  - x  - 13x  + 12x    (x  - 12x)y  - 6x  + 4
--                                   Type: Equation Fraction Polynomial Integer
--                                                   Time: 0.03 (IN) = 0.03 sec
- %
--
--
--                          1                              1
--   (12)  ------------------------------------= ----------------------
--            3      2      2    4      2          4        2     3
--         (6x  - 13x  - 4)y  - x  - 13x  + 12x  (x  - 12x)y  - 6x  + 4
--                                   Type: Equation Fraction Polynomial Integer
--                                       Time: 0.01 (IN) + 0.01 (OT) = 0.02 sec
--
--
@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}
