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(data/matrix): has_repr instances for fin vectors and matrices #7953

Closed
wants to merge 2 commits into from

Conversation

Vierkantor
Copy link
Collaborator

This PR provides has_repr instances for the types fin n → α and matrix (fin m) (fin n) α, displaying in the ![...] matrix notation. This is especially useful if you want to #eval a calculation involving matrices.

Based on this Zulip post.


Open in Gitpod

@Vierkantor Vierkantor added the awaiting-review The author would like community review of the PR label Jun 15, 2021
This PR provides `has_repr` instances for the types `fin n → α` and `matrix (fin m) (fin n) α`, displaying in the `![...]` matrix notation. This is especially useful if you want to `#eval` a calculation involving matrices.
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Copy link
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

Just to check, this only impacts eval and not the goal view, right? I don't think showing A : matrix (fin 1) (fin 1) := ![![A 0 0]] is particularly useful, especially for fin 10!

@Vierkantor
Copy link
Collaborator Author

Just to check, this only impacts eval and not the goal view, right? I don't think showing A : matrix (fin 1) (fin 1) := ![![A 0 0]] is particularly useful, especially for fin 10!

Yes, the goal view still shows A as A. As far as I am aware of, only #eval and a couple tactics call repr on values, in other cases everything works by calling to_tactic_format on exprs.

@Vierkantor
Copy link
Collaborator Author

(Just restarted the "cancel previous runs" job that failed. It almost seems like it tried to cancel itself!)

@eric-wieser
Copy link
Member

bors r+

@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 Jun 16, 2021
bors bot pushed a commit that referenced this pull request Jun 17, 2021
#7953)

This PR provides `has_repr` instances for the types `fin n → α` and `matrix (fin m) (fin n) α`, displaying in the `![...]` matrix notation. This is especially useful if you want to `#eval` a calculation involving matrices.

[Based on this Zulip post.](https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/Matrix.20operations/near/242766110)



Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
@bors
Copy link

bors bot commented Jun 17, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(data/matrix): has_repr instances for fin vectors and matrices [Merged by Bors] - feat(data/matrix): has_repr instances for fin vectors and matrices Jun 17, 2021
@bors bors bot closed this Jun 17, 2021
@bors bors bot deleted the repr_matrix_notation branch June 17, 2021 02:48
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+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants