Skip to content

Commit

Permalink
Instructions for documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pbelmans committed Aug 4, 2021
1 parent d26afc2 commit 172fb50
Show file tree
Hide file tree
Showing 3 changed files with 197 additions and 139 deletions.
152 changes: 13 additions & 139 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,157 +9,31 @@ If you have used this code in any way (including the interactive versions on my

## Getting started

It suffices to load ``diamond.sage`` in Sage to get started.
It suffices to load ``diamond.py`` in Sage to get started. The documentation with lots of examples can be [read online](https://pbelmans.ncag.info/hodge-diamond-cutter/) or as [a pdf](https://pbelmans.ncag.info/hodge-diamond-cutter/hodgediamondcutter.pdf).


# Functionality

## Varieties and constructions

Below is the list of currently implemented constructions. See their respective documentation if their usage is not clear. They are roughly grouped into themes.
```
zero
point
lefschetz
Pn(n)
curve(genus)
symmetric_power(n, genus)
jacobian(genus)
abelian(dimension)
moduli_vector_bundles(rank, degree, genus)
seshadris_desingularisation(genus)
moduli_parabolic_vector_bundles_rank_two(genus, alpha)
quot_scheme_curve(genus, length, rank)
fano_variety_intersection_quadrics_odd(g, i)
fano_variety_intersection_quadrics_even(g, i)
fano_variety_lines_cubic(n)
hilbtwo(X)
hilbthree(X)
generalisedkummer(n)
ogrady6
ogrady10
surface(genus, irregularity, h11)
hilbn(surface, n)
nestedhilbn(surface, n)
complete_intersection(degrees, dimension)
hypersurface(degree, dimension)
weighted_hypersurface(degree, weights)
cyclic_cover(ramification, cover, weights)
partial_flag_variety(D, I)
generalized_grassmannian(D, k)
grassmannian(k, n)
orthogonal_grassmannian(k, n)
symplectic_grassmannian(k, n)
horospherical(D, y, z)
odd_symplectic_grassmannian(k, n)
gushel_mukai(n)
Mzeronbar(n)
quiver_moduli(Q, d, mu)
fano_threefold(rho, ID)
```


## The library
Of course, Hodge diamonds are little more than collections of numbers. But to make manipulating them easy, there is a convenient `HodgeDiamond` class which has many convenient methods, so that manipulating them becomes easy. Describing the whole interface is a bit tedious, let me just give the ones which are not obvious operations.

The `HodgeDiamond` class:
```
HodgeDiamond.betti()
HodgeDiamond.middle()
HodgeDiamond.euler
HodgeDiamond.hirzebruch
HodgeDiamond.homological_unit()
HodgeDiamond.hochschild()
HodgeDiamond.level()
HodgeDiamond.blowup(other, codim)
HodgeDiamond.bundle(rank)
```

The `HochschildHomology` class:
```
HochschildHomology.symmetric_power(k)
```


## Examples

As an example of why it is interesting to consider Hodge diamonds and perform operations on them, let us consider the cubic fourfold. There is an intricate connection to K3 surfaces. Let us try and see this well-known connection.

To see the Hodge diamond of a K3 surface, it suffices to do

```
print(K3)
```

because K3 surfaces are hardcoded (well, all of them have the same Hodge diamond, which is just that of a quartic surface), which is

```
1
0 0
1 20 1
0 0
1
```

Now for the cubic fourfold we do
## Contributing

```
print(hypersurface(3, 4))
```
Please feel free to make suggestions for more examples of Hodge diamonds. Preferably with a link to a closed formula, generating series or method of computation.

which gives
Feature requests are also very welcome.

```
1
0 0
0 1 0
0 0 0 0
0 1 21 1 0
0 0 0 0
0 1 0
0 0
1
```
## Instructions to myself

Removing the primitive part of the middle cohomology gives you back the Hodge diamond of a K3 surface, and this is the first glimpse at a very interesting story relating the two.
To build the documentation:

```
print(hypersurface(3, 4) - K3(1))
sage -sh -c "make html"
cp -r _build/html/ docs
sage -sh -c "make latexpdf"
cp _build/latex/hodgediamondcutter.pdf docs
```

gives
To perform the unit tests:

```
1
0 0
0 0 0
0 0 0 0
0 0 1 0 0
0 0 0 0
0 0 0
0 0
1
sage -t diamond.py
```
suggesting that there is a "boring" and an "interesting" part of the cohomology of a cubic fourfold.


## Contributing

Please feel free to make suggestions for more examples of Hodge diamonds. Preferably with a link to a closed formula, generating series or method of computation.
And suggestions on improving the documentation are also welcome.

Feature requests are also very welcome. And suggestions on improving the documentation are also welcome.
68 changes: 68 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.

#from sage.env import SAGE_DOC_SRC, SAGE_DOC, SAGE_SRC
#
#try:
# import sage.all
#except ImportError:
# raise RuntimeError("to build the documentation you need to be inside a Sage shell (run first the command 'sage -sh' in a shell")

import os, sys
sys.path.insert(0, os.path.abspath('/Users/pbelmans/Documents/Project/hodge-diamond-cutter'))

import diamond

# -- Project information -----------------------------------------------------

project = 'Hodge diamond cutter'
copyright = '2021, Pieter Belmans'
author = 'Pieter Belmans'
# The full version, including alpha/beta/rc tags
release = 'v1.0'

# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.mathjax',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
]

mathjax_config = {
"extensionsr": ["tex2jax.js"],
"jax": ['input/TeX','output/HTML-CSS'],
"tex2jax": {
"inlineMath": [['$','$']],
"displayMath": [ ['$$','$$'], ["\\[","\\]"] ],
},
}

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'furo'
116 changes: 116 additions & 0 deletions index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
Documentation for the Hodge diamond cutter
==========================================

.. toctree::
:maxdepth: 2
:caption: Contents:

.. automodule:: diamond
:no-members:

Hodge diamonds
==============

.. autoclass:: diamond.HodgeDiamond
:members:
:special-members:
:member-order: bysource

Hochschild homology
===================

.. autoclass:: diamond.HochschildHomology
:members:
:member-order: bysource

Constructions
=============

Elementary constructions
------------------------

.. autofunction:: diamond.zero
.. autofunction:: diamond.point
.. autofunction:: diamond.lefschetz
.. autofunction:: diamond.Pn
.. autofunction:: diamond.hypersurface
.. autofunction:: diamond.weighted_hypersurface
.. autofunction:: diamond.cyclic_cover
.. autofunction:: diamond.complete_intersection

Curves and moduli spaces of sheaves on them
-------------------------------------------

.. autofunction:: diamond.curve
.. autofunction:: diamond.symmetric_power
.. autofunction:: diamond.jacobian
.. autofunction:: diamond.moduli_vector_bundles
.. autofunction:: diamond.seshadris_desingularisation
.. autofunction:: diamond.moduli_parabolic_vector_bundles_rank_two
.. autofunction:: diamond.quot_scheme_curve


Surfaces and moduli spaces of sheaves on them
---------------------------------------------

.. autofunction:: diamond.surface
.. autofunction:: diamond.ruled
.. autofunction:: diamond.K3
.. autofunction:: diamond.enriques
.. autofunction:: diamond.hilbn
.. autofunction:: diamond.nestedhilbn


Abelian varieties and related objects
-------------------------------------

.. autofunction:: diamond.abelian
.. autofunction:: diamond.kummer_resolution


Fano varieties
--------------
These are Hodge diamonds of Fano varieties in the sense that their anticanonical bundle is ample.

The term "Fano variety" can also mean a variety parametrising linear subspaces on another variety. Some of these are Fano in the first sense, others are not (always). See e.g. :func:`diamond.fano_variety_lines_cubic`.

.. autofunction:: diamond.fano_threefold
.. autofunction:: diamond.gushel_mukai
.. autofunction:: diamond.fano_variety_intersection_quadrics_even
.. autofunction:: diamond.fano_variety_intersection_quadrics_odd


Homogeneous varieties and closely related constructions
-------------------------------------------------------
These are also all Fano varieties, but they are grouped together because of their similar origin.

.. autofunction:: diamond.partial_flag_variety
.. autofunction:: diamond.generalised_grassmannian
.. autofunction:: diamond.grassmannian
.. autofunction:: diamond.orthogonal_grassmannian
.. autofunction:: diamond.symplectic_grassmannian
.. autofunction:: diamond.lagrangian_grassmannian
.. autofunction:: diamond.horospherical
.. autofunction:: diamond.odd_symplectic_grassmannian


Moduli spaces attached to quivers
---------------------------------

.. autofunction:: diamond.quiver_moduli


Hyperkähler varieties
---------------------

.. autofunction:: diamond.K3n
.. autofunction:: diamond.generalised_kummer
.. autofunction:: diamond.ogrady6
.. autofunction:: diamond.ogrady10


Other
-----

.. autofunction:: diamond.Mzeronbar
.. autofunction:: diamond.fano_variety_lines_cubic

0 comments on commit 172fb50

Please sign in to comment.