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

[Merged by Bors] - refactor(RingTheory/TensorProduct): simplify assumptions #7403

Closed

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Sep 27, 2023

Rather than showing agreement on all the scalars in algHomOfLinearMapTensorProduct, it suffices to show agreement on 1.

This also replaces a few downstream proofs with rfl in order to make them eligible for dsimp.
These results were always true by rfl, but it was easier to make this change than fix the old proofs.


Open in Gitpod

Rather than showing agreement on all the scalars, it suffices to show agreement on `1`.
@eric-wieser eric-wieser added awaiting-review The author would like community review of the PR awaiting-CI t-algebra Algebra (groups, rings, fields etc) labels Sep 27, 2023
Comment on lines 493 to 496
def algHomOfLinearMapTensorProduct (f : A ⊗[R] B →ₗ[S] C)
(w₁ : ∀ (a₁ a₂ : A) (b₁ b₂ : B), f ((a₁ * a₂) ⊗ₜ (b₁ * b₂)) = f (a₁ ⊗ₜ b₁) * f (a₂ ⊗ₜ b₂))
(w₂ : ∀ r, f (algebraMap S A r ⊗ₜ[R] 1) = algebraMap S C r) : A ⊗[R] B →ₐ[S] C :=
{ f with
map_one' := by rw [← (algebraMap S C).map_one, ← w₂, (algebraMap S A).map_one]; rfl
map_zero' := by simp only; rw [LinearMap.toFun_eq_coe, map_zero]
map_mul' := fun x y => by
(map_mul : ∀ (a₁ a₂ : A) (b₁ b₂ : B), f ((a₁ * a₂) ⊗ₜ (b₁ * b₂)) = f (a₁ ⊗ₜ b₁) * f (a₂ ⊗ₜ b₂))
(map_one : f (1 ⊗ₜ[R] 1) = 1) : A ⊗[R] B →ₐ[S] C :=
AlgHom.ofLinearMap f map_one fun x y => by
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the main change of this PR, everything else is just fallout.

Copy link
Collaborator

@j-loreaux j-loreaux left a comment

Choose a reason for hiding this comment

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

Nice simplification!

Comment on lines 577 to 578
(map_mul : ∀ (a₁ a₂ : A) (b₁ b₂ : B), f ((a₁ * a₂) ⊗ₜ (b₁ * b₂)) = f (a₁ ⊗ₜ b₁) * f (a₂ ⊗ₜ b₂))
(map_one : f (1 ⊗ₜ[R] 1) = 1) : A ⊗[R] B →ₐ[S] C :=
Copy link
Collaborator

@j-loreaux j-loreaux Sep 27, 2023

Choose a reason for hiding this comment

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

I agree that w₁ and w₂ were terrible names, but I don't like map_mul and map_one either since they shadow the corresponding lemmas, and then it's confusing reading the source. Can we call them h_map_mul and h_map_one, or h_mul and h_one?

Also, can you fix the docstring? Is it supposed to say "from a nonzero map" or something to reflect the f 1 = 1 condition?

Aside: is there a reason not to just write f 1 = 1 in the hypothesis? I'm okay either way.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can we call them ...
Also, can you fix the docstring?

Done

Aside: is there a reason not to just write f 1 = 1 in the hypothesis? I'm okay either way.

Yes, I explained this in the new docstring

@j-loreaux
Copy link
Collaborator

bors d+

@bors
Copy link

bors bot commented Sep 27, 2023

✌️ eric-wieser 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 delegated and removed awaiting-review The author would like community review of the PR labels Sep 27, 2023
@eric-wieser
Copy link
Member Author

bors merge

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Sep 27, 2023
bors bot pushed a commit that referenced this pull request Sep 27, 2023
Rather than showing agreement on all the scalars in `algHomOfLinearMapTensorProduct`, it suffices to show agreement on `1`.

This also replaces a few downstream proofs with `rfl` in order to make them eligible for `dsimp`.
These results were always true by `rfl`, but it was easier to make this change than fix the old proofs.
@bors
Copy link

bors bot commented Sep 27, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title refactor(RingTheory/TensorProduct): simplify assumptions [Merged by Bors] - refactor(RingTheory/TensorProduct): simplify assumptions Sep 27, 2023
@bors bors bot closed this Sep 27, 2023
@bors bors bot deleted the eric-wieser/algHomOfLinearMapTensorProduct branch September 27, 2023 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants