lean4-htt/src
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
..
bin
cmake chore: fix spelling errors (#10042) 2025-08-22 07:23:12 +00:00
include/lean feat: add array access functions that return a borrowed result (#9864) 2025-08-12 04:25:14 +00:00
Init feat: redefine String, part two (#10457) 2025-09-24 13:36:55 +00:00
initialize
kernel chore: turn some crashes into errors (#8402) 2025-09-24 13:04:18 +00:00
lake feat: redefine String, part two (#10457) 2025-09-24 13:36:55 +00:00
Lean feat: redefine String, part two (#10457) 2025-09-24 13:36:55 +00:00
library perf: implement jumping to native [export] decls in the interpreter (#10345) 2025-09-11 11:41:16 +00:00
runtime feat: add vectored write and fix rc issue in tcp and udp cancel function (#10487) 2025-09-22 17:02:57 +00:00
shell feat: docstrings with Verso syntax (#10307) 2025-09-10 07:03:57 +00:00
Std chore: add spec lemmas for MonadControl (#10544) 2025-09-24 12:16:06 +00:00
util refactor: port more of shell.cpp to Lean (#10086) 2025-08-26 20:02:42 +00:00
cadical.mk
CMakeLists.txt chore: begin development cycle for v4.25.0 (#10402) 2025-09-16 00:25:06 +00:00
config.h.in
githash.h.in
Init.lean feat: overhaul meta system (#10362) 2025-09-17 21:04:29 +00:00
lakefile.toml.in refactor: import Lake.Util.* from Lake (#10371) 2025-09-13 13:56:54 +00:00
lean-toolchain
Lean.lean
lean.mk.in chore: further split libleanshared on Windows to avoid symbol limit (#10136) 2025-08-26 16:01:57 +00:00
Leanc.lean fix: Unicode path support for Lean Windows executables (#10133) 2025-08-27 11:28:55 +00:00
out feat: ac normalization in grind (#10146) 2025-08-27 03:28:30 +00:00
Std.lean chore: add module keyword to grind tests (#10036) 2025-08-21 22:02:08 +00:00
stdlib.make.in chore: further split libleanshared on Windows to avoid symbol limit (#10136) 2025-08-26 16:01:57 +00:00
stdlib_flags.h chore: remove comment from src/stdlib_flags.h (#10409) 2025-09-16 10:39:27 +00:00
version.h.in