# How to export and import a list of equations?

The problem is the following: I want to export a list of equations I have set up with Mathematica such that I am able to import it back to Mathematica and continue to work with it, i.e. as if I had just set the equations up and never exported/imported them. The equations are of the following form:

F[0,1,1,2][1,1]^3+F[0,0,0,1][2,3]*F[2,2,2,1]^2==F[3,4,1,1][0,0]*F[0,1,0,1][2,2]*F[1,1,2,3][3,2]


Here, the $F[0,1,1,2][1,1]$ etc. are the variables; this does not refer to any other list or something, it is just a naming scheme. Now I have a list of approximately 60.000 of these equations. I have tried several options of the Export/Import-function in Mathematica, but I always encounter the following problem:

After importing the equations again, Mathematica does not recognize the $F[0,1,1,2][1,1]$ as variables anymore, especially I am not able to let a replace pattern like $/.F[0,1,1,2][1,1]\rightarrow1$ act on the list.

Does anyone of you have a suggestion how to export/import a list of equations like this?

## 1 Answer

eq = F[0, 1, 1, 2][1, 1]^3 + F[0, 0, 0, 1][2, 3]*F[2, 2, 2, 1]^2 ==
F[3, 4, 1, 1][0, 0]*F[0, 1, 0, 1][2, 2]*F[1, 1, 2, 3][3, 2];
Export["a.m", eq];
Import["a.m"]

• Thank you very much! I didn't know there was such an elegant way to do this! – Ramona Wolf Apr 17 '18 at 9:55
• You're welcome. – Henrik Schumacher Apr 17 '18 at 10:06