Mathematics is the study of quantity and structure. Reasoning about how to mutate some state, defined as a set of values, according to some domain-specific logic, constrained by the execution environment and invariants, is most assuredly mathematics.