sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.43k stars 479 forks source link

Implement homomorphisms between vector spaces *over different fields* #1947

Open craigcitro opened 16 years ago

craigcitro commented 16 years ago

It's surprising that this isn't already done -- it should be easy, since the morphisms don't have to do too much, and one already has the more complicated ring homomorphism code to use as a guide. I'll do this at SD7, if no one beats me to it.

CC: @mezzarobba @slel @jplab

Component: linear algebra

Author: Alex Sun

Branch/Commit: u/gh-black-stones/1947 @ 81d3a4f

Reviewer: Vincent Delecroix

Issue created by migration from https://trac.sagemath.org/ticket/1947

williamstein commented 16 years ago
comment:1

Craig, since homomorphisms between vector spaces are implemented (as I explained to you in irc last week), could you change the title of this trac ticket and explain what you are actually proposing be implemented? Thanks.

sage: V = QQ^3; W = QQ^2
sage: H = V.Hom(W)
sage: H([1..6])

Free module morphism defined by the matrix
[1 2]
[3 4]
[5 6]
Domain: Vector space of dimension 3 over Rational Field
Codomain: Vector space of dimension 2 over Rational Field
craigcitro commented 16 years ago
comment:2

Note that my first title for this ticket was ridiculous -- Sage has homomorphisms between vector spaces. The issue is to have homomorphisms over vector spaces V --> W when V and W are over different fields, but one has a map from the base field of V to the base field of W.

mezzarobba commented 9 years ago
comment:9

Works now, but may be worth a few tests:

sage: Hom(QQ^3, RR^2)([[1,2],[3,4],[5,6]])
Vector space morphism represented by the matrix:
[1 2]
[3 4]
[5 6]
Domain: Vector space of dimension 3 over Rational Field
Codomain: Vector space of dimension 2 over Real Field with 53 bits of precision
slel commented 6 years ago
comment:10

Where should such documentation and tests go?

98e7083c-b1c5-4035-99de-62e738c1304d commented 5 years ago

Branch: u/gh-black-stones/1947

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 5 years ago

Commit: 81d3a4f

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 5 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

81d3a4fAdded documentation and tests
98e7083c-b1c5-4035-99de-62e738c1304d commented 5 years ago

Author: Alex Sun

98e7083c-b1c5-4035-99de-62e738c1304d commented 5 years ago
comment:13

Replying to @mezzarobba:

Works now, but may be worth a few tests:

sage: Hom(QQ^3, RR^2)([[1,2],[3,4],[5,6]])
Vector space morphism represented by the matrix:
[1 2]
[3 4]
[5 6]
Domain: Vector space of dimension 3 over Rational Field
Codomain: Vector space of dimension 2 over Real Field with 53 bits of precision

I took this example and turned it into two doctests. Nothing new was added, just wanted to close this decade-old ticket.

mwageringel commented 5 years ago
comment:14

It seems odd that the following also works. Is there a reason that this is not prevented?

sage: f = Hom(RR^2, QQ^2)([[1,2],[3,4]]); f
Vector space morphism represented by the matrix:
[1 2]
[3 4]
Domain: Vector space of dimension 2 over Real Field with 53 bits of precision
Codomain: Vector space of dimension 2 over Rational Field
sage: f(vector(RR, [1,2]))
(7, 10)
embray commented 5 years ago
comment:15

Moving tickets from the Sage 8.8 milestone that have been actively worked on in the last six months to the next release milestone (optimistically).

embray commented 4 years ago
comment:16

Ticket retargeted after milestone closed

videlec commented 4 years ago
comment:18

Please:

videlec commented 4 years ago

Reviewer: Vincent Delecroix

mkoeppe commented 4 years ago
comment:19

Batch modifying tickets that will likely not be ready for 9.1, based on a review of the ticket title, branch/review status, and last modification date.

mkoeppe commented 3 years ago
comment:21

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

mkoeppe commented 3 years ago
comment:22

Setting a new milestone for this ticket based on a cursory review.