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

*爱你&永不变心* 提交于 2021-01-27 19:06:26

问题


In this thread Mathieu demonstrates that subst refl closes duplicate subgoals. How/Why is it doing that?


回答1:


I'm not completely sure, but a quick look at the code suggests that subst calls distinct_subgoals_tac for some reason and does not restrict it to the subgoal it is working on:

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;

That does not seem like intended behaviour to me – probably an oversight in the implementation of subst. I'll write an email to the mailing list to ask about it.



来源:https://stackoverflow.com/questions/63657976/subst-refl-closing-duplicate-subgoals-whats-going-on

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!