Skip to content

Commit

Permalink
BuiltinRules.Intros: use getIntrosSize from core
Browse files Browse the repository at this point in the history
We now use the (private) function `getIntrosSize` from core instead of
copy-pasting it. This should future-proof Aesop for the changes in
leanprover/lean4#3115.
  • Loading branch information
JLimperg committed Jan 9, 2024
1 parent 6940439 commit 2ae78a4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Aesop/BuiltinRules/Intros.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ Authors: Jannis Limperg, Kyle Miller
-/

import Aesop.Frontend.Attribute
import Std.Tactic.OpenPrivate

open Lean
open Lean.Meta

namespace Aesop.BuiltinRules

private def getIntrosSize : Expr → Nat
| .forallE _ _ b _ => getIntrosSize b + 1
| .letE _ _ _ b _ => getIntrosSize b + 1
| .mdata _ b => getIntrosSize b
| _ => 0
open private getIntrosSize in Lean.MVarId.intros

/-- Introduce as many binders as possible while unfolding definitions with the
ambient transparency. -/
Expand Down

0 comments on commit 2ae78a4

Please sign in to comment.