sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.3k stars 447 forks source link

Construct the complex of a fan #11384

Closed vbraun closed 12 years ago

vbraun commented 13 years ago

For some toric algorithms one needs to choose orientations for cones, essentially to construct the homology complex of the cone complex. This patch implements new methods fan.oriented_boundary(cone) and fan.complex() to return chosen boundary orientations of cones and the resulting homology complex.

Apply attachment: trac_11384_fan_complex.patch

Depends on #11558

CC: @novoselt

Component: algebraic geometry

Keywords: sd31

Author: Volker Braun

Reviewer: Andrey Novoseltsev

Merged: sage-5.0.beta5

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

vbraun commented 13 years ago

Author: Volker Braun

novoselt commented 13 years ago

Changed keywords from none to sd31

novoselt commented 13 years ago
comment:3
  1. In oriented_boundary can we replace throughout cone with something more neutral, like cell or part, since it is allowed to be the whole fan?

    1. What exactly is "outward normal first" orientation?
    2. How about representing the output of oriented_boundary as a formal sum with plus/minus 1 coefficients? Wouldn't it be more convenient?
    3. It would be nice to be more clear what is arbitrary and what is not. As I understand, the only randomness is in the choice of orientation of non-full-dimensional generating cones, the rest is then determined.
    4. To reduce randomness of the last case, perhaps one can compute the determinant of the pivot matrix of the (cone rays | identity) matrix)? It may perhaps be also a little faster than working with quotients.
    5. The code crashes on
    sage: fan = toric_varieties.P(3).fan() 
    sage: cone = fan(0)[0] 
    sage: fan.oriented_boundary(cone) 
  2. Are there any references that would be suitable to put into documentation of complex method? What is it used for and what is computed by its homology groups? Is it possible to have torsion? I guess yes, since QQ would be faster otherwise, but it would be nice to have an example!
  3. Would be nice also to say something about the differential maps and why it is possible to define the extended complex for complete fans.
  4. "The orientation of each cone is chose as..." must be "chosen".
  5. Is there a reason why "-1" term is printed in the end? It looks like a bug (not in this patch, of course).
novoselt commented 13 years ago

Reviewer: Andrey Novoseltsev

vbraun commented 13 years ago
comment:4
  1. The normal usage is oriented_boundary(cone), so I would prefer keeping the argument name as it is. Yes it also accepts a fan as a special case, but trying to be general for generality's sake would make the help less helpful, not more.
    1. "ONF": One Never Forgets - Outward Normal First. Mnemonic for the usual boundary orientation choice in algebraic geometry.
    2. Sounds like a good idea. I'll look into it
    3. No, all orientations are arbitrary. Only the relative orientations of (cone,face) is not. The whole point of the method is a way to fix one particular orientation such that one can write down the boundary complex explicitly.
    4. I'm sure there are optimizations but speed hasn't been a bottleneck for me so far. Better to be correct than fast.
    5. Ok will fix that.
    6. It has the homology type of a point, so you can't compute anything interesting by itself. It provides a way to fix one (arbitrary choice of) orientations for all cones, mostly. I'll add a reference.
    7. I don't really have something clever to say about the extended complex. Its rather obvious that it works.
    8. Ok will fix it.
    9. in the homology() of a simplicial complex? It probably depends on the algorithm that SimplicialComplex uses to compute the homology.
vbraun commented 13 years ago

Dependencies: #11558, #11559

vbraun commented 13 years ago
comment:6

Updated doctests because #11559 changes the ordering.

vbraun commented 13 years ago

Attachment: trac_11384_fan_complex.2.patch.gz

Updated patch

vbraun commented 13 years ago

Description changed:

--- 
+++ 
@@ -1 +1,3 @@
 For some toric algorithms one needs to choose orientations for cones, essentially to construct the homology complex of the cone complex. This patch implements new methods `fan.oriented_boundary(cone)` and `fan.complex()` to return chosen boundary orientations of cones and the resulting homology complex.
+
+Apply [attachment: trac_11384_fan_complex.patch](https://github.com/sagemath/sage-prod/files/10652968/trac_11384_fan_complex.patch.gz)
vbraun commented 12 years ago
comment:8

Apply trac_11384_fan_complex.patch

novoselt commented 12 years ago
comment:9

Line 2656 still has "chose" instead of "chosen" ;-)

vbraun commented 12 years ago

Attachment: trac_11384_fan_complex.patch.gz

Updated patch

vbraun commented 12 years ago
comment:10

Fixed!

Also fixed some doctests that relied on the order of boundary cones, I think something changed in the poses stuff. Now applies cleanly against sage-5.0.beta4

novoselt commented 12 years ago
comment:11

Is #11599 still supposed to be in front? That one has to be rebased as well.

vbraun commented 12 years ago
comment:12

I didn't have to rebase #11599, my patch queue is:

trac_12280_padic_hnf_without_zero_rows.patch
trac_11384_fan_complex.patch
trac_11599_no_circular_imports.patch
trac_11599_homset_new_coercion_model.patch
trac_11599_rename_morphisms.patch
trac_11599_toric_morphisms.patch
trac_11599_reviewer.patch

I'm working on implementing your requests there, though.

novoselt commented 12 years ago
comment:13

Oops, sorry - I meant #11559, which is the second dependency here.

vbraun commented 12 years ago

Changed dependencies from #11558, #11559 to #11558

vbraun commented 12 years ago
comment:14

Oh yes I removed the dependency on #15599, forgot to remove it from the ticket description.

novoselt commented 12 years ago
comment:15

That ticket has a really challenging number ;-)

jdemeyer commented 12 years ago

Merged: sage-5.0.beta5