-
Notifications
You must be signed in to change notification settings - Fork 5
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
Agda 2.6.4 #9
Merged
Merged
Agda 2.6.4 #9
Commits on Feb 17, 2024
-
With this Agda version there were changes [1] to instance resolution algorithm, from agda changelog: [Breaking] The algorithm for resolution of instance arguments has been simplified. It will now only rely on the type of instances to determine which candidate it should use, and no longer on their values. I've found this thread [2] at zulip, which might be helpful, but I don't know how to fix the issues at felix yet. [1] https://github.com/agda/agda/blob/master/doc/release-notes/2.6.4.md#language [2] https://agda.zulipchat.com/#narrow/stream/238741-general/topic/Issue.20with.20instance.20search.20changes.20in.202.2E6.2E4/near/384560563
Configuration menu - View commit details
-
Copy full SHA for e7b6eae - Browse repository at this point
Copy the full SHA e7b6eaeView commit details -
Configuration menu - View commit details
-
Copy full SHA for cb01908 - Browse repository at this point
Copy the full SHA cb01908View commit details -
Furthermore I've added explicit implicit ;) arguments to `Equivalent` fields. Those are actually important and it is impossible to follow hint that was stated in the `TODO` comment, that used to said: > TODO: move a and b arguments from methods to record. Without those implicit args, definitions like: ```agda ∘≈ : ∀ {f g : a ⇨ b} {h k : b ⇨ c} → h ≈ k → f ≈ g → h ∘ f ≈ k ∘ g ``` wouldn't typecheck as the `Equivalent` would lock it's variables during instantiation and we could use only those two (`a` & `b` in this case). `_≈_` would reject morphisms `h` & `k` here as it's objects would be different. There is additional `TODO` comment that says: > TODO: Replace Equivalent by Setoid? Actually moving variables mentioned above would almost turn Equivalent into Setoid (minus `Carrier` as a field). Which isn't really feasible for the reasons already mentioned. I've took a peek how agda-categoris does it [3] and they basically put `Equivalent` into definition of `Category` and call it _Setoid enriched_. I've played with that for a bit. Initially putting `_≈_` into lawful category. That didn't work out however because we need `_≈_` for defining different kinds homomorphisms, where we don't have lawful classes in scope. So I've moved it to the raw `Category`, but the problem with definitions that use multiple equalities still persists. I think that restricting the opening of `Category` class would be too cumbersome. So I think this split to `Equivalent` works nice. I do wonder however if it's worth doing the instance search, if most of the time one has to manually open appropriate one? I've also updated the readme to reflect supported versions. [3] https://github.com/agda/agda-categories/blob/master/src/Categories/Category/Core.agda#L21
Configuration menu - View commit details
-
Copy full SHA for 1fda328 - Browse repository at this point
Copy the full SHA 1fda328View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e29554 - Browse repository at this point
Copy the full SHA 0e29554View commit details -
Move isEquivalence to ≈-Reasoning
Turns out agda can infer proper Equivalent typeclass from the use of `_≈_`, based on the arguments. What is problematic are the implicit arguments to the `trans`, `sym` (and `refl`). But those are used in the proofs. I've noticed that agda-categories [1] put those operators inside their equivalent of `≈-Reasoning` which can (even have to) be opened independently of `Equivalent`. This way we can keep `Equivalent` open in `public` and enjoy nice definitions. What we need to do is a little extra work of opening `≈-Reasoning` with proper Equivalent instance as parameter. In order to signify the change standard functions were renamed: - refl to refl≈ - sym to sym≈ - trans to _;_ I didn't removed flipped trans (_•_) as there were some uses of it in the code. We can remove them separately if that'll be deemed necessary. [1] https://github.com/agda/agda-categories/blob/master/src/Categories/Category/Core.agda#L90
Configuration menu - View commit details
-
Copy full SHA for a8ee9f6 - Browse repository at this point
Copy the full SHA a8ee9f6View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.