src/HOL/Import/proof_kernel.ML
changeset 33037 b22e44496dc2
parent 32966 5b21661fe618
child 33038 8f9594c31de4
equal deleted inserted replaced
33015:575bd6548df9 33037:b22e44496dc2
   279 fun i mem L =
   279 fun i mem L =
   280     let fun itr [] = false
   280     let fun itr [] = false
   281           | itr (a::rst) = i=a orelse itr rst
   281           | itr (a::rst) = i=a orelse itr rst
   282     in itr L end;
   282     in itr L end;
   283 
   283 
       
   284 infix union;
   284 fun [] union S = S
   285 fun [] union S = S
   285   | S union [] = S
   286   | S union [] = S
   286   | (a::rst) union S2 = rst union (insert (op =) a S2)
   287   | (a::rst) union S2 = rst union (insert (op =) a S2);
   287 
   288 
   288 fun implode_subst [] = []
   289 fun implode_subst [] = []
   289   | implode_subst (x::r::rest) = ((x,r)::(implode_subst rest))
   290   | implode_subst (x::r::rest) = ((x,r)::(implode_subst rest))
   290   | implode_subst _ = raise ERR "implode_subst" "malformed substitution list"
   291   | implode_subst _ = raise ERR "implode_subst" "malformed substitution list"
   291 
   292 
  1227           | add_consts (t $ u, cs) = add_consts (t, add_consts (u, cs))
  1228           | add_consts (t $ u, cs) = add_consts (t, add_consts (u, cs))
  1228           | add_consts (Abs (_, _, t), cs) = add_consts (t, cs)
  1229           | add_consts (Abs (_, _, t), cs) = add_consts (t, cs)
  1229           | add_consts (_, cs) = cs
  1230           | add_consts (_, cs) = cs
  1230         val t_consts = add_consts(t,[])
  1231         val t_consts = add_consts(t,[])
  1231     in
  1232     in
  1232         fn th => eq_set(t_consts,add_consts(prop_of th,[]))
  1233         fn th => gen_eq_set (op =) (t_consts, add_consts (prop_of th, []))
  1233     end
  1234     end
  1234 
  1235 
  1235 fun split_name str =
  1236 fun split_name str =
  1236     let
  1237     let
  1237         val sub = Substring.full str
  1238         val sub = Substring.full str