Joachim Breitner 9d30f6a0c5 perf: optimize string literal equality simprocs for kernel efficiency
This PR optimizes the `String.reduceEq`, `String.reduceNe`, and `Sym.Simp`
string equality simprocs to produce kernel-efficient proofs. Previously, these
used `String.decEq` which forced the kernel to run UTF-8 encoding/decoding and
byte array comparison, causing 86+ kernel unfoldings on short strings.

The new approach uses `String.ofList_injective` combined with
`congrArg (List.get?Internal · i)` at the first differing character position,
reducing kernel work to O(first_diff_pos) list indexing plus a single character
comparison. For equal strings, `eq_true rfl` avoids kernel evaluation entirely.

The shared proof construction is in `Lean.Meta.mkStringLitNeProof`, used by both
the standard simprocs and the `Sym.Simp` ground evaluator.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:27:23 +00:00
2026-03-07 00:02:16 +00:00
2022-03-18 15:28:20 +01:00
2024-07-26 18:24:06 +02:00
2026-02-11 01:17:40 +00:00
2026-02-11 01:17:40 +00:00
2024-08-23 09:13:27 +00:00
Description
No description provided
Readme 5 GiB
Languages
Lean 94.3%
C++ 4.1%
Python 0.6%
Shell 0.4%
CMake 0.3%