Graph.FiniteDensity.OrderedLocalMarkov
Ordered local-Markov consequences of finite-DAG density factorizations: topological predecessor blocks, the parent-conditioned core, arbitrary parent-superset conditioning, and the unit-cube specialization.
Coordinates 4 core · 5 supporting This module packages an arbitrary numeric topological ranking, its predecessor set, and the measurability facts for the coordinate maps used by the ordered local Markov theorem. ★ parents_subset_predecessors
Coordinate blocks for ordered finite-DAG arguments
This module packages an arbitrary numeric topological ranking, its predecessor set, and the measurability facts for the coordinate maps used by the ordered local Markov theorem.
A finite DAG is equipped with a numeric position for each vertex, distinct positions for distinct vertices, and strictly increasing positions along every directed edge.
Definition (Lean source)
A finite DAG has the canonical topological ranking supplied by its DAG API.
A topological ranking and vertex determine the finite set of vertices strictly preceding that vertex.
Definition (Lean source)
A topological ranking places every parent of a vertex among its predecessors.
Formal statement
Proof (Lean source)
5 supporting declarations (lemmas, instances)
-
not_mem_predecessorstheorem — A vertex does not belong to its strict predecessor set.Proof (Lean source)
theorem not_mem_predecessors {G : DAG V} (τ : TopologicalRanking G) (i : V) : i ∉ predecessors τ i := by simp [predecessors] -
parentClosed_predecessorstheorem — The predecessor set of a vertex in a topologically ranked DAG contains all parents of each of its members.hypothesesconclusionParentClosed G (predecessors τ i)Proof (Lean source)
theorem parentClosed_predecessors {G : DAG V} (τ : TopologicalRanking G) (i : V) : ParentClosed G (predecessors τ i) := by intro j hj k hk rw [predecessors, mem_filter] at hj ⊢ exact ⟨Finset.mem_univ k, lt_trans (τ.edge_lt (G.mem_parents.mp hk)) hj.2⟩ -
measurable_orderedCoordinatetheorem — Reading a single coordinate from a finite product is measurable.Proof (Lean source)
@[fun_prop] theorem measurable_orderedCoordinate (i : V) : Measurable (fun x : ∀ j, X j ↦ x i) := by exact measurable_pi_apply i -
measurable_predecessorResidualProjectiontheorem — Projecting onto the predecessors outside a conditioning set is measurable.hypothesesconclusionProof (Lean source)
@[fun_prop] theorem measurable_predecessorResidualProjection {G : DAG V} (τ : TopologicalRanking G) (i : V) (A : Finset V) : Measurable (coordinateProjection (X := X) (predecessors τ i \ A)) := by exact measurable_coordinateProjection _ -
coordinateConditioning_comap_letheorem — The σ-algebra generated by projection onto a conditioning coordinate block is no finer than the ambient product σ-algebra.hypothesesV :sharedType u_1V → Type u_2A :Finset Vconclusioncomap (coordinateProjection (X := X) A) inferInstance≤ (inferInstance : MeasurableSpace (∀ j, X j))Proof (Lean source)
theorem coordinateConditioning_comap_le (A : Finset V) : comap (coordinateProjection (X := X) A) inferInstance ≤ (inferInstance : MeasurableSpace (∀ j, X j)) := by exact (measurable_coordinateProjection A).comap_le
Local 1 core · 0 supporting This module isolates the analytic core: under a finite DAG density factorization, a coordinate is conditionally independent of any parent-closed block omitting it after its parents are removed, given its parents. ★ localMarkovParents_of_parentClosed
Density-factorization local Markov core
This module isolates the analytic core: under a finite DAG density factorization, a coordinate is conditionally independent of any parent-closed block omitting it after its parents are removed, given its parents. The proof is intended to combine reverse-topological marginalization with a three-block density factorization and Mathlib's conditional-independence characterization.
For a finite DAG density factorization, a parent-closed coordinate block, and a vertex omitted from that block, the vertex coordinate is conditionally independent of the block's non-parent coordinates given its parent coordinates.
Formal statement
Proof (Lean source)
Main 1 core · 4 supporting This module derives the arbitrary-conditioning-superset form of the local Markov property and specializes it to predecessor sets from arbitrary and canonical topological rankings. ★ orderedLocalMarkov
Ordered local Markov property for finite DAG density factorizations
This module derives the arbitrary-conditioning-superset form of the local Markov property and specializes it to predecessor sets from arbitrary and canonical topological rankings. It also exports the unit-cube version using the existing unit-cube reference measure.
For a finite DAG density factorization, an arbitrary topological ranking, a vertex, a conditioning predecessor set, and proof that it lies among the predecessors and contains every parent, the vertex coordinate is conditionally independent of all other predecessors given that set.
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
localMarkovSuperset_of_parentClosedtheorem — For a finite DAG density factorization, a parent-closed block omitting a vertex, and a conditioning subset of that block containing every parent, the vertex coordinate is conditionally independent of all remaining block coordinates given the chosen conditioning coordinates.hypothesesB :Factorization G X μi :VP A :Finset VhP :ParentClosed G Phi :i ∉ PhAP :A ⊆ Phpa :G.parents i ⊆ AconclusionCondIndepFun (comap (coordinateProjection (X := X) A) inferInstance) (coordinateConditioning_comap_le (X := X) A) (fun x : ∀ j, X j ↦ x i) (coordinateProjection (X := X) (P \ A)) B.observationalMeasureProof (Lean source)
theorem Factorization.localMarkovSuperset_of_parentClosed (B : Factorization G X μ) {i : V} {P A : Finset V} (hP : ParentClosed G P) (hi : i ∉ P) (hAP : A ⊆ P) (hpa : G.parents i ⊆ A) : CondIndepFun (comap (coordinateProjection (X := X) A) inferInstance) (coordinateConditioning_comap_le (X := X) A) (fun x : ∀ j, X j ↦ x i) (coordinateProjection (X := X) (P \ A)) B.observationalMeasure := by /- Derive this from `B.localMarkovParents_of_parentClosed hP hi`: decompose its right coordinate block using `Y := P \ A`, `W := A \ G.parents i`, and `C := G.parents i`. The hypotheses give `Y ∪ W = P \ C` and `C ∪ W = A`. Compose the local result with the measurable pair of restrictions to `Y` and `W`, then apply `condIndepFun_weak_union_of_prodMk`. Finally identify `comap (coordinateProjection C) ⊔ comap (coordinateProjection W)` with the comap of `coordinateProjection A`; the proof of `condIndep_valuesProjection_weak_union` is the library template for this measurable projection/reassembly step. No density argument belongs here. -/ classical let C : Finset V := G.parents i let Y : Finset V := P \ A let W : Finset V := A \ C have hYW : Y ∪ W = P \ C := by exact Finset.sdiff_union_sdiff_cancel hAP hpa have hCW : C ∪ W = A := by exact Finset.union_sdiff_of_subset hpa have hYPC : Y ⊆ P \ C := by rw [← hYW] exact Finset.subset_union_left have hWPC : W ⊆ P \ C := by rw [← hYW] exact Finset.subset_union_right let restrictYW : (∀ j : ↑(P \ C), X j) → (∀ j : Y, X j) × (∀ j : W, X j) := fun z ↦ (fun j ↦ z ⟨j, hYPC j.property⟩, fun j ↦ z ⟨j, hWPC j.property⟩) have hrestrictYW : Measurable restrictYW := by unfold restrictYW exact (measurable_pi_iff.mpr fun j ↦ measurable_pi_apply _).prodMk (measurable_pi_iff.mpr fun j ↦ measurable_pi_apply _) have hpair : CondIndepFun (comap (coordinateProjection (X := X) C) inferInstance) (coordinateConditioning_comap_le (X := X) C) (fun x : ∀ j, X j ↦ x i) (fun x ↦ (coordinateProjection (X := X) Y x, coordinateProjection (X := X) W x)) B.observationalMeasure := by have hbase := B.localMarkovParents_of_parentClosed hP hi have hcomp := hbase.comp measurable_id hrestrictYW have hrestrict_comp : restrictYW ∘ coordinateProjection (X := X) (P \ C) = fun x ↦ (coordinateProjection (X := X) Y x, coordinateProjection (X := X) W x) := by funext x apply Prod.ext <;> funext j <;> rfl rw [hrestrict_comp] at hcomp simpa only [Function.id_comp] using hcomp have hweak : CondIndepFun (comap (coordinateProjection (X := X) C) inferInstance ⊔ comap (coordinateProjection (X := X) W) inferInstance) (sup_le (coordinateConditioning_comap_le (X := X) C) (coordinateConditioning_comap_le (X := X) W)) (fun x : ∀ j, X j ↦ x i) (coordinateProjection (X := X) Y) B.observationalMeasure := condIndepFun_weak_union_of_prodMk (m := comap (coordinateProjection (X := X) C) inferInstance) (mΩ := inferInstance) (coordinateConditioning_comap_le (X := X) C) (W := fun x : ∀ j, X j ↦ x i) (V := coordinateProjection (X := X) Y) (A := coordinateProjection (X := X) W) (measurable_pi_apply i) (measurable_coordinateProjection Y) (measurable_coordinateProjection W) hpair have hσ : comap (coordinateProjection (X := X) C) inferInstance ⊔ comap (coordinateProjection (X := X) W) inferInstance = comap (coordinateProjection (X := X) A) inferInstance := by rw [← comap_coordinateProjection_union_eq_sup (X := X) C W, hCW] simpa only [Y, hσ] using hweak -
orderedLocalMarkov_canonicaltheorem — For a finite DAG density factorization, a vertex, a conditioning set in the canonical predecessor block, and proof that it is a predecessor subset containing every parent, the vertex coordinate is conditionally independent of all other canonical predecessors given that set.hypothesesB :Factorization G X μi :VA :Finset VhA :A ⊆ predecessors (canonicalTopologicalRanking G) ihpa :G.parents i ⊆ AconclusionCondIndepFun (comap (coordinateProjection (X := X) A) inferInstance) (coordinateConditioning_comap_le (X := X) A) (fun x : ∀ j, X j ↦ x i) (coordinateProjection (X := X) (predecessors (canonicalTopologicalRanking G) i \ A)) B.observationalMeasureProof (Lean source)
theorem Factorization.orderedLocalMarkov_canonical (B : Factorization G X μ) (i : V) (A : Finset V) (hA : A ⊆ predecessors (canonicalTopologicalRanking G) i) (hpa : G.parents i ⊆ A) : CondIndepFun (comap (coordinateProjection (X := X) A) inferInstance) (coordinateConditioning_comap_le (X := X) A) (fun x : ∀ j, X j ↦ x i) (coordinateProjection (X := X) (predecessors (canonicalTopologicalRanking G) i \ A)) B.observationalMeasure := by exact B.orderedLocalMarkov (canonicalTopologicalRanking G) i A hA hpa -
instIsFiniteMeasureUnitCubeObservationalinstance — The unit-cube observational density associated with a unit-cube factorization induces a finite measure when combined with the unit-cube reference measure.parametersB :instanceinstIsFiniteMeasureUnitCubeObservational B :IsFiniteMeasure ((unitCubeReference V).withDensity B.observationalDensity)given byby have hσ : ∀ _ : V, SigmaFinite unitIntervalReference := fun _ ↦ by unfold unitIntervalReference infer_instance change IsFiniteMeasure B.observationalMeasure infer_instance -
orderedLocalMarkov_unitCubeReferencetheorem — For a unit-cube DAG density factorization, an arbitrary topological ranking, a vertex, a conditioning predecessor set, and proof that it lies among the predecessors and contains every parent, the vertex is conditionally independent of all remaining predecessors given that set under the unit-cube reference measure.hypothesesconclusionCondIndepFun (comap (coordinateProjection (X := fun _ : V ↦ ℝ) A) inferInstance) (coordinateConditioning_comap_le (X := fun _ : V ↦ ℝ) A) (fun x : V → ℝ ↦ x i) (coordinateProjection (X := fun _ : V ↦ ℝ) (predecessors τ i \ A)) ((unitCubeReference V).withDensity B.observationalDensity)Proof (Lean source)
theorem UnitCubeFactorization.orderedLocalMarkov_unitCubeReference (B : UnitCubeFactorization V G) (τ : TopologicalRanking G) (i : V) (A : Finset V) (hA : A ⊆ predecessors τ i) (hpa : G.parents i ⊆ A) : CondIndepFun (comap (coordinateProjection (X := fun _ : V ↦ ℝ) A) inferInstance) (coordinateConditioning_comap_le (X := fun _ : V ↦ ℝ) A) (fun x : V → ℝ ↦ x i) (coordinateProjection (X := fun _ : V ↦ ℝ) (predecessors τ i \ A)) ((unitCubeReference V).withDensity B.observationalDensity) := by have hσ : ∀ _ : V, SigmaFinite unitIntervalReference := fun _ ↦ by unfold unitIntervalReference infer_instance change CondIndepFun (comap (coordinateProjection (X := fun _ : V ↦ ℝ) A) inferInstance) (coordinateConditioning_comap_le (X := fun _ : V ↦ ℝ) A) (fun x : V → ℝ ↦ x i) (coordinateProjection (X := fun _ : V ↦ ℝ) (predecessors τ i \ A)) B.observationalMeasure exact @Factorization.orderedLocalMarkov V _ _ (fun _ : V ↦ ℝ) _ _ (fun _ : V ↦ unitIntervalReference) hσ G B τ i A hA hpa