author | wenzelm |
Sun, 20 May 2012 11:34:33 +0200 | |
changeset 47884 | 21c42b095c84 |
parent 47777 | f29e7dcd7c40 |
child 47951 | 8c8a03765de7 |
permissions | -rw-r--r-- |
47698 | 1 |
(* Title: HOL/Tools/Lifting/lifting_util.ML |
2 |
Author: Ondrej Kuncar |
|
3 |
||
4 |
General-purpose functions used by the Lifting package. |
|
5 |
*) |
|
6 |
||
7 |
signature LIFTING_UTIL = |
|
8 |
sig |
|
9 |
val MRSL: thm list * thm -> thm |
|
47699 | 10 |
val Trueprop_conv: conv -> conv |
47777
f29e7dcd7c40
use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents:
47699
diff
changeset
|
11 |
val dest_Quotient: term -> term * term * term * term |
47698 | 12 |
end; |
13 |
||
14 |
||
15 |
structure Lifting_Util: LIFTING_UTIL = |
|
16 |
struct |
|
17 |
||
18 |
infix 0 MRSL |
|
19 |
||
20 |
fun ants MRSL thm = fold (fn rl => fn thm => rl RS thm) ants thm |
|
21 |
||
47699 | 22 |
fun Trueprop_conv cv ct = |
23 |
(case Thm.term_of ct of |
|
24 |
Const (@{const_name Trueprop}, _) $ _ => Conv.arg_conv cv ct |
|
25 |
| _ => raise CTERM ("Trueprop_conv", [ct])) |
|
26 |
||
47777
f29e7dcd7c40
use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents:
47699
diff
changeset
|
27 |
fun dest_Quotient (Const (@{const_name Quotient}, _) $ rel $ abs $ rep $ cr) |
f29e7dcd7c40
use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents:
47699
diff
changeset
|
28 |
= (rel, abs, rep, cr) |
f29e7dcd7c40
use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents:
47699
diff
changeset
|
29 |
| dest_Quotient t = raise TERM ("dest_Quotient", [t]) |
f29e7dcd7c40
use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents:
47699
diff
changeset
|
30 |
|
47698 | 31 |
end; |