Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The big renaming #977

Merged
merged 5 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
AbstractAlgebra = "^0.27.4"
Nemo = "^0.32.0"
AbstractAlgebra = "^0.28"
Nemo = "^0.33"
RandomExtensions = "0.4.3"
Requires = "^0.5.2, 1.0"
julia = "1.6"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ Version 0.10.12...
... which comes with absolutely no warrant whatsoever
(c) 2015-2019 by Claus Fieker, Tommy Hofmann and Carlo Sircana

julia> Qx, x = PolynomialRing(FlintQQ, "x");
julia> Qx, x = polynomial_ring(FlintQQ, "x");
julia> f = x^3 + 2;
julia> K, a = NumberField(f, "a");
julia> K, a = number_field(f, "a");
julia> O = maximal_order(K);
julia> O
Maximal order of Number field over Rational Field with defining polynomial x^3 + 2
Expand Down
6 changes: 3 additions & 3 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
* [ ] `exp_map_unit_grp_mod`
* [ ] `charpoly` should have `parent = ` keyword.
* [ ] Squarefree factorization over number fields (?)
* [ ] Make FF robust for the use of `fmpz`.
* [ ] `next_prime(::fmpz, ::Bool)`
* [x] `round(::Type{fmpq}, ::fmpz)` is doing funky things. Also needs the `RoundUp/RoundDown` versions.
* [ ] Make FF robust for the use of `ZZRingElem`.
* [ ] `next_prime(::ZZRingElem, ::Bool)`
* [x] `round(::Type{QQFieldElem}, ::ZZRingElem)` is doing funky things. Also needs the `RoundUp/RoundDown` versions.
* [x] Parent checks for factored elements
* [ ] Primitive element for all finite fields
8 changes: 4 additions & 4 deletions benchmark/Lattices.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using BenchmarkTools

function to_pari(x::fmpz_mat, varname = "x")
function to_pari(x::ZZMatrix, varname = "x")
s = "$varname = ["
y = Hecke._eltseq(x)
n = ncols(x)
Expand All @@ -20,7 +20,7 @@ function to_pari(x::fmpz_mat, varname = "x")
return s
end

function to_magma(x::fmpz_mat, varname = "x")
function to_magma(x::ZZMatrix, varname = "x")
n = nrows(x)
m = ncols(x)
s = "$varname := Matrix(Integers(), $n, $m, ["
Expand All @@ -34,7 +34,7 @@ function to_magma(x::fmpz_mat, varname = "x")
s = s * "]);"
end

function to_magma(x::fmpq_mat, varname = "x")
function to_magma(x::QQMatrix, varname = "x")
n = nrows(x)
m = ncols(x)
s = "$varname := Matrix(Rationals(), $n, $m, ["
Expand All @@ -49,7 +49,7 @@ function to_magma(x::fmpq_mat, varname = "x")
return s
end

function to_sage(x::fmpq_mat, varname = "x")
function to_sage(x::QQMatrix, varname = "x")
n = nrows(x)
m = ncols(x)
s = "$varname = Matrix(QQ, $n, $m, ["
Expand Down
14 changes: 7 additions & 7 deletions docs/src/FacElem.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ parametrized by the type of the elements in the base and the type of their
parent.

Important special cases are
* ```FacElem{fmpz, FlintIntegerRing}```, factored integers
* ```FacElem{ZZRingElem, ZZRing}```, factored integers
* ```FacElem{nf_elem, AnticNumberField}```, factored algerbaic numbers
* ```FacElem{NfAbsOrdIdl, NfAbsOrdIdlSet}```, factored ideals

It should be noted that an object of type ```FacElem{fmpz, FlintIntegerRing}``
It should be noted that an object of type ```FacElem{ZZRingElem, ZZRing}``
will, in general, not represent an integer as the exponents can be
negative.

Expand All @@ -56,8 +56,8 @@ available as ```evaluate```. Depending on the types involved this
can be very efficient.

```@docs
evaluate(::FacElem{fmpz, S}) where S
evaluate(::FacElem{fmpq, S} where S)
evaluate(::FacElem{ZZRingElem, S}) where S
evaluate(::FacElem{QQFieldElem, S} where S)
evaluate(::FacElem{T,S} where S) where T
evaluate_naive(::FacElem{T,S} where S) where T
```
Expand All @@ -69,14 +69,14 @@ power products can be made unique:

```@docs
simplify(x::FacElem{NfOrdIdl, NfOrdIdlSet})
simplify(x::FacElem{fmpq,S} where S)
simplify(x::FacElem{QQFieldElem,S} where S)
```

The simplified version can then be used further:

```@docs
isone(x::FacElem{fmpq, S} where S)
factor_coprime(::FacElem{fmpz, S} where S)
isone(x::FacElem{QQFieldElem, S} where S)
factor_coprime(::FacElem{ZZRingElem, S} where S)
factor_coprime(::FacElem{NfOrdIdl, NfOrdIdlSet})
factor_coprime(::FacElem{NfOrdFracIdl, NfOrdFracIdlSet})
factor_coprime(::FacElem{nf_elem, AnticNumberField}, ::NfOrdIdlSet)
Expand Down
8 changes: 4 additions & 4 deletions docs/src/abelian/elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ In addition to the standard function `id`, `zero` and `one` that can be
used to create the neutral element, we also support more targeted creation:
```@docs
gens(G::GrpAbFinGen)
GrpAbFinGen(x::Vector{fmpz})
GrpAbFinGen(x::fmpz_mat)
GrpAbFinGen(x::Vector{ZZRingElem})
GrpAbFinGen(x::ZZMatrix)
getindex(A::GrpAbFinGen, i::Int)
rand(G::GrpAbFinGen)
rand(G::GrpAbFinGen, B::fmpz)
rand(G::GrpAbFinGen, B::ZZRingElem)
parent(x::GrpAbFinGenElem)
```
### Access
Expand All @@ -36,7 +36,7 @@ One can iterate over the elements of a finite abelian group.

```@repl
using Hecke # hide
G = abelian_group(fmpz[1 2; 3 4])
G = abelian_group(ZZRingElem[1 2; 3 4])
for g = G
println(g)
end
Expand Down
6 changes: 3 additions & 3 deletions docs/src/abelian/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ a group with $m$ generators $e_j$ and relations
```

```@docs
abelian_group(M::fmpz_mat)
abelian_group(M::Matrix{fmpz})
abelian_group(M::ZZMatrix)
abelian_group(M::Matrix{ZZRingElem})
abelian_group(M::Matrix{Integer})
```

Alternatively, there are shortcuts to create products of cyclic groups:
```@docs
abelian_group(M::Vector{Union{fmpz, Integer}})
abelian_group(M::Vector{Union{ZZRingElem, Integer}})
```
```@repl
using Hecke # hide
Expand Down
14 changes: 7 additions & 7 deletions docs/src/abelian/structural.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ Hecke.find_isomorphism(G, op, A::Hecke.GrpAb)
torsion_subgroup(G::GrpAbFinGen)
sub(G::GrpAbFinGen, s::Vector{GrpAbFinGenElem})
sub(s::Vector{GrpAbFinGenElem})
sub(G::GrpAbFinGen, M::fmpz_mat)
sub(G::GrpAbFinGen, n::fmpz)
sub(G::GrpAbFinGen, M::ZZMatrix)
sub(G::GrpAbFinGen, n::ZZRingElem)
sub(G::GrpAbFinGen, n::Integer)
psylow_subgroup(G::GrpAbFinGen, p::Union{fmpz, Integer})
psylow_subgroup(G::GrpAbFinGen, p::Union{ZZRingElem, Integer})
Hecke.has_quotient(G::GrpAbFinGen, invariant::Vector{Int})
Hecke.has_complement(f::GrpAbFinGenMap)
is_pure(U::GrpAbFinGen, G::GrpAbFinGen)
Expand All @@ -36,13 +36,13 @@ psubgroups(g::GrpAbFinGen, p::Integer)
```@repl subgroups
using Hecke # hide
G = abelian_group([6, 12])
shapes = MSet{Vector{fmpz}}()
shapes = MSet{Vector{ZZRingElem}}()
for U = psubgroups(G, 2)
push!(shapes, elementary_divisors(U[1]))
end
shapes
```
So there are $2$ subgroups isomorphic to $C_4$ (`fmpz[4] : 2`),
So there are $2$ subgroups isomorphic to $C_4$ (`ZZRingElem[4] : 2`),
$1$ isomorphic to $C_2\times C_4$, 1 trivial and $3$ $C_2$ subgroups.

```@docs
Expand All @@ -59,9 +59,9 @@ end

```@docs
quo(G::GrpAbFinGen, s::Vector{GrpAbFinGenElem})
quo(G::GrpAbFinGen, M::fmpz_mat)
quo(G::GrpAbFinGen, M::ZZMatrix)
quo(G::GrpAbFinGen, n::Integer)
quo(G::GrpAbFinGen, n::fmpz)
quo(G::GrpAbFinGen, n::ZZRingElem)
quo(G::GrpAbFinGen, U::GrpAbFinGen)
```

Expand Down
8 changes: 4 additions & 4 deletions docs/src/class_fields/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ ring_class_field(::NfAbsOrd)

```@repl
using Hecke # hide
Qx, x = PolynomialRing(FlintQQ, "x");
K, a = NumberField(x^2 - 10, "a");
Qx, x = polynomial_ring(FlintQQ, "x");
K, a = number_field(x^2 - 10, "a");
c, mc = class_group(K)
A = ray_class_field(mc)
```
Expand All @@ -82,8 +82,8 @@ number_field(C::ClassField)

```@repl
using Hecke; # hide
Qx, x = PolynomialRing(FlintQQ, "x");
k, a = NumberField(x^2 - 10, "a");
Qx, x = polynomial_ring(FlintQQ, "x");
k, a = number_field(x^2 - 10, "a");
c, mc = class_group(k);
A = ray_class_field(mc)
K = number_field(A)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/reduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ We can now determine the residue field ``F = \mathcal{O}_K/\mathfrak p`` and
the canonical map ``\mathcal O_K \to F``.

```@repl 1
F, reduction_map_OK = ResidueField(OK, frakp);
F, reduction_map_OK = residue_field(OK, frakp);
F
reduction_map_OK
```
Expand Down
4 changes: 2 additions & 2 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ Version 0.9.0 ...
... which comes with absolutely no warranty whatsoever
(c) 2015-2018 by Claus Fieker, Tommy Hofmann and Carlo Sircana

julia> Qx, x = PolynomialRing(FlintQQ, "x");
julia> Qx, x = polynomial_ring(FlintQQ, "x");
julia> f = x^3 + 2;
julia> K, a = NumberField(f, "a");
julia> K, a = number_field(f, "a");
julia> O = maximal_order(K);
julia> O
Maximal order of Number field over Rational Field with defining polynomial x^3 + 2
Expand Down
20 changes: 10 additions & 10 deletions docs/src/misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

```@docs
euler_phi_inv
Hecke.modord(::fmpz, ::fmpz)
Hecke.is_prime_power(::fmpz)
Hecke.modord(::ZZRingElem, ::ZZRingElem)
Hecke.is_prime_power(::ZZRingElem)
Hecke.primes_up_to(::Int)
```

Expand All @@ -22,15 +22,15 @@ Hecke.psi_lower

```@docs
Hecke.largest_elementary_divisor
Hecke.maximal_elementary_divisor(::fmpz_mat)
Hecke.mod_sym(::fmpz_mat, ::fmpz)
Hecke.mod_sym!(::fmpz_mat, ::fmpz)
Hecke.mod!(::fmpz_mat, ::fmpz)
Hecke.saturate(::fmpz_mat)
Hecke.elementary_divisors(::fmpz_mat)
Hecke.maximal_elementary_divisor(::ZZMatrix)
Hecke.mod_sym(::ZZMatrix, ::ZZRingElem)
Hecke.mod_sym!(::ZZMatrix, ::ZZRingElem)
Hecke.mod!(::ZZMatrix, ::ZZRingElem)
Hecke.saturate(::ZZMatrix)
Hecke.elementary_divisors(::ZZMatrix)
Hecke.jordan_normal_form
Hecke.divisors(::fmpz_mat, ::fmpz)
Hecke.snf_with_transform(::fmpz_mat)
Hecke.divisors(::ZZMatrix, ::ZZRingElem)
Hecke.snf_with_transform(::ZZMatrix)
```

## Polynomials
Expand Down
2 changes: 1 addition & 1 deletion docs/src/misc/conjugacy.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Conjugacy of integral matrices

```@docs
is_GLZ_conjugate(::fmpz_mat, ::fmpz_mat)
is_GLZ_conjugate(::ZZMatrix, ::ZZMatrix)
```
8 changes: 4 additions & 4 deletions docs/src/number_fields/elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Elements can also be created by specifying the coordinates with respect to the
basis of the number field:

```julia
(L::NumberField)(c::Vector{NumFieldElem}) -> NumFieldElem
(L::number_field)(c::Vector{NumFieldElem}) -> NumFieldElem
```

Given a number field $L/K$ of degree $d$ and a vector `c` length $d$, this constructs
Expand All @@ -27,7 +27,7 @@ the element `a` with `coordinates(a) == c`.
```jldoctest
julia> Qx, x = QQ["x"];

julia> K, a = NumberField(x^2 - 2, "a");
julia> K, a = number_field(x^2 - 2, "a");

julia> K([1, 2])
2*a + 1
Expand Down Expand Up @@ -75,8 +75,8 @@ minkowski_map(::nf_elem)
is_integral(::NumFieldElem)
is_torsion_unit(::nf_elem)
is_local_norm(::NumField, ::NumFieldElem, ::Any)
is_norm_divisible(::nf_elem, ::fmpz)
is_norm(::AnticNumberField, ::fmpz)
is_norm_divisible(::nf_elem, ::ZZRingElem)
is_norm(::AnticNumberField, ::ZZRingElem)
```

### Invariants
Expand Down
10 changes: 5 additions & 5 deletions docs/src/number_fields/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ end

## Creation of number fields

General number fields can be created using the function `NumberField`, of which
General number fields can be created using the function `number_field`, of which
`number_field` is an alias. To create a simple number field given by a defining
polynomial or a non-simple number field given by defining polynomials, the
following functions can be used.

```@docs
NumberField(::DocuDummy)
NumberField(::DocuDummy2)
number_field(::DocuDummy)
number_field(::DocuDummy2)
```

!!! tip
Expand All @@ -40,8 +40,8 @@ or radical extensions, the following functions are provided:

```@docs
cyclotomic_field(n::Int)
quadratic_field(d::fmpz)
wildanger_field(n::Int, B::fmpz)
quadratic_field(d::ZZRingElem)
wildanger_field(n::Int, B::ZZRingElem)
radical_extension(n::Int, a::NumFieldElem)
rationals_as_number_field()
```
Expand Down
4 changes: 2 additions & 2 deletions docs/src/orders/elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ All the usual arithmetic operatinos are defined:
- `*(::NumFieldOrdElem, ::NumFieldOrdElem)`
- `^(::NumFieldOrdElem, ::Int)`
- `mod(::NfAbsOrdElem, ::Int)`
- `mod_sym(::NumFieldOrdElem, ::fmpz)`
- `powermod(::NfAbsOrdElem, ::fmpz, ::Int)`
- `mod_sym(::NumFieldOrdElem, ::ZZRingElem)`
- `powermod(::NfAbsOrdElem, ::ZZRingElem, ::Int)`

## Miscellaneous

Expand Down
6 changes: 3 additions & 3 deletions docs/src/orders/frac_ideals.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ denominator. They are of type `NfOrdFracIdl`.
## Creation

```@docs
fractional_ideal(::NfOrd, ::fmpz_mat)
fractional_ideal(::NfOrd, ::fmpz_mat, ::fmpz)
fractional_ideal(::NfOrd, ::ZZMatrix)
fractional_ideal(::NfOrd, ::ZZMatrix, ::ZZRingElem)
fractional_ideal(::NfOrd, ::FakeFmpqMat)
fractional_ideal(::NfOrd, ::NfOrdIdl)
fractional_ideal(::NfOrd, ::NfOrdIdl, ::fmpz)
fractional_ideal(::NfOrd, ::NfOrdIdl, ::ZZRingElem)
fractional_ideal(::NfOrd, ::nf_elem)
fractional_ideal(::NfOrd, ::NfOrdElem)
inv(::NfOrdIdl)
Expand Down
Loading