statement
stringlengths
1
2.88k
proof
stringlengths
0
13.9k
type
stringclasses
10 values
symbolic_name
stringlengths
1
131
library
stringclasses
417 values
filename
stringlengths
17
80
imports
listlengths
0
16
deps
listlengths
0
64
docstring
stringlengths
0
10.2k
source_url
stringclasses
1 value
commit
stringclasses
1 value
exists_nat_one_div_lt {ε : α} (hε : 0 < ε) : ∃ n : ℕ, 1 / (n + 1: α) < ε
begin cases exists_nat_gt (1/ε) with n hn, use n, rw [div_lt_iff, ← div_lt_iff' hε], { apply hn.trans, simp [zero_lt_one] }, { exact n.cast_add_one_pos } end
theorem
exists_nat_one_div_lt
algebra.order
src/algebra/order/archimedean.lean
[ "data.int.least_greatest", "data.rat.floor" ]
[ "div_lt_iff", "div_lt_iff'", "exists_nat_gt", "zero_lt_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
exists_pos_rat_lt {x : α} (x0 : 0 < x) : ∃ q : ℚ, 0 < q ∧ (q : α) < x
by simpa only [rat.cast_pos] using exists_rat_btwn x0
theorem
exists_pos_rat_lt
algebra.order
src/algebra/order/archimedean.lean
[ "data.int.least_greatest", "data.rat.floor" ]
[ "exists_rat_btwn", "rat.cast_pos" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
exists_rat_near (x : α) (ε0 : 0 < ε) : ∃ q : ℚ, |x - q| < ε
let ⟨q, h₁, h₂⟩ := exists_rat_btwn $ ((sub_lt_self_iff x).2 ε0).trans ((lt_add_iff_pos_left x).2 ε0) in ⟨q, abs_sub_lt_iff.2 ⟨sub_lt_comm.1 h₁, sub_lt_iff_lt_add.2 h₂⟩⟩
lemma
exists_rat_near
algebra.order
src/algebra/order/archimedean.lean
[ "data.int.least_greatest", "data.rat.floor" ]
[ "exists_rat_btwn" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
archimedean_iff_nat_lt : archimedean α ↔ ∀ x : α, ∃ n : ℕ, x < n
⟨@exists_nat_gt α _, λ H, ⟨λ x y y0, (H (x / y)).imp $ λ n h, le_of_lt $ by rwa [div_lt_iff y0, ← nsmul_eq_mul] at h⟩⟩
lemma
archimedean_iff_nat_lt
algebra.order
src/algebra/order/archimedean.lean
[ "data.int.least_greatest", "data.rat.floor" ]
[ "archimedean", "div_lt_iff", "exists_nat_gt", "nsmul_eq_mul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
archimedean_iff_nat_le : archimedean α ↔ ∀ x : α, ∃ n : ℕ, x ≤ n
archimedean_iff_nat_lt.trans ⟨λ H x, (H x).imp $ λ _, le_of_lt, λ H x, let ⟨n, h⟩ := H x in ⟨n+1, lt_of_le_of_lt h (nat.cast_lt.2 (lt_add_one _))⟩⟩
lemma
archimedean_iff_nat_le
algebra.order
src/algebra/order/archimedean.lean
[ "data.int.least_greatest", "data.rat.floor" ]
[ "archimedean", "lt_add_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
archimedean_iff_int_lt : archimedean α ↔ ∀ x : α, ∃ n : ℤ, x < n
⟨@exists_int_gt α _, begin rw archimedean_iff_nat_lt, intros h x, obtain ⟨n, h⟩ := h x, refine ⟨n.to_nat, h.trans_le _⟩, exact_mod_cast int.le_to_nat _, end⟩
lemma
archimedean_iff_int_lt
algebra.order
src/algebra/order/archimedean.lean
[ "data.int.least_greatest", "data.rat.floor" ]
[ "archimedean", "archimedean_iff_nat_lt", "exists_int_gt", "int.le_to_nat" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
archimedean_iff_int_le : archimedean α ↔ ∀ x : α, ∃ n : ℤ, x ≤ n
archimedean_iff_int_lt.trans ⟨λ H x, (H x).imp $ λ _, le_of_lt, λ H x, let ⟨n, h⟩ := H x in ⟨n+1, lt_of_le_of_lt h (int.cast_lt.2 (lt_add_one _))⟩⟩
lemma
archimedean_iff_int_le
algebra.order
src/algebra/order/archimedean.lean
[ "data.int.least_greatest", "data.rat.floor" ]
[ "archimedean", "lt_add_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
archimedean_iff_rat_lt : archimedean α ↔ ∀ x : α, ∃ q : ℚ, x < q
⟨@exists_rat_gt α _, λ H, archimedean_iff_nat_lt.2 $ λ x, let ⟨q, h⟩ := H x in ⟨⌈q⌉₊, lt_of_lt_of_le h $ by simpa only [rat.cast_coe_nat] using (@rat.cast_le α _ _ _).2 (nat.le_ceil _)⟩⟩
lemma
archimedean_iff_rat_lt
algebra.order
src/algebra/order/archimedean.lean
[ "data.int.least_greatest", "data.rat.floor" ]
[ "archimedean", "exists_rat_gt", "nat.le_ceil", "rat.cast_coe_nat", "rat.cast_le" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
archimedean_iff_rat_le : archimedean α ↔ ∀ x : α, ∃ q : ℚ, x ≤ q
archimedean_iff_rat_lt.trans ⟨λ H x, (H x).imp $ λ _, le_of_lt, λ H x, let ⟨n, h⟩ := H x in ⟨n+1, lt_of_le_of_lt h (rat.cast_lt.2 (lt_add_one _))⟩⟩
lemma
archimedean_iff_rat_le
algebra.order
src/algebra/order/archimedean.lean
[ "data.int.least_greatest", "data.rat.floor" ]
[ "archimedean", "lt_add_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
archimedean.floor_ring (α) [linear_ordered_ring α] [archimedean α] : floor_ring α
floor_ring.of_floor α (λ a, classical.some (exists_floor a)) (λ z a, (classical.some_spec (exists_floor a) z).symm)
def
archimedean.floor_ring
algebra.order
src/algebra/order/archimedean.lean
[ "data.int.least_greatest", "data.rat.floor" ]
[ "archimedean", "exists_floor", "floor_ring", "floor_ring.of_floor", "linear_ordered_ring" ]
A linear ordered archimedean ring is a floor ring. This is not an `instance` because in some cases we have a computable `floor` function.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_ring.archimedean (α) [linear_ordered_field α] [floor_ring α] : archimedean α
begin rw archimedean_iff_int_le, exact λ x, ⟨⌈x⌉, int.le_ceil x⟩ end
instance
floor_ring.archimedean
algebra.order
src/algebra/order/archimedean.lean
[ "data.int.least_greatest", "data.rat.floor" ]
[ "archimedean", "archimedean_iff_int_le", "floor_ring", "int.le_ceil", "linear_ordered_field" ]
A linear ordered field that is a floor ring is archimedean.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
monovary_on.sum_smul_sum_le_card_smul_sum (hfg : monovary_on f g s) : (∑ i in s, f i) • ∑ i in s, g i ≤ s.card • ∑ i in s, f i • g i
begin classical, obtain ⟨σ, hσ, hs⟩ := s.countable_to_set.exists_cycle_on, rw [←card_range s.card, sum_smul_sum_eq_sum_perm hσ], exact sum_le_card_nsmul _ _ _ (λ n _, hfg.sum_smul_comp_perm_le_sum_smul $ λ x hx, hs $ λ h, hx $ is_fixed_pt.perm_pow h _), end
lemma
monovary_on.sum_smul_sum_le_card_smul_sum
algebra.order
src/algebra/order/chebyshev.lean
[ "algebra.big_operators.order", "algebra.order.rearrangement", "group_theory.perm.cycle.basic" ]
[ "monovary_on" ]
**Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both monotone/antitone), the scalar product of their sum is less than the size of the set times their scalar product.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
antivary_on.card_smul_sum_le_sum_smul_sum (hfg : antivary_on f g s) : s.card • ∑ i in s, f i • g i ≤ (∑ i in s, f i) • ∑ i in s, g i
by convert hfg.dual_right.sum_smul_sum_le_card_smul_sum
lemma
antivary_on.card_smul_sum_le_sum_smul_sum
algebra.order
src/algebra/order/chebyshev.lean
[ "algebra.big_operators.order", "algebra.order.rearrangement", "group_theory.perm.cycle.basic" ]
[ "antivary_on" ]
**Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the other is antitone), the scalar product of their sum is less than the size of the set times their scalar product.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
monovary.sum_smul_sum_le_card_smul_sum (hfg : monovary f g) : (∑ i, f i) • ∑ i, g i ≤ fintype.card ι • ∑ i, f i • g i
(hfg.monovary_on _).sum_smul_sum_le_card_smul_sum
lemma
monovary.sum_smul_sum_le_card_smul_sum
algebra.order
src/algebra/order/chebyshev.lean
[ "algebra.big_operators.order", "algebra.order.rearrangement", "group_theory.perm.cycle.basic" ]
[ "fintype.card", "monovary" ]
**Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both monotone/antitone), the scalar product of their sum is less than the size of the set times their scalar product.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
antivary.card_smul_sum_le_sum_smul_sum (hfg : antivary f g) : fintype.card ι • ∑ i, f i • g i ≤ (∑ i, f i) • ∑ i, g i
by convert (hfg.dual_right.monovary_on _).sum_smul_sum_le_card_smul_sum
lemma
antivary.card_smul_sum_le_sum_smul_sum
algebra.order
src/algebra/order/chebyshev.lean
[ "algebra.big_operators.order", "algebra.order.rearrangement", "group_theory.perm.cycle.basic" ]
[ "antivary", "fintype.card" ]
**Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the other is antitone), the scalar product of their sum is less than the size of the set times their scalar product.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
monovary_on.sum_mul_sum_le_card_mul_sum (hfg : monovary_on f g s) : (∑ i in s, f i) * (∑ i in s, g i) ≤ s.card * ∑ i in s, f i * g i
by { rw ←nsmul_eq_mul, exact hfg.sum_smul_sum_le_card_smul_sum }
lemma
monovary_on.sum_mul_sum_le_card_mul_sum
algebra.order
src/algebra/order/chebyshev.lean
[ "algebra.big_operators.order", "algebra.order.rearrangement", "group_theory.perm.cycle.basic" ]
[ "monovary_on" ]
**Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both monotone/antitone), the product of their sum is less than the size of the set times their scalar product.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
antivary_on.card_mul_sum_le_sum_mul_sum (hfg : antivary_on f g s) : (s.card : α) * ∑ i in s, f i * g i ≤ (∑ i in s, f i) * (∑ i in s, g i)
by { rw ←nsmul_eq_mul, exact hfg.card_smul_sum_le_sum_smul_sum }
lemma
antivary_on.card_mul_sum_le_sum_mul_sum
algebra.order
src/algebra/order/chebyshev.lean
[ "algebra.big_operators.order", "algebra.order.rearrangement", "group_theory.perm.cycle.basic" ]
[ "antivary_on" ]
**Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the other is antitone), the product of their sum is greater than the size of the set times their scalar product.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sq_sum_le_card_mul_sum_sq : (∑ i in s, f i)^2 ≤ s.card * ∑ i in s, f i ^ 2
by { simp_rw sq, exact (monovary_on_self _ _).sum_mul_sum_le_card_mul_sum }
lemma
sq_sum_le_card_mul_sum_sq
algebra.order
src/algebra/order/chebyshev.lean
[ "algebra.big_operators.order", "algebra.order.rearrangement", "group_theory.perm.cycle.basic" ]
[ "monovary_on_self" ]
Special case of **Chebyshev's Sum Inequality** or the **Cauchy-Schwarz Inequality**: The square of the sum is less than the size of the set times the sum of the squares.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
monovary.sum_mul_sum_le_card_mul_sum (hfg : monovary f g) : (∑ i, f i) * (∑ i, g i) ≤ fintype.card ι * ∑ i, f i * g i
(hfg.monovary_on _).sum_mul_sum_le_card_mul_sum
lemma
monovary.sum_mul_sum_le_card_mul_sum
algebra.order
src/algebra/order/chebyshev.lean
[ "algebra.big_operators.order", "algebra.order.rearrangement", "group_theory.perm.cycle.basic" ]
[ "fintype.card", "monovary" ]
**Chebyshev's Sum Inequality**: When `f` and `g` monovary together (eg they are both monotone/antitone), the product of their sum is less than the size of the set times their scalar product.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
antivary.card_mul_sum_le_sum_mul_sum (hfg : antivary f g) : (fintype.card ι : α) * ∑ i, f i * g i ≤ (∑ i, f i) * (∑ i, g i)
(hfg.antivary_on _).card_mul_sum_le_sum_mul_sum
lemma
antivary.card_mul_sum_le_sum_mul_sum
algebra.order
src/algebra/order/chebyshev.lean
[ "algebra.big_operators.order", "algebra.order.rearrangement", "group_theory.perm.cycle.basic" ]
[ "antivary", "fintype.card" ]
**Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the other is antitone), the product of their sum is less than the size of the set times their scalar product.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sum_div_card_sq_le_sum_sq_div_card : ((∑ i in s, f i) / s.card) ^ 2 ≤ (∑ i in s, f i ^ 2) / s.card
begin obtain rfl | hs := s.eq_empty_or_nonempty, { simp }, rw [←card_pos, ←@nat.cast_pos α] at hs, rw [div_pow, div_le_div_iff (sq_pos_of_ne_zero _ hs.ne') hs, sq (s.card : α), mul_left_comm, ←mul_assoc], exact mul_le_mul_of_nonneg_right (sq_sum_le_card_mul_sum_sq) hs.le, end
lemma
sum_div_card_sq_le_sum_sq_div_card
algebra.order
src/algebra/order/chebyshev.lean
[ "algebra.big_operators.order", "algebra.order.rearrangement", "group_theory.perm.cycle.basic" ]
[ "div_le_div_iff", "div_pow", "mul_le_mul_of_nonneg_right", "mul_left_comm", "nat.cast_pos", "sq_pos_of_ne_zero", "sq_sum_le_card_mul_sum_sq" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
conditionally_complete_linear_ordered_field (α : Type*) extends linear_ordered_field α renaming max → sup min → inf, conditionally_complete_linear_order α
class
conditionally_complete_linear_ordered_field
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "conditionally_complete_linear_order", "linear_ordered_field" ]
A field which is both linearly ordered and conditionally complete with respect to the order. This axiomatizes the reals.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
conditionally_complete_linear_ordered_field.to_archimedean [conditionally_complete_linear_ordered_field α] : archimedean α
archimedean_iff_nat_lt.2 begin by_contra' h, obtain ⟨x, h⟩ := h, have := cSup_le (range_nonempty (coe : ℕ → α)) (forall_range_iff.2 $ λ n, le_sub_iff_add_le.2 $ le_cSup ⟨x, forall_range_iff.2 h⟩ ⟨n + 1, nat.cast_succ n⟩), linarith, end
instance
conditionally_complete_linear_ordered_field.to_archimedean
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "archimedean", "cSup_le", "conditionally_complete_linear_ordered_field", "le_cSup", "nat.cast_succ" ]
Any conditionally complete linearly ordered field is archimedean.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
cut_map (a : α) : set β
(coe : ℚ → β) '' {t | ↑t < a}
def
linear_ordered_field.cut_map
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[]
The lower cut of rationals inside a linear ordered field that are less than a given element of another linear ordered field.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
cut_map_mono (h : a₁ ≤ a₂) : cut_map β a₁ ⊆ cut_map β a₂
image_subset _ $ λ _, h.trans_lt'
lemma
linear_ordered_field.cut_map_mono
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_cut_map_iff : b ∈ cut_map β a ↔ ∃ q : ℚ, (q : α) < a ∧ (q : β) = b
iff.rfl
lemma
linear_ordered_field.mem_cut_map_iff
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_mem_cut_map_iff [char_zero β] : (q : β) ∈ cut_map β a ↔ (q : α) < a
rat.cast_injective.mem_set_image
lemma
linear_ordered_field.coe_mem_cut_map_iff
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "char_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
cut_map_self (a : α) : cut_map α a = Iio a ∩ range (coe : ℚ → α)
begin ext, split, { rintro ⟨q, h, rfl⟩, exact ⟨h, q, rfl⟩ }, { rintro ⟨h, q, rfl⟩, exact ⟨q, h, rfl⟩ } end
lemma
linear_ordered_field.cut_map_self
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
cut_map_coe (q : ℚ) : cut_map β (q : α) = coe '' {r : ℚ | (r : β) < q}
by simp_rw [cut_map, rat.cast_lt]
lemma
linear_ordered_field.cut_map_coe
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "rat.cast_lt" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
cut_map_nonempty (a : α) : (cut_map β a).nonempty
nonempty.image _ $ exists_rat_lt a
lemma
linear_ordered_field.cut_map_nonempty
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "exists_rat_lt" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
cut_map_bdd_above (a : α) : bdd_above (cut_map β a)
begin obtain ⟨q, hq⟩ := exists_rat_gt a, exact ⟨q, ball_image_iff.2 $ λ r hr, by exact_mod_cast (hq.trans' hr).le⟩, end
lemma
linear_ordered_field.cut_map_bdd_above
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "bdd_above", "exists_rat_gt" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
cut_map_add (a b : α) : cut_map β (a + b) = cut_map β a + cut_map β b
begin refine (image_subset_iff.2 $ λ q hq, _).antisymm _, { rw [mem_set_of_eq, ←sub_lt_iff_lt_add] at hq, obtain ⟨q₁, hq₁q, hq₁ab⟩ := exists_rat_btwn hq, refine ⟨q₁, q - q₁, _, _, add_sub_cancel'_right _ _⟩; try {norm_cast}; rwa coe_mem_cut_map_iff, exact_mod_cast sub_lt_comm.mp hq₁q }, { rintro _ ⟨_,...
lemma
linear_ordered_field.cut_map_add
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "exists_rat_btwn" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
induced_map (x : α) : β
Sup $ cut_map β x
def
linear_ordered_field.induced_map
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "induced_map" ]
The induced order preserving function from a linear ordered field to a conditionally complete linear ordered field, defined by taking the Sup in the codomain of all the rationals less than the input.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
induced_map_mono : monotone (induced_map α β)
λ a b h, cSup_le_cSup (cut_map_bdd_above β _) (cut_map_nonempty β _) (cut_map_mono β h)
lemma
linear_ordered_field.induced_map_mono
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "cSup_le_cSup", "induced_map", "monotone" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
induced_map_rat (q : ℚ) : induced_map α β (q : α) = q
begin refine cSup_eq_of_forall_le_of_forall_lt_exists_gt (cut_map_nonempty β q) (λ x h, _) (λ w h, _), { rw cut_map_coe at h, obtain ⟨r, h, rfl⟩ := h, exact le_of_lt h }, { obtain ⟨q', hwq, hq⟩ := exists_rat_btwn h, rw cut_map_coe, exact ⟨q', ⟨_, hq, rfl⟩, hwq⟩ } end
lemma
linear_ordered_field.induced_map_rat
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "cSup_eq_of_forall_le_of_forall_lt_exists_gt", "exists_rat_btwn", "induced_map" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
induced_map_zero : induced_map α β 0 = 0
by exact_mod_cast induced_map_rat α β 0
lemma
linear_ordered_field.induced_map_zero
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "induced_map" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
induced_map_one : induced_map α β 1 = 1
by exact_mod_cast induced_map_rat α β 1
lemma
linear_ordered_field.induced_map_one
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "induced_map" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
induced_map_nonneg (ha : 0 ≤ a) : 0 ≤ induced_map α β a
(induced_map_zero α _).ge.trans $ induced_map_mono _ _ ha
lemma
linear_ordered_field.induced_map_nonneg
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "induced_map" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_lt_induced_map_iff : (q : β) < induced_map α β a ↔ (q : α) < a
begin refine ⟨λ h, _, λ hq, _⟩, { rw ←induced_map_rat α at h, exact (induced_map_mono α β).reflect_lt h }, { obtain ⟨q', hq, hqa⟩ := exists_rat_btwn hq, apply lt_cSup_of_lt (cut_map_bdd_above β a) (coe_mem_cut_map_iff.mpr hqa), exact_mod_cast hq } end
lemma
linear_ordered_field.coe_lt_induced_map_iff
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "exists_rat_btwn", "induced_map", "lt_cSup_of_lt" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lt_induced_map_iff : b < induced_map α β a ↔ ∃ q : ℚ, b < q ∧ (q : α) < a
⟨λ h, (exists_rat_btwn h).imp $ λ q, and.imp_right coe_lt_induced_map_iff.1, λ ⟨q, hbq, hqa⟩, hbq.trans $ by rwa coe_lt_induced_map_iff⟩
lemma
linear_ordered_field.lt_induced_map_iff
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "and.imp_right", "exists_rat_btwn", "induced_map" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
induced_map_self (b : β) : induced_map β β b = b
eq_of_forall_rat_lt_iff_lt $ λ q, coe_lt_induced_map_iff
lemma
linear_ordered_field.induced_map_self
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "eq_of_forall_rat_lt_iff_lt", "induced_map" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
induced_map_induced_map (a : α) : induced_map β γ (induced_map α β a) = induced_map α γ a
eq_of_forall_rat_lt_iff_lt $ λ q, by rw [coe_lt_induced_map_iff, coe_lt_induced_map_iff, iff.comm, coe_lt_induced_map_iff]
lemma
linear_ordered_field.induced_map_induced_map
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "eq_of_forall_rat_lt_iff_lt", "induced_map" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
induced_map_inv_self (b : β) : induced_map γ β (induced_map β γ b) = b
by rw [induced_map_induced_map, induced_map_self]
lemma
linear_ordered_field.induced_map_inv_self
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "induced_map" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
induced_map_add (x y : α) : induced_map α β (x + y) = induced_map α β x + induced_map α β y
begin rw [induced_map, cut_map_add], exact cSup_add (cut_map_nonempty β x) (cut_map_bdd_above β x) (cut_map_nonempty β y) (cut_map_bdd_above β y), end
lemma
linear_ordered_field.induced_map_add
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "induced_map" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
le_induced_map_mul_self_of_mem_cut_map (ha : 0 < a) (b : β) (hb : b ∈ cut_map β (a * a)) : b ≤ induced_map α β a * induced_map α β a
begin obtain ⟨q, hb, rfl⟩ := hb, obtain ⟨q', hq', hqq', hqa⟩ := exists_rat_pow_btwn two_ne_zero hb (mul_self_pos.2 ha.ne'), transitivity (q' : β)^2, exact_mod_cast hqq'.le, rw pow_two at ⊢ hqa, exact mul_self_le_mul_self (by exact_mod_cast hq'.le) (le_cSup (cut_map_bdd_above β a) $ coe_mem_cut_map_iff.2...
lemma
linear_ordered_field.le_induced_map_mul_self_of_mem_cut_map
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "induced_map", "le_cSup", "lt_of_mul_self_lt_mul_self", "mul_self_le_mul_self", "pow_two", "two_ne_zero" ]
Preparatory lemma for `induced_ring_hom`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
exists_mem_cut_map_mul_self_of_lt_induced_map_mul_self (ha : 0 < a) (b : β) (hba : b < induced_map α β a * induced_map α β a) : ∃ c ∈ cut_map β (a * a), b < c
begin obtain hb | hb := lt_or_le b 0, { refine ⟨0, _, hb⟩, rw [←rat.cast_zero, coe_mem_cut_map_iff, rat.cast_zero], exact mul_self_pos.2 ha.ne' }, obtain ⟨q, hq, hbq, hqa⟩ := exists_rat_pow_btwn two_ne_zero hba (hb.trans_lt hba), rw ←cast_pow at hbq, refine ⟨(q^2 : ℚ), coe_mem_cut_map_iff.2 _, hbq⟩, ...
lemma
linear_ordered_field.exists_mem_cut_map_mul_self_of_lt_induced_map_mul_self
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "induced_map", "lt_of_mul_self_lt_mul_self", "mul_self_lt_mul_self", "pow_two", "rat.cast_zero", "two_ne_zero" ]
Preparatory lemma for `induced_ring_hom`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
induced_add_hom : α →+ β
⟨induced_map α β, induced_map_zero α β, induced_map_add α β⟩
def
linear_ordered_field.induced_add_hom
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[]
`induced_map` as an additive homomorphism.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
induced_order_ring_hom : α →+*o β
{ monotone' := induced_map_mono _ _, ..(induced_add_hom α β).mk_ring_hom_of_mul_self_of_two_ne_zero -- reduce to the case of x = y begin -- reduce to the case of 0 < x suffices : ∀ x, 0 < x → induced_add_hom α β (x * x) = induced_add_hom α β x * induced_add_hom α β x, { rintro x, ...
def
linear_ordered_field.induced_order_ring_hom
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "cSup_eq_of_forall_le_of_forall_lt_exists_gt", "mul_neg", "mul_zero", "neg_mul" ]
`induced_map` as an `order_ring_hom`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
induced_order_ring_iso : β ≃+*o γ
{ inv_fun := induced_map γ β, left_inv := induced_map_inv_self _ _, right_inv := induced_map_inv_self _ _, map_le_map_iff' := λ x y, begin refine ⟨λ h, _, λ h, induced_map_mono _ _ h⟩, simpa [induced_order_ring_hom, add_monoid_hom.mk_ring_hom_of_mul_self_of_two_ne_zero, induced_add_hom] using induce...
def
linear_ordered_field.induced_order_ring_iso
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "add_monoid_hom.mk_ring_hom_of_mul_self_of_two_ne_zero", "induced_map", "inv_fun" ]
The isomorphism of ordered rings between two conditionally complete linearly ordered fields.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_induced_order_ring_iso : ⇑(induced_order_ring_iso β γ) = induced_map β γ
rfl
lemma
linear_ordered_field.coe_induced_order_ring_iso
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "induced_map" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
induced_order_ring_iso_symm : (induced_order_ring_iso β γ).symm = induced_order_ring_iso γ β
rfl
lemma
linear_ordered_field.induced_order_ring_iso_symm
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
induced_order_ring_iso_self : induced_order_ring_iso β β = order_ring_iso.refl β
order_ring_iso.ext induced_map_self
lemma
linear_ordered_field.induced_order_ring_iso_self
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "order_ring_iso.ext", "order_ring_iso.refl" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ring_hom_monotone (hR : ∀ r : R, 0 ≤ r → ∃ s : R, s^2 = r) (f : R →+* S) : monotone f
(monotone_iff_map_nonneg f).2 $ λ r h, by { obtain ⟨s, rfl⟩ := hR r h, rw map_pow, apply sq_nonneg }
lemma
ring_hom_monotone
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "map_pow", "monotone", "monotone_iff_map_nonneg", "sq_nonneg" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
real.ring_hom.unique : unique (ℝ →+* ℝ)
{ default := ring_hom.id ℝ, uniq := λ f, congr_arg order_ring_hom.to_ring_hom (subsingleton.elim ⟨f, ring_hom_monotone (λ r hr, ⟨real.sqrt r, sq_sqrt hr⟩) f⟩ default), }
instance
real.ring_hom.unique
algebra.order
src/algebra/order/complete_field.lean
[ "algebra.order.hom.ring", "algebra.order.pointwise", "analysis.special_functions.pow.real" ]
[ "ring_hom.id", "ring_hom_monotone", "unique" ]
There exists no nontrivial ring homomorphism `ℝ →+* ℝ`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_euclidean : Prop
(map_lt_map_iff' : ∀ {x y}, abv x < abv y ↔ x ≺ y)
structure
absolute_value.is_euclidean
algebra.order
src/algebra/order/euclidean_absolute_value.lean
[ "algebra.order.absolute_value", "algebra.euclidean_domain.instances" ]
[]
An absolute value `abv : R → S` is Euclidean if it is compatible with the `euclidean_domain` structure on `R`, namely `abv` is strictly monotone with respect to the well founded relation `≺` on `R`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
map_lt_map_iff {x y : R} (h : abv.is_euclidean) : abv x < abv y ↔ x ≺ y
map_lt_map_iff' h
lemma
absolute_value.is_euclidean.map_lt_map_iff
algebra.order
src/algebra/order/euclidean_absolute_value.lean
[ "algebra.order.absolute_value", "algebra.euclidean_domain.instances" ]
[ "map_lt_map_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sub_mod_lt (h : abv.is_euclidean) (a : R) {b : R} (hb : b ≠ 0) : abv (a % b) < abv b
h.map_lt_map_iff.mpr (euclidean_domain.mod_lt a hb)
lemma
absolute_value.is_euclidean.sub_mod_lt
algebra.order
src/algebra/order/euclidean_absolute_value.lean
[ "algebra.order.absolute_value", "algebra.euclidean_domain.instances" ]
[ "euclidean_domain.mod_lt" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
abs_is_euclidean : is_euclidean (absolute_value.abs : absolute_value ℤ ℤ)
{ map_lt_map_iff' := λ x y, show abs x < abs y ↔ nat_abs x < nat_abs y, by rw [abs_eq_nat_abs, abs_eq_nat_abs, coe_nat_lt] }
lemma
absolute_value.abs_is_euclidean
algebra.order
src/algebra/order/euclidean_absolute_value.lean
[ "algebra.order.absolute_value", "algebra.euclidean_domain.instances" ]
[ "absolute_value", "absolute_value.abs" ]
`abs : ℤ → ℤ` is a Euclidean absolute value
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_semiring (α) [ordered_semiring α]
(floor : α → ℕ) (ceil : α → ℕ) (floor_of_neg {a : α} (ha : a < 0) : floor a = 0) (gc_floor {a : α} {n : ℕ} (ha : 0 ≤ a) : n ≤ floor a ↔ (n : α) ≤ a) (gc_ceil : galois_connection ceil coe)
class
floor_semiring
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "galois_connection", "ordered_semiring" ]
A `floor_semiring` is an ordered semiring over `α` with a function `floor : α → ℕ` satisfying `∀ (n : ℕ) (x : α), n ≤ ⌊x⌋ ↔ (n : α) ≤ x)`. Note that many lemmas require a `linear_order`. Please see the above `TODO`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor : α → ℕ
floor_semiring.floor
def
nat.floor
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[]
`⌊a⌋₊` is the greatest natural `n` such that `n ≤ a`. If `a` is negative, then `⌊a⌋₊ = 0`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ceil : α → ℕ
floor_semiring.ceil
def
nat.ceil
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[]
`⌈a⌉₊` is the least natural `n` such that `a ≤ n`
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_nat : (nat.floor : ℕ → ℕ) = id
rfl
lemma
nat.floor_nat
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "nat.floor" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ceil_nat : (nat.ceil : ℕ → ℕ) = id
rfl
lemma
nat.ceil_nat
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "nat.ceil" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
le_floor_iff (ha : 0 ≤ a) : n ≤ ⌊a⌋₊ ↔ (n : α) ≤ a
floor_semiring.gc_floor ha
lemma
nat.le_floor_iff
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
le_floor (h : (n : α) ≤ a) : n ≤ ⌊a⌋₊
(le_floor_iff $ n.cast_nonneg.trans h).2 h
lemma
nat.le_floor
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_lt (ha : 0 ≤ a) : ⌊a⌋₊ < n ↔ a < n
lt_iff_lt_of_le_iff_le $ le_floor_iff ha
lemma
nat.floor_lt
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "lt_iff_lt_of_le_iff_le" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_lt_one (ha : 0 ≤ a) : ⌊a⌋₊ < 1 ↔ a < 1
(floor_lt ha).trans $ by rw nat.cast_one
lemma
nat.floor_lt_one
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "nat.cast_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lt_of_floor_lt (h : ⌊a⌋₊ < n) : a < n
lt_of_not_le $ λ h', (le_floor h').not_lt h
lemma
nat.lt_of_floor_lt
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "lt_of_not_le" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lt_one_of_floor_lt_one (h : ⌊a⌋₊ < 1) : a < 1
by exact_mod_cast lt_of_floor_lt h
lemma
nat.lt_one_of_floor_lt_one
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_le (ha : 0 ≤ a) : (⌊a⌋₊ : α) ≤ a
(le_floor_iff ha).1 le_rfl
lemma
nat.floor_le
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "le_rfl" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lt_succ_floor (a : α) : a < ⌊a⌋₊.succ
lt_of_floor_lt $ nat.lt_succ_self _
lemma
nat.lt_succ_floor
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lt_floor_add_one (a : α) : a < ⌊a⌋₊ + 1
by simpa using lt_succ_floor a
lemma
nat.lt_floor_add_one
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_coe (n : ℕ) : ⌊(n : α)⌋₊ = n
eq_of_forall_le_iff $ λ a, by { rw [le_floor_iff, nat.cast_le], exact n.cast_nonneg }
lemma
nat.floor_coe
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "eq_of_forall_le_iff", "nat.cast_le" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_zero : ⌊(0 : α)⌋₊ = 0
by rw [← nat.cast_zero, floor_coe]
lemma
nat.floor_zero
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "nat.cast_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_one : ⌊(1 : α)⌋₊ = 1
by rw [←nat.cast_one, floor_coe]
lemma
nat.floor_one
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_of_nonpos (ha : a ≤ 0) : ⌊a⌋₊ = 0
ha.lt_or_eq.elim floor_semiring.floor_of_neg $ by { rintro rfl, exact floor_zero }
lemma
nat.floor_of_nonpos
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_mono : monotone (floor : α → ℕ)
λ a b h, begin obtain ha | ha := le_total a 0, { rw floor_of_nonpos ha, exact nat.zero_le _ }, { exact le_floor ((floor_le ha).trans h) } end
lemma
nat.floor_mono
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "monotone" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
le_floor_iff' (hn : n ≠ 0) : n ≤ ⌊a⌋₊ ↔ (n : α) ≤ a
begin obtain ha | ha := le_total a 0, { rw floor_of_nonpos ha, exact iff_of_false (nat.pos_of_ne_zero hn).not_le (not_le_of_lt $ ha.trans_lt $ cast_pos.2 $ nat.pos_of_ne_zero hn) }, { exact le_floor_iff ha } end
lemma
nat.le_floor_iff'
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "iff_of_false", "not_le_of_lt" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
one_le_floor_iff (x : α) : 1 ≤ ⌊x⌋₊ ↔ 1 ≤ x
by exact_mod_cast (@le_floor_iff' α _ _ x 1 one_ne_zero)
lemma
nat.one_le_floor_iff
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "one_ne_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_lt' (hn : n ≠ 0) : ⌊a⌋₊ < n ↔ a < n
lt_iff_lt_of_le_iff_le $ le_floor_iff' hn
lemma
nat.floor_lt'
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "lt_iff_lt_of_le_iff_le" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_pos : 0 < ⌊a⌋₊ ↔ 1 ≤ a
by { convert le_floor_iff' nat.one_ne_zero, exact cast_one.symm }
lemma
nat.floor_pos
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pos_of_floor_pos (h : 0 < ⌊a⌋₊) : 0 < a
(le_or_lt a 0).resolve_left (λ ha, lt_irrefl 0 $ by rwa floor_of_nonpos ha at h)
lemma
nat.pos_of_floor_pos
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lt_of_lt_floor (h : n < ⌊a⌋₊) : ↑n < a
(nat.cast_lt.2 h).trans_le $ floor_le (pos_of_floor_pos $ (nat.zero_le n).trans_lt h).le
lemma
nat.lt_of_lt_floor
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_le_of_le (h : a ≤ n) : ⌊a⌋₊ ≤ n
le_imp_le_iff_lt_imp_lt.2 lt_of_lt_floor h
lemma
nat.floor_le_of_le
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_le_one_of_le_one (h : a ≤ 1) : ⌊a⌋₊ ≤ 1
floor_le_of_le $ h.trans_eq $ nat.cast_one.symm
lemma
nat.floor_le_one_of_le_one
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_eq_zero : ⌊a⌋₊ = 0 ↔ a < 1
by { rw [←lt_one_iff, ←@cast_one α], exact floor_lt' nat.one_ne_zero }
lemma
nat.floor_eq_zero
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_eq_iff (ha : 0 ≤ a) : ⌊a⌋₊ = n ↔ ↑n ≤ a ∧ a < ↑n + 1
by rw [←le_floor_iff ha, ←nat.cast_one, ←nat.cast_add, ←floor_lt ha, nat.lt_add_one_iff, le_antisymm_iff, and.comm]
lemma
nat.floor_eq_iff
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "nat.lt_add_one_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_eq_iff' (hn : n ≠ 0) : ⌊a⌋₊ = n ↔ ↑n ≤ a ∧ a < ↑n + 1
by rw [← le_floor_iff' hn, ← nat.cast_one, ← nat.cast_add, ← floor_lt' (nat.add_one_ne_zero n), nat.lt_add_one_iff, le_antisymm_iff, and.comm]
lemma
nat.floor_eq_iff'
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "nat.cast_add", "nat.cast_one", "nat.lt_add_one_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_eq_on_Ico (n : ℕ) : ∀ a ∈ (set.Ico n (n+1) : set α), ⌊a⌋₊ = n
λ a ⟨h₀, h₁⟩, (floor_eq_iff $ n.cast_nonneg.trans h₀).mpr ⟨h₀, h₁⟩
lemma
nat.floor_eq_on_Ico
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "set.Ico" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
floor_eq_on_Ico' (n : ℕ) : ∀ a ∈ (set.Ico n (n+1) : set α), (⌊a⌋₊ : α) = n
λ x hx, by exact_mod_cast floor_eq_on_Ico n x hx
lemma
nat.floor_eq_on_Ico'
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "set.Ico" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
preimage_floor_zero : (floor : α → ℕ) ⁻¹' {0} = Iio 1
ext $ λ a, floor_eq_zero
lemma
nat.preimage_floor_zero
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
preimage_floor_of_ne_zero {n : ℕ} (hn : n ≠ 0) : (floor : α → ℕ) ⁻¹' {n} = Ico n (n + 1)
ext $ λ a, floor_eq_iff' hn
lemma
nat.preimage_floor_of_ne_zero
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
gc_ceil_coe : galois_connection (ceil : α → ℕ) coe
floor_semiring.gc_ceil
lemma
nat.gc_ceil_coe
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "galois_connection" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ceil_le : ⌈a⌉₊ ≤ n ↔ a ≤ n
gc_ceil_coe _ _
lemma
nat.ceil_le
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
lt_ceil : n < ⌈a⌉₊ ↔ (n : α) < a
lt_iff_lt_of_le_iff_le ceil_le
lemma
nat.lt_ceil
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "lt_iff_lt_of_le_iff_le" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_one_le_ceil_iff : n + 1 ≤ ⌈a⌉₊ ↔ (n : α) < a
by rw [← nat.lt_ceil, nat.add_one_le_iff]
lemma
nat.add_one_le_ceil_iff
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "nat.add_one_le_iff", "nat.lt_ceil" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
one_le_ceil_iff : 1 ≤ ⌈a⌉₊ ↔ 0 < a
by rw [← zero_add 1, nat.add_one_le_ceil_iff, nat.cast_zero]
lemma
nat.one_le_ceil_iff
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "nat.add_one_le_ceil_iff", "nat.cast_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ceil_le_floor_add_one (a : α) : ⌈a⌉₊ ≤ ⌊a⌋₊ + 1
by { rw [ceil_le, nat.cast_add, nat.cast_one], exact (lt_floor_add_one a).le }
lemma
nat.ceil_le_floor_add_one
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "nat.cast_add", "nat.cast_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
le_ceil (a : α) : a ≤ ⌈a⌉₊
ceil_le.1 le_rfl
lemma
nat.le_ceil
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "le_rfl" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ceil_int_cast {α : Type*} [linear_ordered_ring α] [floor_semiring α] (z : ℤ) : ⌈(z : α)⌉₊ = z.to_nat
eq_of_forall_ge_iff $ λ a, by { simp, norm_cast }
lemma
nat.ceil_int_cast
algebra.order
src/algebra/order/floor.lean
[ "data.int.lemmas", "data.set.intervals.group", "data.set.lattice", "tactic.abel", "tactic.linarith", "tactic.positivity" ]
[ "eq_of_forall_ge_iff", "floor_semiring", "linear_ordered_ring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83