Skip to content

Commit

Permalink
improved documentation for Oscar.iso_oscar_gap (#2360)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBreuer authored May 9, 2023
1 parent 748403c commit 02c0403
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
13 changes: 11 additions & 2 deletions src/GAP/iso_gap_oscar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down
10 changes: 9 additions & 1 deletion src/GAP/iso_oscar_gap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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))

Expand Down

0 comments on commit 02c0403

Please sign in to comment.