Ralf, In another thread Gaby observed that for a Field F SquareMatrix(n,F) should satisfy VectorSpace(F), but unfortunately at present it does not:
(1) -> SquareMatrix(2,Fraction Integer) has VectorSpace(Fraction Integer) (1) false Or perhaps even better if every SquareMatrix(n,R) satisfied Module(R). If it did, then I think the question of coercion would be moot. Regards, Bill Page. On Thu, Jun 10, 2010 at 2:05 PM, Ralf Hemmecke <[email protected]> wrote: > On 06/10/2010 07:17 PM, Bill Page wrote: >> Ralf, >> >> What does the following have to do with Monoid? >> >> >> On Thu, Jun 10, 2010 at 1:06 PM, Ralf Hemmecke <[email protected]> wrote: >>> On 06/10/2010 06:33 PM, Bill Page wrote: >>>> Ralf, >>>> >>>> I think that the map >>>> >>>> coerce : Fraction Polynomial Complex Integer -> % >>>> >>>> which is apparently x+-> [x,x] >>>> >>>> in >>>> >>>> )sh DirectProduct(2,Fraction Polynomial Complex Integer) >>>> >>>> should not be called a coercion. > > If R is a Monoid then DirectProduct(2,R) is and the natural 1 in this > monoid is (1,1) since the multiplication is component-wise. > > So x -> [x,x] looks like quite a natural lift. No? > > As I said, automatic choice of the coercion without giving a hint that > there are also other options is the problem. > > I'd rather like my first example to fail with an error message that > there is an ambiguity instead of returning me an unwanted DirectProduct. > > If it fails, and gives me the possible sigatures, I know that I have > (for example) to specify the return type more precisely. Without any > hint and just being left with DirectProduct, I guess any user will be > confused. > > I consider this a bug in the sense of leaving the user clueless. > > Well, you all know my (non-)preference of automatic coercion. ;-) > > Ralf > > -- > 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. > > -- 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.
