Skip to content

Commit

Permalink
More signatures for quotient_ring_as_module and ideal_as_module
Browse files Browse the repository at this point in the history
  • Loading branch information
wdecker committed Oct 3, 2024
1 parent 78da753 commit 81a801a
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 22 deletions.
1 change: 1 addition & 0 deletions docs/doc.main
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
"CommutativeAlgebra/ModulesOverMultivariateRings/intro.md",
"CommutativeAlgebra/ModulesOverMultivariateRings/free_modules.md",
"CommutativeAlgebra/ModulesOverMultivariateRings/subquotients.md",
"CommutativeAlgebra/ModulesOverMultivariateRings/ideals_quorings_as_modules.md",
"CommutativeAlgebra/ModulesOverMultivariateRings/module_operations.md",
"CommutativeAlgebra/ModulesOverMultivariateRings/hom_operations.md",
"CommutativeAlgebra/ModulesOverMultivariateRings/complexes.md",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
```@meta
CurrentModule = Oscar
```

# Ideals and Quotient Rings as Modules

## Ideals as Modules

```@docs
ideal_as_module(I::Union{MPolyIdeal, MPolyQuoIdeal, MPolyLocalizedIdeal, MPolyQuoLocalizedIdeal})
```

# Quotient Rings as Modules

```@docs
quotient_ring_as_module(A::MPolyQuoRing)
```



6 changes: 0 additions & 6 deletions docs/src/CommutativeAlgebra/affine_algebras.md
Original file line number Diff line number Diff line change
Expand Up @@ -672,9 +672,3 @@ multi_hilbert_series(A::MPolyQuoRing; algorithm::Symbol=:BayerStillmanA)
multi_hilbert_series_reduced(A::MPolyQuoRing; algorithm::Symbol=:BayerStillmanA)
multi_hilbert_function(A::MPolyQuoRing, g::FinGenAbGroupElem)
```

## Affine Algebras as Modules

```@docs
quotient_ring_as_module(A::MPolyQuoRing)
```
7 changes: 0 additions & 7 deletions docs/src/CommutativeAlgebra/ideals.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,6 @@ julia> DH(Ih) == I # dehomogenization of Ih
true
```


## Ideals as Modules

```@docs
ideal_as_module(I::MPolyIdeal)
```

## Generating Special Ideals

### Katsura-n
Expand Down
37 changes: 28 additions & 9 deletions src/Modules/ModulesGraded.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2879,25 +2879,44 @@ end
Return `A` considered as an object of type `SubquoModule`.
quotient_ring_as_module(I::MPolyIdeal)
quotient_ring_as_module(I::Union{MPolyIdeal, MPolyQuoIdeal, MPolyLocalizedIdeal, MPolyQuoLocalizedIdeal})
As above, where `A` is the quotient of `base_ring(I)` modulo `I`.
# Examples
```jldoctest
julia> R, (x, y) = polynomial_ring(QQ, [:x, :y]);
julia> I = ideal(R, [x^2, y^3])
Ideal generated by
x^2
y^3
julia> IR = ideal(R, [x^2, y^3]);
julia> quotient_ring_as_module(I)
julia> quotient_ring_as_module(IR)
Subquotient of Submodule with 1 generator
1 -> e[1]
by Submodule with 2 generators
1 -> x^2*e[1]
2 -> y^3*e[1]
julia> base_ring(ans)
Multivariate polynomial ring in 2 variables x, y
over rational field
julia> A, _ = quo(R, ideal(R,[x*y]));
julia> AI = ideal(A, [x^2, y^3]);
julia> quotient_ring_as_module(AI)
Subquotient of Submodule with 1 generator
1 -> e[1]
by Submodule with 2 generators
1 -> x^2*e[1]
2 -> y^3*e[1]
julia> base_ring(ans)
Quotient
of multivariate polynomial ring in 2 variables x, y
over rational field
by ideal (x*y)
```
```jldoctest
julia> S, (x, y) = graded_polynomial_ring(QQ, [:x, :y]);
Expand All @@ -2920,7 +2939,7 @@ function quotient_ring_as_module(A::MPolyQuoRing)
return quotient_ring_as_module(modulus(A))
end

function quotient_ring_as_module(I::MPolyIdeal)
function quotient_ring_as_module(I::Union{MPolyIdeal, MPolyQuoIdeal, MPolyLocalizedIdeal, MPolyQuoLocalizedIdeal})
R = base_ring(I)
F = is_graded(R) ? graded_free_module(R, 1) : free_module(R, 1)
e1 = F[1]
Expand All @@ -2930,7 +2949,7 @@ end
#####ideals as modules#####

@doc raw"""
ideal_as_module(I::MPolyIdeal)
ideal_as_module(I::Union{MPolyIdeal, MPolyQuoIdeal, MPolyLocalizedIdeal, MPolyQuoLocalizedIdeal})
Return `I` considered as an object of type `SubquoModule`.
Expand Down Expand Up @@ -2964,7 +2983,7 @@ Graded submodule of S^1
represented as subquotient with no relations
```
"""
function ideal_as_module(I::MPolyIdeal)
function ideal_as_module(I::Union{MPolyIdeal, MPolyQuoIdeal, MPolyLocalizedIdeal, MPolyQuoLocalizedIdeal})
R = base_ring(I)
F = is_graded(R) ? graded_free_module(R, 1) : free_module(R, 1)
e1 = F[1]
Expand Down

0 comments on commit 81a801a

Please sign in to comment.