-
Notifications
You must be signed in to change notification settings - Fork 299
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
Conversation
src/algebra/floor.lean
Outdated
@@ -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 := |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
src/algebra/floor.lean
Outdated
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 := |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question.
src/topology/algebra/floor_ring.lean
Outdated
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:ℤ):α), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use (b:α)+((1:ℤ):α), | |
use (b : α) + ((1 : ℤ) : α), |
src/topology/algebra/floor_ring.lean
Outdated
variables {α : Type*} [linear_ordered_ring α] [floor_ring α] | ||
|
||
lemma tendsto_floor_at_top : | ||
filter.tendsto (floor : α → ℤ) filter.at_top filter.at_top := |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
)
src/topology/algebra/floor_ring.lean
Outdated
exact (lt_add_one _).le | ||
end | ||
|
||
lemma tendsto_floor_at_bot : |
There was a problem hiding this comment.
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.
src/topology/algebra/floor_ring.lean
Outdated
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), _), |
There was a problem hiding this comment.
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.
src/topology/algebra/floor_ring.lean
Outdated
|
||
local notation `I` := (Icc 0 1 : set α) | ||
|
||
lemma continuous_on.comp_fract {β : Type*} [order_topology α] |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
bors merge
👎 Rejected by label |
@PatrickMassot Sorry I didn't think you would be so reactive, I just made a last small change in |
bors merge |
…`floor`, `ceil` and `fract` (#4042) From the sphere eversion project
Pull request successfully merged into master. Build succeeded: |
floor
, ceil
and fract
floor
, ceil
and fract
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