-
-
Notifications
You must be signed in to change notification settings - Fork 641
Description
Andrey told me about the following problem. When he implemented toric lattices, he inherited a .construction()
method from general lattices. Consequence: If he tried to add elements of two different toric lattices, then Sage applied a pushout construction and added the two elements after pushing them to ZZ^2
, which was not what he wanted.
His solution was, I think, the correct one: He overloaded the .construction()
method, so that it now returns None
.
Update: A similar problem also showed up in #30360.
Suggestion: Introduce a test of the TestSuite
of a parent P, that will complain if P.construction() returns a pair F, O
such that F(O)!=P
.
I think this test should be put into (Update 9.2: sage.structure.parent.Parent
sage.categories.sets_cat
), because this is where .construction()
is defined in the first place.
CC: @novoselt @nthiery @sagetrac-sage-combinat @tscrim @fchapoton @mwageringel @kwankyu @dkrenn
Component: coercion
Keywords: construction functor, test suite, sd53
Author: Simon King, Matthias Koeppe, Marc Mezzarobba, Travis Scrimshaw
Branch: 29e2ce0
Reviewer: Travis Scrimshaw, Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/15223