Bill Page <[email protected]> writes:
| On Sun, Jun 13, 2010 at 11:35 AM, Gabriel Dos Reis <[email protected]> wrote:
| > Bill Page <[email protected]> writes:
| >
| > | On Sun, Jun 13, 2010 at 9:25 AM, Gabriel Dos Reis <[email protected]>
wrote:
| > | >
| > | > What I said for THIS SPECIFIC problem is that the implicit coerciion
| > | > problem comes from
| > | >
| > | > if R has SetCategory then FullyRetractableTo R
| > | >
| > |
| > | Bot note that the specific coercion also comes from Algebra?
| >
| > Why do you thin it comes from Algebra instead of FullyRetractableTo R?
| >
|
| The signature for this function comes from multiple sources. In the
| case which is the subject of this thread R is a CommutativeRing.
|
| In src/algeba/vector.spad.pamphlet:
|
| DirectProductCategory(dim:NonNegativeInteger, R:Type): Category ==
| Join(IndexedAggregate(Integer, R), CoercibleTo Vector R, _
| finiteAggregate) with
| ...
| if R has CommutativeRing then
| Algebra R
| ---
|
| In src/algebra/catdef.spad.pamphlet
| ...
| Algebra(R:CommutativeRing): Category ==
| Join(Ring, Module R) with
| --operations
| coerce: R -> %
| ++ coerce(r) maps the ring element r to a member of the algebra.
| add
| coerce(x:R):% == x * 1$%
The coercion from a scalar to a DirectProduct is implemented as
coerce(r:R):% == per new(dim, r)$Vector(R)
(see vector.spad.pamphlet)
| ...
|
| > | Do you also want to deny that DirectProduct(n,R) satisfies Algebra(R)?
| >
| > 'also want to deny'? I am having trouble understanding your question.
|
| Do you want to remove the above code from DirectProductCategory?
I am concerned with the operations defined by DirectProduct and their
semantics. For the specific case at hand, I don't care about the
default implementation in Algebra since DirectProduct explicitly
overwrites it, saying that the scalar value 1 should be regarded the same
as the vecor [1,1,1,1], for example.
My contention is that many of the operations in DirectProduct have
fishy semantics.
coerce: R -> %
is one of them. Another one (I hope NOT under discussion at this point) is
*: (%,%) -> %
which multiplies the vector componentwise!
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.