Created
January 13, 2026 13:49
-
-
Save thelissimus/1f668717e403d7e2ee2016ae4e95e8de to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| enum Person { Alice, Bob, Rafa } | |
| enum Language { English, Ithkuil } | |
| one sig Room { | |
| people : set Person | |
| } | |
| fun speaks : Person -> Language { | |
| Alice -> English + | |
| Alice -> Ithkuil + | |
| Bob -> English | |
| } | |
| pred canSpeak[p : Person, l : Language] { | |
| l in speaks[p] | |
| } | |
| assert everybodySpeaksEnglish { | |
| all p : Room.people | canSpeak[p, English] | |
| } | |
| assert notEverybodySpeaksEnglish { | |
| some p : Room.people | not canSpeak[p, English] | |
| } | |
| fact { Room.people = Alice + Bob + Rafa } | |
| check everybodySpeaksEnglish | |
| -- Counterexample found. Assertion is invalid. | |
| check notEverybodySpeaksEnglish | |
| -- No counterexample found. Assertion may be valid. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment