Splitting the head of a stored memory segment
ProvedLight.seg_cons3sumalgorithmsfine-grained-complexitythree-sum-1962word-ram
Let be memory, a starting address, , and a list of integers. Write when memory at addresses contains for every . Then
This gives the head-and-tail rule for reading or constructing contiguous memory representations.
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_cons : ∀ {μ : Nat → Int} {a : Nat} {l : List.{0} Int} {x : Int},
Iff (Light.Seg μ a (@List.cons.{0} Int x l))
(And (@Eq.{1} Int (μ a) x)
(Light.Seg μ
(@HAdd.hAdd.{0, 0, 0} Nat Nat Nat (@instHAdd.{0} Nat instAddNat) a
(@OfNat.ofNat.{0} Nat (nat_lit 1) (instOfNatNat (nat_lit 1))))
l)) := by
sorry
Source