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

Clean up SpecializationMorphism #23343

Closed
jdemeyer opened this issue Jun 30, 2017 · 25 comments
Closed

Clean up SpecializationMorphism #23343

jdemeyer opened this issue Jun 30, 2017 · 25 comments

Comments

@jdemeyer
Copy link

Depends on #23337

CC: @tscrim

Component: algebra

Author: Travis Scrimshaw, Jeroen Demeyer

Branch/Commit: 6766161

Reviewer: Jeroen Demeyer, Travis Scrimshaw

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

@jdemeyer jdemeyer added this to the sage-8.0 milestone Jun 30, 2017
@jdemeyer
Copy link
Author

New commits:

ee4548fUse variable names instead of symbolic variables
e938684Handling flatten.py and some mild cleanup.

@jdemeyer
Copy link
Author

@jdemeyer
Copy link
Author

Commit: e938684

@jdemeyer
Copy link
Author

Dependencies: #23337

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Author

jdemeyer commented Jul 3, 2017

comment:3

Since you are cleaning this up anyway, I would prefer if you could also move the changes from #10483 to flatten.py to this branch. For example, it would allow to test whether the changes here are compatible with #10483.

@tscrim
Copy link
Collaborator

tscrim commented Jul 3, 2017

comment:4

I don't think they are really compatible. Instead, I think these changes should replace those in #10483. The changes of #10483 rely on strings for keys rather than variables, which (in principle) would not work if a variable name is repeated (I haven't explicitly tested that this works in my code or if this is [suppose to be] a supported feature).

@jdemeyer
Copy link
Author

jdemeyer commented Jul 3, 2017

comment:6

OK, that wasn't clear. Thanks for the clarification.

@jdemeyer
Copy link
Author

jdemeyer commented Jul 4, 2017

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Author

jdemeyer commented Jul 4, 2017

Reviewer: Jeroen Demeyer

@jdemeyer
Copy link
Author

jdemeyer commented Jul 4, 2017

Changed author from Travis Scrimshaw to Travis Scrimshaw, Jeroen Demeyer

@jdemeyer
Copy link
Author

jdemeyer commented Jul 4, 2017

comment:8

In order to understand the SpecializationMorphism, I ended up doing a lot more clean up. Please review my commit.


New commits:

7f4e92fFurther clean up of SpecializationMorphism

@jdemeyer
Copy link
Author

jdemeyer commented Jul 4, 2017

Changed commit from e938684 to 7f4e92f

@jdemeyer jdemeyer changed the title Handling flatten.py and some mild cleanup Clean up SpecializationMorphism Jul 4, 2017
@tscrim
Copy link
Collaborator

tscrim commented Jul 4, 2017

comment:9

Inserting at the beginning of a list repeatedly is more expensive than inserting at the end and then reversing (it has to bump each entry back every time you insert). Granted, at this scale it may not be a big issue.

Somewhere between paranoia and it makes the code easier to parse:

-            force_multivariate = (len(old) == 1) and is_MPolynomialRing(R)
+            force_multivariate = ((len(old) == 1) and is_MPolynomialRing(R))

Is there a definitive reason to force the multivariate polynomial ring? I know you're not changing the current implementation, but I'm just wondering if that is something that is necessary since the univariates tend to be more powerful. If you don't know, then we can just leave it as is.

LGTM otherwise.

@jdemeyer
Copy link
Author

jdemeyer commented Jul 4, 2017

comment:10

Replying to @tscrim:

Is there a definitive reason to force the multivariate polynomial ring?

I don't know, I just didn't want to change the existing behaviour.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 4, 2017

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

a28bb4eMinor fixes

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 4, 2017

Changed commit from 7f4e92f to a28bb4e

@jdemeyer
Copy link
Author

jdemeyer commented Jul 4, 2017

comment:12

Minor update.

@tscrim
Copy link
Collaborator

tscrim commented Jul 4, 2017

comment:13

Thanks. LGTM.

@fchapoton
Copy link
Contributor

comment:14

missing utf8 declaration in src/sage/rings/polynomial/flatten.py

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 5, 2017

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

6766161Add UTF-8 encoding header

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 5, 2017

Changed commit from a28bb4e to 6766161

@jdemeyer
Copy link
Author

jdemeyer commented Jul 5, 2017

Changed reviewer from Jeroen Demeyer to Jeroen Demeyer, Travis Scrimshaw

@vbraun
Copy link
Member

vbraun commented Jul 26, 2017

Changed branch from u/jdemeyer/ticket/var_names_not_symbolic_names-23337 to 6766161

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

4 participants