Zulip Chat Archive

Stream: Is there code for X?

Topic: Replacing `.proj` with `.rec`


Eric Paul (Oct 29 2025 at 19:40):

It is mentioned in the doc string for docs#Lean.Expr.proj that it can be replaced by an application of the type's recursor. I was hoping to do that replacement. Has someone already written code to do this somewhere?

Kenny Lau (Oct 29 2025 at 19:50):

Welp I thought Lean.Meta.reduceProj? would do that but I couldn't get it to work :melt:

Aaron Liu (Oct 29 2025 at 19:52):

#Is there code for X? > Converting Expr projection to recursor application @ 💬

Eric Paul (Oct 29 2025 at 19:53):

Oh great, thanks! I hadn't found that

Kenny Lau (Oct 29 2025 at 19:56):

Kenny Lau said:

Welp I thought Lean.Meta.reduceProj? would do that but I couldn't get it to work :melt:

aha i figured out why, it's supposed to work with expressions like (.mk ..).1, not just foo.1


Last updated: Dec 20 2025 at 21:32 UTC