Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new classify_elements() function to refine have_same_parent() #20836

Closed
jdemeyer opened this issue Jun 16, 2016 · 11 comments
Closed

Add new classify_elements() function to refine have_same_parent() #20836

jdemeyer opened this issue Jun 16, 2016 · 11 comments

Comments

@jdemeyer
Copy link

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 Elements 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.

CC: @defeo

Component: coercion

Author: Jeroen Demeyer

Branch/Commit: c41bc91

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/20836

@jdemeyer jdemeyer added this to the sage-7.3 milestone Jun 16, 2016
@jdemeyer
Copy link
Author

@jdemeyer
Copy link
Author

New commits:

fb4b495classify_elements() function to refine have_same_parent()

@jdemeyer
Copy link
Author

Commit: fb4b495

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Jun 17, 2016

comment:3

test.

@sagetrac-tmonteil

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 18, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

bcbc08cMinor fixes

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 18, 2016

Changed commit from fb4b495 to bcbc08c

@jdemeyer
Copy link
Author

Reviewer: Travis Scrimshaw

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 20, 2016

Changed commit from bcbc08c to c41bc91

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 20, 2016

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

c41bc91Use octal also in helper functions

@vbraun
Copy link
Member

vbraun commented Jun 20, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants