Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#2349 closed defect (fixed)

[with patch, with positive review] homogenize does different things in different contexts

Reported by: ncalexan Owned by: malb
Priority: major Milestone: sage-2.10.3
Component: commutative algebra Keywords: polynomial multi multivariate homogenize
Cc: ncalexan Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Here are some examples:

sage: x = Zmod(3)['x'].gen(); x.homogenize('y')
---------------------------------------------------------------------------
<type 'exceptions.AttributeError'>        Traceback (most recent call last)

/Users/ncalexan/<ipython console> in <module>()

<type 'exceptions.AttributeError'>: 'sage.rings.polynomial.polynomial_modn_dense_ntl.Po' object has no attribute 'homogenize'
sage: x, y = Zmod(3)['x', 'y'].gens(); (x + x^2).homogenize(y)
x^2 + x*y
sage: x, y = Zmod(3)['x', 'y'].gens(); (x + x^2).homogenize(y).parent()
Multivariate Polynomial Ring in x, y, y over Ring of integers modulo 3
sage: x, y = GF(3)['x', 'y'].gens(); (x + x^2).homogenize(y)
x^2 + x*y
sage: x, y = GF(3)['x', 'y'].gens(); (x + x^2).homogenize(y).parent()
Multivariate Polynomial Ring in x, y over Finite Field of size 3

Attachments (1)

trac_2349.patch (11.4 KB) - added by malb 14 years ago.

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by malb

comment:1 Changed 14 years ago by malb

  • Summary changed from homogenize does different things in different contexts to [with patch] homogenize does different things in different contexts

The attached patch unifies homogenize for the multivariate polynomials, but not the univariate yet.

comment:2 Changed 14 years ago by ncalexan

  • Summary changed from [with patch] homogenize does different things in different contexts to [with patch, with positive review] homogenize does different things in different contexts

This patch fixes the code I was writing :) It only applies to the multivariate case, see ticket #2352 for the univariate case.

Doctests are good. I say apply.

comment:3 Changed 14 years ago by mabshoff

  • Resolution set to fixed
  • Status changed from new to closed

Merged in Sage 2.10.3.rc1

comment:4 Changed 14 years ago by mhansen

  • Milestone changed from sage-3.0 to sage-2.10.3
Note: See TracTickets for help on using tickets.