Re: [sage-devel] Re: Category for IntegerModRing(n)

2010-03-21 Thread Nicolas M. Thiery
On Sat, Mar 20, 2010 at 08:52:54AM -0700, Rob Beezer wrote: > On Mar 20, 8:07 am, "Nicolas M. Thiery" > wrote: > > Cayley graph feature (#7555) > > Cayley TABLES (and other "operation tables"). Cayley GRAPHS are due > to Moretti/Miller/Thiery. ;-) Oops :-) > I can testify to that. If you hav

Re: [sage-devel] Re: Category for IntegerModRing(n)

2010-03-21 Thread Gonzalo Tornaria
On Sat, Mar 20, 2010 at 11:52 AM, Rob Beezer wrote: >> (2) IntegerModRing(n) is always in CommutativeRings() IMO this is the one that makes sense, by the same reasons why: sage: parent(2/1) Rational Field IOW, IntegerModRing should be a map from ZZ to CommutativeRings() This is the only "natur

Re: [sage-devel] Re: Category for IntegerModRing(n)

2010-03-20 Thread Robert Bradshaw
On Mar 20, 2010, at 11:22 AM, Florent Hivert wrote: Hi Robert, I wonder if the category infrastructure would support a pervasive command like R=IntegerModRing(7) R.promote(Fields(), with_check=True) R.category() Category of fields with the construction doing no extra work, and the promo

[sage-devel] Re: Category for IntegerModRing(n)

2010-03-20 Thread Alec Mihailovs
>From the user point of view, without reading the documentation, I would expect IntegerModRing(n) be a ring, IntegerModField(p) be a field, and Integer ModAbelianGroup(n) be an Abelian group. So I would go with option (2). It would be rather confusing to define something that you think is a ring,

Re: [sage-devel] Re: Category for IntegerModRing(n)

2010-03-20 Thread Florent Hivert
Hi Robert, >> I wonder if the category infrastructure would support a pervasive >> command like >> >> R=IntegerModRing(7) >> R.promote(Fields(), with_check=True) >> R.category() >> Category of fields >> >> with the construction doing no extra work, and the promote method >> having defaults

[sage-devel] Re: Category for IntegerModRing(n)

2010-03-20 Thread Rob Beezer
Thanks, Florent. That's what I suspected, given my nascent understanding of how categories work. So an irrevocable decision needs to be made at construction time, it would seem. Rob On Mar 20, 10:55 am, Florent Hivert wrote: >    Hi Rob, > > On Sat, Mar 20, 2010 at 10:38:15AM -0700, Rob Beezer

Re: [sage-devel] Re: Category for IntegerModRing(n)

2010-03-20 Thread Robert Bradshaw
On Mar 20, 2010, at 10:38 AM, Rob Beezer wrote: I wonder if the category infrastructure would support a pervasive command like R=IntegerModRing(7) R.promote(Fields(), with_check=True) R.category() Category of fields with the construction doing no extra work, and the promote method having defau

Re: [sage-devel] Re: Category for IntegerModRing(n)

2010-03-20 Thread Florent Hivert
Hi Rob, On Sat, Mar 20, 2010 at 10:38:15AM -0700, Rob Beezer wrote: > I wonder if the category infrastructure would support a pervasive > command like > > R=IntegerModRing(7) > R.promote(Fields(), with_check=True) > R.category() > Category of fields > > with the construction doing no extra wo

[sage-devel] Re: Category for IntegerModRing(n)

2010-03-20 Thread Rob Beezer
I wonder if the category infrastructure would support a pervasive command like R=IntegerModRing(7) R.promote(Fields(), with_check=True) R.category() Category of fields with the construction doing no extra work, and the promote method having defaults and exceptions consistent with John and Nick's

[sage-devel] Re: Category for IntegerModRing(n)

2010-03-20 Thread Rob Beezer
On Mar 20, 8:07 am, "Nicolas M. Thiery" wrote: > Cayley graph feature (#7555) Cayley TABLES (and other "operation tables"). Cayley GRAPHS are due to Moretti/Miller/Thiery. ;-) > That was essentially a one liner I can testify to that. If you haven't been following the Categories work, now mig