
diff -r 69d815b0e1eb -r 21291189b51e List.thy
--- a/List.thy	Thu Feb 24 14:45:57 1994 +0100
+++ b/List.thy	Wed Mar 02 12:26:55 1994 +0100
@@ -28,7 +28,7 @@
   NIL           :: "'a node set"
   CONS          :: "['a node set, 'a node set] => 'a node set"
   Nil           :: "'a list"
-  Cons          :: "['a, 'a list] => 'a list"
+  "#"           :: "['a, 'a list] => 'a list"                   (infixr 65)
   List_case     :: "['a node set, 'b, ['a node set, 'a node set]=>'b] => 'b"
   List_rec      :: "['a node set, 'b, ['a node set, 'a node set, 'b]=>'b] => 'b"
   list_rec      :: "['a list, 'b, ['a, 'a list, 'b]=>'b] => 'b"
@@ -40,7 +40,7 @@
   mem		:: "['a, 'a list] => bool"			(infixl 55)
   list_all      :: "('a => bool) => ('a list => bool)"
   map           :: "('a=>'b) => ('a list => 'b list)"
-  "@"		:: "['a list, 'a list] => 'a list"		(infixr 65)
+  "@"		:: "['a list, 'a list] => 'a list"		(infixl 65)
   list_case     :: "['a list, 'b, ['a, 'a list]=>'b] => 'b"
   filter	:: "['a => bool, 'a list] => 'a list"
 
@@ -54,11 +54,11 @@
   "@filter"	:: "[idt, 'a list, bool] => 'a list"	("(1[_:_ ./ _])")
 
 translations
-  "[x, xs]"     == "Cons(x, [xs])"
-  "[x]"         == "Cons(x, [])"
+  "[x, xs]"     == "x#[xs]"
+  "[x]"         == "x#[]"
   "[]"          == "Nil"
 
-  "case xs of Nil => a | Cons(y,ys) => b" == "list_case(xs,a,%y ys.b)"
+  "case xs of Nil => a | y#ys => b" == "list_case(xs,a,%y ys.b)"
 
   "[x:xs . P]"	== "filter(%x.P,xs)"
   "Alls x:xs.P"	== "list_all(%x.P,xs)"
@@ -77,12 +77,12 @@
   (* Defining the Concrete Constructors *)
 
   NIL_def       "NIL == In0(Numb(0))"
-  CONS_def      "CONS(M, N) == In1(M . N)"
+  CONS_def      "CONS(M, N) == In1(M $ N)"
 
   (* Defining the Abstract Constructors *)
 
   Nil_def       "Nil == Abs_List(NIL)"
-  Cons_def      "Cons(x, xs) == Abs_List(CONS(Leaf(x), Rep_List(xs)))"
+  Cons_def      "x#xs == Abs_List(CONS(Leaf(x), Rep_List(xs)))"
 
   List_case_def "List_case(M, c, d) == Case(M, %x.c, %u. Split(u, %x y.d(x, y)))"
 
@@ -101,7 +101,7 @@
   Rep_map_def
    "Rep_map(f, xs) == list_rec(xs, NIL, %x l r. CONS(f(x), r))"
   Abs_map_def
-   "Abs_map(g, M) == List_rec(M, Nil, %N L r. Cons(g(N), r))"
+   "Abs_map(g, M) == List_rec(M, Nil, %N L r. g(N)#r)"
 
   null_def      "null(xs)            == list_rec(xs, True, %x xs r.False)"
   hd_def        "hd(xs)              == list_rec(xs, @x.True, %x xs r.x)"
@@ -111,10 +111,10 @@
   mem_def	"x mem xs            == \
 \		   list_rec(xs, False, %y ys r. if(y=x, True, r))"
   list_all_def  "list_all(P, xs)     == list_rec(xs, True, %x l r. P(x) & r)"
-  map_def       "map(f, xs)          == list_rec(xs, [], %x l r. Cons(f(x),r))"
-  append_def	"xs@ys               == list_rec(xs, ys, %x l r. Cons(x,r))"
+  map_def       "map(f, xs)          == list_rec(xs, [], %x l r. f(x)#r)"
+  append_def	"xs@ys               == list_rec(xs, ys, %x l r. x#r)"
   filter_def	"filter(P,xs)        == \
-\                  list_rec(xs, [], %x xs r. if(P(x), Cons(x,r), r))"
+\                  list_rec(xs, [], %x xs r. if(P(x), x#r, r))"
   list_case_def "list_case(xs, a, f) == list_rec(xs, a, %x xs r.f(x, xs))"
 
 end




