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

Repair flattenings of graded modules #3217

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
8f128cd
Some small fix for Wolfram.
HechtiDerLachs Jan 24, 2024
a9bc8b7
Another small fix for Wolfram.
HechtiDerLachs Jan 24, 2024
10f6da5
Fix the fix.
HechtiDerLachs Jan 24, 2024
816e940
Address #2999 a bit.
HechtiDerLachs Jan 24, 2024
b4d246b
Fix tests.
HechtiDerLachs Jan 24, 2024
bb0efe5
Fix docstring.
HechtiDerLachs Jan 24, 2024
39ea71c
Add internal method for fast determination of the degree.
HechtiDerLachs Jan 24, 2024
2b71b7a
Avoid creating some matrices.
HechtiDerLachs Jan 24, 2024
5a8594f
Make the graded modules use the new internal method.
HechtiDerLachs Jan 24, 2024
516f829
Add missing internal method.
HechtiDerLachs Jan 24, 2024
abb3dbc
Repair docs.
HechtiDerLachs Jan 24, 2024
227c131
Fix tests.
HechtiDerLachs Jan 24, 2024
d67888b
Use sparse matrices.
HechtiDerLachs Jan 24, 2024
489ee3e
Fix tests.
HechtiDerLachs Jan 25, 2024
47a0459
Revert "Fix tests."
HechtiDerLachs Jan 25, 2024
7a627b0
Revert "Revert "Fix tests.""
HechtiDerLachs Jan 25, 2024
83bffbd
Revert "Use sparse matrices."
HechtiDerLachs Jan 25, 2024
d4c1bae
Another fix.
HechtiDerLachs Jan 25, 2024
ba457b0
Add some missing methods.
HechtiDerLachs Jan 25, 2024
f2ca5c2
Fix degree function for SubquoModuleElems.
HechtiDerLachs Jan 25, 2024
dafe342
Fix degree function for SubquoModuleElems over generic rings.
HechtiDerLachs Jan 25, 2024
616b885
Fix signature.
HechtiDerLachs Jan 25, 2024
11bfd3e
Restrict signature.
HechtiDerLachs Jan 25, 2024
ba0e12e
Repair simplify to avoid infinite loops.
HechtiDerLachs Jan 25, 2024
d33020d
Add some extra assertions.
HechtiDerLachs Jan 25, 2024
817558d
Temporarily disable some failing tests.
HechtiDerLachs Jan 25, 2024
cdeaf0e
WIP on debugging.
HechtiDerLachs Jan 25, 2024
652d9b5
Preliminary closure with messages left where to pick up on the issues
HechtiDerLachs Jan 25, 2024
8125862
Exact arithmetic check for Gröbner related functionality (#3232)
ederc Jan 24, 2024
34715b1
change `show` for nat. symmetric/alternating groups (#3235)
ThomasBreuer Jan 25, 2024
74eaeca
Fix function name in docstring (#3233)
StevellM Jan 25, 2024
b91e2dd
added text to a "TODO" FAQ (#3236)
ThomasBreuer Jan 25, 2024
48d176a
More functionality for Weyl groups (#3051)
felix-roehrich Jan 25, 2024
7962b03
better printing for RelativeBrauerGroupElem (#3243)
fieker Jan 25, 2024
33339cb
CI: disable nightly for macos to reduce test time (#3245)
benlorenz Jan 25, 2024
9e9127c
Some group theory changes for the OSCAR book (#3242)
fingolfin Jan 25, 2024
5b93e19
Adds `prune_with_map` (#3239)
RafaelDavidMohr Jan 25, 2024
e3b1267
tests: start message for ipc, explicit GC call (#3229)
benlorenz Jan 25, 2024
a0ee41a
Serialization: disable IPC test until #3184 is solved (#3246)
benlorenz Jan 26, 2024
1bf341c
Adjust casing in `show(::MatroidRealizationSpace)` (#3244)
lgoettgens Jan 26, 2024
7654e59
let `right_cosets` return a G-set (#3223)
ThomasBreuer Jan 26, 2024
222c488
Fix 3107.
HechtiDerLachs Jan 19, 2024
7ab4d68
Fix.
HechtiDerLachs Jan 19, 2024
74884d3
Add hotfix method for simplification of graded subquos.
HechtiDerLachs Jan 19, 2024
328464e
Add tests.
HechtiDerLachs Jan 19, 2024
d885a29
Add forgetful functor for gradings of modules.
HechtiDerLachs Jan 20, 2024
ba01b46
Improve homology computation for simplified complexes.
HechtiDerLachs Jan 25, 2024
8cdbdeb
Fix tests.
HechtiDerLachs Jan 26, 2024
ea1ff59
Avoid unnecessary creation of maps and adhere to some Oscar conventions.
HechtiDerLachs Jan 26, 2024
a903ba8
Make _alt_simplify available as method of prune_with_map.
HechtiDerLachs Jan 26, 2024
6045a34
Add tests to the other file, just in case.
HechtiDerLachs Jan 26, 2024
781bf35
Remove debugging artifact.
HechtiDerLachs Jan 26, 2024
b79c0e2
Adjust returned map.
HechtiDerLachs Jan 26, 2024
8a77b16
move tropical geometry up (#3247)
fieker Jan 26, 2024
526b8ce
upgrade selected GAP packages at startup (#3222)
ThomasBreuer Jan 26, 2024
cf3c9a8
Restrict signature to the case where it has a chance to work.
HechtiDerLachs Jan 22, 2024
f5e8b09
Add flattenings of SubModuleOfFreeModule.
HechtiDerLachs Jan 22, 2024
1d63097
Add tests.
HechtiDerLachs Jan 22, 2024
774f35a
Some fix in presentations of graded modules.
HechtiDerLachs Jan 22, 2024
27abe22
Polish the code to handle more derived pushforwards.
HechtiDerLachs Jan 22, 2024
a2ceb50
Add tests.
HechtiDerLachs Jan 22, 2024
cb37408
Add some further functionality for flattenings.
HechtiDerLachs Jan 23, 2024
ac0a765
Add strict transform for ClosedEmbeddings.
HechtiDerLachs Jan 23, 2024
c2dc0c9
Add snake case constructor for covered_scheme [no ci].
HechtiDerLachs Jan 23, 2024
d4a21f6
Add some type stability.
HechtiDerLachs Jan 26, 2024
3a5c65b
Fix computation of regularity bound [no ci].
HechtiDerLachs Jan 26, 2024
9122c5f
Fix.
HechtiDerLachs Feb 2, 2024
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
14 changes: 8 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ jobs:
- julia-version: '1.10'
group: 'long'
os: macOS-latest
- julia-version: 'nightly'
group: 'short'
os: macOS-latest
- julia-version: 'nightly'
group: 'long'
os: macOS-latest
# nightly on macos is disabled for now since the macos jobs take too long
# with just 5 runners
#- julia-version: 'nightly'
# group: 'short'
# os: macOS-latest
#- julia-version: 'nightly'
# group: 'long'
# os: macOS-latest

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ AbstractAlgebra = "0.35.2"
AlgebraicSolving = "0.4.6"
Distributed = "1.6"
DocStringExtensions = "0.8, 0.9"
GAP = "0.10.0"
GAP = "0.10.2"
Hecke = "0.24.0"
JSON = "^0.20, ^0.21"
JSON3 = "1.13.2"
Expand Down
26 changes: 12 additions & 14 deletions docs/doc.main
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,18 @@
]
],

"Tropical Geometry" => [
"TropicalGeometry/intro.md",
"TropicalGeometry/semiring.md",
"TropicalGeometry/semiring_map.md",
"TropicalGeometry/variety.md",
"TropicalGeometry/hypersurface.md",
"TropicalGeometry/curve.md",
"TropicalGeometry/linear_space.md",
"TropicalGeometry/groebner_theory.md",
"TropicalGeometry/tropicalization.md",
],

"Noncommutative Algebra" => [
"NoncommutativeAlgebra/intro.md",
"PBW-Algebras" => [
Expand All @@ -239,20 +251,6 @@
"StraightLinePrograms/abstractalgebra.md",
],


"Tropical Geometry" => [
"TropicalGeometry/intro.md",
"TropicalGeometry/semiring.md",
"TropicalGeometry/semiring_map.md",
"TropicalGeometry/variety.md",
"TropicalGeometry/hypersurface.md",
"TropicalGeometry/curve.md",
"TropicalGeometry/linear_space.md",
"TropicalGeometry/groebner_theory.md",
"TropicalGeometry/tropicalization.md",
],


"References" => "references.md",
"Index" => "manualindex.md",
"Developer Documentation" => [
Expand Down
12 changes: 12 additions & 0 deletions docs/oscar_references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -1785,6 +1785,18 @@ @Misc{Stacks
url = {https://stacks.math.columbia.edu/}
}

@InCollection{Ste01,
author = {Stembridge, John R.},
title = {Computational aspects of root systems, {C}oxeter groups, and {W}eyl characters},
booktitle = {Interaction of combinatorics and representation theory},
series = {MSJ Memoirs},
volume = {11},
publisher = {The Mathematical Society of Japan},
pages = {1--38},
year = {2001},
doi = {10.2969/msjmemoirs/01101C010}
}

@InCollection{Ste91,
author = {Stevens, Jan},
title = {On the versal deformation of cyclic quotient singularities},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ is_homogeneous(f::FreeModElem)
```

```@docs
degree(f::FreeModElem)
degree(f::FreeModElem{T}) where {T<:Union{<:MPolyDecRingElem, <:MPolyQuoRingElem{<:MPolyDecRingElem}}}
```


Expand Down
12 changes: 6 additions & 6 deletions docs/src/DeveloperDocumentation/printing_details.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,18 +187,18 @@ struct A{T}
end

function Base.show(io::IO, a::A)
io = AbstractAlgebra.pretty(io)
io = pretty(io)
println(io, "Something of type A")
print(io, AbstractAlgebra.Indent(), "over ", AbstractAlgebra.Lowercase(), a.x)
print(io, AbstractAlgebra.Dedent()) # don't forget to undo the indentation!
print(io, Indent(), "over ", Lowercase(), a.x)
print(io, Dedent()) # don't forget to undo the indentation!
end

struct B
end

function Base.show(io::IO, b::B)
io = AbstractAlgebra.pretty(io)
print(io, AbstractAlgebra.LowercaseOff(), "Hilbert thing")
io = pretty(io)
print(io, LowercaseOff(), "Hilbert thing")
end
```

Expand Down Expand Up @@ -233,7 +233,7 @@ julia> struct C{T}
julia> function Base.show(io::IO, c::C{T}) where T
x = c.x
n = length(x)
print(io, "Something with ", AbstractAlgebra.ItemQuantity(n, "element"), " of type $T")
print(io, "Something with ", ItemQuantity(n, "element"), " of type $T")
end
```

Expand Down
15 changes: 13 additions & 2 deletions docs/src/General/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,20 @@ even if `zero(typeof(elm))` may not.

---

**Q: How can I install or access custom GAP packages (e.g. unpublished ones)?**
**Q: How can I access or install custom GAP packages (e.g. unpublished ones)?**

TODO
An already locally installed GAP package can be loaded into the OSCAR session
via `GAP.Packages.load`, where the first argument is the local path to the
package directory (the one that contains the `PackageInfo.g` file).
This works only if no other version of this package has been loaded already.

If Oscar loads the package in question already on startup
but you want a different version of this package to be loaded,
you can force this by storing the desired version in the `pkg` subdirectory
of the user's root directory (`GAPInfo.UserGapRoot` in GAP).

Installing a new GAP package for which you know the URL of a package archive
can be done via `GAP.Packages.install`, where the first argument is this URL.

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,3 +587,86 @@ function _has_index(a::SMat, i::Int, j::Int)
return _has_index(a[i], j)
end

### Taylormade functionality for modules
# Provided as a hotfix for issue #3108.
function _alt_simplify(M::SubquoModule)
res, aug = free_resolution(SimpleFreeResolution, M)
simp = simplify(res)
simp_to_orig = map_to_original_complex(simp)
orig_to_simp = map_from_original_complex(simp)
result, Z0_to_result = homology(simp, 0)
Z0, inc_Z0 = kernel(simp, 0)

result_to_M = hom(result, M,
elem_type(M)[aug[0](simp_to_orig[0](inc_Z0(preimage(Z0_to_result, x)))) for x in gens(result)])
M_to_result = hom(M, result,
elem_type(result)[Z0_to_result(preimage(inc_Z0, orig_to_simp[0](preimage(aug[0], y)))) for y in gens(M)])
return result, M_to_result, result_to_M
end

# Some special shortcuts
function boundary(c::SimplifiedComplex{ChainType}, p::Int, i::Tuple) where {ChainType<:ModuleFP}
# try to find the boundary already computed
und = underlying_complex(c)::HyperComplex
if !isdefined(und, :boundary_cache)
und.boundary_cache = Dict{Tuple{Tuple, Int}, Map}()
end
if haskey(und.boundary_cache, (i, p))
inc = und.boundary_cache[(i, p)]
return domain(inc), inc
end

# compute the boundary from scratch
orig_boundary, orig_inc = boundary(c.original_complex, p, i)
from_orig = map_from_original_complex(c)[i]
result, inc = sub(c[i], from_orig.(orig_inc.(gens(orig_boundary))))

# Cache the result
und.boundary_cache[(i, p)] = inc

return result, inc
end

function kernel(simp::SimplifiedComplex{ChainType}, p::Int, i::Tuple) where {ChainType<:ModuleFP}
c = underlying_complex(simp)::HyperComplex

if !isdefined(c, :kernel_cache)
c.kernel_cache = Dict{Tuple{Tuple, Int}, Map}()
end
if haskey(c.kernel_cache, (i, p))
inc = c.kernel_cache[(i, p)]
return domain(inc), inc
end

if !can_compute_map(simp, p, i)
M = simp[i]
K, inc = sub(simp[i], gens(simp[i]))
c.kernel_cache[(i, p)] = inc
return K, inc
end

psi = map_to_original_complex(simp)[i]
orig = simp.original_complex # TODO: Use getter!
phi = map(orig, p, i)
K, inc = kernel(compose(psi, phi))
c.kernel_cache[(i, p)] = inc
return K, inc
end

function homology(simp::SimplifiedComplex{ChainType}, p::Int, i::Tuple) where {ChainType <: ModuleFP}
c = underlying_complex(simp)::HyperComplex

if !isdefined(c, :homology_cache)
c.homology_cache = Dict{Tuple{Tuple, Int}, Map}()
end
if haskey(c.homology_cache, (i, p))
pr = c.homology_cache[(i, p)]
return codomain(pr), pr
end

H, pr = quo(kernel(simp, p, i)[1], boundary(simp, p, i)[1])
c.homology_cache[(i, p)] = pr
return H, pr
end

homology(simp::SimplifiedComplex{ChainType}, i::Int) where {ChainType <: ModuleFP} = homology(simp, 1, (i,))
18 changes: 15 additions & 3 deletions experimental/DoubleAndHyperComplexes/src/Objects/tor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,29 @@ end

function homology(hc::AbsHyperComplex, i::Int)
dim(hc) == 1 || error("dimension of the hypercomplex must be one")
return homology(underlying_complex(hc), 1, (i,))
return homology(hc, 1, (i,))
end

function kernel(hc::AbsHyperComplex, i::Int)
dim(hc) == 1 || error("dimension of the hypercomplex must be one")
return kernel(underlying_complex(hc), 1, (i,))
return kernel(hc, 1, (i,))
end

function boundary(hc::AbsHyperComplex, i::Int)
dim(hc) == 1 || error("dimension of the hypercomplex must be one")
return boundary(underlying_complex(hc), 1, (i,))
return boundary(hc, 1, (i,))
end

function homology(hc::AbsHyperComplex, p::Int, i::Tuple)
return homology(underlying_complex(hc), p, i)
end

function kernel(hc::AbsHyperComplex, p::Int, i::Tuple)
return kernel(underlying_complex(hc), p, i)
end

function boundary(hc::AbsHyperComplex, p::Int, i::Tuple)
return boundary(underlying_complex(hc), p, i)
end

function tor(M1::ModuleFP{T}, M2::ModuleFP{T}, i::Int) where {U<:MPolyComplementOfPrimeIdeal, T<:MPolyLocRingElem{<:Any, <:Any, <:Any, <:Any, U}}
Expand Down
9 changes: 6 additions & 3 deletions experimental/GModule/Cohomology.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import Oscar: GAPWrap, pc_group, fp_group, direct_product, direct_sum
import AbstractAlgebra: Group, Module
import Base: parent

import Oscar: pretty, Lowercase, @show_name, @show_special

function __init__()
Hecke.add_verbose_scope(:GroupCohomology)
Hecke.add_assert_scope(:GroupCohomology)
Expand Down Expand Up @@ -104,11 +106,12 @@ Base.hash(a::MultGrpElem, u::UInt = UInt(1235)) = hash(a.data. u)
end

function Base.show(io::IO, C::GModule)
AbstractAlgebra.@show_name(io, C)
AbstractAlgebra.@show_special(io, C)
@show_name(io, C)
@show_special(io, C)

io = pretty(io)
io = IOContext(io, :compact => true)
print(io, "G-module for ", C.G, " acting on ", C.M)# , "\nvia: ", C.ac)
print(io, "G-module for ", Lowercase(), C.G, " acting on ", Lowercase(), C.M)# , "\nvia: ", C.ac)
end

"""
Expand Down
Loading