The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V03. Sets, finite structures and big operators

Mathlib.Data.Fintype.Pigeonhole

4 declarations. Mathlib docs · Source

Pigeonhole principles in finite types

Main declarations

We provide the following versions of the pigeonholes principle.

  • Fintype.exists_ne_map_eq_of_card_lt and isEmpty_of_card_lt: Finitely many pigeons and pigeonholes. Weak formulation.
  • Finite.exists_ne_map_eq_of_infinite: Infinitely many pigeons in finitely many pigeonholes. Weak formulation.
  • Finite.exists_infinite_fiber: Infinitely many pigeons in finitely many pigeonholes. Strong formulation.

Some more pigeonhole-like statements can be found in Data.Fintype.CardEmbedding.

theorem Fintype.exists_ne_map_eq_of_card_lt E3 #

∀ {α : Type u_1} {β : Type u_2} [inst : Fintype α] [inst_1 : Fintype β] (f : α → β),
  Fintype.card β < Fintype.card α → ∃ x y, x ≠ y ∧ f x = f y

The pigeonhole principle for finitely many pigeons and pigeonholes. This is the Fintype version of Finset.exists_ne_map_eq_of_card_lt_of_maps_to.

theorem Function.Embedding.isEmpty_of_card_lt E3 #

∀ {α : Type u_1} {β : Type u_2} [inst : Fintype α] [inst_1 : Fintype β],
  Fintype.card β < Fintype.card α → IsEmpty (α ↪ β)

If ‖β‖ < ‖α‖ there are no embeddings α ↪ β. This is a formulation of the pigeonhole principle.

Note this cannot be an instance as it needs h.

theorem Finite.exists_ne_map_eq_of_infinite E3 #

∀ {α : Sort u_3} {β : Sort u_4} [Infinite α] [Finite β] (f : α → β), ∃ x y, x ≠ y ∧ f x = f y

The pigeonhole principle for infinitely many pigeons in finitely many pigeonholes. If there are infinitely many pigeons in finitely many pigeonholes, then there are at least two pigeons in the same pigeonhole.

See also: Fintype.exists_ne_map_eq_of_card_lt, Finite.exists_infinite_fiber.

theorem Finite.exists_infinite_fiber E3 #

∀ {α : Type u_1} {β : Type u_2} [Infinite α] [Finite β] (f : α → β), ∃ y, Infinite ↑(f ⁻¹' {y})

The strong pigeonhole principle for infinitely many pigeons in finitely many pigeonholes. If there are infinitely many pigeons in finitely many pigeonholes, then there is a pigeonhole with infinitely many pigeons.

See also: Finite.exists_ne_map_eq_of_infinite