Repository navigation
[Merged by Bors] - chore(Data): rename setOf to Set.ofPred - #41507
YaelDillies wants to merge 3 commits into
Conversation
setOf to Set.ofPred`setOf to Set.ofPred
PR summary 736341416fImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
themathqueen
left a comment
There was a problem hiding this comment.
Don't think there's a need for both Generated by: and Assisted by:, either one suffices, I think
|
Note that this conflicts with #39110, namely the naming |
|
#39110 is doing eps of the required work. I have the whole refactor building locally. |
The former is an informal description of how I used LLM tools. The latter is in a machine-readable format that follows the Linux kernel contribution convention. |
|
I think merging the small bit will help the review & merge effort (compared to a +3k PR), but I should first fix any incompatibilities with your full PR (and also solve conflicts on my side so that you don't get any). Does it not? |
I doubt so, because your small bits are going against what I am doing in #41506. But don't worry I am going to extract the fixes that can be made on master 😉 |
|
@SnirBroshi, I don't think you should waste time on trying to make that PR more compatible with these (it's far more work than you think, the full PR is huge). Your PR should've been merged 2 months ago (but Yury got busy, I'm assuming), but now with these new PRs, I'm not so sure anymore. I haven't checked, but I think the same stuff is basically in Yaël's PR anyway? Anyway, I think this PR would be easier to review than the rest since it's just a renaming PR. I'll set aside an hour of review time to do this later when it's fully ready. |
| /-lemma autEmbedding_range : | ||
| Set.range (autEmbedding F) = | ||
| ⋂ (f : Arrow C), { a | F.map f.hom ≫ (a f.right).hom = (a f.left).hom ≫ F.map f.hom } := by | ||
| ext a | ||
| simp only [Set.mem_range, id_obj, Set.mem_iInter, Set.mem_setOf_eq] | ||
| simp only [Set.mem_range, id_obj, Set.mem_iInter, Set.mem_ofPred_eq] | ||
| refine ⟨fun ⟨σ, h⟩ i ↦ h.symm ▸ σ.hom.naturality i.hom, fun h ↦ ?_⟩ | ||
| · use NatIso.ofComponents a (fun {X Y} f ↦ h ⟨X, Y, f⟩) | ||
| rfl-/ |
There was a problem hiding this comment.
do you know why this is commented out?
There was a problem hiding this comment.
No clue, but probably out of scope to touch it in this PR?
There was a problem hiding this comment.
Yeah, definitely out of scope
| @@ -258,6 +258,9 @@ def abbreviationDict : Std.HashMap String String := .ofList [ | |||
|
|
|||
| ("neTop", "NeBot"), | |||
| ("decidableSucc", "DecidablePred"), | |||
| -- `Set.ofPred` is not dual to `Set.ofSucc` | |||
There was a problem hiding this comment.
It doesn't exist and that's the point. If you don't add the line below (which we can't see here, please make multiline comments!), then to_dual tries translating ofPred to ofSucc.
|
Hey, could you also rename |
| -- `Set.ofPred` is not dual to `Set.ofSucc` | ||
| ("ofSucc", "OfPred"), | ||
| ("setOfSucc", "SetOfPred"), |
There was a problem hiding this comment.
Sorry for not making a multiline comment before.
Anyway, I see. Let's keep this comment unresolved for other reviewers (especially because I don't fully understand this).
|
I think there are some things to fix outside of mathlib btw, in |
|
Tried helping out with some fixes. But not sure how much I helped, sorry |
|
I checked a very minimized version of the diff using Looks like the "lint and suggest" step is also broken elsewhere, so I'm happy to merge this now. Thanks! bors d+ |
|
✌️ YaelDillies can now approve this pull request until 2026-07-31 09:18 UTC (in 2 weeks). To approve and merge, reply with
|
|
Did you mean bors merge since I can't do anything about Lint and suggest? |
|
Yes, if you don't know how to fix the error then let's try merging it. |
This is in prevision of making `Set` a one-field structure. `ofPred` will then be the constructor. Generated by Claude Opus then reviewed line-by-line by myself. Assisted-by: Claude Opus 4.8
|
Pull request successfully merged into master. Build succeeded:
|
setOf to Set.ofPredsetOf to Set.ofPred
Follow-up to leanprover-community#41507 Generated by Claude Opus, then reviewed and cherry-picked line-by-line by myself. Assisted-by: Claude Opus 4.8
Follow-up to #41507 Generated by Claude Opus, then reviewed and cherry-picked line-by-line by myself. Assisted-by: Claude Opus 4.8
Follow-up to #41507 Generated by Claude Opus, then reviewed and cherry-picked line-by-line by myself. Assisted-by: Claude Opus 4.8
…42172) Follow-up to leanprover-community#41507 Generated by Claude Opus, then reviewed and cherry-picked line-by-line by myself. Assisted-by: Claude Opus 4.8
|
@YaelDillies, I just noticed that this PR replaced Is there a way that in the future a PR like this can be made in a way where we do not get unexpected unnecessary changes like this that no human would ever make? |
| obtain ⟨p, hp⟩ := h | ||
| have : Nonempty s := ⟨⟨p, hp⟩⟩ | ||
| rw [setOf_sOppSide_eq_image2 hx hp, ← Set.image_prod] | ||
| haveI : Nonempty s := ⟨⟨p, hp⟩⟩ |
| @@ -81,8 +81,8 @@ variable {M} | |||
|
|
|||
| theorem commProb_eq_one_iff [h : Nonempty M] : commProb M = 1 ↔ IsMulCommutative M := by | |||
| classical | |||
| have := Fintype.ofFinite M | |||
| rw [commProb, ← Set.coe_setOf, Nat.card_eq_fintype_card, Nat.card_eq_fintype_card] | |||
| haveI := Fintype.ofFinite M | |||
|
By the way, I've also made #42251 that cleans up the |
I have reviewed every single line of code myself, but clearly my eyes must have gotten tired at some point. In similar circumstances, I have tried asking the LLM to revert the purely cosmetic changes, but it overreverted changes that were unnecesarry to make the build pass but still relevant. I am still learning how to use LLMs best and I acknowledge this is an issue, but here the extra lines account for 0.6% of the diff and they could have been caught by a linter that has been talked about on Zulip ( |
This is in prevision of making `Set` a one-field structure. `ofPred` will then be the constructor. Generated by Claude Opus then reviewed line-by-line by myself. Assisted-by: Claude Opus 4.8
This is in prevision of making
Seta one-field structure.ofPredwill then be the constructor.Generated by Claude Opus then reviewed line-by-line by myself.
Assisted-by: Claude Opus 4.8