Skip to content

Commit f67fd40

Browse files
Alexey Stukalovalyst
authored andcommitted
fix lexlt
ignore degrees (a[2], b[2]) if syms (a[1], b[1]) are not equal
1 parent 6769a88 commit f67fd40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ordering.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ end
5757
function lexlt(degs1, degs2)
5858
for (a, b) in zip(degs1, degs2)
5959
if a[1] == b[1] && a[2] != b[2]
60-
return a[2] > b[2]
60+
return a[2] > b[2] # higher degree first
6161
elseif a[1] != b[1]
62-
return a < b
62+
return a[1] < b[1] # lexicographic order for the base
6363
end
6464
end
6565
return false # they are equal

0 commit comments

Comments
 (0)