Skip to content

Commit

Permalink
chore: add assertion
Browse files Browse the repository at this point in the history
A global theorem should not have free variables in `symbols`.
  • Loading branch information
leodemoura committed Dec 30, 2024
1 parent 24a8561 commit 1f3919f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Lean/Meta/Tactic/Grind/TheoremPatterns.lean
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ def addTheoremPattern (declName : Name) (numParams : Nat) (patterns : List Expr)
let us := info.levelParams.map mkLevelParam
let proof := mkConst declName us
let (patterns, symbols, bvarFound) ← NormalizePattern.main patterns
assert! symbols.all fun s => s matches .const _
trace[grind.pattern] "{declName}: {patterns.map ppPattern}"
if let .missing pos ← checkCoverage proof numParams bvarFound then
let pats : MessageData := m!"{patterns.map ppPattern}"
Expand Down

0 comments on commit 1f3919f

Please sign in to comment.