Skip to content

Commit

Permalink
Merge branch 'master' into revert-1723-revert-1702-mh/qqbar
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens authored Apr 30, 2024
2 parents ab14581 + 4beb832 commit 92d2a73
Show file tree
Hide file tree
Showing 116 changed files with 801 additions and 653 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ jobs:
os: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# For Codecov, we must also fetch the parent of the HEAD commit to
# be able to properly deal with PRs / merges
fetch-depth: 2
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- name: "Cache artifacts"
Expand Down Expand Up @@ -77,8 +77,8 @@ jobs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1.10'
- uses: julia-actions/cache@v1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/Invalidations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
if: github.base_ref == github.event.repository.default_branch
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-invalidations@v1
id: invs_pr

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
- uses: julia-actions/julia-buildpkg@v1
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/hecke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
PR_NUMBER: ${{github.event.number || '0' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
uses: julia-actions/setup-julia@v2
with:
version: '1.10'
- name: OscarDevTools - CI
Expand Down Expand Up @@ -65,9 +65,9 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- name: re-using OscarDevTools checkout
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/oscar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
PR_NUMBER: ${{github.event.number || '0' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
uses: julia-actions/setup-julia@v2
with:
version: '1.10'
- name: OscarDevTools - CI
Expand Down Expand Up @@ -65,9 +65,9 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- name: re-using OscarDevTools checkout
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/singular.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
PR_NUMBER: ${{github.event.number || '0' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
uses: julia-actions/setup-julia@v2
with:
version: '1.10'
- name: OscarDevTools - CI
Expand Down Expand Up @@ -65,9 +65,9 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- name: re-using OscarDevTools checkout
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Nemo"
uuid = "2edaba10-b0f1-5616-af89-8c11ac63239a"
version = "0.43.2"
version = "0.44.0-DEV"

[deps]
AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
Expand All @@ -16,7 +16,7 @@ RandomExtensions = "fb686558-2515-59ef-acaa-46db3789a887"
SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce"

[compat]
AbstractAlgebra = "0.40.8"
AbstractAlgebra = "0.41.0"
Antic_jll = "~0.201.500"
Arb_jll = "~200.2300.000"
Calcium_jll = "~0.401.100"
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/bernoulli_polynomials.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function benchmark_bernoulli()
print("benchmark_bernoulli ... ")

R, x = FlintQQ["x"]
R, x = QQ["x"]
S, t = power_series_ring(R, 1000, "t")

u = t + O(t^1000)
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/charpoly_integers.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
function benchmark_charpoly_int()
print("benchmark_charpoly_int ... ")
M = matrix_space(FlintZZ, 80, 80)()
M = matrix_space(ZZ, 80, 80)()

for i in 1:80
for j in 1:80
M[i, j] = rand(-20:20)
end
end

tt = @elapsed charpoly(polynomial_ring(FlintZZ, "x")[1], M)
tt = @elapsed charpoly(polynomial_ring(ZZ, "x")[1], M)
println("$tt")
end
2 changes: 1 addition & 1 deletion benchmarks/det_commutative_ring.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function benchmark_znz_det()
print("benchmark_znz_det ... ")
n = 2003 * 1009
Zn, = residue_ring(FlintZZ, n)
Zn, = residue_ring(ZZ, n)
R, x = polynomial_ring(Zn, "x")

M = matrix_space(R, 80, 80)()
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/det_field.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function benchmark_nf_det()
print("benchmark_nf_det ... ")
QQx, x = polynomial_ring(FlintQQ, "x")
QQx, x = polynomial_ring(QQ, "x")
K, a = AbsSimpleNumField(x^3 + 3*x + 1, "a")
M = matrix_space(K, 80, 80)()

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/det_polynomials.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function benchmark_det_poly_ring()
print("benchmark_det_poly_ring ... ")
ZZx, x = polynomial_ring(FlintZZ, "x")
ZZx, x = polynomial_ring(ZZ, "x")
M = matrix_space(ZZx, 40, 40)()

for i in 1:40
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/fateman.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function benchmark_fateman()
print("benchmark_fateman ... ")
R, x = polynomial_ring(FlintZZ, "x")
R, x = polynomial_ring(ZZ, "x")
S, y = polynomial_ring(R, "y")
T, z = polynomial_ring(S, "z")
U, t = polynomial_ring(T, "t")
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/minpoly_finite_field.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function benchmark_minpoly_finite_field()
print("benchmark_minpoly_finite_field ... ")

F, s = FlintFiniteField(103, 2, "s")
F, s = finite_field(103, 2, "s")

M = matrix_space(F, 80, 80)()

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/minpoly_integers.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function benchmark_minpoly_integers()
print("benchmark_minpoly_integers ... ")
M = matrix_space(FlintZZ, 80, 80)()
M = matrix_space(ZZ, 80, 80)()

for i in 1:40
for j in 1:40
Expand All @@ -14,7 +14,7 @@ function benchmark_minpoly_integers()
similarity!(M, rand(1:80), ZZRingElem(rand(-3:3)))
end

tt = @elapsed minpoly(polynomial_ring(FlintZZ, "x")[1], M)
tt = @elapsed minpoly(polynomial_ring(ZZ, "x")[1], M)
println("$tt")
end

2 changes: 1 addition & 1 deletion benchmarks/solve_polynomials.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function benchmark_solve_poly()
print("benchmark_solve_poly ... ")
R, x = polynomial_ring(FlintZZ, "x")
R, x = polynomial_ring(ZZ, "x")
S, y = polynomial_ring(R, "y")
M = matrix_space(S, 20, 20)()

Expand Down
2 changes: 1 addition & 1 deletion docs/src/developer/parents.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ As all elements and parents in Nemo are objects, those objects have types
which we refer to as the element type and parent type respectively.

For example, Flint integers have type `ZZRingElem` and the parent object they all
belong to, `FlintZZ` has type `ZZRing`.
belong to, `ZZ` has type `ZZRing`.

More complex parents and elements are parameterised. For example, generic
univariate polynomials over a base ring `R` are parameterised by `R`. The
Expand Down
6 changes: 3 additions & 3 deletions docs/src/integer.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ end
# Integers

The default integer type in Nemo is provided by Flint. The associated ring of
integers is represented by the constant parent object called `FlintZZ`.
integers is represented by the constant parent object called `ZZ`.

For convenience we define

```
ZZ = FlintZZ
ZZ = ZZ
```

so that integers can be constructed using `ZZ` instead of `FlintZZ`. Note that
so that integers can be constructed using `ZZ` instead of `ZZ`. Note that
this is the name of a specific parent object, not the name of its type.

The types of the integer ring parent objects and elements of the associated
Expand Down
4 changes: 2 additions & 2 deletions docs/src/qadic.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ c = R(2)
k = precision(a)
m = prime(R)
n = valuation(b)
Qx, x = FlintQQ["x"]
Qx, x = QQ["x"]
p = lift(Qx, a)
Zy, y = FlintZZ["y"]
Zy, y = ZZ["y"]
q = lift(Zy, divexact(a, b))
```

Expand Down
4 changes: 2 additions & 2 deletions docs/src/real.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ julia> d = RR(1//2)
Note that for the construction, also the precision can be supplied:

```jldoctest; setup = :(RR = RealField())
julia> c = RR(1//3, 100)
julia> c = RR(1//3, precision=100)
[0.33333333333333333333 +/- 3.34e-21]
julia> d = RR(1//3, 4)
julia> d = RR(1//3, precision=4)
[0.3 +/- 0.0438]
```

Expand Down
43 changes: 9 additions & 34 deletions src/Aliases.jl
Original file line number Diff line number Diff line change
@@ -1,38 +1,13 @@
include(joinpath(pathof(AbstractAlgebra), "..", "Aliases.jl"))
# alternative names for some functions from Base
# (this list contained stuff along the lines of `@alias is_equal isequal`, but everything has moved to AbstractAlgebra)

# make some Julia names compatible with our naming conventions
@alias is_equal isequal
@alias is_finite isfinite
@alias is_inf isinf
@alias is_integer isinteger
@alias is_less isless
@alias is_real isreal

@alias eigvals_simple eigenvalues_simple # for consistency with eigvals/eigenvalues
# alternative names for some functions from LinearAlgebra
# we don't use the `@alias` macro here because we provide custom
# docstrings for these aliases
const eigenvalues = eigvals

# renamed for 0.40.0
Base.@deprecate_binding FlintPadicField PadicField
Base.@deprecate_binding padic PadicFieldElem
Base.@deprecate_binding FlintQadicField QadicField
Base.@deprecate_binding qadic QadicFieldElem

# renamed for 0.41.0
Base.@deprecate_binding arb_poly ArbPolyRingElem
Base.@deprecate_binding arb_mat ArbMatrix
Base.@deprecate_binding arb ArbFieldElem
Base.@deprecate_binding acb_poly AcbPolyRingElem
Base.@deprecate_binding acb_mat AcbMatrix
Base.@deprecate_binding acb AcbFieldElem
Base.@deprecate_binding ca CalciumFieldElem
Base.@deprecate_binding Loc LocalizedEuclideanRing
Base.@deprecate_binding LocElem LocalizedEuclideanRingElem
Base.@deprecate_binding lll_ctx LLLContext
Base.@deprecate_binding qqbar QQBarFieldElem
Base.@deprecate_binding CalciumQQBarField QQBarField
Base.@deprecate_binding FlintQQiField Nemo.QQiField false
Base.@deprecate_binding fmpqi Nemo.QQiFieldElem false
Base.@deprecate_binding FlintZZiRing Nemo.ZZiRing false
Base.@deprecate_binding fmpzi Nemo.ZZiRingElem false
Base.@deprecate_binding fmpzUnitRange ZZRingElemUnitRange
Base.@deprecate_binding AnticNumberField AbsSimpleNumField
Base.@deprecate_binding nf_elem AbsSimpleNumFieldElem
# predeclare some functions to allow defining aliases for some of our own functions
function eigenvalues_simple end
@alias eigvals_simple eigenvalues_simple # for consistency with eigvals/eigenvalues
60 changes: 59 additions & 1 deletion src/Deprecations.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,63 @@
# Deprecated in 0.39.*
###############################################################################
#
# Aliases
#
###############################################################################

# ALL aliases here are only a temporary measure to allow for a smooth transition downstream.
# they will be replaced by deprecations eventually

#= currently none =#

###############################################################################
#
# Deprecated bindings
#
###############################################################################

# Deprecated bindings don't get reexported automatically in Hecke/Oscar/etc.
# By calling this macro from the respective packages, we can ensure that the deprecated bindings are available there.
macro include_deprecated_bindings()
return esc(quote
# renamed and deprecated for 0.40.0
Base.@deprecate_binding FlintPadicField PadicField
Base.@deprecate_binding padic PadicFieldElem
Base.@deprecate_binding FlintQadicField QadicField
Base.@deprecate_binding qadic QadicFieldElem

# renamed and deprecated for 0.41.0
Base.@deprecate_binding arb_poly ArbPolyRingElem
Base.@deprecate_binding arb_mat ArbMatrix
Base.@deprecate_binding arb ArbFieldElem
Base.@deprecate_binding acb_poly AcbPolyRingElem
Base.@deprecate_binding acb_mat AcbMatrix
Base.@deprecate_binding acb AcbFieldElem
Base.@deprecate_binding ca CalciumFieldElem
Base.@deprecate_binding Loc LocalizedEuclideanRing
Base.@deprecate_binding LocElem LocalizedEuclideanRingElem
Base.@deprecate_binding lll_ctx LLLContext
Base.@deprecate_binding qqbar QQBarFieldElem
Base.@deprecate_binding CalciumQQBarField QQBarField
Base.@deprecate_binding FlintQQiField Nemo.QQiField false
Base.@deprecate_binding fmpqi Nemo.QQiFieldElem false
Base.@deprecate_binding FlintZZiRing Nemo.ZZiRing false
Base.@deprecate_binding fmpzi Nemo.ZZiRingElem false
Base.@deprecate_binding fmpzUnitRange ZZRingElemUnitRange
Base.@deprecate_binding AnticNumberField AbsSimpleNumField
Base.@deprecate_binding nf_elem AbsSimpleNumFieldElem

end)
end

@include_deprecated_bindings()

###############################################################################
#
# Deprecations
#
###############################################################################

# Deprecated in 0.39.*
@deprecate divisible(x::Int, y::Int) is_divisible_by(x, y)
@deprecate divisible(x::ZZRingElem, y::Int) is_divisible_by(x, y)
@deprecate divisible(x::ZZRingElem, y::ZZRingElem) is_divisible_by(x, y)
Loading

0 comments on commit 92d2a73

Please sign in to comment.