Skip to content

Conversation

@uzytkownik
Copy link
Contributor

No description provided.

Copy link
Collaborator

@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.

Thanks for the great PR! I've added a few comments.

where open ≡-Reasoning

combine-surjective : {n k} (x : Fin (n ℕ.* k)) Σ[ y ∈ Fin n ] Σ[ z ∈ Fin k ] combine y z ≡ x
combine-surjective {n} {k} x with remQuot {n} k x | P.inspect (remQuot {n} k) x
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we use the new with ... <- ... idiom instead of inspect? (see #1630 for an attempt to deprecate it.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

combine-surjective :  {n k} (x : Fin (n ℕ.* k))  Σ[ y ∈ Fin n ] Σ[ z ∈ Fin k ] combine y z ≡ x
combine-surjective {n} {k} x with remQuot {n} k x in eq
... | y , z = y , z , (begin
  combine y z                       ≡˘⟨ uncurry (cong₂ combine) (,-injective eq) ⟩
  uncurry combine (remQuot {n} k x) ≡⟨ combine-remQuot {n} k x ⟩
  x ∎)
  where open ≡-Reasoning

causes

Panic: uncaught pattern violation

What agda version I need to have?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Eek, that's scary. Agda 2.6.2 should be fine. If you're on that and the issue is still occuring, then I would open an issue on the main Agda repo with a cut-down example, and then I guess you'll need to switch back to inspect 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have 2.6.2.1. I will create an issue.

@MatthewDaggitt
Copy link
Collaborator

Thanks again for the PR!

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.

2 participants