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(topology/algebra/floor_ring): add basic topological facts about floor, ceil and fract #4042

Closed
wants to merge 4 commits into from

Conversation

ADedecker
Copy link
Member

From the sphere eversion project


The four first lemma of topology/algebra/floor_ring don't need a topology but I'm not sure where to put them

@ADedecker ADedecker added the awaiting-review The author would like community review of the PR label Sep 4, 2020
@@ -115,6 +116,9 @@ begin
exact ⟨floor_le v, lt_floor_add_one v⟩
end

lemma floor_eq_on_Ico (n : ℤ) : ∀ x ∈ (set.Ico n (n+1) : set α), (n : α) = floor x :=
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason to put the complicated version on the right-hand side? Did you need to rewrite in this direction?

Copy link
Member Author

@ADedecker ADedecker Sep 5, 2020

Choose a reason for hiding this comment

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

It's a bit easier to use with e.g tendsto_nhds_within_congr, which assumes you now the limit of the left side. But that's not that important, I prefer reversing it.

by rw [←ceil_le, ←int.cast_one, ←int.cast_sub, ←lt_ceil,
int.sub_one_lt_iff, le_antisymm_iff, and.comm]

lemma ceil_eq_on_Ioc (n : ℤ) : ∀ x ∈ (set.Ioc (n-1) n : set α), (n:α) = ceil x :=
Copy link
Member

Choose a reason for hiding this comment

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

Same question.

filter.tendsto (floor : α → ℤ) filter.at_top filter.at_top :=
begin
refine monotone.tendsto_at_top_at_top (λ a b hab, floor_mono hab) (λ b, _),
use (b:α)+((1:ℤ):α),
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
use (b:α)+((1:ℤ):α),
use (b : α) + ((1 : ℤ) : α),

variables {α : Type*} [linear_ordered_ring α] [floor_ring α]

lemma tendsto_floor_at_top :
filter.tendsto (floor : α → ℤ) filter.at_top filter.at_top :=
Copy link
Member

Choose a reason for hiding this comment

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

Why not opening the filter namespace and remove all those filter.?

filter.tendsto (floor : α → ℤ) filter.at_bot filter.at_bot :=
begin
refine monotone.tendsto_at_bot_at_bot (λ a b hab, floor_mono hab) (λ b, ⟨b, _⟩),
rw floor_coe
Copy link
Member

Choose a reason for hiding this comment

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

Should exact_mod_cast help you here? floor_coe sounds like the name of a norm_cast lemma.

Copy link
Member Author

Choose a reason for hiding this comment

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

It doesn't but that's not surprising : floor_coe isn't really a coe-manipulation lemma, it just says the floor of (the coe of) an integer is itself. Maybe floor_int would be a better name ? (Like the already-existing floor_add_int)

exact (lt_add_one _).le
end

lemma tendsto_floor_at_bot :
Copy link
Member

Choose a reason for hiding this comment

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

I'm sure all these lemmas name+statement will fit on one line after opening the filter namespace.

filter.tendsto (λ x, floor x : α → α) (𝓝[Ici n] n) (𝓝[Ici n] n) :=
tendsto_nhds_within_of_tendsto_nhds_of_eventually_within _ (tendsto_floor_right' _)
begin
refine (eventually_nhds_with_of_forall $ λ x (hx : ↑n ≤ x), _),
Copy link
Member

Choose a reason for hiding this comment

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

Is possible, please use type ascriptions instead of coercion arrows.


local notation `I` := (Icc 0 1 : set α)

lemma continuous_on.comp_fract {β : Type*} [order_topology α]
Copy link
Member

Choose a reason for hiding this comment

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

Did you try to deduce this lemma from the next one (with unit as a parameter space)? Or does it require so much plumbing that you don't gain anything?

@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 5, 2020
Copy link
Member

@PatrickMassot PatrickMassot left a comment

Choose a reason for hiding this comment

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

Thanks!
bors merge

@bors
Copy link

bors bot commented Sep 7, 2020

👎 Rejected by label

@github-actions github-actions bot added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label Sep 7, 2020
@ADedecker
Copy link
Member Author

@PatrickMassot Sorry I didn't think you would be so reactive, I just made a last small change in algebra/floor.lean. Fortunately bors hasn't started merging so you can still check if you are happy with it before merging it

@ADedecker ADedecker 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 ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) labels Sep 7, 2020
@robertylewis
Copy link
Member

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 7, 2020
bors bot pushed a commit that referenced this pull request Sep 7, 2020
…`floor`, `ceil` and `fract` (#4042)

From the sphere eversion project
@bors
Copy link

bors bot commented Sep 7, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(topology/algebra/floor_ring): add basic topological facts about floor, ceil and fract [Merged by Bors] - feat(topology/algebra/floor_ring): add basic topological facts about floor, ceil and fract Sep 7, 2020
@bors bors bot closed this Sep 7, 2020
@bors bors bot deleted the topology_floor_ring branch September 7, 2020 14:32
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

3 participants