doc-src/Tutorial/Misc/Chain.thy
author wenzelm
Tue, 04 Dec 2001 02:00:14 +0100
changeset 12352 92c48cc45e78
parent 5377 efb799c5ed3c
permissions -rw-r--r--
renamed RuleContext to ContextRules;

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