src/HOL/Predicate_Compile_Examples/Predicate_Compile_Tests.thy
changeset 67226 ec32cdaab97b
parent 66453 cc19f7ca2ed6
child 67399 eab6ce8368fa
equal deleted inserted replaced
67225:cb34f5f49a08 67226:ec32cdaab97b
   123 where
   123 where
   124   "\<not> ck \<Longrightarrow> ck = False \<Longrightarrow> predicate_where_argument_is_neg_condition_and_in_equation ck"
   124   "\<not> ck \<Longrightarrow> ck = False \<Longrightarrow> predicate_where_argument_is_neg_condition_and_in_equation ck"
   125 
   125 
   126 code_pred predicate_where_argument_is_neg_condition_and_in_equation .
   126 code_pred predicate_where_argument_is_neg_condition_and_in_equation .
   127 
   127 
   128 text {* Another related example that required slight adjustment of the proof procedure *}
   128 text \<open>Another related example that required slight adjustment of the proof procedure\<close>
   129 
   129 
   130 inductive if_as_predicate :: "bool \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> bool"
   130 inductive if_as_predicate :: "bool \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> bool"
   131 where
   131 where
   132   "condition \<Longrightarrow> if_as_predicate condition then_value else_value then_value"
   132   "condition \<Longrightarrow> if_as_predicate condition then_value else_value then_value"
   133 | "\<not> condition \<Longrightarrow> if_as_predicate condition then_value else_value else_value"
   133 | "\<not> condition \<Longrightarrow> if_as_predicate condition then_value else_value else_value"