Skip to content

Commit

Permalink
Adjust doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
joschmitt committed Jan 29, 2024
1 parent 98a2750 commit 81b94a4
Show file tree
Hide file tree
Showing 73 changed files with 1,172 additions and 580 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ julia> R, (x,y) = polynomial_ring(ZZ, ["x","y"])
(Multivariate polynomial ring in 2 variables over ZZ, ZZMPolyRingElem[x, y])
julia> I = ideal(R, [3*x^2*y+7*y, 4*x*y^2-5*x])
ideal(3*x^2*y + 7*y, 4*x*y^2 - 5*x)
Ideal generated by
3*x^2*y + 7*y
4*x*y^2 - 5*x
julia> G = groebner_basis(I, ordering = lex(R))
Gröbner basis with elements
Expand Down
4 changes: 3 additions & 1 deletion docs/src/CommutativeAlgebra/Miscellaneous/binomial_ideals.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ julia> is_binomial(f)
true
julia> J = ideal(R, [x^2-y^3, z^2])
ideal(x^2 - y^3, z^2)
Ideal generated by
x^2 - y^3
z^2
julia> is_binomial(J)
true
Expand Down
32 changes: 20 additions & 12 deletions docs/src/CommutativeAlgebra/affine_algebras.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ Multivariate polynomial ring in 3 variables x, y, z
over rational field
julia> modulus(A)
ideal(-x^2 + y, -x^3 + z)
Ideal generated by
-x^2 + y
-x^3 + z
julia> gens(A)
3-element Vector{MPolyQuoRingElem{QQMPolyRingElem}}:
Expand Down Expand Up @@ -231,7 +233,7 @@ julia> base_ring(a)
Quotient
of multivariate polynomial ring in 3 variables x, y, z
over rational field
by ideal(-x^2 + y, -x^3 + z)
by ideal (-x^2 + y, -x^3 + z)
julia> gens(a)
2-element Vector{MPolyQuoRingElem{QQMPolyRingElem}}:
Expand Down Expand Up @@ -369,7 +371,10 @@ defined by
z -> t^3
julia> twistedCubic = kernel(para)
ideal(-x*z + y^2, -w*z + x*y, -w*y + x^2)
Ideal generated by
-x*z + y^2
-w*z + x*y
-w*y + x^2
julia> C2, p2 = quo(D1, twistedCubic);
Expand All @@ -380,14 +385,15 @@ julia> V2 = [p2(w-y), p2(x), p2(z)];
julia> proj = hom(D2, C2, V2)
Ring homomorphism
from graded multivariate polynomial ring in 3 variables over QQ
to quotient of multivariate polynomial ring by ideal(-x*z + y^2, -w*z + x*y, -w*y + x^2)
to quotient of multivariate polynomial ring by ideal (-x*z + y^2, -w*z + x*y, -w*y + x^2)
defined by
a -> w - y
b -> x
c -> z
julia> nodalCubic = kernel(proj)
ideal(-a^2*c + b^3 - 2*b^2*c + b*c^2)
Ideal generated by
-a^2*c + b^3 - 2*b^2*c + b*c^2
```

Expand All @@ -408,10 +414,12 @@ defined by
y[3] -> x[2]*x[3]
julia> sphere = ideal(C3, [x[1]^3 + x[2]^3 + x[3]^3 - 1])
ideal(x[1]^3 + x[2]^3 + x[3]^3 - 1)
Ideal generated by
x[1]^3 + x[2]^3 + x[3]^3 - 1
julia> steinerRomanSurface = preimage(F3, sphere)
ideal(y[1]^6*y[2]^6 + 2*y[1]^6*y[2]^3*y[3]^3 + y[1]^6*y[3]^6 + 2*y[1]^3*y[2]^6*y[3]^3 + 2*y[1]^3*y[2]^3*y[3]^6 - y[1]^3*y[2]^3*y[3]^3 + y[2]^6*y[3]^6)
Ideal generated by
y[1]^6*y[2]^6 + 2*y[1]^6*y[2]^3*y[3]^3 + y[1]^6*y[3]^6 + 2*y[1]^3*y[2]^6*y[3]^3 + 2*y[1]^3*y[2]^3*y[3]^6 - y[1]^3*y[2]^3*y[3]^3 + y[2]^6*y[3]^6
```

Expand Down Expand Up @@ -439,7 +447,7 @@ julia> V = [p(2*a + b^6), p(7*b - a^2), p(c^2)];
julia> F = hom(D, C, V)
Ring homomorphism
from multivariate polynomial ring in 3 variables over QQ
to quotient of multivariate polynomial ring by ideal(-b^3 + c)
to quotient of multivariate polynomial ring by ideal (-b^3 + c)
defined by
x -> 2*a + c^2
y -> -a^2 + 7*b
Expand Down Expand Up @@ -528,17 +536,17 @@ julia> L[1]
julia> L[2]
Ring homomorphism
from quotient of multivariate polynomial ring by ideal(x*y, x*z)
to quotient of multivariate polynomial ring by ideal(2*x^2 + x*y, 10*x^2 + 5*x*y + x*z)
from quotient of multivariate polynomial ring by ideal (x*y, x*z)
to quotient of multivariate polynomial ring by ideal (2*x^2 + x*y, 10*x^2 + 5*x*y + x*z)
defined by
x -> x
y -> 2*x + y
z -> 10*x + 5*y + z
julia> L[3]
Ring homomorphism
from quotient of multivariate polynomial ring by ideal(2*x^2 + x*y, 10*x^2 + 5*x*y + x*z)
to quotient of multivariate polynomial ring by ideal(x*y, x*z)
from quotient of multivariate polynomial ring by ideal (2*x^2 + x*y, 10*x^2 + 5*x*y + x*z)
to quotient of multivariate polynomial ring by ideal (x*y, x*z)
defined by
x -> x
y -> -2*x + y
Expand Down
5 changes: 4 additions & 1 deletion docs/src/CommutativeAlgebra/ideals.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate polynomial ring in 2 variables over QQ, QQMPolyRingElem[x, y])
julia> I = ideal(R, [x, y])^2
ideal(x^2, x*y, y^2)
Ideal generated by
x^2
x*y
y^2
julia> base_ring(I)
Multivariate polynomial ring in 2 variables x, y
Expand Down
55 changes: 34 additions & 21 deletions docs/src/CommutativeAlgebra/localizations.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,12 @@ This reflects the way of creating localizations of quotients of multivariate pol
julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]);
julia> P = ideal(R, [x])
ideal(x)
Ideal generated by
x
julia> U = complement_of_prime_ideal(P)
Complement
of prime ideal(x)
of prime ideal (x)
in multivariate polynomial ring in 3 variables over QQ
julia> Rloc, _ = localization(U);
Expand All @@ -135,14 +136,18 @@ julia> K, a = number_field(2*t^2-1, "a");
julia> R, (x, y) = polynomial_ring(K, ["x", "y"]);
julia> I = ideal(R, [2*x^2-y^3, 2*x^2-y^5])
ideal(2*x^2 - y^3, 2*x^2 - y^5)
Ideal generated by
2*x^2 - y^3
2*x^2 - y^5
julia> P = ideal(R, [y-1, x-a])
ideal(y - 1, x - a)
Ideal generated by
y - 1
x - a
julia> U = complement_of_prime_ideal(P)
Complement
of prime ideal(y - 1, x - a)
of prime ideal (y - 1, x - a)
in multivariate polynomial ring in 2 variables over number field
julia> RQ, _ = quo(R, I);
Expand Down Expand Up @@ -181,11 +186,12 @@ julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"])
(Multivariate polynomial ring in 3 variables over QQ, QQMPolyRingElem[x, y, z])
julia> P = ideal(R, [x])
ideal(x)
Ideal generated by
x
julia> U = complement_of_prime_ideal(P)
Complement
of prime ideal(x)
of prime ideal (x)
in multivariate polynomial ring in 3 variables over QQ
julia> Rloc, iota = localization(U);
Expand Down Expand Up @@ -225,14 +231,18 @@ julia> K, a = number_field(2*t^2-1, "a");
julia> R, (x, y) = polynomial_ring(K, ["x", "y"]);
julia> I = ideal(R, [2*x^2-y^3, 2*x^2-y^5])
ideal(2*x^2 - y^3, 2*x^2 - y^5)
Ideal generated by
2*x^2 - y^3
2*x^2 - y^5
julia> P = ideal(R, [y-1, x-a])
ideal(y - 1, x - a)
Ideal generated by
y - 1
x - a
julia> U = complement_of_prime_ideal(P)
Complement
of prime ideal(y - 1, x - a)
of prime ideal (y - 1, x - a)
in multivariate polynomial ring in 2 variables over number field
julia> RQ, p = quo(R, I);
Expand Down Expand Up @@ -289,11 +299,12 @@ of representing `f` by pairs of elements of `RQ` and not the internal representa
julia> R, (x, y, z) = polynomial_ring(QQ, ["x", "y", "z"]);
julia> P = ideal(R, [x])
ideal(x)
Ideal generated by
x
julia> U = complement_of_prime_ideal(P)
Complement
of prime ideal(x)
of prime ideal (x)
in multivariate polynomial ring in 3 variables over QQ
julia> Rloc, iota = localization(U);
Expand All @@ -305,7 +316,7 @@ julia> parent(f)
Localization
of multivariate polynomial ring in 3 variables x, y, z
over rational field
at complement of prime ideal(x)
at complement of prime ideal (x)
julia> g = iota(y)/iota(z)
y/z
Expand All @@ -328,14 +339,18 @@ julia> K, a = number_field(2*t^2-1, "a");
julia> R, (x, y) = polynomial_ring(K, ["x", "y"]);
julia> I = ideal(R, [2*x^2-y^3, 2*x^2-y^5])
ideal(2*x^2 - y^3, 2*x^2 - y^5)
Ideal generated by
2*x^2 - y^3
2*x^2 - y^5
julia> P = ideal(R, [y-1, x-a])
ideal(y - 1, x - a)
Ideal generated by
y - 1
x - a
julia> U = complement_of_prime_ideal(P)
Complement
of prime ideal(y - 1, x - a)
of prime ideal (y - 1, x - a)
in multivariate polynomial ring in 2 variables over number field
julia> RQ, p = quo(R, I);
Expand All @@ -352,8 +367,8 @@ Localization
of quotient
of multivariate polynomial ring in 2 variables x, y
over number field of degree 2 over QQ
by ideal(2*x^2 - y^3, 2*x^2 - y^5)
at complement of prime ideal(y - 1, x - a)
by ideal (2*x^2 - y^3, 2*x^2 - y^5)
at complement of prime ideal (y - 1, x - a)
julia> g = f/phi(y)
x/y
Expand Down Expand Up @@ -441,9 +456,7 @@ julia> U = complement_of_point_ideal(R, [0, 0]);
julia> Rloc, _ = localization(R, U);
julia> MI = ideal(Rloc, V)
Ideal
of localized ring
with 2 generators
Ideal generated by
3*x^2
4*y^3
```
Expand Down
6 changes: 2 additions & 4 deletions docs/src/InvariantTheory/finite_groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,8 @@ Matrix group of degree 3
over cyclotomic field of order 3
julia> IR = invariant_ring(G)
Invariant ring of
Matrix group of degree 3 over cyclotomic field of order 3
with generators
AbstractAlgebra.Generic.MatSpaceElem{nf_elem}[[0 0 1; 1 0 0; 0 1 0], [1 0 0; 0 a 0; 0 0 -a-1]]
Invariant ring
of matrix group of degree 3 over cyclotomic field of order 3
julia> group(IR)
Matrix group of degree 3
Expand Down
13 changes: 10 additions & 3 deletions experimental/FTheoryTools/src/FamilyOfSpaces/attributes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ julia> f = family_of_spaces(coord_ring, grading, d)
A family of spaces of dimension d = 3
julia> stanley_reisner_ideal(f)
ideal(f*g*Kbar*u)
Ideal generated by
f*g*Kbar*u
```
"""
@attr MPolyIdeal{QQMPolyRingElem} function stanley_reisner_ideal(f::FamilyOfSpaces)
Expand Down Expand Up @@ -149,7 +150,11 @@ julia> f = family_of_spaces(coord_ring, grading, d)
A family of spaces of dimension d = 3
julia> irrelevant_ideal(f)
ideal(u, Kbar, g, f)
Ideal generated by
u
Kbar
g
f
```
"""
@attr MPolyIdeal{QQMPolyRingElem} function irrelevant_ideal(f::FamilyOfSpaces)
Expand Down Expand Up @@ -182,7 +187,9 @@ julia> f = family_of_spaces(coord_ring, grading, 3)
A family of spaces of dimension d = 3
julia> ideal_of_linear_relations(f)
ideal(-5*f + 3*g + 2*Kbar, -3*f + 2*g)
Ideal generated by
-5*f + 3*g + 2*Kbar
-3*f + 2*g
```
"""
@attr MPolyIdeal{QQMPolyRingElem} function ideal_of_linear_relations(f::FamilyOfSpaces)
Expand Down
2 changes: 1 addition & 1 deletion experimental/FTheoryTools/src/TateModels/attributes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ julia> length(singular_loci(t))
2
julia> singular_loci(t)[2]
(ideal(w), (1, 2, 3), "III")
(Ideal (w), (1, 2, 3), "III")
```
"""
@attr Vector{<:Tuple{<:MPolyIdeal{<:MPolyRingElem}, Tuple{Int64, Int64, Int64}, String}} function singular_loci(t::GlobalTateModel)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ One realization is given by
[0 0 0 1 x1 + 1 x1 1 x1 x1 + 1]
in the multivariate polynomial ring in 1 variable over GF(2)
within the vanishing set of the ideal
ideal(x1^2 + x1 + 1)
Ideal (x1^2 + x1 + 1)
julia> realization(uniform_matroid(3,6), char=5)
One realization is given by
Expand Down
9 changes: 6 additions & 3 deletions experimental/Schemes/BlowupMorphism.jl
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,17 @@ Spectrum
over rational field
julia> I = ideal(R, [x,y,z])
ideal(x, y, z)
Ideal generated by
x
y
z
julia> bl = blow_up(A3, I)
Blowup
of scheme over QQ covered with 1 patch
1b: [x, y, z] affine 3-space
in sheaf of ideals with restriction
1b: ideal(x, y, z)
1b: Ideal (x, y, z)
with domain
scheme over QQ covered with 3 patches
1a: [(s1//s0), (s2//s0), x] V(0, 0, 0)
Expand Down Expand Up @@ -241,7 +244,7 @@ Sheaf of ideals
on scheme over QQ covered with 1 patch
1: [x, y, z] affine 3-space
with restriction
1: ideal(x, y, z)
1: Ideal (x, y, z)
```
"""
@attributes mutable struct BlowupMorphism{
Expand Down
12 changes: 6 additions & 6 deletions experimental/Schemes/CartierDivisor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ Effective cartier divisor
3: [(x//z), (y//z)] affine 2-space
defined by
sheaf of ideals with restrictions
1: ideal(-(y//x)^2*(z//x) + 1)
2: ideal((x//y)^3 - (z//y))
3: ideal((x//z)^3 - (y//z)^2)
1: Ideal (-(y//x)^2*(z//x) + 1)
2: Ideal ((x//y)^3 - (z//y))
3: Ideal ((x//z)^3 - (y//z)^2)
julia> cartier_divisor(E)
Cartier divisor
Expand Down Expand Up @@ -227,9 +227,9 @@ Effective cartier divisor
3: [(x//z), (y//z)] affine 2-space
defined by
sheaf of ideals with restrictions
1: ideal(-(y//x)^2*(z//x) + 1)
2: ideal((x//y)^3 - (z//y))
3: ideal((x//z)^3 - (y//z)^2)
1: Ideal (-(y//x)^2*(z//x) + 1)
2: Ideal ((x//y)^3 - (z//y))
3: Ideal ((x//z)^3 - (y//z)^2)
```
"""
effective_cartier_divisor(I::IdealSheaf; trivializing_covering::Covering = default_covering(scheme(I)), check::Bool = true) = EffectiveCartierDivisor(I, trivializing_covering=trivializing_covering, check=check)
Expand Down
Loading

0 comments on commit 81b94a4

Please sign in to comment.