Download Latest Version maple-om-lite.tar.gz (3.3 kB)
Email in envelope

Get an email when there's a new version of Internet accessible mathematical service

Name Modified Size InfoDownloads / Week
Parent folder
GAP-om-lite.tar.gz 2001-05-10 8.5 kB
GAP-README 2001-05-10 4.0 kB
Totals: 2 Items   12.5 kB 0
OM-lite GAP share package. Andrew Solomon, May 2001
===================================================

General
=======
This package is part of the JavaMath project (http://javamath.sourceforge.net)
and relies on OpenMath technology (http://www.openmath.org).

Functionality
=============
Enables the user to produce a 3-dimensional rendering of a Hasse Diagram 
in three easy steps:

1. Create a Hasse Diagram in GAP using the function 
CreateHasseDiagram which takes a list "l" and a function 
"le" (less-than-or-equals) which defines a partial order on "l".

2. Represent the Hasse Diagram as XML/OpenMath in a 
browser window using DrawHasse. At this point the user is given the opportunity
to change the name of the diagram from the default value of "user"
and to see the OpenMath representation of the diagram.

3. Display the diagram by pressing the button labelled "Take a Look"

System Requirements
===================
* GAP 4.2 or greater
* A web browser
* An Internet connection

Installation and Configuration
===============================
* Extracting om-lite.tar.gz into GAP's pkg directory.
* Modify the relevant parts of config.g

Issues
======
Characters '<', '>', '\"' and '\'' are stripped from vertex labels as they
confound the OpenMath parser on the server.

License
=======
This software is released under the terms of the GNU GPL. 

Acknowledgement
===============
The rendering component of this package is based on 
Ralph Freese's LatDraw applet http://www.math.hawaii.edu/~ralph/LatDraw/

Disclaimer
==========
This software is provided in the hope that it will be useful, 
but WITHOUT ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

Examples
========

RequirePackage("om-lite");


########################################################
## Bruhat order on permutations
########################################################

# return {(i,j) | i < j and p(i) > p(j)}
inv := function(p)
	local n, i, j, res;

	res := [];
	n := Length(ListPerm(p));

	for j in [1 .. n] do
		for i in [1 .. j-1] do
			if i^p > j^p then
				Append(res, [[i,j]]);
			fi;
		od;
	od;
	return res;
end;

le := function(p,t)
	return IsSubset(inv(t), inv(p));
end;

s := SymmetricGroup(4);
l := AsList(s);
h := CreateHasseDiagram(l,le);
DrawHasse(h);



########################################################
## Divisor lattice of a natural number
########################################################

leq := function(x,y) return y mod x = 0; end;
N := 102;
h := CreateHasseDiagram(Filtered([1..N],i->N mod i = 0), leq);
DrawHasse(h);


########################################################
## R-classes of a transformation semigroup
########################################################
s1 := Transformation([1,1,3,4]);
s2 := Transformation([1,2,2,4]);
s3 := Transformation([1,2,3,3]);
t1 := Transformation([2,2,3,4]);
t2 := Transformation([1,3,3,4]);
t3 := Transformation([1,2,4,4]);
o4 := Semigroup([s1,s2,s3,t1,t2,t3]);
rcl := GreensRClasses( o4 );                                
h := CreateHasseDiagram(rcl, IsGreensLessThanOrEqual);
DrawHasse(h);



###################################################################
##  An abstract Hasse Diagram 
###################################################################
d := Domain(["0","a","b","c","1"]);
Elements(d);
Size(d);

r := BinaryRelationByElements(d,
[ Tuple(["0","a"]),
Tuple(["0","b"]),
Tuple(["0","c"]),
Tuple(["a","1"]),
Tuple(["b","1"]),
Tuple(["c","1"])]);

SetIsHasseDiagram(r, true);
DrawHasse(r);



########################################################
## Partitions of a Natural Number
########################################################

# this identifies the holes where the spacers go
sumrep := function(p)
	return List([1 .. Length(p)], i->Sum([1 .. i], j->p[j]));
end;

# a refines b iff sumrep(b) is a subset of sumrep(a)
refines := function(a,b)
	return IsSubset(sumrep(a), sumrep(b));
end;

p := Partitions(5);
h := CreateHasseDiagram(p, refines);
DrawHasse(h);


Source: GAP-README, updated 2001-05-10