Theoretical Mechanics of Biological Neural Networks