Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exterior powers of finitely presented modules #2879

Merged
merged 36 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
c5f674f
Implement a prototype for exterior powers of free modules.
HechtiDerLachs Oct 2, 2023
f2ca620
Implement Koszul complexes associated to elements of free modules.
HechtiDerLachs Oct 3, 2023
ed0e6f9
Preserve gradings and implement koszul dual bases.
HechtiDerLachs Oct 3, 2023
abfc597
Implement induced maps on exterior powers.
HechtiDerLachs Oct 3, 2023
7947688
Some tweaks.
HechtiDerLachs Oct 3, 2023
4062c3b
Move everything to appropriate places.
HechtiDerLachs Oct 3, 2023
48b9752
Implement iteration over module monomials of a specific degree.
HechtiDerLachs Oct 4, 2023
4c34531
Add trailing zeroes to the Koszul complex.
HechtiDerLachs Oct 4, 2023
af69344
Allow custom parents and no caching.
HechtiDerLachs Oct 5, 2023
37de4fe
Revert "Implement iteration over module monomials of a specific degree."
HechtiDerLachs Oct 5, 2023
1e0b127
Extend optional caching to Koszul complexes.
HechtiDerLachs Oct 5, 2023
6ace053
Add extra multiplication function.
HechtiDerLachs Oct 5, 2023
9a4b50e
Some tweaks.
HechtiDerLachs Oct 5, 2023
36f6396
Customize printing.
HechtiDerLachs Oct 6, 2023
769478e
Add pure and inv_pure.
HechtiDerLachs Oct 6, 2023
fd61072
Put the check back in.
HechtiDerLachs Oct 6, 2023
aa9828b
Migrate the OrderedMultiIndex.
HechtiDerLachs Oct 6, 2023
5fce897
Export the new functionality.
HechtiDerLachs Oct 6, 2023
c25a897
Clean up the include statements.
HechtiDerLachs Oct 6, 2023
2de9aad
Implement hom method.
HechtiDerLachs Oct 6, 2023
cb807f0
Rename pure and decompose functions.
HechtiDerLachs Oct 6, 2023
df75af0
Migrate tests.
HechtiDerLachs Oct 6, 2023
ddf43ce
Clean up exports from LieAlgebra.jl.
HechtiDerLachs Oct 6, 2023
452ae32
Fix tests.
HechtiDerLachs Oct 6, 2023
bdb32a2
Some improvements in localizations.
HechtiDerLachs Oct 7, 2023
362d188
Implement exterior powers for subquos.
HechtiDerLachs Oct 8, 2023
7c3fb55
Some fixes.
HechtiDerLachs Oct 8, 2023
dc39ef1
Reroute koszul complexes to use the non-Singular methods.
HechtiDerLachs Oct 12, 2023
d395414
Deprecate old singular methods.
HechtiDerLachs Oct 12, 2023
40d381e
Repair Koszul homology.
HechtiDerLachs Oct 12, 2023
e40d9e4
Remove duplicate methods and use singular's depth.
HechtiDerLachs Oct 12, 2023
746a00e
Add tests.
HechtiDerLachs Oct 12, 2023
a364de6
Add some assertions.
HechtiDerLachs Oct 12, 2023
b5134b9
Some tweaks for the ordered multiindices.
HechtiDerLachs Oct 12, 2023
9be4f7e
Pass on the check flag for construction of complexes.
HechtiDerLachs Oct 12, 2023
c2d2e67
Fix doctests and add a truely generic method for the depth computation.
HechtiDerLachs Oct 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions experimental/Schemes/Auxiliary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -383,3 +383,93 @@ end
### Generic pullback and pushforward for composite maps
pushforward(f::Generic.CompositeMap, a::Any) = pushforward(map2(f), pushforward(map1(f), a))
pullback(f::Generic.CompositeMap, a::Any) = pullback(map1(f), pullback(map2(f), a))

### Iteration over monomials in modules of a certain degree
struct AllModuleMonomials{ModuleType<:FreeMod}
F::ModuleType
d::Int

function AllModuleMonomials(F::FreeMod{T}, d::Int) where {T <: MPolyDecRingElem}
is_graded(F) || error("module must be graded")
S = base_ring(F)
is_standard_graded(S) || error("iterator implemented only for the standard graded case")
return new{typeof(F)}(F, d)
end
end

underlying_module(amm::AllModuleMonomials) = amm.F
degree(amm::AllModuleMonomials) = amm.d

function all_monomials(F::FreeMod{T}, d::Int) where {T<:MPolyDecRingElem}
return AllModuleMonomials(F, d)
end

Base.eltype(amm::AllModuleMonomials{T}) where {T} = elem_type(T)

function Base.length(amm::AllModuleMonomials)
F = underlying_module(amm)
r = rank(F)
R = base_ring(F)
d = degree(amm)
result = 0
for i in 1:r
d_loc = d - Int(degree(F[i])[1])
d_loc < 0 && continue
result = result + length(all_monomials(R, d_loc))
end
return result
end

function Base.iterate(amm::AllModuleMonomials, state::Nothing = nothing)
i = 1
F = underlying_module(amm)
d = degree(amm)
R = base_ring(F)

d_loc = d - Int(degree(F[i])[1])
while i < ngens(F) && d_loc < 0
i = i+1
d_loc = d - Int(degree(F[i])[1])
end

i == ngens(F) && d_loc < 0 && return nothing

mon_it = all_monomials(R, d_loc)
res = iterate(mon_it, nothing)
res === nothing && i == ngens(F) && return nothing

x, s = res
return x*F[1], (i, mon_it, s)
end

function Base.iterate(amm::AllModuleMonomials, state::Tuple{Int, AllMonomials, Vector{Int}})
F = underlying_module(amm)
d = degree(amm)
R = base_ring(F)

i, mon_it, s = state
res = iterate(mon_it, s)
if res === nothing
i == ngens(F) && return nothing
i = i+1
d_loc = d - Int(degree(F[i])[1])

while i < ngens(F) && d_loc < 0
i = i+1
d_loc = d - Int(degree(F[i])[1])
end

i == ngens(F) && d_loc < 0 && return nothing

mon_it = all_monomials(R, d_loc)
res_loc = iterate(mon_it, nothing)
res_loc === nothing && i == ngens(F) && return nothing

x, s = res_loc
return x*F[i], (i, mon_it, s)
end

x, s = res
return x*F[i], (i, mon_it, s)
end

13 changes: 13 additions & 0 deletions test/Modules/GradedModules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,16 @@ end
K = kernel(phi)[1]
@test (iszero(quo(M2,K)) && iszero(quo(K,M2))) # mathematical equality
end

@testset "all_monomials for graded free modules" begin
R, (x, y, u, v, w) = QQ[:x, :y, :u, :v, :w]
S, (x, y, u, v, w) = grade(R)

F = graded_free_module(S, [-1, 2])

for d in -4:4
amm = Oscar.all_monomials(F, d)
@test d < -1 || !isempty(amm)
@test all(x->degree(x) == grading_group(F)([d]), amm)
end
end
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jankoboehm : Sorry, this was not intended to be here. It was a little play-around for me needed to take some steps towards implementing sheaf cohomology. But I guess this might be useful also for you and the graded modules in general. Would you like this to be put in a separate PR?