Opened 7 years ago

Last modified 6 years ago

#16940 needs_work enhancement

An element method for vector_space_homspace.py

Reported by: knsam, mkamalakshya Owned by:
Priority: minor Milestone: sage-6.4
Component: categories Keywords:
Cc: nthiery 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

Description

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 7 years ago by knsam

  • Status changed from new to needs_review

comment:2 Changed 6 years ago by vdelecroix

  • Status changed from needs_review to needs_work

Hello,

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)
from 
  Vector space of dimension 3 over Finite Field of size 2
to
  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!

Vincent

comment:3 Changed 6 years ago by vdelecroix

See #18309 for the issue about Hom.

Note: See TracTickets for help on using tickets.