Skip to content

Commit

Permalink
FTheoryTools: Print known properties of G4-fluxes
Browse files Browse the repository at this point in the history
  • Loading branch information
HereAround committed Jan 7, 2025
1 parent 264490b commit b051bc2
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 12 deletions.
10 changes: 8 additions & 2 deletions experimental/FTheoryTools/src/G4Fluxes/attributes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ julia> cohomology_ring(ambient_space(qsm_model), check = false);
julia> g4_class = cohomology_class(anticanonical_divisor_class(ambient_space(qsm_model)))^2;
julia> g4f = g4_flux(qsm_model, g4_class, check = false)
G4-flux candidate lacking elementary quantization checks
G4-flux candidate
- Elementary quantization checks: not executed
- Tadpole cancellation check: not executed
- Verticality checks: not executed
julia> model(g4f)
Hypersurface model over a concrete base
Expand All @@ -39,7 +42,10 @@ julia> cohomology_ring(ambient_space(qsm_model), check = false);
julia> g4_class = cohomology_class(anticanonical_divisor_class(ambient_space(qsm_model)))^2;
julia> g4f = g4_flux(qsm_model, g4_class, check = false)
G4-flux candidate lacking elementary quantization checks
G4-flux candidate
- Elementary quantization checks: not executed
- Tadpole cancellation check: not executed
- Verticality checks: not executed
julia> cohomology_class(g4f) == g4_class
true
Expand Down
54 changes: 49 additions & 5 deletions experimental/FTheoryTools/src/G4Fluxes/constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,15 @@ julia> g4_class = cohomology_class(anticanonical_divisor_class(ambient_space(qsm
julia> g4f = g4_flux(qsm_model, g4_class)
G4-flux candidate
- Elementary quantization checks: satisfied
- Tadpole cancellation check: not executed
- Verticality checks: not executed
julia> g4f2 = g4_flux(qsm_model, g4_class, check = false)
G4-flux candidate lacking elementary quantization checks
G4-flux candidate
- Elementary quantization checks: not executed
- Tadpole cancellation check: not executed
- Verticality checks: not executed
```
"""
function g4_flux(m::AbstractFTheoryModel, g4_class::CohomologyClass; check::Bool = true)
Expand Down Expand Up @@ -112,9 +118,47 @@ end
################################################

function Base.show(io::IO, g4::G4Flux)
properties_string = String["G4-flux candidate"]
if !has_attribute(g4, :passes_elementary_quantization_checks)
push!(properties_string, "lacking elementary quantization checks")
properties_string = ["G4-flux candidate"]

# Check for elementary quantization checks
if has_attribute(g4, :passes_elementary_quantization_checks)
if passes_elementary_quantization_checks(g4)
push!(properties_string, " - Elementary quantization checks: satisfied")
else
push!(properties_string, " - Elementary quantization checks: violated")

Check warning on line 128 in experimental/FTheoryTools/src/G4Fluxes/constructors.jl

View check run for this annotation

Codecov / codecov/patch

experimental/FTheoryTools/src/G4Fluxes/constructors.jl#L128

Added line #L128 was not covered by tests
end
else
push!(properties_string, " - Elementary quantization checks: not executed")
end

# Check for tadpole cancellation checks
if has_attribute(g4, :passes_tadpole_cancellation_check)
if passes_tadpole_cancellation_check(g4)
push!(properties_string, " - Tadpole cancellation check: satisfied")
else
push!(properties_string, " - Tadpole cancellation check: violated")

Check warning on line 139 in experimental/FTheoryTools/src/G4Fluxes/constructors.jl

View check run for this annotation

Codecov / codecov/patch

experimental/FTheoryTools/src/G4Fluxes/constructors.jl#L139

Added line #L139 was not covered by tests
end
else
push!(properties_string, " - Tadpole cancellation check: not executed")
end

# Check for verticality checks
if has_attribute(g4, :passes_verticality_checks)
if passes_verticality_checks(g4)
push!(properties_string, " - Verticality checks: satisfied")
else
push!(properties_string, " - Verticality checks: violated")

Check warning on line 150 in experimental/FTheoryTools/src/G4Fluxes/constructors.jl

View check run for this annotation

Codecov / codecov/patch

experimental/FTheoryTools/src/G4Fluxes/constructors.jl#L150

Added line #L150 was not covered by tests
end
else
push!(properties_string, " - Verticality checks: not executed")
end

# Print each line separately, to avoid extra line break at the end
for (i, line) in enumerate(properties_string)
if i == length(properties_string)
print(io, line) # Last line without extra newline
else
println(io, line) # Print all other lines with line break
end
end
join(io, properties_string, " ")
end
33 changes: 30 additions & 3 deletions experimental/FTheoryTools/src/G4Fluxes/properties.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,19 @@ julia> cohomology_ring(ambient_space(qsm_model), check = false);
julia> g4_class = cohomology_class(anticanonical_divisor_class(ambient_space(qsm_model)))^2;
julia> g4 = g4_flux(qsm_model, g4_class, check = false)
G4-flux candidate lacking elementary quantization checks
G4-flux candidate
- Elementary quantization checks: not executed
- Tadpole cancellation check: not executed
- Verticality checks: not executed
julia> passes_elementary_quantization_checks(g4)
true
julia> g4
G4-flux candidate
- Elementary quantization checks: satisfied
- Tadpole cancellation check: not executed
- Verticality checks: not executed
```
"""
@attr Bool function passes_elementary_quantization_checks(g4::G4Flux)
Expand Down Expand Up @@ -84,10 +93,19 @@ julia> u = cohomology_class(divs[33]);v = cohomology_class(divs[30]);pb_Kbar = c
julia> g4_class = (-3) // kbar3(qsm_model) * (5 * e1 * e4 + pb_Kbar * (-3 * e1 - 2 * e2 - 6 * e4 + pb_Kbar - 4 * u + v));
julia> g4 = g4_flux(qsm_model, g4_class, check = false)
G4-flux candidate lacking elementary quantization checks
G4-flux candidate
- Elementary quantization checks: not executed
- Tadpole cancellation check: not executed
- Verticality checks: not executed
julia> passes_verticality_checks(g4)
true
julia> g4
G4-flux candidate
- Elementary quantization checks: not executed
- Tadpole cancellation check: not executed
- Verticality checks: satisfied
```
"""
@attr Bool function passes_verticality_checks(g4::G4Flux)
Expand Down Expand Up @@ -138,10 +156,19 @@ julia> u = cohomology_class(divs[33]);v = cohomology_class(divs[30]);pb_Kbar = c
julia> g4_class = (-3) // kbar3(qsm_model) * (5 * e1 * e4 + pb_Kbar * (-3 * e1 - 2 * e2 - 6 * e4 + pb_Kbar - 4 * u + v));
julia> g4 = g4_flux(qsm_model, g4_class, check = false)
G4-flux candidate lacking elementary quantization checks
G4-flux candidate
- Elementary quantization checks: not executed
- Tadpole cancellation check: not executed
- Verticality checks: not executed
julia> passes_tadpole_cancellation_check(g4)
true
julia> g4
G4-flux candidate
- Elementary quantization checks: not executed
- Tadpole cancellation check: satisfied
- Verticality checks: not executed
```
"""
@attr Bool function passes_tadpole_cancellation_check(g4::G4Flux)
Expand Down
10 changes: 8 additions & 2 deletions experimental/FTheoryTools/src/G4Fluxes/special_attributes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ julia> M = res[1];
julia> g4_class = sum(M[i,j]*g4_base[i] for i in 1:length(g4_base) for j in 1:size(M,2));
julia> g4 = g4_flux(qsm_model, g4_class, check = false)
G4-flux candidate lacking elementary quantization checks
G4-flux candidate
- Elementary quantization checks: not executed
- Tadpole cancellation check: not executed
- Verticality checks: not executed
julia> passes_elementary_quantization_checks(g4)
true
Expand Down Expand Up @@ -418,7 +421,10 @@ true
julia> c = [60, 51, 90, 0, 24, 51, -24, 45, 30, 0, -48, 90, -57, 60, 30, 15, 120, 0, -60, 0, -720, -420, -270, -60, -2190];
julia> qsm_g4_candidate = g4_flux(qsm_model, sum(c[i]*g4_classes[i] for i in 1:length(g4_classes)), check = false)
G4-flux candidate lacking elementary quantization checks
G4-flux candidate
- Elementary quantization checks: not executed
- Tadpole cancellation check: not executed
- Verticality checks: not executed
julia> passes_elementary_quantization_checks(qsm_g4_candidate)
true
Expand Down

0 comments on commit b051bc2

Please sign in to comment.