|
146 | 146 | grlex = Graded{lex}
|
147 | 147 | rinvlex = Reverse{InverseLexOrder}
|
148 | 148 | grevlex = Graded{rinvlex}
|
149 |
| - @test MP.compare([1, 0, 1], [1, 1, 0], grlex) == -1 |
150 |
| - @test MP.compare([1, 1, 0], [1, 0, 1], grlex) == 1 |
151 | 149 | Mod.@polyvar x y z
|
152 | 150 | # [CLO13, p. 58]
|
153 |
| - @test MP.compare(1:3, [3, 2, 0], lex) < 0 |
154 |
| - @test MP.compare(1:3, [3, 2, 0], grlex) > 0 |
155 |
| - @test MP.compare(1:3, [3, 2, 0], rinvlex) < 0 |
156 |
| - @test MP.compare(1:3, [3, 2, 0], grevlex) > 0 |
157 |
| - @test MP.compare([1, 2, 4], [1, 1, 5], lex) > 0 |
158 |
| - @test MP.compare([1, 2, 4], [1, 1, 5], grlex) > 0 |
159 |
| - @test MP.compare([1, 2, 4], [1, 1, 5], rinvlex) > 0 |
160 |
| - @test MP.compare([1, 2, 4], [1, 1, 5], grevlex) > 0 |
161 |
| - @test MP.compare(x * y^2 * z^3, x^3 * y^2, lex) < 0 |
162 |
| - @test MP.compare(x * y^2 * z^3, x^3 * y^2, grlex) > 0 |
163 |
| - @test MP.compare(x * y^2 * z^3, x^3 * y^2, rinvlex) < 0 |
164 |
| - @test MP.compare(x * y^2 * z^3, x^3 * y^2, grevlex) > 0 |
165 |
| - @test MP.compare(x * y^2 * z^4, x * y * z^5, lex) > 0 |
166 |
| - @test MP.compare(x * y^2 * z^4, x * y * z^5, grlex) > 0 |
167 |
| - @test MP.compare(x * y^2 * z^4, x * y * z^5, rinvlex) > 0 |
168 |
| - @test MP.compare(x * y^2 * z^4, x * y * z^5, grevlex) > 0 |
| 151 | + @test compare(x * y^2 * z^3, x^3 * y^2, lex) < 0 |
| 152 | + @test compare(x * y^2 * z^3, x^3 * y^2, grlex) > 0 |
| 153 | + @test compare(x * y^2 * z^3, x^3 * y^2, rinvlex) < 0 |
| 154 | + @test compare(x * y^2 * z^3, x^3 * y^2, grevlex) > 0 |
| 155 | + @test compare(x * y^2 * z^4, x * y * z^5, lex) > 0 |
| 156 | + @test compare(x * y^2 * z^4, x * y * z^5, grlex) > 0 |
| 157 | + @test compare(x * y^2 * z^4, x * y * z^5, rinvlex) > 0 |
| 158 | + @test compare(x * y^2 * z^4, x * y * z^5, grevlex) > 0 |
169 | 159 | # [CLO13, p. 59]
|
170 |
| - @test MP.compare(x^5 * y * z, x^4 * y * z^2, lex) > 0 |
171 |
| - @test MP.compare(x^5 * y * z, x^4 * y * z^2, grlex) > 0 |
172 |
| - @test MP.compare(x^5 * y * z, x^4 * y * z^2, rinvlex) > 0 |
173 |
| - @test MP.compare(x^5 * y * z, x^4 * y * z^2, grevlex) > 0 |
| 160 | + @test compare(x^5 * y * z, x^4 * y * z^2, lex) > 0 |
| 161 | + @test compare(x^5 * y * z, x^4 * y * z^2, grlex) > 0 |
| 162 | + @test compare(x^5 * y * z, x^4 * y * z^2, rinvlex) > 0 |
| 163 | + @test compare(x^5 * y * z, x^4 * y * z^2, grevlex) > 0 |
174 | 164 | # [CLO13] Cox, D., Little, J., & OShea, D.
|
175 | 165 | # *Ideals, varieties, and algorithms: an introduction to computational algebraic geometry and commutative algebra*.
|
176 | 166 | # Springer Science & Business Media, **2013**.
|
|
0 commit comments