-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathphysics_graph_notes.log
More file actions
2066 lines (1477 loc) · 78 KB
/
physics_graph_notes.log
File metadata and controls
2066 lines (1477 loc) · 78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
20200401
== previous dependencies ==
==== Eq2png ====
The Perl script uses the Perl program eq2png
http://www-users.math.umd.edu/~olsson/eq2png/
to generate PNG files for each equation and each operator.
example use:
perl statement2png.pl
Common issue: error message "Can't locate XML/DOM.pm"
This can be isolated to eq2png by issuing the command
perl eq2png '$\int x^2 dx$' -o file.png
if this causes the error message, then install module
perl -MCPAN -e shell 'install XML::DOM'
==== mash.pl ====
Allows mathematica to be used from a shell
http://ai.eecs.umich.edu/people/dreeves/mash/
http://ai.eecs.umich.edu/people/dreeves/mash/mash.pl
20180512
Use Activity log to get a list of times and functions:
$ cat activity_log.dat | sed '/write_steps/d' | sed 's/ | <function /,/' | sed 's/ at .*//'
How many times was each function called?
$ cat activity_log.dat | sed '/write_steps/d' | sed 's/ | <function /,/' | sed 's/ at .*//' | cut -d',' -f2 | sort | uniq -c | sort -k1,1
Store unique functions to an array,
https://askubuntu.com/questions/439026/store-output-of-command-into-the-array/439038#439038
$ readarray -t ary_of_funcs <<< "$(cat activity_log.dat | sed '/write_steps/d' | sed 's/ | <function /,/' | cut -d',' -f2 | sort | uniq )"
$ printf -- "%s\n" "${ary_of_funcs[@]}"
20151107
# nothing up my sleeve - clean the destination directories
bin/clean_dev.sh
cp site/d3/d3.v3.min.js dev/site/
rm -rf output/
mkdir output
# user input
bin/interactive_user_prompt.py
mv dev/output/new_*.csv dev/
# or recycle existing
cp new_*.csv dev/
cp derivation_name.dat dev/output/
# set variables to pass to scripts
deriv_name_with_spaces=`cat dev/output/derivation_name.dat`
deriv_name_without_spaces=`cat dev/output/derivation_name.dat | sed 's/ /_/g'`
# create infrastructure
bin/create_picture_per_expression_from_expressionDB.py
bin/create_picture_per_feed_from_feedDB.py
bin/create_picture_per_derivation_from_connectionsDB.py "${deriv_name_with_spaces}"
bin/create_json_per_derivation_from_connectionsDB.py "${deriv_name_with_spaces}"
bin/create_d3js_html_per_derivation_for_local.sh dev/site/ json/ pictures/ ${deriv_name_without_spaces} local
# place results in appropriate directories for visualization
cp dev/output/*.json dev/site/json/
cp dev/output/*.png dev/site/pictures/
cp dev/images_expression_png/*.png dev/site/pictures/images_expression_png/
cp dev/images_feed_png/*.png dev/site/pictures/images_feed_png/
cp lib/images_infrule_png/*.png dev/site/pictures/images_infrule_png/
# visualize the results
open /Applications/Google\ Chrome.app --args --allow-file-access-from-files file:///Users/benpayne/version_controlled/proofofconcept/dev/site/${deriv_name_without_spaces}.html
20151105
now that I'm doing rapid prototyping, I need a development environment which is
separate from the projection environment.
--> added /dev/
bin/interactive_user_prompt.py
mv dev/output/new_*.csv dev/
bin/create_picture_per_expression_from_expressionDB.py
bin/create_picture_per_feed_from_feedDB.py
bin/create_picture_per_derivation_from_connectionsDB.py
bin/create_json_per_derivation_from_connectionsDB.py
bin/create_d3js_html_per_derivation.sh dev/output new_derivation_eipiplusone
cp dev/output/new_derivation_eipiplusone.html site/testing/
cp dev/output/*.json site/json/
cp dev/output/*.png site/pictures/
20151104
bin/interactive_user_prompt.py
mv eipiplusone/output/new_* eipiplusone/
bin/create_picture_per_expression_from_expressionDB.py
bin/create_picture_per_feed_from_feedDB.py
bin/create_picture_per_derivation_from_connectionsDB.py
open eipiplusone/output/new_derivation_with_labels.png
open eipiplusone/output/new_derivation_without_labels.png
bin/create_json_per_derivation_from_connectionsDB.py
bin/create_d3js_html_per_derivation.sh output new_derivation
cp output/new_derivation.html site/
cp eipiplusone/output/*.json site/json/
cp eipiplusone/output/*.png site/pictures/
20151102
cleaned up lots of inconsistencies
todo:
* create nodes and edges csv file is not yet working as desired
* end-to-end test of enter derivation to create json needs to be demonstrated
* link overview graph to each derivation
See also https://trello.com/b/kSZvdVg5/physics-derivation-graph
20150908
Physics derivation graph is hierarchical
Symbol, operators
Expressions, inference rules
Step
Derivation
Physics derivation graph
20150806
I recognized that derivations are distinct from identities and definitions.
What confused me is that validation of an identity is a derivation.
F=m*a is not an identity
Euler equation is an identity.
http://www.purplemath.com/modules/proving.htm
identity: only manipulate one side of the equation, whereas in a derivation both sides are manipulated
set of identities:
https://en.wikipedia.org/wiki/Proofs_of_trigonometric_identities
20150618
contacted jibe, jon seaton, and wojech
https://www.physicsforums.com/threads/physics-equation-map.4269/
20150519
Now I have two tasks:
* non-overlapping node labels, a la
http://bl.ocks.org/MoritzStefaner/1377729
* hierarchical graph -- interactive via URLs
http://stackoverflow.com/questions/20575026/how-to-make-labels-and-nodes-in-d3-forced-layout-clickable-to-navigate-to-a-url?lq=1
http://stackoverflow.com/questions/13104681/hyperlinks-in-d3-js-objects
Both are presentation issues. I think the hierarchical graph is more important as it is the "zoom"
20150515
got quadratic equation in d3js!
Visualization needs non-overlapping labels, see
http://bl.ocks.org/MoritzStefaner/1377729
20150513
The translation from the static .xml based graphs to .json for d3js is not a simple regex.
The .json needs to include the picture dimensions.
My next task is to parse edges based JSON input rather than relying on the data structure native to d3js
{source: nodes[0], target: nodes[1]},
{source: nodes[1], target: nodes[2]},
See https://github.com/mbostock/d3/wiki/Force-Layout
"these attributes may be specified as a numeric index rather than a direct link, such that the nodes and links can be read-in from a JSON file"
...
"The source and target attributes on incoming links are only replaced with the corresponding entries in nodes if these attributes are numbers"
http://bl.ocks.org/mbostock/4062045
20150305
I created a project on webprotege for the physics derivation graph
http://webprotege.stanford.edu/#Edit:projectId=c816e793-12eb-4bfd-a4c7-3db0ba44b34c
The project is populated with data from
https://github.com/allofphysicsgraph/proofofconcept/wiki/Inference-Rules
and
https://github.com/allofphysicsgraph/proofofconcept/wiki/Operators
I then exported the data from webprotege as "OWL/XML" and got a ".owx" file
http://bhpayne.github.io/physics_derivation_graph/physics_derivation_graph.owx
I can plot the graph in
http://vowl.visualdataweb.org/webvowl/index.html#iri=http://bhpayne.github.io/physics_derivation_graph/physics_derivation_graph.owx
That same file input doesn't work on my instance
http://bhpayne.github.io/physics_derivation_graph/webvowl_0.3.3/index.html?#iri=http://bhpayne.github.io/physics_derivation_graph/physics_derivation_graph.owx
My next step is to determine how what I've done so far (developing
structure) relates to putting content into OWL. The content is
mathematical, so the format will likely be MathML.
20150304
Started a page for myself on
https://bhpayne.github.io/
Good news: github.io supports HTML5
https://haxiomic.github.io/GPU-Fluid-Experiments/html5/?q=Medium
20150304
Seems like the main hurdle will be converting XML to the RDF triple paradigm.
(expression) (is composed of) (operators)
(operators) (are) (symbols or math)
Problem is that some inference rules take feeds, rather than simply relate one expression to another
----------------
| expression 1 |
----------------
|
v
-------------------------- --------
\ multiply both sides by /--<--| feed |
------------------------ --------
|
v
----------------
| expression 2 |
----------------
Perhaps the triplets are
(expression) (is composed of) ({left-hand-side, relation, right-hand-side})
(left-hand-side) (is composed of) (symbols and operators)
(right-hand-side) (is composed of) (symbols and operators)
(relation operators) (is one of) ({=,<,>,!=,<=,>=})
(expression) (is acted upon by) (inference rule)
(inference rule) (takes) (feed)
(inference rule) (yields) (expression)
********************
Google search for
rdf physics derivation
yields no relevant results
The first return for
rdf physics equation
is
http://stackoverflow.com/questions/27860142/writing-scientific-hypothesis-in-rdf
It appears to be our friend jibe-b
http://stackoverflow.com/users/4087192/jeybee
*******************
Looking at the source code for the page
http://vowl.visualdataweb.org/webvowl/index.html#iri=http://jibe-b.github.io/ontology/physics-derivations-test
I am a bit confused -- I don't see where the graph is being loaded from.
******************
learning RDF
Good:
http://www.linkeddatatools.com/introducing-rdf
http://www.linkeddatatools.com/introducing-rdf-part-2
OK
http://www.w3schools.com/webservices/ws_rdf_example.asp
Out of date
http://www.rdfdata.org/
************************
http://protege.stanford.edu/
http://webprotege.stanford.edu/
20141207
what's the elevator pitch?
compile a database of all current known physics
showing how they correlate
the logic behind that correlation
showing how they are derived
examples of capturing lots of information concisely in an accessible form
* google maps
* wikipedia
20141207
syntax candidates: {ContentML, PresentationML, Latex, Mathematica, SymPy, abstract syntax tree}
In general, we need to evaluate
* ability to input
* ability to transform between representations
* ability to audit correctness
Not a problem:
* storage
consumer cares about:
* speed
* ease of use
* presentation
* accessibility - multi-device, multi-OS
* easy setup
A set of test cases for flexing the capability of syntax
1) polynomial
Latex: a x^2 + b x + c = 0
2) Stoke's theorem
\int \int_{\sum} \vec{\nabla} \times \vec{F} \dot d\sum = \oint_{\partial \sum} \vec{F}\dot d\vec{r}
3) Tensor analysis
Y^i(X_j) = \Delta^i_{\ j}
Einstein notation: contravariant = superscript, covariant = subscript
4) creation operator
\hat{a}^+ |n\rangle = \sqrt{n+1} |n+1\rangle
\sigma_x \sigma_p \geq \frac{\hbar}{2}
uncertainty principle
To evaluate:
* character count
* rendering
Content MathML for 1:
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<eq/>
<apply>
<plus/>
<apply><ci>a</ci> <power/><ci> x </ci><ci> 2 </ci></apply>
<apply><ci>b</ci> <ci> x </ci> </apply>
<apply><ci>c</ci> </apply>
</apply>
<apply>
<cn>0</cn>
</apply>
</apply>
</math>
Presentation MathML for 1:
<mrow>
<mrow>
<msup>
<mrow><mi> x </mi></mrow>
<mrow><mi> n </mi></mrow>
</msup>
<mo>+</mo>
<msup>
<mrow><mi> y </mi></mrow>
<mrow><mi> n </mi></mrow>
</msup>
</mrow>
<mo>=</mo>
<msup>
<mrow><mi> z </mi></mrow>
<mrow><mi> n </mi></mrow>
</msup>
</mrow>
* what are we comparing?
** presentation mathml, content mathml, mathematica, latex, abstract syntax tree
* what is the evaluation?
** can it describe all the notation necessary for physics
** how easy is the input method? (character count)
** can it be transformed to other representations
20141206
Statement stored as abstract syntax tree could generate MathML, Latex, CAS input
Mathematica has "tree form"
What I refer to as "statement", Mathematica calls "expressions"
Mathematica has "atomq" which indicates whether the expression
atom = {symbols, numbers, ...}
20141027
Mike found the basis for my inference rules
http://hotmath.com/hotmath_help/topics/properties-of-equality.html
"add X to both sides" = Addition Property
"multiply both sides by" = Multiplication Property
"substitute X for Y" = Substitution Property
"replace left side of equation 1 with left side of equation 2" =
Transitive Property
Knowing the right jargon makes all the difference!
http://www.mathwords.com/m/member_of_an_equation.htm
20141027
Famous physics equations
https://en.wikipedia.org/wiki/Wheeler%E2%80%93DeWitt_equation
https://en.wikipedia.org/wiki/Maxwell%27s_equations
https://en.wikipedia.org/wiki/Schr%C3%B6dinger_equation
https://en.wikipedia.org/wiki/Mass%E2%80%93energy_equivalence
https://en.wikipedia.org/wiki/Newton%27s_laws_of_motion
https://en.wikipedia.org/wiki/Kepler%27s_laws_of_planetary_motion
https://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation
https://en.wikipedia.org/wiki/Carnot%27s_theorem_(thermodynamics)
https://en.wikipedia.org/wiki/Ideal_gas_law
https://en.wikipedia.org/wiki/Bridgman%27s_thermodynamic_equations
https://en.wikipedia.org/wiki/Dirac_equation
https://en.wikipedia.org/wiki/Kirchhoff%27s_circuit_laws
Physics areas covered: Quantum, Classical, Astro, ElectroMagnetism, Thermodynamics, Relativity
These draw on algebra, calculus, differential equ, PDE, and linear algebra
It's not clear to me how
https://en.wikipedia.org/wiki/Einstein_notation
https://en.wikipedia.org/wiki/Bra%E2%80%93ket_notation
fit mathematically as syntax rules
20140930
I kept the iterative drafts associated with getting a "simple" derivation into the proper level of detail needed to put into the graph database. The initial problem fits on one page, but to get the steps explicit took 7 iterations and about 8 pages of repeated expansion. This measurement is biased by the fact I had to guess some of the inference rules, and ended up missing some (I needed to go back and further expand).
The result of this experiment is that the scope of the project is currently too grand. I have multiple distinct goals, each of which is non-trivial. Instead of trying to tackle all the problems at once, I'm going to prioritize tasks.
Motivating goals (full scope)
* write down all math-physics knowledge
* perform derivations in atomic steps using common inference rules
* be able to check derivations using a CAS
* display graph of derivations
** interactive graph feature: add new content
** interactive graph feature: zoom in/out
The objective of being explicit about derivations allows for checking by a CAS.
Being explicit causes most of the work currently.
My objective about having a pretty interface is useless without content.
Therefore, to both minimize workload and create content, I need to focus on just writing down the derivation relations.
--> don't bother about being explicit
--> don't bother with dynamic interface [static png is sufficient]
This resolves the difficulty of using Content MathML since I'm not going to use a CAS! Using Latex is sufficient at this time.
New task: gather derivations, determine how they are related (how to hop from one domain to another).
--> how is Maxwell's equations related to E=mc^2?
--> how is E=mc^2 related to F=ma?
* http://www.mrelativity.net/relationshipef/the_relationship_between_e_and_f_p1.htm
* http://www.spaceandmotion.com/wave-equations-elastic-medium-space.htm
This one gives the best explanation:
* http://www.laserpablo.com/teacherresources/files/E-mc2_Derivation2.ppt
The summary is: "On the first pass, don't bother being rigerous; just collect information."
In retrospect, this conclusion is obvious.
20140915
alternative to MathJax is released
https://news.ycombinator.com/item?id=8320439
http://khan.github.io/KaTeX/
I don't think this has significance for this project, because I don't expect to use in-browser rendering
20140907
Rendering graphs in browsers:
directly edit a directed graph with spring layout.
http://jsfiddle.net/vfu78/16/
directed graph editor with zoom; no spring layout
http://bl.ocks.org/cjrd/6863459
directed graph editor with spring layout; no zoom:
http://bl.ocks.org/rkirsling/5001347
20140907
Was able to convert presentation MathML to Latex using
http://sourceforge.net/projects/xsltml/
Instructions:
Extract the .zip
place your .xml with PMathML in the same directory
place the following tags in your .xml file at the top:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="mmltex.xsl"?>
Open in Firefox to view the generated Latex
20140907
I found some examples of PMathML at the Digital Library of Mathematical Functions
http://dlmf.nist.gov/1.7
Example:
http://dlmf.nist.gov/1.7.E1.pmml
I downloaded this file and saved it as
nist.xml
Opening in Firefox, this works as desired
rename the file nist.html
and Firefox doesn't render correctly.
Neither nist.xml nor nist.html render correctly in Chrome.
I added in the tags
<html><body> MathML here </body></html>
and also tried
<html><?xml version="1.0" encoding="UTF-8"?><body> MathML here </body></html>
<html><body><?xml version="1.0" encoding="UTF-8"?> MathML here </body></html>
but none of these three variations helped with rendering "nist.html" in Firefox.
Conclusions:
-file extension must be .xml
-does not render in Chrome
-works in Firefox
Firefox is happy with the file extension .xml and this tag ordering:
<?xml version="1.0" encoding="UTF-8"?><html><body> Presentation MathML here </body></html>
20140905
I've been researching the steps to take
Content MathML <--> Presentation MathML <--> Latex
Content MathML help:
http://cnx.org/contents/2bae0fb8-e5ea-48bd-b893-503033db6cfd@16
However, I realized the conversions I care about are
Content MathML --> CAS (i.e., sympy)
Content MathML --> graph rendering
Content MathML --> Latex for PDF
I suspect I will need
Content MathML --> Presentation MathML --> graph
--> or mathjax --> graph
MathJax
http://docs.mathjax.org/en/latest/mathml.html
I don't see any capability in Sympy to read in Content MathML. I would need to create a converter.
20140831
After talking with Mike G about this project, I realized having the Latex/SymPy representation separate was a cause for me being stuck. Whether I attacked the GUI, the CAS, or adding content to the database, there was a lack of unification between presentation (Latex) and symbolic manipulation (XML+SymPy).
MathML seems a likely candidate for unifying presentation and symbolic manipulation. I need to learn more about it.
OpenMath is a more flexible version of MathML
http://www.openmath.org/overview/om-mml.html
I will need to find where MathML doesn't work prior to using OpenMath
http://tex.stackexchange.com/questions/57717/relationship-between-mathml-and-tex
http://www.access2science.com/latex/StaceyLatexNote.html
Latex is an input format (meant to be written by humans)
MathML is an output format (not meant to be written by humans)
Suppose I have the statements_database.xml in MathML. I would need to be more specific -- presentation or
Render MathML online
http://www.compileonline.com/try_mathml_online.php
Latex to presentation MathML translator:
http://www.mathtowebonline.com/
http://www.mathmlcentral.com/Tools/ToMathML.jsp
http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl
http://math.etsu.edu/LaTeXMathML/
https://www.maths.nottingham.ac.uk/personal/drw/lm.html
http://dlmf.nist.gov/LaTeXML/
http://www.csun.edu/~hcmth008/mathml/acc_tutorial.html
http://www.orcca.on.ca/MathML/texmml/textomml.html
MathML to Tex translator:
http://www.orcca.on.ca/MathML/texmml/mmltotex.html
20140829
I have 3 potential tasks:
-graph visualization. Takes a lot of work
-implement CAS checker. Somewhat useless since {Latex, symbol definitions, SymPy} are not actually related
-add content to graph database. However, I want confidence that it is correct (CAS checker) and I want to visualize it.
Based on this analysis, I need a better desing of the database to relate Latex, symbol definitions, and SymPy statements.
I don't want to generate Latex from SymPy
--> MathML?
Latex is pretty, but too flexible to be reliably interpreted by a CAS
20140817
From talking with other projects which share overlap (Formula Database, Symbolab, EquationMap), the back-end databases might be similar. I think it would be worth having a common syntax. However, what motivation would private, commercial projects have for supporting shared syntax?
No one wants to supply me with their backend info, but I don't want to replicate previous work.
Equation map doesn't have a backend database. FD and Symbolab do.
20140617
Asked an astrophysicist what the most important equations are in his field. Ended up talking about how the various fields are differentiated
-astronomy = observing the sky. Depends on atomic physics and optics
-astrophysics = how the stuff in the sky works. Depends on thermal physics + gravity
-cosmology = study of the whole universe
-space physics = travel in space
-planetary science = how does the planet work
-astrobiology = how do living creatures in extreme environments exist?
Astrophysics then depends on classical mechanics and radiative transfer. Find equilibrium for pressure, radiation, gravity.
Famous equation: GR tensor (General Relativity tensor)
Good reference textbook: Icko Iben, Stellar Evolution Physics
20140527
Called and spoke with Jon Seaton of Formula Database
His team has been working on formula-database for 2-3 years. He describes it as a "math search engine" which has a built-in equation editor. The search feature isn't just matching the Latex input. It understands dot product, cross product.
The objective is to allow students to search through literature. If you are a researcher, you might want to find whether the model already exists in literature.
The backend database of equations and symbols was hand-entered. The data is stored as a high-dimensional graph.
Jon says the team plans on launching the product commercially, but everyone is busy.
The status is that the project is "mostly done" as they have the proof of concept working.
They have created a browser-based equation editor, similar to the equation editor in Microsoft Word
The grand view is that formula-database will serve as a universal reference for equations.
Jon says his team has studied the market and students aren't interested in purchasing a subscription. More likely is an advertising-based revenue.
The service is oriented towards homework help, rather than the professional researcher. [Professional researchers already know which equations matter to their work.]
Jon has three Master's degrees -- engineering, math, and physics.
Jon says a common question he gets is "how does your search product compare to wolfram alpha?"
Jon sees Symbolab as their competitor
Jon is familiar with mathdox
Jon brought up Wojciech's project, though he couldn't recall the name EquationMap.
Jon describe's Wojciech's project as graph visualization with hand-entered equations.
Jon says Wojciech's project is more an online tool for concept maps, based entirely on user input.
draw links between equations
product
Reason for not collaborating is Wojciech is in Poland
20140527
Although HTML5 Canvas is fun to move graphs around with, I need an example showing that it can be used to visualize graphs larger than fits on a single page. Can I think of the canvas as a window for viewing a graph larger than the screen? The ability to zoom in/out would be useful.
Graph Dracula
http://www.graphdracula.net/
Upsides:
-simple and intuitive for development.
-it can render graphs with SVG and PNG nodes
Downsides:
-not clear how to render graphs larger than the screen
-no zoom in/out
-I didn't find support for spring force graph layout
20140524
I was contacted by Wojciech on May 15 via email. We talked via phone about our projects.
I emailed 3 of the project developers for Formula-database and Jon Seaton replied. I will call him Tuesday to talk about status and plans.
I updated the content on
https://sites.google.com/site/physicsderivationgraph/
20140216
more cleanup tasks:
-move "lib/images_op_*" to "lib/images_infrule_*"
-move "lib/images_eq_*" to "lib/images_statement_*"
consequences:
-single change in each of "create_pictures_of_*"
-change "build_connections_graph.py"
20140216
Successfully completed run on existing connections with CAS check (sympy). Report:
number_of_rules_not_checkable=58
number_of_checkable_rules_not_checked=93
number_of_tested_true_connections=19
number_of_tested_false_connections=15
number_of_connection_setups_with_error=0
20140215
Problem: sympy doesn't recognize the validity of simple statements:
import sympy
x = sympy.Symbol('x') # from outputs
a = sympy.Symbol('a') # from outputs
b = sympy.Symbol('b') # from outputs
c = sympy.Symbol('c') # from outputs
out_lhs0=(x**2) + ((b/a)*x) + (c/a)
in_lhs0=(a*(x**2)) + (b*x) + c
feed0=a
>>> in_lhs0/feed0
(a*x**2 + b*x + c)/a
>>> out_lhs0
x**2 + b*x/a + c/a
>>> out_lhs0 == in_lhs0/feed0
False
20140215
How do I define success for this project?
When someone else learns something new as a result of using this tool.
The first user will either be a developer (someone accessing the xml database) or, more likely, a user accessing the content through a GUI.
Thus, although the content and framework are necessary, they are not sufficient -- a GUI is needed to make the tool user friendly.
The GUI should be introduced through a walkthrough. A video would be a good tutorial.
20140215
I repeatedly use the following functions, so these should be made Python functions:
convert statement_punid to array of symbol_punid
convert statement_punid to statement_latex
convert statement_punid to cas_sympy_LHS,cas_sympy_RHS
convert feed_tunid to feed_latex
convert feed_tunid to feed_sympy
convert feed_tunid to array of symbol_punid
convert symbol_punid to cas_sympy
20140214
XML tags currently in use:
****************************
inference rules xml:
"inference_rule_name" (string)
symbols xml
"name" (string)
"label" (integer)
statements xml
"statement_index" (integer)
feeds xml
"feed_label" (integer)
connections xml
"op_name" (string)
"op_label" (integer)
"statement_index" (integer)
"statement_label" (integer)
"feed_label" (integer)
comments xml
"applies_to_statement" (integer)
****************************
"inference_rule_name" and "op_name" are supposed to be the same for linking purposes
"statement_index" in statements xml is same as "statement_index" in connections
in connections xml, "op_label" and "statement_label" are temporary integers local to the connection_set.
op_label allows for duplicate use of the same inference rule on the graph.
statement_label allows for duplicate use of a statement_index in a tex document.
To be more clear, I'm eliminating "index" and "label" as descriptors. Instead, I'll use "tunid" and "punid" for temporary/permanent unique numeric identifier.
****************************
inference rules xml:
"inference_rule_name" (string) --> infrule_name
symbols xml
"name" (string) --> symbol_name
"label" (integer) --> symbol_punid
statements xml
"statement_index" (integer) --> statement_punid
feeds xml
"feed_label" (integer) --> feed_tunid
connections xml
"op_name" (string) --> infrule_name
"op_label" (integer) --> infrule_tunid
"statement_index" (integer) --> statement_punid
"statement_label" (integer) --> statement_tunid
"feed_label" (integer) --> feed_tunid
comments xml
"applies_to_statement" (integer)
****************************
20140213
Major tasks in priority order:
-implement CAS [completed 20140216]
-focus on getting a single inference rule to work in all cases [completed 20140215]
-make jargon consistent (remove "op_label" with "inference_rule", label versus index) [completed 20140214]
-command-line prompt
-web GUI
-add content
-better graph rendering
-SVG support
20140213
view existing graph
full graph or single connection_set
generate full graph
which connection_set?
generate connection_set graph
view existing connection_set PDF
which connection_set?
list existing inference rules
edit existing inference rule
create new inference rule
list existing connection_sets
edit existing connection_sets
which connection_set
which connection
which field to edit?
create new connection_set
set name
add new connection
use existing inference rule
which inference rule?
create new inference rule
20140213
fixed bugs:
-png graph now shows feeds
-no more static date in lib_physics_graph
-PDF generation works
extras:
-created bash script to test all Python scripts in bin
-modified tgz generator to detect date and svn automatically
20140213
algorithm for doing a derivation.
1) start by declaring initial equation
-declaration has no input statement
-declaration has no feeds
-declaration has one output statement
[repeat as needed]
2) apply an inference rule
-inference rule has at least one input statements
-inference rule has zero or more "feeds"
-inference rule has at least one output statement
[repeat as needed]
3) declare derivation finished
-declaration has at least one input statement
-declaration has no feeds
-declaration has no output statements
20131222
bugs:
in "def make_picture_from_latex" in "lib_physics_graph.py"
the date should not be statically set. It should be passed to the function as an argument
in "bin/build" the feeds probably aren't being done correctly.
For example, "multbothsidesby" is not getting the correct number of arguments in the .tex file
"op_name" should be "inference_rule_name"
20131222
previously re-factored "feeds" into separate database.
This broke "build_connections" and "create_pictures" scripts
Added a "build deployable tgz" shell script which works
A "test scripts" script would be useful to check that changes don't break functionality.
Currently not sure how to test correctness of scripts
20131124
wrote "generate_new_random_index" for each database
wrote "list_inference_rules" and "list_connection_sets"
created website
https://sites.google.com/site/physicsderivationgraph/
20131117
Removed from bin/build:
No longer requires "dvisvgm"
"dvisvgm" is from http://dvisvgm.sourceforge.net/
Removed from main README: links
SVG, Latex, GraphViz on WordPress:
http://e.metaclarity.org/wordpress-plugins/wprender/
http://e.metaclarity.org/142/rendering-tex-graphs-to-svg-in-wordpress/
Creating animations with graphviz
http://gromgull.net/blog/2011/02/creating-animations-with-graphviz/
20131110
reorganized structure closer to
https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
20131110
I realized I have two diverging objectives, and I was stuck at the fork since taking both seems insurmountable. The two projects are (1) enlarge the database of relations and (2) build a pleasant web interface which reads and can be used to add to the graph database.
My vision and strength is in building the database, not the GUI. How can I best spend my effort on this part?
There are two subtasks:
-developing/choosing a syntax to express the equations. Latex, Mathematica, ML, XML,
-determining what the audience is interested in getting from this work. What would motivate interest in this project by users and developers?
I think non-physicists and beginners are aware of a one or a few mathematical elements of physics. The most common is "E=mc^2". Although practically everyone is aware of it, few know how it's related to anything else. Undergrads in physics are aware of "F=ma" and "distance=rate*time" but there's not clear connection.
Thus, this project can demonstrate value by showing the relation between things people already have familiarity with.
A list of "common" equations in physics, in order of priority:
E=mc^2
F=ma
x=vt
Heisenberg uncertainty
diffusion
simple harmonic oscillator [done for particle in a box]
Maxwell's equations [done]
Schrodinger eq [done]
A second tier, but of interest:
creation/annihilation operators
superconductivity
Lorentz contraction/dialation
Boson/Fermion distributions
If I can show the relation between these in my database, that would cover much of the scope.
What I currently have in connections_database.xml by subdiscipline:
math basics:
quadratic_equation_derivation: for 2nd order polynomial, solve for roots
euler_equation_proof: \exp(i x) = \cos(x)+i \sin(x)
euler_equation_trig_sqrt: (\sin(x))^2 = \frac{1-\cos(2x)}{2}
euler_equation_trig_relations:
integration_by_parts: generic u,v
curl_curl_identity: used in E&M
example_of_Godel_problem: using a,b,c, make a false relation
variance_relation
physics basics:
frequency_relations: k=omega/v, lambda=v/f, T=1/f
quantum:
derivation_of_Schrodinger_Eq: ends up at {\cal H} \psi\left(\vec{r},t)\right) = i \hbar \frac{\partial}{\partial t}\psi(\vec{r},t)
particle_in_a_1D_box: starting from \frac{d^2}{dx^2} \psi(x) = -k^2 \psi(x), solve for \psi
quantum_basics_orthogonality:
quantum_basics_Hermitian_operators_have_realvalued_observables:
E&M:
maxwell_to_electric_field_wave_equation
electric_field_wave_equation_time_dependent_to_time_independent