Require Export Coq.Program.Tactics.
Require Export Coq.Program.Equality.
Require Export Coq.Logic.FunctionalExtensionality.
Require Export Coq.Logic.ProofIrrelevance.
Definition equal_f : ∀ {A B : Type} {f g : A → B}, f = g → ∀ x : A, f x = g x.
Hint Extern 2 (exist ?A _ _ = exist ?A _ _) => apply sig_proof_irrelevance.
(* Automating use of functional_extensionality *)
Ltac FunExt :=
progress (
repeat (
match goal with
[|- _ = _] =>
let x := fresh "x" in
extensionality x
end
)
)
.
Hint Extern 1 => FunExt.

(* Specifications: *)
Lemma pair_eq (A B : Type) (a b : A * B) : fst a = fst b → snd a = snd b → a = b.
Hint Resolve pair_eq.