equal
deleted
inserted
replaced
173 *} |
173 *} |
174 |
174 |
175 text {* lazy @{const If} *} |
175 text {* lazy @{const If} *} |
176 |
176 |
177 definition |
177 definition |
178 if_delayed :: "bool \<Rightarrow> (bool \<Rightarrow> 'a) \<Rightarrow> (bool \<Rightarrow> 'a) \<Rightarrow> 'a" |
178 if_delayed :: "bool \<Rightarrow> (bool \<Rightarrow> 'a) \<Rightarrow> (bool \<Rightarrow> 'a) \<Rightarrow> 'a" where |
179 "if_delayed b f g = (if b then f True else g False)" |
179 "if_delayed b f g = (if b then f True else g False)" |
180 |
180 |
181 lemma [code func]: |
181 lemma [code func]: |
182 shows "if_delayed True f g = f True" |
182 shows "if_delayed True f g = f True" |
183 and "if_delayed False f g = g False" |
183 and "if_delayed False f g = g False" |