Skip to content

fix(RefinedDiscrTree/Lookup): improve the matching score heuristic#36990

Open
JovanGerb wants to merge 1 commit intoleanprover-community:masterfrom
JovanGerb:Jovan-RefinedDiscrTree-score
Open

fix(RefinedDiscrTree/Lookup): improve the matching score heuristic#36990
JovanGerb wants to merge 1 commit intoleanprover-community:masterfrom
JovanGerb:Jovan-RefinedDiscrTree-score

Conversation

@JovanGerb
Copy link
Copy Markdown
Contributor

This PR improves the order in which results come out of the RefinedDiscrTree. I've explained the motivation in the doc-string. This is probably not the most principled fix, but it is the least disruptive solution I could think of.

For an example, try clicking on |0| in

import Mathlib

example : |(0 : ℝ)| = 1 := by
  rw??

And notice that the obvious result abs_zero is not the first result.


Open in Gitpod

@github-actions
Copy link
Copy Markdown

PR summary de4f458186

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ Key.score

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

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

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


No changes to technical debt.

You can run this locally as

./scripts/reporting/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).

@github-actions github-actions bot added the t-meta Tactics, attributes or user commands label Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-meta Tactics, attributes or user commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants