17 | | But it gets a tiny bit more complicated than this. Suppose your coefficients are not ZZ, but rather ZZ[y], where y is a vector of 200 variables. The integral of 2*x is still x^2, but where do we want this x^2 to live? Possible answers are (a) ZZ[y][x], (b) Frac(ZZ[y])[x], (c) QQ[y][x]. |

18 | | The current behavior is (a) for 2*x and (b) for 3*x, and I am currently leaning toward changing both to (c). This is the question that I need some input on. |

| 17 | But it gets a tiny bit more complicated than this. Suppose your coefficients are not ZZ, but rather ZZ[y], where y is a vector of 200 variables. The integral of 2*x is still {{{x^2}}}, but where do we want this {{{x^2}}} to live? Possible answers are (a) ZZ[y][x], (b) Frac(ZZ[y])[x], (c) QQ[y][x]. |

| 18 | The current behavior is (a) for 2*x and (b) for 3*x, and I am currently leaning toward changing both to (c). Here's why: you have p in R[x], where R is some coefficient ring. When you do p.integral(), you are not really dividing p by integers n, but rather the coefficients of p by integers n. So maybe we should look at what division by n in the coefficient ring R does: |

| 19 | |

| 20 | {{{ |

| 21 | sage: R.<y0,y1,y2,y3> = ZZ[] |

| 22 | sage: S.<x> = R[] |

| 23 | sage: p = 2*y0 |

| 24 | sage: p.parent() |

| 25 | Multivariate Polynomial Ring in y0, y1, y2, y3 over Integer Ring |

| 26 | sage: (p/2).parent() |

| 27 | Multivariate Polynomial Ring in y0, y1, y2, y3 over Rational Field |

| 28 | sage: p = 3*y0 |

| 29 | sage: (p/2).parent() |

| 30 | Multivariate Polynomial Ring in y0, y1, y2, y3 over Rational Field |

| 31 | }}} |

| 32 | |

| 33 | So p/2 is not in the fraction field of R. This is what I would like integral() to do as well. |

| 34 | |

| 35 | Thoughts? |