Skip to content

[Merged by Bors] - Composing non_zero function with injective fun is non_zero#11244

Closed
CBirkbeck wants to merge 13 commits intomasterfrom
injective_fun_comp_lemmas
Closed

[Merged by Bors] - Composing non_zero function with injective fun is non_zero#11244
CBirkbeck wants to merge 13 commits intomasterfrom
injective_fun_comp_lemmas

Conversation

@CBirkbeck
Copy link
Copy Markdown
Collaborator

@CBirkbeck CBirkbeck commented Mar 8, 2024

Some basic missing lemmas about injective function composition. See this Zulip thread


Open in Gitpod

@CBirkbeck CBirkbeck added awaiting-review awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. labels Mar 8, 2024
@CBirkbeck CBirkbeck requested a review from eric-wieser March 8, 2024 16:08
@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Mar 8, 2024
Copy link
Copy Markdown
Contributor

@adomani adomani left a comment

Choose a reason for hiding this comment

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

Thanks!

@adomani adomani added awaiting-author A reviewer has asked the author a question or requested changes. and removed awaiting-review labels Mar 8, 2024
CBirkbeck and others added 3 commits March 8, 2024 18:46
Co-authored-by: damiano <adomani@gmail.com>
Co-authored-by: damiano <adomani@gmail.com>
Co-authored-by: damiano <adomani@gmail.com>
Copy link
Copy Markdown
Contributor

@adomani adomani left a comment

Choose a reason for hiding this comment

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

Sorry, I noticed these after my previous review!

CBirkbeck and others added 4 commits March 8, 2024 19:04
Co-authored-by: damiano <adomani@gmail.com>
Co-authored-by: damiano <adomani@gmail.com>
Co-authored-by: damiano <adomani@gmail.com>
Co-authored-by: damiano <adomani@gmail.com>
Co-authored-by: damiano <adomani@gmail.com>
Copy link
Copy Markdown
Contributor

@adomani adomani left a comment

Choose a reason for hiding this comment

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

This is surely the most corrections that I have suggested on any single line of code! 😄

@CBirkbeck
Copy link
Copy Markdown
Collaborator Author

This is surely the most corrections that I have suggested on any single line of code! 😄

Hahaha I'm sorry! I really didn't look at it very closely since most of it was written by people that know more than me!

CBirkbeck and others added 2 commits March 12, 2024 09:56
Co-authored-by: damiano <adomani@gmail.com>
Co-authored-by: damiano <adomani@gmail.com>
@CBirkbeck CBirkbeck added awaiting-review awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Mar 12, 2024
@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Mar 12, 2024
@CBirkbeck
Copy link
Copy Markdown
Collaborator Author

Ok this should be ready to go I think.

@mattrobball
Copy link
Copy Markdown
Contributor

Thanks!

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Mar 12, 2024
mathlib-bors bot pushed a commit that referenced this pull request Mar 12, 2024
@eric-wieser
Copy link
Copy Markdown
Member

bors r-

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Mar 12, 2024

Canceled.

@eric-wieser
Copy link
Copy Markdown
Member

I don't think there is ever a reason to write OfNat T 0 in mathlib over Zero T; and once you use the latter, to_additive works!

I pushed a change to that effect; please merge if you're happy with it

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Mar 12, 2024

✌️ CBirkbeck can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@github-actions github-actions bot added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Mar 12, 2024
@CBirkbeck
Copy link
Copy Markdown
Collaborator Author

bors r+

mathlib-bors bot pushed a commit that referenced this pull request Mar 13, 2024
Some basic missing lemmas about injective function composition.  See this Zulip [thread](https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/injective.20function.20composed.20with.20non.20zero.20function.20ne.20zero) 



Co-authored-by: Chris Birkbeck <c.birkbeck@uea.ac.uk>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@CBirkbeck
Copy link
Copy Markdown
Collaborator Author

I don't think there is ever a reason to write OfNat T 0 in mathlib over Zero T; and once you use the latter, to_additive works!

I pushed a change to that effect; please merge if you're happy with it

Ah yes much better! I had only used OfNat as it was the minimal think it was asking to state and prove the lemmas. But Zero T is definitely better.

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Mar 13, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title Composing non_zero function with injective fun is non_zero [Merged by Bors] - Composing non_zero function with injective fun is non_zero Mar 13, 2024
@mathlib-bors mathlib-bors bot closed this Mar 13, 2024
@mathlib-bors mathlib-bors bot deleted the injective_fun_comp_lemmas branch March 13, 2024 15:02
Comment on lines +552 to +553
g ∘ f = Function.const _ (g b) ↔ f = Function.const _ b :=
hg.comp_left.eq_iff' rfl
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
g ∘ f = Function.const _ (g b) ↔ f = Function.const _ b :=
hg.comp_left.eq_iff' rfl
g ∘ f = const _ (g b) ↔ f = const _ b := hg.comp_left.eq_iff

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 don't know what to do about these comments, now that its been merged? make a new pr?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah that would be great, thank you!

⟨injective_pi_map fun i => (hF i).injective, surjective_pi_map fun i => (hF i).surjective⟩
#align function.bijective_pi_map Function.bijective_pi_map

lemma comp_eq_const_iff (b : β) (f : α → β) {g : β → γ} (hg : Injective g) :
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
lemma comp_eq_const_iff (b : β) (f : α → β) {g : β → γ} (hg : Injective g) :
lemma comp_eq_const {b : β} {f : α → β} {g : β → γ} (hg : Injective g) :

Same below

hg.comp_left.eq_iff' rfl

@[to_additive]
lemma comp_eq_one_iff [One β] [One γ] (f : α → β) {g : β → γ} (hg : Injective g) (hg0 : g 1 = 1) :
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hg0 is a weird assumption name for something talking about 1

Copy link
Copy Markdown
Collaborator Author

@CBirkbeck CBirkbeck Mar 19, 2024

Choose a reason for hiding this comment

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

Ah its because it was a zero to start and then Eric saw that it would work more generally with a to_additive and I didn't think to change the name after.

dagurtomas pushed a commit that referenced this pull request Mar 22, 2024
Some basic missing lemmas about injective function composition.  See this Zulip [thread](https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/injective.20function.20composed.20with.20non.20zero.20function.20ne.20zero) 



Co-authored-by: Chris Birkbeck <c.birkbeck@uea.ac.uk>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@grunweg grunweg added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Mar 25, 2024
utensil pushed a commit that referenced this pull request Mar 26, 2024
Some basic missing lemmas about injective function composition.  See this Zulip [thread](https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/injective.20function.20composed.20with.20non.20zero.20function.20ne.20zero) 



Co-authored-by: Chris Birkbeck <c.birkbeck@uea.ac.uk>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
xgenereux pushed a commit that referenced this pull request Apr 15, 2024
Some basic missing lemmas about injective function composition.  See this Zulip [thread](https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/injective.20function.20composed.20with.20non.20zero.20function.20ne.20zero) 



Co-authored-by: Chris Birkbeck <c.birkbeck@uea.ac.uk>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
uniwuni pushed a commit that referenced this pull request Apr 19, 2024
Some basic missing lemmas about injective function composition.  See this Zulip [thread](https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/injective.20function.20composed.20with.20non.20zero.20function.20ne.20zero) 



Co-authored-by: Chris Birkbeck <c.birkbeck@uea.ac.uk>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
callesonne pushed a commit that referenced this pull request Apr 22, 2024
Some basic missing lemmas about injective function composition.  See this Zulip [thread](https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/injective.20function.20composed.20with.20non.20zero.20function.20ne.20zero) 



Co-authored-by: Chris Birkbeck <c.birkbeck@uea.ac.uk>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
mathlib-bors bot pushed a commit that referenced this pull request May 27, 2024
We show that Eisenstein Series are MDifferentiable

- [x] depends on: #10377 
- [x] depends on:  #11244



Co-authored-by: Chris Birkbeck <c.birkbeck@uea.ac.uk>
callesonne pushed a commit that referenced this pull request Jun 4, 2024
We show that Eisenstein Series are MDifferentiable

- [x] depends on: #10377 
- [x] depends on:  #11244



Co-authored-by: Chris Birkbeck <c.birkbeck@uea.ac.uk>
js2357 pushed a commit that referenced this pull request Jun 18, 2024
We show that Eisenstein Series are MDifferentiable

- [x] depends on: #10377 
- [x] depends on:  #11244



Co-authored-by: Chris Birkbeck <c.birkbeck@uea.ac.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! ready-to-merge This PR has been sent to bors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants