The Alfvén-Carlquist double-layer theory of solar flares