[om] constants and hasse diagrams

Andrew Solomon andrew at illywhacker.net
Fri May 4 23:29:25 CEST 2001


Dear OM list,

This message proposes symbols (fns2, constant) and (relations2, hasse_diagram) 
which I need for my work on rendering Hasse diagrams. I give motivation 
and some examples.

Andrew

Motivation
==========

The way the application works: if one has a hasse diagram
h in some computer algebra system such as GAP or Maple,
one would be able to issue the command 
DrawHasse(h);
and a browser window is fired and a 3d rendering of the hasse diagram
(using Ralph Freese's latdraw applet) is displayed. Input to the 
applet is the hasse diagram encoded in OpenMath. The main constraint
is that the applet needs to obtain a string representing each vertex
of the hasse diagram. A previous discussion on this list concluded that
the mathematically correct way to do this would be to represent the 
vertices of the diagram by variables of constant value, hence the 
binding symbol (fns2, constant). 

A hasse diagram is represented as a sequence of pairs 
(v, v_covers) whose second element is the list of 
vertices which cover vertex v.

Symbols
=======

In CD fns2:

<CDDefinition>
<Name> constant </Name>
<Description> 
This element must be placed within an OMBIND element and 
dictates that its first argument -- the bound variables 
placed within an OMBVAR element -- are constant within its second argument.
</Description>
<Example>
An example to represents the constant x
<OMOBJ>
  <OMBIND>
    <OMS cd="fns2" name="constant"/>
    <OMBVAR>
      <OMV name="x"/>
    </OMBVAR>
		<OMV name="x"/>
  </OMBIND>
</OMOBJ>
</Example>
</CDDefinition>


In CD relation2:

<CDDefinition>
<Name> hasse_diagram </Name>
<Description> 
The arguments of this symbol are pairs (v, v_covers).
The first element of each pair is regarded as a vertex in the hasse diagram
and the second argument is the list of elements which cover v. 
For each vertex v of the hasse diagram, there must be a corresponding pair
(v, v_covers).
</Description>
<Example>
This example is the hasse diagram on two vertices: 0 < 1.
<OMOBJ>
	<OMA>
		<OMS cd="relation2" name="hasse_diagram"/>
		<OMA>
			<OMS cd="list1" name="list"/>
			<OMI>0</OMI>
			<OMA>
				<OMS cd="list1" name="list"/>
				<OMI>1</OMI>
			</OMA>
		</OMA>
		<OMA>
			<OMS cd="list1" name="list"/>
			<OMI>1</OMI>
			<OMA>
				<OMS cd="list1" name="list"/>
			</OMA>
		</OMA>
	</OMA>
</OMOBJ>
</Example>
</CDDefinition>



Examples
========

Example 1: 
The hasse diagram on symbols 0, a,b,c, 1 with 0 < a,b,c < 1

<OMOBJ>
	<OMBIND>
		<OMS cd="fns2" name="constant"/>
		<OMBVAR>
			<OMV name="0"/>
			<OMV name="a"/>
			<OMV name="b"/>
			<OMV name="c"/>
			<OMV name="1"/>
		</OMBVAR>
		<OMA>
			<OMS cd="relation2" name="hasse_diagram"/>
			<OMA>
				<OMS cd="list1" name="list"/>
				<OMV name="0"/>
				<OMA>
					<OMS cd="list1" name="list"/>
					<OMV name="a"/>
					<OMV name="b"/>
					<OMV name="c"/>
				</OMA>
			</OMA>
			<OMA>
				<OMS cd="list1" name="list"/>
				<OMV name="a"/>
				<OMA>
					<OMS cd="list1" name="list"/>
					<OMV name="1"/>
				</OMA>
			</OMA>
			<OMA>
				<OMS cd="list1" name="list"/>
				<OMV name="b"/>
				<OMA>
					<OMS cd="list1" name="list"/>
					<OMV name="1"/>
				</OMA>
			</OMA>
			<OMA>
				<OMS cd="list1" name="list"/>
				<OMV name="c"/>
				<OMA>
					<OMS cd="list1" name="list"/>
					<OMV name="1"/>
				</OMA>
			</OMA>
			<OMA>
				<OMS cd="list1" name="list"/>
				<OMV name="1"/>
				<OMA>
					<OMS cd="list1" name="list"/>
				</OMA>
			</OMA>
		</OMA>
	</OMBIND>
</OMOBJ>


Example 2:
A hasse diagram whose elements are (symbols representing) permutations
and whose partial order is the weak Bruhat ordering on permutations.

<OMOBJ>
	<OMBIND>
		<OMS cd="fns2" name="constant"/>
		<OMBVAR>
			<OMV name="()"/>
			<OMV name="(2,3)"/>
			<OMV name="(1,2)"/>
			<OMV name="(1,2,3)"/>
			<OMV name="(1,3,2)"/>
			<OMV name="(1,3)"/>
		</OMBVAR>
		<OMA>
			<OMS cd="relation2" name="hasse_diagram"/>
			<OMA>
				<OMS cd="list1" name="list"/>
				<OMV name="()"/>
				<OMA>
					<OMS cd="list1" name="list"/>
					<OMV name="(2,3)"/>
					<OMV name="(1,2)"/>
				</OMA>
			</OMA>
			<OMA>
				<OMS cd="list1" name="list"/>
				<OMV name="(2,3)"/>
				<OMA>
					<OMS cd="list1" name="list"/>
					<OMV name="(1,2,3)"/>
				</OMA>
			</OMA>
			<OMA>
				<OMS cd="list1" name="list"/>
				<OMV name="(1,2)"/>
				<OMA>
					<OMS cd="list1" name="list"/>
					<OMV name="(1,3,2)"/>
				</OMA>
			</OMA>
			<OMA>
				<OMS cd="list1" name="list"/>
				<OMV name="(1,2,3)"/>
				<OMA>
					<OMS cd="list1" name="list"/>
					<OMV name="(1,3)"/>
				</OMA>
			</OMA>
			<OMA>
				<OMS cd="list1" name="list"/>
				<OMV name="(1,3,2)"/>
				<OMA>
					<OMS cd="list1" name="list"/>
					<OMV name="(1,3)"/>
				</OMA>
			</OMA>
			<OMA>
				<OMS cd="list1" name="list"/>
				<OMV name="(1,3)"/>
				<OMA>
					<OMS cd="list1" name="list"/>
				</OMA>
			</OMA>
		</OMA>
	</OMBIND>
</OMOBJ>


Example 3:
The divisors of the integer 10 ordered by division. Once again, 
this is represented for rendering. 

<OMOBJ>
	<OMBIND>
		<OMS cd="fns2" name="constant"/>
		<OMBVAR>
			<OMV name="1"/>
			<OMV name="2"/>
			<OMV name="5"/>
			<OMV name="10"/>
		</OMBVAR>
		<OMA>
			<OMS cd="relation2" name="hasse_diagram"/>
			<OMA>
				<OMS cd="list1" name="list"/>
				<OMV name="1"/>
				<OMA>
					<OMS cd="list1" name="list"/>
					<OMV name="2"/>
					<OMV name="5"/>
				</OMA>
			</OMA>
			<OMA>
				<OMS cd="list1" name="list"/>
				<OMV name="2"/>
				<OMA>
					<OMS cd="list1" name="list"/>
					<OMV name="10"/>
				</OMA>
			</OMA>
			<OMA>
				<OMS cd="list1" name="list"/>
				<OMV name="5"/>
				<OMA>
					<OMS cd="list1" name="list"/>
					<OMV name="10"/>
				</OMA>
			</OMA>
			<OMA>
				<OMS cd="list1" name="list"/>
				<OMV name="10"/>
				<OMA>
					<OMS cd="list1" name="list"/>
				</OMA>
			</OMA>
		</OMA>
	</OMBIND>
</OMOBJ>

--
om at openmath.org  -  general discussion on OpenMath
Post public announcements to om-announce at openmath.org
Automatic list maintenance software at majordomo at openmath.org
Mail om-owner at openmath.org for assistance with any problems



More information about the Om mailing list