-
Notifications
You must be signed in to change notification settings - Fork 449
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
feat: allow explicit mode with field notation #5528
Conversation
Now one can write `@x.f`, `@(x).f`, `@x.1`, `@(x).1`, and so on. This fixes an issue where structure instance update notation (like `{x with a := a'}`) could fail if the field `a` had a type with implicit, optional, or auto parameters. Closes leanprover#5406.
Mathlib CI status (docs):
|
isn't this ambiguous? If |
@digama0 The current precedence rules have Dot notation doesn't work when |
[lean4#5528](leanprover/lean4#5528) fixes some issues with how structure instance notation expands, which breaks `OrderIso.mapSetOfMaximal`. This PR manually expands the spread notation. For the curious, this definition is making use of both the implicit lambda feature and implicit arguments in `map_rel_iff' := f.map_rel_iff`. Concretely, this is equivalent to `map_rel_iff' {_ _} := f.map_rel_iff _ _` where the `_`'s don't match up.
[lean4#5528](leanprover/lean4#5528) fixes some issues with how structure instance notation expands, which breaks `OrderIso.mapSetOfMaximal`. This PR manually expands the spread notation. For the curious, this definition is making use of both the implicit lambda feature and implicit arguments in `map_rel_iff' := f.map_rel_iff`. Concretely, this is equivalent to `map_rel_iff' {_ _} := f.map_rel_iff _ _` where the `_`'s don't match up.
What do you mean? (web editor)
|
@alreadydone Discussion about that here |
Now one can write
@x.f
,@(x).f
,@x.1
,@(x).1
, and so on.This fixes an issue where structure instance update notation (like
{x with a := a'}
) could fail if the fielda
had a type with implicit, optional, or auto parameters.Closes #5406