pari  2.13.1
About: PARI/GP is a computer algebra system designed for fast computations in number theory (factorizations, algebraic number theory, elliptic curves...), but also contains a large number of other mathematical functions.
  Fossies Dox: pari-2.13.1.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

base4.c File Reference
#include "pari.h"
#include "paripriv.h"
Include dependency graph for base4.c:

Go to the source code of this file.

Functions

long idealtyp (GEN *ideal, GEN *arch)
 
GEN idealhnf_two (GEN nf, GEN v)
 
GEN pr_hnf (GEN nf, GEN pr)
 
GEN idealhnf_principal (GEN nf, GEN x)
 
static GEN vec_mulid (GEN nf, GEN x, long nx, long N)
 
GEN idealhnf_shallow (GEN nf, GEN x)
 
GEN idealhnf (GEN nf, GEN x)
 
GEN idealtwoelt0 (GEN nf, GEN x, GEN a)
 
GEN idealpow0 (GEN nf, GEN x, GEN n, long flag)
 
GEN idealmul0 (GEN nf, GEN x, GEN y, long flag)
 
GEN idealdiv0 (GEN nf, GEN x, GEN y, long flag)
 
GEN idealaddtoone0 (GEN nf, GEN arg1, GEN arg2)
 
static GEN hnf_Z_ZC (GEN nf, GEN a, GEN b)
 
static GEN hnf_Z_QC (GEN nf, GEN a, GEN b)
 
static GEN hnf_Q_QC (GEN nf, GEN a, GEN b)
 
static GEN hnf_QC_QC (GEN nf, GEN a, GEN b)
 
static GEN hnf_Q_Q (GEN nf, GEN a, GEN b)
 
GEN idealhnf0 (GEN nf, GEN a, GEN b)
 
static GEN idealapprfact_i (GEN nf, GEN x, int nored)
 
static int ok_elt (GEN x, GEN xZ, GEN y)
 
static GEN addmul_col (GEN a, long s, GEN b)
 
static GEN addmul_mat (GEN a, long s, GEN b)
 
static GEN get_random_a (GEN nf, GEN x, GEN xZ)
 
static GEN mat_ideal_two_elt (GEN nf, GEN x)
 
GEN idealtwoelt (GEN nf, GEN x)
 
static long idealHNF_norm_pval (GEN x, GEN p, long Zval)
 
GEN idealHNF_Z_factor_i (GEN x, GEN f0, GEN *pvN, GEN *pvZ)
 
GEN idealHNF_Z_factor (GEN x, GEN *pvN, GEN *pvZ)
 
static long idealHNF_val (GEN A, GEN P, long Nval, long Zval)
 
static GEN idealHNF_factor_i (GEN nf, GEN x, GEN cx, GEN FA)
 
static GEN idealHNF_factor (GEN nf, GEN x, pari_ulong lim)
 
static GEN prV_e_muls (GEN L, long c)
 
static GEN Q_nffactor (GEN nf, GEN y, pari_ulong lim)
 
GEN idealfactor_partial (GEN nf, GEN x, GEN L)
 
GEN idealfactor_limit (GEN nf, GEN x, pari_ulong lim)
 
GEN idealfactor (GEN nf, GEN x)
 
GEN gpidealfactor (GEN nf, GEN x, GEN lim)
 
static GEN ramified_root (GEN nf, GEN R, GEN A, long n)
 
static int ramified_root_simple (GEN nf, long n, GEN P, GEN v)
 
static long idealsqrtn_int (GEN nf, GEN A, long n, GEN *pB)
 
long idealispower (GEN nf, GEN A, long n, GEN *pB)
 
static GEN idealredmodpower_i (GEN nf, GEN x, pari_ulong k, pari_ulong B)
 
GEN idealredmodpower (GEN nf, GEN x, pari_ulong n, pari_ulong B)
 
long idealval (GEN nf, GEN A, GEN P)
 
GEN gpidealval (GEN nf, GEN ix, GEN P)
 
GEN idealadd (GEN nf, GEN x, GEN y)
 
static GEN trivial_merge (GEN x)
 
static GEN _idealaddtoone (GEN nf, GEN x, GEN y, long red)
 
GEN idealaddtoone_i (GEN nf, GEN x, GEN y)
 
GEN idealaddtoone_raw (GEN nf, GEN x, GEN y)
 
GEN idealaddtoone (GEN nf, GEN x, GEN y)
 
GEN idealaddmultoone (GEN nf, GEN list)
 
static GEN idealHNF_mul_two (GEN nf, GEN x, GEN y)
 
GEN idealHNF_mul (GEN nf, GEN x, GEN y)
 
GEN famat_mul_shallow (GEN f, GEN g)
 
GEN famat_mulpow_shallow (GEN f, GEN g, GEN e)
 
GEN famat_mulpows_shallow (GEN f, GEN g, long e)
 
GEN famat_div_shallow (GEN f, GEN g)
 
GEN to_famat (GEN x, GEN y)
 
GEN to_famat_shallow (GEN x, GEN y)
 
static GEN append (GEN v, GEN x)
 
static GEN famat_add (GEN f, GEN x)
 
static GEN famat_sub (GEN f, GEN x)
 
GEN famat_mul (GEN f, GEN g)
 
GEN famat_div (GEN f, GEN g)
 
GEN famat_sqr (GEN f)
 
GEN famat_inv_shallow (GEN f)
 
GEN famat_inv (GEN f)
 
GEN famat_pow (GEN f, GEN n)
 
GEN famat_pow_shallow (GEN f, GEN n)
 
GEN famat_pows_shallow (GEN f, long n)
 
GEN famat_Z_gcd (GEN M, GEN n)
 
static GEN ext_sqr (GEN nf, GEN x)
 
static GEN ext_mul (GEN nf, GEN x, GEN y)
 
static GEN ext_inv (GEN nf, GEN x)
 
static GEN ext_pow (GEN nf, GEN x, GEN n)
 
GEN famat_to_nf (GEN nf, GEN f)
 
GEN famat_idealfactor (GEN nf, GEN x)
 
GEN famat_reduce (GEN fa)
 
GEN matreduce (GEN f)
 
GEN famatsmall_reduce (GEN fa)
 
GEN famat_remove_trivial (GEN fa)
 
GEN famatV_factorback (GEN v, GEN e)
 
GEN famatV_zv_factorback (GEN v, GEN e)
 
GEN ZM_famat_limit (GEN fa, GEN limit)
 
static GEN to_Fp_coprime (GEN nf, GEN x, GEN modpr)
 
static GEN famat_to_Fp_coprime (GEN nf, GEN x, GEN modpr)
 
GEN nf_to_Fp_coprime (GEN nf, GEN x, GEN modpr)
 
static long zk_pvalrem (GEN x, GEN p, GEN *py)
 
static GEN nf_remove_denom_p (GEN nf, GEN x, GEN p, GEN *pdx, long *pv)
 
static GEN p_makecoprime (GEN pr)
 
GEN famat_makecoprime (GEN nf, GEN g, GEN e, GEN pr, GEN prk, GEN EX)
 
GEN sunits_makecoprime (GEN X, GEN pr, GEN prk)
 
GEN famat_to_nf_moddivisor (GEN nf, GEN g, GEN e, GEN bid)
 
GEN vecmul (GEN x, GEN y)
 
GEN vecinv (GEN x)
 
GEN vecpow (GEN x, GEN n)
 
GEN vecdiv (GEN x, GEN y)
 
static GEN idealmulelt (GEN nf, GEN x, GEN A)
 
static GEN idealmul_aux (GEN nf, GEN x, GEN y, long tx, long ty)
 
GEN idealmul (GEN nf, GEN x, GEN y)
 
static GEN idealsqrprime (GEN nf, GEN pr, GEN *pc)
 
static GEN idealsqr_aux (GEN nf, GEN x, long tx)
 
GEN idealsqr (GEN nf, GEN x)
 
GEN idealnorm (GEN nf, GEN x)
 
GEN idealdown (GEN nf, GEN x)
 
static GEN idealismaximal_int (GEN nf, GEN p)
 
static GEN idealismaximal_mat (GEN nf, GEN x)
 
static GEN idealismaximal_i (GEN nf, GEN x)
 
GEN idealismaximal (GEN nf, GEN x)
 
GEN idealHNF_inv_Z (GEN nf, GEN I)
 
GEN idealHNF_inv (GEN nf, GEN I)
 
GEN pr_inv_p (GEN pr)
 
GEN pr_inv (GEN pr)
 
GEN idealinv (GEN nf, GEN x)
 
GEN idealnumden (GEN nf, GEN x)
 
static GEN idealpowprime (GEN nf, GEN pr, GEN n, GEN *pc)
 
GEN idealmulpowprime (GEN nf, GEN x, GEN pr, GEN n)
 
GEN idealdivpowprime (GEN nf, GEN x, GEN pr, GEN n)
 
static GEN idealpow_aux (GEN nf, GEN x, long tx, GEN n)
 
GEN idealpow (GEN nf, GEN x, GEN n)
 
GEN idealpows (GEN nf, GEN ideal, long e)
 
static GEN _idealmulred (GEN nf, GEN x, GEN y)
 
static GEN _idealsqrred (GEN nf, GEN x)
 
static GEN _mul (void *data, GEN x, GEN y)
 
static GEN _sqr (void *data, GEN x)
 
GEN idealpowred (GEN nf, GEN x, GEN n)
 
GEN idealmulred (GEN nf, GEN x, GEN y)
 
long isideal (GEN nf, GEN x)
 
GEN idealdiv (GEN nf, GEN x, GEN y)
 
static void err_divexact (GEN x, GEN y)
 
GEN idealdivexact (GEN nf, GEN x0, GEN y0)
 
GEN idealintersect (GEN nf, GEN x, GEN y)
 
static GEN chk_vdir (GEN nf, GEN vdir)
 
static void twistG (GEN G, long r1, long i, long v)
 
GEN nf_get_Gtwist (GEN nf, GEN vdir)
 
GEN nf_get_Gtwist1 (GEN nf, long i)
 
GEN RM_round_maxrank (GEN G0)
 
GEN idealred0 (GEN nf, GEN I, GEN vdir)
 
GEN idealmin (GEN nf, GEN x, GEN vdir)
 
GEN Z_ppio (GEN a, GEN b)
 
GEN Z_ppgle (GEN a, GEN b)
 
static void Z_dcba_rec (GEN L, GEN a, GEN b)
 
static GEN Z_cba_rec (GEN L, GEN a, GEN b)
 
GEN Z_cba (GEN a, GEN b)
 
GEN ZV_cba_extend (GEN P, GEN b)
 
GEN ZV_cba (GEN v)
 
GEN Z_ppo (GEN x, GEN f)
 
pari_ulong u_ppo (pari_ulong x, pari_ulong f)
 
static pari_ulong lcmuu (pari_ulong a, pari_ulong b)
 
pari_ulong Fl_invgen (pari_ulong x, pari_ulong N, pari_ulong *pd)
 
static GEN nf_coprime_part (GEN nf, GEN x, GEN listpr)
 
GEN make_integral (GEN nf, GEN L0, GEN f, GEN listpr)
 
GEN idealprodprime (GEN nf, GEN L)
 
GEN idealprod (GEN nf, GEN I)
 
long idealprodval (GEN nf, GEN I, GEN pr)
 
GEN factorbackprime (GEN nf, GEN L, GEN e)
 
GEN pr_uniformizer (GEN pr, GEN F)
 
GEN prV_lcm_capZ (GEN L)
 
GEN idealapprfact (GEN nf, GEN x)
 
GEN idealappr (GEN nf, GEN x)
 
GEN idealappr0 (GEN nf, GEN x, long fl)
 
static GEN mat_ideal_two_elt2 (GEN nf, GEN x, GEN a)
 
static void not_in_ideal (GEN a)
 
static int in_ideal (GEN x, GEN a)
 
GEN idealtwoelt2 (GEN nf, GEN x, GEN a)
 
GEN idealcoprimefact (GEN nf, GEN x, GEN fy)
 
GEN idealcoprime (GEN nf, GEN x, GEN y)
 
GEN nfmulmodpr (GEN nf, GEN x, GEN y, GEN modpr)
 
GEN nfdivmodpr (GEN nf, GEN x, GEN y, GEN modpr)
 
GEN nfpowmodpr (GEN nf, GEN x, GEN k, GEN modpr)
 
GEN nfkermodpr (GEN nf, GEN x, GEN modpr)
 
GEN nfsolvemodpr (GEN nf, GEN a, GEN b, GEN pr)
 

Function Documentation

◆ _idealaddtoone()

static GEN _idealaddtoone ( GEN  nf,
GEN  x,
GEN  y,
long  red 
)
static

◆ _idealmulred()

static GEN _idealmulred ( GEN  nf,
GEN  x,
GEN  y 
)
static

Definition at line 2325 of file base4.c.

References idealmul(), and idealred().

Referenced by _mul(), and idealmulred().

◆ _idealsqrred()

static GEN _idealsqrred ( GEN  nf,
GEN  x 
)
static

Definition at line 2328 of file base4.c.

References idealred(), and idealsqr().

Referenced by _sqr().

◆ _mul()

static GEN _mul ( void *  data,
GEN  x,
GEN  y 
)
static

Definition at line 2331 of file base4.c.

References _idealmulred(), and data.

Referenced by idealpowred().

◆ _sqr()

static GEN _sqr ( void *  data,
GEN  x 
)
static

Definition at line 2333 of file base4.c.

References _idealsqrred(), and data.

Referenced by idealpowred().

◆ addmul_col()

static GEN addmul_col ( GEN  a,
long  s,
GEN  b 
)
static

Definition at line 317 of file base4.c.

References addii(), gel, gmulsg(), leafcopy(), lg, mulsi(), and signe.

Referenced by addmul_mat(), and get_random_a().

◆ addmul_mat()

static GEN addmul_mat ( GEN  a,
long  s,
GEN  b 
)
static

Definition at line 330 of file base4.c.

References addmul_col(), gel, gmulsg(), lg, and RgM_shallowcopy().

Referenced by get_random_a().

◆ append()

static GEN append ( GEN  v,
GEN  x 
)
static

Definition at line 1172 of file base4.c.

References cgetg(), gcopy(), gel, lg, and typ.

Referenced by famat_add(), famat_sub(), and yytnamerr().

◆ chk_vdir()

static GEN chk_vdir ( GEN  nf,
GEN  vdir 
)
static

Definition at line 2500 of file base4.c.

References cgetg(), gceil(), gel, itos(), lg, nf_get_roots(), pari_err_DIM(), pari_err_TYPE(), t_VEC, t_VECSMALL, and typ.

Referenced by nf_get_Gtwist().

◆ err_divexact()

static void err_divexact ( GEN  x,
GEN  y 
)
static

Definition at line 2420 of file base4.c.

References gen_1, mkvec2(), and pari_err_DOMAIN().

Referenced by idealdivexact().

◆ ext_inv()

static GEN ext_inv ( GEN  nf,
GEN  x 
)
static

Definition at line 1336 of file base4.c.

References famat_inv(), nfinv(), t_MAT, and typ.

Referenced by idealinv().

◆ ext_mul()

static GEN ext_mul ( GEN  nf,
GEN  x,
GEN  y 
)
static

Definition at line 1333 of file base4.c.

References famat_mul(), nfmul(), t_MAT, and typ.

Referenced by idealmul(), and idealred0().

◆ ext_pow()

static GEN ext_pow ( GEN  nf,
GEN  x,
GEN  n 
)
static

Definition at line 1339 of file base4.c.

References famat_pow(), n, nfpow(), t_MAT, and typ.

Referenced by idealpow().

◆ ext_sqr()

static GEN ext_sqr ( GEN  nf,
GEN  x 
)
static

Definition at line 1330 of file base4.c.

References famat_sqr(), nfsqr(), t_MAT, and typ.

Referenced by idealsqr().

◆ factorbackprime()

GEN factorbackprime ( GEN  nf,
GEN  L,
GEN  e 
)

◆ famat_add()

static GEN famat_add ( GEN  f,
GEN  x 
)
static

Definition at line 1181 of file base4.c.

References append(), cgetg(), f, gconcat(), gel, gen_1, lgcols(), mkcol(), mkcolcopy(), and t_MAT.

Referenced by famat_mul().

◆ famat_div()

GEN famat_div ( GEN  f,
GEN  g 
)

Definition at line 1234 of file base4.c.

References cgetg(), f, famat_inv(), famat_sub(), gconcat(), gcopy(), gel, gen_1, gen_m1, gneg(), lgcols(), mkcol2(), t_MAT, and typ.

Referenced by nfdiv().

◆ famat_div_shallow()

GEN famat_div_shallow ( GEN  f,
GEN  g 
)

Definition at line 1162 of file base4.c.

References f, famat_inv_shallow(), and famat_mul_shallow().

Referenced by bnrisprincipalmod(), famat_divsqr(), and idealfactor_limit().

◆ famat_idealfactor()

GEN famat_idealfactor ( GEN  nf,
GEN  x 
)

◆ famat_inv()

GEN famat_inv ( GEN  f)

Definition at line 1272 of file base4.c.

References f, gcopy(), gel, gen_m1, lgcols(), retmkmat2, t_MAT, to_famat(), typ, and ZC_neg().

Referenced by ext_inv(), famat_div(), and nfinv().

◆ famat_inv_shallow()

GEN famat_inv_shallow ( GEN  f)

◆ famat_makecoprime()

GEN famat_makecoprime ( GEN  nf,
GEN  g,
GEN  e,
GEN  pr,
GEN  prk,
GEN  EX 
)

◆ famat_mul()

GEN famat_mul ( GEN  f,
GEN  g 
)

Definition at line 1215 of file base4.c.

References cgetg(), f, famat_add(), gconcat(), gcopy(), gel, gen_1, lgcols(), mkcol2(), t_MAT, and typ.

Referenced by bnfsunit_i(), ext_mul(), and nfmul().

◆ famat_mul_shallow()

◆ famat_mulpow_shallow()

GEN famat_mulpow_shallow ( GEN  f,
GEN  g,
GEN  e 
)

◆ famat_mulpows_shallow()

GEN famat_mulpows_shallow ( GEN  f,
GEN  g,
long  e 
)

Definition at line 1155 of file base4.c.

References f, famat_mul_shallow(), and famat_pows_shallow().

Referenced by famatV_zv_factorback(), isprincipalell(), lambdaofelt(), and Zn_quad_roots().

◆ famat_pow()

GEN famat_pow ( GEN  f,
GEN  n 
)

Definition at line 1279 of file base4.c.

References f, gcopy(), gel, lgcols(), n, retmkmat2, t_MAT, to_famat(), typ, and ZC_Z_mul().

Referenced by ext_pow(), and nfpow().

◆ famat_pow_shallow()

GEN famat_pow_shallow ( GEN  f,
GEN  n 
)

◆ famat_pows_shallow()

GEN famat_pows_shallow ( GEN  f,
long  n 
)

◆ famat_reduce()

◆ famat_remove_trivial()

GEN famat_remove_trivial ( GEN  fa)

◆ famat_sqr()

GEN famat_sqr ( GEN  f)

Definition at line 1253 of file base4.c.

References cgetg(), f, gcopy(), gel, gen_2, gmul2n(), lgcols(), t_MAT, to_famat(), and typ.

Referenced by ext_sqr(), and nfsqr().

◆ famat_sub()

static GEN famat_sub ( GEN  f,
GEN  x 
)
static

Definition at line 1198 of file base4.c.

References append(), cgetg(), f, gconcat(), gel, gen_m1, lgcols(), mkcol(), mkcolcopy(), and t_MAT.

Referenced by famat_div().

◆ famat_to_Fp_coprime()

static GEN famat_to_Fp_coprime ( GEN  nf,
GEN  x,
GEN  modpr 
)
static

Definition at line 1541 of file base4.c.

References Fp_mul(), Fp_pow(), gel, gen_1, lg, modii(), modpr_get_p(), n, p, signe, subiu(), and to_Fp_coprime().

Referenced by nf_to_Fp_coprime().

◆ famat_to_nf()

GEN famat_to_nf ( GEN  nf,
GEN  f 
)

Definition at line 1343 of file base4.c.

References f, gel, gen_1, lg, lgcols(), nfmul(), and nfpow().

◆ famat_to_nf_moddivisor()

GEN famat_to_nf_moddivisor ( GEN  nf,
GEN  g,
GEN  e,
GEN  bid 
)

◆ famat_Z_gcd()

GEN famat_Z_gcd ( GEN  M,
GEN  n 
)

Definition at line 1305 of file base4.c.

References avma, cgetg(), gcoeff, gel, gerepilecopy(), gminsg(), lgcols(), M, n, p, setlg, signe, t_COL, t_MAT, and Z_pval().

Referenced by Fl_Flxq_log(), and Fp_FpXQ_log().

◆ famatsmall_reduce()

GEN famatsmall_reduce ( GEN  fa)

◆ famatV_factorback()

GEN famatV_factorback ( GEN  v,
GEN  e 
)

Definition at line 1472 of file base4.c.

References famat_mulpow_shallow(), famat_pow_shallow(), gel, lg, signe, and trivial_fact().

Referenced by bnfsunit_i(), famat_idealfactor(), and isprincipalall().

◆ famatV_zv_factorback()

GEN famatV_zv_factorback ( GEN  v,
GEN  e 
)

◆ Fl_invgen()

pari_ulong Fl_invgen ( pari_ulong  x,
pari_ulong  N,
pari_ulong pd 
)

Definition at line 2803 of file base4.c.

References lcmuu(), u_chinese_coprime(), u_ppo(), ulong, and xgcduu().

Referenced by cusp_canon(), Fl_inverse(), Fp_invgen(), and zv_cyc_minimize().

◆ get_random_a()

static GEN get_random_a ( GEN  nf,
GEN  x,
GEN  xZ 
)
static

◆ gpidealfactor()

GEN gpidealfactor ( GEN  nf,
GEN  x,
GEN  lim 
)

Definition at line 767 of file base4.c.

References idealfactor_limit(), itou(), L(), pari_err_FLAG(), signe, t_INT, typ, and ulong.

◆ gpidealval()

GEN gpidealval ( GEN  nf,
GEN  ix,
GEN  P 
)

Definition at line 952 of file base4.c.

References idealval(), LONG_MAX, mkoo(), and stoi().

◆ hnf_Q_Q()

static GEN hnf_Q_Q ( GEN  nf,
GEN  a,
GEN  b 
)
static

Definition at line 282 of file base4.c.

References nf_get_degree(), Q_gcd(), and scalarmat().

Referenced by idealhnf0().

◆ hnf_Q_QC()

static GEN hnf_Q_QC ( GEN  nf,
GEN  a,
GEN  b 
)
static

Definition at line 246 of file base4.c.

References diviiexact(), gcdii(), gel, hnf_Z_QC(), hnf_Z_ZC(), is_pm1(), mulii(), Q_remove_denom(), RgM_Rg_div(), t_INT, and typ.

Referenced by idealhnf0().

◆ hnf_QC_QC()

static GEN hnf_QC_QC ( GEN  nf,
GEN  a,
GEN  b 
)
static

◆ hnf_Z_QC()

static GEN hnf_Z_QC ( GEN  nf,
GEN  a,
GEN  b 
)
static

Definition at line 236 of file base4.c.

References hnf_Z_ZC(), mulii(), Q_remove_denom(), and RgM_Rg_div().

Referenced by hnf_Q_QC().

◆ hnf_Z_ZC()

static GEN hnf_Z_ZC ( GEN  nf,
GEN  a,
GEN  b 
)
static

Definition at line 233 of file base4.c.

References hnfmodid(), and zk_multable().

Referenced by hnf_Q_QC(), and hnf_Z_QC().

◆ idealadd()

◆ idealaddmultoone()

◆ idealaddtoone()

GEN idealaddtoone ( GEN  nf,
GEN  x,
GEN  y 
)

Definition at line 1029 of file base4.c.

References avma, cgetg(), checknf(), gel, gen_1, gerepileupto(), idealaddtoone_i(), subui(), t_COL, t_VEC, typ, and Z_ZC_sub().

Referenced by idealaddtoone0(), and nfidealdet1().

◆ idealaddtoone0()

GEN idealaddtoone0 ( GEN  nf,
GEN  arg1,
GEN  arg2 
)

Definition at line 225 of file base4.c.

References idealaddmultoone(), and idealaddtoone().

◆ idealaddtoone_i()

GEN idealaddtoone_i ( GEN  nf,
GEN  x,
GEN  y 
)

Definition at line 1021 of file base4.c.

References _idealaddtoone().

Referenced by idealaddtoone(), idealmoddivisor_aux(), make_integral(), nfbezout(), and nflocalred().

◆ idealaddtoone_raw()

GEN idealaddtoone_raw ( GEN  nf,
GEN  x,
GEN  y 
)

Definition at line 1025 of file base4.c.

References _idealaddtoone().

Referenced by anti_uniformizer(), idealmoddivisor_aux(), nfbezout(), and zkchineseinit().

◆ idealappr()

GEN idealappr ( GEN  nf,
GEN  x 
)

Definition at line 3023 of file base4.c.

References avma, gerepileupto(), idealapprfact_i(), idealfactor(), and is_nf_extfactor().

Referenced by idealappr0().

◆ idealappr0()

GEN idealappr0 ( GEN  nf,
GEN  x,
long  fl 
)

Definition at line 3031 of file base4.c.

References idealappr().

◆ idealapprfact()

GEN idealapprfact ( GEN  nf,
GEN  x 
)

Definition at line 3018 of file base4.c.

References avma, gerepileupto(), and idealapprfact_i().

◆ idealapprfact_i()

◆ idealcoprime()

GEN idealcoprime ( GEN  nf,
GEN  x,
GEN  y 
)

Definition at line 3106 of file base4.c.

References avma, gerepileupto(), idealcoprimefact(), and idealfactor().

Referenced by nfidealdet1().

◆ idealcoprimefact()

GEN idealcoprimefact ( GEN  nf,
GEN  x,
GEN  fy 
)

Definition at line 3096 of file base4.c.

References cgetg(), gel, idealapprfact_i(), idealval(), L(), lg, mkmat2(), stoi(), and t_COL.

Referenced by Buchraymod_i(), and idealcoprime().

◆ idealdiv()

GEN idealdiv ( GEN  nf,
GEN  x,
GEN  y 
)

◆ idealdiv0()

GEN idealdiv0 ( GEN  nf,
GEN  x,
GEN  y,
long  flag 
)

Definition at line 213 of file base4.c.

References idealdiv(), idealdivexact(), and pari_err_FLAG().

◆ idealdivexact()

◆ idealdivpowprime()

GEN idealdivpowprime ( GEN  nf,
GEN  x,
GEN  pr,
GEN  n 
)

Definition at line 2246 of file base4.c.

References idealmulpowprime(), n, and negi().

Referenced by get_ilambda(), and pr_init().

◆ idealdown()

◆ idealfactor()

◆ idealfactor_limit()

◆ idealfactor_partial()

◆ idealhnf()

◆ idealhnf0()

GEN idealhnf0 ( GEN  nf,
GEN  a,
GEN  b 
)

◆ idealHNF_factor()

static GEN idealHNF_factor ( GEN  nf,
GEN  x,
pari_ulong  lim 
)
static

Definition at line 649 of file base4.c.

References absZ_factor_limit(), cmpiu(), gcoeff, gel, idealHNF_factor_i(), lg, Q_primitive_part(), and setlg.

Referenced by idealfactor_limit().

◆ idealHNF_factor_i()

static GEN idealHNF_factor_i ( GEN  nf,
GEN  x,
GEN  cx,
GEN  FA 
)
static

◆ idealHNF_inv()

GEN idealHNF_inv ( GEN  nf,
GEN  I 
)

Definition at line 2044 of file base4.c.

References equali1(), gcoeff, idealHNF_inv_Z(), Q_remove_denom(), and RgM_Rg_div().

Referenced by idealinv(), nfbezout(), and zero_nfbezout().

◆ idealHNF_inv_Z()

◆ idealHNF_mul()

◆ idealHNF_mul_two()

static GEN idealHNF_mul_two ( GEN  nf,
GEN  x,
GEN  y 
)
static

◆ idealHNF_norm_pval()

static long idealHNF_norm_pval ( GEN  x,
GEN  p,
long  Zval 
)
static

Definition at line 486 of file base4.c.

References gcoeff, lg, p, and Z_pval().

Referenced by idealHNF_Z_factor_i(), and idealval().

◆ idealhnf_principal()

◆ idealhnf_shallow()

◆ idealhnf_two()

◆ idealHNF_val()

static long idealHNF_val ( GEN  A,
GEN  P,
long  Nval,
long  Zval 
)
static

◆ idealHNF_Z_factor()

GEN idealHNF_Z_factor ( GEN  x,
GEN pvN,
GEN pvZ 
)

Definition at line 515 of file base4.c.

References idealHNF_Z_factor_i().

◆ idealHNF_Z_factor_i()

GEN idealHNF_Z_factor_i ( GEN  x,
GEN  f0,
GEN pvN,
GEN pvZ 
)

Definition at line 496 of file base4.c.

References cgetg(), f, gcoeff, gel, idealHNF_norm_pval(), itou(), lg, p, t_VECSMALL, vZ, Z_factor(), and Z_pval().

Referenced by idealHNF_factor_i(), and idealHNF_Z_factor().

◆ idealintersect()

◆ idealinv()

◆ idealismaximal()

GEN idealismaximal ( GEN  nf,
GEN  x 
)

Definition at line 2018 of file base4.c.

References avma, checknf(), gen_0, gerepilecopy(), idealismaximal_i(), and set_avma().

◆ idealismaximal_i()

◆ idealismaximal_int()

static GEN idealismaximal_int ( GEN  nf,
GEN  p 
)
static

◆ idealismaximal_mat()

static GEN idealismaximal_mat ( GEN  nf,
GEN  x 
)
static

◆ idealispower()

long idealispower ( GEN  nf,
GEN  A,
long  n,
GEN pB 
)

◆ idealmin()

GEN idealmin ( GEN  nf,
GEN  x,
GEN  vdir 
)

◆ idealmul()

◆ idealmul0()

GEN idealmul0 ( GEN  nf,
GEN  x,
GEN  y,
long  flag 
)

Definition at line 206 of file base4.c.

References idealmul(), and idealmulred().

◆ idealmul_aux()

◆ idealmulelt()

◆ idealmulpowprime()

◆ idealmulred()

GEN idealmulred ( GEN  nf,
GEN  x,
GEN  y 
)

Definition at line 2353 of file base4.c.

References _idealmulred(), avma, and gerepileupto().

Referenced by compute_fact(), expand(), expandext(), idealmul0(), and idmulred().

◆ idealnorm()

◆ idealnumden()

◆ idealpow()

◆ idealpow0()

GEN idealpow0 ( GEN  nf,
GEN  x,
GEN  n,
long  flag 
)

Definition at line 199 of file base4.c.

References idealpow(), idealpowred(), and n.

◆ idealpow_aux()

◆ idealpowprime()

◆ idealpowred()

◆ idealpows()

GEN idealpows ( GEN  nf,
GEN  ideal,
long  e 
)

◆ idealprod()

GEN idealprod ( GEN  nf,
GEN  I 
)

Definition at line 2895 of file base4.c.

References equali1(), gel, gen_1, idealmul(), and lg.

Referenced by rnfallbase(), rnfdet(), and rnfidealnormrel().

◆ idealprodprime()

GEN idealprodprime ( GEN  nf,
GEN  L 
)

Definition at line 2883 of file base4.c.

References gel, idealHNF_mul_two(), L(), lg, matid(), nf_get_degree(), and pr_hnf().

Referenced by algcenter_precompute(), and nf_coprime_part().

◆ idealprodval()

long idealprodval ( GEN  nf,
GEN  I,
GEN  pr 
)

Definition at line 2909 of file base4.c.

References equali1(), gel, idealval(), and lg.

Referenced by rnfallbase(), and rnfdisc_factored().

◆ idealred0()

◆ idealredmodpower()

GEN idealredmodpower ( GEN  nf,
GEN  x,
pari_ulong  n,
pari_ulong  B 
)

◆ idealredmodpower_i()

◆ idealsqr()

GEN idealsqr ( GEN  nf,
GEN  x 
)

Definition at line 1891 of file base4.c.

References avma, cgetg(), checknf(), ext_sqr(), gel, gerepileupto(), idealsqr_aux(), idealtyp(), and t_VEC.

Referenced by _idealsqrred(), and rnfallbase().

◆ idealsqr_aux()

◆ idealsqrprime()

static GEN idealsqrprime ( GEN  nf,
GEN  pr,
GEN pc 
)
static

Definition at line 1840 of file base4.c.

References f, FpC_red(), gen_0, gen_1, mkvec2(), nf_get_degree(), nfsqr(), p, pr_get_e(), pr_get_f(), pr_get_gen(), pr_get_p(), and sqri().

Referenced by idealpowprime(), and idealsqr_aux().

◆ idealsqrtn_int()

◆ idealtwoelt()

◆ idealtwoelt0()

GEN idealtwoelt0 ( GEN  nf,
GEN  x,
GEN  a 
)

Definition at line 192 of file base4.c.

References idealtwoelt(), and idealtwoelt2().

◆ idealtwoelt2()

◆ idealtyp()

◆ idealval()

◆ in_ideal()

static int in_ideal ( GEN  x,
GEN  a 
)
static

Definition at line 3048 of file base4.c.

References dvdii(), gcoeff, hnf_invimage(), RgV_is_ZV(), t_COL, t_INT, and typ.

Referenced by idealtwoelt2().

◆ isideal()

◆ lcmuu()

static pari_ulong lcmuu ( pari_ulong  a,
pari_ulong  b 
)
static

Definition at line 2798 of file base4.c.

References ugcd(), and ulong.

Referenced by Fl_invgen().

◆ make_integral()

GEN make_integral ( GEN  nf,
GEN  L0,
GEN  f,
GEN  listpr 
)

◆ mat_ideal_two_elt()

◆ mat_ideal_two_elt2()

static GEN mat_ideal_two_elt2 ( GEN  nf,
GEN  x,
GEN  a 
)
static

Definition at line 3034 of file base4.c.

References gel, idealapprfact_i(), idealfactor(), idealval(), lg, and stoi().

Referenced by idealtwoelt2().

◆ matreduce()

◆ nf_coprime_part()

static GEN nf_coprime_part ( GEN  nf,
GEN  x,
GEN  listpr 
)
static

◆ nf_get_Gtwist()

GEN nf_get_Gtwist ( GEN  nf,
GEN  vdir 
)

◆ nf_get_Gtwist1()

GEN nf_get_Gtwist1 ( GEN  nf,
long  i 
)

Definition at line 2557 of file base4.c.

References nf_get_G(), nf_get_r1(), RgM_shallowcopy(), RM_round_maxrank(), and twistG().

Referenced by SPLIT().

◆ nf_remove_denom_p()

static GEN nf_remove_denom_p ( GEN  nf,
GEN  x,
GEN  p,
GEN pdx,
long *  pv 
)
static

Definition at line 1573 of file base4.c.

References isint1(), nf_to_scalar_or_basis(), p, Q_remove_denom(), Z_pvalrem(), and zk_pvalrem().

Referenced by famat_makecoprime().

◆ nf_to_Fp_coprime()

GEN nf_to_Fp_coprime ( GEN  nf,
GEN  x,
GEN  modpr 
)

Definition at line 1561 of file base4.c.

References famat_to_Fp_coprime(), t_MAT, to_Fp_coprime(), and typ.

Referenced by nf_to_logFl(), and primecertify().

◆ nfdivmodpr()

GEN nfdivmodpr ( GEN  nf,
GEN  x,
GEN  y,
GEN  modpr 
)

Definition at line 3126 of file base4.c.

References avma, checknf(), gerepileupto(), nfdiv(), and nfreducemodpr().

◆ nfkermodpr()

GEN nfkermodpr ( GEN  nf,
GEN  x,
GEN  modpr 
)

◆ nfmulmodpr()

GEN nfmulmodpr ( GEN  nf,
GEN  x,
GEN  y,
GEN  modpr 
)

Definition at line 3113 of file base4.c.

References algtobasis(), avma, checknf(), Fq_mul(), Fq_to_nf(), gerepileupto(), nf_to_Fq(), nf_to_Fq_init(), and p.

◆ nfpowmodpr()

GEN nfpowmodpr ( GEN  nf,
GEN  x,
GEN  k,
GEN  modpr 
)

Definition at line 3134 of file base4.c.

References algtobasis(), avma, checknf(), Fq_pow(), Fq_to_nf(), gerepileupto(), nf_to_Fq(), nf_to_Fq_init(), and p.

◆ nfsolvemodpr()

GEN nfsolvemodpr ( GEN  nf,
GEN  a,
GEN  b,
GEN  pr 
)

◆ not_in_ideal()

static void not_in_ideal ( GEN  a)
static

Definition at line 3043 of file base4.c.

References gen_0, and pari_err_DOMAIN().

Referenced by idealtwoelt2().

◆ ok_elt()

static int ok_elt ( GEN  x,
GEN  xZ,
GEN  y 
)
static

Definition at line 310 of file base4.c.

References avma, gc_bool(), ZM_equal(), and ZM_hnfmodid().

Referenced by get_random_a().

◆ p_makecoprime()

static GEN p_makecoprime ( GEN  pr)
static

Definition at line 1596 of file base4.c.

References gel, powiu(), pr_get_e(), pr_get_p(), pr_get_tau(), t_INT, typ, ZC_Z_divexact(), and ZM_ZC_mul().

Referenced by famat_makecoprime(), and sunits_makecoprime().

◆ pr_hnf()

◆ pr_inv()

GEN pr_inv ( GEN  pr)

Definition at line 2059 of file base4.c.

References ginv(), p, pr_get_f(), pr_get_p(), pr_get_tau(), pr_is_inert(), RgM_Rg_div(), scalarmat(), and ZM_hnfmodid().

Referenced by idealinv(), and rnfmaxord().

◆ pr_inv_p()

GEN pr_inv_p ( GEN  pr)

Definition at line 2053 of file base4.c.

References matid(), pr_get_f(), pr_get_p(), pr_get_tau(), pr_is_inert(), and ZM_hnfmodid().

Referenced by idealred0(), and rnfdedekind_i().

◆ pr_uniformizer()

GEN pr_uniformizer ( GEN  pr,
GEN  F 
)

◆ prV_e_muls()

static GEN prV_e_muls ( GEN  L,
long  c 
)
static

Definition at line 671 of file base4.c.

References cgetg(), gel, L(), lg, pr_get_e(), stoi(), and t_COL.

Referenced by Q_nffactor().

◆ prV_lcm_capZ()

GEN prV_lcm_capZ ( GEN  L)

Definition at line 2955 of file base4.c.

References dvdii(), gel, gen_1, L(), lg, mulii(), p, and pr_get_p().

Referenced by bnr_grp(), and idealapprfact_i().

◆ Q_nffactor()

static GEN Q_nffactor ( GEN  nf,
GEN  y,
pari_ulong  lim 
)
static

◆ ramified_root()

static GEN ramified_root ( GEN  nf,
GEN  R,
GEN  A,
long  n 
)
static

Definition at line 779 of file base4.c.

References cgetg(), gel, idealfactor(), idealfactorback(), idealval(), lg, n, and t_VECSMALL.

Referenced by idealsqrtn_int().

◆ ramified_root_simple()

static int ramified_root_simple ( GEN  nf,
long  n,
GEN  P,
GEN  v 
)
static

Definition at line 793 of file base4.c.

References gel, idealprimedec(), lg, n, and pr_get_e().

Referenced by idealsqrtn_int().

◆ RM_round_maxrank()

GEN RM_round_maxrank ( GEN  G0)

Definition at line 2566 of file base4.c.

References avma, gmul2n(), ground(), lg, set_avma(), and ZM_rank().

Referenced by nf_get_Gtwist(), nf_get_Gtwist1(), and nfmaxord_to_nf().

◆ sunits_makecoprime()

GEN sunits_makecoprime ( GEN  X,
GEN  pr,
GEN  prk 
)

◆ to_famat()

GEN to_famat ( GEN  x,
GEN  y 
)

Definition at line 1166 of file base4.c.

References mkcolcopy(), and retmkmat2.

Referenced by famat_inv(), famat_pow(), and famat_sqr().

◆ to_famat_shallow()

◆ to_Fp_coprime()

static GEN to_Fp_coprime ( GEN  nf,
GEN  x,
GEN  modpr 
)
static

◆ trivial_merge()

static GEN trivial_merge ( GEN  x)
static

Definition at line 992 of file base4.c.

References gcoeff, gen_1, is_pm1(), and lg.

Referenced by _idealaddtoone().

◆ twistG()

static void twistG ( GEN  G,
long  r1,
long  i,
long  v 
)
static

Definition at line 2517 of file base4.c.

References gcoeff, gmul2n(), and lg.

Referenced by nf_get_Gtwist(), and nf_get_Gtwist1().

◆ u_ppo()

◆ vec_mulid()

static GEN vec_mulid ( GEN  nf,
GEN  x,
long  nx,
long  N 
)
static

Definition at line 123 of file base4.c.

References cgetg(), gel, t_MAT, and zk_ei_mul().

Referenced by idealhnf_shallow().

◆ vecdiv()

GEN vecdiv ( GEN  x,
GEN  y 
)

Definition at line 1726 of file base4.c.

References gdiv(), gel, is_scalar_t(), pari_APPLY_same, and typ.

Referenced by do_SWAP(), and rnflllgram().

◆ vecinv()

GEN vecinv ( GEN  x)

Definition at line 1712 of file base4.c.

References gel, ginv(), is_scalar_t(), pari_APPLY_same, and typ.

◆ vecmul()

GEN vecmul ( GEN  x,
GEN  y 
)

Definition at line 1705 of file base4.c.

References gel, gmul(), is_scalar_t(), pari_APPLY_same, and typ.

Referenced by do_SWAP(), RED(), rnflllgram(), and set_mulid().

◆ vecpow()

GEN vecpow ( GEN  x,
GEN  n 
)

Definition at line 1719 of file base4.c.

References gel, is_scalar_t(), n, pari_APPLY_same, powgi(), and typ.

◆ Z_cba()

GEN Z_cba ( GEN  a,
GEN  b 
)

Definition at line 2740 of file base4.c.

References expi(), is_pm1(), L(), vectrunc_append(), vectrunc_init(), and Z_cba_rec().

Referenced by poldiscfactors_i(), Z_gcd_primes(), ZV_cba(), and ZV_cba_extend().

◆ Z_cba_rec()

static GEN Z_cba_rec ( GEN  L,
GEN  a,
GEN  b 
)
static

Definition at line 2724 of file base4.c.

References diviiexact(), gcdii(), gel, is_pm1(), L(), lg, vectrunc_append(), and Z_dcba_rec().

Referenced by Z_cba().

◆ Z_dcba_rec()

static void Z_dcba_rec ( GEN  L,
GEN  a,
GEN  b 
)
static

Definition at line 2692 of file base4.c.

References diviiexact(), gcdii(), gel, is_pm1(), L(), mulii(), n, sqri(), vectrunc_append(), Z_ppgle(), and Z_ppio().

Referenced by Z_cba_rec().

◆ Z_ppgle()

GEN Z_ppgle ( GEN  a,
GEN  b 
)

Definition at line 2679 of file base4.c.

References diviiexact(), equalii(), gcdii(), gen_1, is_pm1(), mkvec3(), and mulii().

Referenced by Z_dcba_rec().

◆ Z_ppio()

GEN Z_ppio ( GEN  a,
GEN  b 
)

Definition at line 2663 of file base4.c.

References diviiexact(), gcdii(), gen_1, is_pm1(), mkvec3(), and mulii().

Referenced by Z_dcba_rec(), Z_gcd_primes(), and znchargauss().

◆ Z_ppo()

GEN Z_ppo ( GEN  x,
GEN  f 
)

◆ zk_pvalrem()

static long zk_pvalrem ( GEN  x,
GEN  p,
GEN py 
)
static

Definition at line 1568 of file base4.c.

References p, t_INT, typ, Z_pvalrem(), and ZV_pvalrem().

Referenced by nf_remove_denom_p().

◆ ZM_famat_limit()

GEN ZM_famat_limit ( GEN  fa,
GEN  limit 
)

Definition at line 1494 of file base4.c.

References avma, cgetg(), cmpii(), gel, gen_1, gerepileuptoint(), lg, lgcols(), mkmat2(), mulii(), n, powii(), and t_COL.

Referenced by F2xq_log(), Flxq_log(), and Fp_log().

◆ ZV_cba()

GEN ZV_cba ( GEN  v)

Definition at line 2763 of file base4.c.

References gel, lg, Z_cba(), and ZV_cba_extend().

◆ ZV_cba_extend()

GEN ZV_cba_extend ( GEN  P,
GEN  b 
)

Definition at line 2749 of file base4.c.

References cgetg(), gel, lg, shallowconcat1(), t_VEC, vecslice(), and Z_cba().

Referenced by ZV_cba().