Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Reachability and axis-specific invalidation seeds

Definition
Couret_STAT_TRANS_03_DependencyGraph_a12904c0d89d

by alexcour · Nov 8, 2026 · Mathlib c5ea003 (Lean v4.30.0)

couret-programmecouret-unification-20261108

For an arbitrary node type and directed edge relation, defines reflexive-transitive Reach by a reflexive constructor and extension by one edge; edge a b is read as b depending directly on a. Impacted holds when some changed seed reaches the node. A ChangeAt record pairs a node with a contract Delta. SemanticSeed, ReplaySeed and NoveltySeed select changes whose corresponding Boolean invalidation field is true; the three axis-specific Impacted predicates propagate their seeds by Reach. An empty change list supplies no seeds; the graph need not be finite or acyclic.

Definition code
import Mathlib.Data.Set.Basic
import Definitions.Def_Couret_STAT_TRANS_02_ClaimContract_997da1c8f8df

/-!
# STAT-TRANS-03 — Dependency graph and differential invalidation

This file formalizes a minimal dependency graph for claim-contract invalidation.

Orientation:
  edge a b
means:
  b directly depends on a.

A change at a node propagates only to nodes reachable from that node.
The construction is deliberately generic and does not encode a global
"everything invalidates everything" policy.

No RH claim. No novelty claim.
-/

namespace CouretOaiBridge01
namespace StatusTransport

/-- Reflexive-transitive reachability generated by a direct dependency edge. -/
inductive Reach {α : Type*} (edge : α → α → Prop) : α → α → Prop
  | refl (x : α) : Reach edge x x
  | step {a b c : α} : Reach edge a b → edge b c → Reach edge a c

/-- A node is impacted when some changed seed reaches it. -/
def Impacted {α : Type*}
    (edge : α → α → Prop) (changed : α → Prop) (x : α) : Prop :=
  ∃ s, changed s ∧ Reach edge s x











/--
A changed contract carries both its local delta and its location in the
dependency graph.  Later layers may refine this into per-axis edge labels.
-/
structure ChangeAt (α : Type*) where
  node : α
  delta : Delta

/--
Semantic invalidation seeds only those local changes whose delta says that
semantics must be reconsidered.
-/
def SemanticSeed {α : Type*} (changes : List (ChangeAt α)) (x : α) : Prop :=
  ∃ c ∈ changes, c.node = x ∧ c.delta.invalidatesSemantic = true

/--
Replay invalidation seeds local changes whose delta invalidates replay.
-/
def ReplaySeed {α : Type*} (changes : List (ChangeAt α)) (x : α) : Prop :=
  ∃ c ∈ changes, c.node = x ∧ c.delta.invalidatesReplay = true

/--
Novelty invalidation seeds local changes whose delta invalidates novelty.
-/
def NoveltySeed {α : Type*} (changes : List (ChangeAt α)) (x : α) : Prop :=
  ∃ c ∈ changes, c.node = x ∧ c.delta.invalidatesNovelty = true

/-- Graph-level semantic invalidation. -/
def SemanticImpacted {α : Type*}
    (edge : α → α → Prop) (changes : List (ChangeAt α)) (x : α) : Prop :=
  Impacted edge (SemanticSeed changes) x

/-- Graph-level replay invalidation. -/
def ReplayImpacted {α : Type*}
    (edge : α → α → Prop) (changes : List (ChangeAt α)) (x : α) : Prop :=
  Impacted edge (ReplaySeed changes) x

/-- Graph-level novelty invalidation. -/
def NoveltyImpacted {α : Type*}
    (edge : α → α → Prop) (changes : List (ChangeAt α)) (x : α) : Prop :=
  Impacted edge (NoveltySeed changes) x

end StatusTransport
end CouretOaiBridge01
Source
Alexandre Couret, https://github.com/alexcour/couret-finite-verifications/blob/d71ed2dafa9daa082f1a801b51d8a58abdb2c473/research/lean/CouretOaiBridge01/STAT_TRANS_03_DependencyGraph.lean; source file SHA-256 4e4de934f82aabd60e1dbb0a688ba35489f034249c2859a3a500801ac79d1b30

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me