src/HOL/UNITY/Simple/Mutex.thy
changeset 11701 3d51fbf81c17
parent 11195 65ede8dfe304
child 11704 3c50a2cd6f00
--- a/src/HOL/UNITY/Simple/Mutex.thy	Fri Oct 05 21:50:37 2001 +0200
+++ b/src/HOL/UNITY/Simple/Mutex.thy	Fri Oct 05 21:52:39 2001 +0200
@@ -22,39 +22,39 @@
   (** The program for process U **)
   
   U0 :: command
-    "U0 == {(s,s'). s' = s (|u:=True, m:=#1|) & m s = #0}"
+    "U0 == {(s,s'). s' = s (|u:=True, m:=Numeral1|) & m s = Numeral0}"
 
   U1 :: command
-    "U1 == {(s,s'). s' = s (|p:= v s, m:=#2|) & m s = #1}"
+    "U1 == {(s,s'). s' = s (|p:= v s, m:=# 2|) & m s = Numeral1}"
 
   U2 :: command
-    "U2 == {(s,s'). s' = s (|m:=#3|) & ~ p s & m s = #2}"
+    "U2 == {(s,s'). s' = s (|m:=# 3|) & ~ p s & m s = # 2}"
 
   U3 :: command
-    "U3 == {(s,s'). s' = s (|u:=False, m:=#4|) & m s = #3}"
+    "U3 == {(s,s'). s' = s (|u:=False, m:=# 4|) & m s = # 3}"
 
   U4 :: command
-    "U4 == {(s,s'). s' = s (|p:=True, m:=#0|) & m s = #4}"
+    "U4 == {(s,s'). s' = s (|p:=True, m:=Numeral0|) & m s = # 4}"
 
   (** The program for process V **)
   
   V0 :: command
-    "V0 == {(s,s'). s' = s (|v:=True, n:=#1|) & n s = #0}"
+    "V0 == {(s,s'). s' = s (|v:=True, n:=Numeral1|) & n s = Numeral0}"
 
   V1 :: command
-    "V1 == {(s,s'). s' = s (|p:= ~ u s, n:=#2|) & n s = #1}"
+    "V1 == {(s,s'). s' = s (|p:= ~ u s, n:=# 2|) & n s = Numeral1}"
 
   V2 :: command
-    "V2 == {(s,s'). s' = s (|n:=#3|) & p s & n s = #2}"
+    "V2 == {(s,s'). s' = s (|n:=# 3|) & p s & n s = # 2}"
 
   V3 :: command
-    "V3 == {(s,s'). s' = s (|v:=False, n:=#4|) & n s = #3}"
+    "V3 == {(s,s'). s' = s (|v:=False, n:=# 4|) & n s = # 3}"
 
   V4 :: command
-    "V4 == {(s,s'). s' = s (|p:=False, n:=#0|) & n s = #4}"
+    "V4 == {(s,s'). s' = s (|p:=False, n:=Numeral0|) & n s = # 4}"
 
   Mutex :: state program
-    "Mutex == mk_program ({s. ~ u s & ~ v s & m s = #0 & n s = #0},
+    "Mutex == mk_program ({s. ~ u s & ~ v s & m s = Numeral0 & n s = Numeral0},
 		 	  {U0, U1, U2, U3, U4, V0, V1, V2, V3, V4},
 			  UNIV)"
 
@@ -62,15 +62,15 @@
   (** The correct invariants **)
 
   IU :: state set
-    "IU == {s. (u s = (#1 <= m s & m s <= #3)) & (m s = #3 --> ~ p s)}"
+    "IU == {s. (u s = (Numeral1 <= m s & m s <= # 3)) & (m s = # 3 --> ~ p s)}"
 
   IV :: state set
-    "IV == {s. (v s = (#1 <= n s & n s <= #3)) & (n s = #3 --> p s)}"
+    "IV == {s. (v s = (Numeral1 <= n s & n s <= # 3)) & (n s = # 3 --> p s)}"
 
   (** The faulty invariant (for U alone) **)
 
   bad_IU :: state set
-    "bad_IU == {s. (u s = (#1 <= m s & m s <= #3)) &
-	           (#3 <= m s & m s <= #4 --> ~ p s)}"
+    "bad_IU == {s. (u s = (Numeral1 <= m s & m s <= # 3)) &
+	           (# 3 <= m s & m s <= # 4 --> ~ p s)}"
 
 end