Here is various Axiom/FriCAS code that I have written for my own use and in case they may be of use to others:
- Discrete Algebras:
- Graph Theory - Graphs, in addition to being interesting structures in their own right, have importance in representing data structures, finite automata, communication networks and so on. This is an implementation of directed graphs.
- Logic - There are a common set of lattice-like structures that occur in various branches
of mathematics such as orders, logic and sets. Here we represent these
structures in FriCAS.
- Intuitionistic Logic - an implementation of intuitionistic logic.
- Simplicial Complexes - Either geometric or abstract (combinatorial) version of Simplicial Complexes.
- Finite Group - The main Axiom/FriCAS code for working with groups is PermutationGroup, this is good for working with large groups, however I wanted a complimentary domain defined in terms of the Cayley table which can represent groups and semigroups, support cosets and so on.
- Computation related domains
- lambda/index.htm - an implementation of untyped lambda-calculus
- Ski combinators - were introduced by Moses Schönfinkel and Haskell Curry with the aim of eliminating the need for variables in mathematical logic. It is equivalent to lambda calculus but it can be used for doing, without variables, anything that would require variables in other systems. The structure is a self-modifing binary tree.
- The compUtil package provides utilities to convert between the computational domains: Lambda, Ski and ILogic.
- Type Theory - A domain for representing Types
- Scene - Alternative graphics framework. It is based on a scenegraph structure which allows
transforms to
be controlled for individual nodes or whole branches in the scenegraph.
This means that, for example, transforms can be applied continuously to
a whole branch without altering the nodes in that branch. This framework supports all the 2D and 3D draw and plotting that the
existing framework supports. Use of transforms in the scenegraph means that
many plots can be combined together, either overlayed or next to each other
and combined with various show scales, grids text annotations and so on. The framework supports:
- Different algebras: vector, matrix, complex numbers, (Clifford Algebra to be added later).
- Different geometries: Euclidean, projective (hyperbolic, conformal to be added later)
- Different coordinate systems: Cartesian coordinates, Argand Plane, Spherical, Cylindrical.
- Different number of dimensions: 2,3 (4 and more to be added)
- Clifford Algebra - Originally the Axiom/FriCAS code only supported diagonal quadratic forms, the code here is much more general. It also supports inner and outer products and is generally rewritten with fuller comments and so on.
- Clifford Representation - this provides a matrix representation for Clifford Algebras.
- System Code - That is code to implement core Axiom/FriCAS functionality in SPAD code.
- Interpreter in SPAD.
- Output -
- Output in html directly (not using a mathml plugin)
- Monospace output
- Test Unicode support.
- Attempt to convert SPAD and Boot to other languages
Further Work
New for Feb 2016 - I have made some changes and additions to some of my code. Would you be interested in including this in the FriCAS library?
The changed/new files are:
- logic.spad
- graph.spad
- algebraictopology.spad
- computation.spad
These 4 files are interdependent so it would be really good, from my point of view, if you could include all of them.
Further details of the changes are:
logic.spad
This is new code. Includes various logic related structures including partial order, lattice structures
I have also moved intuitionistic logic here from computation.spad
Since I last mentioned this on the forum I was kindly sent some unpublished code (related to Moebius function) by Franz Lehner with permission to merge this with my own poset related code. This is now all included in the code on Github.
These are my notes related to the code written by Franz here.
I have included Logic category, this is the same as existing Logic
category in Boolean.spad as it is intended to replace it. Since this
category is more general than just Boolean I thought it more appropriate
to put it in logic.spad.
For further information see the documentation here:
https://www.euclideanspace.com/prog/scratchpad/mycode/discrete/logic/
https://www.euclideanspace.com/prog/scratchpad/mycode/discrete/logic/moebius/
graph.spad
There are some updates to existing code, this includes:
- 1) Fix bug in spanningTree since old version sometimes put a given node at multiple leaves in the tree.
- 2) Add coercions and constructors from FinitePoset.
- 3) Improve documentation.
- 4) Improve output code.
For further information see the documentation here.
algebraictopology.spad
This is new code.
This includes simplicial complexes. At the moment only abstract simplicial complexes (purely combinitorial) are operational. The plan is to add geometric complexes later.
My aim is also to export to homotopy and homotopy groups.
For further information see the documentation here.
computation.spad
There are some updates to existing code, this includes:
- 5) Remove intuitionistic as I have now put it in logic.spad
- 6) Improve documentation.
- 7) Improve output code.
For further information see the documentation here.
TODO
There is a lot more work to be done on this code but I think it is in a state where it can be of some use to others. If it is included in the FriCAS library then there is always a chance that someone else may be able to help. I would welcome as much help as I can get.
Some improvements I would like to make at some time in the future are:
- I would like to fully implement the geometric version of simplicial complex. One reason is that I would like to make it the standard way to represent 2D, 3D and n-dimensional shapes in code such as scene.spad. So the shapes can be transformed and output in various ways however they would have better mathematical properties than the structures usually used to represent shapes in computer science. This would involve writing code to test for overlapping simplexes and so on.
- The code that Franz Lehner sent to me also included isomorphism testing and drawing (using algorithms from Freese's book on "Free Lattices"). I would like to merge this with my code. (it may not all be generalisable to graphs/complexes but parts of it may be and the remainder can still be used for posets).
- Homology - Can we use simplicial complex to generate the Smith normal form which already exists in FriCAS?
- Homotopy - Although a lot of stuff in homotopy does not have a general algorithmic solution, I would still like to be able to generate groups from complexes. This would require implementing groups as presentations (free groups). I realise there are limitations on what can be done with these but, as an example GAP can do some simplifications of such groups. Franz tells me he has implemented code for free products of groups so it would be interesting to see if this could be merged in.
I have a long list of changes that I would like to see in FriCAS which I have listed on the page here.