Opened 2 years ago

Closed 2 years ago

#28174 closed defect (fixed)

Fixed typo for dehomogenization of non-endomorphisms

Reported by: gh-HTalbott Owned by:
Priority: major Milestone: sage-8.9
Component: geometry Keywords: SI2019
Cc: gh-Torrencem Merged in:
Authors: Matt Torrence, Henry Talbott Reviewers: Ben Hutz
Report Upstream: N/A Work issues:
Branch: 4f462a0 (Commits, GitHub, GitLab) Commit: 4f462a0255fef1590a6979d4b95fee204f55b432
Dependencies: Stopgaps:

Status badges

Description (last modified by gh-HTalbott)

The following code is broken:

sage: P1.<x,y> = ProjectiveSpace(QQ,1)
sage: P2.<u,v,w> = ProjectiveSpace(QQ,2)
sage: H = Hom(P2,P1)
sage: f = H([u*w, v^2 + w^2])
sage: f.dehomogenize((2,1))
# raises IndexError

This seems to be because of a typo in projective_morphism.py, in the dehomogenization method. The method uses the domain to find the number of generators of the input, when it should be using the codomain.

Change History (5)

comment:1 Changed 2 years ago by gh-HTalbott

  • Type changed from PLEASE CHANGE to defect

comment:2 Changed 2 years ago by gh-Torrencem

  • Authors set to Matt Torrence, Henry Talbott
  • Branch set to u/gh-Torrencem/28174_dehomogenization_fix
  • Commit set to 4f462a0255fef1590a6979d4b95fee204f55b432
  • Status changed from new to needs_review

New commits:

4f462a028174: Fix dehomogenization error for non-endomorphisms

comment:3 Changed 2 years ago by gh-HTalbott

  • Description modified (diff)

comment:4 Changed 2 years ago by bhutz

  • Reviewers set to Ben Hutz
  • Status changed from needs_review to positive_review

Looks good to me.

comment:5 Changed 2 years ago by vbraun

  • Branch changed from u/gh-Torrencem/28174_dehomogenization_fix to 4f462a0255fef1590a6979d4b95fee204f55b432
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.