File: isSubset-doc.m2

package info (click to toggle)
macaulay2 1.25.05%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 172,152 kB
  • sloc: cpp: 107,824; ansic: 16,193; javascript: 4,189; makefile: 3,899; lisp: 702; yacc: 604; sh: 476; xml: 177; perl: 114; lex: 65; python: 33
file content (56 lines) | stat: -rw-r--r-- 1,596 bytes parent folder | download | duplicates (5)
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
-- -*- coding: utf-8 -*-
--- status: TODO
--- author(s): 
--- notes: 

document { 
     Key => isSubset,
     Headline => "whether one object is a subset of another"
     }
document { 
     Key => { (isSubset, Set, Set), (isSubset, Set, VisibleList), (isSubset, VisibleList, Set), (isSubset, VisibleList, VisibleList)},
     Usage => "isSubset(x,y)",
     Inputs => {
	  "x" => {ofClass {Set, List}},
	  "y" => {ofClass {Set, List}},
	  },
     Outputs => {
	  Boolean => {"whether every element of ", TT "x", " is in ", TT "y"},
	  },
     EXAMPLE {
	  "isSubset(set{a},set{a,b,c})",
	  "isSubset({a},set{a,b,c})",
	  "isSubset({a,a},{a,b,c})"
	  },
     SeeAlso => {Set}
     }

document { 
     Key => {(isSubset,Module,Module),(isSubset,Ideal,Module),(isSubset,Module,Ideal)},
     Usage => "isSubset(M,N)",
     Inputs => { "M", "N" },
     Outputs => { Boolean => {"whether ", TT "M", " is contained in ", TT "N"} },
     EXAMPLE lines ///
     	  R = QQ[x,y]
	  M = image matrix {{x,0},{0,y}}
	  N = image matrix {{x^2,0},{-y,y}}
	  isSubset(N,M)
	  isSubset(M,N)
     ///
     }

document {
     Key => {(isSubset,Ideal,Ideal)},
     Usage => "isSubset(I,J)",
     Inputs => { "I", "J" },
     Outputs => { Boolean => {"whether ", TT "I", " is contained in ", TT "J"} },
     EXAMPLE {
	  "R = QQ[a..d];",
	  "I = ideal(a^2-b*c-1,a*c-1,b^3-1);",
	  "isSubset(I^2,I)",
	  "isSubset(I,I^2)"
	  },
     "In polynomial rings, this is accomplished by computing a Gröbner basis of ", TT "J", " and testing 
     whether every element of ", TT "I", " reduces to 0 modulo ", TT "I", "."
     }