Opened 5 years ago
Closed 3 months ago
#16993 closed defect (invalid)
Broken fraction field of rational polynomial ring
Reported by: | SimonKing | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | commutative algebra | Keywords: | |
Cc: | tscrim, yzh, mkoeppe, etn40ff, slelievre | Merged in: | |
Authors: | Reviewers: | Marc Mezzarobba | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
sage: P.<t> = QQ[] sage: p = 4/(-4*t) sage: p # OK, fractions are not automatically reduced 4/(-4*t) sage: p.reduce() sage: p # What the heck... 4/(-4*t) sage: p == -1/t # At least sage gets this right True
So, not only is the fraction not automatically simplified by "obvious" common factors, but also it is not simplified upon request.
Note that the fraction field of an integral polynomial ring works better.
sage: P.<t> = ZZ[] sage: p = 4/(-4*t) sage: p 1/-t
Fixed by #16268.
Change History (10)
comment:1 Changed 5 years ago by
comment:2 Changed 5 years ago by
- Cc tscrim added
comment:3 Changed 4 years ago by
- Cc yzh mkoeppe added
comment:4 Changed 4 years ago by
My suggestion would be that if we create a fraction field of some commutative algebra over a field k
such that k
is constructed as the fraction field of R
(perhaps with some extra conditions on the ring), then we create the fraction field over the algebra over R
. This change would definitely require a discussion on sage-devel, and might be something we do only for polynomial rings or some other nice class of commutative algebras.
comment:5 Changed 4 years ago by
- Cc etn40ff added
comment:6 Changed 4 years ago by
- Component changed from basic arithmetic to commutative algebra
comment:7 Changed 8 months ago by
- Milestone changed from sage-6.4 to sage-duplicate/invalid/wontfix
- Status changed from new to needs_review
comment:8 Changed 8 months ago by
- Reviewers set to Marc Mezzarobba
- Status changed from needs_review to positive_review
comment:9 Changed 5 months ago by
- Cc slelievre added
- Description modified (diff)
comment:10 Changed 3 months ago by
- Resolution set to invalid
- Status changed from positive_review to closed
Presuming these are all correctly reviewed as either duplicate, invalid, or wontfix.
I think this is fixed in u/robertwb/ticket/16268 which is part of #16268. On #16268, I felt that some of the functions introduced there could not live up to their documentation for nastier rings and should be moved around. Also the description of #16268 then goes on to hashes, which IMHO should be fixed without too much extra normalisation as this normalisation is probably not possible for nasty rings. Sadly I don't have time to work on this.
Now back to this ticket: I am not sure I would call reduce broken per se: If reduce is interpreted as divide out gcd, then the behaviour makes sense to me, since 1 is a generator of the ideal
4*QQ[t] + (-4*t)*QQ[t]
and therefore a gcd.Normalisation in Q(ZZ[t]) isn't optimal either:
I think Nemo solves this (for unnasty rings) by dividing the denominator by what it calls a canonical unit. My understanding of "canonical unit" is this: It is the result of a multiplicative map from the non-zero elements to the units, that is the identity on units. (In particular if this map is called
f
, we havef(a/f(a)) = 1
for any non-zero elementa
.) In the case ofQQ[t]
the function "leading coefficient" works. In the case ofZZ[t]
the function "sign after leading coefficient" works.