src/Pure/Proof/proof_syntax.ML
changeset 70417 eb6ff14767cd
parent 70412 64ead6de6212
child 70418 d23cfb85438a
equal deleted inserted replaced
70416:5be1da847b24 70417:eb6ff14767cd
    89     fun mk_term t = (if ty then I else map_types (K dummyT))
    89     fun mk_term t = (if ty then I else map_types (K dummyT))
    90       (Term.no_dummy_patterns t);
    90       (Term.no_dummy_patterns t);
    91 
    91 
    92     fun prf_of [] (Bound i) = PBound i
    92     fun prf_of [] (Bound i) = PBound i
    93       | prf_of Ts (Const (s, Type ("Pure.proof", _))) =
    93       | prf_of Ts (Const (s, Type ("Pure.proof", _))) =
    94           Proofterm.change_type (if ty then SOME Ts else NONE)
    94           Proofterm.change_types (if ty then SOME Ts else NONE)
    95             (case Long_Name.explode s of
    95             (case Long_Name.explode s of
    96                "axm" :: xs =>
    96                "axm" :: xs =>
    97                  let
    97                  let
    98                    val name = Long_Name.implode xs;
    98                    val name = Long_Name.implode xs;
    99                    val prop = (case AList.lookup (op =) axms name of
    99                    val prop = (case AList.lookup (op =) axms name of
   109                  end
   109                  end
   110              | _ => error ("Illegal proof constant name: " ^ quote s))
   110              | _ => error ("Illegal proof constant name: " ^ quote s))
   111       | prf_of Ts (Const ("Pure.OfClass", _) $ Const (c_class, _)) =
   111       | prf_of Ts (Const ("Pure.OfClass", _) $ Const (c_class, _)) =
   112           (case try Logic.class_of_const c_class of
   112           (case try Logic.class_of_const c_class of
   113             SOME c =>
   113             SOME c =>
   114               Proofterm.change_type (if ty then SOME Ts else NONE)
   114               Proofterm.change_types (if ty then SOME Ts else NONE)
   115                 (OfClass (TVar ((Name.aT, 0), []), c))
   115                 (OfClass (TVar ((Name.aT, 0), []), c))
   116           | NONE => error ("Bad class constant: " ^ quote c_class))
   116           | NONE => error ("Bad class constant: " ^ quote c_class))
   117       | prf_of Ts (Const ("Pure.Hyp", _) $ prop) = Hyp prop
   117       | prf_of Ts (Const ("Pure.Hyp", _) $ prop) = Hyp prop
   118       | prf_of Ts (v as Var ((_, Type ("Pure.proof", _)))) = Hyp v
   118       | prf_of Ts (v as Var ((_, Type ("Pure.proof", _)))) = Hyp v
   119       | prf_of [] (Const ("Pure.Abst", _) $ Abs (s, T, prf)) =
   119       | prf_of [] (Const ("Pure.Abst", _) $ Abs (s, T, prf)) =