doc-src/Tutorial/Misc/Chain.thy
author ballarin
Wed, 10 Dec 2003 14:29:44 +0100
changeset 14287 f630017ed01c
parent 5377 efb799c5ed3c
permissions -rw-r--r--
Isar: where attribute supports instantiation of type variables.

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