#22001 closed defect (fixed)
Category of number field morphisms is always Rings
Reported by:  saraedum  Owned by:  

Priority:  minor  Milestone:  sage7.5 
Component:  number fields  Keywords:  
Cc:  roed, caruso  Merged in:  
Authors:  Julian Rüth  Reviewers:  David Roe 
Report Upstream:  N/A  Work issues:  
Branch:  07936de (Commits, GitHub, GitLab)  Commit:  
Dependencies:  Stopgaps: 
Description (last modified by )
In the following example, the category should be NumberFields()
sage: R.<x> = QQ[] sage: K.<a> = QQ.extension(x^2 + 1) sage: K.hom([a]).category_for() Category of rings
Change History (15)
comment:1 Changed 6 years ago by
 Branch set to u/saraedum/category_of_number_field_morphisms_is_always_rings
comment:2 Changed 6 years ago by
 Branch u/saraedum/category_of_number_field_morphisms_is_always_rings deleted
 Status changed from new to needs_review
comment:3 Changed 6 years ago by
Btw. the comment that it is ignored was introduced in
commit 2cda3cde81efa0b5546e60170bee7ae084263a4f Author: William Stein <wstein@gmail.com> Date: Sun Sep 16 23:02:21 2007 0700 work in progress on algebraic number theory.
so there is no further info on this.
comment:4 Changed 6 years ago by
 Cc roed caruso added
 Description modified (diff)
comment:5 Changed 6 years ago by
 Branch set to u/saraedum/category_of_number_field_morphisms_is_always_rings
 Commit set to 2d2818f932c5b7b59e3094a958787a36b614c9f3
It looks like you deleted the branch when you set it to needs review. I'm putting the branch back, but if there's something wrong with the branch let me know.
New commits:
2d2818f  Do not ignore the cat keyword of number field morphisms

comment:6 Changed 6 years ago by
 Reviewers set to David Roe
 Status changed from needs_review to positive_review
Looks good to me.
comment:7 Changed 6 years ago by
 Status changed from positive_review to needs_work
See patchbot:
sage t long warnlong 53.9 src/sage/schemes/projective/projective_morphism.py # 2 doctests failed
comment:8 Changed 6 years ago by
 Commit changed from 2d2818f932c5b7b59e3094a958787a36b614c9f3 to 07936ded16c7cf6b03fea3bffc84929a8f30c479
Branch pushed to git repo; I updated commit sha1. New commits:
07936de  A morphism of a number field is a morphism of a ring and vice versa

comment:9 Changed 6 years ago by
 Status changed from needs_work to needs_review
comment:10 Changed 6 years ago by
Do you know why self.homset_category().is_full_subcategory(x.category_for())
returns False
?
comment:11 Changed 6 years ago by
It is mentioned here: https://github.com/sagemath/sage/blob/master/src/sage/categories/category.py#L1299
comment:12 Changed 6 years ago by
The failing doctest is some latex issue of the patchbot. I don't think it is related to the changes here.
comment:13 Changed 6 years ago by
 Status changed from needs_review to positive_review
Looks good, and patchbot says all tests pass.
comment:14 Changed 6 years ago by
 Branch changed from u/saraedum/category_of_number_field_morphisms_is_always_rings to 07936ded16c7cf6b03fea3bffc84929a8f30c479
 Resolution set to fixed
 Status changed from positive_review to closed
comment:15 Changed 5 years ago by
 Commit 07936ded16c7cf6b03fea3bffc84929a8f30c479 deleted
See #23910 for relative number field homsets.
Why would we ignore the cat keyword? Maybe category support was not that great at the time? Let's see what the patchbot thinks.