/-
Copyright (c) 2026 SilverSight Contributors. All rights reserved.
Released under Apache 2.0 license.
-/
import Mathlib.Data.Nat.Basic

/-! # Feasible-Set Relaxation Theorem

Base types for constraint relaxation.
-/

namespace SilverSight.FeasibleSet

/-- A constraint chain: pred k x means admissible at step k.
    The nesting property is a separate lemma to avoid field self-reference. -/
structure Chain (X : Type) where
  pred : Nat → X → Prop

/-- Nesting property: admissible at k ⇒ admissible at k+1. -/
def isNested (X : Type) (c : Chain X) : Prop :=
  ∀ (k : Nat) (x : X), c.pred k x → c.pred (k.succ) x

/-- x is admissible at step k under chain c. -/
def admissible (X : Type) (c : Chain X) (k : Nat) (x : X) : Prop :=
  c.pred k x

/-- If the chain is nested, admissible sets expand as constraints relax. -/
theorem admissible_expands (X : Type) (c : Chain X) (hnest : isNested X c) (k : Nat) (x : X)
    (h : admissible X c k x) : admissible X c (k.succ) x :=
  hnest k x h

end SilverSight.FeasibleSet
