src/Pure/Proof/proof_rewrite_rules.ML
changeset 70837 874092c031c3
parent 70836 44efbf252525
child 70840 5b80eb4fd0f3
equal deleted inserted replaced
70836:44efbf252525 70837:874092c031c3
    13   val elim_defs : theory -> bool -> thm list -> Proofterm.proof -> Proofterm.proof
    13   val elim_defs : theory -> bool -> thm list -> Proofterm.proof -> Proofterm.proof
    14   val elim_vars : (typ -> term) -> Proofterm.proof -> Proofterm.proof
    14   val elim_vars : (typ -> term) -> Proofterm.proof -> Proofterm.proof
    15   val hhf_proof : term -> term -> Proofterm.proof -> Proofterm.proof
    15   val hhf_proof : term -> term -> Proofterm.proof -> Proofterm.proof
    16   val un_hhf_proof : term -> term -> Proofterm.proof -> Proofterm.proof
    16   val un_hhf_proof : term -> term -> Proofterm.proof -> Proofterm.proof
    17   val expand_of_sort_proof : theory -> term option list -> typ * sort -> Proofterm.proof list
    17   val expand_of_sort_proof : theory -> term option list -> typ * sort -> Proofterm.proof list
       
    18   val expand_of_class_proof : theory -> term option list -> typ * class -> proof
    18   val expand_of_class : theory -> typ list -> term option list -> Proofterm.proof ->
    19   val expand_of_class : theory -> typ list -> term option list -> Proofterm.proof ->
    19     (Proofterm.proof * Proofterm.proof) option
    20     (Proofterm.proof * Proofterm.proof) option
    20 end;
    21 end;
    21 
    22 
    22 structure ProofRewriteRules : PROOF_REWRITE_RULES =
    23 structure ProofRewriteRules : PROOF_REWRITE_RULES =
   364     map2 reconstruct (Logic.mk_of_sort (T, S))
   365     map2 reconstruct (Logic.mk_of_sort (T, S))
   365       (Proofterm.of_sort_proof (Sign.classes_of thy) (Thm.classrel_proof thy) (Thm.arity_proof thy)
   366       (Proofterm.of_sort_proof (Sign.classes_of thy) (Thm.classrel_proof thy) (Thm.arity_proof thy)
   366         (OfClass o apfst Type.strip_sorts) (subst T, S))
   367         (OfClass o apfst Type.strip_sorts) (subst T, S))
   367   end;
   368   end;
   368 
   369 
   369 fun expand_of_class thy (_: typ list) hs (OfClass (T, c)) =
   370 fun expand_of_class_proof thy hyps (T, c) =
   370       SOME (expand_of_sort_proof thy hs (T, [c]) |> hd, Proofterm.no_skel)
   371   hd (expand_of_sort_proof thy hyps (T, [c]));
       
   372 
       
   373 fun expand_of_class thy (_: typ list) hyps (OfClass (T, c)) =
       
   374       SOME (expand_of_class_proof thy hyps (T, c), Proofterm.no_skel)
   371   | expand_of_class _ _ _ _ = NONE;
   375   | expand_of_class _ _ _ _ = NONE;
   372 
   376 
   373 end;
   377 end;