Skip to content

Commit

Permalink
genealized zmap_mapi_Proper_equal
Browse files Browse the repository at this point in the history
  • Loading branch information
vzaliva committed Nov 25, 2023
1 parent 7a7b96d commit c9cc090
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions coq/Proofs/ProofsAux.v
Original file line number Diff line number Diff line change
Expand Up @@ -286,19 +286,22 @@ Section ZMapAux.
(* Simple case *)
#[global] Instance zmap_mapi_Proper_equal
{A B : Type}
(f : ZMap.key -> A -> B)
:
Proper ((ZMap.Equal) ==> (ZMap.Equal)) (ZMap.mapi f).
Proper ((eq ==> eq ==> eq) ==>
(ZMap.Equal) ==> (ZMap.Equal)) (@ZMap.mapi A B ).
Proof.
intros a1 a2 H.
intros f1 f2 Ef a1 a2 H.
unfold ZMap.Equal in *.
intros k.
specialize (H k).
rewrite mapi_o.
rewrite mapi_o.
-
unfold option_map.
repeat break_match;invc H; reflexivity.
repeat break_match;invc H.
f_equiv.
apply Ef;reflexivity.
reflexivity.
-
intros x y e HF;rewrite HF;reflexivity.
-
Expand Down

0 comments on commit c9cc090

Please sign in to comment.