Skip to content

Commit 5886395

Browse files
authored
Merge branch 'oscar-system:master' into cohomology_rings
2 parents 58fe0d9 + 4053d6d commit 5886395

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
lines changed

docs/src/CommutativeAlgebra/ideals.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,14 @@ true
297297
```
298298

299299
## Vanishing sets and solving multivariate polynomial systems
300+
For solving multivariate polynomial systems using the below functions
301+
we provide an introductory tutorial
302+
[here](https://www.oscar-system.org/tutorials/CommutativeAlgebra).
303+
304+
305+
```@docs
306+
real_solutions
307+
```
300308

301309
```@docs
302310
rational_solutions

src/Rings/FreeAssociativeAlgebraIdeal.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,6 @@ function Base.:+(a::FreeAssociativeAlgebraIdeal{T}, b::FreeAssociativeAlgebraIde
7777
return ideal(R, vcat(gens(a), gens(b)))
7878
end
7979

80-
function Base.:*(a::FreeAssociativeAlgebraIdeal{T}, b::FreeAssociativeAlgebraIdeal{T}) where T
81-
R = base_ring(a)
82-
@req R == base_ring(b) "parent mismatch"
83-
return ideal(R, [i*j for i in gens(a) for j in gens(b)])
84-
end
85-
8680
AbstractAlgebra.normal_form(f::FreeAssociativeAlgebraElem, I::FreeAssociativeAlgebraIdeal) = normal_form(f, gens(I))
8781
AbstractAlgebra.normal_form(f::FreeAssociativeAlgebraElem, I::IdealGens{<:FreeAssociativeAlgebraElem}) = normal_form(f, collect(I))
8882

src/Rings/PBWAlgebra.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@attributes mutable struct PBWAlgRing{T, S} <: NCRing
22
sring::Singular.PluralRing{S}
33
relations::Singular.smatrix{Singular.spoly{S}}
4-
coeff_ring
5-
poly_ring
4+
coeff_ring::Ring
5+
poly_ring::MPolyRing{T}
66
opposite::PBWAlgRing{T, S}
77

88
function PBWAlgRing{T, S}(sring, relations, coeff_ring, poly_ring) where {T, S}
@@ -62,11 +62,11 @@ parent(a::PBWAlgElem) = a.parent
6262

6363
symbols(a::PBWAlgRing) = symbols(a.sring)
6464

65-
coefficient_ring(a::PBWAlgRing) = a.coeff_ring
65+
coefficient_ring(a::PBWAlgRing{T}) where T = a.coeff_ring::parent_type(T)
6666

6767
coefficient_ring(a::PBWAlgElem) = coefficient_ring(parent(a))
6868

69-
base_ring(a::PBWAlgRing) = a.poly_ring
69+
base_ring(a::PBWAlgRing{T}) where T = a.poly_ring::mpoly_ring_type(T)
7070

7171
function Base.deepcopy_internal(a::PBWAlgElem, dict::IdDict)
7272
return PBWAlgElem(parent(a), deepcopy_internal(a.sdata, dict))
@@ -343,7 +343,7 @@ function (R::PBWAlgRing)(cs::AbstractVector, es::AbstractVector{Vector{Int}})
343343
end
344344

345345
function (R::PBWAlgRing)(a::MPolyRingElem)
346-
@assert parent(a) == R.poly_ring
346+
@assert parent(a) == base_ring(R)
347347
z = build_ctx(R)
348348
for (c, e) in zip(AbstractAlgebra.coefficients(a), AbstractAlgebra.exponent_vectors(a))
349349
push_term!(z, c, e)
@@ -537,7 +537,7 @@ function _opposite(a::PBWAlgRing{T, S}) where {T, S}
537537
for i in 1:n-1, j in i+1:n
538538
bsrel[i,j] = _unsafe_coerce(bspolyring, a.relations[n+1-j,n+1-i], true)
539539
end
540-
b = PBWAlgRing{T, S}(bsring, bsrel, a.coeff_ring, polynomial_ring(a.coeff_ring, revs; cached = false)[1])
540+
b = PBWAlgRing{T, S}(bsring, bsrel, coefficient_ring(a), polynomial_ring(coefficient_ring(a), revs; cached = false)[1])
541541
a.opposite = b
542542
b.opposite = a
543543
end
@@ -1154,7 +1154,7 @@ function _left_eliminate_via_given_ordering(I::Singular.sideal{<:Singular.splura
11541154
end
11551155

11561156
function _left_eliminate(R::PBWAlgRing, I::Singular.sideal, sigma, sigmaC, ordering)
1157-
r = R.poly_ring
1157+
r = base_ring(R)
11581158
if !isnothing(ordering)
11591159
@assert is_elimination_ordering(ordering, sigmaC)
11601160
@assert is_admissible_ordering(R, ordering)
@@ -1217,7 +1217,7 @@ function eliminate(I::PBWAlgIdeal{D, T, S}, sigmaC::Vector{Int}; ordering = noth
12171217
sigmaop = reverse!(n + 1 .- sigma)
12181218
sigmaCop = reverse!(n + 1 .- sigmaC)
12191219
orderingop = isnothing(ordering) ? ordering :
1220-
opposite_ordering(Rop.poly_ring, ordering)
1220+
opposite_ordering(base_ring(Rop), ordering)
12211221
zop = _left_eliminate(Rop, get_sopdata(I), sigmaop, sigmaCop, orderingop)
12221222
z = _opmap(R, zop, Rop)
12231223
return PBWAlgIdeal{D, T, S}(R, z, zop)

src/Rings/solving.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
real_solutions(I::MPolyIdeal, <keyword arguments>)
33
44
Given an ideal `I` with a finite solution set over the complex numbers, return a pair `r,p` where `p` is the rational parametrization of the solution set and `r` represents the real roots of `Ì` with a given precision (default 32 bits).
5-
See [BES21](@cite) for more information.
5+
See [BES-E-D21](@cite) for more information.
66
77
**Note**: At the moment only QQ is supported as ground field. If the dimension of `I`
88
is greater than zero an empty array is returned.

test/Rings/FreeAssociativeAlgebraIdeal.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ end
3030
@test ideal_membership(f1, I2.gens)
3131
gb = groebner_basis(I2, 3; protocol=false)
3232
@test isdefined(I2, :gb)
33-
@test length(gens(I * I2)) == 2
3433
end
3534

3635
@testset "FreeAssociativeAlgebraIdeal.utils" begin

0 commit comments

Comments
 (0)