As far as the basics of Lightning Network is concerned, it builds an additional layer on top of the Bitcoin network that enables instant off-chain transfer of the ownership of the Bitcoin. Lightning Network utilizes bi-directional payments channels that consist of multi-signature address. Meaning Bitcoin will be held in a multi-signature address where transaction will use a multi-sign address as their input and point at two different address as their output. The transaction inside the lighting network are not broadcasted to the bitcoin network as long the channel is open (in order to reduce the load on the blockchain). To open a channel you have to lock funds in a multi-sign address. This is with an on-chain transaction. So those funds can't be used to pay Cindy on-chain. They can't be used to pay Cindy on LN either without both Alice and Bob's approval since it's a multisig address that requires both Alice's and Bob's signature. This is how Alice is prevented from double spending.