Zulip Chat Archive

Stream: mathlib4

Topic: resolve projection notation


Floris van Doorn (Feb 02 2023 at 19:05):

In the MetaM monad, I have a (fully-elaborated) expression e : Expr that has a structure as its type and a projection name projName : Name (that could be the projection of a parent structure. I want to elaborate the projection e.projName and get that as a new expression. Is there some convenient way to do this? I tried q($e.$projName) which doesn't work (not too surprisingly). I could try to call the private declaration Lean.Elab.Term.mkBaseProjections which roughly does this, but I was wondering if there is a nicer way.


Last updated: Dec 20 2023 at 11:08 UTC