File: ideal_properties.rules

package info (click to toggle)
polymake 4.6-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 32,288 kB
  • sloc: cpp: 156,233; perl: 42,962; javascript: 30,726; ansic: 2,907; java: 2,654; python: 641; sh: 244; xml: 117; makefile: 61
file content (188 lines) | stat: -rw-r--r-- 6,925 bytes parent folder | download
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
#  Copyright (c) 1997-2021
#  Ewgenij Gawrilow, Michael Joswig, and the polymake team
#  Technische Universität Berlin, Germany
#  https://polymake.org
#
#  This program is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by the
#  Free Software Foundation; either version 2, or (at your option) any
#  later version: http://www.gnu.org/licenses/gpl.txt.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#-------------------------------------------------------------------------------


# Note:
# So far we assume all ideals living in a polynomial ring with a global
# monomial ordering. If you need something else please contact the authors.
object Ideal {

   # @category Commutative algebra
   # The depth of the ideal.
   # @depends singular
   property DEPTH : Int;

   # @category Commutative algebra
   # The dimension of the ideal, i.e. the Krull dimension of Polynomial ring/Ideal.
   # @depends singular
   property DIM : Int;

	# @category Commutative algebra
	# The number of variables of the polynomial ring containing the ideal.
	property N_VARIABLES : Int;

   # @category Input properties
   # A set of generators usually given by the user and not unique.
   property GENERATORS : Array<Polynomial> {
      sub equal {
         defined(find_permutation(@_))
      }
   }

   # @category Commutative algebra
   # Subobject containing properties that depend on the monomial ordering of the ring.
   # @depends singular
   property GROEBNER : Groebner : multiple;

   # @category Commutative algebra
   # The Hilbert polynomial of the ideal. For toric ideals this is linked with
   # the Ehrhart polynomial.
   property HILBERT_POLYNOMIAL : Polynomial;

   # @category Commutative algebra
   # True if the ideal can be generated by homogeneous polynomials.
   property HOMOGENEOUS : Bool;

   # @category Commutative algebra
   # True if the ideal can be generated by monomials.
   property MONOMIAL : Bool;

   # @category Commutative algebra
   # True if the is ideal a prime ideal.
   property PRIME : Bool;

   # @category Commutative algebra
   # True if the ideal is a primary ideal. I.e. its [[RADICAL]] is [[PRIME]] and
   # in the quotient ring by the ideal every zero divisor is nilpotent.
   property PRIMARY : Bool;

   # @category Commutative algebra
   # An array containing the primary decomposition of the given ideal, i.e. the
   # contained ideals are [[PRIMARY]] and their intersection is the given ideal.
   # @depends singular
   property PRIMARY_DECOMPOSITION : Array<Ideal>;

   # @category Commutative algebra
   # The radical of the ideal.
   # @depends singular
   property RADICAL : Ideal;

   # @category Commutative algebra
   # True if the ideal is the zero ideal.
   property ZERO : Bool;

   property BINOMIAL : Bool;
}

# This object contains all properties of an ideal that depend on the monomial ordering.
object Groebner {

   # @category Commutative algebra
   # The elements of the Groebner basis corresponding to the given order. This
   # may vary for different algorithms, even if the order stays the same.
   # @depends singular
   property BASIS : Array<Polynomial>;

   # @category Commutative algebra
   # The initial order corresponding to the given order. This is always a
   # [[ideal::Ideal::MONOMIAL|MONOMIAL]] ideal, even if only a weight vector is provided. Internally this
   # weight vector will be concatenated with a total order.
   # @depends singular
   property INITIAL_IDEAL : Ideal;

   # @category Commutative algebra
   # The initial forms of all polynomials in the [[BASIS]], with respect to either the [[ORDER_VECTOR]] or
   # the first row of the [[ORDER_MATRIX]].
   # @depends singular
   property INITIAL_FORMS : Array<Polynomial>;

   # @category Input properties
   # The matrix defining the monomial ordering.
   # For performance reasons this is realized via several weight vectors preceding a lexicographic order.
   # (Singular: a(row), a(row),...,lp)
   #
   # Note that only one of [[ORDER_MATRIX]], [[ORDER_VECTOR]], [[ORDER_NAME]]
   # should be given.
   property ORDER_MATRIX : Matrix<Int>;

   # @category Input properties
   # A weight vector for the monomial ordering, a reverse lexicographic order will be used
   # as tie-breaker. (Singular: ''wp(vector)'')
   # This vector is expected to consist of positive integers only.
   #
   # Note that only one of [[ORDER_MATRIX]], [[ORDER_VECTOR]], [[ORDER_NAME]]
   # should be given.
   property ORDER_VECTOR : Vector<Int>;

   # @category Input properties
   # A string containing the name of the monomial ordering. Currently we follow
   # the singular conventions, i.e. dp, lp, rp, ds, etc.
   #
   # Note that only one of [[ORDER_MATRIX]], [[ORDER_VECTOR]], [[ORDER_NAME]]
   # should be given.
   property ORDER_NAME : String;

}

# A binomial ideal represents an ideal which is generated by polynomials of
# the form p(X) - q(X), where p(X) and q(X) are both multivariate monomials.
# For example, x1*x2^2 - x1x3x4^10 would be a polynomial of this form, but
# x1^2 + x1 and  2x1 - x3 are not polynomials of this form.
#
# Toric ideals of lattice polytopes are one example of an ideal which may
# be represented by such a generating set. Since these generator sets have a
# special form, they may be represented compactly with a matrix.
declare object_specialization Binomial = Ideal {

    precondition : BINOMIAL;

   # An integer matrix representation of a generating set of the binomial ideal.
   # Rows correspond to polynomials, and columns to variables.
   # The absolute value of an entry determines the degree of the coefficient
   # of the corresponding column variable in the row polynomial.
   # The parity determines whether it is in the positive or negative monomial.
   #
   # For example, the row (1, -3, -1, 0, 2) corresponds to the polynomial
   # x0*x4^2 - x^2*x3.
   #
   # @example The following declares a binomial ideal via its matrix encoding,
   #          and reencodes it into polynomials.
   # > $mat = new Matrix<Int>([1,2,0,-4],[3,1,0,1],[-4,-3,0,0]);
   # > $ideal = new Ideal(BINOMIAL_GENERATORS=>$mat);
   # print $ideal->GENERATORS;
   # x_0*x_1^2 - x_3^4 x_0^3*x_1*x_3 - 1 - x_0^4*x_1^3 + 1
   property BINOMIAL_GENERATORS : Matrix<Int>;


   property GROEBNER {

        # An integer matrix representation of a binomial groebner basis.
        # Rows correspond to polynomials, and columns to variables.
        #
        # For example, the row (1, -3, -1, 0, 2) corresponds to the polynomial
        # x0*x4^2 - x^2*x3. 
        property BINOMIAL_BASIS : Matrix<Int>;


    }
}


# Local Variables:
# mode: perl
# cperl-indent-level:3
# indent-tabs-mode:nil
# End: