-
Notifications
You must be signed in to change notification settings - Fork 336
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
DefEq transitivity failures for eta #2258
Comments
arthur-adjedj
added a commit
to arthur-adjedj/lean4
that referenced
this issue
Jul 17, 2023
Fixes a failure of transitivity of the DefEq by extending the criteria for which a type may be considered unit-like. Now, any arrow-type for which the codomain is unit-like, and any structure for which all fields are themselves unit-like are considered unit-like. Closes leanprover#2258
arthur-adjedj
added a commit
to arthur-adjedj/lean4
that referenced
this issue
Jul 17, 2023
Fixes a failure of transitivity of the DefEq by extending the criteria for which a type may be considered unit-like. Now, any arrow-type for which the codomain is unit-like, and any structure for which all fields are themselves unit-like is considered unit-like. Closes leanprover#2258
arthur-adjedj
added a commit
to arthur-adjedj/lean4
that referenced
this issue
Jul 17, 2023
Fixes a failure of transitivity of the DefEq by extending the criteria for which a type may be considered unit-like. Now, any arrow-type for which the codomain is unit-like, and any structure for which all fields are themselves unit-like is considered unit-like. Closes leanprover#2258
arthur-adjedj
added a commit
to arthur-adjedj/lean4
that referenced
this issue
Jul 17, 2023
Fixes a failure of transitivity of the DefEq by extending the criteria for which a type may be considered unit-like. Now, any arrow-type for which the codomain is unit-like, and any structure for which all fields are themselves unit-like is considered unit-like. Closes leanprover#2258
I've taken the liberty of making a fix for this issue on a fork, by extending the criteria for which a type may be considered unit-like. Would a PR for this be welcomed ? |
arthur-adjedj
added a commit
to arthur-adjedj/lean4
that referenced
this issue
Jul 19, 2023
Fixes a failure of transitivity of the DefEq by extending the criteria for which a type may be considered unit-like. Now, any arrow-type for which the codomain is unit-like, and any structure for which all fields are themselves unit-like is considered unit-like. Closes leanprover#2258
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Description
The criteria for
isDefEqUnitLike
is not strong enough, and leads to failures of transitivity of the definitional equality:Steps to Reproduce
Expected behavior: All these examples should work
Actual behavior: some fail
Reproduces how often: 100%
Versions
4.0.0-nightly-2023-06-01
Additional Information
Agda supports eta-for-unit defeq, and uses a type-based approach similar to lean's for its record types and arrow types. Currently in lean, unit-like types are inductive types with one constructor and no fields in said constructor. The fix would be to extend this criteria such that any arrow type whose codomain is unit-like is itself unit-like, and any structure-like inductive for which all fields are unit-like is itself unit-like.
The text was updated successfully, but these errors were encountered: