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 pi_fin.reflect instance #3430

Closed
wants to merge 8 commits into from

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Apr 13, 2023

This was skipped during the initial port of this file.

There are some golfing discussions here on Zulip that we could revisit later


Open in Gitpod

@eric-wieser eric-wieser added help-wanted The author needs attention to resolve issues awaiting-review The author would like community review of the PR t-meta Tactics, attributes or user commands awaiting-CI labels Apr 13, 2023
@eric-wieser eric-wieser requested a review from gebner April 13, 2023 22:50
@semorrison
Copy link
Contributor

This PR/issue depends on:

@gebner
Copy link
Member

gebner commented Apr 13, 2023

@eric-wieser I've pushed a commit that makes it as it gets right now.

let x : Fin 0 → ℕ := ![]
let .true ← isDefEq (toExpr x) q((![] : Fin 0 → ℕ)) | failure

#eval do
Copy link
Member Author

Choose a reason for hiding this comment

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

Is there a better pattern than #eval do here?

Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to define #assert (which can run MetaM code), but haven't done so yet. AFAIK this is as good as it gets for now.

Copy link
Contributor

Choose a reason for hiding this comment

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

By the way, isDefEq doesn't do typechecking, so it might be good to do typechecks for toExpr and toTypeExpr. See https://github.com/leanprover-community/mathlib4/blob/master/test/DeriveToExpr.lean

@eric-wieser eric-wieser removed the help-wanted The author needs attention to resolve issues label Apr 14, 2023
@semorrison
Copy link
Contributor

bors merge

@github-actions github-actions bot 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 Apr 14, 2023
bors bot pushed a commit that referenced this pull request Apr 14, 2023
This was skipped during the initial port of this file.

There are some golfing discussions [here on Zulip](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/unquoteExpr.3A.20inst.E2.9C.9D.C2.B2.2E2.20.3A.20Expr/near/349273797) that we could revisit later



Co-authored-by: Gabriel Ebner <gebner@gebner.org>
@bors
Copy link

bors bot commented Apr 14, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat: port pi_fin.reflect instance [Merged by Bors] - feat: port pi_fin.reflect instance Apr 14, 2023
@bors bors bot closed this Apr 14, 2023
@bors bors bot deleted the eric-wieser/port-Fin.reflect branch April 14, 2023 23:13
semorrison pushed a commit that referenced this pull request May 10, 2023
This was skipped during the initial port of this file.

There are some golfing discussions [here on Zulip](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/unquoteExpr.3A.20inst.E2.9C.9D.C2.B2.2E2.20.3A.20Expr/near/349273797) that we could revisit later



Co-authored-by: Gabriel Ebner <gebner@gebner.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has been sent to bors. t-meta Tactics, attributes or user commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants