Skip to content

Commit 57de60e

Browse files
Remove upstreamed bernoulli lemmas (#26)
* Deprecate upstreamed bernoulli lemmas * Remove deprecated lemmas
1 parent 4a404ea commit 57de60e

File tree

1 file changed

+3
-46
lines changed

1 file changed

+3
-46
lines changed

Interval/EulerMaclaurin/Bernoulli.lean

Lines changed: 3 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -30,53 +30,10 @@ noncomputable section
3030

3131
variable {s : ℕ}
3232

33-
/-- Polynomials are smooth -/
34-
lemma contDiff_polynomial (f : Polynomial ℚ) : ContDiff ℝ ⊤ (fun x : ℝ ↦ f.aeval x) := by
35-
induction' f using Polynomial.induction_on' with f g fc gc n a
36-
· simp only [map_add]
37-
exact fc.add gc
38-
· simp only [Polynomial.aeval_monomial, eq_ratCast]
39-
exact contDiff_const.mul (contDiff_id.pow _)
40-
41-
/-- Bernoulli polys have mean `n = 0` -/
42-
lemma mean_bernoulliFun (s : ℕ) :
43-
∫ x in (0 : ℝ)..1, bernoulliFun s x = if s = 0 then 1 else 0 := by
44-
induction' s with s _
45-
· simp only [bernoulliFun_zero, integral_const, sub_zero, smul_eq_mul, mul_one, ↓reduceIte]
46-
· apply integral_bernoulliFun_eq_zero
47-
omega
48-
49-
/-!
50-
### Integrability tactic
51-
-/
52-
53-
/-- Show interval integrability via continuity -/
54-
macro "integrable" : tactic =>
55-
`(tactic|
56-
· intros
57-
apply Continuous.intervalIntegrable
58-
continuity)
59-
60-
/-!
61-
### Reflection principle: `B_s(1 - x) = (-)^s B_s(x)`
62-
-/
63-
64-
@[simp] lemma bernoulli_odd_eq_zero {s : ℕ} (s0 : s ≠ 0) : bernoulli (2 * s + 1) = 0 := by
65-
rw [bernoulli, bernoulli'_eq_zero_of_odd]
66-
all_goals simp; try omega
67-
68-
/-- The values at 0 and 1 match for `2 ≤ s` -/
69-
lemma bernoulliPoly_one_eq_zero (s : ℕ) : bernoulliFun (s + 2) 1 = bernoulliFun (s + 2) 0 := by
70-
simp only [bernoulliFun_eval_one, bernoulliFun_eval_zero, Nat.reduceEqDiff, ↓reduceIte, add_zero]
71-
7233
/-!
7334
### Multiplication theorem
7435
-/
7536

76-
lemma integrable_bernoulliFun {s : ℕ} {a b : ℝ} :
77-
IntervalIntegrable (bernoulliFun s) volume a b := by
78-
apply (contDiff_bernoulliFun _).continuous.intervalIntegrable
79-
8037
lemma integrable_bernoulliFun_comp_add_right {s : ℕ} {a b c : ℝ} :
8138
IntervalIntegrable (fun x ↦ bernoulliFun s (x + c)) volume a b := by
8239
apply Continuous.intervalIntegrable
@@ -145,8 +102,7 @@ lemma saw_eqOn {a : ℤ} :
145102

146103
/-- `presaw` at integer values in terms of `saw` -/
147104
@[simp] lemma presaw_coe_succ {a : ℤ} : presaw (s + 2) a (a + 1) = saw (s + 2) 0 := by
148-
simp only [presaw, add_sub_cancel_left, bernoulliPoly_one_eq_zero, smul_eq_mul, saw,
149-
Int.fract_zero]
105+
simp [presaw, bernoulliFun_endpoints_eq_of_ne_one, saw]
150106

151107
/-- `presaw` at integer values in terms of `saw` -/
152108
@[simp] lemma presaw_one_coe_succ {a : ℤ} : presaw 1 a (a + 1) = 1 / 2 := by
@@ -384,7 +340,8 @@ lemma bernoulliFun_zeros (s : ℕ) (s1 : 2 ≤ s) :
384340
· simp only [e, even_two, Even.mul_right, ↓reduceIte, Nat.not_even_bit1] at h ⊢
385341
obtain ⟨h, r⟩ := h
386342
refine pres_eq_zero (by norm_num) r ?_ (bernoulliFun_eval_half_eq_zero _)
387-
rw [bernoulliFun_eval_zero, bernoulli_odd_eq_zero (by omega), Rat.cast_zero]
343+
rw [bernoulliFun_eval_zero, bernoulli_eq_zero_of_odd (odd_two_mul_add_one t) (by omega),
344+
Rat.cast_zero]
388345
· simp only [e, Nat.not_even_bit1, ↓reduceIte, add_assoc, Nat.reduceAdd, Nat.even_add_one,
389346
not_false_eq_true] at h ⊢
390347
constructor

0 commit comments

Comments
 (0)