Skip to content

Reduce overhead for relative number field elements #18740

@pjbruin

Description

@pjbruin

We should use the PARI functions wrapped in #18739 to avoid initialisation of PARI rnf structures when only doing simple arithmetic in relative number fields.

Summary of changes:

  • new method NumberFieldElement._pari_polynomial;
  • replace the method _pari_rnfequation of NumberField_relative by _pari_rnfeq, which calls the PARI function nf_rnfeq (which returns slightly more information than rnfequation);
  • replace K.pari_rnf().rnfeltreltoabs(x) by K._pari_rnfeq().eltreltoabs(x) and similar;
  • remove the misleadingly named (and now obsolete) method NumberField_relative._rnfeltreltoabs, which only did something meaningful for elements in the base field;
  • merge NumberField_relative.pari_polynomial into NumberField_generic.pari_polynomial.

Depends on #18727
Depends on #18739

Component: number fields

Keywords: relative number field pari

Author: Peter Bruin

Branch/Commit: e59e8ec

Reviewer: Vincent Delecroix

Issue created by migration from https://trac.sagemath.org/ticket/18740

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions