#20836: Add new classify_elements() function to refine have_same_parent()
-------------------------------------+-------------------------------------
       Reporter:  jdemeyer           |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.3
      Component:  coercion           |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Jeroen Demeyer     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/jdemeyer/add_new_classify_elements___function_to_refine_have_same_parent__| 
 fb4b4952d04ff503fedf1609f9663ce471c876f7
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Description changed by tmonteil:

Old description:

> The function `have_same_parent(left, right)` is useful and needed to
> support the coercion model. However, that function not only checks
> whether parent are equal, but also whether `left` and `right` are both
> `Element`s and whether they have the same type. This information is
> checked, but lost when `have_same_parent` returns.
>
> Instead, let us have a function `classify_elements(left, right)` which
> does the same checks as `have_same_parent()` (so it should be equally
> efficient), but returns all information.

New description:

 The function `have_same_parent(left, right)` is useful and needed to
 support the coercion model. However, that function not only checks whether
 parent are equal, but also whether `left` and `right` are both `Element`s
 and whether they have the same type. This information is checked, but lost
 when `have_same_parent` returns.

 Instead, let us have a function `classify_elements(left, right)` which
 does the same checks as `have_same_parent()` (so it should be equally
 efficient), but returns all information.

 test.

--

--
Ticket URL: <http://trac.sagemath.org/ticket/20836#comment:4>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to