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(topology/constructions): distributivity of products over sums #1059

Merged
merged 6 commits into from
Sep 7, 2019

Conversation

rwbarton
Copy link
Collaborator

TO CONTRIBUTORS:

Make sure you have:

  • reviewed and applied the coding style: coding, naming
  • for tactics:
  • make sure definitions and lemmas are put in the right files
  • make sure definitions and lemmas are not redundant

If this PR is related to a discussion on Zulip, please include a link in the discussion.

For reviewers: code review check list

@rwbarton rwbarton requested a review from a team as a code owner May 19, 2019 23:48
@semorrison
Copy link
Collaborator

Looks great.

@@ -444,6 +444,13 @@ calc (α × (β ⊕ γ)) ≃ ((β ⊕ γ) × α) : prod_comm _ _
@[simp] theorem prod_sum_distrib_apply_right {α β γ} (a : α) (c : γ) :
prod_sum_distrib α β γ (a, sum.inr c) = sum.inr (a, c) := rfl

def sigma_prod_distrib {ι : Type*} (α : ι → Type*) (β : Type*) :
Copy link
Member

Choose a reason for hiding this comment

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

Should we call this sigma_prod and also have prod_sigma?

Copy link
Member

Choose a reason for hiding this comment

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

Usually distributivity lemmas have the equality the other way around. Then it will be consistent with sum_mul.

Copy link
Member

Choose a reason for hiding this comment

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

@rwbarton What's your opinion on this issue?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I wrote the equivalence this way because (although it's hard to tell in the case of Set/Type) the forward map is the one which exists in any category and even replacing - x β with any functor: colim F(A_i) -> F(colim A_i). You can sort of see this when I prove that this is a homeomorphism for topological spaces: the forward map (as defined here) is obviously continuous but to prove the reverse map is continuous it's easiest to show the forward map is open (after proving a bunch of stuff about open maps and sigma).

Of course it does not really matter in the end which way the equivalence points because it is an equivalence, but at least on paper I find it a useful habit to keep maps written in the "natural" direction.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I did notice the existing sum_prod_distrib and prod_sum_distrib are written in the opposite direction. I don't really have a strong opinion about which way these equivalences go but I suppose for consistency they should all go the same way.

@jcommelin
Copy link
Member

Let's get this merged @sgouezel @PatrickMassot

@robertylewis
Copy link
Member

Checking again, any comments from topology maintainers @sgouezel @PatrickMassot ? This looks good to me, except for the merge conflict -- let's get it in before there are more of those.

src/topology/maps.lean Outdated Show resolved Hide resolved
variables [topological_space α] [topological_space β] [topological_space γ]

/-- A open embedding is an embedding with open image. -/
def open_embedding (f : α → β) : Prop := embedding f ∧ is_open (range f)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Given that we have is_open_map, I think is_open_embedding would be better. (I know it is impossible to have perfect coherence here, since we already have embedding and continuous, say -- but I think I would also prefer is_embedding, by the way).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I copied open_embedding from the existing closed_embedding so for now I think this is the "most consistent" name. But we can certainly discuss what to do about is_ prefixes in general.

@avigad
Copy link
Collaborator

avigad commented Jul 3, 2019

What is the status of this PR?

@PatrickMassot
Copy link
Member

I think we are waiting only for trivial decisions (fixing a docstring typo, and choosing consistent names). @rwbarton?

Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Currently there are merge conflicts and outstanding requested changes.

@jcommelin jcommelin added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label Sep 7, 2019
@mergify mergify bot merged commit 10cb0d1 into master Sep 7, 2019
@mergify mergify bot deleted the rwbarton-distrib branch September 7, 2019 05:33
anrddh pushed a commit to anrddh/mathlib that referenced this pull request May 15, 2020
…eanprover-community#1059)

* feat(topology/constructions): distributivity of products over sums

* Update src/topology/maps.lean

Co-Authored-By: sgouezel <sebastien.gouezel@univ-rennes1.fr>

* Reverse direction of sigma_prod_distrib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants