feat(Topology): implement delaborators for non-standard topology notation#31425
feat(Topology): implement delaborators for non-standard topology notation#31425robertmaxton42 wants to merge 32 commits intoleanprover-community:masterfrom
Conversation
Added delaborators for unary and binary notation related to non-standard topologies in the TopologicalSpace namespace.
PR summary 2ff88851d5Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
|
Probably this should have a test file |
| assertNonCanonical 0 2 <|> assertNonCanonical 1 3 | ||
| let instDα ← withNaryArg 2 delab |
There was a problem hiding this comment.
I think the withNaryArg 2 delab can also be extracted to the assertNonCanonical function as the output.
There was a problem hiding this comment.
Unfortunately, doing that means that we commit to failing if this particular instance is non-canonical -- I don't think we can use <|> anymore, so behavior changes from NAND (not both canonical, at least one is non-canonical) to NOR (neither is canonical, succeeds only if both are non-canonical).
Everything else looks reasonable, though, so I'll try and bundle up a next iteration with it, thanks!
EDIT: Hmmm... Actually, this can still work, we just have to return the result unconditionally and just flag whether or not it was canonical.
There was a problem hiding this comment.
(Also, the resulting assertNonCanonical is no longer bound to TopologicalSpace and belongs somewhere more general; suggestions?)
Add tests for induced and coinduced properties in topology.
Updated ProofWidgets version to v0.0.80.
| @@ -0,0 +1,33 @@ | |||
| import Mathlib.Topology.Order | |||
There was a problem hiding this comment.
Why not Mathlib.Topology.Defs.Basic?
There was a problem hiding this comment.
I see, it's because of the bug right (might be worth explaining this in a comment too)
There was a problem hiding this comment.
Yep. Though actually, now that I think about it... while most topologies are hard to implement without importing a bunch of Set lemmas, the discrete topology probably is doable.
Also, I could just fill in the proofs with sorries. Do you think that's better or worse than a bigger export?
There was a problem hiding this comment.
I think in general you can do whatever you want in tests, even using axioms.
There was a problem hiding this comment.
What bug are we talking about?
There was a problem hiding this comment.
synthInstance and friends don't work properly in #check, #guard_target when used with opaque typeclass assumptions/variable definitions; we need an actual concrete type with an actual concrete canonical instance in order to make a linter that checks what we want, and it's actually kinda hard to make a TopologicalSpace instance without importing a whole bunch of the Set API anyway. At which point, we might as well just import Mathlib.Topology.Order, which among other things gives us the discrete topology on any type.
j-loreaux
left a comment
There was a problem hiding this comment.
@eric-wieser is there anything else you want to happen here? I would like to get this across the line soon.
|
maintainer merge |
|
🚀 Pull request has been placed on the maintainer queue by j-loreaux. |
Co-authored-by: Eric Wieser <[email protected]>
|
bors d=@eric-wieser |
|
✌️ eric-wieser can now approve this pull request. To approve and merge a pull request, simply reply with |
Add delaborators for unary and binary notation related to non-standard topologies in the TopologicalSpace namespace.