src/Provers/hypsubst.ML
changeset 81954 6f2bcdfa9a19
parent 74295 9a9326a072bb
equal deleted inserted replaced
81953:02d9844ff892 81954:6f2bcdfa9a19
   167         val Q = Data.dest_Trueprop (Logic.strip_assums_concl Bi);
   167         val Q = Data.dest_Trueprop (Logic.strip_assums_concl Bi);
   168         val rl' = Thm.lift_rule cBi rl;
   168         val rl' = Thm.lift_rule cBi rl;
   169         val (ixn, T) = dest_Var (Term.head_of (Data.dest_Trueprop
   169         val (ixn, T) = dest_Var (Term.head_of (Data.dest_Trueprop
   170           (Logic.strip_assums_concl (Thm.prop_of rl'))));
   170           (Logic.strip_assums_concl (Thm.prop_of rl'))));
   171         val (v1, v2) = Data.dest_eq (Data.dest_Trueprop
   171         val (v1, v2) = Data.dest_eq (Data.dest_Trueprop
   172           (Logic.strip_assums_concl (hd (Thm.prems_of rl'))));
   172           (Logic.strip_assums_concl (hd (Thm.take_prems_of 1 rl'))));
   173         val (Ts, V) = split_last (Term.binder_types T);
   173         val (Ts, V) = split_last (Term.binder_types T);
   174         val u =
   174         val u =
   175           fold_rev Term.abs (ps @ [("x", U)])
   175           fold_rev Term.abs (ps @ [("x", U)])
   176             (case (if b then t else t') of
   176             (case (if b then t else t') of
   177               Bound j => subst_bounds (map Bound ((1 upto j) @ 0 :: (j + 2 upto length ps)), Q)
   177               Bound j => subst_bounds (map Bound ((1 upto j) @ 0 :: (j + 2 upto length ps)), Q)