# Coefficients on Univariate Polynomial Ring

**URL:** <https://discourse.julialang.org/t/coefficients-on-univariate-polynomial-ring/101071>\
**Category:** General Usage\
**Tags:** nemo\
**Created:** [July 2, 2023, 8:48am UTC](https://discourse.julialang.org/t/coefficients-on-univariate-polynomial-ring/101071 "2023-07-02T08:48:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![blociss](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blociss/32/16421_2.png) [@blociss](https://discourse.julialang.org/u/blociss)\
**Post date:** [July 2, 2023, 8:48am UTC](https://discourse.julialang.org/t/coefficients-on-univariate-polynomial-ring/101071/1 "2023-07-02T08:48:24Z")

</div>

Let `R,q=QQ["q"]` and `S,(x,q)=QQ["x","q"]` two polynomial Ring.  
let `p = q^4 - 2*q^2 + q + 1` defined in `R` and `S`.  
collect(coefficients(p)) in `R` give me

> 5-element Vector{QQFieldElem}:  
> 1  
> 1  
> -2  
> 0  
> 1

while in the ring S, I got

> 4-element Vector{QQFieldElem}:  
> 1  
> -2  
> 1  
> 1

Why this difference ?  
I want to get also in S

> 5-element Vector{QQFieldElem}:  
> 1  
> 1  
> -2  
> 0  
> 1

The same behaviour with `terms` and `degree_fmpz`, `monomials` and `Preformatted text`
