From 739103dfaafffa8319207134479e3b94acaf2ba8 Mon Sep 17 00:00:00 2001 From: Andrew Patrick Turner Date: Tue, 18 Jul 2023 13:05:43 -0700 Subject: [PATCH] [FTheoryTools] Support for literature model parameters --- .../FTheoryTools/docs/src/literature.md | 3 + .../Models/model1109_3454.json | 6 +- .../Models/model1208_2695-1.json | 6 +- .../Models/model1208_2695-2.json | 6 +- .../Models/model1212_2949-1.json | 8 +- .../Models/model1212_2949-2.json | 8 +- .../Models/model1212_2949-3.json | 8 +- .../Models/model1212_2949-4.json | 8 +- .../Models/model1212_2949-5.json | 6 +- .../Models/model1212_2949-6.json | 6 +- .../Models/model1212_2949-7.json | 6 +- .../Models/model1507_05954-1.json | 6 +- .../Models/model1507_05954-2.json | 6 +- .../src/LiteratureModels/attributes.jl | 73 ++++++++++++------- .../src/LiteratureModels/auxiliary.jl | 12 ++- .../src/LiteratureModels/constructors.jl | 46 +++++++++--- .../src/LiteratureModels/model_reference.json | 8 +- .../src/LiteratureModels/properties.jl | 1 + .../src/TateModels/constructors.jl | 3 + .../src/WeierstrassModels/constructors.jl | 3 + experimental/FTheoryTools/src/exports.jl | 3 + 21 files changed, 164 insertions(+), 68 deletions(-) diff --git a/experimental/FTheoryTools/docs/src/literature.md b/experimental/FTheoryTools/docs/src/literature.md index 906ad3695e93..814bddbadc56 100644 --- a/experimental/FTheoryTools/docs/src/literature.md +++ b/experimental/FTheoryTools/docs/src/literature.md @@ -40,10 +40,12 @@ journal_volume(m::AbstractFTheoryModel) journal_year(m::AbstractFTheoryModel) literature_identifier(m::AbstractFTheoryModel) model_description(m::AbstractFTheoryModel) +model_parameters(m::AbstractFTheoryModel) paper_authors(m::AbstractFTheoryModel) paper_buzzwords(m::AbstractFTheoryModel) paper_description(m::AbstractFTheoryModel) paper_title(m::AbstractFTheoryModel) +related_literature_models(m::AbstractFTheoryModel) resolutions(m::AbstractFTheoryModel) resolution_generating_sections(m::AbstractFTheoryModel) resolution_zero_sections(m::AbstractFTheoryModel) @@ -79,6 +81,7 @@ set of information. This is achieved with the following methods: * `has_journal_year(m::AbstractFTheoryModel)`, * `has_literature_identifier(m::AbstractFTheoryModel)`, * `has_model_description(m::AbstractFTheoryModel)`, +* `has_model_parameters(m::AbstractFTheoryModel)`, * `has_paper_authors(m::AbstractFTheoryModel)`, * `has_paper_buzzwords(m::AbstractFTheoryModel)`, * `has_paper_description(m::AbstractFTheoryModel)`, diff --git a/experimental/FTheoryTools/src/LiteratureModels/Models/model1109_3454.json b/experimental/FTheoryTools/src/LiteratureModels/Models/model1109_3454.json index 0788d6c78dbb..e98f56733465 100644 --- a/experimental/FTheoryTools/src/LiteratureModels/Models/model1109_3454.json +++ b/experimental/FTheoryTools/src/LiteratureModels/Models/model1109_3454.json @@ -30,10 +30,12 @@ "description": "SU(5)xU(1) restricted Tate model", "buzzwords": ["GUT model", "Tate", "U(1)", "SU(5)"] }, - "model_data": { + "model_descriptors": { "type": "tate", "description": "SU(5)xU(1) restricted Tate model", - "gauge_algebra": ["su(5)", "u(1)"], + "gauge_algebra": ["su(5)", "u(1)"] + }, + "model_data": { "base_dim": 3, "base_coordinates": ["a1", "a21", "a32", "a43", "w"], "a1": "a1", diff --git a/experimental/FTheoryTools/src/LiteratureModels/Models/model1208_2695-1.json b/experimental/FTheoryTools/src/LiteratureModels/Models/model1208_2695-1.json index a7599eb585e6..99244ee68e62 100644 --- a/experimental/FTheoryTools/src/LiteratureModels/Models/model1208_2695-1.json +++ b/experimental/FTheoryTools/src/LiteratureModels/Models/model1208_2695-1.json @@ -31,10 +31,12 @@ "description": "General construction of U(1) model", "buzzwords": ["U(1)", "Mordell–Weil", "rational sections"] }, - "model_data": { + "model_descriptors": { "type": "hypersurface", "description": "U(1) hypersurface model", - "gauge_algebra": ["u1"], + "gauge_algebra": ["u1"] + }, + "model_data": { "base_dim": 2, "base_coordinates": ["Kbar", "b", "c0", "c1", "c2", "c3"], "auxiliary_base_grading": [ diff --git a/experimental/FTheoryTools/src/LiteratureModels/Models/model1208_2695-2.json b/experimental/FTheoryTools/src/LiteratureModels/Models/model1208_2695-2.json index 9a1a55810a30..76ee8a0e52dd 100644 --- a/experimental/FTheoryTools/src/LiteratureModels/Models/model1208_2695-2.json +++ b/experimental/FTheoryTools/src/LiteratureModels/Models/model1208_2695-2.json @@ -31,10 +31,12 @@ "description": "General construction of U(1) model", "buzzwords": ["U(1)", "Mordell–Weil", "rational sections"] }, - "model_data": { + "model_descriptors": { "type": "weierstrass", "description": "U(1) Weierstrass model", - "gauge_algebra": ["u1"], + "gauge_algebra": ["u1"] + }, + "model_data": { "base_dim": 2, "base_coordinates": ["Kbar", "b", "c0", "c1", "c2", "c3"], "f": "c1 * c3 - b^2 c0 - 1//3 * c2^2", diff --git a/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-1.json b/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-1.json index d03edaa43287..056bf3713409 100644 --- a/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-1.json +++ b/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-1.json @@ -31,11 +31,13 @@ "description": "Systematic classification of ADE Tate models and their resolutions", "buzzwords": ["Tate", "classification", "resolution"] }, - "model_parameters": ["k"], - "model_data": { + "model_descriptors": { "type": "tate", "description": "SU(2k+1) Tate model", - "gauge_algebra": ["su(2k+1)"], + "gauge_algebra": ["su(2k+1)"] + }, + "model_parameters": ["k"], + "model_data": { "base_dim": 3, "base_coordinates": ["b1", "b2", "b3", "b4", "b6", "ζ0"], "a1": "b1", diff --git a/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-2.json b/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-2.json index 9a0713ee678e..c0e8b3c39631 100644 --- a/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-2.json +++ b/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-2.json @@ -31,11 +31,13 @@ "description": "Systematic classification of ADE Tate models and their resolutions", "buzzwords": ["Tate", "classification", "resolution"] }, - "model_parameters": ["k"], - "model_data": { + "model_descriptors": { "type": "tate", "description": "SU(2k) Tate model", - "gauge_algebra": ["su(2k)"], + "gauge_algebra": ["su(2k)"] + }, + "model_parameters": ["k"], + "model_data": { "base_dim": 3, "base_coordinates": ["b1", "b2", "b3", "b4", "b6", "z0"], "a1": "b1", diff --git a/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-3.json b/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-3.json index d7a90da57dd7..62fadaa6e9f7 100644 --- a/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-3.json +++ b/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-3.json @@ -31,11 +31,13 @@ "description": "Systematic classification of ADE Tate models and their resolutions", "buzzwords": ["Tate", "classification", "resolution"] }, - "model_parameters": ["k"], - "model_data": { + "model_descriptors": { "type": "tate", "description": "SO(4k+2) Tate model", - "gauge_algebra": ["so(4k+2)"], + "gauge_algebra": ["so(4k+2)"] + }, + "model_parameters": ["k"], + "model_data": { "base_dim": 3, "base_coordinates": ["Kbar", "b1", "b2", "b3", "b4", "b6", "ζ0"], "a1": "b1*ζ0", diff --git a/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-4.json b/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-4.json index 261aa3d6492f..95f92519efa9 100644 --- a/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-4.json +++ b/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-4.json @@ -31,12 +31,14 @@ "description": "Systematic classification of ADE Tate models and their resolutions", "buzzwords": ["Tate", "classification", "resolution"] }, - "model_parameters": ["k"], - "model_data": { + "model_descriptors": { "type": "tate", "description": "SO(4k+4)xU(1) Tate model", "comment": "The paper only states that this is an SO(4k+4) model, but setting a6 = 0 also introduces an additional generating section, so there is additionally a U(1) factor, which may not have been relevant for the authors' purposes.", - "gauge_algebra": ["so(4k+4)", "u(1)"], + "gauge_algebra": ["so(4k+4)", "u(1)"] + }, + "model_parameters": ["k"], + "model_data": { "base_dim": 3, "base_coordinates": ["Kbar", "b1", "b2", "b3", "b4", "ζ0"], "a1": "b1*ζ0", diff --git a/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-5.json b/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-5.json index 7f8c2f8ac421..409908e8fa08 100644 --- a/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-5.json +++ b/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-5.json @@ -31,10 +31,12 @@ "description": "Systematic classification of ADE Tate models and their resolutions", "buzzwords": ["Tate", "classification", "resolution"] }, - "model_data": { + "model_descriptors": { "type": "tate", "description": "E6 Tate model", - "gauge_algebra": ["e6"], + "gauge_algebra": ["e6"] + }, + "model_data": { "base_dim": 3, "base_coordinates": ["Kbar", "b1", "b2", "b3", "b4", "b6", "ζ0"], "a1": "b1*ζ0", diff --git a/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-6.json b/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-6.json index 39843003177a..f07a6cb2f95f 100644 --- a/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-6.json +++ b/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-6.json @@ -31,10 +31,12 @@ "description": "Systematic classification of ADE Tate models and their resolutions", "buzzwords": ["Tate", "classification", "resolution"] }, - "model_data": { + "model_descriptors": { "type": "tate", "description": "E7 Tate model", - "gauge_algebra": ["e7"], + "gauge_algebra": ["e7"] + }, + "model_data": { "base_dim": 3, "base_coordinates": ["Kbar", "b1", "b2", "b3", "b4", "b6", "ζ0"], "a1": "b1*ζ0", diff --git a/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-7.json b/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-7.json index 57e9549e482d..ff5d51e42a20 100644 --- a/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-7.json +++ b/experimental/FTheoryTools/src/LiteratureModels/Models/model1212_2949-7.json @@ -31,10 +31,12 @@ "description": "Systematic classification of ADE Tate models and their resolutions", "buzzwords": ["Tate", "classification", "resolution"] }, - "model_data": { + "model_descriptors": { "type": "tate", "description": "E8 Tate model", - "gauge_algebra": ["e8"], + "gauge_algebra": ["e8"] + }, + "model_data": { "base_dim": 3, "base_coordinates": ["Kbar", "b1", "b2", "b3", "b4", "b6", "ζ0"], "a1": "b1*ζ0", diff --git a/experimental/FTheoryTools/src/LiteratureModels/Models/model1507_05954-1.json b/experimental/FTheoryTools/src/LiteratureModels/Models/model1507_05954-1.json index 0117d365926e..0828c5dce2a7 100644 --- a/experimental/FTheoryTools/src/LiteratureModels/Models/model1507_05954-1.json +++ b/experimental/FTheoryTools/src/LiteratureModels/Models/model1507_05954-1.json @@ -36,10 +36,12 @@ "description": "General construction of U(1)xU(1) model", "buzzwords": ["U(1)", "Mordell–Weil", "rational sections"] }, - "model_data": { + "model_descriptors": { "type": "hypersurface", "description": "U(1)xU(1) hypersurface model", - "gauge_algebra": ["u1", "u1"], + "gauge_algebra": ["u1", "u1"] + }, + "model_data": { "base_dim": 2, "base_coordinates": [ "Kbar", diff --git a/experimental/FTheoryTools/src/LiteratureModels/Models/model1507_05954-2.json b/experimental/FTheoryTools/src/LiteratureModels/Models/model1507_05954-2.json index 820e7467a805..38925277be1a 100644 --- a/experimental/FTheoryTools/src/LiteratureModels/Models/model1507_05954-2.json +++ b/experimental/FTheoryTools/src/LiteratureModels/Models/model1507_05954-2.json @@ -36,10 +36,12 @@ "description": "General construction of U(1)xU(1) model", "buzzwords": ["U(1)", "Mordell–Weil", "rational sections"] }, - "model_data": { + "model_descriptors": { "type": "weierstrass", "description": "U(1)xU(1) Weierstrass model", - "gauge_algebra": ["u1", "u1"], + "gauge_algebra": ["u1", "u1"] + }, + "model_data": { "base_dim": 2, "base_coordinates": [ "Kbar", diff --git a/experimental/FTheoryTools/src/LiteratureModels/attributes.jl b/experimental/FTheoryTools/src/LiteratureModels/attributes.jl index a7c38ff6e54d..a599092f4e63 100644 --- a/experimental/FTheoryTools/src/LiteratureModels/attributes.jl +++ b/experimental/FTheoryTools/src/LiteratureModels/attributes.jl @@ -420,6 +420,28 @@ function model_description(m::AbstractFTheoryModel) return get_attribute(m, :model_description) end +@doc raw""" + model_parameters(m::AbstractFTheoryModel) + +Return the `model_parameters` of the given model. +If no `model_parameters` are known, an error is raised. + +```jldoctest +julia> m = literature_model(arxiv_id = "1212.2949", equation = "3.2", model_parameters = Dict("k" => 5)) +Assuming that the first row of the given grading is the grading under Kbar + +Global Tate model over a not fully specified base -- SU(2k+1) Tate model with parameter values (k = 5) based on arXiv paper 1212.2949 Eq. (3.2) + +julia> model_parameters(m) +Dict{String, Int64} with 1 entry: + "k" => 5 +``` +""" +function model_parameters(m::AbstractFTheoryModel) + @req has_model_parameters(m) "No model parameters known for this model" + return get_attribute(m, :model_parameters) +end + @doc raw""" paper_authors(m::AbstractFTheoryModel) @@ -511,35 +533,34 @@ function paper_title(m::AbstractFTheoryModel) return get_attribute(m, :paper_title) end -# This example cannot be used until we support literature model parameters -# At that point, we should simply be able to uncomment this block +@doc raw""" + related_literature_models(m::AbstractFTheoryModel) -# @doc raw""" -# related_literature_models(m::AbstractFTheoryModel) +Return a list of the unique identifiers of any `related_literature_models` of +the given model. These are models that are introduced in the same paper as +the given model, but that are distinct from the given model. If no +`related_literature_models` are known, an error is raised. -# Return a list of the unique identifiers any `related_literature_models` of -# the given model. These are models that are introduced in the same paper as -# the given model, but that are distinct from the given model. If no -# `related_literature_models` are known, an error is raised. +```jldoctest +julia> m = literature_model(arxiv_id = "1212.2949", equation = "3.2", model_parameters = Dict("k" => 5)) +Assuming that the first row of the given grading is the grading under Kbar -# ```jldoctest -# julia> m = literature_model(arxiv_id = "1212.2949", equation = "3.2") -# Weierstrass model over a not fully specified base -- U(1)xU(1) Weierstrass model based on arXiv paper 1507.05954 Eq. (A.1) - -# julia> related_literature_models(m) -# 6-element Vector{String}: -# "1212_2949-2" -# "1212_2949-3" -# "1212_2949-4" -# "1212_2949-5" -# "1212_2949-6" -# "1212_2949-7" -# ``` -# """ -# function related_literature_models(m::AbstractFTheoryModel) -# @req has_related_literature_models(m) "No associated models known for this model" -# return get_attribute(m, :related_literature_models) -# end +Global Tate model over a not fully specified base -- SU(2k+1) Tate model with parameter values (k = 5) based on arXiv paper 1212.2949 Eq. (3.2) + +julia> related_literature_models(m) +6-element Vector{String}: + "1212_2949-2" + "1212_2949-3" + "1212_2949-4" + "1212_2949-5" + "1212_2949-6" + "1212_2949-7" +``` +""" +function related_literature_models(m::AbstractFTheoryModel) + @req has_related_literature_models(m) "No associated models known for this model" + return get_attribute(m, :related_literature_models) +end @doc raw""" resolutions(m::AbstractFTheoryModel) diff --git a/experimental/FTheoryTools/src/LiteratureModels/auxiliary.jl b/experimental/FTheoryTools/src/LiteratureModels/auxiliary.jl index 1c33599e1ee9..e87ce7fb9281 100644 --- a/experimental/FTheoryTools/src/LiteratureModels/auxiliary.jl +++ b/experimental/FTheoryTools/src/LiteratureModels/auxiliary.jl @@ -28,11 +28,19 @@ function _eval_poly(E::Number, vars) end function eval_poly(s::String, R) - symR = symbols(R) # Symbol[] - genR = gens(R) + if typeof(R) <: Union{PolyRing, MPolyRing} + symR = symbols(R) # Symbol[] + genR = gens(R) + else + symR = [] + genR = [] + end + return R(_eval_poly(Meta.parse(s), Dict(symR[i] => genR[i] for i in 1:length(symR)))) end +eval_poly(n::Number, R) = R(n) + # Example # julia> Qx, (x1, x2) = QQ["x1", "x2"]; # diff --git a/experimental/FTheoryTools/src/LiteratureModels/constructors.jl b/experimental/FTheoryTools/src/LiteratureModels/constructors.jl index e38ebb1e26ef..216ab2febed8 100644 --- a/experimental/FTheoryTools/src/LiteratureModels/constructors.jl +++ b/experimental/FTheoryTools/src/LiteratureModels/constructors.jl @@ -5,7 +5,9 @@ Many models have been created in the F-theory literature. A significant number of them have even been given specific names, for instance the "U(1)-restricted SU(5)-GUT model". This method has access to a database, from which it can -look up such literature models. Currently, you can provide +look up such literature models. + +Currently, you can provide any combination of the following optional arguments to the method `literature_model`: * `doi`: A string representing the DOI of the publication that @@ -19,9 +21,13 @@ introduced the model in question. * `version`: A string representing the version of the arXiv upload. The method `literature_model` attempts to find a model in our database for which the provided data matches the information in our record. If no such -model could be found, or multiple models exist with information matching the +model can be found, or multiple models exist with information matching the provided information, then an error is raised. +Some literature models require additional parameters to specified to single out +a model from a family of models. Such models can be provided using the optional +argument `model_parameters`, which should be a dictionary such as `Dict("k" => 5)`. + ```jldoctest julia> t = literature_model(arxiv_id = "1109.3454", equation = "3.1") Assuming that the first row of the given grading is the grading under Kbar @@ -51,7 +57,7 @@ Multivariate polynomial ring in 9 variables over QQ graded by e -> [2 -1 -1 0] ``` """ -function literature_model(; doi::String="", arxiv_id::String="", version::String="", equation::String="") +function literature_model(; doi::String="", arxiv_id::String="", version::String="", equation::String="", model_parameters::Dict{String,<:Any} = Dict{String,Any}()) # Try to find the file with the desired model @req any(s -> s != "", [doi, arxiv_id, version, equation]) "No information provided; cannot perform look-up" @@ -85,10 +91,29 @@ function literature_model(; doi::String="", arxiv_id::String="", version::String # We were able to find a unique model, so read that model) model_dict = JSON.parsefile(joinpath(@__DIR__, "Models/" * candidate_files[1])) + # Deal with any model parameters + if haskey(model_dict, "model_parameters") + needed_model_parameters = string.(model_dict["model_parameters"]) + + # Make sure the user has provided values for all the model parameters + for param in needed_model_parameters + @req (param in keys(model_parameters)) "Some model parameters not provided; the given model requires these parameters:\n $(join(needed_model_parameters, "\n "))" + end + + # Function to map a function of strings over arbitrarily nested Vectors of strings + nested_string_map(f, s::String) = f(s) + nested_string_map(f, v::Vector) = map(x -> nested_string_map(f, x), v) + nested_string_map(f, a::Any) = a + + for (key, val) in model_parameters + map!(x -> nested_string_map(s -> replace(s, key => string(val)), x), values(model_dict["model_data"])) + end + end + # Appropriately construct each possible type of model - if model_dict["model_data"]["type"] == "tate" + if model_dict["model_descriptors"]["type"] == "tate" model = _construct_literature_tate_model(model_dict) - elseif model_dict["model_data"]["type"] == "weierstrass" + elseif model_dict["model_descriptors"]["type"] == "weierstrass" model = _construct_literature_weierstrass_model(model_dict) else @req false "Model is not a Tate or Weierstrass model" @@ -153,8 +178,11 @@ function literature_model(; doi::String="", arxiv_id::String="", version::String end # This removes 'model' from the front and '.json' from the end of the file name set_attribute!(model, :literature_identifier => candidate_files[1][6:end - 5]) - if haskey(model_dict["model_data"], "description") - set_attribute!(model, :model_description => model_dict["model_data"]["description"]) + if haskey(model_dict["model_descriptors"], "description") + set_attribute!(model, :model_description => model_dict["model_descriptors"]["description"]) + end + if haskey(model_dict, "model_parameters") + set_attribute!(model, :model_parameters => model_parameters) end if haskey(model_dict["paper_metadata"], "authors") set_attribute!(model, :paper_authors => string.(model_dict["paper_metadata"]["authors"])) @@ -223,7 +251,7 @@ function _construct_literature_tate_model(model_dict::Dict{String,Any}) a6 = eval_poly(get(model_dict["model_data"], "a6", "0"), auxiliary_base_ring) @req haskey(model_dict["model_data"], "auxiliary_base_grading") "Currently, only literature models over arbitrary bases are supported" - auxiliary_base_grading = matrix(ZZ, transpose(hcat(model_dict["model_data"]["auxiliary_base_grading"]...))) + auxiliary_base_grading = matrix(ZZ, transpose(hcat([[eval_poly(weight, ZZ) for weight in vec] for vec in model_dict["model_data"]["auxiliary_base_grading"]]...))) auxiliary_base_grading = vcat([[Int(k) for k in auxiliary_base_grading[i,:]] for i in 1:nrows(auxiliary_base_grading)]...) return global_tate_model(auxiliary_base_ring, auxiliary_base_grading, base_dim, [a1, a2, a3, a4, a6]) @@ -240,7 +268,7 @@ function _construct_literature_weierstrass_model(model_dict::Dict{String,Any}) g = eval_poly(get(model_dict["model_data"], "g", "0"), auxiliary_base_ring) @req haskey(model_dict["model_data"], "auxiliary_base_grading") "Currently, only literature models over arbitrary bases are supported" - auxiliary_base_grading = matrix(ZZ, transpose(hcat(model_dict["model_data"]["auxiliary_base_grading"]...))) + auxiliary_base_grading = matrix(ZZ, transpose(hcat([[eval_poly(weight, ZZ) for weight in vec] for vec in model_dict["model_data"]["auxiliary_base_grading"]]...))) auxiliary_base_grading = vcat([[Int(k) for k in auxiliary_base_grading[i,:]] for i in 1:nrows(auxiliary_base_grading)]...) return weierstrass_model(auxiliary_base_ring, auxiliary_base_grading, base_dim, f, g) diff --git a/experimental/FTheoryTools/src/LiteratureModels/model_reference.json b/experimental/FTheoryTools/src/LiteratureModels/model_reference.json index df43e5994169..6df0a9383f6b 100644 --- a/experimental/FTheoryTools/src/LiteratureModels/model_reference.json +++ b/experimental/FTheoryTools/src/LiteratureModels/model_reference.json @@ -31,14 +31,16 @@ "description": "", "buzzwords": [""] }, - "model_parameters": [""], - "model_data": { + "model_descriptors": { "type": "", "description": "", "comment": "", "gauge_algebra": [""], "global_gauge_quotients": [""], - "discrete_factors": [""], + "discrete_factors": [""] + }, + "model_parameters": [""], + "model_data": { "base_dim": 3, "base_coordinates": [""], "a1": "", diff --git a/experimental/FTheoryTools/src/LiteratureModels/properties.jl b/experimental/FTheoryTools/src/LiteratureModels/properties.jl index de1a6304c0aa..f9d8be0ef3f7 100644 --- a/experimental/FTheoryTools/src/LiteratureModels/properties.jl +++ b/experimental/FTheoryTools/src/LiteratureModels/properties.jl @@ -22,6 +22,7 @@ has_journal_volume(m::AbstractFTheoryModel) = has_attribute(m, :journal_volume) has_journal_year(m::AbstractFTheoryModel) = has_attribute(m, :journal_year) has_literature_identifier(m::AbstractFTheoryModel) = has_attribute(m, :literature_identifier) has_model_description(m::AbstractFTheoryModel) = has_attribute(m, :model_description) +has_model_parameters(m::AbstractFTheoryModel) = has_attribute(m, :model_parameters) has_paper_authors(m::AbstractFTheoryModel) = has_attribute(m, :paper_authors) has_paper_buzzwords(m::AbstractFTheoryModel) = has_attribute(m, :paper_buzzwords) has_paper_description(m::AbstractFTheoryModel) = has_attribute(m, :paper_description) diff --git a/experimental/FTheoryTools/src/TateModels/constructors.jl b/experimental/FTheoryTools/src/TateModels/constructors.jl index dcc21f453f9b..2f5a4ca79cf2 100644 --- a/experimental/FTheoryTools/src/TateModels/constructors.jl +++ b/experimental/FTheoryTools/src/TateModels/constructors.jl @@ -252,6 +252,9 @@ function Base.show(io::IO, t::GlobalTateModel) end if has_model_description(t) push!(properties_string, "-- " * string(get_attribute(t, :model_description))) + if has_model_parameters(t) + push!(properties_string, "with parameter values (" * join(["$key = $(string(val))" for (key, val) in model_parameters(t)], ", ") * ")") + end end if has_arxiv_id(t) push!(properties_string, "based on arXiv paper " * string(get_attribute(t, :arxiv_id))) diff --git a/experimental/FTheoryTools/src/WeierstrassModels/constructors.jl b/experimental/FTheoryTools/src/WeierstrassModels/constructors.jl index 59935c254743..0b9216da77c3 100644 --- a/experimental/FTheoryTools/src/WeierstrassModels/constructors.jl +++ b/experimental/FTheoryTools/src/WeierstrassModels/constructors.jl @@ -232,6 +232,9 @@ function Base.show(io::IO, w::WeierstrassModel) end if has_model_description(w) push!(properties_string, "-- " * string(get_attribute(w, :model_description))) + if has_model_parameters(t) + push!(properties_string, "with parameter values (" * join(["$key = $(string(val))" for (key, val) in model_parameters(t)], ", ") * ")") + end end if has_arxiv_id(w) push!(properties_string, "based on arXiv paper " * string(get_attribute(w, :arxiv_id))) diff --git a/experimental/FTheoryTools/src/exports.jl b/experimental/FTheoryTools/src/exports.jl index 07b0207ec550..cd148a6f8664 100644 --- a/experimental/FTheoryTools/src/exports.jl +++ b/experimental/FTheoryTools/src/exports.jl @@ -45,6 +45,7 @@ export has_journal_volume export has_journal_year export has_literature_identifier export has_model_description +export has_model_parameters export has_paper_authors export has_paper_buzzwords export has_paper_description @@ -77,10 +78,12 @@ export journal_volume export journal_year export literature_identifier export model_description +export model_parameters export paper_authors export paper_buzzwords export paper_description export paper_title +export related_literature_models export resolutions export resolution_generating_sections export resolution_zero_sections