src/Pure/proofterm.ML
changeset 70830 8f050cc0ec50
parent 70829 1fa55b0873bc
child 70831 55e1dd3894ce
equal deleted inserted replaced
70829:1fa55b0873bc 70830:8f050cc0ec50
    75   val proof_combt: proof * term list -> proof
    75   val proof_combt: proof * term list -> proof
    76   val proof_combt': proof * term option list -> proof
    76   val proof_combt': proof * term option list -> proof
    77   val proof_combP: proof * proof list -> proof
    77   val proof_combP: proof * proof list -> proof
    78   val strip_combt: proof -> proof * term option list
    78   val strip_combt: proof -> proof * term option list
    79   val strip_combP: proof -> proof * proof list
    79   val strip_combP: proof -> proof * proof list
    80   val strip_thm: proof_body -> proof_body
    80   val strip_thm_proof: proof -> proof
       
    81   val strip_thm_body: proof_body -> proof_body
    81   val map_proof_same: term Same.operation -> typ Same.operation
    82   val map_proof_same: term Same.operation -> typ Same.operation
    82     -> (typ * class -> proof) -> proof Same.operation
    83     -> (typ * class -> proof) -> proof Same.operation
    83   val map_proof_terms_same: term Same.operation -> typ Same.operation -> proof Same.operation
    84   val map_proof_terms_same: term Same.operation -> typ Same.operation -> proof Same.operation
    84   val map_proof_types_same: typ Same.operation -> proof Same.operation
    85   val map_proof_types_same: typ Same.operation -> proof Same.operation
    85   val map_proof_terms: (term -> term) -> (typ -> typ) -> proof -> proof
    86   val map_proof_terms: (term -> term) -> (typ -> typ) -> proof -> proof
   449 fun strip_combP prf =
   450 fun strip_combP prf =
   450     let fun stripc (prf %% prf', prfs) = stripc (prf, prf'::prfs)
   451     let fun stripc (prf %% prf', prfs) = stripc (prf, prf'::prfs)
   451           | stripc  x =  x
   452           | stripc  x =  x
   452     in  stripc (prf, [])  end;
   453     in  stripc (prf, [])  end;
   453 
   454 
   454 fun strip_thm (body as PBody {proof, ...}) =
   455 fun strip_thm_proof proof =
       
   456   (case fst (strip_combt (fst (strip_combP proof))) of
       
   457     PThm (_, thm_body) => thm_body_proof_raw thm_body
       
   458   | _ => proof);
       
   459 
       
   460 fun strip_thm_body (body as PBody {proof, ...}) =
   455   (case fst (strip_combt (fst (strip_combP proof))) of
   461   (case fst (strip_combt (fst (strip_combP proof))) of
   456     PThm (_, Thm_Body {body = body', ...}) => Future.join body'
   462     PThm (_, Thm_Body {body = body', ...}) => Future.join body'
   457   | _ => body);
   463   | _ => body);
   458 
   464 
   459 val mk_Abst = fold_rev (fn (x, _: typ) => fn prf => Abst (x, NONE, prf));
   465 val mk_Abst = fold_rev (fn (x, _: typ) => fn prf => Abst (x, NONE, prf));