src/HOL/Tools/Lifting/lifting_util.ML
author kuncar
Mon, 23 Apr 2012 18:42:03 +0200
changeset 47699 bb6b147c6531
parent 47698 18202d3d5832
child 47777 f29e7dcd7c40
permissions -rw-r--r--
added useful Trueprop_conv
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
47698
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
     1
(*  Title:      HOL/Tools/Lifting/lifting_util.ML
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
     2
    Author:     Ondrej Kuncar
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
     3
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
     4
General-purpose functions used by the Lifting package.
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
     5
*)
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
     6
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
     7
signature LIFTING_UTIL =
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
     8
sig
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
     9
  val MRSL: thm list * thm -> thm
47699
bb6b147c6531 added useful Trueprop_conv
kuncar
parents: 47698
diff changeset
    10
  val Trueprop_conv: conv -> conv
47698
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
    11
end;
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
    12
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
    13
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
    14
structure Lifting_Util: LIFTING_UTIL =
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
    15
struct
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
    16
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
    17
infix 0 MRSL
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
    18
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
    19
fun ants MRSL thm = fold (fn rl => fn thm => rl RS thm) ants thm
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
    20
47699
bb6b147c6531 added useful Trueprop_conv
kuncar
parents: 47698
diff changeset
    21
fun Trueprop_conv cv ct =
bb6b147c6531 added useful Trueprop_conv
kuncar
parents: 47698
diff changeset
    22
  (case Thm.term_of ct of
bb6b147c6531 added useful Trueprop_conv
kuncar
parents: 47698
diff changeset
    23
    Const (@{const_name Trueprop}, _) $ _ => Conv.arg_conv cv ct
bb6b147c6531 added useful Trueprop_conv
kuncar
parents: 47698
diff changeset
    24
  | _ => raise CTERM ("Trueprop_conv", [ct]))
bb6b147c6531 added useful Trueprop_conv
kuncar
parents: 47698
diff changeset
    25
47698
18202d3d5832 move MRSL to a separate file
kuncar
parents:
diff changeset
    26
end;