diff options
author | Son Ho | 2023-10-16 11:20:57 +0200 |
---|---|---|
committer | Son Ho | 2023-10-16 11:20:57 +0200 |
commit | 2ec2e374302c772ff2c6a26e39451b4e49e13a16 (patch) | |
tree | da523de2f105f28c995ef8da01b320074b63f366 /backends/lean/Base/Arith/Int.lean | |
parent | cbb2d05e0db6bedf9d6844f29ee25b95429b994c (diff) | |
parent | 40ed38216499ea1bf58b8acbcd05b2cd97329830 (diff) |
Merge branch 'main' into son_traits and fix some issues
Diffstat (limited to '')
-rw-r--r-- | backends/lean/Base/Arith/Int.lean | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/backends/lean/Base/Arith/Int.lean b/backends/lean/Base/Arith/Int.lean index 531ec94f..3359ecdb 100644 --- a/backends/lean/Base/Arith/Int.lean +++ b/backends/lean/Base/Arith/Int.lean @@ -211,9 +211,11 @@ def intTacPreprocess (extraPreprocess : Tactic.TacticM Unit) : Tactic.TacticM U let _ ← introHasIntPropInstances -- Extra preprocessing, before we split on the disjunctions extraPreprocess - -- Split - let asms ← introInstances ``PropHasImp.concl lookupPropHasImp - splitOnAsms asms.toList + -- Split - note that the extra-preprocessing step might actually have + -- proven the goal (by doing simplifications for instance) + Tactic.allGoals do + let asms ← introInstances ``PropHasImp.concl lookupPropHasImp + splitOnAsms asms.toList elab "int_tac_preprocess" : tactic => intTacPreprocess (do pure ()) @@ -238,7 +240,7 @@ def intTac (splitGoalConjs : Bool) (extraPreprocess : Tactic.TacticM Unit) : Ta -- the goal. I think before leads to a smaller proof term? Tactic.allGoals (intTacPreprocess extraPreprocess) -- More preprocessing - Tactic.allGoals (Utils.simpAt [] [``nat_zero_eq_int_zero] [] .wildcard) + Tactic.allGoals (Utils.tryTac (Utils.simpAt [] [``nat_zero_eq_int_zero] [] .wildcard)) -- Split the conjunctions in the goal if splitGoalConjs then Tactic.allGoals (Utils.repeatTac Utils.splitConjTarget) -- Call linarith |