Skip to content

Comments

feat: klDiv and scalar multiplication#35301

Open
RemyDegenne wants to merge 2 commits intoleanprover-community:masterfrom
RemyDegenne:RD_klSmul
Open

feat: klDiv and scalar multiplication#35301
RemyDegenne wants to merge 2 commits intoleanprover-community:masterfrom
RemyDegenne:RD_klSmul

Conversation

@RemyDegenne
Copy link
Contributor

@RemyDegenne RemyDegenne commented Feb 14, 2026

The Kullback-Leibler divergence in Mathlib is defined for finite measures, not just probability measures. This PR adds lemmas that show how klDiv changes when we multiply one or both of the measures by a scalar.


Open in Gitpod

@RemyDegenne RemyDegenne added WIP Work in progress t-measure-probability Measure theory / Probability theory labels Feb 14, 2026
@github-actions
Copy link

github-actions bot commented Feb 14, 2026

PR summary 738faa5527

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ AbsolutelyContinuous.smul_right
+ coe_nnreal_smul
+ klDiv_ne_top
+ klDiv_smul_both
+ klDiv_smul_right_eq_smul_left
+ llr_smul_both
+ llr_smul_inv_left_eq_smul_right
+ llr_smul_nnreal_both
+ llr_smul_nnreal_left
+ llr_smul_nnreal_right
+ rnDeriv_smul_both
+ toReal_klDiv_smul_both
+ toReal_klDiv_smul_left
+ toReal_klDiv_smul_right
+ toReal_klDiv_smul_right_eq_smul_left

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for scripts/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@RemyDegenne RemyDegenne removed the WIP Work in progress label Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-measure-probability Measure theory / Probability theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants