src/Pure/proofterm.ML
changeset 70417 eb6ff14767cd
parent 70416 5be1da847b24
child 70419 ea5a492cd196
equal deleted inserted replaced
70416:5be1da847b24 70417:eb6ff14767cd
    79   val map_proof_terms: (term -> term) -> (typ -> typ) -> proof -> proof
    79   val map_proof_terms: (term -> term) -> (typ -> typ) -> proof -> proof
    80   val map_proof_types: (typ -> typ) -> proof -> proof
    80   val map_proof_types: (typ -> typ) -> proof -> proof
    81   val fold_proof_terms: (term -> 'a -> 'a) -> (typ -> 'a -> 'a) -> proof -> 'a -> 'a
    81   val fold_proof_terms: (term -> 'a -> 'a) -> (typ -> 'a -> 'a) -> proof -> 'a -> 'a
    82   val maxidx_proof: proof -> int -> int
    82   val maxidx_proof: proof -> int -> int
    83   val size_of_proof: proof -> int
    83   val size_of_proof: proof -> int
    84   val change_type: typ list option -> proof -> proof
    84   val change_types: typ list option -> proof -> proof
    85   val prf_abstract_over: term -> proof -> proof
    85   val prf_abstract_over: term -> proof -> proof
    86   val prf_incr_bv: int -> int -> int -> int -> proof -> proof
    86   val prf_incr_bv: int -> int -> int -> int -> proof -> proof
    87   val incr_pboundvars: int -> int -> proof -> proof
    87   val incr_pboundvars: int -> int -> proof -> proof
    88   val prf_loose_bvar1: proof -> int -> bool
    88   val prf_loose_bvar1: proof -> int -> bool
    89   val prf_loose_Pbvar1: proof -> int -> bool
    89   val prf_loose_Pbvar1: proof -> int -> bool
   485   | size_of_proof (AbsP (_, _, prf)) = 1 + size_of_proof prf
   485   | size_of_proof (AbsP (_, _, prf)) = 1 + size_of_proof prf
   486   | size_of_proof (prf % _) = 1 + size_of_proof prf
   486   | size_of_proof (prf % _) = 1 + size_of_proof prf
   487   | size_of_proof (prf1 %% prf2) = size_of_proof prf1 + size_of_proof prf2
   487   | size_of_proof (prf1 %% prf2) = size_of_proof prf1 + size_of_proof prf2
   488   | size_of_proof _ = 1;
   488   | size_of_proof _ = 1;
   489 
   489 
   490 fun change_type opTs (PAxm (name, prop, _)) = PAxm (name, prop, opTs)
   490 fun change_types types (PAxm (name, prop, _)) = PAxm (name, prop, types)
   491   | change_type (SOME [T]) (OfClass (_, c)) = OfClass (T, c)
   491   | change_types (SOME [T]) (OfClass (_, c)) = OfClass (T, c)
   492   | change_type opTs (Oracle (name, prop, _)) = Oracle (name, prop, opTs)
   492   | change_types types (Oracle (name, prop, _)) = Oracle (name, prop, types)
   493   | change_type opTs (PThm (i, ((name, prop, _, open_proof), body))) =
   493   | change_types types (PThm (i, ((name, prop, _, open_proof), body))) =
   494       PThm (i, ((name, prop, opTs, open_proof), body))
   494       PThm (i, ((name, prop, types, open_proof), body))
   495   | change_type _ prf = prf;
   495   | change_types _ prf = prf;
   496 
   496 
   497 
   497 
   498 (* utilities *)
   498 (* utilities *)
   499 
   499 
   500 fun strip_abs (_::Ts) (Abs (_, _, t)) = strip_abs Ts t
   500 fun strip_abs (_::Ts) (Abs (_, _, t)) = strip_abs Ts t