Skip to content

Commit

Permalink
fix preprocessing bug in test code
Browse files Browse the repository at this point in the history
  • Loading branch information
PratherConid committed Nov 27, 2024
1 parent 769fc6c commit 0867a4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Auto/EvaluateAuto/TestCode.lean
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def runAutoOnAutoLemma (declName? : Option Name) (lem : Auto.Lemma) : MetaM Resu
let negGoalImpFalse ← Meta.withLocalDeclD `negGoal negGoal fun negGoalFVar => do
let inhLemmas ← Auto.Inhabitation.getInhFactsFromLCtx
let lctxLemmas ← Auto.collectLctxLemmas true #[]
let proofOfFalse ← Auto.runAuto declName? (lctxLemmas ++ usedThms) inhLemmas
let allLemmas ← (lctxLemmas ++ usedThms).mapM (Auto.unfoldConstAndPreprocessLemma #[])
let proofOfFalse ← Auto.runAuto declName? allLemmas inhLemmas
Meta.mkLambdaFVars #[negGoalFVar] proofOfFalse
let goal := mkApp2 (.const ``Classical.byContradiction []) body negGoalImpFalse
Meta.mkLambdaFVars bs goal
Expand Down
6 changes: 0 additions & 6 deletions Test/Bugs.lean
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,3 @@ end Set
example (x : Nat) (primeset : Nat → Prop) (dvd : Nat → Nat → Prop) :
((∃ (i : _) (i_1 : primeset i), dvd i x) ↔ (∃ p, primeset p ∧ dvd p x)) := by
auto

-- bug
set_option trace.auto.tactic true in
#eval do
let m ← Auto.runAutoOnConst ``Nat.sub_one_lt_of_lt
trace[auto.tactic] m!"{m}"

0 comments on commit 0867a4d

Please sign in to comment.