src/Provers/preorder.ML
changeset 81516 31b05aef022d
parent 76183 8089593a364a
child 81541 5335b1ca6233
equal deleted inserted replaced
81515:44c0028486db 81516:31b05aef022d
   553 (* trans_tac - solves transitivity chains over <= *)
   553 (* trans_tac - solves transitivity chains over <= *)
   554 
   554 
   555 fun trans_tac ctxt = SUBGOAL (fn (A, n) => fn st =>
   555 fun trans_tac ctxt = SUBGOAL (fn (A, n) => fn st =>
   556  let
   556  let
   557   val thy = Proof_Context.theory_of ctxt;
   557   val thy = Proof_Context.theory_of ctxt;
   558   val rfrees = map Free (Term.rename_wrt_term A (Logic.strip_params A));
   558   val rfrees = map Free (rev (Term.variant_frees A (Logic.strip_params A)));
   559   val Hs = map (fn H => subst_bounds (rfrees, H)) (Logic.strip_assums_hyp A);
   559   val Hs = map (fn H => subst_bounds (rfrees, H)) (Logic.strip_assums_hyp A);
   560   val C = subst_bounds (rfrees, Logic.strip_assums_concl A);
   560   val C = subst_bounds (rfrees, Logic.strip_assums_concl A);
   561   val lesss = flat (map_index (mkasm_trans thy o swap) Hs);
   561   val lesss = flat (map_index (mkasm_trans thy o swap) Hs);
   562   val prfs = solveLeTrans thy (lesss, C);
   562   val prfs = solveLeTrans thy (lesss, C);
   563 
   563 
   576 (* quasi_tac - solves quasi orders *)
   576 (* quasi_tac - solves quasi orders *)
   577 
   577 
   578 fun quasi_tac ctxt = SUBGOAL (fn (A, n) => fn st =>
   578 fun quasi_tac ctxt = SUBGOAL (fn (A, n) => fn st =>
   579  let
   579  let
   580   val thy = Proof_Context.theory_of ctxt
   580   val thy = Proof_Context.theory_of ctxt
   581   val rfrees = map Free (Term.rename_wrt_term A (Logic.strip_params A));
   581   val rfrees = map Free (rev (Term.variant_frees A (Logic.strip_params A)));
   582   val Hs = map (fn H => subst_bounds (rfrees, H)) (Logic.strip_assums_hyp A);
   582   val Hs = map (fn H => subst_bounds (rfrees, H)) (Logic.strip_assums_hyp A);
   583   val C = subst_bounds (rfrees, Logic.strip_assums_concl A);
   583   val C = subst_bounds (rfrees, Logic.strip_assums_concl A);
   584   val lesss = flat (map_index (mkasm_quasi thy o swap) Hs);
   584   val lesss = flat (map_index (mkasm_quasi thy o swap) Hs);
   585   val prfs = solveQuasiOrder thy (lesss, C);
   585   val prfs = solveQuasiOrder thy (lesss, C);
   586   val (subgoals, prf) = mkconcl_quasi thy C;
   586   val (subgoals, prf) = mkconcl_quasi thy C;