#16405: Cartesian product of rings
-------------------------------------+-------------------------------------
Reporter: nthiery | Owner:
Type: enhancement | Status: needs_info
Priority: major | Milestone: sage-6.3
Component: categories | Resolution:
Keywords: cartesian product | Merged in:
Authors: Nicolas M. ThiƩry | Reviewers: Nathann Cohen
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/nthiery/cartesian_product_of_rings|
27f6c9aa0206d77349f4759062b85ce4fc8f737a
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by nthiery):
Salut Nathann,
Thanks for the quick review!
Replying to [comment:4 ncohen]:
> Some comments/questions:
>
> - What are sub/neg doing in `AdditiveMagma().AdditiveUnital()` ?
> - maybe I misread but you seem to implement `__invert__` in
> `Magmas().Unital().CartesianProduct()`. Shouldn't it be several lines
above, in
> `Magmas().Unital().Inverse().CartesianProduct()` ?
The notion of inverse (resp. negation) can be defined as soon as there
is a unit, thought some elements might not have inverses, or have non
unique inverses. So the method `__invert__` (resp. `__neg__`) makes
sense, even if it's only partially defined.
I just pushed a fix that better handles those partially defined
inverse / negation for cartesian products, and clarifies the
documentation.
> - consistancy -> consistency
Fixed!
> - class nesting is cool and everything but you have to scroll non-stop
with
> stuff like emacs.... Do you have a trick to know in which
sub/sub/sub/sub
> class you are writing your code ?
Alas no. Code folding is really a life saver here, but I still need to
dig through the emacs packages to find one that implements such
folding with a reasonable interface.
> - You implement the `neg` function for cartesian product of
AdditiveInverse
> Magma, but don't you also need to say somewhere what exactly is the
"1"
> element of a cartesian product of UnitalMagma ?
I think this was there. In any cases, right now we have:
{{{
Magmas.Unital.CartesianProducts.ParentMethods.one
Magmas.Unital.CartesianProducts.ElementMethods.__invert__
AdditiveMagmas.AdditiveUnital.CartesianProducts.ParentMethods.zero
AdditiveMagmas.AdditiveUnital.CartesianProducts.ElementMethods._neg_
}}}
> - You do things like :
> {{{
> Magmas().Unital().Inverse()
> }}}
>
> It feels like the syntax should be `Magmas().Unital().Inverse()`,
which would imply Unital. What do you think ?
You mean `Magmas().Inverse()` as a shorthand for
`Magmas().Unital().Inverse()`? I wondered about this, but so far
preferred to only define the Inverse axiom if there exists a unit.
One thing is that there exist a notion of `inverse semigroups` where
an element is only requested to have a "local" inverse (technically it
has to be invertible in some submonoid whose unit need not be a unit
for the whole semigroup). So I'd rather leave the room free for future
extensions.
Cheers,
Nicolas
----
New commits:
||[http://git.sagemath.org/sage.git/commit/?id=27f6c9aa0206d77349f4759062b85ce4fc8f737a
27f6c9a]||{{{16405: better handling and documentation of partially defined
__neg__ and __invert__}}}||
----
New commits:
||[http://git.sagemath.org/sage.git/commit/?id=27f6c9aa0206d77349f4759062b85ce4fc8f737a
27f6c9a]||{{{16405: better handling and documentation of partially defined
__neg__ and __invert__}}}||
--
Ticket URL: <http://trac.sagemath.org/ticket/16405#comment:7>
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.