# [Om] Tuple and list : any distinction?

Joe Collins joseph.collins at nrl.navy.mil
Thu Feb 18 18:56:15 CET 2010

Dear Michael,

Most of what you write is roughly consistent with what I have understood, and
helps a little more with the OpenMath flavor.
I was a little thrown by "Semantics of OpenMath and MathML3", Kohlhase & Rabe,
where:

Definition 3 (OM Context). An OM context C is an n-tuple of variables
which we will write as <x1 , . . . , xn >. We will use + for tuple
concatenation and $\in$ for tuple membership.

implies tuple concatenation is normal.
(Sorry, I didn't mean to knock you for inconsistency).

Let me, however, get straight to my real concern.
I want to represent a coordinate variable tuple like (X, Y, Z) or
(r, theta, phi). I do NOT consider these "vectors" in general.
I was considering using tuple to construct them, but then needed a
means of indexing them. Either adding a "tuple_selector" symbol or using the
existing list symbols seemed to be the two best options, with my preference
towards the "tuple_selector" symbol.
After this feedback on the OpenMath flavor of things, my preference has
increased in that direction.

"What does it mean to add
(r1, theata1, phi1) + (r2, theata2, phi2)  ?".

(Things aren't sufficiently interesting if you stay in Cartesian coordinates!)

Regards,
Joe

Michael Kohlhase wrote:
> Dear Joe,
>
> there are at least two possible answers to this question:
>
> Mathematical:
>
> generally spoken, tuples and lists are isomorphic as data raw
> structures, but support conceptually different operations. Tuples are
> usually thought of as having fixed length and operations are between
> tuples of same length. Operations are mostly from linear algebra. In the
> ecc CD we have dependent tuples that are mostly used for defining
> functions.
>
> Lists are thought of as of variable length, and the operations are
> mostly constructing lists from the empty list by prepending, appending
> lists, mapping functions over lists,.... Moreover, lists typically only
> have members of the same "type".
>
> So, even though everything you do with tuples,  the mathematical,
> operational  intuitions are quite different.
>
> Formally:
>
> The levels of formality in the descirption of ecc and list1/2 are vastly
> different. ECC (Extended Calculus of Construction) is a logical system,
> where tupling has a very well-defined role. list1/2 is a (intendedly)
> vague description of a vocabulary of lists without going into too much
> detail, so that it can be universally used.
>
> hope this helps,
>
> Michael
>
> On 17.02.10 14:51, Joe Collins wrote:
>> The OpenMath ecc CD defines Tuple and the list1 CD defines list.
>>
>> Is there any essential distinction between Tuple and list?
>> If so, what?
>>
>> Some of the definitions in list1, list2 suggest (to me) that the order
>> of the
>> list elements are arbitrary. Is this actually the case?
>>
>> Joe
>>
>

--
_______________________________
Joseph B. Collins, Ph.D.