[om] more comments on CDs

David Carlisle davidc at nag.co.uk
Fri Oct 25 10:56:05 CEST 2002

 Some initial persoanl responses to some of your points...

  IN GENERAL: The content of the "CDUses" tag lists the short name of a
    CD. How do you connect this to the URL that fully determines the CD?
    Example: <CDUses> <CDName>logic1</CDName> <CDName>plangeo1</CDName>
    <CDName>plangeo2</CDName> </CDUses>

I think the answer here is "the same way as you resolve 
<OMS cd="logic1" name=.. " />
This is of course implementation specific but I claim that's a good
thing it allows various things we couldn't  standardise like looking in
a list of places (http://www.openmath.org/cd being one), or an MBase
database or one mf Michael's OMDoc theories or anything else that's
appropriate to the application. Compare LaTeX's \usepackage{xxxxx}
If you don't have xxxxx.sty to hand you need to find it somewhere,
somehow. Looking now people may be tempted to suggest that this should
be specified instead by some URI so that it can always be found.
However if it had been specified that way in the beginning then
it wouldn't have been an internet uri it would have been a JANET or
BITNET address or something else that would be a lot less useful these

  IN GENERAL: David Carlisle's stylesheet does not detect spurious

I can probably add something. Originally it was mainly designed to check
things that _wouldn't_ be picked up by validating a DTD. However I can
add some extra checks equivalent to the DTD grammar.

    When a symbol is defined as a constructor

I'm not sure we really have the notion of constructor, I think we only
have functions that are used with OMapply. They may be specified as
creating objects of some new type but the head is just a normal function
symbol, not a constructir you can pattern match against.

  For instance: is rational(4,6) allowed? 

yes. I think rational is just a function from the Z x Z -> Q and cantake
any integer valued expressions.

> But then, what does it mean to take "denominator" (not yet
>   defined...): 2 or 4?

denominator would be defined from Q to Z (being the denominator when
written in lowest terms together with some rule about signs) but it
wouldn't be able to "see" the arguments of rational.

> Eg, if f is a symbol then arg(f(a,b,c,d),3) =  c. 

I don't think that you can define such an arg function in general unless
we introduce something in addition to OMA/OMS that is a constructor
rather than applying a function, if f constructs terms of type T then
clearly you can specify a deconstructor T_3 that takes the third
component of such objects whether or not they are constructed by the
constructor f. so you could do T_3(f(a,b,c,d)) which would give you
something equivalent to c if f(a,b,c,d) is a canonical form for objects
of type T. (cf denominator deconstructor for rationals above)

  IN FNS1: the introduction to the symbol "range" 

will check, thanks.

  IN FNS1: in the introduction to "range" the word "whose" is misspelled


  So, an
  interpretation for n-ary functions F of apply_to_list (F, somelist )
  might be F(the sequence of elements in somelist). 

Yes I think that was the  intended meaning of apply_to_list if that
isn't clear we should improve the description.

  IN LIST1: Can we see list("james", "should", "be", "knighted") as a header of an <OMA>,
    with argument a number in  {1..4}, so that
    (list("james", "should", "be", "knighted"))(3) evaluates to "be"?

I think you can do that consistentlty but probably you should use a
different list CD for that, not the one in the mathml CD Group as MathML
lists do not have that use, the mml equivalent is
selector(("james", "should", "be", "knighted"),3)
and the mathml cd group does have the corresponding selector symbol.

For James:-)


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