|
| 1 | +@testset "Quotient basis" begin |
| 2 | + R, (x, y) = polynomial_ring(QQ, ["x", "y"], internal_ordering = :degrevlex) |
| 3 | + |
| 4 | + @test Set(quotient_basis([x, y])) == Set([R(1)]) |
| 5 | + @test Set(quotient_basis([x + y, y])) == Set([R(1)]) |
| 6 | + @test Set(quotient_basis([-2x + 8, 10y + 1])) == Set([R(1)]) |
| 7 | + |
| 8 | + @test Set(quotient_basis([x^2 + 1, y^2 - x - 1])) == Set([R(1), y, x, x * y]) |
| 9 | + @test Set(quotient_basis([8x^5 + 1, y - 1])) == Set([R(1), x, x^2, x^3, x^4]) |
| 10 | + @test Set(quotient_basis([x^2, y^2, x * y])) == Set([R(1), y, x]) |
| 11 | + @test Set(quotient_basis([x^3, y^3, x * y])) == Set([R(1), y, x, y^2, x^2]) |
| 12 | + @test length(quotient_basis([8x^77 + 1, y^34 - 1])) == 77 * 34 |
| 13 | + |
| 14 | + R, (x, y) = polynomial_ring(QQ, ["x", "y"], internal_ordering = :lex) |
| 15 | + @test Set(quotient_basis([x, y])) == Set([R(1)]) |
| 16 | + @test Set(quotient_basis([x + y, y])) == Set([R(1)]) |
| 17 | + @test Set(quotient_basis([-2x + 8, 10y + 1])) == Set([R(1)]) |
| 18 | + |
| 19 | + @test Set(quotient_basis([x^2 + 1, y^2 - 1])) == Set([R(1), y, x, x * y]) |
| 20 | + @test Set(quotient_basis([8x^5 + 1, y - 1])) == Set([R(1), x, x^2, x^3, x^4]) |
| 21 | + @test Set(quotient_basis([x^2, y^2, x * y])) == Set([R(1), y, x]) |
| 22 | + @test Set(quotient_basis([x^3, y^3, x * y])) == Set([R(1), y, y^2, x, x^2]) |
| 23 | + @test length(quotient_basis([8x^77 + 1, y^34 - 1])) == 77 * 34 |
| 24 | + |
| 25 | + R, (x, y) = polynomial_ring(QQ, ["x", "y"], internal_ordering = :deglex) |
| 26 | + |
| 27 | + @test Set(quotient_basis([x, y])) == Set([R(1)]) |
| 28 | + @test Set(quotient_basis([x + y, y])) == Set([R(1)]) |
| 29 | + @test Set(quotient_basis([-2x + 8, 10y + 1])) == Set([R(1)]) |
| 30 | + |
| 31 | + @test Set(quotient_basis([x^2 + 1, y^2 - x - 1])) == Set([R(1), y, x, x * y]) |
| 32 | + @test Set(quotient_basis([8x^5 + 1, y - 1])) == Set([R(1), x, x^2, x^3, x^4]) |
| 33 | + @test Set(quotient_basis([x^2, y^2, x * y])) == Set([R(1), y, x]) |
| 34 | + @test Set(quotient_basis([x^3, y^3, x * y])) == Set([R(1), y, x, y^2, x^2]) |
| 35 | + @test length(quotient_basis([8x^77 + 1, y^34 - 1])) == 77 * 34 |
| 36 | +end |
0 commit comments