SMS: The mathematical mechanic