Sage: Ticket #15647: Make a proper distinction in the categories between dual and graded dual
https://trac.sagemath.org/ticket/15647
<p>
Tangent off the <a class="closed ticket" href="https://trac.sagemath.org/ticket/10963" title="enhancement: Axioms and more functorial constructions (closed: fixed)">#10963</a> discussion...
</p>
<pre class="wiki">+ @cached_method
+ def DualObjects(self):
+ r"""
+ Return the category of duals of objects of ``self``.
+
+ The dual of a vector space `V` is the space consisting of
+ all linear functionals on `V` (see :wikipedia:`Dual_space`).
+ Additional structure on `V` can endow its dual with
+ additional structure; e.g. if `V` is an algebra, then its
+ dual is a coalgebra.
+
+ This returns the category of dual of spaces in ``self`` endowed
+ with the appropriate additional structure.
+
+ .. SEEALSO::
+
+ - :class:`.dual.DualObjectsCategory`
+ - :class:`~.covariant_functorial_construction.CovariantFunctorialConstruction`.
+
+ .. TODO:: add support for graded duals.
+
+ EXAMPLES::
+
+ sage: VectorSpaces(QQ).DualObjects()
+ Category of duals of vector spaces over Rational Field
+
+ The dual of a vector space is a vector space::
+
+ sage: VectorSpaces(QQ).DualObjects().super_categories()
+ [Category of vector spaces over Rational Field]
+
+ The dual of an algebra is a coalgebra::
+
+ sage: sorted(Algebras(QQ).DualObjects().super_categories(), key=str)
+ [Category of coalgebras over Rational Field,
+ Category of duals of vector spaces over Rational Field]
</pre><p>
I know this is not a big issue since the <code>dual()</code> of an algebra *is* a coalgebra in probably all cases in which <code>dual()</code> is implemented (not least because in the infinite-dimensional cases it usually means the graded dual). But at some point it probably *will* become an issue (maybe with the introduction of non-graded bases for graded algebras?), and I'm unhappy with the docstring lying in my face. And Nicolas suggests that "we need to clean up the distinction between dual and graded dual; this is not completely obvious to set the things up so that we can still share some code between the two".
</p>
<p>
At this occasion, <a class="missing wiki">DualObjectsCategory?</a> should be made into a category
over base ring, if not just to inherit from the an_instance method.
Compare:
</p>
<pre class="wiki">sage: sage: ModulesWithBasis.Graded.an_instance()
Category of graded modules with basis over Rational Field
sage: ModulesWithBasis.DualObjects.an_instance()
Type error ...
</pre>en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/15647
Trac 1.1.6nthierySun, 19 Jan 2014 20:41:43 GMTtype, description, summary changed
https://trac.sagemath.org/ticket/15647#comment:1
https://trac.sagemath.org/ticket/15647#comment:1
<ul>
<li><strong>type</strong>
changed from <em>task</em> to <em>defect</em>
</li>
<li><strong>description</strong>
modified (<a href="/ticket/15647?action=diff&version=1">diff</a>)
</li>
<li><strong>summary</strong>
changed from <em>Docstring and probably also code is dangerously naive about duality</em> to <em>Make a proper distinction in the categories between dual and graded dual</em>
</li>
</ul>
Ticketvbraun_spamThu, 30 Jan 2014 21:20:52 GMTmilestone changed
https://trac.sagemath.org/ticket/15647#comment:2
https://trac.sagemath.org/ticket/15647#comment:2
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.1</em> to <em>sage-6.2</em>
</li>
</ul>
Ticketvbraun_spamTue, 06 May 2014 15:20:58 GMTmilestone changed
https://trac.sagemath.org/ticket/15647#comment:3
https://trac.sagemath.org/ticket/15647#comment:3
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.2</em> to <em>sage-6.3</em>
</li>
</ul>
Ticketvbraun_spamSun, 10 Aug 2014 16:51:03 GMTmilestone changed
https://trac.sagemath.org/ticket/15647#comment:4
https://trac.sagemath.org/ticket/15647#comment:4
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.3</em> to <em>sage-6.4</em>
</li>
</ul>
TicketmkoeppeFri, 18 Nov 2016 01:09:40 GMT
https://trac.sagemath.org/ticket/15647#comment:5
https://trac.sagemath.org/ticket/15647#comment:5
<p>
Are there even any methods for constructing the dual of a vector space, or just a single linear functional?
</p>
TicketmkoeppeWed, 08 Jul 2020 20:17:53 GMT
https://trac.sagemath.org/ticket/15647#comment:6
https://trac.sagemath.org/ticket/15647#comment:6
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/15647#comment:5" title="Comment 5">mkoeppe</a>:
</p>
<blockquote class="citation">
<p>
Are there even any methods for constructing the dual of a vector space, or just a single linear functional?
</p>
</blockquote>
<p>
See <a class="new ticket" href="https://trac.sagemath.org/ticket/30091" title="enhancement: Linear functionals on vector spaces and modules (new)">#30091</a>
</p>
Ticket