[om] different representations for a/b and a*b^(-1)
David Carlisle
davidc at nag.co.uk
Sat May 18 22:24:18 CEST 2002
(answering paul as Richard's reply hasn't got here yet)
> I see no reason to forbid a/b as a <mop> divide_solidus </mop> b
> or some such OM-like notation. I think solidus is the name for
> the / character.
I don't really know what you mean by the <mop> syntax but it is
certainly true that you could introduce another symbol in another
content dictionary with the semantic of divide, and then give this new
operator a different rendering in your transformation to presentation
form. It just would be a strange thing to do if you intend then symbol
to have the same meaning as the existing divides operator.
> Right, because your syntax tree is not content at all. It is
> approximately a description of the appearance. It distinguishes
> between 1/exp(x),
> exp(-x), e^(-x), 1/e^(x), but for some arbitrary reason CAN'T
> apparently distinguish between
I see nothing arbitrary in that at all. / and - are the same operation
just displayed differently. 1/exp(x) and exp(-x) are different
expressions which are mathematically equal given the properties of exp
but openmath objects are not identified by mathematical equality but by
the term structure. the object for 4 isn't the same as the object for
1 + 3. Depending on teh operation teh presentation may or may not
resemble the term structure. For example
definite integrals are encoded in the core dictionaries using a defint
opertaor that takes two children a range and a lambda term
so the object is encoded as
(defint (interval 0 1) (lambda x (f x)))
but a possible presentation (including my xslt) unwraps that and
displays it as
\int_0^1 f(x) dx
if the second child is an interval similarly
(sum (times 2 x) (times -2 y) (times 2 z)
is displayed as
2x - 2y + 2z
rather than as
2x + -2y + 2z
> cos ax . sin bx where the . is centered.
> If there is to be ONE tree describing the syntax of this, sufficient
> for a display program to render it as expected, the encoding
> must encode the whole expression including the two varieties of
> times, which the author apparently thought of as significant.
The rendering stylesheets I currently have have some heuristics
to chosse between \times and \invisibletimes (ie nothing) they don't
currently ever choose . or \cdot but if I was working in an area
where I wanted that presentation format it wouldn't be hard to tweak
the stylesheet.
David
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
--
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