src/HOL/IMP/Fold.thy
changeset 46005 9b02f6665fc8
parent 45886 fdac1e9880eb
child 46068 1f1897ac7877
equal deleted inserted replaced
46004:2214ba5bdfff 46005:9b02f6665fc8
     2 
     2 
     3 theory Fold imports Sem_Equiv begin
     3 theory Fold imports Sem_Equiv begin
     4 
     4 
     5 subsection "Simple folding of arithmetic expressions"
     5 subsection "Simple folding of arithmetic expressions"
     6 
     6 
     7 types
     7 type_synonym
     8   tab = "name \<Rightarrow> val option"
     8   tab = "name \<Rightarrow> val option"
     9 
     9 
    10 (* maybe better as the composition of substitution and the existing simp_const(0) *)
    10 (* maybe better as the composition of substitution and the existing simp_const(0) *)
    11 fun simp_const :: "aexp \<Rightarrow> tab \<Rightarrow> aexp" where
    11 fun simp_const :: "aexp \<Rightarrow> tab \<Rightarrow> aexp" where
    12 "simp_const (N n) _ = N n" |
    12 "simp_const (N n) _ = N n" |