Skip to content
Snippets Groups Projects

Strengthen `map_filter_strong_ext` and `map_filter_ext`.

Merged Dan Frumin requested to merge dfrumin/coq-stdpp:map_filter_strong_ext into master
All threads resolved!

I just added it as another lemma, but it is also possible to change "implies" to "iff" in the map_filter_strong_ext itself.

Edited by Dan Frumin

Merge request reports

Merge request pipeline #48222 passed

Merge request pipeline passed for 4100164d

Approval is optional

Merged by Robbert KrebbersRobbert Krebbers 3 years ago (Jun 6, 2021 9:25pm UTC)

Merge details

  • Changes merged into master with 86e53498.
  • Deleted the source branch.

Pipeline #48240 passed

Pipeline passed for 86e53498 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Wouldn't it make more sense to turn map_filter_strong_ext into a ? The only problem is that we don't have any other _ext lemma that are an , I think.

    We usually use lem_1 and lem_2 for versions of a lemma lem. So here the naming is off, since lem is one direction, and lem_2 the other.

    An alternative is to call this lemma map_filter_strong_ext_inv or something else.

    PS: Here's a short proof for the :

      Lemma map_filter_strong_ext (m1 m2 : M A) :
        filter P m1 = filter Q m2 
        ( i x, (P (i, x)  m1 !! i = Some x)  (Q (i, x)  m2 !! i = Some x)).
      Proof.
        intros. rewrite map_eq_iff. setoid_rewrite option_eq.
        setoid_rewrite map_filter_lookup_Some. naive_solver.
      Qed.
      Lemma map_filter_ext (m : M A) :
        filter P m = filter Q m 
        ( i x, m !! i = Some x  P (i, x)  Q (i, x)).
      Proof. rewrite map_filter_strong_ext. naive_solver. Qed.
  • Author Contributor

    setoid_rewrite! that's what i needed

  • Author Contributor

    I will update the PR

  • Dan Frumin added 1 commit

    added 1 commit

    Compare with previous version

  • Please update the MR title, and add a changelog entry.

  • Dan Frumin changed title from Add map_filter_strong_ext{-_2-}. to Strengthen map_filter_strong_ext{+ and map_filter_ext+}.

    changed title from Add map_filter_strong_ext{-_2-}. to Strengthen map_filter_strong_ext{+ and map_filter_ext+}.

  • Dan Frumin added 2 commits

    added 2 commits

    Compare with previous version

  • Author Contributor

    Updated!

  • Dan Frumin added 40 commits

    added 40 commits

    Compare with previous version

  • Robbert Krebbers resolved all threads

    resolved all threads

  • mentioned in commit 86e53498

  • @iris-users This is a breaking change:

    Make `map_filter_strong_ext` and `map_filter_ext` bidirectional.
  • Robbert Krebbers mentioned in merge request !290 (merged)

    mentioned in merge request !290 (merged)

  • Please register or sign in to reply
    Loading