[Om3] OpenMath Symbols for Symbolic Computation

Sebastian Freundt hroptatyr at gna.org
Wed Sep 17 14:55:14 CEST 2008


Professor James Davenport <jhd-sBK8fsN9CKk2EctHIo1CcQ at public.gmane.org>
writes:

> On Fri, 12 Sep 2008, Sebastian Freundt wrote:
>> Paul Libbrecht <paul-OMTHpsfvcGZcxvNqPlePQg at public.gmane.org> writes:
>> > Le 11-sept.-08 à 18:39, Sebastian Freundt a écrit :
>> >> for one, NONE of the provided matrix CDs actually define matrices
>> >> (from an
>> >> algebraic point of view), a matrix is just an element of a matrix
>> >> algebra
>> >> or, more generally, a specific representation of a linear mapping,
>> >> so it's
>> >> an element of Hom(R,S), R,S being rings, Hom being the space of
>> >> mappings
>> >> that preserve homomorphy.
>> >
>> > Honestly, this is a linear mapping, not a matrix, at least to what I
>> > was educated in.
>> > A matrix has a notion of being an array so associating the matrix to
>> > an element of Hom(R,S) actually requires a basis.
>> >
>> > I would agree with an element Hom(R^k, S^k) maybe, then it is the same
>> > notion.
>> 
>> Yeah, sorry, I had to write the mail about 10 times because of this
>> gmane-gateway.  I meant R,S being modules of course.  And yes, you need a
>> basis.  Admittedly, and that's exactly what I'm arguing for, additional
>> information are mandatory.  Specifically, our CD is actually a compromise
> I would disgaree here. A Matrix is precisely that, and needs no additional 
> information. IF you wnat that matrix to represent a linear transformation 
> on a space, THEN you need additional information.
>> and we limit to the case where R,S are both M-modules, so you have to 
>> (at least) specify the ground domain (as we call it) M.
>
>
>> >>> From a computational POV, it is quite essential to know the parent
>> >> structure (the space where the element lives) upfront, because
>> >> usually you
>> >> equip your parent structures with certain methods (comparison,
>> >> addition,
>> >> etc.) and not the elements themselves.
>> >
>> > But when you define a function only the very eager people define their
>> > domain and range well!
>> > (I agree it's best practice!).
>> >
>> >> Well, and then we were thinking it's better to start over with a
>> >> fully-fledged CD instead of, um, `improving' the existing ones.
>> >
>> > Maybe you have a biassed interpretation?
>> 
>> Sure. We want to work with matrices (and other objects) in computer
>> algebra systems, and as you can imagine it's hard to guess (from the CAS'
>> POV) what the user is trying to tell us when even the most basic
>> information is missing.
> Right - rather like the polyd family. of CDs. Having such a set of CDs 
> certainly makes sense.
> I'd be happy to look at what you have: I have Peter Horn's matrix1, but 
> don't quite see, for instance, what the point of entry_domain is?

Take this one for instance:

<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
  <OMA>
    <OMS cd="linalg2" name="matrix"/>
    <OMA>
      <OMS cd="linalg2" name="matrixrow"/>
      <OMI> 1 </OMI>
      <OMI> 0 </OMI>
    </OMA>
    <OMA>
      <OMS cd="linalg2" name="matrixrow"/>
      <OMI> 0 </OMI>
      <OMA>
        <OMS cd="nums1" name="rational"/>
        <OMI> 1 </OMI>
        <OMI> 1 </OMI>
      </OMA>
    </OMA>
  </OMA>
</OMOBJ>

Whilst mathematically dodgy, with a bit of context this matrix seems to
make sense.  The question if this matrix is invertible is also not too
hard to answer, but a computer algebra system sees things differently.
2 cases arise:
1. the matrix was meant to be over Z, the (2,2)-entry is in fact bogus but
   could be `interpreted' as rational integer (seeing as though Z is the
   `subset' of Q whose denominators are 1).
2. the matrix was meant to be over Q, all but the (2,2)-entry are bogus
   but could be (quite simply) embedded in Q properly.

Now depending on that choice the invertibility question again is
ambiguous:
- in the simplest case and given 1. the CAS would decide not to try to
  find an inverse since Z is not a field
- given 1. and the more advanced concept of a unit group the CAS could try
  an algorithm to determine whether the matrix is unimodular
- given 2. the matrix is naturally invertible, so no problem here

However, doing the right thing here (automatically) is near to impossible
and also extremely expensive.  The intuitive approach of choosing the
smallest domain that `contains' all elements is doomed (though may be an
interesting play ground for machine intelligence people), so we simply
demand the ground domain and thus avoid all kinds of complications.

Once a suitable algorithm has been chosen (or type clashes have been
detected), the matrix elements are coerced to this entry domain, and this
is the very first time we look at them really.

Hope this clarifies our ansatz a little.

Regards
Sebastian


More information about the Om3 mailing list