File: topCoefficients-doc.m2

package info (click to toggle)
macaulay2 1.24.11%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 171,648 kB
  • sloc: cpp: 107,850; ansic: 16,307; javascript: 4,188; makefile: 3,947; lisp: 682; yacc: 604; sh: 476; xml: 177; perl: 114; lex: 65; python: 33
file content (39 lines) | stat: -rw-r--r-- 1,473 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--- status: DRAFT
--- author(s): MES
--- notes: 

document { 
     Key => {topCoefficients,
	  (topCoefficients, RingElement),
	  (topCoefficients, Matrix)},
     Headline => "first variable and its coefficient of a polynomial or matrix",     
     Usage => "(lf, cf) = topCoefficients f",
     Inputs => {
	  "f" => Nothing => {ofClass RingElement, " or ", ofClass Matrix}
	  },
     Outputs => {
	  "lf" => Nothing => {ofClass RingElement, ", or ", ofClass Matrix, 
	       ", the power of the lowest index variable occurring in f, if f is a ring element,
	     or the one row matrix of these powers for each column, if f is a matrix."},
	  "cf" => Nothing => {ofClass RingElement, ", or ", ofClass Matrix, 
	       ", the coefficient of lf in f, if f is a ring element,
	       or the matrix of these coefficients for each column of f"}
	  },
     EXAMPLE lines ///
     	  A = ZZ[x]
	  (lf,cf) = topCoefficients (7*x^4-13*x^3+x+1)
	  v = first support lf
	  e = first degree lf
	  ///,
     "The polynomial ring may have more variables.",
     EXAMPLE lines ///
     	  B = ZZ[x,y,z]
	  f = y^4*(3*z^3-z^2-1) - y^3*z^7 + y + z^12
	  (lf,cf) = topCoefficients f
          ///,
     Caveat => {"If the polynomial ring B of f has a polynomial coefficient ring A, 
         and no variables of B occur in f, then this 'drills down' into A and finds the
         top variable and coefficient there, but as elements of B"
         },
     SeeAlso => {pseudoRemainder}
     }