src/HOL/Tools/Lifting/lifting_info.ML
author wenzelm
Sun, 20 May 2012 11:34:33 +0200
changeset 47884 21c42b095c84
parent 47784 fe43977e434f
child 47936 756f30eac792
permissions -rw-r--r--
try to avoid races again (cf. 8c37cb84065f and fd3a36e48b09);
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
47308
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
     1
(*  Title:      HOL/Tools/Lifting/lifting_info.ML
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
     2
    Author:     Ondrej Kuncar
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
     3
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
     4
Context data for the lifting package.
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
     5
*)
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
     6
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
     7
signature LIFTING_INFO =
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
     8
sig
47777
f29e7dcd7c40 use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents: 47634
diff changeset
     9
  type quotmaps = {rel_quot_thm: thm}
47308
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    10
  val lookup_quotmaps: Proof.context -> string -> quotmaps option
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    11
  val lookup_quotmaps_global: theory -> string -> quotmaps option
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    12
  val print_quotmaps: Proof.context -> unit
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    13
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    14
  type quotients = {quot_thm: thm}
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    15
  val transform_quotients: morphism -> quotients -> quotients
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    16
  val lookup_quotients: Proof.context -> string -> quotients option
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    17
  val lookup_quotients_global: theory -> string -> quotients option
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    18
  val update_quotients: string -> quotients -> Context.generic -> Context.generic
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    19
  val dest_quotients: Proof.context -> quotients list
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    20
  val print_quotients: Proof.context -> unit
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    21
47634
091bcd569441 hide the invariant constant for relators: invariant_commute infrastracture
kuncar
parents: 47308
diff changeset
    22
  val get_invariant_commute_rules: Proof.context -> thm list
091bcd569441 hide the invariant constant for relators: invariant_commute infrastracture
kuncar
parents: 47308
diff changeset
    23
47308
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    24
  val setup: theory -> theory
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    25
end;
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    26
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    27
structure Lifting_Info: LIFTING_INFO =
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    28
struct
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    29
47777
f29e7dcd7c40 use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents: 47634
diff changeset
    30
open Lifting_Util
f29e7dcd7c40 use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents: 47634
diff changeset
    31
47308
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    32
(** data containers **)
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    33
47777
f29e7dcd7c40 use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents: 47634
diff changeset
    34
(* info about Quotient map theorems *)
f29e7dcd7c40 use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents: 47634
diff changeset
    35
type quotmaps = {rel_quot_thm: thm}
47308
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    36
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    37
structure Quotmaps = Generic_Data
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    38
(
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    39
  type T = quotmaps Symtab.table
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    40
  val empty = Symtab.empty
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    41
  val extend = I
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    42
  fun merge data = Symtab.merge (K true) data
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    43
)
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    44
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    45
val lookup_quotmaps = Symtab.lookup o Quotmaps.get o Context.Proof
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    46
val lookup_quotmaps_global = Symtab.lookup o Quotmaps.get o Context.Theory
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    47
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    48
(* FIXME export proper internal update operation!? *)
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    49
47784
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    50
fun quot_map_thm_sanity_check rel_quot_thm ctxt =
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    51
  let
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    52
    fun quot_term_absT ctxt quot_term = 
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    53
      let 
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    54
        val (_, abs, _, _) = (dest_Quotient o HOLogic.dest_Trueprop) quot_term
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    55
          handle TERM (_, [t]) => error (Pretty.string_of (Pretty.block
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    56
            [Pretty.str "The Quotient map theorem is not in the right form.",
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    57
             Pretty.brk 1,
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    58
             Pretty.str "The following term is not the Quotient predicate:",
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    59
             Pretty.brk 1,
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    60
             Syntax.pretty_term ctxt t]))
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    61
      in
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    62
        fastype_of abs
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    63
      end
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    64
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    65
    val ((_, [rel_quot_thm_fixed]), ctxt') = Variable.importT [rel_quot_thm] ctxt
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    66
    val rel_quot_thm_prop = prop_of rel_quot_thm_fixed
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    67
    val rel_quot_thm_concl = Logic.strip_imp_concl rel_quot_thm_prop
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    68
    val rel_quot_thm_prems = Logic.strip_imp_prems rel_quot_thm_prop;
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    69
    val concl_absT = quot_term_absT ctxt' rel_quot_thm_concl
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    70
    val concl_tfrees = Term.add_tfree_namesT (concl_absT) []
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    71
    val prems_tfrees = fold (fn typ => fn list => Term.add_tfree_namesT (quot_term_absT ctxt' typ) list) 
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    72
                          rel_quot_thm_prems []
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    73
    val extra_prem_tfrees =
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    74
      case subtract (op =) concl_tfrees prems_tfrees of
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    75
        [] => []
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    76
      | extras => [Pretty.block ([Pretty.str "Extra type variables in the premises:",
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    77
                                 Pretty.brk 1] @ 
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    78
                                 ((Pretty.commas o map (Pretty.str o quote)) extras) @
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    79
                                 [Pretty.str "."])]
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    80
    val errs = extra_prem_tfrees 
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    81
  in
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    82
    if null errs then () else error (cat_lines (["Sanity check of the quotient map theorem failed:",""] 
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    83
                                                 @ (map Pretty.string_of errs)))
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    84
  end
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    85
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    86
47777
f29e7dcd7c40 use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents: 47634
diff changeset
    87
fun add_quot_map rel_quot_thm ctxt = 
f29e7dcd7c40 use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents: 47634
diff changeset
    88
  let
47784
fe43977e434f added a basic sanity check for quot_map
kuncar
parents: 47777
diff changeset
    89
    val _ = Context.cases (K ()) (quot_map_thm_sanity_check rel_quot_thm) ctxt
47777
f29e7dcd7c40 use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents: 47634
diff changeset
    90
    val rel_quot_thm_concl = (Logic.strip_imp_concl o prop_of) rel_quot_thm
f29e7dcd7c40 use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents: 47634
diff changeset
    91
    val (_, abs, _, _) = (dest_Quotient o HOLogic.dest_Trueprop) rel_quot_thm_concl
f29e7dcd7c40 use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents: 47634
diff changeset
    92
    val relatorT_name = (fst o dest_Type o fst o dest_funT o fastype_of) abs
f29e7dcd7c40 use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents: 47634
diff changeset
    93
    val minfo = {rel_quot_thm = rel_quot_thm}
f29e7dcd7c40 use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents: 47634
diff changeset
    94
  in
f29e7dcd7c40 use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents: 47634
diff changeset
    95
    Quotmaps.map (Symtab.update (relatorT_name, minfo)) ctxt
f29e7dcd7c40 use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents: 47634
diff changeset
    96
  end    
f29e7dcd7c40 use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents: 47634
diff changeset
    97
47308
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
    98
val quotmaps_attribute_setup =
47777
f29e7dcd7c40 use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents: 47634
diff changeset
    99
  Attrib.setup @{binding quot_map} (Scan.succeed (Thm.declaration_attribute add_quot_map))
f29e7dcd7c40 use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents: 47634
diff changeset
   100
    "declaration of the Quotient map theorem"
47308
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   101
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   102
fun print_quotmaps ctxt =
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   103
  let
47777
f29e7dcd7c40 use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents: 47634
diff changeset
   104
    fun prt_map (ty_name, {rel_quot_thm}) =
47308
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   105
      Pretty.block (separate (Pretty.brk 2)
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   106
         [Pretty.str "type:", 
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   107
          Pretty.str ty_name,
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   108
          Pretty.str "quot. theorem:", 
47777
f29e7dcd7c40 use a quot_map theorem attribute instead of the complicated map attribute
kuncar
parents: 47634
diff changeset
   109
          Syntax.pretty_term ctxt (prop_of rel_quot_thm)])
47308
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   110
  in
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   111
    map prt_map (Symtab.dest (Quotmaps.get (Context.Proof ctxt)))
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   112
    |> Pretty.big_list "maps for type constructors:"
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   113
    |> Pretty.writeln
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   114
  end
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   115
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   116
(* info about quotient types *)
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   117
type quotients = {quot_thm: thm}
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   118
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   119
structure Quotients = Generic_Data
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   120
(
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   121
  type T = quotients Symtab.table
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   122
  val empty = Symtab.empty
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   123
  val extend = I
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   124
  fun merge data = Symtab.merge (K true) data
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   125
)
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   126
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   127
fun transform_quotients phi {quot_thm} =
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   128
  {quot_thm = Morphism.thm phi quot_thm}
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   129
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   130
val lookup_quotients = Symtab.lookup o Quotients.get o Context.Proof
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   131
val lookup_quotients_global = Symtab.lookup o Quotients.get o Context.Theory
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   132
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   133
fun update_quotients str qinfo = Quotients.map (Symtab.update (str, qinfo))
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   134
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   135
fun dest_quotients ctxt =  (* FIXME slightly expensive way to retrieve data *)
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   136
  map snd (Symtab.dest (Quotients.get (Context.Proof ctxt)))
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   137
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   138
fun print_quotients ctxt =
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   139
  let
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   140
    fun prt_quot (qty_name, {quot_thm}) =
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   141
      Pretty.block (separate (Pretty.brk 2)
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   142
       [Pretty.str "type:", 
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   143
        Pretty.str qty_name,
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   144
        Pretty.str "quot. thm:",
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   145
        Syntax.pretty_term ctxt (prop_of quot_thm)])
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   146
  in
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   147
    map prt_quot (Symtab.dest (Quotients.get (Context.Proof ctxt)))
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   148
    |> Pretty.big_list "quotients:"
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   149
    |> Pretty.writeln
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   150
  end
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   151
47634
091bcd569441 hide the invariant constant for relators: invariant_commute infrastracture
kuncar
parents: 47308
diff changeset
   152
structure Invariant_Commute = Named_Thms
091bcd569441 hide the invariant constant for relators: invariant_commute infrastracture
kuncar
parents: 47308
diff changeset
   153
(
091bcd569441 hide the invariant constant for relators: invariant_commute infrastracture
kuncar
parents: 47308
diff changeset
   154
  val name = @{binding invariant_commute}
091bcd569441 hide the invariant constant for relators: invariant_commute infrastracture
kuncar
parents: 47308
diff changeset
   155
  val description = "theorems that a relator of an invariant is an invariant of the corresponding predicate"
091bcd569441 hide the invariant constant for relators: invariant_commute infrastracture
kuncar
parents: 47308
diff changeset
   156
)
091bcd569441 hide the invariant constant for relators: invariant_commute infrastracture
kuncar
parents: 47308
diff changeset
   157
091bcd569441 hide the invariant constant for relators: invariant_commute infrastracture
kuncar
parents: 47308
diff changeset
   158
fun get_invariant_commute_rules ctxt = map safe_mk_meta_eq (Invariant_Commute.get ctxt)
091bcd569441 hide the invariant constant for relators: invariant_commute infrastracture
kuncar
parents: 47308
diff changeset
   159
47308
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   160
(* theory setup *)
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   161
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   162
val setup =
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   163
  quotmaps_attribute_setup
47634
091bcd569441 hide the invariant constant for relators: invariant_commute infrastracture
kuncar
parents: 47308
diff changeset
   164
  #> Invariant_Commute.setup
47308
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   165
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   166
(* outer syntax commands *)
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   167
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   168
val _ =
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   169
  Outer_Syntax.improper_command @{command_spec "print_quotmaps"} "print quotient map functions"
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   170
    (Scan.succeed (Toplevel.keep (print_quotmaps o Toplevel.context_of)))
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   171
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   172
val _ =
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   173
  Outer_Syntax.improper_command @{command_spec "print_quotients"} "print quotients"
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   174
    (Scan.succeed (Toplevel.keep (print_quotients o Toplevel.context_of)))
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   175
9caab698dbe4 new package Lifting - initial commit
kuncar
parents:
diff changeset
   176
end;