Compare commits

...

1 Commits

Author SHA1 Message Date
Kim Morrison
126eb6bab6 chore: make getIntrosize public 2024-10-16 13:15:56 +11:00

View File

@@ -164,7 +164,11 @@ does not start with a forall, lambda or let. -/
abbrev _root_.Lean.MVarId.intro1P (mvarId : MVarId) : MetaM (FVarId × MVarId) :=
intro1Core mvarId true
private partial def getIntrosSize : Expr Nat
/--
Calculate the number of new hypotheses that would be created by `intros`,
i.e. the number of binders which can be introduced without unfolding definitions.
-/
partial def getIntrosSize : Expr Nat
| .forallE _ _ b _ => getIntrosSize b + 1
| .letE _ _ _ b _ => getIntrosSize b + 1
| .mdata _ b => getIntrosSize b