src/ZF/Update.thy
author oheimb
Wed, 03 Apr 2002 10:21:13 +0200
changeset 13076 70704dd48bd5
parent 5157 6e03de8ec2b4
child 13177 ba734cc2887d
permissions -rw-r--r--
bugfix concerning claset(), added limited support for ALLGOALS + fast_tac etc.

(*  Title:      ZF/Update.thy
    ID:         $Id$
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    Copyright   1998  University of Cambridge

Function updates: like theory Map, but for ordinary functions
*)

Update = func +

consts
  update  :: "[i,i,i] => i"

nonterminals
  updbinds  updbind

syntax

  (* Let expressions *)

  "_updbind"       :: [i, i] => updbind             ("(2_ :=/ _)")
  ""               :: updbind => updbinds             ("_")
  "_updbinds"      :: [updbind, updbinds] => updbinds ("_,/ _")
  "_Update"        :: [i, updbinds] => i            ("_/'((_)')" [900,0] 900)

translations
  "_Update (f, _updbinds(b,bs))"  == "_Update (_Update(f,b), bs)"
  "f(x:=y)"                     == "update(f,x,y)"

defs
  update_def "f(a:=b) == lam x: cons(a, domain(f)). if(x=a, b, f`x)"

end