Concatenation corresponds to adjacent memory segments
ProvedLight.seg_append3sumalgorithmsfine-grained-complexitythree-sum-1962word-ram
Let be memory, an address, and lists of integers. The predicate means that memory contains consecutively from address . Then
This equivalence allows a contiguous array representation to be split at a list boundary or assembled from adjacent pieces, including empty pieces.
Preamble
/- Copyright (c) 2026 Anthropic, PBC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. SPDX-License-Identifier: Apache-2.0 -/ import Definitions.Def_APSPSource_RemainingDefinitions import Definitions.Def_APSPSource_ThreeSumApsp_Lang_Logic import Definitions.Def_APSPSource_ThreeSumApsp_Lang_Regions import Definitions.Def_ThreeSum1962Source_Bundle01 import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.BigOperators.Group.Finset.Basic import Mathlib.Algebra.Group.Int.Defs import Mathlib.Algebra.GroupWithZero.Nat import Mathlib.Algebra.Order.BigOperators.Group.List import Mathlib.Algebra.Order.BigOperators.Group.Multiset import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Group.Int import Mathlib.Algebra.Order.Group.Nat import Mathlib.Algebra.Order.Group.Unbundled.Abs import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Order.Ring.Int import Mathlib.Data.Int.Cast.Lemmas import Mathlib.Data.Int.Notation import Mathlib.Data.List.GetD import Mathlib.Data.Nat.Cast.Order.Ring import Mathlib.Data.Nat.Count import Mathlib.Data.Nat.Notation import Mathlib.Data.Nat.SuccPred import Mathlib.LinearAlgebra.Matrix.Defs import Mathlib.Logic.Function.Basic import Mathlib.Order.ConditionallyCompleteLattice.Basic import Mathlib.Tactic.GCongr import Mathlib.Tactic.Linarith import Mathlib.Tactic.NormNum import Mathlib.Tactic.Positivity import Mathlib.Tactic.Ring set_option autoImplicit false set_option relaxedAutoImplicit false set_option Elab.async false namespace ThreeSumApsp end ThreeSumApsp
Formal statement
theorem Light.seg_append : ∀ {μ : Nat → Int} {a : Nat} {l₁ l₂ : List.{0} Int},
Iff
(Light.Seg μ a
(@HAppend.hAppend.{0, 0, 0} (List.{0} Int) (List.{0} Int) (List.{0} Int)
(@instHAppendOfAppend.{0} (List.{0} Int) (@List.instAppend.{0} Int)) l₁ l₂))
(And (Light.Seg μ a l₁)
(Light.Seg μ (@HAdd.hAdd.{0, 0, 0} Nat Nat Nat (@instHAdd.{0} Nat instAddNat) a (@List.length.{0} Int l₁)) l₂)) := by
sorry
Source