src/HOL/Induct/Perm.thy
author paulson
Mon, 28 Dec 1998 16:48:22 +0100
changeset 6039 01f67f5f8dd0
parent 3120 c58423c20740
child 8354 c02e3c131eca
permissions -rw-r--r--
deleted "escape" and "trim"; Basis Library can do string escapes if necessary

(*  Title:      HOL/ex/Perm.thy
    ID:         $Id$
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    Copyright   1995  University of Cambridge

Permutations: example of an inductive definition
*)

Perm = List +

consts  perm    :: "('a list * 'a list) set"   
syntax "@perm"  :: ['a list, 'a list] => bool ("_ <~~> _"  [50,50] 50)

translations
    "x <~~> y" == "(x,y) : perm"

inductive perm
  intrs
    Nil   "[] <~~> []"
    swap  "y#x#l <~~> x#y#l"
    Cons  "xs <~~> ys ==> z#xs <~~> z#ys"
    trans "[| xs <~~> ys;  ys <~~> zs |] ==> xs <~~> zs"

end