src/HOL/ex/Predicate_Compile_ex.thy
changeset 33473 3b275a0bf18c
parent 33405 5c1928d5db38
child 33475 42fed8eac357
equal deleted inserted replaced
33440:181fae134b43 33473:3b275a0bf18c
   245 
   245 
   246 inductive append :: "'a list \<Rightarrow> 'a list \<Rightarrow> 'a list \<Rightarrow> bool" where
   246 inductive append :: "'a list \<Rightarrow> 'a list \<Rightarrow> 'a list \<Rightarrow> bool" where
   247     "append [] xs xs"
   247     "append [] xs xs"
   248   | "append xs ys zs \<Longrightarrow> append (x # xs) ys (x # zs)"
   248   | "append xs ys zs \<Longrightarrow> append (x # xs) ys (x # zs)"
   249 
   249 
   250 code_pred (mode: [1, 2], [3], [2, 3], [1, 3], [1, 2, 3]) append .
   250 (*code_pred (mode: [1, 2], [3], [2, 3], [1, 3], [1, 2, 3]) append .*)
   251 code_pred [depth_limited] append .
   251 code_pred [depth_limited] append .
   252 code_pred [random] append .
   252 (*code_pred [random] append .*)
   253 
   253 code_pred [annotated] append .
   254 thm append.equation
   254 
       
   255 (*thm append.equation
   255 thm append.depth_limited_equation
   256 thm append.depth_limited_equation
   256 thm append.random_equation
   257 thm append.random_equation*)
       
   258 thm append.annotated_equation
   257 
   259 
   258 values "{(ys, xs). append xs ys [0, Suc 0, 2]}"
   260 values "{(ys, xs). append xs ys [0, Suc 0, 2]}"
   259 values "{zs. append [0, Suc 0, 2] [17, 8] zs}"
   261 values "{zs. append [0, Suc 0, 2] [17, 8] zs}"
   260 values "{ys. append [0, Suc 0, 2] ys [0, Suc 0, 2, 17, 0, 5]}"
   262 values "{ys. append [0, Suc 0, 2] ys [0, Suc 0, 2, 17, 0, 5]}"
   261 values [depth_limit = 3] "{(xs, ys). append xs ys [1, 2, 3, 4, (5::nat)]}"
   263 values [depth_limit = 3] "{(xs, ys). append xs ys [1, 2, 3, 4, (5::nat)]}"