class_docstr: Create the following Elliptic Curve over domain.
  
  `y^{2} + a_{1} x y + a_{3} y = x^{3} + a_{2} x^{2} + a_{4} x + a_{6}`
  
  The default domain is ``QQ``. If no coefficient ``a1``, ``a2``, ``a3``,
  is given then it creates a curve with the following form:
  
  `y^{2} = x^{3} + a_{4} x + a_{6}`
  
  Examples
  ========
  
  References
  ==========
  
  .. [1] J. Silverman "A Friendly Introduction to Number Theory" Third Edition
  .. [2] https://mathworld.wolfram.com/EllipticDiscriminant.html
  .. [3] G. Hardy, E. Wright "An Introduction to the Theory of Numbers" Sixth Edition
class_docstr_tok: ["Create","the","following","Elliptic","Curve","over","domain",".","`","y^","{","2","}","+","a_","{","1","}","x","y","+","a_","{","3","}","y","=","x^","{","3","}","+","a_","{","2","}","x^","{","2","}","+","a_","{","4","}","x","+","a_","{","6","}","`","The","default","domain","is","``","QQ","``",".","If","no","coefficient","``","a1","``",",","``","a2","``",",","``","a3","``",",","is","given","then","it","creates","a","curve","with","the","following","form",":","`","y^","{","2","}","=","x^","{","3","}","+","a_","{","4","}","x","+","a_","{","6","}","`","Examples","========","References","==========","..","[","1","]","J.","Silverman","``","A","Friendly","Introduction","to","Number","Theory","''","Third","Edition","..","[","2","]","https",":","\/\/mathworld.wolfram.com\/EllipticDiscriminant.html","..","[","3","]","G.","Hardy",",","E.","Wright","``","An","Introduction","to","the","Theory","of","Numbers","''","Sixth","Edition"]
code: def __init__(self, a4, a6, a1=0, a2=0, a3=0, modulus=0):
      if modulus == 0:
          domain = QQ
      else:
          domain = FF(modulus)
      a1, a2, a3, a4, a6 = map(domain.convert, (a1, a2, a3, a4, a6))
      self._domain = domain
      self.modulus = modulus
      # Calculate discriminant
      b2 = a1**2 + 4 * a2
      b4 = 2 * a4 + a1 * a3
      b6 = a3**2 + 4 * a6
      b8 = (
          a1**2 * a6
          + 4 * a2 * a6
          - a1 * a3 * a4
          + a2 * a3**2
          - a4**2
      )
      self._b2, self._b4, self._b6, self._b8 = b2, b4, b6, b8
      self._discrim = (
          -(b2**2) * b8
          - 8 * b4**3
          - 27 * b6**2
          + 9 * b2 * b4 * b6
      )
      self._a1 = a1
      self._a2 = a2
      self._a3 = a3
      self._a4 = a4
      self._a6 = a6
      x, y, z = symbols("x y z")
      self.x, self.y, self.z = x, y, z
      self._poly = Poly(
          y**2 * z
          + a1 * x * y * z
          + a3 * y * z**2
          - x**3
          - a2 * x**2 * z
          - a4 * x * z**2
          - a6 * z**3,
          domain=domain,
      )
      if isinstance(self._domain, FiniteField):
          self._rank = 0
      elif isinstance(self._domain, RationalField):
          self._rank = None
  
imports: from sympy.core.numbers import oo
  from sympy.core.symbol import symbols
  from sympy.polys.domains import FiniteField, QQ, RationalField, FF
  from sympy.polys.polytools import Poly
  from sympy.solvers.solvers import solve
  from sympy.utilities.iterables import is_sequence
  from sympy.utilities.misc import as_int
  from .factor_ import divisors
  from .residue_ntheory import polynomial_congruence
label_desc: Use image node_id 1 to create a new EllipticCurve object  with example: obj = EllipticCurve(a4, a6, a1, a2, a3, modulus)