lean4-htt/src/Lean/Data
Markus Himmel d6cd738ab4
feat: redefine String, part two (#10457)
This PR introduces safe alternatives to `String.Pos` and `Substring`
that can only represent valid positions/slices.

Specifically, the PR

- introduces the predicate `String.Pos.IsValid`;
- proves several nontrivial equivalent conditions for
`String.Pos.IsValid`;
- introduces `String.ValidPos`, which is a `String.Pos` with an
`IsValid` proof;
- introduces `String.Slice`, which is like `Substring` but made from
`String.ValidPos` instead of `Pos`;
- introduces `String.Pos.IsValidForSlice`, which is like
`String.Pos.IsValid` but for slices;
- introduces `String.Slice.Pos`, which is like `String.ValidPos` but for
slices;
- introduces various functions for converting between the two types of
positions.

The API added in this PR is not complete. It will be expanded in future
PRs with addional operations and verification.
2025-09-24 13:36:55 +00:00
..
Json feat: redefine String, part two (#10457) 2025-09-24 13:36:55 +00:00
Lsp chore: upstream rangeOfStx? from Batteries (#10490) 2025-09-22 12:21:14 +00:00
NameMap perf: make macro scope numbering less dependent on surrounding context (#10027) 2025-08-22 13:16:02 +00:00
Xml fix: do not allow access to private primitives in public scope (#9890) 2025-08-14 15:34:54 +00:00
Array.lean fix: inline/specialize may only refer to publicly imported decls for now (#10494) 2025-09-23 09:58:14 +00:00
AssocList.lean feat: generalize universes in monadic operators for collections (#10224) 2025-09-03 07:24:14 +00:00
DeclarationRange.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
EditDistance.lean feat: docstrings with Verso syntax (#10307) 2025-09-10 07:03:57 +00:00
Format.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
FuzzyMatching.lean chore: reorganize Init imports around strings (#10289) 2025-09-07 17:09:14 +00:00
Json.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
JsonRpc.lean feat: improve auto-completion performance (#10249) 2025-09-05 08:55:49 +00:00
KVMap.lean chore: reorganize Init imports around strings (#10289) 2025-09-07 17:09:14 +00:00
LBool.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
LOption.lean chore: reorganize Init imports around strings (#10289) 2025-09-07 17:09:14 +00:00
Lsp.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Name.lean feat: integrate high-level order typeclasses with BEq and Ord (#9908) 2025-08-19 07:54:53 +00:00
NameMap.lean feat: basic premise selection algorithm based on MePo (#7844) 2025-09-23 06:40:22 +00:00
NameTrie.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
OpenDecl.lean chore: reorganize Init imports around strings (#10289) 2025-09-07 17:09:14 +00:00
Options.lean feat: improve set_option error messages (#9496) 2025-07-26 02:04:45 +00:00
PersistentArray.lean chore: reorganize Init imports around strings (#10289) 2025-09-07 17:09:14 +00:00
PersistentHashMap.lean chore: reorganize Init imports around strings (#10289) 2025-09-07 17:09:14 +00:00
PersistentHashSet.lean feat: generalize universes in monadic operators for collections (#10224) 2025-09-03 07:24:14 +00:00
Position.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
PrefixTree.lean perf: properly specialize through PrefixTree (#9681) 2025-08-02 13:59:56 +00:00
RArray.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
RBMap.lean feat: generalize universes in monadic operators for collections (#10224) 2025-09-03 07:24:14 +00:00
RBTree.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
SMap.lean feat: generalize universes in monadic operators for collections (#10224) 2025-09-03 07:24:14 +00:00
SSet.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Trie.lean feat: redefine String, part two (#10457) 2025-09-24 13:36:55 +00:00
Xml.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00