forked from leanprover/lean4
-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: getLsb_replicate #10
Closed
Closed
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
afe0b5a
perf: precise cache for `foldConsts` (#4871)
leodemoura a4f997b
feat: getLsb_replicate
bollu 81719f9
chore: fix binder explicitness in List.map_subset (#4877)
kim-em a4015ca
chore: rename PSigma.exists (#4878)
kim-em a827759
fix: mistake in statement of `List.take_takeWhile` (#4875)
kmill 82f4874
chore: copy release notes from `releases/v4.10.0` (#4864)
kmill d5e7dba
fix: make "use `set_option diagnostics true" message conditional on c…
kmill 688da9d
chore: updates to release_checklist.md (#4876)
kim-em 8acdafd
chore: correct doc-string for Array.swap! (#4869)
kim-em 6a4159c
refactor: split out Lean.Language.Lean.Types (#4881)
Kha d19bab0
feat: `include` command (#4883)
Kha 41c094c
chore: @[simp]
bollu d154c13
chore: delete excessive paranthesization
bollu fab15e3
feat: simplify proof with Nat.mod_def
bollu d5a8c96
fix: make import resolution case-sensitive on all platforms (#4538)
Kha f869902
feat: Nat simprocs for simplifying bit expressions (#4874)
bollu dcea47d
chore: shorten suggestion about diagnostics (#4882)
kim-em db59442
refactor: `sharecommon` (#4887)
leodemoura c517688
feat: ushiftRight bitblasting (#4872)
bollu a856016
perf: precise cache for `expr_eq_fn` (#4890)
leodemoura 32b9de8
fix: export symbols needed by Verso (#4884)
david-christiansen e83f78d
chore: update stage0
d9c6f8a
Merge remote-tracking branch 'origin/master' into getLsb_replicate
tobiasgrosser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -583,11 +583,9 @@ instance : HAppend (BitVec w) (BitVec v) (BitVec (w + v)) := ⟨.append⟩ | |
-- TODO: write this using multiplication | ||
/-- `replicate i x` concatenates `i` copies of `x` into a new vector of length `w*i`. -/ | ||
def replicate : (i : Nat) → BitVec w → BitVec (w*i) | ||
| 0, _ => 0 | ||
| 0, _ => 0#0 | ||
| n+1, x => | ||
have hEq : w + w*n = w*(n + 1) := by | ||
rw [Nat.mul_add, Nat.add_comm, Nat.mul_one] | ||
hEq ▸ (x ++ replicate n x) | ||
(x ++ replicate n x).cast (by rw [Nat.mul_succ]; omega) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I replaced the cast by BitVec.cast, for which we have better equation lemmas. |
||
|
||
/-! | ||
### Cons and Concat | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this change was strictly necessary, but it makes it cleaner to read.