Skip to content
Snippets Groups Projects
Commit 296f00b9 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Add Pigeon Hole principle.

parent 2c67e517
Branches
Tags
1 merge request!373Add Pigeon Hole principle.
......@@ -419,3 +419,11 @@ Section sig_finite.
Lemma sig_card : card (sig P) = length (filter P (enum A)).
Proof. by rewrite <-list_filter_sig_filter, fmap_length. Qed.
End sig_finite.
Lemma finite_pigeon_hole `{Finite A} `{Finite B} (f : A B) :
card B < card A x1 x2, x1 x2 f x1 = f x2.
Proof.
intros. apply dec_stable; intros Heq.
cut (Inj eq eq f); [intros ?%inj_card; lia|].
intros x1 x2 ?. apply dec_stable. naive_solver.
Qed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment