Formula for the NuSMV model checker

First time writing a formula, and I don't know a thing about ruby, but I hope it roughly makes sense…