A private Trello board for task tracking:
https://trello.com/b/kSZvdVg5/physics-derivation-graph
Primary source code repo:
https://github.com/allofphysicsgraph/proofofconcept/blob/gh-pages/doc/physics_graph_notes.log
Demo of proof of concept:
http://allofphysicsgraph.github.io/proofofconcept/
A blog to track my status
https://physicsderivationgraph.blogspot.com/
An old set of descriptions
https://sites.google.com/site/physicsderivationgraph/
This site is depreciated
Thursday, May 3, 2018
limiting my effort to just Latex for expressions
The core of the Physics Derivation graph is the relation between expressions. I've considered how much additional knowledge could be captured by storing expressions as Abstract Syntax Trees. While this would add a lot of work and therefore take more time, there's potentially a lot of value in having a more robust representation. Additionally, there's the challenge that I don't know how to represent all expressions in Physics using Abstract Syntax Trees.
Rather than store each expression as an AST, I'm going to limit my effort to just storing expressions using Latex. As a consequence, the validity of inference rules applied to expressions not be able to be checked. If someone comes up with a representation more useful than Latex (ie ASTs, MathML, etc), then a conversion will need to be performed.
The second reason the choice of Latex is significant because it limits how far down in the hierarchy that can be enumerated. Specifically, in the context of these layers
the Physics Derivation Graph with Latex will not be able to explore systematically the symbols and operators used.
Rather than store each expression as an AST, I'm going to limit my effort to just storing expressions using Latex. As a consequence, the validity of inference rules applied to expressions not be able to be checked. If someone comes up with a representation more useful than Latex (ie ASTs, MathML, etc), then a conversion will need to be performed.
The second reason the choice of Latex is significant because it limits how far down in the hierarchy that can be enumerated. Specifically, in the context of these layers
- Physics derivation graph
- Derivation
- Step
- Expressions, inference rules
- Symbol, operators
the Physics Derivation Graph with Latex will not be able to explore systematically the symbols and operators used.
Monday, August 28, 2017
validating equivalent and transformed expressions
To check whether a step was implemented correctly, the question is, "given the input expressions (and feeds), do the output expressions conform to the transform prescribed by the inference rule?"
For example, suppose we start with "A=B" and operate on this with the inference rule "add X to both sides," where X=2. If the output is "A+2 = B+2," was the step implemented correctly?
The inference rule can be described by an abstract syntax tree (AST):
= =
/ \ --> / \
LHS RHS + +
/ \ / \
LHS x RHS x
https://blog.plover.com/math/24-puzzle-2.html
https://news.ycombinator.com/item?id=15075110
For example, suppose we start with "A=B" and operate on this with the inference rule "add X to both sides," where X=2. If the output is "A+2 = B+2," was the step implemented correctly?
The inference rule can be described by an abstract syntax tree (AST):
= =
/ \ --> / \
LHS RHS + +
/ \ / \
LHS x RHS x
https://blog.plover.com/math/24-puzzle-2.html
https://news.ycombinator.com/item?id=15075110
Saturday, July 8, 2017
anatomy of the "file per expression" data format in the Physics Derivation Graph
Each derivation gets a folder. The folder typically contains four CSV files:
- expression_identifiers.csv: two columns of integers (7 digits, 10 digits) where each row looks like "1432042,1029039904"
- feeds.csv: a single column of integers (7 digits) where each row looks like "2342425"
- inference_rule_identifiers.csv: two columns, the first is an integer (7 digits). An example row looks like 1294844,declareInitialExpression
- derivation_edge_list.csv: two columns of integers (7 digits each) where each row looks like "3934948,3499522"
Elsewhere in this documentation I refer to the 7 digit integers as "temporary IDs" and the digit integers as "permanent IDs".
The graph visualization is built from the content of derivation_edge_list.csv, but additional decorations are need to renders a meaningful picture. That's where the other three CSVs come into play -- they indicate what the relevant decoration is (either a feed, expression, or inference rule).
Minimum viable product for the Physics Derivation Graph
I've been looking for ways to pare down the tasks that I face in building the Physics Derivation Graph. Defining a minimum viable product for delivery would help prioritize what I work on.
Although the d3js-based interactive graphs are neat, they don't provide much value. The static PNGs of derivations are not as sexy, but they are easier to navigate. The PNGs are the minimum viable product.
As far as storage formating, I think the "file per expression" approach is still the best option, compared to CSV, XML, and MathML.
Thus, the MVP needs to be able to generate PNGs of a graph from derivations stored in the "file per expression" method.
Generating a file per expression is a tedious task that both limits scalability and could introduce errors if done manually. The command-line based interactive user prompt is a useful tool that addresses both concerns.
The interactive user prompt is a potential time sink. Minimum functionality is user should be able to enter a new derivation and write results to file.
Do not include ability to edit existing derivations, or to link existing derivations by deconflicting expressions with different identifiers.
Task 1: generate graph PNG from file per expressions
Task 2: generate file per expression from interactive prompt
Task 3: convert from interactive command-line prompt to web-based prompt
Although the d3js-based interactive graphs are neat, they don't provide much value. The static PNGs of derivations are not as sexy, but they are easier to navigate. The PNGs are the minimum viable product.
As far as storage formating, I think the "file per expression" approach is still the best option, compared to CSV, XML, and MathML.
Thus, the MVP needs to be able to generate PNGs of a graph from derivations stored in the "file per expression" method.
Generating a file per expression is a tedious task that both limits scalability and could introduce errors if done manually. The command-line based interactive user prompt is a useful tool that addresses both concerns.
The interactive user prompt is a potential time sink. Minimum functionality is user should be able to enter a new derivation and write results to file.
Do not include ability to edit existing derivations, or to link existing derivations by deconflicting expressions with different identifiers.
Task 1: generate graph PNG from file per expressions
Task 2: generate file per expression from interactive prompt
Task 3: convert from interactive command-line prompt to web-based prompt
Friday, July 7, 2017
MathML is probably better than LaTeX, but I'm lazy
There's a good overview of MathML provided by Wolfram. MathML interacts with Mathematica, both for import and export.
"MathML comes in two types: Presentation MathML, which describes what an equation looks like, and Content MathML, which describes what an equation means. By default, MathJax works with Presentation MathML and offers an extension for Content MathML."
There are online tools that enable conversion of LaTeX (mathematics) to Presentation MathML.
MathML is probably the better format to store data in the Physics Derivation Graph compared to Latex. However, Latex is more convenient for me as a data entry method.
Subscribe to:
Posts (Atom)