Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(CategoryTheory): command that generates instances for MorphismProperty #18785

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

erdOne
Copy link
Member

@erdOne erdOne commented Nov 9, 2024

Co-authored-by: Calle Sönne


Open in Gitpod

Copy link

github-actions bot commented Nov 9, 2024

PR summary 63e2636124

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.CategoryTheory.MorphismProperty.Tactic 379

Declarations diff

+ Bar2
+ Config
+ ContainsIdentities
+ Foo.Bar
+ Foo.Bar3
+ IsStableUnderComposition
+ addMorphismPropertyInstancesAux
+ comp_mem
+ getArgs
+ hom
+ instance : ContainsIdentities (@Foo.Bar n) := ⟨fun _ ↦ ⟨⟩⟩
+ instance : ContainsIdentities (@Foo.Bar3 C _) := ⟨fun _ ↦ ⟨⟩⟩
+ instance : IsStableUnderComposition (@Foo.Bar n) := ⟨fun _ _ _ _ ↦ ⟨⟩⟩
+ instance : IsStableUnderComposition (@Foo.Bar3 C _) := ⟨fun _ _ _ _ ↦ ⟨⟩⟩
+ instance : IsStableUnderComposition @Foo.Bar2 := ⟨fun _ _ _ _ ↦ ⟨⟩⟩
+ instance : RespectsIso (@Foo.Bar n) := @RespectsIso.mk _ _ _ (fun _ _ _ ↦ ⟨⟩) (fun _ _ _ ↦ ⟨⟩)
+ lemma1
+ lemma2
+ lemma3
+ of_isIso
+++ foo
+++ instance {X} : Bar (𝟙 X)

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

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

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

@erdOne erdOne added t-meta Tactics, attributes or user commands t-category-theory Category theory labels Nov 9, 2024
Copy link
Collaborator

@chrisflav chrisflav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very cool! Looking forward to using this. I left some small comments on the tests. Since I don't know anything about meta programming, I can't comment on the implementation.

MathlibTest/AddMorphismPropertyInstances.lean Outdated Show resolved Hide resolved
MathlibTest/AddMorphismPropertyInstances.lean Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-category-theory Category theory t-meta Tactics, attributes or user commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants