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

[Merged by Bors] - feat(data/set/intervals/infinite): intervals are infinite #4241

Closed
wants to merge 2 commits into from

Conversation

rwbarton
Copy link
Collaborator


@jcommelin jcommelin added the awaiting-review The author would like community review of the PR label Sep 24, 2020
@PatrickMassot
Copy link
Member

Should we have things like:

variables {α : Type*} [preorder α]

noncomputable
instance has_bot_of_finite [fintype α] [nonempty α] : has_bot α :=
⟨classical.some $ (fintype.well_founded_of_trans_of_irrefl _ : well_founded (@has_lt.lt α _)).has_min univ univ_nonempty⟩

lemma fintype.not_lt_bot [fintype α] [nonempty α] : ∀ x : α, ¬ x < ⊥ :=
begin
  classical,
  rcases classical.some_spec ((fintype.well_founded_of_trans_of_irrefl _ : well_founded (@has_lt.lt α _)).has_min univ univ_nonempty) with ⟨-, H⟩,
  exact λ x, H x trivial
end

(maybe not as a global instance) and the version with le for linear orders?

@PatrickMassot PatrickMassot added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Sep 25, 2020
@jcommelin
Copy link
Member

I think those should definitely not be global instances. Otherwise you'll get a lot of pain when using fin.

obtain ⟨m, -, hm⟩ : ∃ (m : Ioo a b) _,
∀ d ∈ univ, ¬ d < m := this.has_min univ ⟨⟨c, hc₁, hc₂⟩, trivial⟩,
obtain ⟨z, hz₁, hz₂⟩ : ∃ (z : α), a < z ∧ z < m := dense m.2.1,
refine hm ⟨z, hz₁, lt_trans hz₂ m.2.2⟩ trivial hz₂
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
refine hm ⟨z, hz₁, lt_trans hz₂ m.2.2⟩ trivial hz₂
exact hm ⟨z, hz₁, lt_trans hz₂ m.2.2⟩ trivial hz₂

obtain ⟨m, -, hm⟩ : ∃ (m : Iio b) _,
∀ d ∈ univ, ¬ d < m := this.has_min univ ⟨⟨c, hc⟩, trivial⟩,
obtain ⟨z, hz⟩ : ∃ (z : α), z < m := no_bot _,
refine hm ⟨z, lt_trans hz m.2⟩ trivial hz
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
refine hm ⟨z, lt_trans hz m.2⟩ trivial hz
exact hm ⟨z, lt_trans hz m.2⟩ trivial hz

@jcommelin
Copy link
Member

@PatrickMassot Would those definitions help in golfing these proofs?

@rwbarton rwbarton added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Sep 25, 2020
@rwbarton
Copy link
Collaborator Author

I refactored the proofs along the general lines of Patrick's suggestion.

@fpvandoorn
Copy link
Member

LGTM

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Sep 25, 2020
@jcommelin
Copy link
Member

bors wake up

@jcommelin
Copy link
Member

bors merge

@bryangingechen
Copy link
Collaborator

Hmm, bors seems to have crashed on this again. Third time's the charm?
bors r+

@bors
Copy link

bors bot commented Sep 26, 2020

Build failed (retrying...):

@bors
Copy link

bors bot commented Sep 26, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(data/set/intervals/infinite): intervals are infinite [Merged by Bors] - feat(data/set/intervals/infinite): intervals are infinite Sep 26, 2020
@bors bors bot closed this Sep 26, 2020
@bors bors bot deleted the intervals-infinite branch September 26, 2020 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants