Skip to content

Commit

Permalink
Merge branch 'master' into mh/gap-4.13
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens authored May 7, 2024
2 parents bbafdf4 + 85594b1 commit b6a1655
Show file tree
Hide file tree
Showing 107 changed files with 1,501 additions and 525 deletions.
2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ version = "1.1.0-DEV"
AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
AlgebraicSolving = "66b61cbe-0446-4d5d-9090-1ff510639f9d"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
GAP = "c863536a-3901-11e9-33e7-d5cd0df7b904"
Hecke = "3e1990a7-5d81-5526-99ce-9ba3ff248f21"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
Expand All @@ -28,7 +27,6 @@ cohomCalg_jll = "5558cf25-a90e-53b0-b813-cadaa3ae7ade"
AbstractAlgebra = "0.41.3"
AlgebraicSolving = "0.4.15"
Distributed = "1.6"
DocStringExtensions = "0.8, 0.9"
GAP = "0.11.0"
Hecke = "0.31.5"
JSON = "^0.20, ^0.21"
Expand Down
3 changes: 3 additions & 0 deletions docs/doc.main
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@
],
"Surfaces" => [
"AlgebraicGeometry/Surfaces/K3Surfaces.md",
"AlgebraicGeometry/Surfaces/AdjunctionProcess.md",
"AlgebraicGeometry/Surfaces/ParametrizationSurfaces.md",
"AlgebraicGeometry/Surfaces/SurfacesP4.md",
],
"Miscellaneous" => [
Expand Down Expand Up @@ -247,6 +249,7 @@
"Combinatorics/EnumerativeCombinatorics/partitions.md",
"Combinatorics/EnumerativeCombinatorics/tableaux.md",
"Combinatorics/EnumerativeCombinatorics/schur_polynomials.md",
"Combinatorics/EnumerativeCombinatorics/compositions.md",
],
],

Expand Down
25 changes: 14 additions & 11 deletions docs/oscar_references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -1582,17 +1582,6 @@ @Book{Mar18
doi = {10.1007/978-3-319-90233-3}
}

@Article{Mer12,
author = {Merca, M},
title = {Fast algorithm for generating ascending compositions},
journal = {J. Math. Model. Algorithms},
volume = {11},
number = {1},
pages = {89--104},
year = {2012},
doi = {10.1007/s10852-011-9168-y}
}

@Article{Nik79,
author = {Nikulin, V. V.},
title = {Integer symmetric bilinear forms and some of their geometric applications},
Expand Down Expand Up @@ -1813,6 +1802,20 @@ @Article{SS12
doi = {10.1016/j.jcta.2011.12.005}
}

@Article{SV-D-V87,
author = {Sommese, Andrew John and Van de Ven, A.},
title = {On the adjunction mapping},
zbl = {0655.14001},
journal = {Math. Ann.},
fjournal = {Mathematische Annalen},
volume = {278},
pages = {593--603},
year = {1987},
doi = {10.1007/BF01458083},
language = {English},
zbmath = {4069055}
}

@Article{SY96,
author = {Shimoyama, Takeshi and Yokoyama, Kazuhiro},
title = {Localization and primary decomposition of polynomial ideals},
Expand Down
18 changes: 15 additions & 3 deletions docs/src/AlgebraicGeometry/AlgebraicVarieties/ProjectiveVariety.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,22 @@ variety(f::MPolyDecRingElem; check=true)
```

## Attributes
So far all are inherited from [Projective Algebraic Sets](@ref) and [Projective schemes](@ref).
In addition to what is inherited from [Projective Algebraic Sets](@ref) and [Projective schemes](@ref), we currently have:

```@docs
sectional_genus(X::AbsProjectiveVariety)
```

## Properties
So far all are inherited from [Projective Algebraic Sets](@ref) and [Projective schemes](@ref).
In addition to what is inherited from [Projective Algebraic Sets](@ref) and [Projective schemes](@ref), we currently have:

```@docs
is_linearly_normal(X::AbsProjectiveVariety)
```

## Methods
So far all are inherited from [Projective Algebraic Sets](@ref) and [Projective schemes](@ref).
In addition to what is inherited from [Projective Algebraic Sets](@ref) and [Projective schemes](@ref), we currently have:

```@docs
canonical_bundle(X::AbsProjectiveVariety)
```
47 changes: 47 additions & 0 deletions docs/src/AlgebraicGeometry/Surfaces/AdjunctionProcess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
```@meta
CurrentModule = Oscar
```

# Adjunction Process for Surfaces

A surface in this section is a smooth projective surface over $\mathbb C$.

Blowing up a surface in a point means to replace the point by an exceptional curve. Each such curve $E$ is a smooth, rational
curve with self-intersection number $E^{2}=-1$. We speak of a *$(-1)$-curve*. A surface is *minimal* if it contains no
$(-1)$-curves. That is, the surface cannot be obtained by blowing up a point on another surface. A surface $X_{\text{min}}$
is called a *minimal model* of a surface $X$ if $X_{\text{min}}$ is minimal and $X$ can be obtained from $X_{\text{min}}$
by repeatedly blowing up a point. Each surface $X$ has a minimal model which is unique if $X$ has non-negative Kodaira dimension.
The Enriques-Kodaira classification classifies surfaces according to their minimal models. See ... for more on this.

Given a surface, we may apply the *adjunction process* of Van de Ven and Sommese [SV-D-V87](@cite) to discover a minimal model.
To describe this process, consider a surface $X \subset \mathbb P^{n}$ of codimension $c$. Let $S$ and $S_{X}$
denote the homogeneous coordinate rings of $\mathbb P^{n}$ and $X$, respectively. Consider $\omega_{X}=\text{Ext}^{c}_{S}(S_{X},S(-n-1)),$
the graded *dualizing module* of $S_{X}$. A basis of the graded piece $(\omega_{X})_{{1}}$ corresponds to the linear system $|K_X +H|$, where $K_X$ is a canonical
divisor on $X$ and $H$ is the hyperplane class. Except for some exceptional cases, this linear system defines a birational morphism $\varphi_{|K_X+H|}\colon X \to X'$
onto another smooth projective surface $X'$ such that $\varphi_{|K_X+H|}$ blows down precisely all $(-1)$-lines on $X$.
As shown by Van de Ven and Sommese, in the exceptional cases,

- ``X`` is a linearly or quadratically embedded $ \mathbb P^{2}$ or $X$ is ruled by lines, in which case $|K_X+H| = \emptyset$,
- ``X`` is an anti-canonically embedded del Pezzo surface, in which case $\varphi_{|K_X+H|}$ maps $X$ to a point,
- ``X`` is a conic bundle, in which case $\varphi_{|K_{X}+H|}\colon X \to B$ maps $X$ to a curve $B$ such that the fibers of $\varphi_{|K_{X}+H|}$ are the conics, or
- ``X`` is a surface in one of four explicit families identified by Sommese and Van de Ven, and $\varphi_{|K_X+H|}\colon X \to X'$ is not birational, but finite to one.

If we are not in one of these cases, a $(-1)$-conic $C$ in $X$ is mapped to a $(-1)$-line in $X'$ since $(K_X+H)\;\!. \;\! C=-1+2=1$.
Thus, the *adjunction process*, which consists of applying the *adjunction maps* $\varphi_{|K_X+H|}$, $\varphi_{|K_{X'}+H'|}$ and so on, yields finitely many surfaces
$X \rightarrow X^{\prime} \rightarrow X^{\prime\prime} \rightarrow \dots$ which are called the *adjoint surfaces* of $X$. The last adjoint surface is either minimal or belongs to one of the
exceptional cases. In particular, if $X$ has non-negative Kodaira dimension, the adjunction process yields the uniquely determined minimal model of $X$.

!!! note
If $X$ is rational, the last adjoint surface is either $\mathbb P^{2}$, the Veronese surface, a Hirzebruch surface, a Del Pezzo surface, a conic bundle, or one of the four explicit families identified by Sommese and Van de Ven.

!!! note
In explicit computations, we consider surfaces which are defined by polynomial equations with coefficients in a subfield of $\mathbb C$ which can be handled by OSCAR.

!!! note
The surfaces in the examples below are taken from the OSCAR data base of nongeneral type surfaces in $\mathbb P^4$. To ease subsequent computations, the surfaces in the data base where constructed over finite fields. Note, however, that the recipes used in the constructions also work in characteristic zero. So all computations can be confirmed in characteristic zero, although this may be time consuming.

```@docs
adjunction_process(X::AbsProjectiveVariety, steps::Int=0)
```


Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
```@meta
CurrentModule = Oscar
```

# Rational Parametrization of Rational Surfaces

```@docs
parametrization(X::AbsProjectiveVariety)
```
2 changes: 1 addition & 1 deletion docs/src/AlgebraicGeometry/Surfaces/SurfacesP4.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ and the references given there.

Below, we present functions which return one hard coded example for each family presented
in the first two papers above. Based on these papers, the existence of further families has
been shown. Explicit examples to be included here are under construction.
been shown. Hard coded OSCAR examples for these surfaces are under construction.

!!! note
To ease subsequent computations, all hard coded examples are defined over a finite prime field.
Expand Down
37 changes: 37 additions & 0 deletions docs/src/Combinatorics/EnumerativeCombinatorics/compositions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Compositions

A **weak composition** of a non-negative integer $n$ is a sequence $\lambda_1,\dots,\lambda_k$ of non-negative integers $\lambda_i$ such that $n = \lambda_1 + \dots + \lambda_k$.
A **composition** of $n$ is a weak composition consisting of *positive* integers.
The $\lambda_i$ are called the **parts** of the (weak) composition.

```@docs
weak_composition
composition
```

## Generating and counting

### Unrestricted compositions
```@docs
compositions(::Oscar.IntegerUnion)
number_of_compositions(::Oscar.IntegerUnion)
```
Note that an integer $n$ has infinitely many weak compositions as one may always append zeros to the end of a given weak composition.
Without restrictions on the number of parts, we can hence only generate compositions, but not weak compositions.

### Restricted compositions
```@docs
compositions(::Oscar.IntegerUnion, ::Oscar.IntegerUnion)
number_of_compositions(::Oscar.IntegerUnion, ::Oscar.IntegerUnion)
```
### Restricted weak compositions
```@docs
weak_compositions
number_of_weak_compositions(::Oscar.IntegerUnion, ::Oscar.IntegerUnion)
```

### Ascending compositions
```@docs
ascending_compositions
```
The number of ascending compositions of $n$ coincides with the number of partitions of $n$.
44 changes: 22 additions & 22 deletions docs/src/DeveloperDocumentation/printing_details.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ found in the [Developer Style Guide](@ref).

## Implementing `show` functions

Here is the translation between `:detail`, `one line` and `:supercompact`,
Here is the translation between `:detail`, `one line` and `terse`,
where `io` is an `IO` object (such as `stdout` or an `IOBuffer`):

```
show(io, MIME"text/plain"(), x) # detailed printing
print(io, x) # one line printing
print(IOContext(io, :supercompact => true), x) # supercompact printing
print(terse(io), x) # terse printing
```

For reference, string interpolation `"$(x)"` uses one line printing via `print(io, x)`,
Expand Down Expand Up @@ -49,16 +49,16 @@ function Base.show(io::IO, ::MIME"text/plain", R::NewRing)
end
```

The following is a template for `one line` and `:supercompact` printing.
The following is a template for `one line` and `terse` printing.
```julia
function Base.show(io::IO, R::NewRing)
if get(io, :supercompact, false)
if is_terse(io)
# no nested printing
print(io, "supercompact printing of newring ")
print(io, "terse printing of newring ")
else
# nested printing allowed, preferably supercompact
# nested printing allowed, preferably terse
print(io, "one line printing of newring with ")
print(IOContext(io, :supercompact => true), "supercompact ", base_ring(R))
print(terse(io), "terse ", base_ring(R))
end
end
```
Expand All @@ -71,8 +71,8 @@ QQ

julia> [R,R]
2-element Vector{NewRing}:
one line printing of newring with supercompact QQ
one line printing of newring with supercompact QQ
one line printing of newring with terse QQ
one line printing of newring with terse QQ

```

Expand All @@ -81,7 +81,7 @@ julia> [R,R]
This version needs to be used in case the detailed
printing does not contain newlines.
Then detailed and one line printing agree.
The `if` clause takes care of supercompact printing as well.
The `if` clause takes care of terse printing as well.

```julia
struct NewRing2
Expand All @@ -91,13 +91,13 @@ end
base_ring(R::NewRing2) = R.base_ring

function Base.show(io::IO, R::NewRing2)
if get(io, :supercompact, false)
if is_terse(io)
# no nested printing
print(io, "supercompact printing of newring")
print(io, "terse printing of newring")
else
# nested printing allowed, preferably supercompact
# nested printing allowed, preferably terse
print(io, "I am a new ring and always print in one line " )
print(IOContext(io, :supercompact => true), base_ring(R))
print(terse(io), base_ring(R))
end
end
```
Expand All @@ -111,11 +111,11 @@ julia> [R,R]
I am a new ring and always print in one line Rational Field
I am a new ring and always print in one line Rational Field

julia> print(IOContext(Base.stdout, :supercompact => true) ,R)
supercompact printing of newring
julia> print(terse(Base.stdout) ,R)
terse printing of newring
```

The `supercompact` printing uses an `IOContext` (see [IOContext](https://docs.julialang.org/en/v1/base/io-network/#Base.IOContext) from
The `terse` printing uses an `IOContext` (see [IOContext](https://docs.julialang.org/en/v1/base/io-network/#Base.IOContext) from
the Julia documentation) to pass information to other `show` methods invoked
recursively (for example in nested printings). The same mechanism can be used to
pass other context data. For instance, this is used by the `Scheme` code in
Expand All @@ -140,11 +140,11 @@ It will be used for `print(io, R::NewRing)` though.

```julia
function Base.show(io::IO, R::NewRing)
if get(io, :supercompact, false)
print(io, "supercompact printing of newring")
if is_terse(io)
print(io, "terse printing of newring")
else # this is what we call one line
print(io, "one line printing of newring with ")
print(IOContext(io, :supercompact => true), "supercompact ", R.base_ring)
print(terse(io), "terse ", R.base_ring)
end
end
```
Expand All @@ -161,7 +161,7 @@ julia> [R,R] # one line printing is ignored
I am a new ring with a detailed printing of one line

julia> print(Base.stdout, R)
one line printing of newring with supercompact QQ
one line printing of newring with terse QQ
```

## Advanced printing functionality
Expand Down Expand Up @@ -306,7 +306,7 @@ Here is an example with and without output using Unicode:
- All `show` methods for parent objects such as rings or modules should use the `@show_name`
macro. This macro ensures that if the object has a name (including one derived from
the name of a Julia REPL variable to which the object is currently assigned) then in
a `compact` or `supercompact` io context it is printed using that name.
a `compact` or `terse` io context it is printed using that name.
Here is an example illustrating this:
```
julia> vector_space(GF(2), 2)
Expand Down
12 changes: 6 additions & 6 deletions docs/src/DeveloperDocumentation/styleguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ matrix `A`, write `Oscar.parent(A)`.

### The 2 + 1 print modes of Oscar
Oscar has two user print modes `detailed` and `one line` and one internal
print mode `:supercompact`. The latter is for use during recursion,
print mode `terse`. The latter is for use during recursion,
e.g. to print the `base_ring(X)` when in `one line` mode.
It exists to make sure that `one line` stays compact and human readable.

Expand All @@ -302,7 +302,7 @@ General linear group of degree 24
# one line
General linear group of degree 24 over GF(29^7)

# supercompact
# terse
General linear group
```
Expand All @@ -317,17 +317,17 @@ The print modes are specified as follows
- should make sense as a standalone without context
- variable names/generators/relations should not be printed only their number.
- Only the first word is capitalized e.g. `Polynomial ring`
- one should use `:supercompact` for nested printing in compact
- one should use `terse` for nested printing in compact
- nested calls to `one line` (if you think them really necessary) should be at the end,
so that one can read sequentially. Calls to `:supercompact` can be anywhere.
so that one can read sequentially. Calls to `terse` can be anywhere.
- commas must be enclosed in brackets so that printing tuples stays unambiguous
#### Super compact printing
#### Terse printing
- a user readable version of the main (mathematical) type.
- a single term or a symbol/letter mimicking mathematical notation
- should usually only depend on the type and not of the type parameters or of
the concrete instance - exceptions of this rule are possible e.g. for `GF(2)`
- no nested printing. In particular variable names and `base_ring` must not be displayed.
This ensures that `one line` and `:supercompact` stay compact even for complicated things.
This ensures that `one line` and `terse` stay compact even for complicated things.
If you want nested printing use `one line` or `detailed`.
For further information and examples we refer you to our section [Details on
Expand Down
4 changes: 2 additions & 2 deletions experimental/BasisLieHighestWeight/src/MonomialBasis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ function Base.show(io::IO, ::MIME"text/plain", basis::MonomialBasis)
end

function Base.show(io::IO, basis::MonomialBasis)
if get(io, :supercompact, false)
if is_terse(io)
print(io, "Monomial basis of a highest weight module")
else
io = pretty(io)
print(
io,
"Monomial basis of a highest weight module with highest weight $(highest_weight(basis)) over ",
)
print(IOContext(io, :supercompact => true), Lowercase(), base_lie_algebra(basis))
print(terse(io), Lowercase(), base_lie_algebra(basis))
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ end
underlying_complex(c::SimplifiedComplex) = c.complex
map_to_original_complex(c::SimplifiedComplex) = c.map_to_original
map_from_original_complex(c::SimplifiedComplex) = c.map_from_original
original_complex(c::SimplifiedComplex) = c.original_complex

@attributes mutable struct SimpleFreeResolution{ChainType, MorphismType, ModuleType} <: AbsSimpleComplex{ChainType, MorphismType}
M::ModuleType # The original module to be resolved
Expand Down
Loading

0 comments on commit b6a1655

Please sign in to comment.