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

Pigeonhole principle #2272

Closed
2 of 4 tasks
urkud opened this issue Mar 28, 2020 · 3 comments
Closed
2 of 4 tasks

Pigeonhole principle #2272

urkud opened this issue Mar 28, 2020 · 3 comments
Assignees
Labels
easy < 20s of review time. See the lifecycle page for guidelines. feature-request This issue is a feature request, either for mathematics, tactics, or CI

Comments

@urkud
Copy link
Member

urkud commented Mar 28, 2020

Formalize pigeonhole principles

All these principles easily follow from existing lemmas. I have some of them locally, will PR soon.

@kckennylau
Copy link
Collaborator

is the statement for fintype essentially that if \a \to \b is injective then card \a \le card \b?

@urkud
Copy link
Member Author

urkud commented May 28, 2020

@kckennylau Yes, and we already have this for finsets. But I'd like to have these wrappers:

variables {α : Type*} {β : Type*} [fintype α] [fintype β] (f : α → β)
example (h : card β < card α) : ∃ x y (h : x ≠ y), f x = f y := sorry
example (n : nat) (hn : n * card β < card α) : ∃ y : β, n < card (f ⁻¹' {y}) := sorry

@urkud urkud added the easy < 20s of review time. See the lifecycle page for guidelines. label May 28, 2020
@jalex-stark
Copy link
Collaborator

@kckennylau Yes, and we already have this for finsets. But I'd like to have these wrappers:

variables {α : Type*} {β : Type*} [fintype α] [fintype β] (f : α → β)
example (h : card β < card α) : ∃ x y (h : x ≠ y), f x = f y := sorry
example (n : nat) (hn : n * card β < card α) : ∃ y : β, n < card (f ⁻¹' {y}) := sorry

like this? the sorry is supposed to be filled by pigeonhole for finset. where does that live?

example (h : card β < card α) : ∃ x y (h : x ≠ y), f x = f y := 
begin
  set x := elems α,
  set y := elems β,
  have key : ∃ a a' ∈ x, a ≠ a' ∧ f a = f a' := sorry,
  rcases key with ⟨ a, a', _, _, h1, h2⟩,
  use [a, a'], split; assumption,
end

@kmill kmill linked a pull request Sep 10, 2020 that will close this issue
@bors bors bot closed this as completed in 1b97326 Oct 1, 2020
adomani pushed a commit that referenced this issue Oct 7, 2020
Add pigeonhole principles for finitely and infinitely many pigeons in finitely many holes. There are also strong versions of these, which say that there is a hole containing at least as many pigeons as the average number of pigeons per hole. Fixes #2272.



Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy < 20s of review time. See the lifecycle page for guidelines. feature-request This issue is a feature request, either for mathematics, tactics, or CI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants