-
-
Notifications
You must be signed in to change notification settings - Fork 660
Description
As was noticed in #14793, some sanity checks need to be disabled in Hom when called upon unpickling because the input may include an unitialized parent. Since #14793, this is achieved by looking at the parent to detect if it is unitilialized.
As an alternative, this ticket proposes to add a check=True/False
optional argument to Hom, and to use it upon unpickling. The advantages are:
-
The logic is quite simpler, slightly faster, and more robust.
-
This check argument is of general purpose, and indeed immediately
put to use when Hom calls itself recursively. -
It made it easier for the first feature below
A potential caveat: pickles created since #14793 might not unpickle
properly. This was very recent; do we care?
Other changes in this ticket:
-
Hom now uses
X in category
as sanity check rather than
X.category().is_subcategory(category)
. This is more expressive,
and indeed a necessary preliminary step for Categories over a base ring category #15801 which makes those
two idioms not always equivalent (example:X
is aQQ
-module,
X.category()
isModules(Rings)
andcategory
is
Modules(QQ)
) -
A bug fix for Homsets between simplicial complexes over some higher
category (Hom was not checking its input).
Component: categories
Keywords: homset
Author: Nicolas M. Thiéry, Simon King
Branch: e1e916c
Reviewer: Simon King, Nicolas M. Thiéry
Issue created by migration from https://trac.sagemath.org/ticket/16275