src/Pure/Proof/proof_syntax.ML
changeset 21858 05f57309170c
parent 21646 c07b5b0e8492
child 22675 acf10be7dcca
equal deleted inserted replaced
21857:f9d085c2625c 21858:05f57309170c
   132       (Term.no_dummy_patterns t);
   132       (Term.no_dummy_patterns t);
   133 
   133 
   134     fun prf_of [] (Bound i) = PBound i
   134     fun prf_of [] (Bound i) = PBound i
   135       | prf_of Ts (Const (s, Type ("proof", _))) =
   135       | prf_of Ts (Const (s, Type ("proof", _))) =
   136           change_type (if ty then SOME Ts else NONE)
   136           change_type (if ty then SOME Ts else NONE)
   137             (case NameSpace.unpack s of
   137             (case NameSpace.explode s of
   138                "axm" :: xs =>
   138                "axm" :: xs =>
   139                  let
   139                  let
   140                    val name = NameSpace.pack xs;
   140                    val name = NameSpace.implode xs;
   141                    val prop = (case AList.lookup (op =) axms name of
   141                    val prop = (case AList.lookup (op =) axms name of
   142                        SOME prop => prop
   142                        SOME prop => prop
   143                      | NONE => error ("Unknown axiom " ^ quote name))
   143                      | NONE => error ("Unknown axiom " ^ quote name))
   144                  in PAxm (name, prop, NONE) end
   144                  in PAxm (name, prop, NONE) end
   145              | "thm" :: xs =>
   145              | "thm" :: xs =>
   146                  let val name = NameSpace.pack xs;
   146                  let val name = NameSpace.implode xs;
   147                  in (case AList.lookup (op =) thms name of
   147                  in (case AList.lookup (op =) thms name of
   148                      SOME thm => fst (strip_combt (Thm.proof_of thm))
   148                      SOME thm => fst (strip_combt (Thm.proof_of thm))
   149                    | NONE => (case Symtab.lookup tab name of
   149                    | NONE => (case Symtab.lookup tab name of
   150                          SOME prf => prf
   150                          SOME prf => prf
   151                        | NONE => error ("Unknown theorem " ^ quote name)))
   151                        | NONE => error ("Unknown theorem " ^ quote name)))