Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
consequencies of the stricter hp of `ConvexOn.nonneg_of_todo`
  • Loading branch information
LorenzoLuccioli committed Nov 13, 2024
1 parent de07d7b commit 40801ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions TestingLowerBounds/Divergences/Hellinger/HellingerFun.lean
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ lemma rightDeriv_hellingerFun_one :
simp [rightDeriv_hellingerFun]

lemma hellingerFun_nonneg (ha : 0 ≤ a) {x : ℝ} (hx : 0 ≤ x) : 0 ≤ hellingerFun a x := by
rcases hx.eq_or_lt with rfl | hx; · simp
refine ConvexOn.nonneg_of_todo ?_ hellingerFun_apply_one_eq_zero rightDeriv_hellingerFun_one hx
exact (convexOn_hellingerFun ha).subset (Set.Ioi_subset_Ici le_rfl) (convex_Ioi _)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ lemma rightDeriv_mul_log_add_one_sub_eventually_eq :
rw [rightDeriv_mul_log_add_one_sub hx]

lemma mul_log_add_one_sub_nonneg {x : ℝ} (hx : 0 ≤ x) : 0 ≤ x * log x + 1 - x := by
rcases hx.eq_or_lt with rfl | hx; · simp
refine ConvexOn.nonneg_of_todo (f := fun x ↦ x * log x + 1 - x) ?_ ?_ ?_ hx
· exact convexOn_mul_log_add_one_sub.subset (Ioi_subset_Ici le_rfl) (convex_Ioi _)
· simp
Expand Down

0 comments on commit 40801ff

Please sign in to comment.