@@ -75,16 +75,19 @@ begin
7575 exact ⟨⟨λ i, x, λ i j hij, le_rfl, λ i, hx⟩⟩,
7676end
7777
78- lemma eq_of_eq_on {f f' : α → E} {s : set α} (h : set.eq_on f f' s ) :
78+ lemma eq_of_edist_zero_on {f f' : α → E} {s : set α} (h : ∀ ⦃x⦄, x ∈ s → edist (f x) ( f' x) = 0 ) :
7979 evariation_on f s = evariation_on f' s :=
8080begin
8181 dsimp only [evariation_on],
8282 congr' 1 with p : 1 ,
8383 congr' 1 with i : 1 ,
84- congr' 1 ;
85- exact h (p.2 .2 .2 _),
84+ rw [edist_congr_right (h $ p.snd.prop.2 (i+1 )), edist_congr_left (h $ p.snd.prop.2 i)],
8685end
8786
87+ lemma eq_of_eq_on {f f' : α → E} {s : set α} (h : set.eq_on f f' s) :
88+ evariation_on f s = evariation_on f' s :=
89+ eq_of_edist_zero_on (λ x xs, by rw [h xs, edist_self])
90+
8891lemma sum_le
8992 (f : α → E) {s : set α} (n : ℕ) {u : ℕ → α} (hu : monotone u) (us : ∀ i, u i ∈ s) :
9093 ∑ i in finset.range n, edist (f (u (i+1 ))) (f (u i)) ≤ evariation_on f s :=
@@ -171,19 +174,6 @@ lemma _root_.has_bounded_variation_on.has_locally_bounded_variation_on {f : α
171174 (h : has_bounded_variation_on f s) : has_locally_bounded_variation_on f s :=
172175λ x y hx hy, h.mono (inter_subset_left _ _)
173176
174- lemma constant_on {f : α → E} {s : set α}
175- (hf : (f '' s).subsingleton) : evariation_on f s = 0 :=
176- begin
177- apply le_antisymm _ (zero_le _),
178- apply supr_le _,
179- rintros ⟨n, ⟨u, hu, ut⟩⟩,
180- have : ∀ i, f (u i) = f (u 0 ) := λ i, hf ⟨u i, ut i, rfl⟩ ⟨u 0 , ut 0 , rfl⟩,
181- simp [subtype.coe_mk, le_zero_iff, finset.sum_eq_zero_iff, finset.mem_range, this ],
182- end
183-
184- @[simp] protected lemma subsingleton (f : α → E) {s : set α} (hs : s.subsingleton) :
185- evariation_on f s = 0 := constant_on (hs.image f)
186-
187177lemma edist_le (f : α → E) {s : set α} {x y : α} (hx : x ∈ s) (hy : y ∈ s) :
188178 edist (f x) (f y) ≤ evariation_on f s :=
189179begin
@@ -206,6 +196,30 @@ begin
206196 simp [u, edist_comm],
207197end
208198
199+ lemma eq_zero_iff (f : α → E) {s : set α} :
200+ evariation_on f s = 0 ↔ ∀ (x y ∈ s), edist (f x) (f y) = 0 :=
201+ begin
202+ split,
203+ { rintro h x xs y ys,
204+ rw [←le_zero_iff, ←h],
205+ exact edist_le f xs ys, },
206+ { rintro h,
207+ dsimp only [evariation_on],
208+ rw ennreal.supr_eq_zero,
209+ rintro ⟨n, u, um, us⟩,
210+ exact finset.sum_eq_zero (λ i hi, h _ (us i.succ) _ (us i)), },
211+ end
212+
213+ lemma constant_on {f : α → E} {s : set α} (hf : (f '' s).subsingleton) : evariation_on f s = 0 :=
214+ begin
215+ rw eq_zero_iff,
216+ rintro x xs y ys,
217+ rw [hf ⟨x, xs, rfl⟩ ⟨y, ys, rfl⟩, edist_self],
218+ end
219+
220+ @[simp] protected lemma subsingleton (f : α → E) {s : set α} (hs : s.subsingleton) :
221+ evariation_on f s = 0 := constant_on (hs.image f)
222+
209223lemma lower_continuous_aux {ι : Type *} {F : ι → α → E} {p : filter ι}
210224 {f : α → E} {s : set α} (Ffs : ∀ x ∈ s, tendsto (λ i, F i x) p (𝓝 (f x)))
211225 {v : ℝ≥0 ∞} (hv : v < evariation_on f s) : ∀ᶠ (n : ι) in p, v < evariation_on (F n) s :=
@@ -438,9 +452,9 @@ begin
438452 begin
439453 rw [finset.sum_Ico_consecutive, finset.sum_Ico_consecutive, finset.range_eq_Ico],
440454 { exact zero_le _ },
441- { linarith },
455+ { exact nat.succ_le_succ hN.left },
442456 { exact zero_le _ },
443- { linarith }
457+ { exact N.pred_le.trans (N.le_succ) }
444458 end }
445459end
446460
@@ -474,7 +488,7 @@ begin
474488 split_ifs,
475489 { exact hu hij },
476490 { apply h _ (us _) _ (vt _) },
477- { linarith },
491+ { exfalso, exact h_1 (hij.trans h_2), },
478492 { apply hv (tsub_le_tsub hij le_rfl) } },
479493 calc ∑ i in finset.range n, edist (f (u (i + 1 ))) (f (u i))
480494 + ∑ (i : ℕ) in finset.range m, edist (f (v (i + 1 ))) (f (v i))
@@ -485,16 +499,16 @@ begin
485499 congr' 1 ,
486500 { apply finset.sum_congr rfl (λ i hi, _),
487501 simp only [finset.mem_range] at hi,
488- have : i + 1 ≤ n, by linarith ,
502+ have : i + 1 ≤ n := nat.succ_le_of_lt hi ,
489503 simp [hi.le, this ] },
490504 { apply finset.sum_congr rfl (λ i hi, _),
491505 simp only [finset.mem_range] at hi,
492- have A : ¬(n + 1 + i + 1 ≤ n), by linarith,
493506 have B : ¬(n + 1 + i ≤ n), by linarith,
507+ have A : ¬(n + 1 + i + 1 ≤ n) := λ h, B ((n+1 +i).le_succ.trans h),
494508 have C : n + 1 + i - n = i + 1 ,
495509 { rw tsub_eq_iff_eq_add_of_le,
496510 { abel },
497- { linarith } },
511+ { exact n.le_succ.trans (n.succ.le_add_right i), } },
498512 simp only [A, B, C, nat.succ_sub_succ_eq_sub, if_false, add_tsub_cancel_left] }
499513 end
500514 ... = ∑ i in finset.range n, edist (f (w (i + 1 ))) (f (w i))
@@ -512,11 +526,11 @@ begin
512526 rintros i hi,
513527 simp only [finset.mem_union, finset.mem_range, finset.mem_Ico] at hi ⊢,
514528 cases hi,
515- { linarith },
529+ { exact lt_of_lt_of_le hi (n.le_succ.trans (n.succ.le_add_right m)) },
516530 { exact hi.2 } },
517531 { apply finset.disjoint_left.2 (λ i hi h'i, _),
518532 simp only [finset.mem_Ico, finset.mem_range] at hi h'i,
519- linarith [ h'i.1 ] }
533+ exact hi.not_lt (nat.lt_of_succ_le h'i.left) }
520534 end
521535 ... ≤ evariation_on f (s ∪ t) : sum_le f _ hw wst
522536end
@@ -871,3 +885,4 @@ lemma lipschitz_with.ae_differentiable_at
871885 {C : ℝ≥0 } {f : ℝ → V} (h : lipschitz_with C f) :
872886 ∀ᵐ x, differentiable_at ℝ f x :=
873887(h.has_locally_bounded_variation_on univ).ae_differentiable_at
888+
0 commit comments