Skip to content

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

Closed
CBirkbeck wants to merge 13 commits into
masterfrom
injective_fun_comp_lemmas
Closed

CBirkbeck wants to merge 13 commits into
masterfrom
injective_fun_comp_lemmas

Conversation

@CBirkbeck

@CBirkbeck CBirkbeck commented Mar 8, 2024 •

Copy link
Copy Markdown
Collaborator

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

@adomani adomani left a comment

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.

Thanks!

Comment thread Mathlib/Algebra/Group/Pi/Basic.lean Resolved
Comment thread Mathlib/Algebra/Group/Pi/Basic.lean Resolved
Comment thread Mathlib/Algebra/Group/Pi/Basic.lean Resolved
@adomani adomani added awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. and removed awaiting-review labels Mar 8, 2024

@adomani adomani left a comment

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.

Sorry, I noticed these after my previous review!

Comment thread Mathlib/Algebra/Group/Pi/Basic.lean Resolved
Comment thread Mathlib/Algebra/Group/Pi/Basic.lean Resolved
Comment thread Mathlib/Algebra/Group/Pi/Basic.lean Resolved
Comment thread Mathlib/Algebra/Group/Pi/Basic.lean Resolved
Comment thread Mathlib/Algebra/Group/Pi/Basic.lean Resolved
Comment thread Mathlib/Algebra/Group/Pi/Basic.lean Resolved

@adomani adomani left a comment

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.

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

Comment thread Mathlib/Algebra/Group/Pi/Basic.lean Resolved
Comment thread Mathlib/Algebra/Group/Pi/Basic.lean Resolved
@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 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 Reply -awaiting-author to remove the label on your PR once you have addressed all comments. 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
Comment thread Mathlib/Algebra/Group/Pi/Basic.lean Resolved
@eric-wieser

Copy link
Copy Markdown
Member

bors r-

@mathlib-bors

mathlib-bors Bot commented Mar 12, 2024

Copy link
Copy Markdown
Contributor

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

mathlib-bors Bot commented Mar 12, 2024

Copy link
Copy Markdown
Contributor

✌️ 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+

@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

mathlib-bors Bot commented Mar 13, 2024

Copy link
Copy Markdown
Contributor

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

@CBirkbeck CBirkbeck Mar 19, 2024 •

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.

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.

@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
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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