src/HOL/List.thy
changeset 81125 ec121999a9cb
parent 81116 0fb1e2dd4122
child 81133 072cc2a92ba3
equal deleted inserted replaced
81124:6ce0c8d59f5a 81125:ec121999a9cb
   134   (case i of 0 \<Rightarrow> v # xs | Suc j \<Rightarrow> x # list_update xs j v)"
   134   (case i of 0 \<Rightarrow> v # xs | Suc j \<Rightarrow> x # list_update xs j v)"
   135 
   135 
   136 nonterminal lupdbinds and lupdbind
   136 nonterminal lupdbinds and lupdbind
   137 
   137 
   138 syntax
   138 syntax
   139   "_lupdbind":: "['a, 'a] => lupdbind"    (\<open>(\<open>indent=2 notation=\<open>mixfix list update\<close>\<close>_ :=/ _)\<close>)
   139   "_lupdbind":: "['a, 'a] => lupdbind"    (\<open>(\<open>indent=2 notation=\<open>mixfix update\<close>\<close>_ :=/ _)\<close>)
   140   "" :: "lupdbind => lupdbinds"    (\<open>_\<close>)
   140   "" :: "lupdbind => lupdbinds"    (\<open>_\<close>)
   141   "_lupdbinds" :: "[lupdbind, lupdbinds] => lupdbinds"    (\<open>_,/ _\<close>)
   141   "_lupdbinds" :: "[lupdbind, lupdbinds] => lupdbinds"    (\<open>_,/ _\<close>)
   142   "_LUpdate" :: "['a, lupdbinds] => 'a"    (\<open>_/[(_)]\<close> [1000,0] 900)
   142   "_LUpdate" :: "['a, lupdbinds] => 'a"
       
   143     (\<open>(\<open>open_block notation=\<open>mixfix list update\<close>\<close>_/[(_)])\<close> [1000,0] 900)
   143 
   144 
   144 translations
   145 translations
   145   "_LUpdate xs (_lupdbinds b bs)" == "_LUpdate (_LUpdate xs b) bs"
   146   "_LUpdate xs (_lupdbinds b bs)" == "_LUpdate (_LUpdate xs b) bs"
   146   "xs[i:=x]" == "CONST list_update xs i x"
   147   "xs[i:=x]" == "CONST list_update xs i x"
   147 
   148