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
            Instances For

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

              Equations
                Instances For
                  @[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.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]
                  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]
                  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]
                  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)

                  Alias of the reverse direction of ENat.ceil_pos.

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

                  Equations
                    Instances For