refactor(Data.Finset.MulAntidiagonal): rename set-based mulAntidiagonal to setMulAntidiagonal#34551
refactor(Data.Finset.MulAntidiagonal): rename set-based mulAntidiagonal to setMulAntidiagonal#34551IlPreteRosso wants to merge 16 commits intoleanprover-community:masterfrom
mulAntidiagonal to setMulAntidiagonal#34551Conversation
PR summary 1b7f970756Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
|
@kim-em There is a problem with name conflict Two files define Finset.swap_mem_mulAntidiagonal: Takes explicit IsPWO proofs for sets s and t, where Prod.lean (this PR) - typeclass API: Uses HasMulAntidiagonal typeclass, where Solution:
|
set*Antidiagonal
|
Please add deprecations awaiting-author |
set*Antidiagonalset*Antidiagonal and deprecates old names
set*Antidiagonal and deprecates old namesset*Antidiagonal and deprecate old names in namespace Finset
|
This pull request has conflicts, please merge |
jcommelin
left a comment
There was a problem hiding this comment.
- I can't make heads or tails of the first sentences of your PR description. Please rewrite it so that it makes sense for a reviewer who doesn't have all the context front-loaded. (To be honest, it reads like an AI-generated description after splitting a PR.)
- "This PR renames the set-based antidiagonal definitions to have a set prefix, distinguishing them from the typeclass-based API in Prod.lean." -- Can you make this explicit? Can you explain why we need this? How is the current setup failing you? Atm, it's not clear to me that we even need this.
- "Only definitions are renamed in this PR. Theorem/lemma renames will follow in a subsequent PR." -- Not a fan of that. The lemma names will be out of sync with their statements, because the name components don't match the names that occur in the statement. Since this PR is only doing one thing (i.e. renaming), let's just rename the entire API, if we come to the conclusion that renaming is needed.
| Copyright (c) 2023 Antoine Chambert-Loir and María Inés de Frutos-Fernández. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Antoine Chambert-Loir, María Inés de Frutos-Fernández, Bhavik Mehta, Eric Wieser | ||
| Authors: Antoine Chambert-Loir, María Inés de Frutos-Fernández, Bhavik Mehta, Eric Wieser, Fengyang Wang |
There was a problem hiding this comment.
| Authors: Antoine Chambert-Loir, María Inés de Frutos-Fernández, Bhavik Mehta, Eric Wieser, Fengyang Wang | |
| Authors: Antoine Chambert-Loir, María Inés de Frutos-Fernández, Bhavik Mehta, Eric Wieser |
Is this intentional?
Maybe the name should be added, but this PR wouldn't be the right place.
|
This pull request has conflicts, please merge |
set*Antidiagonal and deprecate old names in namespace FinsetmulAntidiagonal to setMulAntidiagonal
|
Closing in favor of a fresh PR with the full rename (defs + theorems) as requested in review. |
Prod.leanhas a TODO (line 48) to addHasMulAntidiagonal, which would exportmulAntidiagonalintoFinset. This collides with the existing set-basedFinset.mulAntidiagonalinMulAntidiagonal.lean(which takes explicitIsPWOarguments). The additive side has no collision because the typeclass exportsantidiagonalvs the set-basedaddAntidiagonal.The key issue is the
@[simp] lemma mem_mulAntidiagonal: both the set-based and typeclass-based versions would register simp lemmas with the same name inFinsetThis PR renames the set-based definitions to use a set prefix and renames all referencing theorems/lemmas. Deprecation aliases are added for the old names.