Description Usage Arguments Value Examples
Create a new ideal in Macaulay2
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 | ideal(..., raw_chars = FALSE, code = FALSE)
ideal.(..., raw_chars = FALSE, code = FALSE)
ideal_(x, raw_chars = FALSE, code = FALSE, ...)
ideal_.(x, raw_chars = FALSE, code = FALSE, ...)
## S3 method for class 'm2_ideal'
print(x, ...)
## S3 method for class 'm2_ideal_list'
print(x, ...)
radical(ideal, ring, code = FALSE, ...)
radical.(ideal, ring, code = FALSE, ...)
saturate(I, J, code = FALSE, ...)
saturate.(I, J, code = FALSE, ...)
quotient(I, J, code = FALSE, ...)
quotient.(I, J, code = FALSE, ...)
primary_decomposition(ideal, code = FALSE, ...)
primary_decomposition.(ideal, code = FALSE, ...)
dimension(ideal, code = FALSE, ...)
## S3 method for class 'm2_ideal'
e1 + e2
## S3 method for class 'm2_ideal'
e1 * e2
## S3 method for class 'm2_ideal'
e1 == e2
## S3 method for class 'm2_ideal'
e1 ^ e2
|
... |
... |
raw_chars |
if |
code |
return only the M2 code? (default: |
x |
a listing of polynomials. several formats are accepted, see examples. |
ideal |
an ideal object of class |
ring |
the referent ring in Macaulay2 |
I, J |
ideals or objects parsable into ideals |
e1, e2 |
ideals for arithmetic |
a reference to a Macaulay2 ideal
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 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | ## Not run: requires Macaulay2
##### basic usage
########################################
ring("x", "y", coefring = "QQ")
ideal("x + y", "x^2 + y^2")
##### different versions of gb
########################################
# standard evaluation version
poly_chars <- c("x + y", "x^2 + y^2")
ideal_(poly_chars)
# reference nonstandard evaluation version
ideal.("x + y", "x^2 + y^2")
# reference standard evaluation version
ideal_.(poly_chars)
##### different inputs to gb
########################################
ideal_( c("x + y", "x^2 + y^2") )
ideal_(mp(c("x + y", "x^2 + y^2")))
ideal_(list("x + y", "x^2 + y^2") )
##### predicate functions
########################################
I <- ideal ("x + y", "x^2 + y^2")
I. <- ideal.("x + y", "x^2 + y^2")
is.m2_ideal(I)
is.m2_ideal(I.)
is.m2_ideal_pointer(I)
is.m2_ideal_pointer(I.)
##### ideal radical
########################################
I <- ideal("(x^2 + 1)^2 y", "y + 1")
radical(I)
radical.(I)
##### ideal dimension
########################################
I <- ideal_(c("(x^2 + 1)^2 y", "y + 1"))
dimension(I)
# dimension of a line
ring("x", "y", coefring = "QQ")
I <- ideal("y - (x+1)")
dimension(I)
# dimension of a plane
ring("x", "y", "z", coefring = "QQ")
I <- ideal("z - (x+y+1)")
dimension(I)
##### ideal quotients and saturation
########################################
ring("x", "y", "z", coefring = "QQ")
(I <- ideal("x^2", "y^4", "z + 1"))
(J <- ideal("x^6"))
quotient(I, J)
quotient.(I, J)
saturate(I)
saturate.(I)
saturate(I, J)
saturate(I, mp("x"))
saturate(I, "x")
ring("x", "y", coefring = "QQ")
saturate(ideal("x y"), "x^2")
# saturation removes parts of varieties
# solution over R is x = -1, 0, 1
ring("x", coefring = "QQ")
I <- ideal("(x-1) x (x+1)")
saturate(I, "x") # remove x = 0 from solution
ideal("(x-1) (x+1)")
##### primary decomposition
########################################
ring("x", "y", "z", coefring = "QQ")
I <- ideal("(x^2 + 1) (x^2 + 2)", "y + 1")
primary_decomposition(I)
primary_decomposition.(I)
I <- ideal("x (x + 1)", "y")
primary_decomposition(I)
# variety = z axis union x-y plane
(I <- ideal("x z", "y z"))
dimension(I) # = max dimension of irreducible components
(Is <- primary_decomposition(I))
dimension(Is)
##### ideal arithmetic
########################################
ring("x", "y", "z", coefring = "RR")
# sums (cox et al., 184)
(I <- ideal("x^2 + y"))
(J <- ideal("z"))
I + J
# products (cox et al., 185)
(I <- ideal("x", "y"))
(J <- ideal("z"))
I * J
# equality
(I <- ideal("x", "y"))
(J <- ideal("z"))
I == J
I == I
# powers
(I <- ideal("x", "y"))
I^3
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.