Skip to content

associativity for vectors #1621

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
merged 4 commits into from
Nov 20, 2021
Merged

Conversation

sergey-goncharov
Copy link
Contributor

Unclear, why it was not there. But it is provable.

Copy link
Contributor

@MatthewDaggitt MatthewDaggitt left a comment

Choose a reason for hiding this comment

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

Unclear, why it was not there.

Nothing is there until someone adds it!

Thanks, looks like a great addition. In addition to the formatting, please could you add a corresponding entry to the CHANGELOG.md file?

@sergey-goncharov
Copy link
Contributor Author

Nothing is there until someone adds it!

Right. I've been unsure, if there are any reasons for not having it there. Incidentally https://github.com/agda/agda-stdlib/blob/master/src/Data/Vec/Properties/WithK.agda contains a different proof under K, which confused me, because I nearly though that K is needed for associativity.

@MatthewDaggitt
Copy link
Contributor

Incidentally https://github.com/agda/agda-stdlib/blob/master/src/Data/Vec/Properties/WithK.agda contains a different proof under K, which confused me, because I nearly though that K is needed for associativity.

So the difference is that the proof under WithK is for (heterogeneous) propositional equality, whereas you have proved it for pointwise equality which is a slightly weaker notion. You haven't proved the results are equal, you've proved that all the elements are equal.

@sergey-goncharov
Copy link
Contributor Author

Incidentally https://github.com/agda/agda-stdlib/blob/master/src/Data/Vec/Properties/WithK.agda contains a different proof under K, which confused me, because I nearly though that K is needed for associativity.

So the difference is that the proof under WithK is for (heterogeneous) propositional equality, whereas you have proved it for pointwise equality which is a slightly weaker notion. You haven't proved the results are equal, you've proved that all the elements are equal.

OK, I am seeing it now. Ineed, I've been just assuming that the pointwise equality is the only desirable notion of equality for vectors, but yes, propositional equality always remains a (potentially problematic) alternative. Thank you for clarification!

@MatthewDaggitt
Copy link
Contributor

Thanks, I'm marking this as done, but we're currently having issues with the test suite so I won't merge it in until we resolve that, apologies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants