Skip to content

Commit

Permalink
Update booktests
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Oct 28, 2024
1 parent dbbea47 commit c07626a
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 64 deletions.
12 changes: 6 additions & 6 deletions test/book/cornerstones/algebraic-geometry/circlepar.jlcon
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ julia> I = ideal(R, [x^2 + y^2 - 1, y - t*x - 1]);

julia> Gy = groebner_basis(I, ordering = lex([y, x, t]), complete_reduction=true)
Gröbner basis with elements
1 -> x^2*t^2 + x^2 + 2*x*t
2 -> y - x*t - 1
1: x^2*t^2 + x^2 + 2*x*t
2: y - x*t - 1
with respect to the ordering
lex([y, x, t])

Expand All @@ -14,10 +14,10 @@ julia> factor(Gy[1])

julia> Gx = groebner_basis(I, ordering = lex([x, y, t]), complete_reduction=true)
Gröbner basis with elements
1 -> y^2*t^2 + y^2 - 2*y - t^2 + 1
2 -> x*t - y + 1
3 -> x*y - x + y^2*t - t
4 -> x^2 + y^2 - 1
1: y^2*t^2 + y^2 - 2*y - t^2 + 1
2: x*t - y + 1
3: x*y - x + y^2*t - t
4: x^2 + y^2 - 1
with respect to the ordering
lex([x, y, t])

Expand Down
6 changes: 3 additions & 3 deletions test/book/cornerstones/algebraic-geometry/ex11.jlcon
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ julia> I = ideal(R, [x^2+y^2+2*z^2-8, x^2-y^2-z^2+1, x-y+z]);

julia> groebner_basis(I, ordering = lex(R), complete_reduction = true)
Gröbner basis with elements
1 -> 6*z^4 - 18*z^2 + 1
2 -> y + 3*z^3 - 9*z
3 -> x + 3*z^3 - 8*z
1: 6*z^4 - 18*z^2 + 1
2: y + 3*z^3 - 9*z
3: x + 3*z^3 - 8*z
with respect to the ordering
lex([x, y, z])
60 changes: 31 additions & 29 deletions test/book/cornerstones/algebraic-geometry/ex314.jlcon
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ julia> p1 == ideal(minors(m3x3[1:3, 1:2],2))
true

julia> mp1 = ideal_as_module(p1)
Graded submodule of S^1
1 -> (-x_1*x_3 + x_2^2)*e[1]
2 -> (-x_0*x_3 + x_1*x_2)*e[1]
3 -> (-x_0*x_2 + x_1^2)*e[1]
Graded submodule of S^1 with 3 generators
1: (-x_1*x_3 + x_2^2)*e[1]
2: (-x_0*x_3 + x_1*x_2)*e[1]
3: (-x_0*x_2 + x_1^2)*e[1]
represented as subquotient with no relations

julia> M1, _ = quo(ambient_free_module(mp1), mp1);

julia> M1
Graded subquotient of submodule of S^1 generated by
1 -> e[1]
by submodule of S^1 generated by
1 -> (-x_1*x_3 + x_2^2)*e[1]
2 -> (-x_0*x_3 + x_1*x_2)*e[1]
3 -> (-x_0*x_2 + x_1^2)*e[1]
Graded subquotient of graded submodule of S^1 with 1 generator
1: e[1]
by graded submodule of S^1 with 3 generators
1: (-x_1*x_3 + x_2^2)*e[1]
2: (-x_0*x_3 + x_1*x_2)*e[1]
3: (-x_0*x_2 + x_1^2)*e[1]

julia> mJ = ideal_as_module(J);

Expand All @@ -50,43 +50,45 @@ julia> homM1M, psi = hom(M1, M);
julia> hom1, tohomM1M = prune_with_map(homM1M);

julia> hom1
Graded subquotient of submodule of S^2 generated by
1 -> e[1]
2 -> e[2]
by submodule of S^2 generated by
1 -> -x_2*e[1] + x_3*e[2]
2 -> x_0*e[1] - x_1*e[2]
3 -> -x_1*e[1] + x_2*e[2]
Graded subquotient of graded submodule of S^2 with 2 generators
1: e[1]
2: e[2]
by graded submodule of S^2 with 3 generators
1: -x_2*e[1] + x_3*e[2]
2: x_0*e[1] - x_1*e[2]
3: -x_1*e[1] + x_2*e[2]

julia> degrees_of_generators(hom1)
2-element Vector{FinGenAbGroupElem}:
[2]
[2]

julia> phi1 = psi(tohomM1M(hom1[1]))
M1 -> M
e[1] -> (-x_0*x_3 + x_1*x_2)*e[1]
Graded module homomorphism of degree [2]

from M1
to M
defined by
e[1] -> (-x_0*x_3 + x_1*x_2)*e[1]

julia> phi2 = psi(tohomM1M(hom1[2]))
M1 -> M
e[1] -> (-x_0*x_2 + x_1^2)*e[1]
Graded module homomorphism of degree [2]

from M1
to M
defined by
e[1] -> (-x_0*x_2 + x_1^2)*e[1]

julia> kerphi2, _ = kernel(phi2);

julia> iszero(kerphi2)
true

julia> MmodM1 = cokernel(phi2)
Graded subquotient of submodule of S^1 generated by
1 -> e[1]
by submodule of S^1 generated by
1 -> (x_1*x_3 - x_2^2)*e[1]
2 -> (-x_0^2*x_3 + 2*x_0*x_1*x_2 - x_1^3)*e[1]
3 -> (-x_0*x_2 + x_1^2)*e[1]
Graded subquotient of graded submodule of S^1 with 1 generator
1: e[1]
by graded submodule of S^1 with 3 generators
1: (x_1*x_3 - x_2^2)*e[1]
2: (-x_0^2*x_3 + 2*x_0*x_1*x_2 - x_1^3)*e[1]
3: (-x_0*x_2 + x_1^2)*e[1]

julia> p2 = ideal([x[1],x[2],x[3]])
Ideal generated by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ julia> secondary_invariants(RG)
julia> M, MtoR, StoR = module_syzygies(RG);

julia> M
Subquotient of Submodule with 5 generators
1 -> e[1]
2 -> e[2]
3 -> e[3]
4 -> e[4]
5 -> e[5]
by Submodule with 1 generator
1 -> t2*e[2] + (t2 + t3)*e[3] + t1*e[4]
Subquotient of submodule with 5 generators
1: e[1]
2: e[2]
3: e[3]
4: e[4]
5: e[5]
by submodule with 1 generator
1: t2*e[2] + (t2 + t3)*e[3] + t1*e[4]
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ julia> I = ideal(R, [x^2 + y + z - 1, x + y^2 + z - 1, x + y + z^2 - 1]);

julia> groebner_basis(I, ordering = o)
Gröbner basis with elements
1 -> z^6 - 4*z^4 + 4*z^3 - z^2
2 -> 2*y*z^2 + z^4 - z^2
3 -> x + y + z^2 - 1
4 -> y^2 + x + z - 1
1: z^6 - 4*z^4 + 4*z^3 - z^2
2: 2*y*z^2 + z^4 - z^2
3: x + y + z^2 - 1
4: y^2 + x + z - 1
with respect to the ordering
degrevlex([x, y])*degrevlex([z])

Expand All @@ -19,8 +19,8 @@ Ideal generated by

julia> groebner_basis(I)
Gröbner basis with elements
1 -> z^2 + x + y - 1
2 -> y^2 + x + z - 1
3 -> x^2 + y + z - 1
1: z^2 + x + y - 1
2: y^2 + x + z - 1
3: x^2 + y + z - 1
with respect to the ordering
degrevlex([x, y, z])
22 changes: 11 additions & 11 deletions test/book/specialized/eder-mohr-ideal-theoretic/lcis.jlcon
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]);
julia> I = ideal(R, [x*y, x*z, y*z]);

julia> conorm = subquotient(matrix(gens(I)), matrix(gens(I^2)))
Subquotient of Submodule with 3 generators
1 -> x*y*e[1]
2 -> x*z*e[1]
3 -> y*z*e[1]
by Submodule with 6 generators
1 -> x^2*y^2*e[1]
2 -> x^2*y*z*e[1]
3 -> x*y^2*z*e[1]
4 -> x^2*z^2*e[1]
5 -> x*y*z^2*e[1]
6 -> y^2*z^2*e[1]
Subquotient of submodule with 3 generators
1: x*y*e[1]
2: x*z*e[1]
3: y*z*e[1]
by submodule with 6 generators
1: x^2*y^2*e[1]
2: x^2*y*z*e[1]
3: x*y^2*z*e[1]
4: x^2*z^2*e[1]
5: x*y*z^2*e[1]
6: y^2*z^2*e[1]

julia> fitting_ideal(conorm, 1)
Ideal generated by
Expand Down

0 comments on commit c07626a

Please sign in to comment.