allofphysicsgraph / proofofconcept Goto Github PK
View Code? Open in Web Editor NEWPhysics Derivation Graph: mathematical connections among equations
Home Page: https://derivationmap.net/
License: Other
Physics Derivation Graph: mathematical connections among equations
Home Page: https://derivationmap.net/
License: Other
Hi @bhpayne,
I just discovered your work and am really interested. I have been thinking about doing something of the same kind but without going as far as you have been. I consider tinkering a bit on what you have done to see if your approach and mine are compatible.
Here is what I have in mind, first.
I know a bit about RDF and I would rather store data in a RDF graph than in q non-RDF XML file.
If data was stored in a RDF file, it would be possible to extract it using RDFlib easily and use your code to compute (only adding a layer, so that the non-RDF XML files can be created).
But it would also be possible to work from the terminology side, first by writing an ontology for the concepts (OWL classes) used in the graph and then to compute on the data, taking advantage of the RDF-possiblities.
What do you think about it? These are just fresh thoughts, but they are the result of the reflexions I have had plus what I understood of your project.
If you want to have an idea of what I am specialising in (as a personal projet alongside my studies), take a look at http://jibe-b.github.io (but don't expect too much, for example I have not yet written anything about derivations graphs and what I mostly use these pages as a notebook).
Best,
jibe
This feature is in the menu but does not currently function
sub steps: entering equation, new symbol, connections
https://github.com/allofphysicsgraph/proofofconcept/tree/master/doc/user_manual
connections database has
<connection_set name="example_of_Godel_problem" discipline="math">
but doesn't actually demonstrate this claim
intuitive flow is from top-to-bottom or left-to-right. Current graph is spring-force model with gravity for centering.
To do: starting point should be at top or left, final expressions should be bottom or right.
I've done a depth-first search on the nuances of various derivations. Rather than continuing this process (a tedious and large amount of work), do a breadth-first search.
What are all the governing equations for various branches of Physics? Edges would denote "a derivation exists"
https://www.wolfram.com/mathematica/
Closed source, not free
To run the PDG on a fresh Ubuntu install, need
Images opened in the application currently rely on the host OS.
http://www.sympy.org/en/index.html
SymPy is Python-based symbolic math
Free
sufficient content for proof of concept -- all fields and all notations covered
realized that the Physics Derivation Graph is hierarchical:
This can probably be used for visualization, determining storage format
Brian Foote and Joseph Yoder, in the paper “Big Ball of Mud” assert that when a combination of pressure, risk aversion, inexperience, complexity, rate of change, and scale of a project all increase, so too does the big ball of mud.
https://github.com/tinkerpop/blueprints/wiki/Property-Graph-Model
http://markorodriguez.com/2011/02/08/property-graph-algorithms/
advantage: allows hierarchical structure
selected declareInitialExpr
Latex expansion: latex here
existing derivation steps:
{'infrule': 'declareInitialExpr', 'input': [], 'infrule indx': 6545819, 'feed': [], 'output': [{'latex': 'W_{net out} = Q_{in} - Q_{out}', 'step indx output': 1872040, 'expr indx': 332248408}]}
number of input expressions: 0, number of feeds: 0, number of output expressions: 1
Choice for providing step content for output:
1 provide new Latex
2 use existing expression index from above list
selection [1]:
--> no selection from user; defaulting to
1
output expression Latex, 1 of 1: \eta_{thermal} = W_{net out}/Q_{in}
Resulting dic:
{'infrule': 'declareInitialExpr', 'input': [], 'feed': [], 'output': [{'latex': '\eta_{thermal} = W_{net out}/Q_{in}', 'expr indx': 432340984}]}
derivation name: thermal efficiency and work and heat
Traceback (most recent call last):
File "bin/interactive_user_prompt.py", line 643, in
list_of_expr,connection_expr_temp,list_of_feeds,connection_infrule_temp,output_path)
File "bin/interactive_user_prompt.py", line 164, in first_choice
connection_expr_temp,list_of_feeds,connection_infrule_temp,output_path)
File "bin/interactive_user_prompt.py", line 231, in start_new_derivation
connection_infrule_temp,list_of_feeds,output_path)
File "bin/interactive_user_prompt.py", line 345, in write_steps_to_file
step_ary=assign_temp_indx(step_ary)
File "bin/interactive_user_prompt.py", line 319, in assign_temp_indx
temp_indx_for_this_expr_indx = expr_indx_exists_in_ary(expr_indx,step_indx,step_ary)
File "bin/interactive_user_prompt.py", line 289, in expr_indx_exists_in_ary
if ((step_ary[step_indx]['output'][input_indx]['expr indx'] == test_indx) and
UnboundLocalError: local variable 'input_indx' referenced before assignment
alternative approaches for graphs with math labels
axiom
postulate
derivation
theorem
inference rule
statement
terms
operators
products
same test cases (polynomial, calculus, tensor, quantum) as issue #7
https://www.intmath.com/blog/mathematics/comparison-math-web-publishing-options-9915
Who to contact?
By what method?
How have others reviewed their interaction when submitting ideas?
start with local universities and community colleges
Content in the Physics Derivation Graph is currently stored as LaTeX. LaTeX is not meaningful for computer algebra systems, so a semantically meaningful representation like Content MathML or SymPy or Sage would be better.
For new content, manually entry in Content MathML is burdensome. Therefore collecting expressions in LaTeX and converting to Content MathML is preferable.
I wrote a bunch of SymPy inference rules in
https://github.com/allofphysicsgraph/proofofconcept/blob/gh-pages/v2_XML/databases/inference_rules_database.xml
and a checker,
There are types of nodes -- inference rules, expressions, feeds, initial, final. These could have distinct color borders to quickly distinguish nodes.
python bin/build_connections_graph.py
fails for
example_of_Godel_problem
Produce a report comparing formats
what are we comparing?
what is the evaluation?
In general, we need to evaluate
Not a problem:
consumer cares about:
To start, evaluate:
Currently the JSON file containing graph information must be loaded during page load.
If the user is going to dynamically enter content, then d3js will need to dynamically read the graph
http://pothibo.com/2013/09/d3-js-how-to-handle-dynamic-json-data/
Suppose all the content is present in a nice interface. Then what?
Static graph or dynamic graph? If dynamic, how to regulate user input?
It's not clear to me that this project constitutes "research"
"Programming in Mathematica is based on transforming trees. The built-in function TreeFormallows us to visually represent the tree backbone of Mathematica programs and data structures"
source:
http://blog.wolfram.com/2007/05/13/symbolic-programming-visualized/
I'd like to see whether Mathematica's treeform is an Abstract Syntax Tree or Parse Tree
http://stackoverflow.com/questions/5967888/whats-the-difference-between-parse-trees-and-abstract-syntax-trees
An easy test is to test the output of
Treeform[(a+b)+c]
if the output doesn't include paranethesis, then treeform is an AST.
To make this useful, see
https://mathematica.stackexchange.com/questions/29565/getting-a-usable-expression-tree
Storing graph as
some tools are implemented in bash. Those .sh files don't run natively on Windows.
produce a report comparing databases
Currently all Python scripts start with a shebang line for Mac
#!/opt/local/bin/python
This doesn't work on Ubuntu
The motivation for using the shebang is to enable
./bin/<scriptname>.py
Without the shebang, need to call
python bin/<scriptname>.py
as per #17 , d3js supports math. Can the math be used as a node label?
neato failure to create cairo surface out of memory
ubuntu, fresh install
"For example, w(a+b) could mean that the function w is applied to a +
b, or that w is multiplied by a + b."
source: https://pdfs.semanticscholar.org/a91a/f3fa64e1296de470206f375a29ddc1c7b54d.pdf
"Extracting Mathematical Semantics from LATEX Documents"
Another example:
\frac{dx}{dy}
could be interpreted as a division to two, three, or four variables,
or it could be a PDE.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.