src/HOL/UNITY/Update.thy
changeset 4776 1f9362e769c1
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/HOL/UNITY/Update.thy	Fri Apr 03 12:34:33 1998 +0200
     1.3 @@ -0,0 +1,22 @@
     1.4 +(*  Title:      HOL/UNITY/Update.thy
     1.5 +    ID:         $Id$
     1.6 +    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
     1.7 +    Copyright   1998  University of Cambridge
     1.8 +
     1.9 +Function updates: like the standard theory Map, but for ordinary functions
    1.10 +*)
    1.11 +
    1.12 +Update = Fun +
    1.13 +
    1.14 +consts
    1.15 +  update  :: "('a => 'b) => 'a => 'b => ('a => 'b)"
    1.16 +           ("_/[_/|->/_]" [900,0,0] 900)
    1.17 +
    1.18 +syntax (symbols)
    1.19 +  update    :: "('a => 'b) => 'a => 'b => ('a => 'b)"
    1.20 +               ("_/[_/\\<mapsto>/_]" [900,0,0] 900)
    1.21 +
    1.22 +defs
    1.23 +  update_def "f[a|->b] == %x. if x=a then b else f x"
    1.24 +
    1.25 +end