src/ZF/Coind/Map.thy
author wenzelm
Fri, 24 Feb 2023 11:07:31 +0100
changeset 77363 cbd053fff24c
parent 76217 8655344f1cf6
permissions -rw-r--r--
unused (see also 7b318273a4aa and a1fb4d28e609);
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1478
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
     1
(*  Title:      ZF/Coind/Map.thy
2b8c2a7547ab expanded tabs
clasohm
parents: 1401
diff changeset
     2
    Author:     Jacob Frost, Cambridge University Computer Laboratory
915
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
     3
    Copyright   1995  University of Cambridge
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
     4
35762
af3ff2ba4c54 removed old CVS Ids;
wenzelm
parents: 24893
diff changeset
     5
Some sample proofs of inclusions for the final coalgebra "U" (by lcp).
915
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
     6
*)
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
     7
65449
c82e63b11b8b clarified main ZF.thy / ZFC.thy, and avoid name clash with global HOL/Main.thy;
wenzelm
parents: 61980
diff changeset
     8
theory Map imports ZF begin
915
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
     9
24893
b8ef7afe3a6b modernized specifications;
wenzelm
parents: 16417
diff changeset
    10
definition
76215
a642599ffdea More syntactic cleanup. LaTeX markup working
paulson <lp15@cam.ac.uk>
parents: 76213
diff changeset
    11
  TMap :: "[i,i] \<Rightarrow> i"  where
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
    12
   "TMap(A,B) \<equiv> {m \<in> Pow(A*\<Union>(B)).\<forall>a \<in> A. m``{a} \<in> B}"
11318
6536fb8c9fc6 X-symbols for ZF
paulson
parents: 6068
diff changeset
    13
24893
b8ef7afe3a6b modernized specifications;
wenzelm
parents: 16417
diff changeset
    14
definition
76215
a642599ffdea More syntactic cleanup. LaTeX markup working
paulson <lp15@cam.ac.uk>
parents: 76213
diff changeset
    15
  PMap :: "[i,i] \<Rightarrow> i"  where
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
    16
   "PMap(A,B) \<equiv> TMap(A,cons(0,B))"
915
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    17
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
    18
(* Note: 0 \<in> B \<Longrightarrow> TMap(A,B) = PMap(A,B) *)
915
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    19
  
24893
b8ef7afe3a6b modernized specifications;
wenzelm
parents: 16417
diff changeset
    20
definition
b8ef7afe3a6b modernized specifications;
wenzelm
parents: 16417
diff changeset
    21
  map_emp :: i  where
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
    22
   "map_emp \<equiv> 0"
11318
6536fb8c9fc6 X-symbols for ZF
paulson
parents: 6068
diff changeset
    23
24893
b8ef7afe3a6b modernized specifications;
wenzelm
parents: 16417
diff changeset
    24
definition
76215
a642599ffdea More syntactic cleanup. LaTeX markup working
paulson <lp15@cam.ac.uk>
parents: 76213
diff changeset
    25
  map_owr :: "[i,i,i]\<Rightarrow>i"  where
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
    26
   "map_owr(m,a,b) \<equiv> \<Sum>x \<in> {a} \<union> domain(m). if x=a then b else m``{x}"
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    27
24893
b8ef7afe3a6b modernized specifications;
wenzelm
parents: 16417
diff changeset
    28
definition
76215
a642599ffdea More syntactic cleanup. LaTeX markup working
paulson <lp15@cam.ac.uk>
parents: 76213
diff changeset
    29
  map_app :: "[i,i]\<Rightarrow>i"  where
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
    30
   "map_app(m,a) \<equiv> m``{a}"
915
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    31
  
46822
95f1e700b712 mathematical symbols for Isabelle/ZF example theories
paulson
parents: 35762
diff changeset
    32
lemma "{0,1} \<subseteq> {1} \<union> TMap(I, {0,1})"
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    33
by (unfold TMap_def, blast)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    34
46822
95f1e700b712 mathematical symbols for Isabelle/ZF example theories
paulson
parents: 35762
diff changeset
    35
lemma "{0} \<union> TMap(I,1) \<subseteq> {1} \<union> TMap(I, {0} \<union> TMap(I,1))"
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    36
by (unfold TMap_def, blast)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    37
46822
95f1e700b712 mathematical symbols for Isabelle/ZF example theories
paulson
parents: 35762
diff changeset
    38
lemma "{0,1} \<union> TMap(I,2) \<subseteq> {1} \<union> TMap(I, {0,1} \<union> TMap(I,2))"
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    39
by (unfold TMap_def, blast)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    40
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    41
(*A bit too slow.
46822
95f1e700b712 mathematical symbols for Isabelle/ZF example theories
paulson
parents: 35762
diff changeset
    42
lemma "{0,1} \<union> TMap(I,TMap(I,2)) \<union> TMap(I,2) \<subseteq>  
95f1e700b712 mathematical symbols for Isabelle/ZF example theories
paulson
parents: 35762
diff changeset
    43
       {1} \<union> TMap(I, {0,1} \<union> TMap(I,TMap(I,2)) \<union> TMap(I,2))"
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    44
by (unfold TMap_def, blast)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    45
*)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    46
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    47
(* ############################################################ *)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    48
(* Lemmas                                                       *)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    49
(* ############################################################ *)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    50
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    51
lemma qbeta_if: "Sigma(A,B)``{a} = (if a \<in> A then B(a) else 0)"
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    52
by auto
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    53
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
    54
lemma qbeta: "a \<in> A \<Longrightarrow> Sigma(A,B)``{a} = B(a)"
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    55
by fast
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    56
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
    57
lemma qbeta_emp: "a\<notin>A \<Longrightarrow> Sigma(A,B)``{a} = 0"
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    58
by fast
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    59
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
    60
lemma image_Sigma1: "a \<notin> A \<Longrightarrow> Sigma(A,B)``{a}=0"
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    61
by fast
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    62
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    63
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    64
(* ############################################################ *)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    65
(* Inclusion in Quine Universes                                 *)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    66
(* ############################################################ *)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    67
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    68
(* Lemmas *)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    69
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    70
lemma MapQU_lemma: 
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
    71
    "A \<subseteq> univ(X) \<Longrightarrow> Pow(A * \<Union>(quniv(X))) \<subseteq> quniv(X)"
76216
9fc34f76b4e8 getting rid of apply (unfold ...)
paulson <lp15@cam.ac.uk>
parents: 76215
diff changeset
    72
  unfolding quniv_def
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    73
apply (rule Pow_mono)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    74
apply (rule subset_trans [OF Sigma_mono product_univ])
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    75
apply (erule subset_trans)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    76
apply (rule arg_subset_eclose [THEN univ_mono])
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    77
apply (simp add: Union_Pow_eq)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    78
done
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    79
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    80
(* Theorems *)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    81
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    82
lemma mapQU:
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
    83
  "\<lbrakk>m \<in> PMap(A,quniv(B)); \<And>x. x \<in> A \<Longrightarrow> x \<in> univ(B)\<rbrakk> \<Longrightarrow> m \<in> quniv(B)"
76217
8655344f1cf6 More obsolete "unfold" calls
paulson <lp15@cam.ac.uk>
parents: 76216
diff changeset
    84
  unfolding PMap_def TMap_def
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    85
apply (blast intro!: MapQU_lemma [THEN subsetD]) 
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    86
done
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    87
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    88
(* ############################################################ *)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    89
(* Monotonicity                                                 *)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    90
(* ############################################################ *)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    91
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
    92
lemma PMap_mono: "B \<subseteq> C \<Longrightarrow> PMap(A,B)<=PMap(A,C)"
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    93
by (unfold PMap_def TMap_def, blast)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    94
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    95
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    96
(* ############################################################ *)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    97
(* Introduction Rules                                           *)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    98
(* ############################################################ *)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
    99
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   100
(** map_emp **)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   101
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   102
lemma pmap_empI: "map_emp \<in> PMap(A,B)"
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   103
by (unfold map_emp_def PMap_def TMap_def, auto)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   104
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   105
(** map_owr **)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   106
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   107
lemma pmap_owrI: 
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
   108
  "\<lbrakk>m \<in> PMap(A,B); a \<in> A; b \<in> B\<rbrakk>  \<Longrightarrow> map_owr(m,a,b):PMap(A,B)"
13339
0f89104dd377 Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents: 12595
diff changeset
   109
apply (unfold map_owr_def PMap_def TMap_def, safe)
0f89104dd377 Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents: 12595
diff changeset
   110
apply (simp_all add: if_iff, auto)
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   111
(*Remaining subgoal*)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   112
apply (rule excluded_middle [THEN disjE])
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   113
apply (erule image_Sigma1)
59788
6f7b6adac439 prefer local fixes;
wenzelm
parents: 46822
diff changeset
   114
apply (drule_tac psi = "uu \<notin> B" for uu in asm_rl)
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   115
apply (auto simp add: qbeta)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   116
done
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   117
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   118
(** map_app **)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   119
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   120
lemma tmap_app_notempty: 
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
   121
  "\<lbrakk>m \<in> TMap(A,B); a \<in> domain(m)\<rbrakk> \<Longrightarrow> map_app(m,a) \<noteq>0"
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   122
by (unfold TMap_def map_app_def, blast)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   123
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   124
lemma tmap_appI: 
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
   125
  "\<lbrakk>m \<in> TMap(A,B); a \<in> domain(m)\<rbrakk> \<Longrightarrow> map_app(m,a):B"
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   126
by (unfold TMap_def map_app_def domain_def, blast)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   127
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   128
lemma pmap_appI: 
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
   129
  "\<lbrakk>m \<in> PMap(A,B); a \<in> domain(m)\<rbrakk> \<Longrightarrow> map_app(m,a):B"
76216
9fc34f76b4e8 getting rid of apply (unfold ...)
paulson <lp15@cam.ac.uk>
parents: 76215
diff changeset
   130
  unfolding PMap_def
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   131
apply (frule tmap_app_notempty, assumption)
13339
0f89104dd377 Fixed quantified variable name preservation for ball and bex (bounded quants)
paulson
parents: 12595
diff changeset
   132
apply (drule tmap_appI, auto)
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   133
done
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   134
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   135
(** domain **)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   136
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   137
lemma tmap_domainD: 
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
   138
  "\<lbrakk>m \<in> TMap(A,B); a \<in> domain(m)\<rbrakk> \<Longrightarrow> a \<in> A"
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   139
by (unfold TMap_def, blast)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   140
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   141
lemma pmap_domainD: 
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
   142
  "\<lbrakk>m \<in> PMap(A,B); a \<in> domain(m)\<rbrakk> \<Longrightarrow> a \<in> A"
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   143
by (unfold PMap_def TMap_def, blast)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   144
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   145
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   146
(* ############################################################ *)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   147
(* Equalities                                                   *)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   148
(* ############################################################ *)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   149
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   150
(** Domain **)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   151
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   152
(* Lemmas *)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   153
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   154
lemma domain_UN: "domain(\<Union>x \<in> A. B(x)) = (\<Union>x \<in> A. domain(B(x)))"
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   155
by fast
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   156
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   157
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   158
lemma domain_Sigma: "domain(Sigma(A,B)) = {x \<in> A. \<exists>y. y \<in> B(x)}"
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   159
by blast
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   160
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   161
(* Theorems *)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   162
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   163
lemma map_domain_emp: "domain(map_emp) = 0"
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   164
by (unfold map_emp_def, blast)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   165
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   166
lemma map_domain_owr: 
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
   167
  "b \<noteq> 0 \<Longrightarrow> domain(map_owr(f,a,b)) = {a} \<union> domain(f)"
76216
9fc34f76b4e8 getting rid of apply (unfold ...)
paulson <lp15@cam.ac.uk>
parents: 76215
diff changeset
   168
  unfolding map_owr_def
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   169
apply (auto simp add: domain_Sigma)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   170
done
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   171
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   172
(** Application **)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   173
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   174
lemma map_app_owr: 
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   175
  "map_app(map_owr(f,a,b),c) = (if c=a then b else map_app(f,c))"
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   176
by (simp add: qbeta_if  map_app_def map_owr_def, blast)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   177
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   178
lemma map_app_owr1: "map_app(map_owr(f,a,b),a) = b"
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   179
by (simp add: map_app_owr)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   180
76213
e44d86131648 Removal of obsolete ASCII syntax
paulson <lp15@cam.ac.uk>
parents: 65449
diff changeset
   181
lemma map_app_owr2: "c \<noteq> a \<Longrightarrow> map_app(map_owr(f,a,b),c)= map_app(f,c)"
12595
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   182
by (simp add: map_app_owr)
0480d02221b8 conversion to Isar
paulson
parents: 11354
diff changeset
   183
915
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
   184
end