### optimize the step_by_value proof: Determine which case we are in, and call the appropriate tactic

parent 5f8cdc5f
 ... @@ -320,13 +320,24 @@ Proof. ... @@ -320,13 +320,24 @@ Proof. exists K''; by eauto using f_equal, f_equal2, f_equal3, v2e_inj. exists K''; by eauto using f_equal, f_equal2, f_equal3, v2e_inj. intros Hfill Hred Hnval. intros Hfill Hred Hnval. revert K' Hfill; induction K=>K' /= Hfill; Time revert K' Hfill; induction K=>K' /= Hfill; first (now eexists; reflexivity); first (now eexists; reflexivity); destruct K'; simpl; try discriminate Hfill; try first [ (destruct K'; simpl; bad_red Hfill e' Hred (* The first case is: K' is EmpyCtx. *) | bad_fill Hfill first (by bad_red Hfill e' Hred); | good Hfill IHK (* Many of the other cases result in contradicting equalities. *) ]. try discriminate Hfill; (* The remaining cases are "compatible" contexts - that result in the same head symbol of the expression. Test whether the context als has the same head, and use the appropriate tactic. *) match goal with | [ |- exists x, ?C _ = ?C _ ] => by good Hfill IHK | [ |- exists x, ?C _ _ = ?C _ _ ] => by good Hfill IHK | [ |- exists x, ?C _ _ _ = ?C _ _ _ ] => by good Hfill IHK | [ |- exists x, ?C _ _ _ _ = ?C _ _ _ _ ] => by good Hfill IHK | [ |- exists x, ?C _ _ _ _ _ = ?C _ _ _ _ _ ] => by good Hfill IHK | [ |- exists x, ?C _ _ _ _ _ _ = ?C _ _ _ _ _ _ ] => by good Hfill IHK | _ => by bad_fill Hfill end). Qed. Qed. End step_by_value. End step_by_value. ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!