Skip to content

feat: port Data.Rat.MetaDefs#5934

Open
eric-wieser wants to merge 5 commits intomasterfrom
port/Data.Rat.MetaDefs
Open

feat: port Data.Rat.MetaDefs#5934
eric-wieser wants to merge 5 commits intomasterfrom
port/Data.Rat.MetaDefs

Conversation

@eric-wieser
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@kim-em kim-em changed the base branch from ScottCarnahan/BinomialRing2 to master September 17, 2023 12:16
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 12, 2024
@vihdzp
Copy link
Copy Markdown
Collaborator

vihdzp commented Dec 26, 2025

Is this still in any way relevant?

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. (this label is managed by a bot) t-meta Tactics, attributes or user commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants