Skip to content

The Big Renaming

Max Horn edited this page Mar 27, 2023 · 4 revisions

What was renamed?

Renaming in AbstractAlgebra 0.28

OLD NEW
PolynomialRing polynomial_ring
PowerSeriesRing power_series_ring
LaurentSeriesRing laurent_series_ring
LaurentSeriesField laurent_series_field
FractionField fraction_field
NumberField number_field
PolyElem PolyRingElem
NCPolyElem NCPolyRingElem
MPolyElem MPolyRingElem
UnivPolyElem UniversalPolyRingElem
LaurentPolyElem LaurentPolyRingElem
LaurentMPolyElem LaurentMPolyRingElem
UnivPolyRing UniversalPolyRing
ResF ResidueFieldElem
ResField ResidueField
Res ResidueRingElem
ResRing ResidueRing
Rat RationalFunctionFieldElem
AbsSeriesRing AbsPowerSeriesRing
AbsSeriesElem AbsPowerSeriesRingElem
RelSeriesRing RelPowerSeriesRing
RelSeriesElem RelPowerSeriesRingElem
FreeAssociativeAlgebra free_associative_algebra

Renaming in Nemo 0.33

WARNING: FqPolyRing is both an old and a new type name :-(

OLD NEW
fmpz ZZRingElem
fmpz_mat ZZMatrix
fmpz_mpoly ZZMPolyRingElem
fmpz_poly ZZPolyRingElem
fmpq QQFieldElem
fmpq_mat QQMatrix
fmpq_mpoly QQMPolyRingElem
fmpq_poly QQPolyRingElem
fmpz_mod ZZModRingElem
fmpz_mod_mat ZZModMatrix
fmpz_mod_poly ZZModPolyRingElem
nmod zzModRingElem
nmod_mat zzModMatrix
nmod_mpoly zzModMPolyRingElem
nmod_poly zzModPolyRingElem
fq_default FqFieldElem
fq_default_mat FqMatrix
fq_default_mpoly FqMPolyRingElem
fq_default_poly FqPolyRingElem
gfp_fmpz_elem FpFieldElem
gfp_fmpz_mat FpMatrix
gfp_fmpz_mpoly FpMPolyRingElem
gfp_fmpz_poly FpPolyRingElem
gfp_elem fpFieldElem
gfp_mat fpMatrix
gfp_mpoly fpMPolyRingElem
gfp_poly fpPolyRingElem
fq FqPolyRepFieldElem
fq_mat FqPolyRepMatrix
fq_poly FqPolyRepPolyRingElem
fq_nmod fqPolyRepFieldElem
fq_nmod_mat fqPolyRepMatrix
fq_nmod_mpoly fqPolyRepMPolyRingElem
fq_nmod_poly fqPolyRepPolyRingElem
FlintIntegerRing ZZRing
FmpzMatSpace ZZMatrixSpace
FmpzMPolyRing ZZMPolyRing
FmpzPolyRing ZZPolyRing
FlintRationalField QQField
FmpqMatSpace QQMatrixSpace
FmpqMPolyRing QQMPolyRing
FmpqPolyRing QQPolyRing
FmpzModRing ZZModRing
FmpzModMatSpace ZZModMatrixSpace
FmpzModPolyRing ZZModPolyRing
NmodRing zzModRing
NmodMatSpace zzModMatrixSpace
NmodMPolyRing zzModMPolyRing
NmodPolyRing zzModPolyRing
FqDefaultFiniteField FqField
FqDefaultMatSpace FqMatrixSpace
FqDefaultMPolyRing FqMPolyRing
FqDefaultPolyRing FqPolyRing
GaloisFmpzField FpField
GaloisFmpzMatSpace FpMatrixSpace
GFPFmpzMPolyRing FpMPolyRing
GFPFmpzPolyRing FpPolyRing
GaloisField fpField
GFPMatSpace fpMatrixSpace
GFPMPolyRing fpMPolyRing
GFPPolyRing fpPolyRing
FqFiniteField FqPolyRepField
FqMatSpace FqPolyRepMatrixSpace
FqPolyRing FqPolyRepPolyRing
FqNmodFiniteField fqPolyRepField
FqNmodMatSpace fqPolyRepMatrixSpace
FqNmodMPolyRing fqPolyRepMPolyRing
FqNmodPolyRing fqPolyRepPolyRing
fmpq_abs_series QQAbsPowerSeriesRingElem
fmpq_rel_series QQRelPowerSeriesRingElem
FmpqAbsSeriesRing QQAbsPowerSeriesRing
FmpqRelSeriesRing QQRelPowerSeriesRing
fmpz_abs_series ZZAbsPowerSeriesRingElem
fmpz_rel_series ZZRelPowerSeriesRingElem
FmpzAbsSeriesRing ZZAbsPowerSeriesRing
FmpzRelSeriesRing ZZRelPowerSeriesRing
fmpz_laurent_series ZZLaurentSeriesRingElem
FmpzLaurentSeriesRing ZZLaurentSeriesRing
fmpz_mod_abs_series ZZModAbsPowerSeriesRingElem
fmpz_mod_rel_series ZZModRelPowerSeriesRingElem
FmpzModAbsSeriesRing ZZModAbsPowerSeriesRing
FmpzModRelSeriesRing ZZModRelPowerSeriesRing
fq_default_abs_series FqAbsPowerSeriesRingElem
fq_default_rel_series FqRelPowerSeriesRingElem
FqDefaultAbsSeriesRing FqAbsPowerSeriesRing
FqDefaultRelSeriesRing FqRelPowerSeriesRing
fq_abs_series FqPolyRepAbsPowerSeriesRingElem
fq_rel_series FqPolyRepRelPowerSeriesRingElem
FqAbsSeriesRing FqPolyRepAbsPowerSeriesRing
FqRelSeriesRing FqPolyRepRelPowerSeriesRing
fq_nmod_abs_series fqPolyRepAbsPowerSeriesRingElem
fq_nmod_rel_series fqPolyRepRelPowerSeriesRingElem
FqNmodAbsSeriesRing fqPolyRepAbsPowerSeriesRing
FqNmodRelSeriesRing fqPolyRepRelPowerSeriesRing
gfp_abs_series fpAbsPowerSeriesRingElem
gfp_rel_series fpRelPowerSeriesRingElem
GFPAbsSeriesRing fpAbsPowerSeriesRing
GFPRelSeriesRing fpRelPowerSeriesRing
gfp_fmpz_abs_series FpAbsPowerSeriesRingElem
gfp_fmpz_rel_series FpRelPowerSeriesRingElem
GFPFmpzAbsSeriesRing FpAbsPowerSeriesRing
GFPFmpzRelSeriesRing FpRelPowerSeriesRing
nmod_abs_series zzModAbsPowerSeriesRingElem
nmod_rel_series zzModRelPowerSeriesRingElem
NmodAbsSeriesRing zzModAbsPowerSeriesRing
NmodRelSeriesRing zzModRelPowerSeriesRing

Renaming in Hecke 0.18

OLD NEW
AbsSpace AbstractSpace
AbsSpaceMor AbstractSpaceMor
AbsLat AbstractLat
TorQuadMod TorQuadModule
TorQuadModElem TorQuadModuleElem
TorQuadModMor TorQuadModuleMor
LatticeDB LatDB
NfLattice NfLat
genera Zgenera
GenusHerm HermGenus
LocalGenusHerm HermLocalGenus
GenusQuad QuadGenus
LocalGenusQuad QuadLocalGenus
genera_hermitian hermitian_genera
local_genera_hermitian hermitian_local_genera
genera_quadratic quadratic_genera
local_genera_quadratic quadratic_local_genera

Renaming in Oscar 0.12

OLD NEW
MPolyElem_dec MPolyDecRingElem
MPolyRing_dec MPolyDecRing
MPolyLocalizedRingElem MPolyLocRingElem
MPolyLocalizedRing MPolyLocRing
MPolyQuoElem MPolyQuoRingElem
MPolyQuo MPolyQuoRing
MPolyQuoLocalizedRingElem MPolyQuoLocRingElem
MPolyQuoLocalizedRing MPolyQuoLocRing
SubQuoElem SubquoModuleElem
SubQuo SubquoModule
SubQuoElem_dec SubquoDecModuleElem
SubQuo_dec SubquoDecModule

Renaming script

The following shell script can be used to help convert a package to the new names. Beware: some manual tweaking is likely needed afterwards.

#!/bin/sh
#
export LANG=C
export LC_CTYPE=C
export LC_ALL=C

# AbstractAlgbera constructors
git ls-files | xargs sed -i \
-e "s;\bMatrixSpace\b;matrix_space;g" \
-e "s;\bPolynomialRing\b;polynomial_ring;g" \
-e "s;\bPowerSeriesRing\b;power_series_ring;g" \
-e "s;\bLaurentSeriesRing\b;laurent_series_ring;g" \
-e "s;\bLaurentSeriesField\b;laurent_series_field;g" \
-e "s;\bFractionField\b;fraction_field;g" \
-e "s;\bResidueRing\b;residue_ring;g" \
-e "s;\bResidueField\b;residue_field;g" \
-e "s;\bNumberField\b;number_field;g" \

# AbstractAlgbera types
#git ls-files | xargs sed -i  "s;PolyElem;PolyRingElem;g"
git ls-files | xargs sed -i \
-e "s;\bUnivPolyRingElem\b;UniversalPolyRingElem;g" \
-e "s;\bUnivPolyRing\b;UniversalPolyRing;g" \
-e "s;\bResF\b;ResidueFieldElem;g" \
-e "s;\bResField\b;ResidueField;g" \
-e "s;\bRes\b;ResidueRingElem;g" \
-e "s;\bResRing\b;ResidueRing;g" \
-e "s;\bRat\b;RationalFunctionFieldElem;g" \

git ls-files | xargs sed -i \
-e "s;\bAbsSeriesRing\b;AbsPowerSeriesRing;g" \
-e "s;\bAbsSeriesElem\b;AbsPowerSeriesRingElem;g" \
-e "s;\bRelSeriesRing\b;RelPowerSeriesRing;g" \
-e "s;\bRelSeriesElem\b;RelPowerSeriesRingElem;g" \
-e "s;\bFreeAssociativeAlgebra\b;free_associative_algebra;g" \


# Nemo types
git ls-files | xargs sed -i \
-e "s;\bfmpz\b;ZZRingElem;g" \
-e "s;\bfmpz_mat\b;ZZMatrix;g" \
-e "s;\bfmpz_mpoly\b;ZZMPolyRingElem;g" \
-e "s;\bfmpz_poly\b;ZZPolyRingElem;g" \
-e "s;\bfmpq\b;QQFieldElem;g" \
-e "s;\bfmpq_mat\b;QQMatrix;g" \
-e "s;\bfmpq_mpoly\b;QQMPolyRingElem;g" \
-e "s;\bfmpq_poly\b;QQPolyRingElem;g" \
-e "s;\bfmpz_mod\b;ZZModRingElem;g" \
-e "s;\bfmpz_mod_mat\b;ZZModMatrix;g" \
-e "s;\bfmpz_mod_poly\b;ZZModPolyRingElem;g" \
-e "s;\bnmod\b;zzModRingElem;g" \
-e "s;\bnmod_mat\b;zzModMatrix;g" \
-e "s;\bnmod_mpoly\b;zzModMPolyRingElem;g" \
-e "s;\bnmod_poly\b;zzModPolyRingElem;g" \
-e "s;\bfq_default\b;FqFieldElem;g" \
-e "s;\bfq_default_mat\b;FqMatrix;g" \
-e "s;\bfq_default_mpoly\b;FqMPolyRingElem;g" \
-e "s;\bfq_default_poly\b;FqPolyRingElem;g" \
-e "s;\bgfp_fmpz_elem\b;FpFieldElem;g" \
-e "s;\bgfp_fmpz_mat\b;FpMatrix;g" \
-e "s;\bgfp_fmpz_mpoly\b;FpMPolyRingElem;g" \
-e "s;\bgfp_fmpz_poly\b;FpPolyRingElem;g" \
-e "s;\bgfp_elem\b;fpFieldElem;g" \
-e "s;\bgfp_mat\b;fpMatrix;g" \
-e "s;\bgfp_mpoly\b;fpMPolyRingElem;g" \
-e "s;\bgfp_poly\b;fpPolyRingElem;g" \
-e "s;\bfq\b;FqPolyRepFieldElem;g" \
-e "s;\bfq_mat\b;FqPolyRepMatrix;g" \
-e "s;\bfq_poly\b;FqPolyRepPolyRingElem;g" \
-e "s;\bfq_nmod\b;fqPolyRepFieldElem;g" \
-e "s;\bfq_nmod_mat\b;fqPolyRepMatrix;g" \
-e "s;\bfq_nmod_mpoly\b;fqPolyRepMPolyRingElem;g" \
-e "s;\bfq_nmod_poly\b;fqPolyRepPolyRingElem;g" \
-e "s;\bFlintIntegerRing\b;ZZRing;g" \
-e "s;\bFmpzMatSpace\b;ZZMatrixSpace;g" \
-e "s;\bFmpzMPolyRing\b;ZZMPolyRing;g" \
-e "s;\bFmpzPolyRing\b;ZZPolyRing;g" \
-e "s;\bFlintRationalField\b;QQField;g" \
-e "s;\bFmpqMatSpace\b;QQMatrixSpace;g" \
-e "s;\bFmpqMPolyRing\b;QQMPolyRing;g" \
-e "s;\bFmpqPolyRing\b;QQPolyRing;g" \
-e "s;\bFmpzModRing\b;ZZModRing;g" \
-e "s;\bFmpzModMatSpace\b;ZZModMatrixSpace;g" \
-e "s;\bFmpzModPolyRing\b;ZZModPolyRing;g" \
-e "s;\bNmodRing\b;zzModRing;g" \
-e "s;\bNmodMatSpace\b;zzModMatrixSpace;g" \
-e "s;\bNmodMPolyRing\b;zzModMPolyRing;g" \
-e "s;\bNmodPolyRing\b;zzModPolyRing;g" \
-e "s;\bFqDefaultFiniteField\b;FqField;g" \
-e "s;\bFqDefaultMatSpace\b;FqMatrixSpace;g" \
-e "s;\bFqDefaultMPolyRing\b;FqMPolyRing;g" \
-e "s;\bFqPolyRing\b;FqPolyRepPolyRing;g" \
-e "s;\bFqDefaultPolyRing\b;FqPolyRing;g" \
-e "s;\bGaloisFmpzField\b;FpField;g" \
-e "s;\bGaloisFmpzMatSpace\b;FpMatrixSpace;g" \
-e "s;\bGFPFmpzMPolyRing\b;FpMPolyRing;g" \
-e "s;\bGFPFmpzPolyRing\b;FpPolyRing;g" \
-e "s;\bGaloisField\b;fpField;g" \
-e "s;\bGFPMatSpace\b;fpMatrixSpace;g" \
-e "s;\bGFPMPolyRing\b;fpMPolyRing;g" \
-e "s;\bGFPPolyRing\b;fpPolyRing;g" \
-e "s;\bFqFiniteField\b;FqPolyRepField;g" \
-e "s;\bFqMatSpace\b;FqPolyRepMatrixSpace;g" \
-e "s;\bFqNmodFiniteField\b;fqPolyRepField;g" \
-e "s;\bFqNmodMatSpace\b;fqPolyRepMatrixSpace;g" \
-e "s;\bFqNmodMPolyRing\b;fqPolyRepMPolyRing;g" \
-e "s;\bFqNmodPolyRing\b;fqPolyRepPolyRing;g" \

# More Nemo types
git ls-files | xargs sed -i \
-e "s;\bfmpq_abs_series\b;QQAbsPowerSeriesRingElem;g" \
-e "s;\bfmpq_rel_series\b;QQRelPowerSeriesRingElem;g" \
-e "s;\bFmpqAbsSeriesRing\b;QQAbsPowerSeriesRing;g" \
-e "s;\bFmpqRelSeriesRing\b;QQRelPowerSeriesRing;g" \
-e "s;\bfmpz_abs_series\b;ZZAbsPowerSeriesRingElem;g" \
-e "s;\bfmpz_rel_series\b;ZZRelPowerSeriesRingElem;g" \
-e "s;\bFmpzAbsSeriesRing\b;ZZAbsPowerSeriesRing;g" \
-e "s;\bFmpzRelSeriesRing\b;ZZRelPowerSeriesRing;g" \
-e "s;\bfmpz_laurent_series\b;ZZLaurentSeriesRingElem;g" \
-e "s;\bFmpzLaurentSeriesRing\b;ZZLaurentSeriesRing;g" \
-e "s;\bfmpz_mod_abs_series\b;ZZModAbsPowerSeriesRingElem;g" \
-e "s;\bfmpz_mod_rel_series\b;ZZModRelPowerSeriesRingElem;g" \
-e "s;\bFmpzModAbsSeriesRing\b;ZZModAbsPowerSeriesRing;g" \
-e "s;\bFmpzModRelSeriesRing\b;ZZModRelPowerSeriesRing;g" \
-e "s;\bfq_default_abs_series\b;FqAbsPowerSeriesRingElem;g" \
-e "s;\bfq_default_rel_series\b;FqRelPowerSeriesRingElem;g" \
-e "s;\bFqDefaultAbsSeriesRing\b;FqAbsPowerSeriesRing;g" \
-e "s;\bFqDefaultRelSeriesRing\b;FqRelPowerSeriesRing;g" \
-e "s;\bfq_abs_series\b;FqPolyRepAbsPowerSeriesRingElem;g" \
-e "s;\bfq_rel_series\b;FqPolyRepRelPowerSeriesRingElem;g" \
-e "s;\bFqAbsSeriesRing\b;FqPolyRepAbsPowerSeriesRing;g" \
-e "s;\bFqRelSeriesRing\b;FqPolyRepRelPowerSeriesRing;g" \
-e "s;\bfq_nmod_abs_series\b;fqPolyRepAbsPowerSeriesRingElem;g" \
-e "s;\bfq_nmod_rel_series\b;fqPolyRepRelPowerSeriesRingElem;g" \
-e "s;\bFqNmodAbsSeriesRing\b;fqPolyRepAbsPowerSeriesRing;g" \
-e "s;\bFqNmodRelSeriesRing\b;fqPolyRepRelPowerSeriesRing;g" \
-e "s;\bgfp_abs_series\b;fpAbsPowerSeriesRingElem;g" \
-e "s;\bgfp_rel_series\b;fpRelPowerSeriesRingElem;g" \
-e "s;\bGFPAbsSeriesRing\b;fpAbsPowerSeriesRing;g" \
-e "s;\bGFPRelSeriesRing\b;fpRelPowerSeriesRing;g" \
-e "s;\bgfp_fmpz_abs_series\b;FpAbsPowerSeriesRingElem;g" \
-e "s;\bgfp_fmpz_rel_series\b;FpRelPowerSeriesRingElem;g" \
-e "s;\bGFPFmpzAbsSeriesRing\b;FpAbsPowerSeriesRing;g" \
-e "s;\bGFPFmpzRelSeriesRing\b;FpRelPowerSeriesRing;g" \
-e "s;\bnmod_abs_series\b;zzModAbsPowerSeriesRingElem;g" \
-e "s;\bnmod_rel_series\b;zzModRelPowerSeriesRingElem;g" \
-e "s;\bNmodAbsSeriesRing\b;zzModAbsPowerSeriesRing;g" \
-e "s;\bNmodRelSeriesRing\b;zzModRelPowerSeriesRing;g" \


# Hecke renaming
git ls-files | xargs sed -i \
-e "s;\bAbsSpace\b;AbstractSpace;g" \
-e "s;\bAbsSpaceMor\b;AbstractSpaceMor;g" \
-e "s;\bAbsLat\b;AbstractLat;g" \
-e "s;\bTorQuadMod\b;TorQuadModule;g" \
-e "s;\bTorQuadModElem\b;TorQuadModuleElem;g" \
-e "s;\bTorQuadModMor\b;TorQuadModuleMor;g" \
-e "s;\bLatticeDB\b;LatDB;g" \
-e "s;\bNfLattice\b;NfLat;g" \
-e "s;\bgenera\b;Zgenera;g" \
-e "s;\bGenusHerm\b;HermGenus;g" \
-e "s;\bLocalGenusHerm\b;HermLocalGenus;g" \
-e "s;\bGenusQuad\b;QuadGenus;g" \
-e "s;\bLocalGenusQuad\b;QuadLocalGenus;g" \
-e "s;\bgenera_hermitian\b;hermitian_genera;g" \
-e "s;\blocal_genera_hermitian\b;hermitian_local_genera;g" \
-e "s;\bgenera_quadratic\b;quadratic_genera;g" \
-e "s;\blocal_genera_quadratic\b;quadratic_local_genera;g" \


# Oscar types
git ls-files | xargs sed -i \
-e "s;\bMPolyElem\b;MPolyRingElem;g" \
-e "s;\bMPolyRing\b;MPolyRing;g" \
-e "s;\bMPolyElem_dec\b;MPolyDecRingElem;g" \
-e "s;\bMPolyRing_dec\b;MPolyDecRing;g" \
-e "s;\bMPolyLocalizedRingElem\b;MPolyLocRingElem;g" \
-e "s;\bMPolyLocalizedRing\b;MPolyLocRing;g" \
-e "s;\bMPolyQuoElem\b;MPolyQuoRingElem;g" \
-e "s;\bMPolyQuo\b;MPolyQuoRing;g" \
-e "s;\bMPolyQuoLocalizedRingElem\b;MPolyQuoLocRingElem;g" \
-e "s;\bMPolyQuoLocalizedRing\b;MPolyQuoLocRing;g" \
-e "s;\bSubQuoElem\b;SubquoModuleElem;g" \
-e "s;\bSubQuo\b;SubquoModule;g" \
-e "s;\bSubQuoElem_dec\b;SubquoDecModuleElem;g" \
-e "s;\bSubQuo_dec\b;SubquoDecModule;g" \


echo DONE
Clone this wiki locally