Skip to content

Commit

Permalink
Merge pull request #43 from lean-dojo/dev
Browse files Browse the repository at this point in the history
Ignore namespace prefix to theorem names
  • Loading branch information
Peiyang-Song authored Dec 10, 2023
2 parents f84d2a6 + c804ed8 commit 6c0976c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion LeanCopilot/LlmAesop.lean
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def tacGen : Aesop.TacGen := fun (mvarId : MVarId) => do
-- TODO: Use a more pincipled way, e.g., see Lean4Repl.lean in LeanDojo.
let theoremName := match (← liftM (m := MetaM) <| Term.TermElabM.run getDeclName?).1.get! |>.toString with
| "_example" => ""
| n => n
| n => (n.splitOn ".").getLast!
let theoremNameMatcher := String.Matcher.ofString theoremName
let filteredSuggestions := suggestions.filterMap fun ((t, s) : String × Float) =>
let isAesop := t == "aesop"
Expand Down
2 changes: 1 addition & 1 deletion LeanCopilot/Tactics.lean
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def suggestTactics (targetPrefix : String) : TacticM (Array (String × Float)) :
-- TODO: Use a more pincipled way, e.g., see Lean4Repl.lean in LeanDojo.
let theoremName := match (← getDeclName?).get! |>.toString with
| "_example" => ""
| n => n
| n => (n.splitOn ".").getLast!
let theoremNameMatcher := String.Matcher.ofString theoremName
if ← isVerbose then
logInfo s!"State:\n{state}"
Expand Down

0 comments on commit 6c0976c

Please sign in to comment.