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
[Merged by Bors] - feat(category_theory/groupoid/subgroupoid): subgroupoids and basic properties #16742
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for now; will continue tomorrow.
Thanks a lot! I corrected the stuff I was OK with and commented on the rest. I've also added a few definitions (mostly about how |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think I completed the review but I'll try to golf some proofs later.
|
||
/-- `S` is a subgroupoid of `T` if it is contained in it -/ | ||
def is_subgroupoid (S T : subgroupoid C) : Prop := | ||
∀ {c d}, S.arrws c d ⊆ T.arrws c d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you automatically get (≤) and everything down to the partial order instance. Instead of intros c d p
you would do rintro ⟨c, d, p⟩
(or λ ⟨c, d, p⟩
) which is almost as convenient as it's now. You can't write p ∈ S
but should be able to write ⟨_, _, p⟩ ∈ S
, and you may def mk {c d} (p : c ⟶ d) : Σ c d, c ⟶ d := ⟨c, d, p⟩
(or declare a notation) so that you can write mk p ∈ S
. (A notation is better since mk
isn't a good name, and sigma_hom_mk
is too long ...)
Wow, thanks for all these suggestions! I will look at everything in detail tomorrow, but in the meantime:
|
Co-authored-by: Junyan Xu <junyanxumath@gmail.com>
Hi @bottine I've simplified some proofs over in my fork and pointed out most notable changes as comments here. Notice that I haven't merged your latest commit. Mostly I golf the proofs by simplifying just enough for defeq to work. I'm unable to prove
By analogy with simple_graph.subgraph.coe, it's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some final edits and then it's ready to go!
@[simp] lemma mem_iff (S : subgroupoid C) (F : Σ c d, c ⟶ d) : | ||
F ∈ S ↔ F.2.2 ∈ S.arrows F.1 F.2.1 := iff.rfl | ||
|
||
@[simp] lemma le_iff (S T : subgroupoid C) : (S ≤ T) ↔ (∀ {c d}, (S.arrows c d) ⊆ (T.arrows c d)) := | ||
by { rw [set_like.le_def, sigma.forall], exact forall_congr (λ c, sigma.forall) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually lemmas that unfold definitions like mem_iff
usually shouldn't be simp
lemmas. For le_iff
, it's not clear the RHS is simpler than the LHS, so I suggest removing the @[simp]
as well.
Co-authored-by: Junyan Xu <junyanxumath@gmail.com>
Co-authored-by: Junyan Xu <junyanxumath@gmail.com>
Co-authored-by: Junyan Xu <junyanxumath@gmail.com>
Co-authored-by: Junyan Xu <junyanxumath@gmail.com>
OK, applied your suggestions. Thanks a lot! |
Thanks! maintainer merge (or delegate and wait for CI, but note that queue is empty now) |
🚀 Pull request has been placed on the maintainer queue by alreadydone. |
bors merge |
…operties (#16742) Add a definition of (bundled) subgroupoid and prove some of their basic properties. Co-authored-by: Rémi Bottinelli <remi.bottinelli@bluewin.ch> Co-authored-by: bottine <bottine@users.noreply.github.com>
Pull request successfully merged into master. Build succeeded: |
Add a definition of (bundled) subgroupoid and prove some of their basic properties.