Documentation

Mathlib.Algebra.Order.Floor.Extended

Extended floor and ceil #

This file defines the extended floor and ceil functions ENat.floor, ENat.ceil : ℝ≥0∞ → ℕ∞.

Main declarations #

Notation #

The index is used in analogy to the notation for enorm.

TODO #

The day Mathlib acquires ENNRat, it would be good to generalise this file to an EFloorSemiring typeclass.

Tags #

efloor, eceil

noncomputable def ENat.floor :

⌊r⌋ₑ is the greatest extended natural n such that n ≤ r.

Equations
Instances For
    noncomputable def ENat.ceil :

    ⌈r⌉ₑ is the least extended natural n such that r ≤ n

    Equations
    Instances For

      ⌊r⌋ₑ is the greatest extended natural n such that n ≤ r.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        ⌈r⌉ₑ is the least extended natural n such that r ≤ n

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[simp]
          theorem ENat.floor_coe (r : NNReal) :
          @[simp]
          theorem ENat.ceil_coe (r : NNReal) :
          @[simp]
          @[simp]
          @[simp]
          theorem ENat.le_floor {r : ENNReal} {n : ℕ∞} :
          n r⌋ₑ n r
          @[simp]
          theorem ENat.ceil_le {r : ENNReal} {n : ℕ∞} :
          r⌉ₑ n r n
          @[simp]
          theorem ENat.floor_lt {r : ENNReal} {n : ℕ∞} :
          r⌋ₑ < n r < n
          @[simp]
          theorem ENat.lt_ceil {r : ENNReal} {n : ℕ∞} :
          n < r⌉ₑ n < r
          @[simp]
          theorem ENat.floor_le {r : ENNReal} {n : ℕ∞} (hn : n ) :
          r⌋ₑ n r < n + 1
          @[simp]
          theorem ENat.le_ceil {r : ENNReal} {n : ℕ∞} (hn₀ : n 0) (hn : n ) :
          n r⌉ₑ n - 1 < r
          @[simp]
          theorem ENat.lt_floor {r : ENNReal} {n : ℕ∞} (hn : n ) :
          n < r⌋ₑ n + 1 r
          @[simp]
          theorem ENat.ceil_lt {r : ENNReal} {n : ℕ∞} (hn₀ : n 0) (hn : n ) :
          r⌉ₑ < n r n - 1
          theorem ENat.ceil_le_ceil {r s : ENNReal} (hrs : r s) :
          @[simp]
          theorem ENat.floor_natCast (n : ℕ∞) :
          n⌋ₑ = n
          @[simp]
          theorem ENat.ceil_natCast (n : ℕ∞) :
          n⌉ₑ = n
          @[simp]
          @[simp]
          @[simp]
          @[simp]
          theorem ENat.ceil_pos {r : ENNReal} :
          0 < r⌉ₑ 0 < r
          @[simp]
          theorem ENat.floor_eq_zero {r : ENNReal} :
          r⌋ₑ = 0 r < 1
          @[simp]
          theorem ENat.ceil_eq_zero {r : ENNReal} :
          r⌉ₑ = 0 r = 0
          theorem ENat.floor_lt_ceil {r s : ENNReal} (hrs : r < s) :
          theorem ENat.floor_congr {r s : ENNReal} (h : ∀ (n : ℕ∞), n r n s) :
          theorem ENat.ceil_congr {r s : ENNReal} (h : ∀ (n : ℕ∞), r n s n) :
          @[simp]
          @[simp]
          @[simp]
          @[simp]
          @[simp]
          theorem ENat.floor_add_natCast (r : ENNReal) (n : ) :
          r + n⌋ₑ = r⌋ₑ + n
          @[simp]
          theorem ENat.ceil_add_natCast (r : ENNReal) (n : ) :
          r + n⌉ₑ = r⌉ₑ + n
          @[simp]
          theorem ENat.floor_natCast_add (r : ENNReal) (n : ) :
          n + r⌋ₑ = n + r⌋ₑ
          @[simp]
          theorem ENat.ceil_natCast_add (r : ENNReal) (n : ) :
          n + r⌉ₑ = n + r⌉ₑ
          @[simp]
          @[simp]
          @[simp]
          @[simp]
          @[simp]
          theorem ENat.floor_sub_natCast (r : ENNReal) (n : ) :
          r - n⌋ₑ = r⌋ₑ - n
          @[simp]
          theorem ENat.ceil_sub_natCast (r : ENNReal) (n : ) :
          r - n⌉ₑ = r⌉ₑ - n
          @[simp]
          @[simp]
          theorem ENat.ceil_lt_add_one {r : ENNReal} (hr : r ) :
          r⌉ₑ < r + 1
          @[simp]
          theorem ENat.toENNReal_iSup {ι : Sort u_1} (f : ιℕ∞) :
          (⨆ (i : ι), f i) = ⨆ (i : ι), (f i)
          @[simp]
          theorem ENat.toENNReal_iInf {ι : Sort u_1} (f : ιℕ∞) :
          (⨅ (i : ι), f i) = ⨅ (i : ι), (f i)

          Extension for the positivity tactic: ENat.ceil is positive if its input is.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For