# Choosing a programming language as a competitive tool

David C. Ullrich ullrich at math.okstate.edu
Tue May 8 19:16:34 CEST 2001

```On Mon, 7 May 2001 21:29:52 +0200, "Alex Martelli" <aleaxit at yahoo.com>
wrote:

>"Andrew Dalke" <dalke at acm.org> wrote in message
>news:9d6k29\$p5e\$1 at slb4.atl.mindspring.net...
>    ...
>> Alex:
>> > Presumably by projecting it onto a space of lower dimensionality, or
>> > embedding it into a space of higher dimensionality.
>    ...
>> That doesn't work because in Python (2, 4) is not equivalent to
>> (2, 4, 0).
>
>Neither is it "equivalent" in geometry -- you need to define what
>2D plane (or other surface) in 3-space that (2, 4) lies on, before
>you can define what 3-vector the 2-vector (2,4) is equivalent to.
>
>> If you want to talk about its embedding in some sort
>> of vector space you'll need another, perhaps boolean space to
>> define which axes of the infinite space are used to define this
>> finite subspace.
>
>"Boolean"?  "finite"?  Seems we're talking at cross-purposes,
>because I don't see where booleans or finiteness enter the
>picture.
>
>
>> Also, if (x, y) really is a vector in a vector space then
>
>...then depending on what definition of "vector space" you
>like, the algebraic structure x and y come from must be a
>ring (or some other kind of abstract algebraic structure), just
>the types or classes of either x or y.  So, a _subset_ of the
>set of (x,y)s that Python lets you express will be your vector
>space -- those where x and y come from the right underlying
>'scalar' ring (or field, or whatever).  (Other subsets will be
>2D vector spaces over all other 'scalar' rings/fields/etc that
>you can represent in Python).

Strictly speaking you need a _field_ here - something which
you might call "vector space over a ring" is really a _module_
over the ring, not a vector space.

Not that I know how this all started, but it looks like all the
vectors anyone's talking about are tuples of scalars. A
person _can_ represent much more abstract sorts of
vector spaces in Python, not that I see any particular
use for it (nor any way to enforce the idea that the
operations must satisfy the axioms); a vector space
is just a subclass of Vector; such a class has a
ScalarField attribute of type type and appropriate
__add__ and __mul__ methods, and then a vector
is just an instance of a vector space. (So for example
a person can represent the vector space of all real-valued
functions on R as a Python class, the problem being
there's no way to verify that, eg, f+g = g+f.)

David C. Ullrich
***********************
"Sometimes you can have access violations all the
time and the program still works." (Michael Caracena,
comp.lang.pascal.delphi.misc 5/1/01)

```