-
Notifications
You must be signed in to change notification settings - Fork 3
The infamous apple program
In addition to the REPL construct program, there is bin/apple that allows you to solve a set of equations concurrently for coefficients.
The syntax is a superset of the construct syntax. Equations are specified as usual and all the commands available in the interactive REPL can be used but there is also a method to uniquely specify a coefficient. The syntax of a coefficient is
#<name:l:ld:r:rd:{indices}>
where l, r, ld and rd are the number of indices in the first/second block and indices of the derivative blocks, respectively. indices determines the indices that are assigned to the coefficient in this equation and name is a unique identifier to separate two coefficients that have the same rank and symmetries but are distinct objects.
When the program finds such a definition in the equations script it, it checks within a global coefficients registry and adds it if it is a new coefficient.
bin/apple requires one parameter, which is the path to the script file that contains all the equations it has to solve.
In a script file one uses one equation per line with the equation syntax described above.
bin/apple <equations script>
Assume we have the two following equations (LaTeX notation)
0 = \lambda_{a(bc)de} + \mu_{ab(cd)e}
0 = \mu_{a(bc)de}and \lambda is a coefficient with symmetries (ab)(cd)e and a block symmetry (cd)e(ab) and \mu has (ab)c(de) and block symmetry (de)(ab)c
we would specify the following equations script
Add(Symmetrize(#<lambda:2:0:2:1:{a b c d e}>, {b c}), Symmetrize(#<mu:2:1:2:0:{a b c d e}>, {c d}))
Symmetrize(#<mu:2:1:2:0:{a b c d e}>, {b c})