Program LIE for Lie analysis of differential equations on IBM type PCs
------------------------------------------------------------------------

by
A. K. Head   FRS  FAA
Honorary Research Fellow
CSIRO Manufacturing Science and Technology
Melbourne Australia

Postal: Private Bag 33
        Clayton South MDC
        Australia 3169

Phone: (03) 9545 2861
Fax: (03) 9544 1128
E-mail: head@rivett.mst.csiro.au

Equipment
---------
   Any IBM type PC with at least 256k of free memory.
   Any version of DOS, from DOS2 to DOS6.
   An attached printer is very useful.

Contents of LIExx.ZIP
---------------------
README.LIE  This file.

MULIE.EXE   The operating program.

LIE.DOC     Read this for instructions.

MORELIE.DOC More information for those interested.

.DAT files  Examples of differential equations you can run.
            Read these to see how to write YOUR differential
            equations and for the comments therein.

PRN2FILE    To aid in saving a LIE session on file.

LIE.LIE   Source code

****************************************************************************
  If you are just starting to use LIE then start by reading the file LIE.DOC.
  This contains instructions for standard classical Lie analysis,
  i.e. to find the point symmetries of well-posed differential equations,
  a test run for the program and instructions for preparing your equations.

  The file MORELIE.DOC and the rest of this file contains other information
  that you may need later.
****************************************************************************


Windows Caution
---------------
               It appears that Windows 95 DOS makes mistakes when running 
versions of LIE before v5.  A clear example is the file DEL4X.DAT. This was 
one of the original reasons for writing LIE and it has long been known that 
these equations have 17 symmetries. But it has been found that previous 
versions of LIE under Windows 95 give only 8 symmetries and most of these are 
wrong. I am told that it is "well known" that Windows 95 DOS has problems. It 
appears that version 5 gets around this problem of Windows 95. But "appears" 
is the strongest word I can use and I advise caution when running in Windows 
95 DOS . 
        This version has run correctly under Wimdows 3.1, 95, 98 and NT4.
This was when going to DOS by clicking on the MsDos icon.

        LIE has also run on other computers that have a PC emulation program.
For example Archimedes with the in-house PC emulator and under VirtualPC
on Macs.



Status
------
      LIE is written in MUMATH, the symbolic mathematics language for
IBM type PCs. Versions before 3.1 required you to have the MUMATH
system. By generous permission of Soft Warehouse Inc, authors and
owners of MUMATH, this is no longer necessary. A limited version of
MUMATH is combined with LIE to give MULIE.EXE which is a complete
stand-alone operating program. Portions of the software are
copyrighted by Soft Warehouse Inc, 3660 Waialae Avenue, Suite 304,
Honolulu, Hawaii 96816 USA, and are used by permission on a gratis,
as-is basis with no liability or support.


Availability
------------
            The primary source of the latest version of
LIE and BIGLIE is the website
       http://www.cmst.csiro.au/LIE/LIE.htm

They can be downloaded from there and the document files viewed. 

            They are also available by ftp from many program archives.
Most widespread are the Simtelnet archives where they will be found in
/msdos/math/


Whats New
=========

PAUSE
-----
                This program was first written for an original IBM PC.
Current PCs are at least 100 times faster for this program and the messages 
concerning possible special values of constants (eg SPECIALC.DAT) or functions 
(eg HEATNL.DAT) are now too fast to read. So there is now a PAUSE at each of 
these. Type C to continue the calculation. If desired, this pause can be 
turned off by PAUSE:FALSE, for example if PRN2FILE is keeping a transcript of 
the session. 


Euler equations
---------------
                The name of Euler is attached to a number of different 
differential equations but here it refers to those equivalent to
                 a*x^2*f'' + b*x*f' + c
This has turned up a sufficient number of times in the determining eqns
to be solved by DOSOLV to be worthwhile including. OP5 has been extended to  
do this.


BIGLIE
------
                  There is now a companion program BIGLIE that can
handle problems that are too big for LIE.  BIGLIExx.ZIP is available
from the same archives as LIExx.ZIP. It operates by writing many
scratch files to disk. Its method of solving the determining eqns
by BIGSOLV() is different to that of DOSOLV() of LIE. BIGSOLV() has
been added to LIE as an alternative method. In the absence of any
theoretical ( let alone practical ) algorithm that is certain to
solve all possible sets of determining eqns, there is a need for 
alternatives that can be tried. There are now 4 methods available:

Standard         New              IntConditions    Polynomial ansatz
RDS(your,dat);   RDS(your,dat);   RDS(your,dat);   RDS(your,dat);
DOLIE();         DOLIE();         DOLIE();         DOLIE();
DOSOLV();        BIGSOLV();       DOINTCON();      DOPOLYALL(2); for example
DOVEC();         DOVEC();         DOSOLV();        DOSOLV():
                                  DOVEC():         DOVEC():

BIGSOLV is, in a sense, orthogonal to DOSOLV. 
DOSOLV starts by applying simple operations to all equations. 
BIGSOLV starts by applying all operations to simple equations.


Publications on LIE
-------------------
  " LIE, a PC program for Lie analysis of differential equations "
A. K. Head, Computer Physics Communications, vol 71  (1993)  pp 241-248.

        This program is reviewed, along with others, by Hereman in
W. Hereman, CRC Handbook of Lie group analysis of differential
equations ( ed N. H. Ibragimov ), Vol 3, 1995, 367-413.

It is compared with the Reduce program Dimsym in " Dimsym and LIE: symmetry
determining packages ", J. Sherring, A. K. Head and G. E. Prince,
Mathematical and Computer Modelling, vol 25,1997, 153-164.
( Information on Dimsym is available on the Web at
          http://www.latrobe.edu.au/www/mathstats/Maths/Dimsym/   ).

An update to " LIE, a PC program for Lie analysis of differential equations "
A. K. Head, Computer Physics Communications, Vol 77, 1993, 241-248,
has been published in Comp Phys Comm., vol 96, 1996, 311-313.


Summary of previous Updates
---------------------------

Some general purpose functions that may be useful:

EVSA#(expression1,expression2) replaces exp1 by exp2 throughout
A#, removes zero entries, denominators and trivial factors and sorts A#.

SAVE(name) saves the current state of LIE as file name.SYS.

LOAD(name) restores LIE to how it was when name.SYS was saved.

LIE output is, by default, 79 characters per line. This can be
altered by changing the value of the variable LINELENGTH from 79.

The beep at the ? prompt can be turned off by BELL:FALSE;

DOS() temporarily goes to DOS, eg to view a directory. There must
be a copy of COMMAND.COM in the root directory of the default disk.
EXIT returns to where you were in LIE.

TESTVEC(vector expression)
        This function can be used to check if an expression is a
symmetry of a DE. It tests if the expression satisfies the original 
determining eqns that were generated by DOLIE and which were saved
as the file SAVEA#.LIE on disk. It replies TRUE or FALSE.
        It is useful for testing a guess or in cases where the vectors
found by LIE are too large and/or numerous to be checked by DOCHECK.
In this latter case the vectors can be checked one by one by
TESTVEC( V#[1] ) etc.

   The screen display of the amount of free workspace after each Garbage
Collection, as described at the start of MORELIE.DOC, can now be turned
on and off by GCON() and GCOFF(). The initial default is OFF.

   If memory becomes exhausted when INTegrability CONditions are being
calculated then it is worth redoing the calculation again after putting
BACK#:-1;  This reverses the ordering of the F# ( which is in principle
arbitrary ) and can give dramatic reductions in the workspace needed.
The default value of BACK# is +1. In any particular case it is just
a matter of trying which value, +1 or -1, is best.


Predictive check count of symmetries
------------------------------------
  INTCON is based on the early papers of G J Reid detailed below. 
Besides it's main purpose of "triangulation" as used by LIE, it is also 
possible to predict the number of symmetries ( and other things )
before any solving of the determining equations is done. 

  However it is now apparent, I. G. Lisle & G. J. Reid, J. Symbolic
Comput, 1998, v.26, pp355-379, that if there are infinite symmetries 
present then this prediction needs a more complex interpretation 
than first thought, too complicated for LIE.

  You can try this as follows. RDS your data, do DOLIE(), do DOINTCON().
At this point do SYMS() which will reply with the predicted number of 
symmetries when there are no infinite syms. But if there are then 
it replies just "INF". If you want to see what Reid terms the 
Leading Derivatives at this point then also do SYMS(1).
You can then do DOSOLV() to go ahead and solve for the actual syms.

 In BIGLIE the sequence would be RDS, BIGLIE, BIGINTCON, SYMS, DOSOLV. 

 In both LIE and BIGLIE there is the choice mentioned above of giving
BACK# the value +1 or -1.

Symbolic constants or functions
-------------------------------
   If your DE contains symbolic functions or constants then there may
be special values of these that lead to different Lie symmetries. This
may occur in two ways, that a factor which is divided out may be zero
in special cases, or, when splitting a "polynomial", that functions
taken as linearly independent may not be so in special cases.
Selective information on these possibilities can be shown by ( say )
SHOW#:LIST(A,B,K) where the list contains the names of functions and
constants of interest. ( This is turned off by SHOW#:FALSE, the
default value). See SPECIALC.DAT and the non-linear heat equation
HEATNL.DAT.
   IMPORTANT: All derivatives of a symbolic function in the DE must
be written as explicit derivatives with respect to the argument of the
function else LIE will misfunction. See HEATNL.DAT.


Saving results of a calculation
-------------------------------
   A facility has been added so that, at the end of an analysis, the results
can be written to a diskfile. Invoking RESULTS(filename,extension)
writes to that file the three arrays A#,V# ( which contains the vectors )
and NZC# ( which contains the non-zero commutators ). If any of these
were not calculated then this will be indicated by the value FALSE.
If the named file does not exist then it is created. If it does exist
then the results are appended to the end of the file, thus the results
could be appended to the input data file.

Saving a transcript of a session
--------------------------------
   Included on disk is the public-domain program PRN2FILE. This is
referred to in MORELIE.DOC as a means of getting a file copy of all of
a MULIE session. Starting in DOS, it can be used as follows:

PRN2FILE filename            "Divert printer output to file
CTRL-P                       "Send copy of screen output to printer,
                                    i.e. to file
MULIE
Use MULIE
Exit MULIE by CTRL-C or SYSTEM()

CTRL-P                        "Stop copying screen output to printer
PRN2FILE                      "Close file and reconnect printer

This sequence will work whether or not there is an actual printer
connected to the PC.


Solution of sets of linear homogeneous differential eqns 
--------------------------------------------------------
  A feature of LIE is that the solver for systems of linear homogeneous
differential equations is general and works for equations that were not
necessarily obtained from point symmetry analysis or not even from any
type of symmetry analysis. If a data file is made up in the form:

A#:
{  ........ ,
   ........ ,
   Set of linear homogeneous overdetermined PDEs
   in the format as generated by DOLIE
   ........ ,
   ........   }  $
NIND#: ... $
NDEP#: ... $
DOATA() $
RDS()$

then after reading this in by RDS, all the facilities of DOSOLV,
DOCHECK, DOVEC, DONZC and RESULTS are available for solving this set of
PDEs. The function DOATA in the data file does initializations that
would normally have been done by DOLIE.


Symmetries of First Integrals
-----------------------------
        Kesh Govinder, U Natal, (govinder@ph.und.ac.za) points out
that LIE can be used to determine the Lie point symmetries of
first integrals. See the file FIRSTINT.DAT


Switch
------
        There are a number of internal switches in LIE that are mainly
for my testing purposes. One of these is of more general use:

        PROL#
             This variable has the default value FALSE. If this is
changed to TRUE then when DOLIE runs, at the stage where it splits
" the substituted prolongation of the differential equation " into
the Lie defining equations, it outputs a list of the U derivatives
that were taken as independent in the split.


Contact Symmetries
------------------
        An example of the use of PROL# are the files CONTACT1.DAT,
CONTACT2.DAT and CONTACT3.DAT. This comes from a discussion with
S P Tsarov, Steklov, Math Inst, Moscow (tsarov@top.mian.su).

        CONTACT1 is the equation u''' = 0 and gives the wellknown
seven symmetries.
        CONTACT2 is the attempt to find the contact symmetries of
that equation by taking the pair of equations
                        v'' = 0
                        v = u'
but it does not find the expected ten symmetries ( a classical result
of Lie himself). Inspecting the output turned on by PROL# it is seen
that it took v' and u'' as independent whereas they are really identical.
        CONTACT3 is the three equations
                        v'' = 0
                        v = u'
                        v' = u''
and this now gives the ten contact symmetries.


Arbitrary symbolic functions
----------------------------
      TWOFIFTH.DAT illustrates a not infrequent situation when an
input DE contains arbitrary symbolic functions. It is the ODE
                U(1,1,1) - K(X1)*U(1)^2 = 0
LIE fails and in the process reports, amongst other things, that it
could not integrate   K(X1)^(2/5). You can assist LIE by rewriting
the input DE, replacing the arbitrary K(X1) by the equally arbitrary
function  DIF(L(X1)),X1)^(5/2).  LIOUVIL.DAT is another case where
similar rewrites on the same principle of helping with integrations
will assist LIE.


Lie-Backlund symmetries
-----------------------
        In addition to point and contact symmetries, LIE can now
determine Lie-Backlund symmetries. As with contact syms, this is not
a fully automatic process but depends on writing the appropriate
input file.
        On pp 264-266 of their book "Symmetries and Differential
Equations", Bluman and Kumei give the example of the third order
LB syms of Burgers eqn for which they give nine syms on p 266.
If the file LB3BURG.DAT is run in the usual way
                RDS(LB3BURG,DAT)
                DOLIE()
                DOSOLV()
                DOVEC()
then it gives these nine syms. 
So what is an appropriate input file?
It started by writing an initial file LB3INIT.DAT :

ECHO:TRUE$
NIND#:2$
NDEP#:4$
PROL#:TRUE$
UUU2:UUU3:UUU4:XXX1:XXX2:0$
DE#:DV#:{}$
DE#[1]:U(1,1,1)-U(1)*U(1,1)-U(1,2)$
DV#[1]:U(1,2)$
ECHO:FALSE$
RDS()$

Here the one DE is Burgers eqn written in the usual way with X1 as x,
X2 as t and U(1) as u. However it has been declared that NDEP#:4 so
there will be also U(2),U(3) and U(4). These will represent the first,
second and third order derivatives of U(1) wrt X1. Note that B&K call
these u1,u2 and u3 so the indexing differs by unity. The next line turns
on PROL# so that when this initial file is run there will be output a
list of the derivatives of U that were used to split the " substituted
prolongation" into Lie defining eqns. The next line sets UUU2 to XXX2
as zero. These are existing internal variables used by DOLIE and the
result will be that only UUU1# will be nonzero in the generated Lie
equations.
        Next load MULIE, RDS(LB3INIT.DAT) and do DOLIE. Make a note of
the PROL# output:

[U (4, 2), U (4, 1, 1), U (3, 2), U (3, 1, 1), U (2, 2), U (2, 1, 1), U (4, 1)
, U (3, 1), U (2, 1), U (1, 1)]

Look at A# and check that only UUU#1 is nonzero.

Take the first three X1 derivatives of Burgers eqn:

? D2:DIF(DE#[1],X1);
@: -U (1)*U (1, 1, 1) - U (1, 1)^2 + U (1, 1, 1, 1) - U (1, 1, 2)

? D3:DIF(D2,X1);
@: -U (1)*U (1, 1, 1, 1) - 3*U (1, 1)*U (1, 1, 1) + U (1, 1, 1, 1, 1) - U (1, 1
, 1, 2)

? D4:DIF(D3,X1);
@: -U (1)*U (1, 1, 1, 1, 1) - 4*U (1, 1)*U (1, 1, 1, 1) - 3*U (1, 1, 1)^2 + U (
1, 1, 1, 1, 1, 1) - U (1, 1, 1, 1, 2)

and make a note of these 3 @nswers.

        You are now ready to extend LB3INIT.DAT to LB3BURG.DAT by adding
the 8 extra DE# and DV#. These are to tell LIE that U(1,1) is really U(2)
and other such synonyms. You need one for each of the U derivatives on
the PROL# list and it must express that derivative in terms of U(1),U(2),
U(3),U(4) and X1 derivatives of U(4). U(4,1) and U(4,1,1) are already in
such a form. The first 5 of these added DE# are simple synonyms. The last
3 are translations of the 3 @nswers you noted into the required form.
        Note that the DV# of each of these 8 eqns has a minus sign
prefixing the derivative. This is an artificial indicator to DOLIE
that such an eqn is only to be used in the substitutional phase of DOLIE
and the eqn does not, of itself, generate any determining equations.
        LB3BURG.DAT is now ready to run. When it does check that the
PROL# list now contains only X1 derivatives of U(4) and that only UUU#1
is nonzero.

        Bluman and Kumei give on p. 280 five 5th order LB syms of the
KdV eqn. These are found by LB5KDV.DAT.

Non-Classical Generalised symmetries
---------------------------------------
        DOLIE and other parts of LIE have been modified so that
non-classical symmetries can be considered ( those that involve
the use of the Invariant Surface Condition ), to the extent that
the NON-linear determining equations can be generated by DOLIE.
There are no automatic facilities for solving such a nonlinear
set of equations.

        Critical to the correct working of the program in this
special application is that the switch ISC# must be set to TRUE.

        There are 3 example data files from the literature and these
illustrate how substitutions from the Invariant Surface Condition
and its derivatives are substituted into the target differential
equation. DQISC.DAT is from Arrigo and Hill, Studies in Applied
Mathematics, v94 (1995) pp21-39. The other two, BURGISC.DAT and
BOUSISC.DAT, are ( corrected ) examples from Clarkson and Mansfield,
SIAM J of Applied Mathematics, v54 (1994) pp1693-1719 and this paper
is required reading.

        The first two of these data files involve only substitutions
from the Invariant Surface Condition but BOUSISC.DAT also involves
substitutions from derivatives of the I.S.C.. The standard MUMATH
differential operator DIF(...) can not be used with expressions
( such as the I.S.C.) that contain UUU and/or XXX functions. Instead
the special differential operator SPECDIF( expression, variable) must
be used. And SPECDIF will only work correctly if NIND#, NDEP# and
ISC# have been given their correct values beforehand.

        Some of the commands in these data files are terminated by ;
instead of $ so that the results of the calculations being performed
can be seen as the file is input. Type C for Continue until the whole
file has been read and then do DOLIE() to generate the nonlinear
determining eqns in A#.

        These three examples use the convention of XXX2:1 and
so DOLIE generates a reduced set of nonlinear determining eqns.
This is just convention and DOLIE will generate the full det eqns
if XXX2 is left symbolic. This can be important when testing
vectors with TESTVEC as like should be tested with like, reduced
vectors with reduced eqns and full vectors with full eqns.

        There are no facilities for LIE to try and solve these non-
linear eqns automatically.

Integrability Conditions
------------------------
        One step in the solution process of the determining eqns
can be a call on OP8.   It can also be invoked directly by DOINTCON().
This generates integrability conditions similar to the Reid algorithm 
( G. J. Reid, J. Phys., v23A (1990) pL853-L859, & Euro. J. Appl. Math., 
v2 (1994) p293-340 ). Its purpose here is as in the title of the paper 
" A triangularization algorithm .... "  to aid in the further integration
of the determining eqns.   

Automatic Substitutions
-----------------------
        MUMATH has no facility like the LET command of REDUCE.
TARGET# and SUBST# have been added to LIE to give something like
this in the context of LIE. After setting TARGET#: expression1
and SUBST#:expression2 then, at each processing of a determiming
equation, expression1 will be replaced by expression2 throughout
the det eqn. TARGET.DAT is an example that follows on from
TWOFIFTH.DAT. The latter considered the equation U'' = K(x)*U^2
and said that progress could be made if the arbitrary function K
was replaced by (DIF(L(x),x)^(5/2). When this is done then it is
found that the DE might have symmetries if L satisfies

DIF(L(X1),X1,4) =
 -6*DIF (L (X1), X1, 2)^3/DIF (L (X1), X1)^2 + 6*DIF (L (X1), X1, 2)*DIF (L (
X1), X1, 3)/DIF (L (X1), X1) + 3*DIF (L (X1), X1, 2)^2/L (X1) - 2*DIF (L (X1),
X1)*DIF (L (X1), X1, 3)/L (X1)

        In TARGET.DAT are the commands

TARGET#:DIF(L(X1),X1,4)$

SUBST#:
 -6*DIF (L (X1), X1, 2)^3/DIF (L (X1), X1)^2 + 6*DIF (L (X1), X1, 2)*DIF (L (
X1), X1, 3)/DIF (L (X1), X1) + 3*DIF (L (X1), X1, 2)^2/L (X1) - 2*DIF (L (X1),
X1)*DIF (L (X1), X1, 3)/L (X1) $

so that this substitution will be made automatically.
On running TARGET.DAT it is found that there is one symmetry
which will therefor exist for all L(x) which are solutions
of this fourth order differential equation for L.

        It is possible to have more than one such automatic
substitution in action. Set TARGET#:SUBST#:{}; so that they
are arrays and then put TARGET#[1]: ....
                        SUBST#[1]: ....
                        TARGET#[2]: ...
                        SUBST#[2]: ...
                        etc

Automatic substitutions are cleared by TARGET#:SUBST#:FALSE


Unsolved Differential Equations
-------------------------------
        When LIE leaves some unsolved equations at the end of DOSOLV
then there is always the question whether this should be so or if some
could be solved but LIE does not know how. If any equation that remains
unsolved in A# is seen to be effectively an ODE for a particular F#(...)
then it is worth trying if the MUMATH ODE solver can do it.
At the ? prompt type, for example,
            SOLVE( A#[3], F#(2,X1,X2) );
to try to solve the 3rd eqn in A# for that F#.

   It may solve this ODE when it will return the solution in the form
             F#(2,X1,X2) == answer
or it may return a part answer which contains unevaluated INTegrals
or if it cannot solve it at all it will return just
            ' input DE '  ==  0
or it may crash by running out of workspace ( so SAVE the current state
of LIE before trying this).

   Any answer will contain 'constants of integration' in the form
ARB(number). If the ODE contained more than one variable ( as in
F#(2,X1,X2) above ) the these ARBitrary constants of integration
are really functions of all the other variables, other than the
one that is being integrated.

   This use of SOLVE makes no changes to the determining eqns in A#
but may suggest what you can do to the eqns in A#.

Benchmark
---------
        My current benchmark is that there shall be enough workspace
to process the equations of Magneto-Hydrodynamics ( MHD.DAT ). This
is a set of 9 pdes in 12 variables and 1 parameter that gives 183
determining equations with 1499 terms. If this is run with the
visual dynamic display of the amount of workspace available ( by
turning it on with GCON() before running DOLIE and DOSOLV ) it will
be seen how close the current version is to this benchmark towards
the end of DOLIE and at the start of DOSOLV.


"Approximate" symmetries
------------------------
       Baikov, Gazizov, Ibragimov and Mahamod, J. Math. Phys. v35 (1994) 6525, 
consider the extra symmetries flowing from a small perturbation to a 
differential equation, to first order in the perturbation. No extra program is 
required to do such a calculation with LIE, just to write the appropriate 
input files. The example given corresponds to case 2 of Table 2 of Baikov et 
al. To run it, RDS(APPROX,DAT) will proceed to the stage of generating the 
usual determining equations. You are then instructed to RDS(APPROX,FIX) which 
limits the perturbation to first order in EPSilon and proceeds to calculate 
the symmetries. These are equivalent to those given by Baikov et al. See also 
Govinder,Heil & Uzer, Physics Letters 240A (1998) 127. I thank Dr K Govinder 
for discussions on "approximate" syms. 


-------------------------------------------------------------------------