Opened 6 years ago
Closed 6 years ago
#17938 closed enhancement (fixed)
implement common refinement of fans
Reported by:  chapoton  Owned by:  

Priority:  minor  Milestone:  sage6.6 
Component:  geometry  Keywords:  fan, toric, refinement 
Cc:  vbraun, novoselt, jkeitel  Merged in:  
Authors:  Frédéric Chapoton  Reviewers:  Andrey Novoseltsev 
Report Upstream:  N/A  Work issues:  
Branch:  da9d676 (Commits, GitHub, GitLab)  Commit:  da9d6765d00393f8b76e496fdaae7f47307f943f 
Dependencies:  Stopgaps: 
Description
Given two fans in the same lattice, compute the common refinement.
Change History (9)
comment:1 Changed 6 years ago by
 Branch set to u/chapoton/17938
 Cc vbraun novoselt jkeitel added
 Commit set to 0ca9d108e87269365c8659755356d7ae1ca73b2f
 Priority changed from major to minor
 Status changed from new to needs_review
comment:2 Changed 6 years ago by
 Commit changed from 0ca9d108e87269365c8659755356d7ae1ca73b2f to 2062a13a12294275dfd231d09f17258a52ca87ca
Branch pushed to git repo; I updated commit sha1. New commits:
2062a13  Merge branch 'u/chapoton/17938' into 6.6.b5

comment:3 Changed 6 years ago by
 Branch changed from u/chapoton/17938 to u/novoselt/17938
comment:4 Changed 6 years ago by
 Commit changed from 2062a13a12294275dfd231d09f17258a52ca87ca to 9acc6329f0453e71c760111a98af36b5b2e8c83d
 Reviewers set to Andrey Novoseltsev
There is nothing difficult with incomplete fans, just need to verify that supports are the same! If you are fine with changes, set to positive review.
New commits:
9acc632  There is no problem subdividing incomplete fans.

comment:5 Changed 6 years ago by
Sorry, but I do not understand what you do with the reverse morphism. It seems like you just do nothing in this if not(self.is_complete())
statement. Does the simple fact of calling FanMorphism
magically modify subdivision
?
comment:6 Changed 6 years ago by
It better not modify anything in the global namespace!!!
sage: F1 = toric_varieties.P2().fan() sage: F2 = Fan([F1.generating_cone(0)]) sage: F2.common_refinement(F1) ... 1661 if not self.is_complete(): 1662 # Construct the opposite morphism to ensure support equality > 1663 FanMorphism(id, other, self, subdivide=True) ... ValueError: morphism defined by [1 0] [0 1] does not map Rational polyhedral fan in 2d lattice N into the support of Rational polyhedral fan in 2d lattice N!
Without constructing the second morphism, it is not obvious that the support of F1 is not strictly bigger than the support of F2. Yet if the second one can be constructed, its domain fan will be exactly the same subdivision, so no need to use it somehow.
Checking equality of supports of noncomplete fans is tricky, since the support does not have to be convex, so there is no simple object that can model it. (And that's why we don't have fan.support()
method  the best model for the support of a general fan is the fan itself as a polyhedral complex.) Another more transparent option is to check if the first constructed morphism is surjective, but looking at the code I suspect it is more timeconsuming.
comment:7 Changed 6 years ago by
 Branch changed from u/novoselt/17938 to u/chapoton/17938
 Commit changed from 9acc6329f0453e71c760111a98af36b5b2e8c83d to da9d6765d00393f8b76e496fdaae7f47307f943f
Ok, looks good to me. I have just added one more example. If you agree, you can set a positive review.
New commits:
da9d676  trac #17938 one more example

comment:8 Changed 6 years ago by
 Status changed from needs_review to positive_review
comment:9 Changed 6 years ago by
 Branch changed from u/chapoton/17938 to da9d6765d00393f8b76e496fdaae7f47307f943f
 Resolution set to fixed
 Status changed from positive_review to closed
New commits:
trac #17938 common refinement of fans