From b051bc2e684c20d04da567e548bed75013e5cd54 Mon Sep 17 00:00:00 2001 From: Martin Bies Date: Tue, 7 Jan 2025 14:39:56 +0100 Subject: [PATCH] FTheoryTools: Print known properties of G4-fluxes --- .../FTheoryTools/src/G4Fluxes/attributes.jl | 10 +++- .../FTheoryTools/src/G4Fluxes/constructors.jl | 54 +++++++++++++++++-- .../FTheoryTools/src/G4Fluxes/properties.jl | 33 ++++++++++-- .../src/G4Fluxes/special_attributes.jl | 10 +++- 4 files changed, 95 insertions(+), 12 deletions(-) diff --git a/experimental/FTheoryTools/src/G4Fluxes/attributes.jl b/experimental/FTheoryTools/src/G4Fluxes/attributes.jl index 3615adc0ed37..c5dba0cc2e6f 100644 --- a/experimental/FTheoryTools/src/G4Fluxes/attributes.jl +++ b/experimental/FTheoryTools/src/G4Fluxes/attributes.jl @@ -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 @@ -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 diff --git a/experimental/FTheoryTools/src/G4Fluxes/constructors.jl b/experimental/FTheoryTools/src/G4Fluxes/constructors.jl index 8c52d79ac1e5..75bcbf0b2751 100644 --- a/experimental/FTheoryTools/src/G4Fluxes/constructors.jl +++ b/experimental/FTheoryTools/src/G4Fluxes/constructors.jl @@ -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) @@ -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") + 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") + 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") + 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 diff --git a/experimental/FTheoryTools/src/G4Fluxes/properties.jl b/experimental/FTheoryTools/src/G4Fluxes/properties.jl index fc0d83918263..c410950b8f9a 100644 --- a/experimental/FTheoryTools/src/G4Fluxes/properties.jl +++ b/experimental/FTheoryTools/src/G4Fluxes/properties.jl @@ -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) @@ -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) @@ -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) diff --git a/experimental/FTheoryTools/src/G4Fluxes/special_attributes.jl b/experimental/FTheoryTools/src/G4Fluxes/special_attributes.jl index ab7e33084739..1f065a773f1a 100644 --- a/experimental/FTheoryTools/src/G4Fluxes/special_attributes.jl +++ b/experimental/FTheoryTools/src/G4Fluxes/special_attributes.jl @@ -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 @@ -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