src/HOL/Fun.thy
changeset 15691 900cf45ff0a6
parent 15531 08c8dad8e399
child 16733 236dfafbeb63
     1.1 --- a/src/HOL/Fun.thy	Sun Apr 10 11:42:07 2005 +0200
     1.2 +++ b/src/HOL/Fun.thy	Sun Apr 10 17:19:03 2005 +0200
     1.3 @@ -39,9 +39,8 @@
     1.4  *)
     1.5  
     1.6  constdefs
     1.7 - overwrite :: "('a => 'b) => ('a => 'b) => 'a set => ('a => 'b)"
     1.8 -              ("_/'(_|/_')"  [900,0,0]900)
     1.9 -"f(g|A) == %a. if a : A then g a else f a"
    1.10 + override_on :: "('a => 'b) => ('a => 'b) => 'a set => ('a => 'b)"
    1.11 +"override_on f g A == %a. if a : A then g a else f a"
    1.12  
    1.13   id :: "'a => 'a"
    1.14  "id == %x. x"
    1.15 @@ -392,16 +391,16 @@
    1.16       "f(x:=y) ` A = (if x \<in> A then insert y (f ` (A-{x})) else f ` A)"
    1.17  by auto
    1.18  
    1.19 -subsection{* overwrite *}
    1.20 +subsection{* @{text override_on} *}
    1.21  
    1.22 -lemma overwrite_emptyset[simp]: "f(g|{}) = f"
    1.23 -by(simp add:overwrite_def)
    1.24 +lemma override_on_emptyset[simp]: "override_on f g {} = f"
    1.25 +by(simp add:override_on_def)
    1.26  
    1.27 -lemma overwrite_apply_notin[simp]: "a ~: A ==> (f(g|A)) a = f a"
    1.28 -by(simp add:overwrite_def)
    1.29 +lemma override_on_apply_notin[simp]: "a ~: A ==> (override_on f g A) a = f a"
    1.30 +by(simp add:override_on_def)
    1.31  
    1.32 -lemma overwrite_apply_in[simp]: "a : A ==> (f(g|A)) a = g a"
    1.33 -by(simp add:overwrite_def)
    1.34 +lemma override_on_apply_in[simp]: "a : A ==> (override_on f g A) a = g a"
    1.35 +by(simp add:override_on_def)
    1.36  
    1.37  subsection{* swap *}
    1.38  
    1.39 @@ -410,7 +409,7 @@
    1.40     "swap a b f == f(a := f b, b:= f a)"
    1.41  
    1.42  lemma swap_self: "swap a a f = f"
    1.43 -by (simp add: swap_def) 
    1.44 +by (simp add: swap_def)
    1.45  
    1.46  lemma swap_commute: "swap a b f = swap b a f"
    1.47  by (rule ext, simp add: fun_upd_def swap_def)