Skip to content

fix(fun_prop): do not unfold semireducible definitions in the presence of projections#35548

Draft
gasparattila wants to merge 9 commits intoleanprover-community:masterfrom
gasparattila:fun_prop-reducible-fix
Draft

fix(fun_prop): do not unfold semireducible definitions in the presence of projections#35548
gasparattila wants to merge 9 commits intoleanprover-community:masterfrom
gasparattila:fun_prop-reducible-fix

Conversation

@gasparattila
Copy link
Copy Markdown
Contributor


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 19, 2026

PR summary 4e83c73533

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ DecompositionResult
+ DecompositionResult.toTheoremForm
+ FunctionData.decomposition
- FunctionData.nontrivialDecomposition
- whnf

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).

@lecopivo
Copy link
Copy Markdown
Collaborator

Looks good to me! I didn't know about the existence of withCanUnfoldPred. Thanks for recognizing this inconsistency and for fixing it.

@j-loreaux
Copy link
Copy Markdown
Contributor

I appreciate you fixing this! I understand on the first pass just fixing the broken bits by any means necessary, but now that they are isolated, would you mind going back and figuring out what fun_prop tags are missing to fix some of the breakage? That seems like a better solution.

@DavidLedvinka
Copy link
Copy Markdown
Collaborator

I appreciate you fixing this! I understand on the first pass just fixing the broken bits by any means necessary, but now that they are isolated, would you mind going back and figuring out what fun_prop tags are missing to fix some of the breakage? That seems like a better solution.

Taking a look through these all seem subtler than missing fun_prop lemmas. For example the pattern eta_expand; dsimp; fun_prop appears because you should have to unfold a non irreducible definition manually, and the dsimp lemma that lets you do this is only given in an "apply" form.

Perhaps one solution is to experiment with preprocessing in fun_prop as suggested in this thread: https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/Using.20fun_prop.20for.20the.20sum.20of.20two.20continuous.20functions. Note eta_expand; dsimp; fun_prop also proves the second example by Aaron at the top of the thread (on an earlier version of mathlib without the additional fun_prop lemma added).

@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 Mar 6, 2026
@mathlib-merge-conflicts
Copy link
Copy Markdown

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

@gasparattila gasparattila force-pushed the fun_prop-reducible-fix branch from 296ec17 to 09d7e33 Compare March 26, 2026 19:47
@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 Mar 26, 2026
@gasparattila gasparattila force-pushed the fun_prop-reducible-fix branch from 1d2ae5f to 8b8ac3e Compare March 26, 2026 20:47
@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 Mar 27, 2026
@mathlib-merge-conflicts
Copy link
Copy Markdown

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

@gasparattila gasparattila force-pushed the fun_prop-reducible-fix branch from 7827170 to a37faf7 Compare April 1, 2026 14:41
@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 Apr 1, 2026
@grunweg grunweg added the t-meta Tactics, attributes or user commands label Apr 1, 2026
@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 Apr 1, 2026
@mathlib-merge-conflicts
Copy link
Copy Markdown

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

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

Labels

merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) t-meta Tactics, attributes or user commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants