doc-src/Tutorial/Misc/Chain.thy
author paulson
Mon, 08 May 2000 16:59:02 +0200
changeset 8835 56187238220d
parent 5377 efb799c5ed3c
permissions -rw-r--r--
tidied
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5377
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     1
Chain = List +
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     2
consts chain :: "('a => 'a => bool) * 'a list => bool"
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     3
recdef chain "measure (%(r,xs). length xs)"
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     4
    "chain(r, [])     = True"
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     5
    "chain(r, [x])    = True"
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     6
    "chain(r, x#y#zs) = (r x y & chain(r, y#zs))"
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     7
end