diff --git a/benchmarks/polynomials_number_field.jl b/benchmarks/polynomials_number_field.jl index 5f85c7fb2..3b6308581 100644 --- a/benchmarks/polynomials_number_field.jl +++ b/benchmarks/polynomials_number_field.jl @@ -1,6 +1,6 @@ function benchmark_poly_nf_elem() print("benchmark_poly_nf_elem ... ") - R, x = CyclotomicField(20, "x") + R, x = cyclotomic_field(20, "x") S, y = polynomial_ring(R, "y") f = (3x^7 + x^4 - 3x + 1)*y^3 + (2x^6-x^5+4x^4-x^3+x^2-1)*y +(-3x^7+2x^6-x^5+3x^3-2x^2+x) diff --git a/docs/src/numberfield.md b/docs/src/numberfield.md index 151704f4c..842ad5f1a 100644 --- a/docs/src/numberfield.md +++ b/docs/src/numberfield.md @@ -67,7 +67,7 @@ resulting parent objects to coerce various elements into those fields. ```julia R, x = polynomial_ring(QQ, "x") K, a = number_field(x^3 + 3x + 1, "a") -L, b = CyclotomicField(5, "b") +L, b = cyclotomic_field(5, "b") M, c = CyclotomicRealField(5, "c") d = K(3) diff --git a/src/antic/nf_elem.jl b/src/antic/nf_elem.jl index 32990cbb4..1af1cc703 100644 --- a/src/antic/nf_elem.jl +++ b/src/antic/nf_elem.jl @@ -1197,8 +1197,8 @@ supplied, a default dollar sign will be used to represent the variable. """ function cyclotomic_field(n::Int, s::VarName = "z_$n", t = "_\$"; cached = true) n > 0 || throw(ArgumentError("conductor must be positive, not $n")) - Zx, x = PolynomialRing(FlintZZ, gensym(); cached = false) - Qx, = PolynomialRing(FlintQQ, t; cached = cached) + Zx, x = polynomial_ring(FlintZZ, gensym(); cached = false) + Qx, = polynomial_ring(FlintQQ, t; cached = cached) f = cyclotomic(n, x) C, g = number_field(Qx(f), Symbol(s); cached = cached, check = false) set_attribute!(C, :show => show_cyclo, :cyclo => n) @@ -1224,8 +1224,8 @@ constructed, should be printed. If it is not supplied, a default dollar sign will be used to represent the variable. """ function cyclotomic_real_subfield(n::Int, s::VarName = "(z_$n + 1/z_$n)", t = "\$"; cached = true) - Zx, x = PolynomialRing(FlintZZ, gensym(); cached = false) - Qx, = PolynomialRing(FlintQQ, t; cached = cached) + Zx, x = polynomial_ring(FlintZZ, gensym(); cached = false) + Qx, = polynomial_ring(FlintQQ, t; cached = cached) f = cos_minpoly(n, x) R, a = number_field(Qx(f), Symbol(s); cached = cached, check = false) set_attribute!(R, :show => show_maxreal, :maxreal => n) diff --git a/test/Benchmark-test.jl b/test/Benchmark-test.jl index 22b4b1d79..04cac3a41 100644 --- a/test/Benchmark-test.jl +++ b/test/Benchmark-test.jl @@ -44,7 +44,7 @@ end end @testset "Benchmark.poly_nf_elem" begin - R, x = CyclotomicField(20, "x") + R, x = cyclotomic_field(20, "x") S, y = polynomial_ring(R, "y") f = (3x^7 + x^4 - 3x + 1)*y^3 + (2x^6-x^5+4x^4-x^3+x^2-1)*y +(-3x^7+2x^6-x^5+3x^3-2x^2+x) diff --git a/test/flint/fq_nmod_poly-test.jl b/test/flint/fq_nmod_poly-test.jl index d8a2d3961..2a1e31cbb 100644 --- a/test/flint/fq_nmod_poly-test.jl +++ b/test/flint/fq_nmod_poly-test.jl @@ -576,7 +576,7 @@ end @testset "issue #1353" begin F, _ = finite_field(2, 1, "1") E, a = finite_field(2, 15, "a") - S, x = PolynomialRing(F, "x") + S, x = polynomial_ring(F, "x") @test_throws ErrorException x+a end