[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] [Tuples Products And Records]
From: |
wyscc |
Subject: |
[Axiom-developer] [Tuples Products And Records] |
Date: |
Wed, 13 Jul 2005 12:48:03 -0500 |
Changes
http://page.axiom-developer.org/zope/mathaction/TuplesProductsAndRecords/diff
--
Hi Bill:
Yes, we are finally agreeing on something. Use '(A,B,C, ...)" for vanilla
cartesian product and use 'Mapping(D, (A,B))' instead of 'Mapping(D,A,B)'; and
better still allow 'Mapping((C,D),(A,B))'.
> I am not sure what you mean by not implementing:
>> external interfaces for the projection maps in a Cartesian product
>To me, a product is defined by it's projections. You can hide other details of
>the implementation of a product if you wish, but not the projections. If you
>did, then it is mathematically speaking no longer a product.
While it is true that in any specification of a 'CartesianProductCategory(L:
List Domains)', the projections should be exported, there is no requirement
that they must be implemented. (That is the general situation currently in
Axiom). To hide info, it is possible that the projections are only implemented
as local functions in the domain. Whether you want to consider that as
acceptable *in Axiom* is subject to further discussion, but mathematically, the
domain remains a Cartesian product.
>I think we agree that the "vanilla Cartesian product" (A,B) necessarily has
>projections, right? That is all I want. I am not arguing against encapsulation
>or information hiding in the case of the representations of other constructed
>domains. So I think that we agree! :)
Agreed.
>Otherwise "arity" as you have been describing it, is a peculiar thing in
>Axiom. It is the number of inputs to the Mapping constructor minus 1. In my
>case I want the function Mapping constructor to be the exponential object in a
>CCC and of course that has exactly two inputs.
That is why I said your proposal to change the notation in 'Mapping' is
syntactic sugar. You want to use an exponential notation and yet you want to
count arity as the dimension of the cartesian product, but to count arity as
the number of inputs in *any* other. So :
<pre>
arity of Mapping(D,(A,B)) is two.
arity of Mapping(D, (A,B,C)) is three.
arity of Mapping(D,((A,B),C)) is three? (I would say two)
arity of Mapping(D, Record(a:A, b:B)) is two? (I would say one)
arity of Mapping(D, (Record(a:A, b:B))) is two? (I would say one)
arity of Mapping(D, DirectProduct(5,A)) causes a syntax error, or considered
same as:
Mapping(D, (DirectProduct(5,A))) and has arity one.
arity of Mapping(D, (DirectProduct(5,A), (A,B)) is three? (I would say two)
arity of Mapping(D, ((A,B), Record(a:A, b:B)) is two? three? four? (I would say
two)
</pre>
If we do not agree, then it shows such conventions are very confusing. In that
case, perhaps you can give a precise syntax and definition of arity that covers
all the above cases?
William
--
forwarded from http://page.axiom-developer.org/zope/mathaction/address@hidden