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

feat: port Data.Rat.MetaDefs #5934

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Jul 15, 2023


Open in Gitpod

This needs some eyes from people familiar with Qq

Mathbin -> Mathlib
fix certain import statements
move "by" to end of line
add import to Mathlib.lean
@eric-wieser eric-wieser added WIP Work in progress mathlib-port This is a port of a theory file from mathlib. labels Jul 15, 2023
@eric-wieser eric-wieser added t-meta Tactics, attributes or user commands help-wanted The author needs attention to resolve issues and removed WIP Work in progress labels Jul 15, 2023
/-- `Int.toExprQ α _ z _` embeds `q` as a numeral expression inside a type with `OfNat` and `-`.
-/
def Int.toExprQ {u : Lean.Level} (α : Q(Type u)) (_ : Q(Neg $α)) (z : ℤ)
(_ : let zna := z.natAbs; by exact Q(OfNat $α $zna)) : Q($α) :=
Copy link
Member Author

Choose a reason for hiding this comment

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

@gebner, is there syntax along the lines of Q(OfNat $α $(z.natAbs))? It doesn't seem to work here.

Copy link
Member

Choose a reason for hiding this comment

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

No, the antiquotations are assumed to be of type Q(_). Longer-term, it would probably be best to explicitly write toExprQ z.natAbs (bikeshed) here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, I didn't know about toExprQ (I assume it already exists?)

Copy link
Member

Choose a reason for hiding this comment

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

Not yet. See #5952. 😄

@bors bors bot changed the base branch from master to ScottCarnahan/BinomialRing2 September 17, 2023 03:24
@semorrison semorrison changed the base branch from ScottCarnahan/BinomialRing2 to master September 17, 2023 12:16
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-wanted The author needs attention to resolve issues mathlib-port This is a port of a theory file from mathlib. merge-conflict The PR has a merge conflict with master, and needs manual merging. t-meta Tactics, attributes or user commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants