EFDMBSBUJPOTPGQSPQFSUJFT w 6OMJLFBNCJHVPVT OBUVSBMMBOHVBHF sig Element {} sig Stack { elements: seq Element } pred PushAddsElement[s, s': Stack, e: Element] { #s'.elements = add[#s.elements, 1] } pred PopRemovesElement[s, s': Stack] { #s.elements > 0 implies #s'.elements = sub[#s.elements, 1] } assert StackProperties { all s, s': Stack, e: Element | PushAddsElement[s, s', e] and (not IsEmpty[s] implies PopRemovesElement[s, s']) }