Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update mathlib #672

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions SSA/Projects/InstCombine/ForLean.lean
Original file line number Diff line number Diff line change
Expand Up @@ -469,13 +469,6 @@ theorem and_add_or {A B : BitVec w} : (B &&& A) + (B ||| A) = B + A := by
<;> cases carry i B A false
<;> rfl

@[simp] theorem getMsb_not (x : BitVec w) :
(~~~x).getMsbD i = (decide (i < w) && !(x.getMsbD i)) := by
by_cases h : i < w <;> simp [getMsbD, h] ; omega

@[simp] theorem msb_not (x : BitVec w) : (~~~x).msb = (decide (0 < w) && !x.msb) := by
simp [BitVec.msb]

@[simp] theorem msb_signExtend_of_ge {i} (h : i ≥ w) (x : BitVec w) :
(x.signExtend i).msb = x.msb := by
simp [BitVec.msb_eq_getLsbD_last, getLsbD_signExtend]
Expand Down Expand Up @@ -522,21 +515,6 @@ theorem zero_ushiftRight {w n : Nat} :
· simp [BitVec.msb_allOnes h]
· simp

theorem not_sshiftRight {b : BitVec w} :
~~~b.sshiftRight n = (~~~b).sshiftRight n := by
ext i
simp [getLsbD_sshiftRight]
by_cases h : w ≤ i
<;> by_cases h' : n + i < w
<;> by_cases h'' : 0 < w
<;> simp [h, h', h'']
<;> omega

@[simp]
theorem not_sshiftRight_not {x : BitVec w} {n : Nat} :
~~~((~~~x).sshiftRight n) = x.sshiftRight n := by
simp [not_sshiftRight]

attribute [simp] shiftLeft_ushiftRight

theorem ofInt_neg_one : BitVec.ofInt w (-1) = -1#w := by
Expand Down
5 changes: 3 additions & 2 deletions SSA/Projects/InstCombine/TacticAuto.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import SSA.Projects.InstCombine.ForLean
import SSA.Projects.InstCombine.LLVM.EDSL
import SSA.Experimental.Bits.Fast.Tactic
import Std.Tactic.BVDecide
import Leanwuzla
-- import Leanwuzla

attribute [simp_llvm_case_bash]
BitVec.Refinement.refl BitVec.Refinement.some_some BitVec.Refinement.none_left
Expand Down Expand Up @@ -180,6 +180,7 @@ macro "alive_auto": tactic =>
macro "bv_compare'": tactic =>
`(tactic|
(
bv_compare "/usr/local/bin/bitwuzla"
-- bv_compare "/usr/local/bin/bitwuzla"
sorry
)
)
18 changes: 4 additions & 14 deletions lake-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "cfb438195e4513212997bdff25a436c1e99a3440",
"rev": "e7da8aa8232793f23492830aa0a11dece54371a2",
"name": "batteries",
"manifestFile": "lake-manifest.json",
"inputRev": "nightly-testing",
Expand All @@ -25,7 +25,7 @@
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "a895713f7701e295a015b1087f3113fd3d615272",
"rev": "50aaaf78b7db5bd635c19c660d59ed31b9bc9b5a",
"name": "aesop",
"manifestFile": "lake-manifest.json",
"inputRev": "master",
Expand Down Expand Up @@ -75,10 +75,10 @@
"type": "git",
"subDir": null,
"scope": "",
"rev": "c0c2c8fac501e8c0580177432e21fd461cb64580",
"rev": "0c3346c1787354ee3398f5cefa726ff51938f9b1",
"name": "mathlib",
"manifestFile": "lake-manifest.json",
"inputRev": "nightly-testing-2024-09-27",
"inputRev": "nightly-testing-2024-09-30",
"inherited": false,
"configFile": "lakefile.lean"},
{"url": "https://github.com/acmepjz/md4lean",
Expand Down Expand Up @@ -120,16 +120,6 @@
"manifestFile": "lake-manifest.json",
"inputRev": "main",
"inherited": false,
"configFile": "lakefile.lean"},
{"url": "https://github.com/hargoniX/Leanwuzla.git",
"type": "git",
"subDir": null,
"scope": "",
"rev": "bcab3f80d6a44728656e041d56f1dd45dff0456c",
"name": "leanwuzla",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
"inherited": false,
"configFile": "lakefile.lean"}],
"name": "SSA",
"lakeDir": ".lake"}
10 changes: 5 additions & 5 deletions lakefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defaultTargets = ["SSA"]
[[require]]
name = "mathlib"
git = "https://github.com/leanprover-community/mathlib4"
rev = "nightly-testing-2024-09-27"
rev = "nightly-testing-2024-09-30"

[[require]]
name = "Cli"
Expand All @@ -16,10 +16,10 @@ name = "doc-gen4"
git = "https://github.com/leanprover/doc-gen4"
rev = "main"

[[require]]
name = "leanwuzla"
git = "https://github.com/hargoniX/Leanwuzla.git"
rev = "main"
# [[require]]
# name = "leanwuzla"
# git = "https://github.com/hargoniX/Leanwuzla.git"
# rev = "main"

[[lean_lib]]
name = "SSA"
Expand Down
2 changes: 1 addition & 1 deletion lean-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
leanprover/lean4:nightly-2024-09-27
leanprover/lean4:nightly-2024-09-30
Loading