OpenMath / OMSTD

The OpenMath Standard (starting with OpenMath 2)
9 stars 5 forks source link

Container element for CMP & FMP, which can have a stable author-defined ID #42

Open kohlhase opened 6 years ago

kohlhase commented 6 years ago

see https://github.com/OpenMath/OM3/issues/140

davidcarlisle commented 6 years ago

Could the initial comment be edited to have some words rather than a link to the OM3 ticket? the description there isn't really understandable (just broken links to some examples were on a wiki that are now not available at that address)

kohlhase commented 6 years ago

You are right, I had not noticed the dangling references, and I am afraid that getting the original TRAC back online is not really an option.

Here is what I think the suggestion is: Group CMPs and FMPs in CDs that express the same mathematical concerns into one element (which Christoph calls Property for the moment).

An example would be to wrap the exiting

<CMP> lcm(a,b) = a*b/gcd(a,b) </CMP>

<FMP>
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
  <OMA>
    <OMS cd="relation1" name="eq"/>
    <OMA>
      <OMS cd="arith1" name="lcm"/>
      <OMV name="a"/>
      <OMV name="b"/>
    </OMA>
    <OMA>
      <OMS cd="arith1" name="divide"/>
      <OMA>
        <OMS cd="arith1" name="times"/>
    <OMV name="a"/>
    <OMV name="b"/>
      </OMA>
      <OMA>
        <OMS cd="arith1" name="gcd"/>
        <OMV name="a"/>
        <OMV name="b"/>
      </OMA>
    </OMA>
  </OMA>
</OMOBJ>
</FMP>

in arith1.ocd with a <Property id="lcm-gcd-identity"> that can be referenced to the outside. This is somewhat inspired by OMDoc that uses <omtext> with some attributes for that. OMDoc even allows multiple CMPs in different languages and multiple FMPs in different formalization formats. But I am not sure that Christoph also had this in mind.

I personally think this would be useful to make CDs more manageable.

davidcarlisle commented 6 years ago

Thanks for the clarification.

Not an unreasonable idea, it's come up before that it would be nice often to tie an FMP and CMP together that say the same thing.

But a breaking change so definitely OM3 not OM2rx so come back to this another day...

kohlhase commented 6 years ago

I completely agree, this is why it is not on the R2 milestone :-).