Opened 21 months ago
Closed 19 months ago
#25839 closed defect (fixed)
Raise Error if Univariate PR used to construct ProjectiveSpace
Reported by:  ghLoops7  Owned by:  

Priority:  trivial  Milestone:  sage8.3 
Component:  dynamics  Keywords:  
Cc:  bhutz  Merged in:  
Authors:  Joseph Lupo  Reviewers:  Ben Hutz 
Report Upstream:  N/A  Work issues:  
Branch:  dc640e0 (Commits)  Commit:  dc640e059b0a047ff6ba5fa5620e1bc5ce016ec7 
Dependencies:  Stopgaps: 
Description (last modified by )
We can initialize a ProjectiveSpace? object as follows:
sage: R.<x,y> = QQ[] sage: P = ProjectiveSpace(R)
However, we get a strange, unclear error when we try
sage: R.<x> = QQ[] sage: P = ProjectiveSpace(R)
A univariate or multivariate single variable polynomial ring should both construct a projective space of dimension 0. The univariate case fails.
Change History (10)
comment:1 Changed 21 months ago by
 Description modified (diff)
 Status changed from new to needs_review
 Summary changed from Raise Error if Univariate PR given to ProjectiveSpace to Raise Error if Univariate PR used to construct ProjectiveSpace
comment:2 Changed 21 months ago by
 Status changed from needs_review to needs_work
comment:3 Changed 21 months ago by
 Branch set to u/ghLoops7/25839_ps_init
 Commit set to a1ec95954a360c77073e3c22ff1cf532223549b8
 Status changed from needs_work to needs_review
comment:4 Changed 21 months ago by
 Commit changed from a1ec95954a360c77073e3c22ff1cf532223549b8 to 0c4dd18605d0111aa38e0458dd0998be07bab600
comment:5 Changed 21 months ago by
Actually, I think the fix here should be the univariate ring does construct a dim 0 projecive space (which is just a single point). For example, for single variable multivariate polynomial rings everything works just fine
P=ProjectiveSpace(QQ,0) R=P.coordinate_ring() ProjectiveSpace(R)
So I think the line
if is_MPolynomialRing(n) and R is None:
just to needs to be an or
for is_Poly or is_MPoly
comment:6 Changed 21 months ago by
 Commit changed from 0c4dd18605d0111aa38e0458dd0998be07bab600 to c03b06ca6745c2fe333163a52c3955206473c986
Branch pushed to git repo; I updated commit sha1. New commits:
c03b06c  25398: handle dim 0 case

comment:7 Changed 21 months ago by
 Commit changed from c03b06ca6745c2fe333163a52c3955206473c986 to 8a6e5b0de9ff8a481a577818bbeefb2802e1406a
Branch pushed to git repo; I updated commit sha1. New commits:
8a6e5b0  25839: change doc

comment:8 Changed 21 months ago by
 Commit changed from 8a6e5b0de9ff8a481a577818bbeefb2802e1406a to dc640e059b0a047ff6ba5fa5620e1bc5ce016ec7
Branch pushed to git repo; I updated commit sha1. New commits:
dc640e0  25839: added parentheses

comment:9 Changed 21 months ago by
 Description modified (diff)
 Reviewers set to Ben Hutz
 Status changed from needs_review to positive_review
comment:10 Changed 19 months ago by
 Branch changed from u/ghLoops7/25839_ps_init to dc640e059b0a047ff6ba5fa5620e1bc5ce016ec7
 Resolution set to fixed
 Status changed from positive_review to closed
Branch pushed to git repo; I updated commit sha1. New commits:
25839: clarified projective space init error