address 0x2 { module Coin { struct Coin has key { f: T, v: u64 } public fun coin_exists(): bool { exists>(@0x2) } public fun coin_info(): u64 acquires Coin { *&borrow_global>(@0x2).v } } module XUS { struct XUS has store {} } module XDX { use 0x2::Coin::Coin; use 0x2::Coin::coin_exists; use 0x2::Coin::coin_info; struct XDX has store {} spec fun spec_is_xdx(): bool { exists>(@0x2) && exists>(@0x2) && global>(@0x2).v == global>(@0x2).v } public fun is_xdx(): bool { coin_exists() && coin_exists() && coin_info() == coin_info() } spec is_xdx { pragma opaque; ensures result == spec_is_xdx(); } } module Check { use 0x2::XUS::XUS; use 0x2::XDX::XDX; use 0x2::XDX::is_xdx; public fun check(): bool { is_xdx() && is_xdx() } } }