Unique factorization domains - Category Framework

Skip to content
Back to top
View this page
Edit this page

# Unique factorization domains

class sage.categories.unique_factorization_domains.UniqueFactorizationDomains

  Bases: `Category_singleton`

  The category of (constructive) unique factorization domains.

  In a constructive unique factorization domain we can constructively factor members into a product of a finite number of irreducible elements.

  EXAMPLES:

  Sage

      sage: UniqueFactorizationDomains()
      Category of unique factorization domains
      sage: UniqueFactorizationDomains().super_categories()
      [Category of gcd domains]

  Python

      >>> from sage.all import *
      >>> UniqueFactorizationDomains()
      Category of unique factorization domains
      >>> UniqueFactorizationDomains().super_categories()
      [Category of gcd domains]

  class ElementMethods

    Bases: `object`

    radical(*args, **kwds)

      Return the radical of this element, i.e. the product of its irreducible factors.

      This default implementation calls `squarefree_decomposition` if available, and `factor` otherwise.

      See also

      `squarefree_part()`

      EXAMPLES:

      Sage

          sage: Pol.<x> = QQ[]
          sage: (x^2*(x-1)^3).radical()
          x^2 - x
          sage: pol = 37 * (x-1)^3 * (x-2)^2 * (x-1/3)^7 * (x-3/7)
          sage: pol.radical()
          37*x^4 - 2923/21*x^3 + 1147/7*x^2 - 1517/21*x + 74/7

          sage: Integer(10).radical()
          10
          sage: Integer(-100).radical()
          10
          sage: Integer(0).radical()
          Traceback (most recent call last):
          ...
          ArithmeticError: radical of 0 is not defined

      Python

          >>> from sage.all import *
          >>> Pol = QQ['x']; (x,) = Pol._first_ngens(1)
          >>> (x**Integer(2)*(x-Integer(1))**Integer(3)).radical()
          x^2 - x
          >>> pol = Integer(37) * (x-Integer(1))**Integer(3) * (x-Integer(2))**Integer(2) * (x-Integer(1)/Integer(3))**Integer(7) * (x-Integer(3)/Integer(7))
          >>> pol.radical()
          37*x^4 - 2923/21*x^3 + 1147/7*x^2 - 1517/21*x + 74/7

          >>> Integer(Integer(10)).radical()
          10
          >>> Integer(-Integer(100)).radical()
          10
          >>> Integer(Integer(0)).radical()
          Traceback (most recent call last):
          ...
          ArithmeticError: radical of 0 is not defined

      The next example shows how to compute the radical of a number, assuming no prime > 100000 has exponent > 1 in the factorization:

      Sage

          sage: n = 2^1000-1; n / radical(n, limit=100000)
          125

      [Python]

          >>> from sage.all import *
          >>> n = Integer(2)**Integer(1000)-Integer(1); n / radical(n, limit=Integer(100000))
          125

    squarefree_part()

      Return the square-free part of this element, i.e. the product of its irreducible factors appearing with odd multiplicity.

      This default implementation calls `squarefree_decomposition`.

      See also

      `radical()`

      EXAMPLES:

      Sage

          sage: Pol.<x> = QQ[]
          sage: (x^2*(x-1)^3).squarefree_part()
          x - 1
          sage: pol = 37 * (x-1)^3 * (x-2)^2 * (x-1/3)^7 * (x-3/7)
          sage: pol.squarefree_part()
          37*x^3 - 1369/21*x^2 + 703/21*x - 37/7

      Python

          >>> from sage.all import *
          >>> Pol = QQ['x']; (x,) = Pol._first_ngens(1)
          >>> (x**Integer(2)*(x-Integer(1))**Integer(3)).squarefree_part()
          x - 1
          >>> pol = Integer(37) * (x-Integer(1))**Integer(3) * (x-Integer(2))**Integer(2) * (x-Integer(1)/Integer(3))**Integer(7) * (x-Integer(3)/Integer(7))
          >>> pol.squarefree_part()
          37*x^3 - 1369/21*x^2 + 703/21*x - 37/7

  class ParentMethods

    Bases: `object`

    is_unique_factorization_domain(proof=True)

      Return `True`, since this in an object of the category of unique factorization domains.

      EXAMPLES:

      Sage

          sage: UFD = UniqueFactorizationDomains()
          sage: Parent(QQ, category=UFD).is_unique_factorization_domain()
          True

      Python

          >>> from sage.all import *
          >>> UFD = UniqueFactorizationDomains()
          >>> Parent(QQ, category=UFD).is_unique_factorization_domain()
          True

  additional_structure()

    Return whether `self` is a structure category.

    See also

    `Category.additional_structure()`

    The category of unique factorization domains does not define additional structure: a ring morphism between unique factorization domains is a unique factorization domain morphism.

    EXAMPLES:

    Sage

        sage: UniqueFactorizationDomains().additional_structure()

    Python

        >>> from sage.all import *
        >>> UniqueFactorizationDomains().additional_structure()

  super_categories()

    EXAMPLES:

    Sage

        sage: UniqueFactorizationDomains().super_categories()
        [Category of gcd domains]

    Python

        >>> from sage.all import *
        >>> UniqueFactorizationDomains().super_categories()
        [Category of gcd domains]