diff --git a/src/GAP/iso_gap_oscar.jl b/src/GAP/iso_gap_oscar.jl index 237dda9a85fa..dcf81019c919 100644 --- a/src/GAP/iso_gap_oscar.jl +++ b/src/GAP/iso_gap_oscar.jl @@ -288,6 +288,14 @@ GAP: x_1^2+x_1+1 julia> f(y) == pol true ``` + +!!! warning + The functions `Oscar.iso_gap_oscar` and [`Oscar.iso_oscar_gap`](@ref) + are not injective. + Due to caching, it may happen that `S` stores an attribute value + of `Oscar.iso_oscar_gap(S)`, + but that the codomain of this map is not identical with + or even not equal to the given `R`. """ iso_gap_oscar(F::GAP.GapObj) = GAP.Globals.IsoGapOscar(F) @@ -309,8 +317,9 @@ push!(_iso_gap_oscar_methods, "IsRing and IsZmodnZObjNonprimeCollection" => _iso push!(_iso_gap_oscar_methods, "IsUnivariatePolynomialRing" => _iso_gap_oscar_univariate_polynomial_ring) push!(_iso_gap_oscar_methods, "IsPolynomialRing" => _iso_gap_oscar_multivariate_polynomial_ring) -# Note that `IsNumberFieldByMatrices` is a property, but the alnuth package -# uses it like a category, i.e., one can rely on the fact that +# Note that `IsNumberFieldByMatrices` is a GAP property, +# but the alnuth package uses it like a GAP category, +# i.e., one can rely on the fact that # this filter is set in a field generated by matrices . push!(_iso_gap_oscar_methods, "IsField and IsNumberFieldByMatrices" => _iso_gap_oscar_number_field) diff --git a/src/GAP/iso_oscar_gap.jl b/src/GAP/iso_oscar_gap.jl index 1377b5b55a52..4ebd119db083 100644 --- a/src/GAP/iso_oscar_gap.jl +++ b/src/GAP/iso_oscar_gap.jl @@ -382,6 +382,14 @@ GAP: x_1^2+x_1-1 julia> preimage(f, y) == pol true ``` + +!!! warning + The functions `Oscar.iso_oscar_gap` and [`Oscar.iso_gap_oscar`](@ref) + are not injective. + Due to caching, it may happen that `S` stores an attribute value + of `Oscar.iso_gap_oscar(S)`, + but that the codomain of this map is not identical with + or even not equal to the given `R`. """ @attr Map function iso_oscar_gap(F) return _iso_oscar_gap(F) @@ -411,7 +419,7 @@ function _iso_oscar_gap_polynomial_ring_functions(RO::PolyRing{T}, RG::GAP.GapOb return (f, finv) end -function _iso_oscar_gap(RO::PolyRing{T}) where T +function _iso_oscar_gap(RO::PolyRing) coeffs_iso = iso_oscar_gap(base_ring(RO)) RG = GAPWrap.PolynomialRing(codomain(coeffs_iso))