Opened 8 years ago

Last modified 6 weeks ago

#16843 needs_work defect

Zeromorphism

Reported by: mkamalakshya Owned by: mkamalakshya
Priority: minor Milestone:
Component: algebra Keywords: days60
Cc: tscrim, amri Merged in:
Authors: Kamalakshya Mahatab Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

GitHub link to the corresponding issue

Description (last modified by tscrim)

Currently the zero morphism cannot be constructed starting from QQ:

sage: H= Hom(QQ, QQ)
sage: f=H(0) 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_4.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("Zj1IKDAp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmplncYUJ/___code___.py", line 3, in <module>
    exec compile(u'f=H(_sage_const_0 )
  File "", line 1, in <module>
    
  File "/home/kamalakshya/sage/local/lib/python2.7/site-packages/sage/rings/homset.py", line 184, in __call__
    raise TypeError("images do not define a valid homomorphism")
TypeError: images do not define a valid homomorphism

Change History (15)

comment:1 Changed 8 years ago by mkamalakshya

Description: modified (diff)

comment:2 Changed 8 years ago by mkamalakshya

Description: modified (diff)
Status: newneeds_review

comment:3 Changed 8 years ago by nthiery

Keywords: days60 added

comment:4 Changed 8 years ago by mkamalakshya

Status: needs_reviewneeds_work

comment:5 Changed 8 years ago by mkamalakshya

Description: modified (diff)
Status: needs_workneeds_info

comment:6 Changed 8 years ago by tscrim

Description: modified (diff)
Status: needs_infoneeds_work

For future reference, it's better to just put these types of questions as comments.

Replying to mkamalakshya:

Should Zero morphism be a morphism of rings? In other words, do we assume that our homomorphisms take 1 to 1?

We have to be careful about what we mean by '1' in the image. In particular, the image is the trivial ring (field) with 0 = 1 and it still satisfies all of the usual ring (field) properties (where we aren't dividing, but it's just a statement about the multiplicative inverse). So in this case, the image of 1 from QQ is 0 and satisfies all of the expected multiplicative identity axioms:

  • 0x = x0 = x (note that x = 0 in the image)
  • x x^{-1} = x^{-1} x = 0 (and x^{-1} = 0 as well in the image)

So the zero morphism is a morphism as rings (fields) by sending the additive/multiplicative identity to the additive/multiplicative identity.

PS - Once a branch is set, you can put this to needs review (*wink wink* to the cc's).

Last edited 8 years ago by tscrim (previous) (diff)

comment:7 Changed 8 years ago by tscrim

Cc: armi ayyer added

comment:8 Changed 8 years ago by tscrim

Cc: amri added; armi removed

comment:9 in reply to:  6 ; Changed 8 years ago by pbruin

Replying to tscrim:

Replying to mkamalakshya:

Should Zero morphism be a morphism of rings? In other words, do we assume that our homomorphisms take 1 to 1?

We have to be careful about what we mean by '1' in the image. In particular, the image is the trivial ring (field) with 0 = 1 and it still satisfies all of the usual ring (field) properties (where we aren't dividing, but it's just a statement about the multiplicative inverse). So in this case, the image of 1 from QQ is 0 and satisfies all of the expected multiplicative identity axioms:

  • 0x = x0 = x (note that x = 0 in the image)
  • x x^{-1} = x^{-1} x = 0 (and x^{-1} = 0 as well in the image)

So the zero morphism is a morphism as rings (fields) by sending the additive/multiplicative identity to the additive/multiplicative identity.

No, it isn't. The zero map between two rings is a ring homomorphism if and only if the codomain is the zero ring (note: codomain, not image).

You are not correctly checking the definition of ring homomorphism. A ring is a triple (R, +, .) satisfying the ring axioms, which say (among other things) that there exists a two-sided multiplicative identity 1 in R; this is automatically unique. A ring homomorphism from R to S is a homomorphism of additive groups that respects the multiplication and sends the multiplicative identity element of R to that of S. (One can rephrase this as saying that is compatible with the empty product. See also http://arxiv.org/abs/1404.0135.) This implies in particular that any ring homomorphism from Q to itself sends 1 to 1, and that the only ring homomorphism from Q to Q is the identity.

The zero map is only a rng homomorphism (since rngs don't have 1, we can't require rng homomorphisms to preserve 1). So someone who cares about rngs might want the following to work (it currently doesn't):

sage: H = QQ.Hom(QQ, category=Rngs())
sage: H([0])

The following is also problematic (in my opinion even more so):

sage: H = QQ.Hom(QQ, category=VectorSpaces(QQ))
Traceback (most recent call last):
...
ValueError: Rational Field is not in Category of vector spaces over Rational Field

We should make sure that QQ is in VectorSpaces(QQ). For the moment, one has to construct Q as a 1-dimensional vector space over itself:

sage: H = Hom(QQ^1, QQ^1)
sage: f = H([0])
sage: f
Vector space morphism represented by the matrix:
[0]
Domain: Vector space of dimension 1 over Rational Field
Codomain: Vector space of dimension 1 over Rational Field

comment:10 in reply to:  9 ; Changed 8 years ago by tscrim

Replying to pbruin:

No, it isn't. The zero map between two rings is a ring homomorphism if and only if the codomain is the zero ring (note: codomain, not image).

Warning for the next bit, I'm not a commutative algebraist or category theorist, so please don't hate me if I'm spouting nonsense.

I agree that there would be problems if the 1R did not go to 1Im(f) under a funtion f and that we cannot show this from the ring axioms (unlike fields). I don't like that enlarging the codomain changes whether the function is a morphism or not. Can you think of another category where this happens or some property of the morphism that would change?

You are not correctly checking the definition of ring homomorphism. A ring is a triple (R, +, .) satisfying the ring axioms, which say (among other things) that there exists a two-sided multiplicative identity 1 in R; this is automatically unique. A ring homomorphism from R to S is a homomorphism of additive groups that respects the multiplication and sends the multiplicative identity element of R to that of S. (One can rephrase this as saying that is compatible with the empty product. See also http://arxiv.org/abs/1404.0135.) This implies in particular that any ring homomorphism from Q to itself sends 1 to 1, and that the only ring homomorphism from Q to Q is the identity.

That was an interesting note.

The zero map is only a rng homomorphism (since rngs don't have 1, we can't require rng homomorphisms to preserve 1). So someone who cares about rngs might want the following to work (it currently doesn't):

sage: H = QQ.Hom(QQ, category=Rngs())
sage: H([0])

The following is also problematic (in my opinion even more so):

sage: H = QQ.Hom(QQ, category=VectorSpaces(QQ))
Traceback (most recent call last):
...
ValueError: Rational Field is not in Category of vector spaces over Rational Field

We should make sure that QQ is in VectorSpaces(QQ). For the moment, one has to construct Q as a 1-dimensional vector space over itself:

sage: H = Hom(QQ^1, QQ^1)
sage: f = H([0])
sage: f
Vector space morphism represented by the matrix:
[0]
Domain: Vector space of dimension 1 over Rational Field
Codomain: Vector space of dimension 1 over Rational Field

Agreed. I believe there was only a wish/desire for letting rings know they are also a free module/algebra over themselves; so no actual code yet. And this ticket got a lot more involved than I was originally had thought.

comment:11 in reply to:  10 ; Changed 8 years ago by pbruin

Hi Travis,

I agree that there would be problems if the 1R did not go to 1Im(f) under a funtion f and that we cannot show this from the ring axioms (unlike fields).

As far as I can see, there is no difference between fields and other rings here.

I don't like that enlarging the codomain changes whether the function is a morphism or not.

Well, that is what you get from the definitions! This is related to the fact that "enlarging the codomain" also changes which element is the multiplicative identity. However, it is important to note that in this case "enlarging the codomain" is misleading terminology in the ring-theoretic context, as opposed to the set-theoretic (or module-theoretic) context, for the following reason.

The intuiton behind your objection seems to rely on an implicit assumption that the zero ring is a subring of any other ring. In fact this is not the case. Namely, completely in parallel to the definition of ring homomorphisms, a subring of a ring R is an additive subgroup closed under multiplication and containing the multiplicative identity element of R. Equivalently, subrings are precisely the images of ring homomorphisms. This implies that the zero ring is not a subring of any ring except itself. (On the other hand, the zero ring admits a trivial homomorphism from any ring.)

comment:12 in reply to:  11 Changed 8 years ago by tscrim

Replying to pbruin:

Hi Travis,

I agree that there would be problems if the 1R did not go to 1Im(f) under a funtion f and that we cannot show this from the ring axioms (unlike fields).

As far as I can see, there is no difference between fields and other rings here.

I was just saying for fields, this is not something you need to assume, it can be shown from the axioms.

The intuiton behind your objection seems to rely on an implicit assumption that the zero ring is a subring of any other ring. In fact this is not the case. Namely, completely in parallel to the definition of ring homomorphisms, a subring of a ring R is an additive subgroup closed under multiplication and containing the multiplicative identity element of R. Equivalently, subrings are precisely the images of ring homomorphisms. This implies that the zero ring is not a subring of any ring except itself. (On the other hand, the zero ring admits a trivial homomorphism from any ring.)

Ah I see, I had the wrong definition in my mind. I agree with you now, we should instead fix the other constructions.

comment:13 Changed 8 years ago by ayyer

Cc: ayyer removed

comment:14 in reply to:  9 Changed 8 years ago by nthiery

Replying to pbruin:

We should make sure that QQ is in VectorSpaces(QQ).

See http://trac.sagemath.org/wiki/CategoriesRoadMap for a brief discussion on that topic. IIRC that was discussed too on #10963. It's not quite trivial, and it's not totally clear that we actually want it (e.g. add to QQ all the methods of a vector space, like basis, ...). Work on this is welcome if anyone volunteers ...

comment:15 Changed 6 weeks ago by mkoeppe

Milestone: sage-6.4
Note: See TracTickets for help on using tickets.