Skip to content

chore: rename nndist to nnDist - #45788

Open
JovanGerb wants to merge 7 commits into
leanprover-community:masterfrom
JovanGerb:Jovan-nnDist
Open

JovanGerb wants to merge 7 commits into
leanprover-community:masterfrom
JovanGerb:Jovan-nnDist

Conversation

@JovanGerb

@JovanGerb JovanGerb commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

This PR renames nndist to nnDist to satisfy the new naming convention.

The commits are as follows

  1. replaces nndist by nnDist everywhere except in existing deprecations
  2. adds deprecations for all declarations
  3. changes edist_nnDist to eDist_nnDist to avoid a future deprecation
  4. adds a deprecation for NNDist.nndist itself.
  5. adds deprecations for lemmas created with the alias ⟨_, _⟩ := _ syntax.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

PR summary f7fca0a3b0

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ AntilipschitzWith.le_mul_nnDist
+ AntilipschitzWith.of_le_mul_nnDist
+ Continuous.nnDist
+ EuclideanSpace.nnDist_eq
+ Filter.Tendsto.nnDist
+ Fin.nnDist_insertNth_insertNth
+ Inseparable.nnDist_eq_zero
+ Isometry.nnDist_eq
+ Isometry.of_nnDist_eq
+ Measurable.nnDist
+ Metric.inseparable_iff_nnDist
+ NNDist.nndist
+ NNReal.le_add_nnDist
+ NNReal.nnDist_eq
+ NNReal.nnDist_zero_eq_val
+ NNReal.nnDist_zero_eq_val'
+ Real.nnDist_eq
+ Real.nnDist_eq'
+ UniformContinuous.nnDist
+ antilipschitzWith_iff_le_mul_nnDist
+ apply_le_nnDist_zero
+ boundedSpace_iff_nnDist
+ coe_nnDist
+ coe_nnreal_ennreal_nnDist
+ congruent_iff_nnDist_eq
+ congruent_iff_pairwise_nnDist_eq
+ continuous_nnDist
+ dist_nnDist
+ eDist_nnDist
+ eq_of_nnDist_eq_zero
+ exists_nnDist_eq
+ exists_pairwise_nnDist_eq
+ isBounded_iff_nnDist
+ isClosedMap_nnDist
+ isProperMap_nnDist
+ isometry_iff_nnDist_eq
+ measurable_nnDist
+ mk_coe_of_nnDist_eq
+ mul_le_nnDist
+ nnDist_apply_le
+ nnDist_center_homothety
+ nnDist_coe_le_nnDist
+ nnDist_comm
+ nnDist_congr
+ nnDist_congr_left
+ nnDist_congr_right
+ nnDist_conj_comm
+ nnDist_conj_conj
+ nnDist_conj_self
+ nnDist_def
+ nnDist_dist
+ nnDist_div_left
+ nnDist_div_right
+ nnDist_edist
+ nnDist_eq_hammingDist
+ nnDist_eq_of_L1
+ nnDist_eq_of_L2
+ nnDist_eq_sum
+ nnDist_eq_zero
+ nnDist_fst_le
+ nnDist_homothety
+ nnDist_homothety_center
+ nnDist_homothety_self
+ nnDist_inr
+ nnDist_integral_add_measure_le_lintegral
+ nnDist_integral_add_vectorMeasure_le_lintegral
+ nnDist_inv_inv
+ nnDist_inv_inv₀
+ nnDist_le_distortion_mul
+ nnDist_le_opNNNorm
+ nnDist_le_pi_nnDist
+ nnDist_left_lineMap
+ nnDist_left_midpoint
+ nnDist_lineMap_left
+ nnDist_lineMap_lineMap
+ nnDist_lineMap_right
+ nnDist_map
+ nnDist_midpoint_left
+ nnDist_midpoint_midpoint_le
+ nnDist_midpoint_midpoint_le'
+ nnDist_midpoint_right
+ nnDist_mulIndicator
+ nnDist_mul_left
+ nnDist_mul_mul_le
+ nnDist_mul_right
+ nnDist_ofAdd
+ nnDist_ofDual
+ nnDist_ofMul
+ nnDist_of_im_eq
+ nnDist_of_re_eq
+ nnDist_one_left
+ nnDist_one_right
+ nnDist_op
+ nnDist_pi_const
+ nnDist_pi_const_le
+ nnDist_pi_def
+ nnDist_pi_eq_iff
+ nnDist_pi_le_iff
+ nnDist_pi_lt_iff
+ nnDist_right_lineMap
+ nnDist_right_midpoint
+ nnDist_self
+ nnDist_self_conj
+ nnDist_self_homothety
+ nnDist_set_exists
+ nnDist_single_same
+ nnDist_single_single
+ nnDist_smul
+ nnDist_smul_le
+ nnDist_smul₀
+ nnDist_snd_le
+ nnDist_starProjection_eq_infNndist
+ nnDist_star_star
+ nnDist_tmul_le
+ nnDist_toAdd
+ nnDist_toDual
+ nnDist_toLp_fst
+ nnDist_toLp_snd
+ nnDist_toMul
+ nnDist_triangle
+ nnDist_triangle_left
+ nnDist_triangle_right
+ nnDist_unop
+ nnDist_up_up
+ nnDist_vadd_cancel_left
+ nnDist_vadd_cancel_right
+ nnDist_vadd_left
+ nnDist_vadd_right
+ nnDist_vadd_vadd_le
+ nnDist_vsub_cancel_left
+ nnDist_vsub_cancel_right
+ nnDist_vsub_vsub_le
+ of_exists_nnDist_eq
+ of_exists_pairwise_nnDist_eq
+ of_nnDist_eq
+ of_pairwise_nnDist_eq
+ pairwise_nnDist_eq
+ prod_nnDist_eq_add
+ prod_nnDist_eq_of_L1
+ prod_nnDist_eq_of_L2
+ prod_nnDist_eq_sup
+ ratio_unique_of_nnDist_ne_zero
+ similar_iff_exists_nnDist_eq
+ similar_iff_exists_pairwise_nnDist_eq
+ uniformContinuous_nnDist
+ zero_eq_nnDist
++ nnDist_le_of_le
+++ nnDist_eq_iSup
+++ nnDist_le
++++++++ nnDist_eq
+++--- nndist_eq_iSup
+++--- nndist_le
++-++++++------- nndist_eq
++-- nndist_le_of_le

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

✅ Lean-aware diff — post-build, computed from the Lean environment (commit f7fca0a).

  • +174 new declarations
  • −0 removed declarations
+AddOpposite.nnDist_op
+AddOpposite.nnDist_unop
+AffineIsometry.nnDist_map
+AntilipschitzWith.le_mul_nnDist
+AntilipschitzWith.mul_le_nnDist
+AntilipschitzWith.of_le_mul_nnDist
+BoundedContinuousFunction.apply_le_nnDist_zero
+BoundedContinuousFunction.nnDist_coe_le_nnDist
+BoundedContinuousFunction.nnDist_eq
+BoundedContinuousFunction.nnDist_eq_iSup
+BoundedContinuousFunction.nnDist_set_exists
+BoxIntegral.Box.nnDist_le_distortion_mul
+Complex.nnDist_conj_comm
+Complex.nnDist_conj_conj
+Complex.nnDist_conj_self
+Complex.nnDist_of_im_eq
+Complex.nnDist_of_re_eq
+Complex.nnDist_self_conj
+Congruent.nnDist_eq
+Congruent.of_nnDist_eq
+Congruent.of_pairwise_nnDist_eq
+Congruent.pairwise_nnDist_eq
+Continuous.nnDist
+ContinuousLinearMap.nnDist_le_opNNNorm
+ContinuousMap.nnDist_eq_iSup
+Dilation.mk_coe_of_nnDist_eq
+Dilation.nnDist_eq
+Dilation.ratio_unique_of_nnDist_ne_zero
+EuclideanSpace.nnDist_eq
+Filter.Tendsto.nnDist
+Fin.nnDist_insertNth_insertNth
+Finsupp.nnDist_def
+Hamming.nnDist_eq_hammingDist
+HolderOnWith.nnDist_le
+HolderOnWith.nnDist_le_of_le
+HolderWith.nnDist_le
+HolderWith.nnDist_le_of_le
+Inseparable.nnDist_eq_zero
+Isometry.nnDist_eq
+Isometry.of_nnDist_eq
+IsometryClass.nnDist_eq
+IsometryEquiv.nnDist_eq
+LipschitzWith.nnDist_le
+Measurable.nnDist
+MeasureTheory.VectorMeasure.nnDist_integral_add_vectorMeasure_le_lintegral
+MeasureTheory.nnDist_integral_add_measure_le_lintegral
+Metric.boundedSpace_iff_nnDist
+Metric.inseparable_iff_nnDist
+Metric.isBounded_iff_nnDist
+MulOpposite.nnDist_op
+MulOpposite.nnDist_unop
+NNDist.nnDist
+NNRat.nnDist_eq
+NNReal.le_add_nnDist
+NNReal.nnDist_eq
+NNReal.nnDist_zero_eq_val
+NNReal.nnDist_zero_eq_val'
+PiLp.nnDist_apply_le
+PiLp.nnDist_eq_iSup
+PiLp.nnDist_eq_of_L1
+PiLp.nnDist_eq_of_L2
+PiLp.nnDist_eq_sum
+PiLp.nnDist_single_same
+Real.nnDist_eq
+Real.nnDist_eq'
+Similar.exists_nnDist_eq
+Similar.exists_pairwise_nnDist_eq
+Similar.of_exists_nnDist_eq
+Similar.of_exists_pairwise_nnDist_eq
+Submodule.nnDist_starProjection_eq_infNndist
+Subtype.nnDist_eq
+TensorProduct.nnDist_tmul_le
+ULift.nnDist_eq
+ULift.nnDist_up_up
+UniformContinuous.nnDist
+Unitization.nnDist_inr
+WithLp.nnDist_fst_le
+WithLp.nnDist_snd_le
+WithLp.nnDist_toLp_fst
+WithLp.nnDist_toLp_snd
+WithLp.prod_nnDist_eq_add
+WithLp.prod_nnDist_eq_of_L1
+WithLp.prod_nnDist_eq_of_L2
+WithLp.prod_nnDist_eq_sup
+antilipschitzWith_iff_le_mul_nnDist
+coe_nnDist
+coe_nnreal_ennreal_nnDist
+congruent_iff_nnDist_eq
+congruent_iff_pairwise_nnDist_eq
+continuous_nnDist
+dist_nnDist
+eDist_nnDist
+eq_of_nnDist_eq_zero
+isClosedMap_nnDist
+isProperMap_nnDist
+isometry_iff_nnDist_eq
+measurable_nnDist
+nnDist_add_add_le
+nnDist_add_left
+nnDist_add_right
+nnDist_center_homothety
+nnDist_comm
+nnDist_congr
+nnDist_congr_left
+nnDist_congr_right
+nnDist_dist
+nnDist_div_left
+nnDist_div_right
+nnDist_edist
+nnDist_eq_zero
+nnDist_homothety
+nnDist_homothety_center
+nnDist_homothety_self
+nnDist_indicator
+nnDist_inv_inv
+nnDist_inv_inv₀
+nnDist_le_pi_nnDist
+nnDist_left_lineMap
+nnDist_left_midpoint
+nnDist_lineMap_left
+nnDist_lineMap_lineMap
+nnDist_lineMap_right
+nnDist_midpoint_left
+nnDist_midpoint_midpoint_le
+nnDist_midpoint_midpoint_le'
+nnDist_midpoint_right
+nnDist_mulIndicator
+nnDist_mul_left
+nnDist_mul_mul_le
+nnDist_mul_right
+nnDist_neg_neg
+nnDist_ofAdd
+nnDist_ofDual
+nnDist_ofMul
+nnDist_one_left
+nnDist_one_right
+nnDist_pi_const
+nnDist_pi_const_le
+nnDist_pi_def
+nnDist_pi_eq_iff
+nnDist_pi_le_iff
+nnDist_pi_lt_iff
+nnDist_right_lineMap
+nnDist_right_midpoint
+nnDist_self
+nnDist_self_homothety
+nnDist_single_single
+nnDist_smul
+nnDist_smul_le
+nnDist_smul₀
+nnDist_star_star
+nnDist_sub_left
+nnDist_sub_right
+nnDist_toAdd
+nnDist_toDual
+nnDist_toMul
+nnDist_triangle
+nnDist_triangle_left
+nnDist_triangle_right
+nnDist_vadd
+nnDist_vadd_cancel_left
+nnDist_vadd_cancel_right
+nnDist_vadd_left
+nnDist_vadd_right
+nnDist_vadd_vadd_le
+nnDist_vsub_cancel_left
+nnDist_vsub_cancel_right
+nnDist_vsub_vsub_le
+nnDist_zero_left
+nnDist_zero_right
+similar_iff_exists_nnDist_eq
+similar_iff_exists_pairwise_nnDist_eq
+uniformContinuous_nnDist
+zero_eq_nnDist

No changes to strong technical debt.
No changes to weak technical debt.

Current commit f7fca0a3b0
Reference commit 9a4f164603

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py 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).

@grunweg

grunweg commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@bryangingechen Can I ask you to run your better deprecation script on this PR also? Thanks!

@mathlib-merge-conflicts mathlib-merge-conflicts Bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Nov 19, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@github-actions github-actions Bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Nov 19, 2026
@bryangingechen

Copy link
Copy Markdown
Contributor

@bryangingechen Can I ask you to run your better deprecation script on this PR also? Thanks!

Sorry for missing this. Here's the result:


Declarations diff (Lean)

✅ Lean-aware diff — post-build, computed from the Lean environment (commit 8c0fc72).

Shape: mixed (deprecations + docstring changes). 174 deprecations; 3 docstring changes; 3 module docstring changes.

  • +174 new declarations
  • −0 removed declarations

Warning

1 change needs a reviewer's attention

  • UniformContinuous.nndist — no longer protected, so open UniformContinuous now brings nndist into scope; write protected before alias
newly deprecated (174)
docstrings changed (3)
module docstrings changed (3)

@JovanGerb

Copy link
Copy Markdown
Contributor Author

Thanks! I've fixed the one warning

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants