diff --git a/src/sage/categories/homset.py b/src/sage/categories/homset.py index 1b05cca4a52..4cc58966bd3 100644 --- a/src/sage/categories/homset.py +++ b/src/sage/categories/homset.py @@ -396,7 +396,7 @@ def Hom(X, Y, category=None, check=True): """ # This should use cache_function instead # However some special handling is currently needed for - # domains/docomains that break the unique parent condition. Also, + # domains/codomains that break the unique parent condition. Also, # at some point, it somehow broke the coercion (see e.g. sage -t # sage.rings.real_mpfr). To be investigated. global _cache diff --git a/src/sage/structure/coerce_dict.pyx b/src/sage/structure/coerce_dict.pyx index e060bc73a28..ef3cf797ac1 100644 --- a/src/sage/structure/coerce_dict.pyx +++ b/src/sage/structure/coerce_dict.pyx @@ -21,8 +21,7 @@ two parents (:issue:`715`) and to store homsets of pairs of objects of a category (:issue:`11521`). In both cases, it is essential that the parent structures remain garbage collectable, it is essential that the data access is faster than with a usual :class:`~weakref.WeakKeyDictionary`, and we enforce -the "unique parent condition" in Sage (parent structures should be identical -if they are equal). +the "unique parent condition" in Sage. :class:`MonoDict` behaves similarly, but it takes a single item as a key. It is used for caching the parents which allow a coercion map into a fixed other diff --git a/src/sage/structure/factory.pyx b/src/sage/structure/factory.pyx index bde82e5d18f..650a54c008b 100644 --- a/src/sage/structure/factory.pyx +++ b/src/sage/structure/factory.pyx @@ -658,7 +658,7 @@ def generic_factory_unpickle(factory, *args): (somewhere in the library of an old Sage version) a unique factory; in our example below, it returns polynomial rings. Now suppose that we want to replace the factory by something else, say, a class that provides the - unique parent behaviour using + unique representation behaviour using :class:`~sage.structure.unique_representation.UniqueRepresentation`. We show here how to make it possible to unpickle a pickle created with the factory, automatically turning it into an instance of the new class. diff --git a/src/sage/structure/unique_representation.py b/src/sage/structure/unique_representation.py index d5208beb1ea..c2126338ecd 100644 --- a/src/sage/structure/unique_representation.py +++ b/src/sage/structure/unique_representation.py @@ -517,6 +517,9 @@ class that inherits from :class:`UniqueRepresentation`: By adding simultaneously inherit from :class:`CachedRepresentation` and from :class:`~sage.misc.fast_methods.WithEqualityById`. +If the class is also a :class:`~sage.structure.parent.Parent`, +then we says it satisfies the *unique parent* condition. + For example, a symmetric function algebra is uniquely determined by the base ring. Thus, it is reasonable to use :class:`UniqueRepresentation` in this case::