File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -328,6 +328,10 @@ function ordering end
328
328
ordering (:: Type{<:AbstractMonomial} ) = Graded{LexOrder}
329
329
ordering (:: Type{P} ) where {P} = ordering (monomial_type (P))
330
330
ordering (p:: AbstractPolynomialLike ) = ordering (typeof (p))
331
+ # Useful for instance to ask ordering given the list
332
+ # of variables
333
+ ordering (:: AbstractVector{T} ) where {T} = ordering (T)
334
+ ordering (t:: Tuple ) = ordering (first (t))
331
335
332
336
# We reverse the order of comparisons here so that the result
333
337
# of x < y is equal to the result of Monomial(x) < Monomial(y)
Original file line number Diff line number Diff line change 1
1
@testset " Comparison" begin
2
2
@testset " Graded Lex Order" begin
3
3
Mod. @polyvar x y z
4
+ O = Graded{LexOrder}
5
+ @test ordering (x) == O
6
+ @test ordering (x * y) == O
7
+ @test ordering (variables (x * y)) == O
4
8
@test x > y > z
5
9
@test x^ 2 * y > y^ 3 > z
6
10
@test y^ 2 >= x
You can’t perform that action at this time.
0 commit comments