Documentation

Interval.EulerMaclaurin.Bernoulli

Bernoulli polynomials #

Mathlib has a lot of this, so possibly I should shift to using those results in future. See periodizedBernoulli in particular.

The Bernoulli polynomials #

Multiplication theorem #

The presaw functions #

These are saw s x smoothly extended from a particular [a,a+1) interval.

def presaw (s : ) (a : ) (x : ) :

The saw functions are scaled, shifted versions of the Bernoulli polynomials

Equations
Instances For
    theorem contDiff_presaw {s : } {a : } :

    presaw is smooth

    @[simp]
    theorem presaw_start {a : } {x : } :
    presaw 0 a x = 1
    theorem hasDerivAt_presaw {s : } {a : } {x : } :
    HasDerivAt (presaw (s + 1) a) (presaw s a x) x
    @[simp]
    theorem deriv_presaw {s : } {a : } {x : } :
    deriv (presaw (s + 1) a) x = presaw s a x
    @[simp]
    theorem presaw_zero {a : } {x : } :
    presaw 0 a x = 1

    The saw functions #

    def saw (s : ) (x : ) :

    The saw functions are scaled, periodic versions of the Bernoulli polynomials

    Equations
    Instances For
      theorem saw_eqOn {s : } {a : } :
      Set.EqOn (saw s) (presaw s a) (Set.Ico (↑a) (a + 1))

      Saw is nice on [a,a+1)

      @[simp]
      theorem presaw_coe_same {s : } {a : } :
      presaw s a a = saw s 0

      presaw at integer values in terms of saw

      @[simp]
      theorem presaw_coe_succ {s : } {a : } :
      presaw (s + 2) a (a + 1) = saw (s + 2) 0

      presaw at integer values in terms of saw

      @[simp]
      theorem presaw_one_coe_succ {a : } :
      presaw 1 a (a + 1) = 1 / 2

      presaw at integer values in terms of saw

      theorem contDiff_saw {s : } {a : } :
      ContDiffOn (saw s) (Set.Ico (↑a) (a + 1))

      Saw is nice on [a,a+1)

      @[simp]
      theorem saw_zero {x : } :
      saw 0 x = 1
      @[simp]
      theorem saw_int {s : } {x : } :
      saw s x = saw s 0
      theorem hasDerivAt_saw {s : } {a : } {x : } (m : x Set.Ioo (↑a) (a + 1)) :
      HasDerivAt (saw (s + 1)) (saw s x) x
      @[simp]
      theorem deriv_saw {s : } {a : } {x : } (m : x Set.Ioo (↑a) (a + 1)) :
      deriv (saw (s + 1)) x = saw s x
      theorem saw_one {x : } :
      saw 1 x = Int.fract x - 1 / 2

      saw 1 is a saw-tooth function

      @[simp]
      theorem saw_one_zero :
      saw 1 0 = -2⁻¹
      theorem continuous_saw {s : } :
      Continuous (saw (s + 2))

      saw is continuous for 2 ≤ s

      Saw values at 0 #

      theorem saw_eval_zero {s : } :
      saw s 0 = (↑s.factorial)⁻¹ * (bernoulli s)

      Explicit bounds on Bernoulli polynomials #

      We first count the zeros of even and odd Bernoulli polynomials by induction, using Rolle's theorem.

      theorem bernoulliFun_rolle {s : } (s0 : s 0) {x y : } (xy : x < y) (e : bernoulliFun s x = bernoulliFun s y) :
      zSet.Ioo x y, bernoulliFun (s - 1) z = 0

      Rolle's theorem specialised to the Bernoulli polynomials

      def pres (s : ) (x y b : ) :

      Number of Bernoulii polynomial preimages in an open interval

      Equations
      Instances For
        theorem pres_eq_reflect {s : } {x y b : } :
        pres s (1 - y) (1 - x) ((-1) ^ s * b) = pres s x y b

        Reflecting pres about the midpoint

        @[simp]
        theorem pres_zero_eq_zero {x y : } :
        pres 0 x y 0 = 0

        bernoulliFun 0 has no zeros

        @[simp]
        theorem pres_one_eq_zero :
        pres 1 0 2⁻¹ 0 = 0

        bernoulliFun 1 has no zeros in Ioo 0 2⁻¹

        @[simp]
        theorem pres_two_eq_zero :
        pres 2 0 1 6⁻¹ = 0

        bernoulliFun 2 never hits bernoulli 2 in Ioo 0 1

        @[simp]
        theorem pres_two_eq_one :
        pres 2 0 2⁻¹ 0 = 1

        bernoulliFun 2 has exactly one zero in Ioo 0 2⁻¹

        theorem pres_eq_zero {s : } {x y b : } (xy : x < y) (h : pres s x y 0 1) (xb : bernoulliFun (s + 1) x = b) (yb : bernoulliFun (s + 1) y = b) :
        pres (s + 1) x y b = 0

        If there's at most one derivative zero betwen two preimages, there are no preimages between

        theorem pres_le_one {s : } {x y b : } (h : pres s x y 0 = 0) :
        pres (s + 1) x y b 1

        If there's no derivative zeros in an interval, there is at most one preimage

        theorem pres_union_le {s : } {x y z b : } (xy : x < y) (yz : y < z) :
        pres s x z b pres s x y b + 1 + pres s y z b

        Bound pres on an interval by breaking it into two pieces

        theorem bernoulliFun_zeros (s : ) (s1 : 2 s) :
        if Even s then pres s 0 1 (bernoulli s) = 0 pres s 0 2⁻¹ 0 1 else pres s 0 2⁻¹ 0 = 0

        Count various preimages of Bernoulli polynomials

        theorem bernoulliFun_pres_eq_zero (s : ) (o : Odd s) :
        pres s 0 2⁻¹ 0 = 0
        theorem IsLocalMax.deriv_eq_zero_of_abs {f : } {y : } (m : IsLocalMax (fun (x : ) => |f x|) y) :
        deriv f y = 0
        theorem abs_bernoulliFun_le_even (s : ) {x : } (m : x Set.Icc 0 1) :
        |bernoulliFun (2 * s) x| |bernoulli (2 * s)|

        Nonexplicit bounds on Bernoulli polynomials #

        theorem exists_max_bernoulli (s : ) :
        xSet.Icc 0 1, IsMaxOn (fun (x : ) => |bernoulliFun s x|) (Set.Icc 0 1) x

        The maximum absolute value of each Bernoulli polynomial

        Equations
        Instances For
          def sawBound (s : ) :

          The maximum absolute value of each saw function

          Equations
          Instances For
            theorem abs_saw_le (s : ) (x : ) :
            @[simp]
            theorem sawBound_nonneg {s : } :