Deleting a mask coordinate matches set erasure
ProvedThreeSum.MaskErase.eraseMask_maskOf3sumalgorithmsfine-grained-complexitythree-sum-1962word-ram
Let , let be finite, and let . Define . The recursive mask-erasure operation scans the available positions from highest to lowest and removes position if present. Then
The coordinate need not belong to or lie below . This is the exact set-level specification of the arithmetic deletion routine.
Preamble
import Definitions.Def_ThreeSum1962Source_Bundle01 import Lean.Elab.Tactic.Omega import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Combinatorics.Colex import Mathlib.Data.Fin.Embedding import Mathlib.Data.Finset.Powerset import Mathlib.Data.List.Basic import Mathlib.Data.List.Nodup import Mathlib.Data.Nat.Choose.Basic import Mathlib.Tactic.Linarith import Mathlib.Tactic.Ring set_option autoImplicit false set_option relaxedAutoImplicit false set_option Elab.async false namespace ThreeSum.SubsetAddress end ThreeSum.SubsetAddress
Formal statement
theorem ThreeSum.MaskErase.eraseMask_maskOf : ∀ {L : Nat} (s : Finset.{0} Nat)
(hs :
@LE.le.{0} (Finset.{0} Nat)
(@Preorder.toLE.{0} (Finset.{0} Nat)
(@PartialOrder.toPreorder.{0} (Finset.{0} Nat) (@Finset.instPartialOrder.{0} Nat)))
s (Finset.range L))
(a : Nat),
@Eq.{1} Nat (ThreeSum.MaskErase.eraseMask L a (ThreeSum.SubsetAddress.maskOf s))
(ThreeSum.SubsetAddress.maskOf (@Finset.erase.{0} Nat instDecidableEqNat s a)) := by
sorry
Source