chore(Algebra/Group/Pointwise/Set/SelfInv): put into lemmas into Set namespace - #43792
justus-springer wants to merge 2 commits into
Conversation
PR summary fb393d8712Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
|
Can you add deprecations? |
| simp only [isSelfInv_iff, Set.ext_iff, mem_inv] | ||
|
|
||
| @[to_additive (attr := simp)] | ||
| protected lemma IsSelfInv.empty : IsSelfInv (∅ : Set α) := inv_empty |
There was a problem hiding this comment.
My original proposal would have been to call this one IsSelfInv.empty_set or IsSelfInv.setEmpty or similar, and only move the un-namespaced ones in the global namespace into Set.
Your approach looks reasonable too, though I'm not sure if it's one we use elsewhere. Perhaps this is worth a quick poll on zulip?
There was a problem hiding this comment.
I think we have precedence for the bare names, e.g. MeasurableSet.empty, MeasurableSet.inter and so on. The difference here is that IsSelfInv is a predicate that also makes sense for other things rather than sets. But I would still prefer having the dot notation line up with the names of the set operations directly, e.g. write hs.inter ht (and not hs.inter_set ht) when hs : IsSelfInv s and ht : IsSelfInv t. So imo this is exactly the intended use case of the DNRO feature.
|
In this case I would rather not add deprecations. Having both |
Move all lemmas about self inverse sets into the
Setnamespace. This was suggested by @eric-wieser in #42611. Dot-notation is still accessible using the DNRO feature.to_additiveneeds a hint in order to translate into the correct namespace. I also fixed the to_additive ofIsSelfInv.prod(this used to be translated toIsSelfInv.suminstead ofIsSelfNeg.prod.