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

small NormalToricVarieties fix to retain CoefficientRing and Variable #3442

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

Devlin-Mallory
Copy link
Contributor

Several methods in NormalToricVarieties (notably toricBlowup and thus makeSmooth and makeSimplicial) were discarding the CoefficientRing and Variable of the input toric variety. This fixes that by retaining these options from the input toric variety.

@Devlin-Mallory Devlin-Mallory changed the title small NormalToricVarieties fix small NormalToricVarieties fix to retain CoefficientRing and Variable Aug 27, 2024
@mahrud mahrud requested a review from ggsmith August 27, 2024 22:29
);
coneList' = for t in clStar list (
if all (s, i -> member (i,t)) then continue
else t | {n}
);
Z := normalToricVariety (rays X | {v}, coneList | coneList');
Z := normalToricVariety (rays X | {v}, coneList | coneList', CoefficientRing => X.cache.CoefficientRing, Variable => X.cache.Variable);
Z.cache.toricBlowup = X;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why the base X is cached here but not above?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I understand the question - where above would/should X be cached?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like 5 lines above, the other case where a toric variety is constructed and returned.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see now - I'm not sure why that differs. I could add the base into the cache, unless @ggsmith or anyone else has objections?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, I think that the base toric variety should also be cached in the #s === 1 case. @Devlin-Mallory can you also make this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good to me.

);
coneList' = for t in clStar list (
if all (s, i -> member (i,t)) then continue
else t | {n}
);
Z := normalToricVariety (rays X | {v}, coneList | coneList');
Z := normalToricVariety (rays X | {v}, coneList | coneList', CoefficientRing => X.cache.CoefficientRing, Variable => X.cache.Variable);
Z.cache.toricBlowup = X;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good to me.

@mahrud mahrud merged commit 2b9ff18 into Macaulay2:development Aug 29, 2024
5 checks passed
@mahrud
Copy link
Member

mahrud commented Aug 29, 2024

Thanks for the fixes, and the review :)

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

Successfully merging this pull request may close these issues.

3 participants