Draft: Overlay for PR#15518
This is an overlay for Coq PR #15518: moving apply to the evar-based unifier.
This includes a breaking fix for apply of conjunction which has the unnatural behavior of trying Q -> P before P -> Q when applying a P <-> Q
hypothesis. I think the rest is backwards compatible: mostly about using eapply
in places where new existential are created, which the new apply
forbids (rightfully).
Merge request reports
Activity
3994 3994 Qed. 3995 3995 Lemma NoDup_fmap_2 `{!Inj (=) (=) f} l : NoDup l → NoDup (f <$> l). 3996 3996 Proof. apply NoDup_fmap_2_strong. intros ?? _ _. apply (inj f). Qed. 3997 Lemma NoDup_fmap `{!Inj (=) (=) f} l : NoDup (f <$> l) ↔ NoDup l. 3997 Lemma NoDup_fmap `{!Inj (=) (=) f} l : NoDup l ↔ NoDup (f <$> l). 1263 1263 m !! i = Some x → 1264 1264 P (i, x) → 1265 1265 filter P m !! i = Some x. 1266 Proof. intros. by apply map_filter_lookup_Some. Qed. 1266 Proof. intros. by apply (proj2 (map_filter_lookup_Some _ _ _)). Qed. 1021 1021 Lemma Qp_add_le_mono_r p q r : p ≤ q ↔ p + r ≤ q + r. 1022 1022 Proof. rewrite !(comm_L Qp_add _ r). apply Qp_add_le_mono_l. Qed. 1023 1023 Lemma Qp_add_le_mono q p n m : q ≤ n → p ≤ m → q + p ≤ n + m. 1024 Proof. intros. etrans; [by apply Qp_add_le_mono_l|by apply Qp_add_le_mono_r]. Qed. 1024 Proof. intros. etrans; [by eapply Qp_add_le_mono_l|by apply Qp_add_le_mono_r]. Qed. This includes a breaking fix for apply of conjunction which has the unnatural behavior of trying Q -> P before P -> Q when applying a
P <-> Q
hypothesis.Especially considering the
NoDup_fmap
example and the inconsistency withrewrite
, I'm not sure what's the "right" direction to try first. What's the reason why you favor left-to-right first over right-to-left first?The main issue I see is that if you apply
R A B
when R is a record the projections are tried in left to right order, while whenR
is only an inductive type with a single constructor they are tried right to left. It's just an unnecessary discrepancy inapply
's code. But let's leave it to another PR :) The new overlay doesn't change this anymore.@mattam82 it is not clear to us what the status of this MR is, but it doesn't seem to be immediately actionable on our side? We are going to close the MR, but feel free to reopen when you get back to this.