Closed kmill closed 3 days ago
This almost addresses #5482. If there were the additional features from #1629 (see comments), then declarations could be exported into a different namespace and then be used with different types.
Mathlib CI status (docs):
This PR changes how generalized field notation ("dot notation") resolves the function. The new resolution rule is that if
x : S
, thenx.f
resolves the nameS.f
relative to the root namespace (hence it now affected byexport
andopen
). Breaking change: aliases now resolve differently. Before, ifx : S
, and ifS.f
is an alias forS'.f
, thenx.f
would useS'.f
and look for an argument of typeS'
. Now, it looks for an argument of typeS
, which is more generally useful behavior. Code making use of the old behavior should consider definingS
orS'
in terms of the other, since dot notation can unfold definitions during resolution.This also fixes a bug in explicit-mode generalized field notation (
@x.f
) wherex
could be passed as the wrong argument. This was not a bug for explicit-mode structure projections.Closes #3031. Addresses the
Function
namespace issue in #1629.