Reduce and GRG Installations on Ubuntu
GRG is the computer algebra system witch was designed to make calculation in differential geometry and field theory as simple and natural as possible. It’s is based on the computer algebra system REDUCE. Despite the fact that this program was the creation in the nineties at the present time it remains relevant. Unfortunately you can’t find it in standard repositories of Ubuntu or other popular Linux distributives. But you can install it from sources without any problems.
Mainly the installation process is pretty simple. All instructions are available on Obtaining REDUCE from SourceForge page and in the grg documentation. The main target of this post is an advertisement of the good and strong tool for physicists.
First of all you need to install
$ sudo apt update $ sudo apt install wget
then you should download REDUCE deb package and GRG tar.gz archive. I used
deb snapshot package from 2019-01-20. I believe you can use the last snapshot instead. It seems that there is no one golden source for this package now but you can find it on official Reduce site http://reduce-algebra.com/grg32.htm. It's up to you what source you are going to use.
$ wget https://sourceforge.net/projects/reduce-algebra/files/snapshot_2019-01-20/linux64/reduce-complete_4865_amd64.deb/download -O ~/reduce-complete_4865_amd64.deb $ wget 'http://www.reduce-algebra.com/grg32/grg32r6.tar.gz' -O ~/grg32r6.tgz
To install Reduce with all dependencies you can run command
$ apt install ./reduce-complete_4865_amd64.deb $ rm reduce-complete_4865_amd64.deb
It’s a good idea to check reduce have been compiled correctly
$ reduce Reduce (Free PSL version), 5-Jul-2013 ... 1:
if you see something like this your compilation is ok. Now it’s time to add GRG in the reduce equipment
$ cd ~/ $ mkdir grg & tar xfz grg32r6.tgz -C grg $ cd grg $ reduce
in the reduce command line we start compilation by
1: in "compile.grg";
if finally you have something like
GRG has been compiled. Move all created grg*.b files in the $reduce/fasl directory or keep them in your working directory. nil Quitting.
Now we should follow the advise
$ mv *.b /opt/reduce/trunk/pslbuild/i686-unknown-ubuntu13.04/red/
and check that GRG was compiled correctly
$ reduce 1: load grg;
the good reaction is
This is GRG 3.2 release 6 (July 16, 2000) ... System variables are lower-cased: e i pi sin ... Dimension is 4 with Signature (-,+,+,+) >
to see how it works we can start
it must return file bondi.out in your current directory. This file contain results of evaluation of the commands from bondi.low file. Then we can remove files witch we don’t need any more.
$ rm grg*.sl *.csl *.psl compile.grg *.red *.log
After that we have a directory
/opt/reduce/ with reduce and grg and a directory
$HOME/grg/ with examples. We have
/usr/bin/reduce symlink to have access to reduce from any directories.