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

TropicalGeometry + PolyhedralGeometry: fixing references in documentation #3923

Merged
merged 9 commits into from
Aug 19, 2024
6 changes: 3 additions & 3 deletions docs/src/PolyhedralGeometry/Polyhedra/constructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ polyhedron(::Oscar.scalar_type_or_field, A::AnyVecOrMat, b::AbstractVector)
polyhedron(::Oscar.scalar_type_or_field, I::Union{Nothing, AbstractCollection[AffineHalfspace]}, E::Union{Nothing, AbstractCollection[AffineHyperplane]} = nothing)
```

The complete $H$-representation can be retrieved using [`facets`](@ref facets)
and [`affine_hull`](@ref affine_hull):
The complete $H$-representation can be retrieved using [`facets`](@ref facets(as::Type{T}, P::Polyhedron{S}) where {S<:scalar_types,T<:Union{AffineHalfspace{S},Pair{R,S} where R,Polyhedron{S}}})
and [`affine_hull`](@ref affine_hull(P::Polyhedron{T}) where {T<:scalar_types}):
```jldoctest
julia> P = polyhedron(([-1 0; 1 0], [0,1]), ([0 1], [0]))
Polyhedron in ambient dimension 2
Expand Down Expand Up @@ -68,7 +68,7 @@ julia> halfspace_matrix_pair(facets(T))
```

The complete $V$-representation can be retrieved using [`minimal_faces`](@ref
minimal_faces), [`rays_modulo_lineality`](@ref rays_modulo_lineality) and [`lineality_space`](@ref lineality_space):
minimal_faces(P::Polyhedron{T}) where {T<:scalar_types}), [`rays_modulo_lineality`](@ref rays_modulo_lineality(P::Polyhedron{T}) where {T<:scalar_types}) and [`lineality_space`](@ref lineality_space(P::Polyhedron{T}) where {T<:scalar_types}):

```jldoctest; filter = r"^polymake: +WARNING.*\n|^"
julia> P = convex_hull([0 0], [1 0], [0 1])
Expand Down
7 changes: 5 additions & 2 deletions docs/src/PolyhedralGeometry/polyhedral_complexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ codim(PC::PolyhedralComplex)
dim(PC::PolyhedralComplex)
f_vector(PC::PolyhedralComplex)
is_embedded(PC::PolyhedralComplex)
is_pure(PC::PolyhedralComplex)
is_simplicial(PC::PolyhedralComplex)
lineality_dim(PC::PolyhedralComplex)
lineality_space(PC::PolyhedralComplex{T}) where T<:scalar_types
maximal_polyhedra(PC::PolyhedralComplex{T}) where T<:scalar_types
minimal_faces(PC::PolyhedralComplex{T}) where T<:scalar_types
n_maximal_polyhedra(PC::PolyhedralComplex)
Expand All @@ -44,7 +48,6 @@ n_vertices(PC::PolyhedralComplex)
polyhedra_of_dim
rays(PC::PolyhedralComplex{T}) where T<:scalar_types
rays_modulo_lineality(PC::PolyhedralComplex{T}) where T<:scalar_types
vertices(PC::PolyhedralComplex)
vertices(as::Type{PointVector{T}}, PC::PolyhedralComplex{T}) where {T<:scalar_types}
vertices_and_rays(PC::PolyhedralComplex{T}) where T<:scalar_types
```

7 changes: 3 additions & 4 deletions docs/src/TropicalGeometry/curve.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
```@meta
CurrentModule = Oscar
```

# Tropical curves

## Introduction
A tropical curve is a graph with multiplicities on its edges. If embedded, it is a polyhedral complex of dimension (at most) one.

#### Note:
- The type `TropicalCurve` can be thought of as subtype of `TropicalVariety` in the sense that it should have all properties and features of the latter.

## Construction
In addition to converting from `TropicalVariety`, objects of type `TropicalCurve` can be constructed from:
```@docs
Expand Down
5 changes: 4 additions & 1 deletion docs/src/TropicalGeometry/hypersurface.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ A tropical hypersurface is a balanced polyhedral complex of codimension one. It
- Chapter 3.1 in [MS15](@cite)
- Chapter 1 in [Jos21](@cite)

Objects of type `TropicalHypersurface` need to be embedded, abstract tropical hypersurfaces are currently not supported.
#### Note:
- Objects of type `TropicalHypersurface` need to be embedded, abstract tropical hypersurfaces are currently not supported.
- The type `TropicalHypersurface` can be thought of as subtype of `TropicalVariety` in the sense that it should have all properties and features of the latter.


## Constructors
In addition to converting from `TropicalVariety`, objects of type `TropicalHypersurface` can be constructed from:
Expand Down
4 changes: 3 additions & 1 deletion docs/src/TropicalGeometry/linear_space.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ A tropical linear space is a balanced polyhedral complex supported on a finite i
- Chapter 4.4 in [MS15](@cite)
- Chapter 10 in [Jos21](@cite)

Objects of type `TropicalLinearSpace` need to be embedded, abstract tropical linear spaces are currently not supported.
#### Note:
- Objects of type `TropicalLinearSpace` need to be embedded, abstract tropical linear spaces are currently not supported.
- The type `TropicalLinearSpace` can be thought of as subtype of `TropicalVariety` in the sense that it should have all properties and features of the latter.


## Constructors
Expand Down
5 changes: 4 additions & 1 deletion docs/src/TropicalGeometry/variety.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ Tropial varieties (in OSCAR) are weighted polyhedral complexes. They may arise
- Chapter 3 in [MS15](@cite)
- Chapter 2.8 in [Jos21](@cite)

Objects of type `TropicalVariety` need to be embedded, abstract tropical varieties are currently not supported. The type `TropicalVariety` can be thought of as supertype of `TropicalHypersurface`, `TropicalCurve`, and `TropicalLinearSpace` in the sense that the latter three inherit all properties and features of the former.
#### Note:
- Objects of type `TropicalVariety` need to be embedded, abstract tropical varieties are currently not supported.
- The type `TropicalVariety` can be thought of as supertype of `TropicalHypersurface`, `TropicalCurve`, and `TropicalLinearSpace` in the sense that the latter three should have all properties and features of the former.
- Embedded tropical varieties are polyhedral complexes with multiplicities and should have all properties of polyhedral complexes

## Constructor
Objects of type `TropicalVariety` can be constructed as follows:
Expand Down
4 changes: 2 additions & 2 deletions src/PolyhedralGeometry/Cone/properties.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ _rays(::Type{<:RayVector}, C::Cone{T}) where {T<:scalar_types} = _rays(RayVector
Return the rays of `C` in the format defined by `as`. The rays are defined to be the
one-dimensional faces, so if `C` has lineality, there are no rays.

See also [`rays_modulo_lineality`](@ref).
See also [`rays_modulo_lineality`](@ref rays_modulo_lineality(C::Cone{T}) where {T<:scalar_types}).

Optional arguments for `as` include
* `RayVector`.
Expand Down Expand Up @@ -85,7 +85,7 @@ iterators. If `C` has lineality `L`, then the iterator `rays_modulo_lineality`
iterates over representatives of the rays of `C/L`. The iterator
`lineality_basis` gives a basis of the lineality space `L`.

See also [`rays`](@ref) and [`lineality_space`](@ref).
See also [`rays`](@ref rays(C::Cone{T}) where {T<:scalar_types}) and [`lineality_space`](@ref lineality_space(C::Cone{T}) where {T<:scalar_types}).

# Examples
For a pointed cone, with two generators, we get the usual rays:
Expand Down
57 changes: 51 additions & 6 deletions src/PolyhedralGeometry/PolyhedralComplex/properties.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Return an iterator over the vertices of `PC` in the format defined by `as`. The
vertices are defined to be the zero-dimensional faces, so if `P` has lineality,
there are no vertices, only minimal faces.

See also [`minimal_faces`](@ref) and [`rays`](@ref).
See also [`minimal_faces`](@ref minimal_faces(PC::PolyhedralComplex{T}) where {T<:scalar_types}) and [`rays`](@ref rays(PC::PolyhedralComplex{T}) where {T<:scalar_types}).

Optional arguments for `as` include
* `PointVector`.
Expand Down Expand Up @@ -135,7 +135,7 @@ _vertices(
vertices_and_rays(PC::PolyhedralComplex)

Return the vertices and rays of `PC` as a combined set, up to lineality. This
function is mainly a helper function for [`maximal_polyhedra`](@ref).
function is mainly a helper function for [`maximal_polyhedra`](@ref maximal_polyhedra(PC::PolyhedralComplex{T}) where {T<:scalar_types}).

# Examples
```jldoctest
Expand Down Expand Up @@ -187,7 +187,7 @@ with two iterators. If `PC` has lineality `L`, then the iterator
`rays_modulo_lineality` iterates over representatives of the rays of `PC/L`.
The iterator `lineality_basis` gives a basis of the lineality space `L`.

See also [`rays`](@ref) and [`lineality_space`](@ref).
See also [`rays`](@ref rays(PC::PolyhedralComplex{T}) where {T<:scalar_types}) and [`lineality_space`](@ref lineality_space(PC::PolyhedralComplex{T}) where {T<:scalar_types}).

# Examples
```jldoctest
Expand Down Expand Up @@ -253,7 +253,7 @@ translation `p+L`, where `p` is only unique modulo `L`. The return type is a
dict, the key `:base_points` gives an iterator over such `p`, and the key
`:lineality_basis` lets one access a basis for the lineality space `L` of `PC`.

See also [`vertices`](@ref) and [`lineality_space`](@ref).
See also [`vertices`](@ref vertices(as::Type{PointVector{T}}, PC::PolyhedralComplex{T}) where {T<:scalar_types}) and [`lineality_space`](@ref).

# Examples
```jldoctest
Expand Down Expand Up @@ -310,7 +310,7 @@ Return the rays of `PC`. The rays are defined to be the far vertices, i.e. the
one-dimensional faces of the recession cones of its polyhedra, so if `PC` has
lineality, there are no rays.

See also [`rays_modulo_lineality`](@ref) and [`vertices`](@ref).
See also [`rays_modulo_lineality`](@ref rays_modulo_lineality(PC::PolyhedralComplex{T}) where {T<:scalar_types}) and [`vertices`](@ref vertices(as::Type{PointVector{T}}, PC::PolyhedralComplex{T}) where {T<:scalar_types}).

Optional arguments for `as` include
* `RayVector`.
Expand Down Expand Up @@ -394,7 +394,7 @@ Return the maximal polyhedra of `PC`

Optionally `IncidenceMatrix` can be passed as a first argument to return the
incidence matrix specifying the maximal polyhedra of `PC`. The indices returned
refer to the output of [`vertices_and_rays`](@ref).
refer to the output of [`vertices_and_rays`](@ref vertices_and_rays(PC::PolyhedralComplex{T}) where {T<:scalar_types}).

# Examples
```jldoctest
Expand Down Expand Up @@ -587,6 +587,29 @@ function _ith_polyhedron(
)
end

@doc raw"""
lineality_space(PC::PolyhedralComplex)

Return the lineality space of `PC`.

# Examples
```jldoctest
julia> VR = [0 0 0; 1 0 0; 0 1 0; -1 0 0];

julia> IM = IncidenceMatrix([[1,2,3],[1,3,4]]);

julia> far_vertices = [2,3,4];

julia> L = [0 0 1];

julia> PC = polyhedral_complex(IM, VR, far_vertices, L)
Polyhedral complex in ambient dimension 3

julia> lineality_space(PC)
1-element SubObjectIterator{RayVector{QQFieldElem}}:
[0, 0, 1]
```
"""
lineality_space(PC::PolyhedralComplex{T}) where {T<:scalar_types} =
SubObjectIterator{RayVector{T}}(PC, _lineality_complex, lineality_dim(PC))

Expand All @@ -604,6 +627,28 @@ _generator_matrix(::Val{_lineality_complex}, PC::PolyhedralComplex; homogenized=

_matrix_for_polymake(::Val{_lineality_complex}) = _generator_matrix

@doc raw"""
lineality_dim(PC::PolyhedralComplex)

Return the lineality dimension of `PC`.

# Examples
```jldoctest
julia> VR = [0 0 0; 1 0 0; 0 1 0; -1 0 0];

julia> IM = IncidenceMatrix([[1,2,3],[1,3,4]]);

julia> far_vertices = [2,3,4];

julia> L = [0 0 1];

julia> PC = polyhedral_complex(IM, VR, far_vertices, L)
Polyhedral complex in ambient dimension 3

julia> lineality_dim(PC)
1
```
"""
lineality_dim(PC::PolyhedralComplex) = pm_object(PC).LINEALITY_DIM::Int

@doc raw"""
Expand Down
12 changes: 6 additions & 6 deletions src/PolyhedralGeometry/PolyhedralFan/properties.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
###############################################################################

@doc raw"""
rays[as::Type{T} = RayVector,] (PF::PolyhedralFan)
rays([as::Type{T} = RayVector,] PF::PolyhedralFan)

Return the rays of `PF`. The rays are defined to be the
one-dimensional faces of its cones, so if `PF` has lineality, there are no rays.

See also [`rays_modulo_lineality`](@ref).
See also [`rays_modulo_lineality`](@ref rays_modulo_lineality(F::_FanLikeType)).

Optional arguments for `as` include
* `RayVector`.
Expand Down Expand Up @@ -83,15 +83,15 @@ _matrix_for_polymake(::Val{_ray_fan}) = _vector_matrix
_maximal_cone(::Type{Cone{T}}, PF::_FanLikeType, i::Base.Integer) where {T<:scalar_types} =
Cone{T}(Polymake.fan.cone(pm_object(PF), i - 1), coefficient_field(PF))

@doc raw"""
@doc raw"""
rays_modulo_lineality(as, F::PolyhedralFan)

Return the rays of the polyhedral fan `F` up to lineality as a `NamedTuple`
with two iterators. If `F` has lineality `L`, then the iterator
`rays_modulo_lineality` iterates over representatives of the rays of `F/L`.
The iterator `lineality_basis` gives a basis of the lineality space `L`.

See also [`rays`](@ref) and [`lineality_space`](@ref).
See also [`rays`](@ref rays(PF::_FanLikeType)) and [`lineality_space`](@ref lineality_space(PF::_FanLikeType)).

# Examples
```jldoctest
Expand Down Expand Up @@ -149,7 +149,7 @@ Return the maximal cones of `PF`.

Optionally `IncidenceMatrix` can be passed as a first argument to return the
incidence matrix specifying the maximal cones of `PF`. In that case, the
indices refer to the output of [`rays_modulo_lineality(Cone)`](@ref).
indices refer to the output of [`rays_modulo_lineality(Cone)`](@ref rays_modulo_lineality(F::_FanLikeType)).

# Examples
Here we ask for the the number of rays for each maximal cone of the face fan of
Expand Down
16 changes: 8 additions & 8 deletions src/PolyhedralGeometry/Polyhedron/properties.jl
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ where `p` is only unique modulo `L`. The return type is a dict, the key
`:base_points` gives an iterator over such `p`, and the key `:lineality_basis`
lets one access a basis for the lineality space `L` of `P`.

See also [`vertices`](@ref) and [`lineality_space`](@ref).
See also [`vertices`](@ref vertices(as::Type{PointVector{T}}, P::Polyhedron{T}) where {T<:scalar_types}) and [`lineality_space`](@ref lineality_space(P::Polyhedron{T}) where {T<:scalar_types}).

# Examples
The polyhedron `P` is just a line through the origin:
Expand Down Expand Up @@ -223,7 +223,7 @@ with two iterators. If `P` has lineality `L`, then the iterator
`rays_modulo_lineality` iterates over representatives of the rays of `P/L`.
The iterator `lineality_basis` gives a basis of the lineality space `L`.

See also [`rays`](@ref) and [`lineality_space`](@ref).
See also [`rays`](@ref rays(as::Type{RayVector{T}}, P::Polyhedron{T}) where {T<:scalar_types}) and [`lineality_space`](@ref lineality_space(P::Polyhedron{T}) where {T<:scalar_types}).

# Examples
```jldoctest
Expand Down Expand Up @@ -269,7 +269,7 @@ Return an iterator over the vertices of `P` in the format defined by `as`. The
vertices are defined to be the zero-dimensional faces, so if `P` has lineality,
there are no vertices, only minimal faces.

See also [`minimal_faces`](@ref) and [`rays`](@ref).
See also [`minimal_faces`](@ref minimal_faces(P::Polyhedron{T}) where {T<:scalar_types}) and [`rays`](@ref rays(as::Type{RayVector{T}}, P::Polyhedron{T}) where {T<:scalar_types}).

Optional arguments for `as` include
* `PointVector`.
Expand Down Expand Up @@ -401,7 +401,7 @@ Return a minimal set of generators of the cone of unbounded directions of `P`
one-dimensional faces of the recession cone, so if `P` has lineality, there
are no rays.

See also [`rays_modulo_lineality`](@ref), [`recession_cone`](@ref) and [`vertices`](@ref).
See also [`rays_modulo_lineality`](@ref rays_modulo_lineality(P::Polyhedron{T}) where {T<:scalar_types}), [`recession_cone`](@ref recession_cone(P::Polyhedron{T}) where {T<:scalar_types}) and [`vertices`](@ref vertices(as::Type{PointVector{T}}, P::Polyhedron{T}) where {T<:scalar_types}).

Optional arguments for `as` include
* `RayVector`.
Expand Down Expand Up @@ -1336,7 +1336,7 @@ is_fulldimensional(P::Polyhedron) = pm_object(P).FULL_DIM::Bool

Check whether `P` is a Johnson solid, i.e., a $3$-dimensional polytope with regular faces that is not vertex transitive.

See also [`johnson_solid`](@ref).
See also [`johnson_solid`](@ref johnson_solid(index::Int)).

!!! note
This will only recognize algebraically precise solids, i.e. no solids with approximate coordinates.
Expand All @@ -1346,7 +1346,7 @@ See also [`johnson_solid`](@ref).
julia> J = johnson_solid(37)
Polytope in ambient dimension 3 with EmbeddedAbsSimpleNumFieldElem type coefficients

julia> is_johnson_solid(J)
julia> is_johnson_solid(J)
true
```
"""
Expand All @@ -1358,7 +1358,7 @@ is_johnson_solid(P::Polyhedron) = _is_3d_pol_reg_facets(P) && !is_vertex_transit
Check whether `P` is an Archimedean solid, i.e., a $3$-dimensional vertex
transitive polytope with regular facets, but not a prism or antiprism.

See also [`archimedean_solid`](@ref).
See also [`archimedean_solid`](@ref archimedean_solid(s::String)).

!!! note
This will only recognize algebraically precise solids, i.e. no solids with approximate coordinates.
Expand Down Expand Up @@ -1387,7 +1387,7 @@ is_archimedean_solid(P::Polyhedron) =

Check whether `P` is a Platonic solid.

See also [`platonic_solid`](@ref).
See also [`platonic_solid`](@ref platonic_solid(s::String)).

!!! note
This will only recognize algebraically precise solids, i.e. no solids with approximate coordinates.
Expand Down
14 changes: 7 additions & 7 deletions src/PolyhedralGeometry/Polyhedron/standard_constructions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ A Johnson solid is a 3-polytope whose facets are regular polygons, of various go
It is proper if it is not an Archimedean solid. Up to scaling there are exactly 92 proper Johnson solids.
See the [Polytope Wiki](https://polytope.miraheze.org/wiki/List_of_Johnson_solids)

See also [`is_johnson_solid`](@ref).
See also [`is_johnson_solid`](@ref is_johnson_solid(P::Polyhedron)).
"""
function johnson_solid(index::Int)
if index in _johnson_indexes_from_oscar
Expand Down Expand Up @@ -720,7 +720,7 @@ cross_polytope(d::Int64) = cross_polytope(QQFieldElem, d)
Construct a Platonic solid with the name given by String `s` from the list
below.

See also [`is_platonic_solid`](@ref).
See also [`is_platonic_solid`](@ref is_platonic_solid(P::Polyhedron)).

# Arguments
- `s::String`: The name of the desired Platonic solid.
Expand Down Expand Up @@ -755,7 +755,7 @@ const _archimedean_strings_from_oscar = Set{String}(["snub_cube", "snub_dodecahe
Construct an Archimedean solid with the name given by String `s` from the list
below.

See also [`is_archimedean_solid`](@ref).
See also [`is_archimedean_solid`](@ref is_archimedean_solid(P::Polyhedron)).

# Arguments
- `s::String`: The name of the desired Archimedean solid.
Expand Down Expand Up @@ -824,7 +824,7 @@ end
Construct the snub cube, an Archimedean solid.
See the [Polytope Wiki](https://polytope.miraheze.org/wiki/Snub_cube)

See also [`archimedean_solid`](@ref).
See also [`archimedean_solid`](@ref archimedean_solid(s::String)).
"""
function snub_cube()
return archimedean_solid("snub_cube")
Expand All @@ -836,7 +836,7 @@ end
Construct the snub dodecahedron, an Archimedean solid.
See the [Polytope Wiki](https://polytope.miraheze.org/wiki/Snub_dodecahedron)

See also [`archimedean_solid`](@ref).
See also [`archimedean_solid`](@ref archimedean_solid(s::String)).
"""
function snub_dodecahedron()
return archimedean_solid("snub_dodecahedron")
Expand Down Expand Up @@ -917,7 +917,7 @@ end
Construct the pentagonal icositetrahedron, a Catalan solid.
See the [Wikipedia entry](https://en.wikipedia.org/wiki/Pentagonal_icositetrahedron)

See also [`catalan_solid`](@ref).
See also [`catalan_solid`](@ref catalan_solid(s::String)).
"""
function pentagonal_icositetrahedron()
return catalan_solid("pentagonal_icositetrahedron")
Expand All @@ -929,7 +929,7 @@ end
Construct the pentagonal hexecontahedron, a Catalan solid.
See the [Visual Polyhedra entry](https://dmccooey.com/polyhedra/LpentagonalIcositetrahedron.html)

See also [`catalan_solid`](@ref).
See also [`catalan_solid`](@ref catalan_solid(s::String)).
"""
function pentagonal_hexecontahedron()
return catalan_solid("pentagonal_hexecontahedron")
Expand Down
Loading
Loading