Hi Vincent,
On 2019-05-22, Vincent Delecroix <
20100.d...@gmail.com> wrote:
> I am not a big fan of bundling everything into a single
> bigger object. What about returning a triple
> (V, projections, coprojections)?
I tend to argue that in the first place, SageMath is a maths software.
And mathematically, universal constructions do come "with batteries"
included. Hence, the projections and coprojections are part of the
construction and it makes sense to let them be part of the constructed
objects.
Here is a similar situation: When applying a construction functor, then
often a natural homomorphism is involved that is turned into a coercion
map and is thus part of the constructed object (a polynomial ring knows
the coercion map from its base ring).
I could imagine the following model:
- We do want unique parents. I.e., QQ^4 is unique.
- We want that the direct sum of QQ and QQ^3 yields different
coprojections than the direct sum of QQ^2 and QQ^2, even though the
constructed vector space is in both cases the same object, namely
QQ^4.
- Hence, a universal construction should be a wrapper. QQ^2+QQ^2 and
QQ+QQ^3 would be two different wrappers of the same object, each
providing different coprojections.
Perhaps the "Facade" framework can be used to implement it?
Best regards,
Simon