# [om] Re: Bugs in OpenMath standard draft 3

David Carlisle davidc at nag.co.uk
Fri Nov 21 12:02:20 CET 2003

```Bill,

I remember that in the past whenever we have needed the equivalent of an
enumerated variable we've used elements of an implied vector (i.e.
vector_selector(i,V), where V is an OMV), I think that if we restrict the
content of OMV to being literal integers we lose any expressivity which
may have been added by allowing enumerated OMVs in the first place.
How about something more general, for example saying something like the type
of the expression must be integer. (I don't know how that could be
expressed in the form of a schema though ... sounds far too much like type
checking to me!!)

I think that the problem with the current proposal is that it looks like
the variables are being indexed by integers but in fact they are being
indexed by expressions, as the recognition of bound variable has to
happen early, before any evaluation, so we end up with
x_{0} x_{0+0} x_{0+0+0} all being different variables, which is weird.
I don't think there is any expressivity gained or lossed by allowing
this syntax, we allow alpha conversion of bound variable names anyway so
whatever"index" you put is totally arbitrary and equivalent to just
having names x1, x2, x3,...
If you want to have the equiavlent of
forall x_1 ... x_n . P(x_1,x_2,.... x<n)
Then we should do as you say (and can already do in OM1) bind a vector
and have
forall x .  P(select(x,1),...select(x,n))

I think a regular expression for the hex attribute is definitely required,
an example of its use would also be very helpfull.

The regexp is in the schema, we could certainly put it in the text as
well.

# floating point
OMF = element OMF { common.attributes, attlist.OMF}
attlist.OMF =
attribute dec { xsd:string {pattern = "(-?)([0-9]+)?(\.[0-9]+)?(e([+\-]?)[0-9]+)?"}}|
attribute hex { xsd:string {pattern = "[0-9A-F]+"}}

David

--
http://www.dcarlisle.demon.co.uk/matthew

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The