feat: make anonymous instance names not include proofs (#3934)

This commit is contained in:
Kyle Miller 2024-04-17 12:41:34 -07:00 committed by GitHub
parent 11a9d2ee4b
commit 319940da77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -51,6 +51,8 @@ Expressions can also be replaced by `.bvar 0` if they shouldn't be mentioned.
-/
private partial def winnowExpr (e : Expr) : MetaM Expr := do
let rec visit (e : Expr) : MonadCacheT Expr Expr MetaM Expr := checkCache e fun _ => do
if ← isProof e then
return .bvar 0
match e with
| .app .. =>
if let some e' ← getParentProjArg e then