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

ToricVarieties: Improve existing blowup functionality #2228

Merged
merged 6 commits into from
Apr 14, 2023

Conversation

HereAround
Copy link
Member

@HereAround HereAround commented Apr 6, 2023

This aims to provide better and more general blowup functionality for toric varieties (definition 3.3.17 in CLS). In particular, a fan subdivision will then not be limited to subdivision of only maximal cones.

This is still WIP. It is necessary for the future development of F-theory tools at the interface between schemes and toric varieties. This is getting ready for review.

cc @apturner @lkastner @HechtiDerLachs

@HereAround HereAround marked this pull request as draft April 6, 2023 14:28
@codecov
Copy link

codecov bot commented Apr 12, 2023

Codecov Report

Merging #2228 (9a04931) into master (af045d7) will increase coverage by 0.39%.
The diff coverage is 95.65%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2228      +/-   ##
==========================================
+ Coverage   73.06%   73.46%   +0.39%     
==========================================
  Files         367      367              
  Lines       50072    50091      +19     
==========================================
+ Hits        36587    36798     +211     
+ Misses      13485    13293     -192     
Impacted Files Coverage Δ
src/Deprecations.jl 0.00% <ø> (ø)
src/PolyhedralGeometry/PolyhedralFan/properties.jl 95.45% <93.93%> (+2.12%) ⬆️
...oricVarieties/NormalToricVarieties/constructors.jl 98.69% <100.00%> (+0.02%) ⬆️

... and 7 files with indirect coverage changes

@lkastner
Copy link
Member

lkastner commented Apr 13, 2023

I added a commit 4a033d6 refactoring starsubdivision to use set operations rather than manually converting everything to basically Vector{Bool} (but masqueraded as Vector{Int}) and then setting entries to 0 and 1 manually. Let me know whether this looks correct to you, it already passed the toric_blowup.jl tests on my machine.

@HereAround
Copy link
Member Author

I added a commit 4a033d6 refactoring starsubdivision to use set operations rather than manually converting everything to basically Vector{Bool} (but masqueraded as Vector{Int}) and then setting entries to 0 and 1 manually. Let me know whether this looks correct to you, it already passed the toric_blowup.jl tests on my machine.

Thank you @lkastner. I believe this works and looks a lot better than my original version.

I have just rebased this to the new version of #2244 (a couple of doctest failures remained). Hopefully, now most of the tests succeed.

@HereAround HereAround force-pushed the BetterToricBlowups branch 3 times, most recently from 4477309 to 8544bf1 Compare April 14, 2023 09:00
@HereAround
Copy link
Member Author

@lkastner I am uncertain how to fix the failure in https://github.com/oscar-system/Oscar.jl/actions/runs/4698570939/jobs/8331022103?pr=2228. Help appreciated.

The new blow_up routine calls _cone_is_smooth(::PolyhedralFan{QQFieldElem}, ::Polymake.SetAllocated{CxxWrap.CxxWrapCore.CxxLong}). On ubuntu-latest, this calls the existing method _cone_is_smooth(::Oscar._FanLikeType, ::AbstractSet{Int64}) (cf. /src/PolyhedralGeometry/PolyhedralFan/properties.jl:593) and succeeds. However, on macOS-latest, this leads to the above failure.

Probably this is a triviality, but I cannot see how to fix this. @fingolfin, @fieker , @thofma - any ideas/suggestions?

@thofma
Copy link
Collaborator

thofma commented Apr 14, 2023

It is also failing on macOS with julia 1.6. @benlorenz any idea why this Polymake type pops up?

@benlorenz
Copy link
Member

The reason for this failure is due to the following:

  • a polymake Set<Int> is used as an argument and this is derived from AbstractSet{CxxLong} (polymake Int is the same as C++ long)
  • on linux CxxLong is an alias for Int64, on macos it is not (this is due to CxxWrap`)

Since the input is converted to a vector anyway loosening the type restriction on the input would probably work, maybe something like AbstractSet{<:Integer} ?

Somewhat unrelated question: Why does the star subdivision require that the cone is smooth?

@HereAround
Copy link
Member Author

The reason for this failure is due to the following:

* a polymake `Set<Int>` is used as an argument and this is derived from `AbstractSet{CxxLong}` (polymake `Int` is the same as C++ `long`)

* on linux `CxxLong` is an alias for `Int64`, on macos it is not (this is due to CxxWrap`)

Since the input is converted to a vector anyway loosening the type restriction on the input would probably work, maybe something like AbstractSet{<:Integer} ?

Thank you. I have just changed the input to AbstractSet{<:Integer} . Let's see if the tests pass now.

Somewhat unrelated question: Why does the star subdivision require that the cone is smooth?

This is an assumption in definition 3.3.17 (and 3.3.13) of the toric book by Cox, Little and Schenk. But I suppose your question would then be: "Why is it necessary to make that assumption?". Truth told - I do not (yet) know where this assumption is being used and for what purpose.

I am aware that later in the book, CLS discuss a generalization of this star subdivision which, if my understanding is correct, can also be carried out if the smoothness assumption is violated. Once I get to this (and have a good answer to your question), the smoothness condition could/might be removed/replaced.

In fact, I understand that @apturner wants this eventually for the further development of FTheoryTools. So I hope to get to this generalization sooner than later. But still, one step at a time.

@lkastner
Copy link
Member

Somewhat unrelated question: Why does the star subdivision require that the cone is smooth?

This is an assumption in definition 3.3.17 (and 3.3.13) of the toric book by Cox, Little and Schenk. But I suppose your question would then be: "Why is it necessary to make that assumption?". Truth told - I do not (yet) know where this assumption is being used and for what purpose.

The definition only works if all the cones are simplicial. Try with the cone over a square and choose an edge to subdivide at, then this does not result in a subdivision of the original fan (the supports disagree). I also think that smoothness is preserved under these operations, but maybe I overlooked something there.

@HereAround HereAround marked this pull request as ready for review April 14, 2023 14:01
@HereAround HereAround requested a review from lkastner April 14, 2023 14:01
@lkastner lkastner merged commit c670b73 into oscar-system:master Apr 14, 2023
@HereAround HereAround deleted the BetterToricBlowups branch April 18, 2023 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request topic: FTheoryTools topic: toric varieties WIP NOT ready for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants