Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling LaTeX math expressions #245

Open
mdeagen opened this issue Oct 15, 2020 · 1 comment
Open

Enabling LaTeX math expressions #245

mdeagen opened this issue Oct 15, 2020 · 1 comment

Comments

@mdeagen
Copy link
Collaborator

mdeagen commented Oct 15, 2020

Feature request: Eventual support for markdown, and more specifically for LaTeX math expressions (for example, within the definition of a term in the ontology, such that the string is properly rendered to the human reader in the documentation)

Would best practice for now be to capture markdown within backticks?

See related: https://yihui.org/en/2018/07/latex-math-markdown/

@jpmccu
Copy link
Member

jpmccu commented Oct 15, 2020

I had been tinkering around with the idea of relating interpretable mathematical expressions in terms of their variables. So if a property is derived via a formula, we can use something like an equation solver to auto-solve for properties in the equation if the other variables are available. There's a python package that can do the algebra for us (but I forget the name). So we might have something like this:

:NewtonsSecondLawOfMotion a sio:Equation;
    sio:hasValue "f=ma"^^:mathjax. #or whatever datatype

:Force rdfs:subClassOf sio:Quantity;
    sio:hasRole [ 
      a sio:Parameter; 
      sio:hasValue "f";
      sio:inRelationTo :NewtonsSecondLawOfMotion
    ].

sio:Mass rdfs:subClassOf sio:Quantity;
    sio:hasRole [ 
      a sio:Parameter; 
      sio:hasValue "m";
      sio:inRelationTo :NewtonsSecondLawOfMotion
    ].

:Acceleration rdfs:subClassOf sio:Quantity;
    sio:hasRole [ 
      a sio:Parameter; 
      sio:hasValue "a";
      sio:inRelationTo :NewtonsSecondLawOfMotion
    ].

Then if we have some data like this:

:baseball_12 sio:hasAttribute :baseball_12_mass, :baseball_12_acceleration.

:baseball_12_mass a sio:Mass;
    sio:hasValue 0.145; 
    sio:hasUnit uo:kg.

:baseball_12_acceleration a :Acceleration; 
    sio:hasValue 9.81; 
    sio:hasUnit uo:mps2; 
    sio:measuredAt "2020-10-15Z10:38:12"^^xsd:dateTime.

Since we know the slots for each variable but one in the equation, we can have an agent compute the force (and record the provenance):

:Baseball sio:hasAttribute [
    a :Force; 
    sio:hasValue 1.42245; 
    sio:hasUnit uo:newton; 
    sio:measuredAt "2020-10-15Z10:38:12"^^xsd:dateTime;
    prov:wasGeneratedBy [
      a :NewtonsSecondLawOfMotion; 
      prov:used :baseball_12_mass, :baseball_12_acceleration
  ].

In the nanopub provenance we can record which nanopubs it came from and such, and probably move the provenance bit above there too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants