Subst refl 关闭重复的子目标。这是怎么回事?

Subst refl closing duplicate subgoals. What's going on?

this 线程中,Mathieu 演示了 subst refl 关闭了重复的子目标。 How/Why 是这样做的吗?

我不完全确定,但快速查看代码表明 subst 出于某种原因调用 distinct_subgoals_tac 并且不将其限制在它正在处理的子目标中:

fun eqsubst_tac ctxt occs thms i st =
  let val nprems = Thm.nprems_of st in
    if nprems < i then Seq.empty else
    let
      val thmseq = Seq.of_list thms;
      fun apply_occ occ st =
        thmseq |> Seq.maps (fn r =>
          eqsubst_tac' ctxt
            (skip_first_occs_search occ searchf_lr_unify_valid) r
            (i + (Thm.nprems_of st - nprems)) st);
      val sorted_occs = Library.sort (rev_order o int_ord) occs;
    in
      Seq.maps distinct_subgoals_tac (Seq.EVERY (map apply_occ sorted_occs) st)
    end
  end;

这对我来说似乎不是预期的行为——可能是对 subst 实施的疏忽。我会写一封电子邮件到邮件列表询问。