src/Benchmarks/Record_Benchmark/Record_Benchmark.thy
changeset 80703 cc4ecaa8e96e
parent 69597 ff784d5a5bfb
equal deleted inserted replaced
80702:71910299bbcd 80703:cc4ecaa8e96e
   354 lemma "(r\<lparr>A255:=x,A253:=y,A255:=z \<rparr>) = r\<lparr>A253:=y,A255:=z\<rparr>"
   354 lemma "(r\<lparr>A255:=x,A253:=y,A255:=z \<rparr>) = r\<lparr>A253:=y,A255:=z\<rparr>"
   355   by simp
   355   by simp
   356 
   356 
   357 lemma "(r\<lparr>A255:=x,A253:=y,A255:=z \<rparr>) = r\<lparr>A253:=y,A255:=z\<rparr>"
   357 lemma "(r\<lparr>A255:=x,A253:=y,A255:=z \<rparr>) = r\<lparr>A253:=y,A255:=z\<rparr>"
   358   apply (tactic \<open>simp_tac
   358   apply (tactic \<open>simp_tac
   359     (put_simpset HOL_basic_ss \<^context> addsimprocs [Record.upd_simproc]) 1\<close>)
   359     (put_simpset HOL_basic_ss \<^context> |> Simplifier.add_proc Record.upd_simproc) 1\<close>)
   360   done
   360   done
   361 
   361 
   362 lemma "(\<forall>r. P (A155 r)) \<longrightarrow> (\<forall>x. P x)"
   362 lemma "(\<forall>r. P (A155 r)) \<longrightarrow> (\<forall>x. P x)"
   363   apply (tactic \<open>simp_tac
   363   apply (tactic \<open>simp_tac
   364     (put_simpset HOL_basic_ss \<^context> addsimprocs [Record.split_simproc (K ~1)]) 1\<close>)
   364     (put_simpset HOL_basic_ss \<^context> |> Simplifier.add_proc (Record.split_simproc (K ~1))) 1\<close>)
   365   apply simp
   365   apply simp
   366   done
   366   done
   367 
   367 
   368 lemma "(\<forall>r. P (A155 r)) \<longrightarrow> (\<forall>x. P x)"
   368 lemma "(\<forall>r. P (A155 r)) \<longrightarrow> (\<forall>x. P x)"
   369   apply (tactic \<open>Record.split_simp_tac \<^context> [] (K ~1) 1\<close>)
   369   apply (tactic \<open>Record.split_simp_tac \<^context> [] (K ~1) 1\<close>)
   370   apply simp
   370   apply simp
   371   done
   371   done
   372 
   372 
   373 lemma "(\<exists>r. P (A155 r)) \<longrightarrow> (\<exists>x. P x)"
   373 lemma "(\<exists>r. P (A155 r)) \<longrightarrow> (\<exists>x. P x)"
   374   apply (tactic \<open>simp_tac
   374   apply (tactic \<open>simp_tac
   375     (put_simpset HOL_basic_ss \<^context> addsimprocs [Record.split_simproc (K ~1)]) 1\<close>)
   375     (put_simpset HOL_basic_ss \<^context> |> Simplifier.add_proc (Record.split_simproc (K ~1))) 1\<close>)
   376   apply simp
   376   apply simp
   377   done
   377   done
   378 
   378 
   379 lemma "(\<exists>r. P (A155 r)) \<longrightarrow> (\<exists>x. P x)"
   379 lemma "(\<exists>r. P (A155 r)) \<longrightarrow> (\<exists>x. P x)"
   380   apply (tactic \<open>Record.split_simp_tac \<^context> [] (K ~1) 1\<close>)
   380   apply (tactic \<open>Record.split_simp_tac \<^context> [] (K ~1) 1\<close>)
   381   apply simp
   381   apply simp
   382   done
   382   done
   383 
   383 
   384 lemma "\<And>r. P (A155 r) \<Longrightarrow> (\<exists>x. P x)"
   384 lemma "\<And>r. P (A155 r) \<Longrightarrow> (\<exists>x. P x)"
   385   apply (tactic \<open>simp_tac
   385   apply (tactic \<open>simp_tac
   386     (put_simpset HOL_basic_ss \<^context> addsimprocs [Record.split_simproc (K ~1)]) 1\<close>)
   386     (put_simpset HOL_basic_ss \<^context> |> Simplifier.add_proc (Record.split_simproc (K ~1))) 1\<close>)
   387   apply auto
   387   apply auto
   388   done
   388   done
   389 
   389 
   390 lemma "\<And>r. P (A155 r) \<Longrightarrow> (\<exists>x. P x)"
   390 lemma "\<And>r. P (A155 r) \<Longrightarrow> (\<exists>x. P x)"
   391   apply (tactic \<open>Record.split_simp_tac \<^context> [] (K ~1) 1\<close>)
   391   apply (tactic \<open>Record.split_simp_tac \<^context> [] (K ~1) 1\<close>)
   415 end
   415 end
   416 
   416 
   417 
   417 
   418 lemma "\<exists>r. A155 r = x"
   418 lemma "\<exists>r. A155 r = x"
   419   apply (tactic \<open>simp_tac
   419   apply (tactic \<open>simp_tac
   420     (put_simpset HOL_basic_ss \<^context> addsimprocs [Record.ex_sel_eq_simproc]) 1\<close>)
   420     (put_simpset HOL_basic_ss \<^context> |> Simplifier.add_proc (Record.ex_sel_eq_simproc)) 1\<close>)
   421   done
   421   done
   422 
   422 
   423 print_record many_A
   423 print_record many_A
   424 
   424 
   425 print_record many_B
   425 print_record many_B