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.

Instances For
    noncomputable def ENat.ceil :

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

    Instances For
      def ENat.«term⌊_⌋ₑ» :
      Lean.ParserDescr

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

      Instances For
        def ENat.«term⌈_⌉ₑ» :
        Lean.ParserDescr

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

        Instances For
          @[simp]
          theorem ENat.floor_coe (r : NNReal) :
          @[simp]
          theorem ENat.ceil_coe (r : NNReal) :
          @[simp]
          theorem ENat.floor_eq_top {r : ENNReal} :
          r⌋ₑ = r =
          @[simp]
          theorem ENat.ceil_eq_top {r : ENNReal} :
          r⌉ₑ = r =
          @[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
          @[simp]
          theorem ENat.floor_natCast (n : ℕ∞) :
          n⌋ₑ = n
          @[simp]
          theorem ENat.ceil_natCast (n : ℕ∞) :
          n⌉ₑ = n
          @[simp]
          theorem ENat.floor_ofNat (n : ) [n.AtLeastTwo] :
          OfNat.ofNat n⌋ₑ = OfNat.ofNat n
          @[simp]
          theorem ENat.ceil_ofNat (n : ) [n.AtLeastTwo] :
          OfNat.ofNat n⌉ₑ = OfNat.ofNat n
          @[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_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_toENNReal (r : ENNReal) (n : ℕ∞) :
          r + n⌋ₑ = r⌋ₑ + n
          @[simp]
          theorem ENat.ceil_add_toENNReal (r : ENNReal) (n : ℕ∞) :
          r + n⌉ₑ = r⌉ₑ + n
          @[simp]
          theorem ENat.floor_toENNReal_add (r : ENNReal) (n : ℕ∞) :
          n + r⌋ₑ = n + r⌋ₑ
          @[simp]
          theorem ENat.ceil_toENNReal_add (r : ENNReal) (n : ℕ∞) :
          n + r⌉ₑ = n + r⌉ₑ
          @[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_add_ofNat (r : ENNReal) (n : ) [n.AtLeastTwo] :
          r + OfNat.ofNat n⌋ₑ = r⌋ₑ + OfNat.ofNat n
          @[simp]
          theorem ENat.ceil_add_ofNat (r : ENNReal) (n : ) [n.AtLeastTwo] :
          r + OfNat.ofNat n⌉ₑ = r⌉ₑ + OfNat.ofNat n
          @[simp]
          theorem ENat.floor_sub_toENNReal (r : ENNReal) (n : ℕ∞) :
          r - n⌋ₑ = r⌋ₑ - n
          @[simp]
          theorem ENat.ceil_sub_toENNReal (r : ENNReal) (n : ℕ∞) :
          r - n⌉ₑ = r⌉ₑ - n
          @[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.floor_sub_ofNat (r : ENNReal) (n : ) [n.AtLeastTwo] :
          r - OfNat.ofNat n⌋ₑ = r⌋ₑ - OfNat.ofNat n
          @[simp]
          theorem ENat.ceil_sub_ofNat (r : ENNReal) (n : ) [n.AtLeastTwo] :
          r - OfNat.ofNat n⌉ₑ = r⌉ₑ - OfNat.ofNat n
          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)

          Alias of the reverse direction of ENat.ceil_pos.

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

          Instances For