Download
language Essence 1.3
$ prob025.essence: Lam's Problem
$ Problem details available at http://www.csplib.org/Problems/prob025/

given indexSize: int

letting Index be new type of size indexSize

find m: matrix indexed by [Index,Index] of bool

such that
    forAll r : Index
        . (sum c : Index . toInt(!m[r,c])) = 11,
    forAll c : Index
        . (sum r : Index . toInt(!m[r,c])) = 11,
    forAll r1,r2 : Index
        , r1 != r2
        . (sum c : Index . toInt(!(m[r1,c] \/ m[r2,c]))) = 1