Title: Formal structure of electromagnetics