Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

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

Merged
mergify[bot] merged 6 commits intomasterfrom
rwbarton-distrib
Sep 7, 2019
Merged

feat(topology/constructions): distributivity of products over sums#1059
mergify[bot] merged 6 commits intomasterfrom
rwbarton-distrib

Conversation

@rwbarton
Copy link
Copy Markdown
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
@kim-em
Copy link
Copy Markdown
Collaborator

kim-em commented May 20, 2019

Looks great.

@[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
Copy Markdown
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
Copy Markdown
Member

@ChrisHughes24 ChrisHughes24 May 20, 2019

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

Let's get this merged @sgouezel @PatrickMassot

@robertylewis
Copy link
Copy Markdown
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.

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

avigad commented Jul 3, 2019

What is the status of this PR?

@PatrickMassot
Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
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
butterthebuddha pushed a commit to butterthebuddha/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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

8 participants