mathematical model (E9)

From MaRDI portal
EntitySchema:E9
language codelabeldescriptionaliasesedit
enmathematical modelschema for mathematical modelmodel | theoretical model | model in mathematicsedit
# Schema for mathematical models in the MaRDI portal (EntitySchema:E9)
PREFIX rdf:      <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:     <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl:      <http://www.w3.org/2002/07/owl#>
PREFIX skos:     <http://www.w3.org/2004/02/skos/core#>
PREFIX schema:   <http://schema.org/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd:       <https://portal.mardi4nfdi.de/entity/>
PREFIX wdt:      <https://portal.mardi4nfdi.de/prop/direct/>
PREFIX p:        <https://portal.mardi4nfdi.de/prop/>
PREFIX ps:       <https://portal.mardi4nfdi.de/prop/statement/>
PREFIX pq:       <https://portal.mardi4nfdi.de/prop/qualifier/>

# import formula
IMPORT <https://portal.mardi4nfdi.de/wiki/Special:EntitySchemaText/E5>
# import computational task
IMPORT <https://portal.mardi4nfdi.de/wiki/Special:EntitySchemaText/E11>

start = @<mathematicalModel>

# A mathematical model must be an instance of Q68663 (mathematical model)
# AND belong to the MathModDB community (P1495 = Q6534265).
<mathematicalModel> EXTRA wdt:P31 wdt:P1495
                          rdfs:label skos:altLabel skos:prefLabel
                          schema:name schema:description
                          schema:version schema:dateModified
                          owl:sameAs wikibase:statements wikibase:sitelinks wikibase:identifiers {
  # instance of: mathematical model
  wdt:P31    [ wd:Q68663 ] ;
  # community: MathModDB
  wdt:P1495  [ wd:Q6534265 ] ;
  # assumes: zero, one or more formulas, validated against E5 (optional)
  wdt:P1674  @<formula> * ;
  # contains: full statement node for qualifier validation
  p:P1560    @<containsStatement> * ;
  # approximated by: another mathematical model (optional)
  p:P1655    @<approximatedByStatement> * ;
  # discretized by: another mathematical model (optional)
  p:P1656    @<discretizedByStatement> * ;
  # linearized by: another mathematical model (optional)
  p:P1657    @<linearizedByStatement> * ;
  # specialized by: another mathematical model (optional)
  p:P1684    @<specializedByStatement> * ;
  # described by source (optional, with possible qualifier)
  p:P286     @<describedBySourceStatement> * ;
  # used by: computational task (optional)
  p:P147     @<usedByStatement> * ;
}

# Statement node for P1560.
# The value is either another mathematical model (no qualifiers expected)
# or a formula (role qualifier allowed). Two branches handle these separately.
<containsStatement> (
  @<containsModelStatement>
  OR
  @<containsFormulaStatement>
)

# Branch 1 — value is another mathematical model.
# No qualifiers are expected on model-valued contains statements.
<containsModelStatement> {
  ps:P1560  @<mathematicalModelRef> ;
}

# Branch 2 — value is a formula: role qualifier allowed.
<containsFormulaStatement> EXTRA ps:P1560 {
  ps:P1560  @<formulaRef> ;
  # qualifier: object has role = analytical solution, boundary condition,
  # computational domain, constitutive equation, constraint,
  # coupling condition, final condition, initial condition,
  # input, constant, parameter, objective function,
  # output, governing equation, strong formulation, weak formulation
  pq:P560   [ wd:Q6775641 wd:Q6534259 wd:Q6775579 wd:Q6775587
              wd:Q6534262 wd:Q6534266 wd:Q6534267 wd:Q6534264
              wd:Q6480299 wd:Q6480317 wd:Q6480341 wd:Q6534255
              wd:Q6480295 wd:Q7270342 wd:Q6775640 wd:Q6775618 ] * ;
  # qualifier: series ordinal — 1-based integer position of this formula, optional
  pq:P146   LITERAL ?
}

<approximatedByStatement> EXTRA ps:P1655 {
  ps:P1655   @<mathematicalModelRef> ;
}

<discretizedByStatement> EXTRA ps:P1656 {
  ps:P1656   @<mathematicalModelRef> ;
}

<linearizedByStatement> EXTRA ps:P1657 {
  ps:P1657   @<mathematicalModelRef> ;
}

<specializedByStatement> EXTRA ps:P1684 {
  ps:P1684   @<mathematicalModelRef> ;
}

<describedBySourceStatement> EXTRA ps:P286 {
  ps:P286    @<publication> ;
  # qualifier: role of this source = review, use, invention, documentation,
  # science project, analysis, application
  pq:P560    [ wd:Q6672366 wd:Q6480405 wd:Q6672344 wd:Q6672349
               wd:Q6775621 wd:Q6825292 wd:Q6825298 ] *
}

<publication> EXTRA wdt:P31
                    rdfs:label skos:altLabel schema:description
                    schema:version schema:dateModified owl:sameAs
                    wikibase:statements wikibase:sitelinks wikibase:identifiers {
  # instance of: scholarly article, conference paper, chapter, monograph, thesis, dissertation,
  # book, report, scientific journal, (version, edition, or translation), ISO standard edition, YouTube channel
  # written work, volume, reference work, encyclopedic dictionary, Jewish encyclopedia, universal encyclopedia
  # literary work, controlled vocabulary, explanatory dictionary
  wdt:P31    [ wd:Q56887 wd:Q56888 wd:Q56552 wd:Q56763  wd:Q57010 wd:Q56927
                     wd:Q56401 wd:Q57006 wd:Q56973 wd:Q56536 wd:Q7268923 wd:Q7270076
                     wd:Q56538 wd:Q56449 wd:Q7274954 wd:Q7284804  wd:Q7284810 wd:Q7284813
                     wd:Q56811 wd:Q7284835 wd:Q7284945] ;
}

<usedByStatement> EXTRA ps:P147 {
  # statement value: a computational task, validated against E11
  ps:P147    @<computationalTaskRef>  ;
}

# ---------------------------------------------------------------------------
# Lightweight reference shapes — no recursion beyond a single instance-of
# (+ community, where applicable) check, sufficient to distinguish value
# types without triggering circular dependency errors.
# ---------------------------------------------------------------------------

# Reference shape for mathematical models.
<mathematicalModelRef> EXTRA wdt:P31 wdt:P1495 {
  # instance of: mathematical model
  wdt:P31    [ wd:Q68663 ] ;
  # community: MathModDB
  wdt:P1495  [ wd:Q6534265 ]
}

# Reference shape for formulas.
<formulaRef> EXTRA wdt:P31 wdt:P1495 {
  # instance of: formula
  wdt:P31    [ wd:Q96183 ] ;
  # community: MathModDB
  wdt:P1495  [ wd:Q6534265 ]
}