Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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(topology): prove a space is preconnected iff every continuous ma… #16974
feat(topology): prove a space is preconnected iff every continuous ma… #16974
Changes from all commits
53ebb19
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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
function.const X tt
.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.
Why did you feel you need that less general version? Does anything break if you replace all uses of
cst_top'
withcst_top
?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.
For such statements that intuitively require no proof at all, the tradition is to compress the proof. Here you can write the exact same proof as
(without
begin
andend
, this is a proof term). For readers this is a clear indication that they don't want to see this proof.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.
You should never let such a line in a finished proof that needs to be maintainable. If someone adds a lemma to the simp set then the behavior of this line will change and the remaining part of the proof will be broken in a way that will be very difficult to diagnose. In this specific case, that line also does nothing at all in your proof.
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 line isn't used at all. It's fine for exploration, but you need to cleanup before opening a PR.
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.
Those two lines are fine for exploration, but you should remove them during cleanup. After removing them you can change
exact ⟨h₁, h₂⟩
toexact ⟨h₁ {⊤}, h₂ {⊤}⟩
(or evenexact ⟨h₁ _, h₂ _⟩
).Note that whole first implication can be written as
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.
You should leave something like
refine is_open_compl_iff.mpr _, exact hU.2
in a finished proof. This is fine for exploration, but here you clearly meanexact is_open_compl_iff.mpr hU.2
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.
Once cleaned up, that second implication reduces to
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 definition is a bad idea because it won't play well with the rest of mathlib.
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
swap
shouldn't stay in the final proof since it was only a psychological help for you.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.
It's better to avoid letting such an expensive tactic when a faster one would do the job. You could replace this proof with
⟨λ h, ⟨by tauto⟩, λ hf s, continuous_def.mp hf s (is_open_discrete s)⟩
for instance. Better, you could replace
by tauto
withλ s _, h s
which is the actual proof (you can even useshow_term
to get that proof term).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.
Introducing this definition to use it only twice is a bad idea. Either you really need a definition and you need to prove a bunch of basic lemmas about it to make it useful or you don't need it.
Everything below this point starts being really suboptimal, and I think it's more efficient to show you how to do it in a more efficient way.
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.
[decidable_pred (∈ α)]
shouldn't be in the statement since it is not needed to state the lemma. You can remove it and start the proof withclassical
.