doc-src/Tutorial/Misc/Chain.thy
author berghofe
Thu, 20 Dec 2001 14:57:15 +0100
changeset 12555 e6d7f040fdc7
parent 5377 efb799c5ed3c
permissions -rw-r--r--
"code" attribute is now managed by basic code generator module.

Chain = List +
consts chain :: "('a => 'a => bool) * 'a list => bool"
recdef chain "measure (%(r,xs). length xs)"
    "chain(r, [])     = True"
    "chain(r, [x])    = True"
    "chain(r, x#y#zs) = (r x y & chain(r, y#zs))"
end