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] - feat(analysis/quaternion): add complete_space, module.free, and module.finite instances #18347

Closed
wants to merge 4 commits into from

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Feb 1, 2023

The main trick here is showing that the quaternions are in isometric equivalence with 4D euclidean space.


Open in Gitpod

@eric-wieser eric-wieser changed the title feat(analysis/quaternion): the norm of a quaternion is the L2 norm of its coefficients feat(analysis/quaternion): add complete_space, module.free, and module.finite instances Feb 2, 2023
@eric-wieser eric-wieser added the t-analysis Analysis (normed *, calculus) label Feb 2, 2023
src/algebra/quaternion.lean Outdated Show resolved Hide resolved
Comment on lines 227 to 233
def linear_equiv_tuple : ℍ[R,c₁,c₂] ≃ₗ[R] (fin 4 → R) :=
linear_equiv.symm
{ to_fun := (equiv_tuple c₁ c₂).symm,
inv_fun := (equiv_tuple c₁ c₂),
map_add' := λ v₁ v₂, rfl,
map_smul' := λ v₁ v₂, rfl,
.. (equiv_tuple c₁ c₂).symm }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry if I'm missing something obvious, but why do you need to symm everything?

Suggested change
def linear_equiv_tuple : ℍ[R,c₁,c₂] ≃ₗ[R] (fin 4 → R) :=
linear_equiv.symm
{ to_fun := (equiv_tuple c₁ c₂).symm,
inv_fun := (equiv_tuple c₁ c₂),
map_add' := λ v₁ v₂, rfl,
map_smul' := λ v₁ v₂, rfl,
.. (equiv_tuple c₁ c₂).symm }
def linear_equiv_tuple : ℍ[R,c₁,c₂] ≃ₗ[R] (fin 4 → R) :=
{ map_add' := λ v₁ v₂, rfl,
map_smul' := λ v₁ v₂, rfl,
..equiv_tuple c₁ c₂ }

Copy link
Member Author

Choose a reason for hiding this comment

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

I seem to remember that that didn't work as the proofs weren't rfl in that direction; but I can't test right now because the cache seems to be a corrupt tarball...

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, I can confirm that rfl doesn't work in your code. I added a comment explaining the symm.
You could of course spend some effort proving the harder statements, but I don't see any reason to do so.

@fpvandoorn
Copy link
Member

LGTM

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Feb 9, 2023
bors bot pushed a commit that referenced this pull request Feb 9, 2023
…module.finite` instances (#18347)

The main trick here is showing that the quaternions are in isometric equivalence with 4D euclidean space.
@bors
Copy link

bors bot commented Feb 9, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(analysis/quaternion): add complete_space, module.free, and module.finite instances [Merged by Bors] - feat(analysis/quaternion): add complete_space, module.free, and module.finite instances Feb 9, 2023
@bors bors bot closed this Feb 9, 2023
@bors bors bot deleted the eric-wieser/quaternion.norm branch February 9, 2023 19:18
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+`.) t-analysis Analysis (normed *, calculus)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants