Module Pari.Number_field

type t
type elt = number_field ty
val create : Rational.t Polynomial.t -> t

create p returns the number field Q(X)/(p) for a monic irreducible polynomial p over the field Q of the rationals.

val are_isomorphic : t -> t -> bool

are_isomorphic a b returns true if and only if number fields a and b are isomorphic.

# let q =
  Polynomial.create
    [|
      Rational.of_int 1;
      Rational.of_int (-111);
      Rational.of_int 6064;
      Rational.of_int (-189804);
    |];;
val q : Rational.t Polynomial.t = <abstr>
# let zero = Polynomial.create [| Rational.of_int 0 |];;
val zero : Rational.t Polynomial.t = <abstr>
# let qq = Polynomial.create [| q; q; zero; zero |];;
val qq : Rational.t Polynomial.t Polynomial.t = <abstr>
# Polynomial.to_string qq;;
- : string =
"(x^3 - 111*x^2 + 6064*x - 189804)*y^3 + (x^3 - 111*x^2 + 6064*x - 189804)*y^2"
# Polynomial.is_irreducible q;;
- : bool = true
# let qmin = Polynomial.minimal q;;
val qmin : Rational.t Polynomial.t = <abstr>
# Polynomial.to_string qmin;;
- : string = "x^3 - x^2 - 60*x - 364"
# Number_field.(are_isomorphic (create q) (create qmin));;
- : bool = true
val sign : t -> Signed.Long.t * Signed.Long.t
val discriminant : t -> Integer.t
val z_basis : t -> (elt, [ `ROW ]) Vector.t
val elt : Rational.t array -> elt
val add : t -> elt -> elt -> elt
val mul : t -> elt -> elt -> elt
val equal : elt -> elt -> bool
val divrem : t -> elt -> elt -> elt * elt

divrem nf a b returns the pair (divisor, remainder) from the euclidean division of a by b.

# let gaussian_integers =
  (* Gaussian integers: the ring Z[i] (here we work in the field Q(i)) *)
  Number_field.create
  (Polynomial.create [| Rational.of_int 1; Rational.of_int 0; Rational.of_int 1 |]);;
val gaussian_integers : Number_field.t = <abstr>
# let a = Number_field.elt [| Rational.of_int 6; Rational.of_int 8 |];;
val a : Number_field.elt = <abstr>
# let b = Number_field.elt [| Rational.of_int 1; Rational.of_int 5 |];;
val b : Number_field.elt = <abstr>
# let q, r = (* Euclidean division of 6 + 8i by 1 + 5i. *)
  Number_field.divrem gaussian_integers a b;;
val q : Number_field.elt = <abstr>
val r : Number_field.elt = <abstr>
# Number_field.(equal a (add gaussian_integers (mul gaussian_integers b q) r));;
- : bool = true
val ideal_norm : t -> elt -> Integer.t
val splitting : [< `F of t | `P of Integer.t Polynomial.t ] -> Integer.t Polynomial.t

splitting (nf|p) given the number field nf = Q(x)/(p) or polynomial p, returns the polynomial over Q for the splitting field of p, that is the smallest field over which p is totally split.

val nf_get_allroots : 'a ty -> 'a ty
val nf_get_prec : 'a ty -> Signed.long
val nfmaxord_to_nf : nfmaxord_t Ctypes.structure Ctypes_static.ptr -> 'a ty -> Signed.long -> 'a ty
val nfcertify : 'a ty -> 'a ty
val nfgaloismatrix : 'a ty -> 'a ty -> 'a ty
val nfgaloismatrixapply : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfgaloispermtobasis : 'a ty -> 'a ty -> 'a ty
val nfinit_basic : nfmaxord_t Ctypes.structure Ctypes_static.ptr -> 'a ty -> unit
val nfinit_complete : nfmaxord_t Ctypes.structure Ctypes_static.ptr -> Signed.long -> Signed.long -> 'a ty
val nfinit0 : 'a ty -> Signed.long -> Signed.long -> 'a ty
val nfinitred : 'a ty -> Signed.long -> 'a ty
val nfinitred2 : 'a ty -> Signed.long -> 'a ty
val nfisincl0 : 'a ty -> 'a ty -> Signed.long -> 'a ty
val nfisisom : 'a ty -> 'a ty -> 'a ty
val nfnewprec : 'a ty -> Signed.long -> 'a ty
val nfnewprec_shallow : 'a ty -> Signed.long -> 'a ty
val nfpoleval : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfsplitting0 : 'a ty -> 'a ty -> Signed.long -> 'a ty
val nftyp : 'a ty -> Signed.long
val nfgrunwaldwang : 'a ty -> 'a ty -> 'a ty -> 'a ty -> Signed.long -> 'a ty
val nfgwkummer : 'a ty -> 'a ty -> 'a ty -> 'a ty -> Signed.long -> 'a ty
val mf_get_m : 'a ty -> 'a ty
val mf_get_mindex : 'a ty -> 'a ty
val mf_get_minv : 'a ty -> 'a ty
val mf_get_basis : 'a ty -> 'a ty
val mf_get_dim : 'a ty -> Signed.long
val mf_get_e : 'a ty -> 'a ty
val mf_get_fields : 'a ty -> 'a ty
val mf_get_newforms : 'a ty -> 'a ty
val mf_get_space : 'a ty -> Signed.long
val mf_get_s : 'a ty -> 'a ty
val mfcusp_get_vmjd : 'a ty -> 'a ty
val mfnew_get_vj : 'a ty -> 'a ty
val nf_to_fq_init : 'a ty -> 'a ty Ctypes_static.ptr -> 'a ty Ctypes_static.ptr -> 'a ty Ctypes_static.ptr -> 'a ty
val nf_to_fq : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfm_to_fqm : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfv_to_fqv : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfx_to_fqx : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfx_to_monic : 'a ty -> 'a ty -> 'a ty Ctypes_static.ptr -> 'a ty
val nfbasis : 'a ty -> 'a ty Ctypes_static.ptr -> 'a ty
val nfcompositum : 'a ty -> 'a ty -> 'a ty -> Signed.long -> 'a ty
val nfdiscfactors : 'a ty -> 'a ty
val nfmaxord : nfmaxord_t Ctypes.structure Ctypes_static.ptr -> 'a ty -> Signed.long -> unit
val nfmodpr : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfmodprinit : 'a ty -> 'a ty -> 'a ty
val nfmodprinit0 : 'a ty -> 'a ty -> Signed.long -> 'a ty
val nfmodprlift : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfreducemodpr : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfdisc : 'a ty -> 'a ty
val nf_to_scalar_or_alg : 'a ty -> 'a ty -> 'a ty
val nf_to_scalar_or_basis : 'a ty -> 'a ty -> 'a ty
val nf_cxlog : 'a ty -> 'a ty -> Signed.long -> 'a ty
val nfv_cxlog : 'a ty -> 'a ty -> Signed.long -> 'a ty
val nfchecksigns : 'a ty -> 'a ty -> 'a ty -> int
val nfdiv : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfdiveuc : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfembed : 'a ty -> 'a ty -> Signed.long -> 'a ty
val nfeltembed : 'a ty -> 'a ty -> 'a ty -> Signed.long -> 'a ty
val nfeltembed_i : 'a ty Ctypes_static.ptr -> 'a ty -> 'a ty -> Signed.long -> 'a ty
val nfeltsign : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nffactorback : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfinv : 'a ty -> 'a ty -> 'a ty
val nfinvmodideal : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfissquare : 'a ty -> 'a ty -> 'a ty Ctypes_static.ptr -> Signed.long
val nfispower : 'a ty -> 'a ty -> Signed.long -> 'a ty Ctypes_static.ptr -> Signed.long
val nflogembed : 'a ty -> 'a ty -> 'a ty Ctypes_static.ptr -> Signed.long -> 'a ty
val nfm_det : 'a ty -> 'a ty -> 'a ty
val nfm_inv : 'a ty -> 'a ty -> 'a ty
val nfm_ker : 'a ty -> 'a ty -> 'a ty
val nfm_mul : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfm_nfc_mul : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfmod : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfmuli : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfnorm : 'a ty -> 'a ty -> 'a ty
val nfpolsturm : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfpow : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfpow_u : 'a ty -> 'a ty -> pari_ulong -> 'a ty
val nfpowmodideal : 'a ty -> 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfsign : 'a ty -> 'a ty -> 'a ty
val nfsign_arch : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfsign_from_logarch : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfsqr : 'a ty -> 'a ty -> 'a ty
val nfsqri : 'a ty -> 'a ty -> 'a ty
val nfsub : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nftrace : 'a ty -> 'a ty -> 'a ty
val nfval : 'a ty -> 'a ty -> 'a ty -> Signed.long
val nfvalrem : 'a ty -> 'a ty -> 'a ty -> 'a ty Ctypes_static.ptr -> Signed.long
val nf_get_varn : 'a ty -> Signed.long
val nf_get_pol : 'a ty -> 'a ty
val nf_get_degree : 'a ty -> Signed.long
val nf_get_r1 : 'a ty -> Signed.long
val nf_get_r2 : 'a ty -> Signed.long
val nf_get_index : 'a ty -> 'a ty
val nf_get_m : 'a ty -> 'a ty
val nf_get_g : 'a ty -> 'a ty
val nf_get_roundg : 'a ty -> 'a ty
val nf_get_tr : 'a ty -> 'a ty
val nf_get_diff : 'a ty -> 'a ty
val nf_get_ramified_primes : 'a ty -> 'a ty
val nf_get_roots : 'a ty -> 'a ty
val nf_get_zkprimpart : 'a ty -> 'a ty
val nf_get_zkden : 'a ty -> 'a ty
val nf_get_invzk : 'a ty -> 'a ty
val nfv_to_scalar_or_alg : 'a ty -> 'a ty -> 'a ty
val nfc_multable_mul : 'a ty -> 'a ty -> 'a ty
val nfc_nf_mul : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nf_get_gtwist : 'a ty -> 'a ty -> 'a ty
val nf_get_gtwist1 : 'a ty -> Signed.long -> 'a ty
val nf_to_fp_coprime : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfdetint : 'a ty -> 'a ty -> 'a ty
val nfdivmodpr : 'a ty -> 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfhnf : 'a ty -> 'a ty -> 'a ty
val nfhnf0 : 'a ty -> 'a ty -> Signed.long -> 'a ty
val nfhnfmod : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfkermodpr : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfmulmodpr : 'a ty -> 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfpowmodpr : 'a ty -> 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfreduce : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfsnf : 'a ty -> 'a ty -> 'a ty
val nfsnf0 : 'a ty -> 'a ty -> Signed.long -> 'a ty
val nfsolvemodpr : 'a ty -> 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfsubfields : 'a ty -> Signed.long -> 'a ty
val nfsubfields0 : 'a ty -> Signed.long -> Signed.long -> 'a ty
val nfsubfieldscm : 'a ty -> Signed.long -> 'a ty
val nfsubfieldsmax : 'a ty -> Signed.long -> 'a ty
val nflist : 'a ty -> 'a ty -> Signed.long -> 'a ty -> 'a ty
val nfresolvent : 'a ty -> Signed.long -> 'a ty
val nf_pv_to_prv : 'a ty -> 'a ty -> 'a ty
val nf_rnfeq : 'a ty -> 'a ty -> 'a ty
val nf_rnfeqsimple : 'a ty -> 'a ty -> 'a ty
val nf_nfzk : 'a ty -> 'a ty -> 'a ty
val nfeltup : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfislocalpower : 'a ty -> 'a ty -> 'a ty -> 'a ty -> Signed.long
val nf_cxlog_normalize : 'a ty -> 'a ty -> Signed.long -> 'a ty
val nfcyclotomicunits : 'a ty -> 'a ty -> 'a ty
val nfsign_units : 'a ty -> 'a ty -> int -> 'a ty
val nfsign_tu : 'a ty -> 'a ty -> 'a ty
val nfsign_fu : 'a ty -> 'a ty -> 'a ty
val nf_deg1_prime : 'a ty -> 'a ty
val nfarchstar : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nf_hyperell_locally_soluble : 'a ty -> 'a ty -> 'a ty -> Signed.long
val nfhilbert : 'a ty -> 'a ty -> 'a ty -> Signed.long
val nfhilbert0 : 'a ty -> 'a ty -> 'a ty -> 'a ty -> Signed.long
val nfhyperellpadicfrobenius : 'a ty -> 'a ty -> pari_ulong -> Signed.long -> 'a ty
val nffactor : 'a ty -> 'a ty -> 'a ty
val nffactormod : 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfgcd : 'a ty -> 'a ty -> 'a ty -> 'a ty -> 'a ty
val nfgcd_all : 'a ty -> 'a ty -> 'a ty -> 'a ty -> 'a ty Ctypes_static.ptr -> 'a ty
val nfissquarefree : 'a ty -> 'a ty -> int
val nfroots : 'a ty -> 'a ty -> 'a ty
val nfroots_if_split : 'a ty Ctypes_static.ptr -> 'a ty -> 'a ty
val nfrootsof1 : 'a ty -> 'a ty
val nfrootsq : 'a ty -> 'a ty
val nfx_disc : 'a ty -> 'a ty -> 'a ty
val nfx_resultant : 'a ty -> 'a ty -> 'a ty -> 'a ty
module Infix : sig ... end