#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):
Replying to [comment:11 nbruin]:
> Isn't that going to be a problem?
> {{{
> sage: A=IntegerModRing(19, category=Fields())
> sage: B=IntegerModRing(19)
> sage: B in Fields()
> True
> }}}
> After this isn't the category of `B` refined to fields?
It is:
{{{
sage: A = IntegerModRing(19)
sage: B = IntegerModRing(19,category=Fields())
sage: A==B
False
sage: issubclass(type(A), Fields().parent_class)
False
sage: A in Fields()
True
sage: issubclass(type(A), Fields().parent_class)
True
}}}
> And doesn't that then mean that A and B are the same,
No, it doesn't (to my surprise, I actually thought they ''should'' be
recognised as equal now):
{{{
sage: A==B
False
sage: type(A)==type(B)
False
sage: A.category() == B.category()
False
sage: A.category()
Join of Category of fields and Category of subquotients of monoids and
Category of quotients of semigroups and Category of finite enumerated sets
sage: B.category()
Join of Category of fields and Category of subquotients of monoids and
Category of quotients of semigroups
}}}
> and hence should be identical? But if !UniqueRepresentation takes the
category argument into account, they won't be identical.
No, it is not !UniqueRepresentation:
{{{
sage: isinstance(A,UniqueRepresentation)
False
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/15223#comment:13>
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.