Skip to content

chore: lemmas about BEq on List String.Slice#13061

Merged
TwoFX merged 1 commit intoleanprover:masterfrom
TwoFX:copy-comp-2
Mar 23, 2026
Merged

chore: lemmas about BEq on List String.Slice#13061
TwoFX merged 1 commit intoleanprover:masterfrom
TwoFX:copy-comp-2

Conversation

@TwoFX
Copy link
Copy Markdown
Member

@TwoFX TwoFX commented Mar 23, 2026

This PR adds lemmas about BEq on List String.Slice.

We show (l == l') = false ↔ l.map copy ≠ l'.map copy and deduce a BEq version of the theorem about "intercalate-then-split":

theorem toList_split_intercalate_beq {c : Char} {l : List String} (hl : ∀ s ∈ l, c ∉ s.toList) :
    ((String.intercalate (String.singleton c) l).split c).toList ==
      if l = [] then ["".toSlice] else l.map String.toSlice

@TwoFX TwoFX requested a review from kim-em as a code owner March 23, 2026 13:21
@TwoFX TwoFX added the changelog-library Library label Mar 23, 2026
@TwoFX TwoFX enabled auto-merge March 23, 2026 13:21
@TwoFX TwoFX added this pull request to the merge queue Mar 23, 2026
Merged via the queue into leanprover:master with commit 4a17b2f Mar 23, 2026
22 checks passed
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Mar 23, 2026
@mathlib-lean-pr-testing
Copy link
Copy Markdown

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase fcdd9d1ae821497aeaedaae9bfd94f976d538d35 --onto 4bf7fa7447eea00cecba8327bb9c9e5f4485f0a7. You can force Mathlib CI using the force-mathlib-ci label. (2026-03-23 14:13:01)

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase fcdd9d1ae821497aeaedaae9bfd94f976d538d35 --onto cfa8c5a036d6990635c6ec50b02d0e806995cec3. You can force reference manual CI using the force-manual-ci label. (2026-03-23 14:13:03)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-library Library toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants