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: port Algebra.Quaternion #3776

Closed
wants to merge 16 commits into from

Conversation

urkud
Copy link
Member

@urkud urkud commented May 3, 2023


The section about DivisionRing instance fails, even with η-experiment. I don't know how to fix it.

Open in Gitpod

urkud added 5 commits May 3, 2023 03:09
Mathbin -> Mathlib
fix certain import statements
move "by" to end of line
add import to Mathlib.lean
@@ -55,19 +55,19 @@ quaternion
-/


/- ./././Mathport/Syntax/Translate/Command.lean:429:34: infer kinds are unsupported in Lean 4: mk {} -/
/-- Quaternion algebra over a type with fixed coefficients $a=i^2$ and $b=j^2$.
Implemented as a structure with four fields: `re`, `im_i`, `im_j`, and `im_k`. -/
Copy link
Member

Choose a reason for hiding this comment

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

Note these names in comments will need fixing.

@@ -1716,6 +1716,10 @@ theorem toNat_cast (n : ℕ) : Cardinal.toNat n = n := by
exact (Classical.choose_spec (lt_aleph0.1 (nat_lt_aleph0 n))).symm
#align cardinal.to_nat_cast Cardinal.toNat_cast

@[simp]
theorem toNat_ofNat (n : ℕ) [n.AtLeastTwo] : Cardinal.toNat (OfNat.ofNat n) = OfNat.ofNat n :=
Copy link
Member

Choose a reason for hiding this comment

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

Why n.AtLeastTwo?

Copy link
Member Author

@urkud urkud May 3, 2023

Choose a reason for hiding this comment

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

See https://leanprover-community.github.io/mathlib4_docs/Mathlib/Data/Nat/Cast/Defs.html#instOfNat
We have separate instances for OfNat R 0, OfNat R 1, and [n.AtLeastTwo] : OfNat R n.

@urkud urkud added the help-wanted The author needs attention to resolve issues label May 5, 2023
@int-y1 int-y1 added the mathlib-port This is a port of a theory file from mathlib. label May 6, 2023
@ChrisHughes24 ChrisHughes24 added awaiting-review The author would like community review of the PR and removed help-wanted The author needs attention to resolve issues labels May 20, 2023
Copy link
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.

Thanks 🎉

bors merge

@semorrison semorrison added ready-to-merge This PR has been sent to bors. and removed awaiting-review The author would like community review of the PR labels May 21, 2023
bors bot pushed a commit that referenced this pull request May 22, 2023
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: ChrisHughes24 <chrishughes24@gmail.com>
Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>
@bors
Copy link

bors bot commented May 22, 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 feat: port Algebra.Quaternion [Merged by Bors] - feat: port Algebra.Quaternion May 22, 2023
@bors bors bot closed this May 22, 2023
@bors bors bot deleted the port/Algebra.Quaternion branch May 22, 2023 03:12
qawbecrdtey pushed a commit to qawbecrdtey/greedoid-mathlib4 that referenced this pull request Jun 12, 2023
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: ChrisHughes24 <chrishughes24@gmail.com>
Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mathlib-port This is a port of a theory file from mathlib. ready-to-merge This PR has been sent to bors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants