AdithyaSK's picture
AdithyaSK HF Staff
Add files using upload-large-folder tool
8344c43 verified
|
Raw History Blame Contribute Delete
1.33 kB
Fix the following issue:
## Problem Statement
I'm working with a custom ACSet implementation, and `elements(mySet)` immediately throws a MethodError; I hit the same kind of MethodError when passing one of these ACSet instances as the sample `typ` to `inverse_elements` for both an Elements object and an Elements morphism.
## Expected Outcomes
- `elements` should work for ACSet instances beyond the built-in struct-backed cases, producing an `Elements` value that reflects the input instance instead of failing during method lookup.
- `inverse_elements` should accept an ACSet instance as the sample `typ` when converting an `AbstractElements` value back, and should return the corresponding ACSet result rather than a method-dispatch failure.
- `inverse_elements` should also accept an ACSet instance as the sample `typ` when converting an Elements morphism back, and should return the corresponding ACSet transformation rather than a method-dispatch failure.
- Existing behavior for struct-backed ACSets should remain compatible.
## Implementation Notes
The concrete data structures, validation locations, and code organization are up to the implementer. The fix should be driven by the public behavior of ACSet values participating in the category-of-elements round trip, not by special-casing only one test fixture.