#18263: reintroduce `__neg__` for magmas cartesian product
-------------------------------------+-------------------------------------
       Reporter:  vdelecroix         |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.7
      Component:  categories         |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Vincent Delecroix  |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/vdelecroix/18263                 |  af11981fecdeb91b886b21962626d7ae7d720a65
   Dependencies:  #16836             |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by {'newvalue': u'Vincent Delecroix', 'oldvalue': ''}):

 * status:  new => needs_review
 * commit:   => af11981fecdeb91b886b21962626d7ae7d720a65
 * branch:   => u/vdelecroix/18263
 * author:   => Vincent Delecroix


Old description:

> In #16836 the `__neg__` operation for cartesian product was moved from
> `AdditiveMagmas` to the `AdditiveMagmas.WithInverse()`. The operation was
> ambiguous but the feature is lost. We just revert the removal.
>
> Moreover, there was a bug in Cartesian products of
> `CombinatorialFreeModule` as this generic `__neg__` was called instead of
> the customized `_neg_` which worked (see
> [http://trac.sagemath.org/ticket/16836#comment:22 #16836 comment:22] and
> [http://trac.sagemath.org/ticket/16836#comment:23 #16836 comment:23])!
> One solution is to use `__neg__` everywhere instead of `_neg_`.

New description:

 In #16836 the `__neg__` operation for cartesian product was moved from
 `AdditiveMagmas` to the `AdditiveMagmas.WithInverse()`. The operation was
 ambiguous but the feature is lost. We just revert the removal.

 Moreover, there was a bug in Cartesian products of
 `CombinatorialFreeModule` as this generic `__neg__` was called instead of
 the customized `_neg_` which worked (see
 [http://trac.sagemath.org/ticket/16836#comment:22 #16836 comment:22] and
 [http://trac.sagemath.org/ticket/16836#comment:23 #16836 comment:23])! We
 replace `_neg_` with `__neg__` in `CombinatorialFreeModule`.

--

Comment:

 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=6e9cf9e72ced0969fd920eca5437f2e3c1d33009
 6e9cf9e]||{{{Ticket 16836 fix __neg__ for cartesian products}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=af11981fecdeb91b886b21962626d7ae7d720a65
 af11981]||{{{Trac 18263: __neg__}}}||

--
Ticket URL: <http://trac.sagemath.org/ticket/18263#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to