It works very similar to Bitcoin. A Bitcoin address is essentially a public key and only its owner can spend coins on that address.
With ecash:
- the receiver shares a public key P with the sender
- sender locks ecash to P and sends locked ecash to receiver
- receiver looks at the ecash and sees "the ecash is signed by the mint and it's locked to P" -> it can only be spent by the owner of P (which is the receiver)
"locking" is like creating smart contract and attaching it to the token (it can't be detached). Not sure I understand your question but you don't need a proof, you just look at the contract to see the spending condition: pay to pubkey locked to P
Even if the sender would send it to anyone else, nobody can spend it except for the receiver. That's how publicly-verifiable nutzaps (NIP-61) work: I can post a token that's locked to your npub, everyone can see it, only you can spend it.
Does that answer your questions?
Here is the spec: https://github.com/cashubtc/nuts/blob/main/11.md