lean4-htt/src/Init/Data/String
Markus Himmel 6cbaada1bf
feat: verification of String.positions, String.chars, String.revPositions, String.revChars, ForIn m String Char (#12456)
This PR verifies all of the `String` iterators except for the bytes
iterator by relating them to `String.toList`.

Along the way we define `String.posLE` and `String.posLT` analogously to
`String.posGE` and `String.posGT` and redefine `String.prev` to go
through `String.posLT`.

We also define and verify `String.positionsFrom` and
`String.revPositionsFrom`, which are the obvious generaliziations of
`String.positions` and `String.revPositions` starting at a positions
other than the start/end.

Finally, we get various lemmas about strings and positions, including
some nice induction principles `String.Pos.next_induction` and
`String.Pos.prev_induction`.

Of course, we also have all of the analogous results for `String.Slice`.
2026-02-12 15:32:44 +00:00
..
Lemmas feat: verification of String.positions, String.chars, String.revPositions, String.revChars, ForIn m String Char (#12456) 2026-02-12 15:32:44 +00:00
Pattern feat: verification of String.positions, String.chars, String.revPositions, String.revChars, ForIn m String Char (#12456) 2026-02-12 15:32:44 +00:00
Basic.lean feat: verification of String.positions, String.chars, String.revPositions, String.revChars, ForIn m String Char (#12456) 2026-02-12 15:32:44 +00:00
Bootstrap.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
Decode.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
Defs.lean feat: LawfulForwardPatternModel for string patterns (#12360) 2026-02-09 09:27:47 +00:00
Extra.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
FindPos.lean feat: verification of String.positions, String.chars, String.revPositions, String.revChars, ForIn m String Char (#12456) 2026-02-12 15:32:44 +00:00
Iter.lean feat: String.Slice.Subslice (#12322) 2026-02-05 10:09:04 +00:00
Iterate.lean feat: verification of String.positions, String.chars, String.revPositions, String.revChars, ForIn m String Char (#12456) 2026-02-12 15:32:44 +00:00
Iterator.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
Legacy.lean Revert "chore: temporarily disable proofs for bootstrap" 2026-02-05 13:41:34 +11:00
Lemmas.lean feat: verification of String.positions, String.chars, String.revPositions, String.revChars, ForIn m String Char (#12456) 2026-02-12 15:32:44 +00:00
Modify.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
OrderInstances.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
Pattern.lean feat: new String.Slice API (#10514) 2025-09-25 12:18:52 +00:00
PosRaw.lean feat: verification of String.positions, String.chars, String.revPositions, String.revChars, ForIn m String Char (#12456) 2026-02-12 15:32:44 +00:00
Search.lean chore: move string iteration to a new file (#12450) 2026-02-12 06:56:53 +00:00
Slice.lean chore: move string iteration to a new file (#12450) 2026-02-12 06:56:53 +00:00
Stream.lean chore: rename Substring to Substring.Raw (#11154) 2025-11-16 09:30:04 +00:00
Subslice.lean feat: String.Slice.Subslice (#12322) 2026-02-05 10:09:04 +00:00
Substring.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
TakeDrop.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
Termination.lean feat: verification of String.positions, String.chars, String.revPositions, String.revChars, ForIn m String Char (#12456) 2026-02-12 15:32:44 +00:00
ToSlice.lean refactor: redefine String.replace (#10986) 2025-10-29 07:48:33 +00:00