Skip to content

Commit

Permalink
Version 2.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mgemath committed May 3, 2024
1 parent c4a8848 commit 0cd0cf0
Show file tree
Hide file tree
Showing 7 changed files with 287 additions and 183 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "AtiyahBott"
uuid = "4bc0d046-1179-4daa-900a-9bc021c7f891"
authors = ["Giosuè Muratore <[email protected] >", "Csaba Schneider <[email protected]>"]
version = "2.2.0"
version = "2.2.1"

[deps]
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
Expand Down
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ makedocs(
deploydocs(
repo = "github.com/mgemath/AtiyahBott.jl.git",
versions = nothing,

#=,
target = "build",
push_preview = true,=#
Expand Down
1 change: 1 addition & 0 deletions src/AtiyahBott.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ using ProgressMeter
using Nemo

include("Arithmetic.jl")
include("Euler.jl")
include("Marked.jl")
include("GraphFunctions.jl")
include("EquivariantClasses.jl")
Expand Down
205 changes: 66 additions & 139 deletions src/EquivariantClasses.jl
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,20 @@ The following Gromov-Witten invariants
\\end{aligned}
```
can be computed as
```julia-repl
```jldoctest; setup = :(using AtiyahBott)
julia> P = Incidency(3)^2;
julia> AtiyahBottFormula(3,1,0,P);
julia> AtiyahBottFormula(3, 1, 0, P, show_bar=false);
Result: 1
julia> P = Incidency([2,2,3]);
julia> AtiyahBottFormula(3,1,0,P);
julia> AtiyahBottFormula(3, 1, 0, P, show_bar=false);
Result: 1
julia> P = Incidency([2,2])*Hypersurface(3);
julia> AtiyahBottFormula(3,3,0,P);
julia> AtiyahBottFormula(3, 3, 0, P, show_bar=false);
Result: 756
```
!!! warning "Attention!"
Expand Down Expand Up @@ -255,18 +260,25 @@ The following Gromov-Witten invariants of Calabi-Yau threefolds
\\end{aligned}
```
can be computed as
```julia-repl
```jldoctest; setup = :(using AtiyahBott)
julia> P = Hypersurface(5);
julia> AtiyahBottFormula(4,1,0,P);
julia> AtiyahBottFormula(4, 1, 0, P, show_bar=false);
Result: 2875
julia> P = Hypersurface([3,3]);
julia> AtiyahBottFormula(5,2,0,P);
julia> AtiyahBottFormula(5, 2, 0, P, show_bar=false);
Result: 423549//8
julia> P = Hypersurface(4)*Hypersurface(2);
julia> AtiyahBottFormula(5,3,0,P);
julia> AtiyahBottFormula(5, 3, 0, P, show_bar=false);
Result: 422690816//27
julia> P = Hypersurface(2)^4;
julia> AtiyahBottFormula(7,4,0,P);
julia> AtiyahBottFormula(7, 4, 0, P, show_bar=false);
Result: 25705160
```
!!! warning "Attention!"
Expand Down Expand Up @@ -344,9 +356,10 @@ Equivariant class of the Euler class of the bundle equal to the direct image und
\\end{aligned}
```
can be computed as
```julia-repl
```jldoctest; setup = :(using AtiyahBott)
julia> P = O1_i(1)^2*O1_i(2)^3*Contact();
julia> AtiyahBottFormula(3,1,2,P);
julia> AtiyahBottFormula(3, 1, 2, P, show_bar=false);
Result: 1
```
"""
Expand Down Expand Up @@ -407,12 +420,15 @@ The following Gromov-Witten invariants
\\end{aligned}
```
can be computed as
```julia-repl
```jldoctest; setup = :(using AtiyahBott)
julia> P = O1_i(1)*O1_i(2);
julia> AtiyahBottFormula(1,1,2,P);
julia> AtiyahBottFormula(1, 1, 2, P, show_bar=false);
Result: 1
julia> P = O1_i(1)^2*Hypersurface(2);
julia> AtiyahBottFormula(3,1,1,P);
julia> AtiyahBottFormula(3, 1, 1, P, show_bar=false);
Result: 4
```
!!! warning "Attention!"
Expand Down Expand Up @@ -447,12 +463,15 @@ The following Gromov-Witten invariants
\\end{aligned}
```
can be computed as
```julia-repl
```jldoctest; setup = :(using AtiyahBott)
julia> P = O1()^2;
julia> AtiyahBottFormula(2,3,8,P);
julia> AtiyahBottFormula(2, 3, 8, P, show_bar=false);
Result: 12
julia> P = O1()^2*Hypersurface(3);
julia> AtiyahBottFormula(3,2,1,P);
julia> AtiyahBottFormula(3, 2, 1, P, show_bar=false);
Result: 81
```
Expand Down Expand Up @@ -496,10 +515,12 @@ The equivariant class of the first derived functor of the pull-back of ``\\mathc
\\end{aligned}
```
can be computed as
```julia-repl
```jldoctest; setup = :(using AtiyahBott)
julia> d = 1; #for other values of d, change this line
julia> P = R1(1)^2;
julia> AtiyahBottFormula(1,d,0,P);
julia> AtiyahBottFormula(1, d, 0, P, show_bar=false);
Result: 1
```
!!! warning "Attention!"
Expand Down Expand Up @@ -580,21 +601,30 @@ The following Gromov-Witten invariants
\\end{aligned}
```
can be computed as
```julia-repl
```jldoctest; setup = :(using AtiyahBott)
julia> P = O1_i(1)^5*O1_i(2)^2*Hypersurface(5)*Psi([1,0]);
julia> AtiyahBottFormula(6,2,2,P);
julia> AtiyahBottFormula(6, 2, 2, P, show_bar=false);
Result: 495000
julia> P = O1_i(1)^8*O1_i(2)^6*Hypersurface(7)*Psi(2);
julia> AtiyahBottFormula(10,2,2,P);
julia> AtiyahBottFormula(10, 2, 2, P, show_bar=false);
Result: 71804533752
julia> P = O1()^2*Psi(4);
julia> AtiyahBottFormula(2,2,1,P);
julia> AtiyahBottFormula(2, 2, 1, P, show_bar=false);
Result: 1//8
julia> P = Incidency(2)^4*O1_i(1)*(O1_i(1) + Psi(1));
julia> AtiyahBottFormula(2,2,1,P); #number of plane conics through four points and tangent to a line
julia> AtiyahBottFormula(2, 2, 1, P, show_bar=false); #number of plane conics through four points and tangent to a line
Result: 2
julia> P = O1()*(Psi(7)*O1()+Psi(6)*O1()^2);
julia> AtiyahBottFormula(3,2,1,P);
julia> AtiyahBottFormula(3, 2, 1, P, show_bar=false);
Result: -5//16
```
!!! warning "Psi is singleton!"
Expand Down Expand Up @@ -708,16 +738,23 @@ Equivariant class of the jet bundle ``J^p`` of the pull back of ``\\mathcal{O}_{
\\end{aligned}
```
can be computed as
```julia-repl
```jldoctest; setup = :(using AtiyahBott)
julia> P = Incidency(2)^4*Jet(1,1);
julia> AtiyahBottFormula(2,2,1,P);
julia> AtiyahBottFormula(2, 2, 1, P, show_bar=false);
Result: 2
julia> P = Incidency(2)^4*(Jet(1,1)+O1()^2);
julia> AtiyahBottFormula(2,2,1,P);
julia> AtiyahBottFormula(2, 2, 1, P, show_bar=false);
Result: 3
julia> d=1;k=1; #for other values of d, change this line
julia> P = (O1()^2)//k*Jet(4*d-2,k);
julia> AtiyahBottFormula(3,d,1,P); #The value of this integral does not depend on k, only on d
julia> AtiyahBottFormula(3, d, 1, P, show_bar=false); #The value of this integral does not depend on k, only on d
Result: 2
```
"""
function Jet( p, q )::EquivariantClass
Expand All @@ -744,117 +781,7 @@ function Jet(g::SimpleGraph{Int64}, col::Tuple{Vararg{Int64}}, weights::Vector{I
end


# """
# Euler_inv(g, c, w, s, m)

# The inverse of the (equivariant) Euler class of the normal bundle. This function is invoked automatically.
# # Arguments
# - `g::SimpleGraph{Int64}`: the graph.
# - `c::Vector{UInt8}`: the coloration.
# - `w::Vector{Int64}`: the weights.
# - `s::Tuple{Vararg{fmpq}}`: the scalars.
# - `m::Vector{Int64}`: the marks.

# """
function Euler_inv(g::SimpleGraph{Int64}, col::Tuple{Vararg{Int64}}, weights::Vector{Int64}, scalars::Tuple{Vararg{fmpq}}, mark::Marks_type)::fmpq

local V::fmpq = fmpq(1)
#local E::fmpq = fmpq(1)
local temp1::fmpq = fmpq(1)
local temp2::fmpq = fmpq(1)
local q1::fmpq
local p1::fmpq
local s1::fmpq
# col = Dict(vertices(g).=> col) #assing colors to vertices
d = Dict(edges(g).=> weights) #assign weights to edges
#=
omega_inv = Dict(edges(g).=> [d[e]//(scalars[col[src(e)]]-scalars[col[dst(e)]]) for e in edges(g)])
merge!(omega_inv,Dict(reverse.(edges(g)).=> [d[e]//(scalars[col[dst(e)]]-scalars[col[src(e)]]) for e in edges(g)]))
=#
max_col = length(scalars)

for e in edges(g)
q1 = fmpq(1)
for j in 1:max_col
if j != col[src(e)] && j != col[dst(e)]
for alph in 0:d[e]
eq!(temp1, scalars[col[src(e)]])
eq!(temp2, scalars[col[dst(e)]])
mul_eq!(temp1, alph)
mul_eq!(temp2, d[e]-alph)
add_eq!(temp1, temp2)
div_eq!(temp1, d[e])
sub!(temp1, scalars[j])
mul_eq!(q1, temp1)
#q1 *= ((alph*scalars[col[src(e)]]+(d[e]-alph)*scalars[col[dst(e)]])//d[e]-scalars[j])
end
end
end

#eq!(temp1, omega_inv[e])
eq!(temp1, scalars[col[dst(e)]])
neg!(temp1)
add_eq!(temp1, scalars[col[src(e)]])
inv!(temp1)
mul_eq!(temp1, d[e])

pow_eq!(temp1, 2*d[e])
if isodd(d[e])
neg!(temp1)
end
q1 *= Nemo.factorial(fmpz(d[e]))^2
# mul_eq!(q1, Nemo.factorial(fmpz(d[e]))^2)
#div_eq!(temp1, factorial(d[e])^2)
div_eq!(temp1, q1)
mul_eq!(V, temp1)
#E *= ((omega_inv[e])^(2*d[e]))*((-1)^d[e])//(factorial(d[e])^2)//q1
end

for v in vertices(g)
nghbrs = all_neighbors(g, v)
p1 = fmpq(1)
for j in 1:max_col
if j != col[v]
eq!(temp1, scalars[col[v]])
sub!(temp1, scalars[j])
mul_eq!(p1, temp1)
#p1 *= scalars[col[v]]-scalars[j]
end
end
pow_eq!(p1, length(nghbrs)-1)
mul_eq!(V, p1)
#p1 ^= length(nghbrs)-1

s1 = fmpq(0)
#local r1 = fmpq(1)

for w in nghbrs
eq!(temp1, scalars[col[w]])
neg!(temp1)
add_eq!(temp1, scalars[col[v]])
inv!(temp1)
# e = SimpleEdge(v,w)
# d_e = haskey(d,e) ? d[e] : d[reverse(e)]
# mul_eq!(temp1, d_e)
mul_eq!(temp1, d[SimpleEdge(min(v,w),max(v,w))])
# e = SimpleEdge(v,w)
add_eq!(s1, temp1)
mul_eq!(V, temp1)
# s1 += omega_inv[e]
# r1 *= omega_inv[e]
end

pow_eq!(s1, length(nghbrs) + num_marks(mark,v) - 3)
#s1 ^= length(nghbrs) + num_marks(mark,v) - 3
#mul_eq!(V, p1)
mul_eq!(V, s1)
#V *= p1*s1*r1

end

#mul_eq!(V, E)
return V
end

###############################################################
### List of the class useful for computing the rank (Cycle) ###
Expand Down
Loading

0 comments on commit 0cd0cf0

Please sign in to comment.