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

feat(data/set/finite): add lemmas relating definitions of infinite sets #18617

Closed

Conversation

dignissimus
Copy link
Collaborator

Add lemmas relating definitions of infinite sets

Includes the following lemmas

  • infinite.exists_nat_lt,
  • arb_large_infinite
  • infinite_iff_arb_large

Which state the following

lemma infinite.exists_nat_lt {s : set ℕ} (hs : s.infinite) (n : ℕ) : ∃ m ∈ s, n < m
lemma arb_large_infinite {S : set ℕ} : S.infinite → ∀ (n : ℕ ), ∃ (m : ℕ), (m ∈ S ∧ m > n)
lemma infinite_iff_arb_large {S : set ℕ } : S.infinite ↔ (∀ (n : ℕ ), ∃ (m : ℕ), (m ∈ S ∧ m > n))

Open in Gitpod

Includes the following lemmas
* `infinite.exists_nat_lt`,
* `arb_large_infinite`
* `infinite_iff_arb_large`

Which state the following

```lean
lemma infinite.exists_nat_lt {s : set ℕ} (hs : s.infinite) (n : ℕ) : ∃ m ∈ s, n < m
lemma arb_large_infinite {S : set ℕ} : S.infinite → ∀ (n : ℕ ), ∃ (m : ℕ), (m ∈ S ∧ m > n)
lemma infinite_iff_arb_large {S : set ℕ } : S.infinite ↔ (∀ (n : ℕ ), ∃ (m : ℕ), (m ∈ S ∧ m > n))
```
@dignissimus dignissimus changed the title Add lemmas relating definitions of infinite sets feat(data/finset): add lemmas relating definitions of infinite sets Mar 18, 2023
@eric-wieser eric-wieser changed the title feat(data/finset): add lemmas relating definitions of infinite sets feat(data/set/finite): add lemmas relating definitions of infinite sets Mar 18, 2023
Comment on lines +997 to +1002
lemma arb_large_infinite {S : set ℕ} : S.infinite → ∀ (n : ℕ ), ∃ (m : ℕ), (m ∈ S ∧ m > n) :=
begin
intros h n,
apply bex_def.mp,
apply set.infinite.exists_nat_lt h,
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lemma is pretty much identical to infinite.exists_nat_lt, so I don't think it's worth having.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After removing arb_large_infinite, could I then replace the definition of infinite_iff_arb_large with the following?

lemma infinite_iff_arb_large {S : set ℕ }  : S.infinite ↔ ∀ (n : ℕ ), ∃ (m : ℕ), (m ∈ S ∧ n < m) :=
  begin
    split,
    { intro hS,
    have exists_nat_lt := hS.exists_nat_lt,
    finish, },
    { exact infinite_exists_nat_lt, }
  end

apply set.infinite.exists_nat_lt h,
end

lemma infinite_exists_nat_lt {S : set ℕ} : (∀ (n : ℕ ), ∃ (m : ℕ), (m ∈ S ∧ m > n)) → S.infinite :=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be a better name and statement

Suggested change
lemma infinite_exists_nat_lt {S : set ℕ} : (∀ (n : ℕ ), ∃ (m : ℕ), (m ∈ S ∧ m > n)) → S.infinite :=
lemma infinite_of_forall_exists_nat_lt {S : set ℕ} (h : ∀ n, ∃ m ∈ s, n < m) : S.infinite :=

@eric-wieser eric-wieser added the t-order Order hierarchy label Mar 18, 2023
@eric-wieser
Copy link
Member

Oh, I'm afraid our CI doesn't run on forks. You'll need to ask on Zulip for permission to push directly to a branch in our repository, and then reopen this PR.

@dignissimus
Copy link
Collaborator Author

Sure, will do. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-order Order hierarchy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants