module 0x2::Token { struct Token has store { value: u64 } fun withdraw(token: &mut Token, value: u64): Token { assert!(token.value >= value, 42); token.value = token.value - value; Token { value } } public fun split(token: Token, value: u64): (Token, Token) { let other = withdraw(&mut token, value); (token, other) } spec split { aborts_if token.value < value; ensures old(token.value) == result_1.value + result_2.value; } }