Hi There,

> In order to let Rob use IntegerModRing(n) as example of finite
> additive group for his cool Cayley graph feature (#7555), I just wrote
> a patch (#8562) letting IntegerModRing(n) use the category
> framework. That was essentially a one liner, plus minor updates here
> and there, and all test pass.

[...]


> The Mod call constructs IntegerModRing(2^9941) and the primality test
> triggers a timeout or pari overflow.
> 
> What strategy would you recommend?
> 
> (1) We don't care about the usecase above (hmm)
> 
> (2) IntegerModRing(n) is always in CommutativeRings()
> 
> (3) Same thing, unless the user specifies the category:
> 
>     IntegerModRing(5, Fields())

You probably mean
      IntegerModRing(5, category=Fields())
which is consitent with was we do in sevaral other places.

>     Although in that case, he might as well call GF(5).
> 
> (4) IntegerModRing(n) always do a primality test, unless the user
>     specifies himself the category.
> 
> (5) When n is not too big, IntegerModRing(n) checks the primality of
>     n, and sets the category accordingly. Otherwise it always uses
>     CommutativeRings().
> 
> (6) When n is not too big, IntegerModRing(n) checks the primality of
>     n, and returns GF(n) or a plain IntegerModRing(n) accordingly.

What about:

  (6') if the user specifies a category with
      IntegerModRing(5, category=Fields())
then trust him and do no check otherwise (6). But maybe it is what you meant.

Cheers,

Florent

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

To unsubscribe from this group, send email to 
sage-devel+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to