Skip to content

Commit

Permalink
assert -> req
Browse files Browse the repository at this point in the history
Co-authored-by: Tommy Hofmann <[email protected]>
  • Loading branch information
HechtiDerLachs and thofma authored Oct 16, 2024
1 parent 05cb7e4 commit a293359
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Modules/UngradedModules/FreeMod.jl
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ function syzygy_generators(
R = base_ring(F)
m = length(g)
G = (parent === nothing ? FreeMod(R, m) : parent)::typeof(F)
@assert ngens(G) == m "given parent does not have the correct number of generators"
@req ngens(G) != m "given parent does not have the correct number of generators"
phi = hom(G, F, g)
K, _ = kernel(phi)
return ambient_representatives_generators(K)
Expand Down Expand Up @@ -367,7 +367,7 @@ function syzygy_generators(
I = ideal(R, a)
s = Singular.syz(singular_generators(I))
F = (parent === nothing ? FreeMod(R, length(a)) : parent)::FreeMod{T}
@assert ngens(F) == length(a) "parent does not have the correct number of generators"
@req ngens(F) != length(a) "parent does not have the correct number of generators"
@assert rank(s) == length(a)
return elem_type(F)[F(s[i]) for i=1:Singular.ngens(s)]
end
Expand Down
2 changes: 1 addition & 1 deletion test/Modules/UngradedModules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1310,6 +1310,6 @@ end
@test s1 == s2
s3 = syzygy_generators(ambient_representatives_generators(M))
@test s3 != s2
@test_throws AssertionError syzygy_generators(ambient_representatives_generators(M); parent=F)
@test_throws ArgumentError syzygy_generators(ambient_representatives_generators(M); parent=F)
end

0 comments on commit a293359

Please sign in to comment.