class_docstr: Abstract base class for the domain :ref:`QQ`.
  
  The :py:class:`RationalField` class represents the field of rational
  numbers $\mathbb{Q}$ as a :py:class:`~.Domain` in the domain system.
  :py:class:`RationalField` is a superclass of
  :py:class:`PythonRationalField` and :py:class:`GMPYRationalField` one of
  which will be the implementation for :ref:`QQ` depending on whether either
  of ``gmpy`` or ``gmpy2`` is installed or not.
  
  See also
  ========
  
  Domain
class_docstr_tok: ["Abstract","base","class","for","the","domain",":","ref",":","`","QQ","`",".","The",":","py",":","class",":","`","RationalField","`","class","represents","the","field","of","rational","numbers","$","\\mathbb","{","Q","}","$","as","a",":","py",":","class",":","`","~.Domain","`","in","the","domain","system",".",":","py",":","class",":","`","RationalField","`","is","a","superclass","of",":","py",":","class",":","`","PythonRationalField","`","and",":","py",":","class",":","`","GMPYRationalField","`","one","of","which","will","be","the","implementation","for",":","ref",":","`","QQ","`","depending","on","whether","either","of","``","gmpy","``","or","``","gmpy2","``","is","installed","or","not",".","See","also","========","Domain"]
docstr: Returns an algebraic field, i.e. `\mathbb{Q}(\alpha, \ldots)`.
  
  Parameters
  ==========
  
  *extension : One or more :py:class:`~.Expr`
      Generators of the extension. These should be expressions that are
      algebraic over `\mathbb{Q}`.
  
  alias : str, :py:class:`~.Symbol`, None, optional (default=None)
      If provided, this will be used as the alias symbol for the
      primitive element of the returned :py:class:`~.AlgebraicField`.
  
  Returns
  =======
  
  :py:class:`~.AlgebraicField`
      A :py:class:`~.Domain` representing the algebraic field extension.
  
  Examples
  ========
  
  >>> from sympy import QQ, sqrt
  >>> QQ.algebraic_field(sqrt(2))
  QQ<sqrt(2)>
docstr_tok: ["Returns","an","algebraic","field",",","i.e",".","`","\\mathbb","{","Q","}","(","\\alpha",",","\\ldots",")","`",".","Parameters","==========","*","extension",":","One","or","more",":","py",":","class",":","`","~.Expr","`","Generators","of","the","extension",".","These","should","be","expressions","that","are","algebraic","over","`","\\mathbb","{","Q","}","`",".","alias",":","str",",",":","py",":","class",":","`","~.Symbol","`",",","None",",","optional","(","default=None",")","If","provided",",","this","will","be","used","as","the","alias","symbol","for","the","primitive","element","of","the","returned",":","py",":","class",":","`","~.AlgebraicField","`",".","Returns","=======",":","py",":","class",":","`","~.AlgebraicField","`","A",":","py",":","class",":","`","~.Domain","`","representing","the","algebraic","field","extension",".","Examples","========",">",">",">","from","sympy","import","QQ",",","sqrt",">",">",">","QQ.algebraic_field","(","sqrt","(","2",")",")","QQ","<","sqrt","(","2",")",">"]
code: def algebraic_field(self, *extension, alias=None):
      r"""Returns an algebraic field, i.e. `\mathbb{Q}(\alpha, \ldots)`.
  
      Parameters
      ==========
  
      *extension : One or more :py:class:`~.Expr`
          Generators of the extension. These should be expressions that are
          algebraic over `\mathbb{Q}`.
  
      alias : str, :py:class:`~.Symbol`, None, optional (default=None)
          If provided, this will be used as the alias symbol for the
          primitive element of the returned :py:class:`~.AlgebraicField`.
  
      Returns
      =======
  
      :py:class:`~.AlgebraicField`
          A :py:class:`~.Domain` representing the algebraic field extension.
  
      Examples
      ========
  
      >>> from sympy import QQ, sqrt
      >>> QQ.algebraic_field(sqrt(2))
      QQ<sqrt(2)>
      """
      from sympy.polys.domains import AlgebraicField
  
      return AlgebraicField(self, *extension, alias=alias)
  
imports: from sympy.external.gmpy import MPQ
  from sympy.polys.domains.groundtypes import SymPyRational, is_square, sqrtrem
  from sympy.polys.domains.characteristiczero import CharacteristicZero
  from sympy.polys.domains.field import Field
  from sympy.polys.domains.simpledomain import SimpleDomain
  from sympy.polys.polyerrors import CoercionFailed
  from sympy.utilities import public
label_desc: Use image node_id 7 for calling the RationalField obj's underlying member method code with example usage: obj.algebraic_field() and returns: AlgebraicField