Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It should be easy to rewrite under binders with function extensionality #41

Open
JasonGross opened this issue Aug 16, 2018 · 1 comment

Comments

@JasonGross
Copy link
Member

Version

8.9+alpha

Description of the problem

I would like to see a standard library file which depends on the axiom of function extensionality and registers the typeclass instances required to rewrite under binders with eq. I think the relevant instance might be subrelation R eq -> subrelation (pointwise_relation _ R) eq, but I'm not 100% sure.

cc @mattam82

@SkySkimmer
Copy link
Contributor

Require Import Setoid Morphisms FunctionalExtensionality.

Local Instance foo'
  : forall A B C f, Proper (pointwise_relation A (@eq B) ==> (@eq C)) f.
Proof.
  cbv. intros.
  f_equal.
  apply functional_extensionality.
  exact H.
Qed.

Lemma bar (P:(nat -> nat) -> Prop) : P (fun x => x + 0) -> P (fun x => x).
Proof.
  setoid_rewrite <-plus_n_O.

seems to work

@proux01 proux01 transferred this issue from rocq-prover/rocq Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants