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: Add some theorems for String.substrEq
and String.isPrefixOf
#782
Conversation
- `String.cons_append` - `String.Pos.empty_valid` - `String.Pos.Valid.cons_addChar` - `String.Pos.Valid.cons_zero_or_ge_head` Update Lemmas.lean Update Lemmas.lean
cebc1ce
to
b4afe21
Compare
awaiting-review |
Std/Data/String/Lemmas.lean
Outdated
@@ -60,6 +60,9 @@ instance : Std.BEqOrd String := .compareOfLessAndEq String.lt_irrefl | |||
|
|||
@[simp] theorem data_append (s t : String) : (s ++ t).1 = s.1 ++ t.1 := rfl | |||
|
|||
@[simp] theorem cons_append (c : Char) (cs : List Char) (t : String) : |
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.
I'm skeptical this should be a @[simp]
lemma.
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.
You don't seem to have removed this (or explained why you think it should stay).
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.
Otherwise LGTM.
Please merge |
Co-authored-by: Kim Morrison <kim@tqft.net>
awaiting-review |
This reverts commit 9c1bf76.
awaiting-review |
String.substrEq
and String.isPrefixOf
String.substrEq
and String.isPrefixOf
@tjf801 I'm pretty sure |
-- TODO: substrEq | ||
-- TODO: isPrefixOf |
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.
Please don't remove these lines! These are two of the ten unproved theorems specifying string operations, which I'll prove in the future.
I'm pretty sure that However, in the time that this PR has been opened, I used these theorems to actually prove the equivalence between Also, I'm sorry! I didn't realize those two lines served a specific purpose. Won't make that mistake again 🫡 |
No description provided.