Skip to content

Commit

Permalink
Add prod_rect_nodep_eta (mit-plv#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonGross committed Dec 7, 2023
1 parent 026f87b commit 3a0a5f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Rewriter/Util/Prod.v
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ Definition prod_rect_nodep {A B P} : (A -> B -> P) -> A * B -> P
[prod_rect] ought not be much more complicated than any of these *)
Global Strategy expand [prod_rect_nodep].

Lemma prod_rect_nodep_eta {A B C} f p : @prod_rect_nodep A B C f p = f (fst p) (snd p).
Proof. case p; reflexivity. Qed.

Definition fst_pair {A B} (a:A) (b:B) : fst (a,b) = a := eq_refl.
Definition snd_pair {A B} (a:A) (b:B) : snd (a,b) = b := eq_refl.
Create HintDb cancel_pair discriminated. #[global] Hint Rewrite @fst_pair @snd_pair : cancel_pair.
Expand Down

0 comments on commit 3a0a5f7

Please sign in to comment.