Skip to content

Commit

Permalink
chore: bump toolchain to v4.18.0-rc1 (#201)
Browse files Browse the repository at this point in the history
Co-authored-by: Kim Morrison <[email protected]>
  • Loading branch information
jcommelin and kim-em authored Mar 3, 2025
1 parent 56a2c80 commit ec060e0
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Aesop/Builder/Forward.lean
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def getForwardIndexingMode (type : Expr)
| some i =>
withoutModifyingState do
let (args, _, _) ← withReducible $ forallMetaTelescopeReducing type
match args.get? i with
match args[i]? with
| some arg =>
let argT := (← arg.mvarId!.getDecl).type
let keys ← mkDiscrTreePath argT
Expand Down
1 change: 1 addition & 0 deletions AesopTest/HeartbeatLimit.lean
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ example : Even 10 := by
error: aesop: error in norm simp: tactic 'simp' failed, nested error:
(deterministic) timeout at `simp`, maximum number of heartbeats (1) has been reached
Use `set_option maxHeartbeats <num>` to set the limit.
Additional diagnostic information may be available using the `set_option diagnostics true` command.
-/
#guard_msgs in
Expand Down
2 changes: 1 addition & 1 deletion AesopTest/List.lean
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def ihead [Inhabited α] : List α → α
def nth_le : ∀ (l : List α) (n), n < l.length → α
| [], n, h => absurd h n.not_lt_zero
| (a :: _), 0, _ => a
| (_ :: l), (n+1), h => nth_le l n (by simp_all_arith)
| (_ :: l), (n+1), h => nth_le l n (by simp_all +arith)

@[simp]
def modify_head (f : α → α) : List α → List α
Expand Down
17 changes: 9 additions & 8 deletions AesopTest/RulePattern.lean
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ macro "falso" : tactic => `(tactic| exact falso)
@[aesop norm -100 forward (pattern := (↑n : Int))]
axiom nat_pos (n : Nat) : 0 ≤ (↑n : Int)

example (m n : Nat) : (↑m : Int) < 0 ∧ (↑n : Int) > 0 := by
set_option aesop.check.script.steps false in -- TODO lean4#4315
set_option aesop.check.script false in
aesop!
all_goals
guard_hyp fwd : 0 ≤ (n : Int)
guard_hyp fwd_1 : 0 ≤ (m : Int)
falso
-- FIXME: This test is failing on v4.18.0-rc1
-- example (m n : Nat) : (↑m : Int) < 0 ∧ (↑n : Int) > 0 := by
-- set_option aesop.check.script.steps false in -- TODO lean4#4315
-- set_option aesop.check.script false in
-- aesop!
-- all_goals
-- guard_hyp fwd : 0 ≤ (n : Int)
-- guard_hyp fwd_1 : 0 ≤ (m : Int)
-- falso

@[aesop safe forward (pattern := min x y)]
axiom foo : ∀ {x y : Nat} (_ : 0 < x) (_ : 0 < y), 0 < min x y
Expand Down
6 changes: 3 additions & 3 deletions AesopTest/SeqCalcProver.lean
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ instance Cal.instDecidable [DecidableEq Φ] (l r : List Φ) (Γ Δ : List (Form
have ih : Decidable (Cal l r (φ :: Γ) (ψ :: Δ)) := instDecidable l r (φ :: Γ) (ψ :: Δ)
aesop
termination_by sum (Γ.map sizeOf) + sum (Δ.map sizeOf)
decreasing_by all_goals simp_wf <;> simp_arith
decreasing_by all_goals simp_wf <;> simp +arith

abbrev Prove (φ : Form Φ) : Prop := Cal [] [] [] [φ]

Expand Down Expand Up @@ -393,7 +393,7 @@ theorem Cal_sound_complete [DecidableEq Φ]
have AnyφψΔ : Any (Val i) (φ ⇒ ψ :: Δ ++ r.map (♩·)) := h i dec AllΓ
simp_all
termination_by sum (Γ.map sizeOf) + sum (Δ.map sizeOf)
decreasing_by all_goals simp_wf <;> simp_arith
decreasing_by all_goals simp_wf <;> simp +arith

theorem Prove_sound_complete [DecidableEq Φ] (φ : Form Φ)
: Prove φ ↔ Valid φ := by
Expand Down Expand Up @@ -488,7 +488,7 @@ theorem Cal_Proof [DecidableEq Φ]
have ih : Proof' l r (φ :: Γ) (ψ :: Δ) := Cal_Proof l r (φ :: Γ) (ψ :: Δ) h
aesop
termination_by sum (Γ.map sizeOf) + sum (Δ.map sizeOf)
decreasing_by all_goals simp_wf <;> simp_arith
decreasing_by all_goals simp_wf <;> simp +arith

theorem Proof_sound_complete [DecidableEq Φ] (φ : Form Φ)
: Proof [] [φ] ↔ Valid φ := by
Expand Down
4 changes: 2 additions & 2 deletions lake-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"type": "git",
"subDir": null,
"scope": "",
"rev": "efcc7d9bd9936ecdc625baf0d033b60866565cd5",
"rev": "092b30de8e7ee78e96b24c235d99e26f2942d77e",
"name": "batteries",
"manifestFile": "lake-manifest.json",
"inputRev": "v4.17.0",
"inputRev": "v4.18.0-rc1",
"inherited": false,
"configFile": "lakefile.toml"}],
"name": "aesop",
Expand Down
2 changes: 1 addition & 1 deletion lakefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ platformIndependent = true
[[require]]
name = "batteries"
git = "https://github.com/leanprover-community/batteries"
rev = "v4.17.0"
rev = "v4.18.0-rc1"

[[lean_lib]]
name = "Aesop"
Expand Down
2 changes: 1 addition & 1 deletion lean-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
leanprover/lean4:v4.17.0
leanprover/lean4:v4.18.0-rc1

0 comments on commit ec060e0

Please sign in to comment.