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

feat: Groebner Walk #571

Draft
wants to merge 108 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
c156d92
setup
welpj Jul 26, 2021
426402e
Setting up packages
welpj Jul 26, 2021
660e153
Merge branch 'oscar-system:master' into groebnerwalk
welpj Jul 26, 2021
c70571f
cleanup
welpj Jul 26, 2021
e430a1f
Merge branch 'groebnerwalk' of https://github.com/welpj/Singular.jl i…
welpj Jul 26, 2021
c414525
cleanup
welpj Jul 26, 2021
2a43a54
refactor
welpj Jul 26, 2021
6852f10
Refactor / Comments
welpj Jul 27, 2021
3b45146
delete
welpj Jul 27, 2021
7548932
Merge branch 'oscar-system:master' into groebnerwalk
welpj Aug 3, 2021
2999eb6
feat: PertubedWalk
welpj Aug 8, 2021
4bb4f66
Bug: fixed in standard_step.
welpj Aug 10, 2021
c763628
Bug fixed: pertubed Algorithm had wrong ordering
welpj Aug 10, 2021
12a430c
Changes from Oscar-Update
welpj Aug 10, 2021
ef8bad4
Merge branch 'oscar-system:master' into groebnerwalk
welpj Aug 10, 2021
ee5cf54
Bug
welpj Aug 20, 2021
76cf9e4
Merge branch 'groebnerwalk' of https://github.com/welpj/Singular.jl i…
welpj Aug 20, 2021
3794774
feat: FractalWalk
welpj Aug 24, 2021
3221882
still a bug
welpj Aug 24, 2021
940462a
Running:
welpj Aug 25, 2021
3f7b45b
All current examples are running
welpj Aug 25, 2021
41e1537
refactoring
welpj Aug 25, 2021
88072f7
Versions of fractwalk
welpj Aug 26, 2021
92c650c
All current examples working
welpj Aug 27, 2021
2b589ff
feat: TranWalk
welpj Aug 29, 2021
e711638
Small fix
welpj Sep 7, 2021
d453936
feat: modulo()
welpj Sep 7, 2021
74e706d
Merge branch 'oscar-system:master' into GWalk
welpj Sep 7, 2021
b942174
Removed Dependency: Oscar
welpj Sep 8, 2021
7167e22
Refactor: Remove filter!()
welpj Sep 9, 2021
c1370dc
Refactor: Remove filter!()
welpj Sep 9, 2021
85d09e7
Refactor
welpj Sep 11, 2021
9959e7f
Merge branch 'GWalk' of https://github.com/welpj/Singular.jl into GWalk
welpj Sep 11, 2021
58c270d
Refactoring
welpj Sep 11, 2021
4b46857
Merge branch 'oscar-system:master' into GWalk
welpj Oct 4, 2021
ccf6bfb
Refactoring and comments
welpj Oct 5, 2021
f39e164
Refactoring
welpj Oct 6, 2021
bf53d3f
performance improvements
welpj Oct 7, 2021
4d6b8ec
Zwischenstand
welpj Dec 7, 2021
7c4d98a
CleanUp
welpj Dec 7, 2021
a11bd30
Preparing the final Branch
welpj Dec 8, 2021
e51eb47
Stable Version
welpj Dec 12, 2021
717753f
Refactor
welpj Dec 12, 2021
80f2e5b
fixing algorithm
welpj Dec 14, 2021
2180410
-
welpj Dec 16, 2021
6975abf
feat:combined fractalwalk
welpj Dec 17, 2021
da429b9
Benchmarking-Tools
welpj Dec 27, 2021
621f4c0
new examples
welpj Dec 27, 2021
0cc2846
new examples, new tools
welpj Dec 27, 2021
758c232
Benchmark2
welpj Dec 28, 2021
cb79286
Testing
welpj Dec 29, 2021
89ca2af
Anpassung der Beispiele
welpj Dec 30, 2021
9265918
feat: Testsets
welpj Dec 31, 2021
069aeb8
Refactoring
welpj Jan 1, 2022
6ff3a56
Refactoring
welpj Jan 2, 2022
a2aa40f
Refactoring
welpj Jan 18, 2022
d86884b
fixes
welpj Feb 10, 2022
7701956
Units tests
welpj Feb 14, 2022
ebfb94e
refactor
welpj Feb 14, 2022
52dbafc
Merge pull request #1 from welpj/CleanUp
welpj Feb 14, 2022
08e5818
fix: Tippfehler
welpj Feb 14, 2022
e48dd3b
Merge pull request #2 from welpj/Compute-Umgebung
welpj Feb 14, 2022
cdb7de5
improvements
welpj Feb 21, 2022
d2b29e6
update
welpj Mar 2, 2022
7e9e482
formatting
welpj Mar 2, 2022
435641f
Merge pull request #3 from welpj/Compute-Umgebung
welpj Mar 2, 2022
67f2bbe
update FractalWalk
welpj Mar 2, 2022
b5cb01c
Merge pull request #4 from welpj/Compute-Umgebung
welpj Mar 2, 2022
88f90df
Formatting
welpj Mar 2, 2022
663166b
simple improvements
welpj Mar 2, 2022
794d4fa
refactoring
welpj Mar 5, 2022
9f74c52
Merge pull request #5 from welpj/Final
welpj Mar 6, 2022
5ad54be
BenchmarkingCommit
welpj Mar 21, 2022
183381c
Merge pull request #6 from welpj/Final
welpj Mar 21, 2022
08e04c9
feat: tracing the walk
welpj Mar 23, 2022
742d16d
Merge pull request #7 from welpj/Final
welpj Mar 23, 2022
e8acd09
Merge branch 'oscar-system:master' into master
welpj Mar 23, 2022
6cb0601
fix: tippfehler
welpj Mar 24, 2022
058b4ab
fix: Tippfehler
welpj Mar 26, 2022
2dd7ec4
Merge pull request #8 from welpj/Final
welpj Mar 26, 2022
68a0684
fix: Kommentar
welpj Mar 30, 2022
ae63894
feat: pertubed genericwalk (not tested)
welpj Apr 4, 2022
96bf97b
Merge pull request #9 from welpj/Final
welpj Apr 4, 2022
7bf32c5
fix: delete not needed integration.
welpj Apr 6, 2022
c15ee73
Merge pull request #10 from welpj/Final
welpj Apr 6, 2022
3e72a71
Merge branch 'oscar-system:master' into master
welpj Apr 6, 2022
bd912c9
fix: Tippfehler
welpj Apr 6, 2022
c49e9de
Merge pull request #11 from welpj/Final
welpj Apr 6, 2022
4a9c35e
Update GroebnerWalk.jl
welpj Apr 6, 2022
40b743a
Update GroebnerWalk.jl
welpj Apr 6, 2022
c753ac2
readme
welpj Apr 7, 2022
e44ae6d
update readme
welpj Apr 7, 2022
8c16a1b
Update README.md
welpj Apr 7, 2022
63606b3
Update README.md
welpj Apr 7, 2022
768c37a
Update README.md
welpj Apr 7, 2022
aa55ccd
Update README.md
welpj Apr 7, 2022
0b77e81
Update README.md
welpj Apr 7, 2022
392bbfb
Update README.md
welpj Apr 7, 2022
9918bd1
Merge pull request #12 from welpj/Final
welpj Apr 7, 2022
ae24c11
fix: typos
welpj Apr 7, 2022
08c803a
fix
welpj Apr 7, 2022
602c494
Merge pull request #13 from welpj/fixes
welpj Apr 7, 2022
bcf4c2b
Update README.md
welpj Apr 7, 2022
51aa83b
Rename GenericWalkUtilitys.jl to GenericWalkUtilities.jl
welpj Apr 7, 2022
24dd96d
Update GenericWalkUtilities.jl
welpj Apr 7, 2022
a426988
Update TranWalkUtilities.jl
welpj Apr 7, 2022
c2943e4
final
welpj Apr 10, 2022
e9b30de
fix: counter
welpj Apr 10, 2022
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
791 changes: 791 additions & 0 deletions src/GroebnerWalk/Examples.jl

Large diffs are not rendered by default.

131 changes: 131 additions & 0 deletions src/GroebnerWalk/FractalWalkUtilities.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
#################################################################
# Procedures of the fractal walk.
# The fractal walk is proposed by Amrhein & Gloor (1998).
#################################################################

# lifts the Groebner basis G to the Groebner basis w.r.t. in the Fractal Walk like it´s done in Fukuda et. al (2005).
function lift_fractal_walk(
G::Singular.sideal,
H::Singular.sideal,
Rn::Singular.PolyRing,
)
R = base_ring(G)
G.isGB = true
G = Singular.Ideal(
Rn,
[
change_ring(gen, Rn) -
change_ring(Singular.reduce(change_ring(gen, R), G), Rn) for
gen in Singular.gens(H)
],
)
G.isGB = true
return G
end

# returns ´true´ if all polynomials of the given array are monomials.
function ismonomial(Gw::Vector{spoly{L}}) where {L<:Nemo.RingElem}
for g in Gw
if length(Singular.coefficients(g)) > 1
return false
end
end
return true
end

# returns ´true´ if all polynomials of the given array are binomials or less.
function isbinomial(Gw::Vector{spoly{L}}) where {L<:Nemo.RingElem}
for g in Gw
if length(Singular.coefficients(g)) > 2
return false
end
end
return true
end

# returns the next t to compute the next weight vector w(t) = w + t * (tw - w) like it´s done in Amrhein & Gloor (1998). This Method is NOT tested sufficiently.
function nextT(
G::Singular.sideal,
w::Array{T,1},
tw::Array{K,1},
) where {T<:Number,K<:Number}
if (w == tw)
return [0]
end
tmin = 2
t = 0
for g in gens(G)
a = Singular.leading_exponent_vector(g)
d = Singular.exponent_vectors(tail(g))
for v in d
frac = (dot(w, a) - dot(w, v) + dot(tw, v) - dot(tw, a))
if frac != 0
t = (dot(w, a) - dot(w, v)) // frac
end
if t > 0 && t < tmin
tmin = t
end
end
end
if tmin <= 1
return tmin
else
return [0]
end
end

# returns the next t to compute the next weight vector w(t) = w + t * (tw - w) like it´s done in Cox, Little & O'Sheao (2005).
function next_weightfr(
G::Singular.sideal,
cweight::Array{T,1},
tweight::Array{K,1},
) where {T<:Number,K<:Number}
if (cweight == tweight)
return [0]
end
tmin = 1
for v in difference_lead_tail(G)
tw = dot(tweight, v)
if tw < 0
cw = dot(cweight, v)
t = cw // (cw - tw)
if t < tmin
tmin = t
end
end
end

# BigInt is needed to prevent overflows in the conversion of the weight vectors.
return BigInt(numerator(tmin)) // BigInt(denominator(tmin))
end

# returns 'true' if the leading terms of G w.r.t the matrixordering T are the same as the leading terms of G w.r.t the weighted monomial ordering with weight vector of pvecs[p] (pvecs[p-1]) and the matrixordering T.
function inCone(
G::Singular.sideal,
T::Matrix{Int},
pvecs::Vector{Vector{Int}},
p::Int,
)
if p == 1
return true
end
R = change_order(G.base_ring, T)
cvzip = zip(
Singular.gens(G),
initials(R, Singular.gens(G), pvecs[p-1]),
initials(R, Singular.gens(G), pvecs[p]),
)
for (g, in, in2) in cvzip
if !isequal(
Singular.leading_exponent_vector(change_ring(g, R)),
Singular.leading_exponent_vector(in),
) ||
!isequal(
Singular.leading_exponent_vector(change_ring(g, R)),
Singular.leading_exponent_vector(in2),
)
return false
end
end
return true
end
Loading