Realizations Covariant Functorial Construction - Category Framework

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

# Realizations Covariant Functorial Construction

See also

- `Sets().WithRealizations` for an introduction to realizations and with realizations.

- `sage.categories.covariant_functorial_construction` for an introduction to covariant functorial constructions.

- `sage.categories.examples.with_realizations` for an example.

class sage.categories.realizations.Category_realization_of_parent(parent_with_realization)

  Bases: `Category_over_base`, `BindableClass`

  An abstract base class for categories of all realizations of a given parent.

  INPUT:

  - `parent_with_realization` – a parent

  See also

  `Sets().WithRealizations`

  EXAMPLES:

  Sage

      sage: A = Sets().WithRealizations().example(); A                                # needs sage.modules
      The subset algebra of {1, 2, 3} over Rational Field

  Python

      >>> from sage.all import *
      >>> A = Sets().WithRealizations().example(); A                                # needs sage.modules
      The subset algebra of {1, 2, 3} over Rational Field

  The role of this base class is to implement some technical goodies, like the binding `A.Realizations()` when a subclass `Realizations` is implemented as a nested class in `A` (see the `code of the example`):

  Sage

      sage: C = A.Realizations(); C                                                   # needs sage.modules
      Category of realizations of
       The subset algebra of {1, 2, 3} over Rational Field

  [Python]

      >>> from sage.all import *
      >>> C = A.Realizations(); C                                                   # needs sage.modules
      Category of realizations of
       The subset algebra of {1, 2, 3} over Rational Field

  as well as the name for that category.

sage.categories.realizations.Realizations(self)

  Return the category of realizations of the parent `self` or of objects of the category `self`

  INPUT:

  - `self` – a parent or a concrete category

  Note

  this function is actually inserted as a method in the class `Category` (see `Realizations()`). It is defined here for code locality reasons.

  EXAMPLES:

  The category of realizations of some algebra:

  Sage

      sage: Algebras(QQ).Realizations()
      Join of Category of algebras over Rational Field
          and Category of realizations of unital magmas

  Python

      >>> from sage.all import *
      >>> Algebras(QQ).Realizations()
      Join of Category of algebras over Rational Field
          and Category of realizations of unital magmas

  The category of realizations of a given algebra:

  Sage

      sage: A = Sets().WithRealizations().example(); A                                # needs sage.modules
      The subset algebra of {1, 2, 3} over Rational Field
      sage: A.Realizations()                                                          # needs sage.modules
      Category of realizations of
       The subset algebra of {1, 2, 3} over Rational Field

      sage: C = GradedHopfAlgebrasWithBasis(QQ).Realizations(); C
      Join of Category of graded Hopf algebras with basis over Rational Field
          and Category of realizations of Hopf algebras over Rational Field
      sage: C.super_categories()
      [Category of graded Hopf algebras with basis over Rational Field,
       Category of realizations of Hopf algebras over Rational Field]

      sage: TestSuite(C).run()

  [Python]

      >>> from sage.all import *
      >>> A = Sets().WithRealizations().example(); A                                # needs sage.modules
      The subset algebra of {1, 2, 3} over Rational Field
      >>> A.Realizations()                                                          # needs sage.modules
      Category of realizations of
       The subset algebra of {1, 2, 3} over Rational Field

      >>> C = GradedHopfAlgebrasWithBasis(QQ).Realizations(); C
      Join of Category of graded Hopf algebras with basis over Rational Field
          and Category of realizations of Hopf algebras over Rational Field
      >>> C.super_categories()
      [Category of graded Hopf algebras with basis over Rational Field,
       Category of realizations of Hopf algebras over Rational Field]

      >>> TestSuite(C).run()

  See also

  - `Sets().WithRealizations`

  - `ClasscallMetaclass`

  Todo

  Add an optional argument to allow for:

  Sage

      sage: Realizations(A, category=Blahs()) # todo: not implemented

  Python

      >>> from sage.all import *
      >>> Realizations(A, category=Blahs()) # todo: not implemented

class sage.categories.realizations.RealizationsCategory(category, *args)

  Bases: `RegressiveCovariantConstructionCategory`

  An abstract base class for all categories of realizations category.

  Realization are implemented as `RegressiveCovariantConstructionCategory`. See there for the documentation of how the various bindings such as `Sets().Realizations()` and `P.Realizations()`, where `P` is a parent, work.

  See also

  `Sets().WithRealizations`