On Thu, Jun 5, 2008 at 10:17 AM, David Kohel wrote:
>
> Note that the intent of these SAGE constructors is not (just)
> to replicate the design (and errors) of Magma or other languages.

:-) Agreed.

> There are natural product and coproduct constructions in
> various mathematical categories (e.g. a coproduct in Sets
> _is_ the union).

Co-product in Set is *disjoint* union.

> The constructor CartesianProduct should be the product in
> the category of Sets (although you give an example which
> the sets are also rings).  However this identification does not
> conflict with its role in enumeration in loops (over enumerable
> sets).

Agreed.

> A categorical perspective should aid in the design of efficient
> and useful structures for mathematics and computation, many
> of which could map to natural constructions in various languages.

Agreed. Although I think the fact that it might also be "efficient"
has yet to be convincingly demonstrated.  There are also distinct
notions of efficiency that need to be addressed: computational
efficiency, design efficiency, learning efficiency, etc. It is not
clear that a categorical perspective aids in all of these areas.

> The Coproduct in Sets equals the Union, as you indicate.
>

Disjoint union.

> Similarly there should also be a product and coproduct constructor,
> for example, in the category of commutative rings, which are different
> objects. "Should be" means when someone finds the need and time
> to implement such structures.
>

Product (co-product) is a type of limits (co-limit). Objects that live
in categories that support limits should automatically provide such
generic structures. It should not be necessary to implement then
specifically unless there is some good too - e.g. computational
efficiency.

> Record appears not to fit in a (mathematical) category framework,
> but an equivalent functionality may be provided by some existing
> Python structure.
>

Records are just an implementation of the standard categorical product
construction as the limit:

      h: Record(a:A, b:B) -> A x B

'a' and 'b' are names for the projection maps

     a: Record(a:A, b:B) -> A
     b: Record(a:A, b:B) -> B

See for example: http://axiom-wiki.newsynthesis.org/SandBoxLimitsAndColimits

It is odd perhaps that Python does not currently implement record or
union, although it has been considered as a possible extension to
Python by the original developer:

http://www.artima.com/weblogs/viewpost.jsp?thread=86641

It is possible to write a Python class that provides these types.

Regards,
Bill Page.

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to