Opened 8 years ago

Last modified 8 years ago

#16940 needs_work enhancement

An element method for

Reported by: knsam, mkamalakshya Owned by:
Priority: minor Milestone: sage-6.4
Component: categories Keywords:
Cc: Nicolas M. Thiéry Merged in:
Authors: Kamalakshya Mahatab, Kannappan Sampath Reviewers:
Report Upstream: N/A Work issues:
Branch: public/kamalakshya/an_element (Commits, GitHub, GitLab) Commit: ea7fff36089ce3e768bd678a554464a3896a1276
Dependencies: Stopgaps:

Status badges


We implement an an_element method for Hom spaces of vector spaces which returns a somewhat typical element in the space (instead of the boring 0 matrix!)

Change History (3)

comment:1 Changed 8 years ago by Kannappan Sampath

Status: newneeds_review

comment:2 Changed 8 years ago by Vincent Delecroix

Status: needs_reviewneeds_work


Actually I think that this is a bug

sage: V1 = GF(2)**3
sage: V2 = GF(7)**5
sage: Hom(V1,V2)
Set of Morphisms (Linear Transformations)
  Vector space of dimension 3 over Finite Field of size 2
  Vector space of dimension 5 over Finite Field of size 7
sage: _.category()
Category of homsets of modules with basis over (finite fields
and subquotients of monoids and quotients of semigroups)

Don't you?

I would either open another ticket or solve it here (at the level of FreeModuleHomspace). In your _an_element_ you should not worry about the EmptySetError being raised. The homset between free modules (over the same base ring) always contain zero and so is never empty!


comment:3 Changed 8 years ago by Vincent Delecroix

See #18309 for the issue about Hom.

Note: See TracTickets for help on using tickets.