#15223: Let the `TestSuite` test that the construction of a parent returns the
parent
-------------------------------------+-------------------------------------
Reporter: SimonKing | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-5.12
Component: coercion | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/SimonKing/ticket/15223 | a81fcc1072df88cc369d7aa0b7ae423fd97d7f02
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by SimonKing):
It seems that it became "todo" in #8562. And there is a discussion
[https://groups.google.com/forum/#!topic/sage-devel/IeIeHsnNIf4 here]. It
seems indeed that in this discussion there was an agreement that
1. one should not do primality test when creating the `IntegerModRing`
2. calling `is_field()` will do a primality test, and it was even
suggested to update the category to `Fields()`, which actually has been
impossible at that time
3. it should be possible for the user to assert that the modulus is prime,
''without'' using `GF(n)`. And, by the way, note that `GF(n)` would by
default do a factorisation of `n`, and I don't know if it is possible for
the user to skip this.
What do I conclude from this?
- Given 3., I see why people want to work with
`IntegerModRing(n,category=Fields())` instead of `GF(n)` when they know
that the huge number n is prime.
- Given 2., it might make sense to call `_refine_category` in `is_field`
(and not only by 'R in Fields()') when the primality test succeeds.
- Given the cited discussion, it seems that the existence of an optional
`category` argument is good.
- Providing the category `Fields()` at creation time should have the same
effect as refining the category to `Fields()`. Namely, at the moment, the
categories of `IntegerModRing(5,category=Fields())` and
`IntegerModRing(5)` after `... in Fields()` are different.
And I am stuck with the following questions:
- Should the choice of a category play a role in testing equality for
integer mod rings?
- Would we like that there is precisely ''one'' instance of an integer mod
ring for a given modulus, that is automatically updated if the user later
provides more information? What I mean is this:
{{{
sage: R = IntegerModRing(5)
sage: R.category()
Join of Category of commutative rings and Category of subquotients of
monoids and Category of quotients of semigroups and Category of finite
enumerated sets
sage: S = IntegerModRing(5, category=Fields())
sage: R is S
True
sage: R.category()
Join of Category of fields and Category of subquotients of monoids and
Category of quotients of semigroups and Category of finite enumerated sets
}}}
__Suggested way to proceed__
- I open a new ticket implementing the conclusions formulated above.
- Depending on your answers to my questions, I open another new ticket to
address them.
- I make these one or two tickets a dependency for this ticket.
--
Ticket URL: <http://trac.sagemath.org/ticket/15223#comment:24>
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/groups/opt_out.