next | previous | forward | backward | up | index | toc

# findElementOfDegree -- find an element of a specified degree

## Synopsis

• Usage:
findElementOfDegree( n, R )
findElementOfDegree( l, R )
• Inputs:
• Outputs:
• ,

## Description

Given a singly graded ring and an integer $n$, this function tries to find an element of degree $n$. If successful, it returns a list with two elements {$a,b$} such that $a/b$ has degree $n$. If it is impossible, it gives an error. If instead of an integer, you pass it a basic list corresponding to a multi-degree, it still tries to find $a, b$ in R such that $a/b$ has the provided multidegree. It only works on rings with flattened variables (ie, no Rees algebras). First we do an example without multidegrees.

 i1 : R = ZZ/7[x,y,Degrees=>{3, 5}]; i2 : output = findElementOfDegree(1, R) 2 o2 = {x , y} o2 : List i3 : output#0/output#1 2 x o3 = -- y o3 : frac R i4 : findElementOfDegree(-2, R) 2 4 o4 = {y , x } o4 : List

We also do an example with multidegrees

 i5 : R = QQ[x,y,Degrees=>{{1,2}, {3, 5}}]; i6 : output = findElementOfDegree({1, 3}, R) 4 o6 = {x , y} o6 : List i7 : output#0/output#1 4 x o7 = -- y o7 : frac R