--- a/src/HOL/Tools/Lifting/lifting_util.ML Mon Nov 26 14:11:31 2012 +0100
+++ b/src/HOL/Tools/Lifting/lifting_util.ML Mon Nov 26 14:15:48 2012 +0100
@@ -8,6 +8,7 @@
sig
val MRSL: thm list * thm -> thm
val Trueprop_conv: conv -> conv
+ val option_fold: 'b -> ('a -> 'b) -> 'a option -> 'b
val dest_Quotient: term -> term * term * term * term
val quot_thm_rel: thm -> term
@@ -29,6 +30,9 @@
Const (@{const_name Trueprop}, _) $ _ => Conv.arg_conv cv ct
| _ => raise CTERM ("Trueprop_conv", [ct]))
+fun option_fold a _ NONE = a
+ | option_fold _ f (SOME x) = f x
+
fun dest_Quotient (Const (@{const_name Quotient}, _) $ rel $ abs $ rep $ cr)
= (rel, abs, rep, cr)
| dest_Quotient t = raise TERM ("dest_Quotient", [t])