What Is the Relationship between an ‘Invariant’ and a ‘Safety Property’?
An invariant is a type of safety property. A safety property is a condition that states "nothing bad ever happens," meaning the contract never enters an undesirable state.
An invariant is a specific condition that must always hold true throughout the contract's execution, such as "a user's balance is always non-negative." Therefore, proving an invariant holds is a way of proving a critical safety property. The two terms are closely related, with safety property being the broader category of security guarantees.