Migration
I'll be moving this blog to http://blog.hashcollision.org.
(modulo life human-brain) --> (and confusion inquiry)
Labels: git
abstract sig Boolean {}
one sig True, False extends Boolean {}
abstract sig Anouki {
truthful: Boolean
}
one sig Fofo, Kumu, Dobo, Gumo, Aroo, Mazo extends Anouki {}
pred whoTellsTruth {
Fofo.truthful = True implies Gumo.truthful=True
Kumu.truthful = True implies ((Mazo.truthful=False) or
(Aroo.truthful=False))
Dobo.truthful = True implies Mazo.truthful=True
Gumo.truthful = True implies ((Fofo.truthful=False) or
(Aroo.truthful=False))
Aroo.truthful = True implies (Kumu.truthful=False)
Mazo.truthful = True implies (Mazo.truthful=True and
Dobo.truthful=True)
}
pred onlyOneIsLying {
one a: Anouki | a.truthful=False
}
run {
whoTellsTruth
onlyOneIsLying
}
/* Anouki can be friendly or antagonistic to other Anouki */
sig Anouki {
supports: set Anouki,
denies: set Anouki
} {
/* and it's nonsensical to be both supportive and antagonistic of
the same Anouki. */
no (supports & denies)
}
/* A village consists of folks who tell the truth, and symmetrically,
those who lie. And we will categorically make every Anouki a
truthteller or a liar. */
one sig Village {
truthtellers: set Anouki,
liars: set Anouki
} {
no truthtellers & liars
Anouki = truthtellers + liars
}
fact truthiness {
all a : Village.truthtellers {
all a' : a.supports | a' in Village.truthtellers
all a': a.denies | a' not in Village.truthtellers
}
}
/* Here's what everyone says about each other */
pred hearsay {
some disj fofo, kumu, dobo, gumo, aroo, mazo : Anouki {
fofo.supports = gumo
fofo.denies = none
kumu.supports = none
kumu.denies = mazo or kumu.denies = aroo
dobo.supports = mazo
dobo.denies = none
gumo.supports = none
gumo.denies = fofo or gumo.denies = aroo
aroo.supports = none
aroo.denies = kumu
mazo.supports = mazo + dobo
mazo.denies = none
fofo + kumu +dobo + gumo + aroo + mazo = Anouki
}
}
pred oneLiar {
hearsay and #Village.liars = 1
}
pred twoLiars {
hearsay and #Village.liars = 2
}
run oneLiar for 6
run twoLiars for 6