File: part-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 (130 lines) | stat: -rw-r--r-- 3,570 bytes parent folder | download | duplicates (3)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
--- status: rewritten September 2018
--- author(s): Lily Silverstein
--- notes: 

-*
-- TODO
part(InfiniteNumber,InfiniteNumber,Number)
part(InfiniteNumber,ZZ,Number)
part(ZZ,InfiniteNumber,Number)
part(ZZ,Number)
part(ZZ,ZZ,Number)
*-

doc///
 Key
  part
  (part,List,RingElement)
  (part,ZZ,ZZ,VisibleList,RingElement)
  (part,InfiniteNumber,InfiniteNumber,RingElement)
  (part,InfiniteNumber,InfiniteNumber,VisibleList,RingElement)
  (part,InfiniteNumber,ZZ,RingElement)
  (part,InfiniteNumber,ZZ,VisibleList,RingElement)
  (part,Nothing,Nothing,RingElement)
  (part,Nothing,Nothing,VisibleList,RingElement)
  (part,Nothing,ZZ,RingElement)
  (part,Nothing,ZZ,VisibleList,RingElement)
  (part,ZZ,InfiniteNumber,RingElement)
  (part,ZZ,InfiniteNumber,VisibleList,RingElement)
  (part,ZZ,Nothing,RingElement)
  (part,ZZ,Nothing,VisibleList,RingElement)
  (part,ZZ,RingElement)
  (part,ZZ,VisibleList,RingElement)
  (part,ZZ,ZZ,RingElement)
 Headline
  select terms of a polynomial by degree(s) or weight(s)
 Usage
  part(deg, f)
  part(lo, hi, f)
  part(deg, f)
  part(lo, hi, wt, f)
  part(mdeg, f)
  part_deg f
 Inputs
  f:RingElement
   a polynomial
  deg:ZZ
   in which degree to select terms from {\tt f}
  lo:ZZ
   or @TO InfiniteNumber@, the lower bound of degrees to select
  hi:ZZ
   or @TO InfiniteNumber@, the upper bound of degrees to select
  wt:List
   (optionally) a list of integers to use as weights before selecting degrees
  mdeg:List
   a multidegree, in the case that {\tt f} is defined in a multigraded ring
 Outputs
  :RingElement
   the sum of all terms of {\tt f} matching the specified degree or range of degrees (after weighting, if weights given)
 Description
  Text
   To select terms of a single degree, use {\tt part(deg, f)}. An alternate syntax
   uses an underscore.
  Example
   R = QQ[x,y];
   f = (x+y+1)^4
   part(2, f)
   part_2 f
  Text
   To select terms within a range of degrees, use {\tt part(lo, hi, f)}. 
  Example
   part(1, 2, f) 
  Text
   In the next example, we apply the weights {\tt \{2,3\}} before selecting terms. In other words, the term
   {\tt x^ay^b} is considered to have degree {\tt 2a+3b}.
  Example
   part(6, {2,3}, f)
   part(6, 8, {2,3}, f)
  Text
   If the generators of the ring were defined to have non-unit degrees,
   the weights {\em override} those degrees.
  Example
   R = QQ[x,y, Degrees=>{2,3}];
   f = (x+y+1)^4
   part(2, f)
   part(2, {1,1}, f)
  Text
   By omitting {\tt lo} or {\tt hi}, but providing a comma indicating the omission, the range of degrees will
   be unbounded in the appropriate direction.
  Example
   S = QQ[a,b,c]
   g = (a - b*c + 2)^3
   part(4, , g)
   part(, 3, g)
   part(, 3, 1..3, g)
  Text
   Infinite numbers may also be given for the bounds.
  Example
   part(4, infinity, g)
   part(-infinity, 3, g)
   part(-infinity, infinity, 1..3, g)
  Text
   For {\bf multigraded rings}, use a list to specify a single multidegree in the first argument.
   The underscore syntax works here too.
  Example
   R = QQ[x,y,z, Degrees => {{1,0,0},{0,1,0},{0,0,1}}];
   f = (x+y+z)^3
   part({2,0,1}, f)
   part_{2,0,1} f
  Text
   A range of degrees cannot be asked for in the multigraded case.
   Polynomial rings over polynomial rings are multigraded, so either use a 
   multidegree or specify weights to avoid errors.
  Example
   R = QQ[a][x];
   h = (1+a+x)^3
   part(2, {1,0}, h)
   part(2, {0,1}, h)
   part({2,1}, h)
 SeeAlso
  degree
  monomials
  parts
  select
  someTerms
  terms
  "graded and multigraded polynomial rings"
  "manipulating polynomials"
///