SCM.ID.Density.MechCFactor
Tian's c-factor Q[S] of a set S of observed variables, defined through the causal mechanisms: the density on S of the law obtained by intervening on every observed variable outside S.
Basic 5 core · 5 supporting This file defines the do-complement intervention and its marginal measure QmechMeasure, relates singleton values of that measure to qLocalMass, and proves the fixed-edge facts needed for valid interventions. ★ QmechMeasure_singleton_eq_qLocalMass
The mechanism c-factor and do-complement measure
This file defines the do-complement intervention and its marginal measure
QmechMeasure, relates singleton values of that measure to qLocalMass, and
proves the fixed-edge facts needed for valid interventions. The density-level
invariance and observational comparison are developed in sibling files.
For a finite node set with measurable node-value spaces, a structural causal model and a set of SWIG nodes, the mechanism-complement node set consists exactly of the base nodes whose random copy is observed but absent from the given set and whose fixed copy is not already fixed in the model.
For a finite node set with measurable node-value spaces, a structural causal model, a set of SWIG nodes, an assignment to the model's already fixed nodes, and a full assignment to its observed nodes, the do-complement fixed-node assignment extends the original fixed-node assignment by assigning each mechanism-complement node the value of its random copy in the observed assignment.
Definition (Lean source)
For a finite node set with measurable node-value spaces, a structural causal model, a set of SWIG nodes contained in its observed-node set, and an assignment to the fixed nodes of the model obtained by intervening on its mechanism complement, the mechanism measure is the intervened model's observational law projected onto the given SWIG-node set.
Definition (Lean source)
For a finite node set with measurable node-value spaces, a structural causal model, a family of reference measures, a set of SWIG nodes contained in the model's observed-node set, and an assignment to the model's fixed nodes, the mechanism c-factor density maps every full observed-node assignment to the Radon--Nikodym derivative of the corresponding mechanism measure with respect to the product reference measure on the given node set, evaluated at that assignment's restriction to the set.
Definition (Lean source)
For a finite structural causal model with finite measurable node-value spaces, an observed node set, evidence that the set is observed, the condition that fixed nodes have no outgoing random-copy edges, a fixed-node assignment, and an observed realization, the singleton mass under the complementary intervention equals the local q-mass of that node set.
Formal statement
Proof (Lean source)
5 supporting declarations (lemmas, instances)
-
mechComplementNames_random_mem_observedlemma — Every mechanism-complement variable has its random copy among the observed nodes.hypothesesconclusionSWIGNode.random n ∈ M.observedProof (Lean source)
lemma mechComplementNames_random_mem_observed (M : SCM N Ω) (S : Finset (SWIGNode N)) : ∀ n ∈ M.mechComplementNames S, SWIGNode.random n ∈ M.observed := by intro n hn exact (Finset.mem_sdiff.mp (Finset.mem_filter.mp hn).2.1).1 -
mechComplementNames_fixed_not_memlemma — Every mechanism-complement variable has a fixed copy that is not already fixed.hypothesesconclusionSWIGNode.fixed n ∉ M.fixedProof (Lean source)
lemma mechComplementNames_fixed_not_mem (M : SCM N Ω) (S : Finset (SWIGNode N)) : ∀ n ∈ M.mechComplementNames S, SWIGNode.fixed n ∉ M.fixed := by intro n hn exact (Finset.mem_filter.mp hn).2.2 -
mechComplementNames_image_random_subset_observedlemma — The random copies of the mechanism-complement variables form a subset of the observed nodes.hypothesesconclusion(M.mechComplementNames S).image SWIGNode.random ⊆ M.observedProof (Lean source)
lemma mechComplementNames_image_random_subset_observed (M : SCM N Ω) (S : Finset (SWIGNode N)) : (M.mechComplementNames S).image SWIGNode.random ⊆ M.observed := by intro v hv rcases Finset.mem_image.mp hv with ⟨n, hn, rfl⟩ exact M.mechComplementNames_random_mem_observed S n hn -
standard_fixed_random_edgelesslemma — A standard structural causal model has no fixed nodes, so the implication from fixed-copy membership to absence of outgoing random-copy edges holds vacuously.hypothesesN :sharedType u_1N → Type u_2M :SCM N ΩhStd :M.isStandardn :NSWIGNode.fixed n ∈ M.fixedv :SWIGNode Nconclusion¬ M.dag.edge (SWIGNode.random n) vProof (Lean source)
lemma standard_fixed_random_edgeless (M : SCM N Ω) (hStd : M.isStandard) : ∀ n : N, SWIGNode.fixed n ∈ M.fixed → ∀ v : SWIGNode N, ¬ M.dag.edge (SWIGNode.random n) v := by intro n hn rw [SCM.isStandard] at hStd rw [hStd] at hn simp at hn -
fixSet_fixed_random_edgelesslemma — Given a finite structural causal model and an intervention set, if every intervened random copy is observed, no corresponding fixed copy is already fixed, and the model is standard, then for a node whose fixed copy is fixed after the intervention and any target node, the intervened random copy has no outgoing edge to that target.hypothesesN :sharedType u_1N → Type u_2M :SCM N ΩX :Finset NhObs :∀ D ∈ X, SWIGNode.random D ∈ M.observedhFix :∀ D ∈ X, SWIGNode.fixed D ∉ M.fixedhStd :M.isStandardn :NSWIGNode.fixed n ∈ (M.fixSet X hObs hFix).fixedv :SWIGNode Nconclusion¬ (M.fixSet X hObs hFix).dag.edge (SWIGNode.random n) vProof (Lean source)
lemma fixSet_fixed_random_edgeless (M : SCM N Ω) (X : Finset N) (hObs : ∀ D ∈ X, SWIGNode.random D ∈ M.observed) (hFix : ∀ D ∈ X, SWIGNode.fixed D ∉ M.fixed) (hStd : M.isStandard) : ∀ n : N, SWIGNode.fixed n ∈ (M.fixSet X hObs hFix).fixed → ∀ v : SWIGNode N, ¬ (M.fixSet X hObs hFix).dag.edge (SWIGNode.random n) v := by classical intro n hn v have hnX : n ∈ X := by rw [SCM.fixSet_fixed] at hn rcases Finset.mem_union.mp hn with hnM | hnX · exfalso rw [SCM.isStandard] at hStd rw [hStd] at hnM simp at hnM · rcases Finset.mem_image.mp hnX with ⟨D, hD, hDfix⟩ cases hDfix exact hD intro hEdge have hEdgeRel : SWIGGraph.splitMonoEdgeRel M.toSWIGGraph.dag.edge X (SWIGNode.random n) v := by simpa [SCM.fixSet, SCM.fixMono, SWIGGraph.splitMono, SWIGGraph.splitMonoDAG] using hEdge simp [SWIGGraph.splitMonoEdgeRel, hnX] at hEdgeRel
Invariance 2 core · 4 supporting This file identifies the observational c-component density with the mechanism c-factor and proves that the latter is unchanged by interventions outside the component. ★ cComponentDensityFactor_eq_mechCFactor★ mechCFactor_fixSet_invariant
Observational equality and intervention invariance of mechanism c-factors
This file identifies the observational c-component density with the mechanism c-factor and proves that the latter is unchanged by interventions outside the component. These are the two mechanism-level equalities used by Tian district recovery.
(A) Tian Lemma 1 (Eq. 37 = Eq. 36). For a standard causal model M, i.e. one with no fixed nodes, a reference family that is faithful — every coordinate value has nonzero reference mass, and an observational kernel at a fixed-value slice s with full point-mass support (every observed assignment has nonzero probability), fix a node set S contained in the observed coordinates that is a full c-component of the model's SWIG graph. Then the observational full-prefix c-component density cComponentDensityFactor on S equals the mechanism c-factor Q[S] (mechCFactor) — the do-complement marginal density of S.
Formal statement
Proof (Lean source)
Do(X)-invariance of the c-factor Q[S]. Let an intervention set X have random copies that are all observed and fixed copies that are not already fixed in the base model, giving the intervened model M.fixSet X. For a standard base model M, a reference family that is faithful, and a node set S contained in the observed coordinates whose random copies avoid every intervened node in X, if the base assignment x records, at each intervened node, the same value that the intervened model's fixed values sDo assign to the corresponding fixed coordinate, then the S-c-factor Q[S] of the intervened model M.fixSet X at sDo, x equals the S-c-factor of the base model M at the projected fixed values M.fixSetProj X sDo, x.
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
prod_div_prodlemma — A finite product of quotients is the quotient of the finite products when denominators are nonzero and finite.hypothesesconclusion(∏ i ∈ t, f i / g i) = (∏ i ∈ t, f i) / (∏ i ∈ t, g i)Proof (Lean source)
lemma ENNReal.prod_div_prod {ι : Type*} [DecidableEq ι] (t : Finset ι) (f g : ι → ENNReal) (hg0 : ∀ i ∈ t, g i ≠ 0) (hgtop : ∀ i ∈ t, g i ≠ ∞) : (∏ i ∈ t, f i / g i) = (∏ i ∈ t, f i) / (∏ i ∈ t, g i) := by classical induction t using Finset.induction_on with | empty => simp | insert a t ha ih => have ih' : (∏ i ∈ t, f i / g i) = (∏ i ∈ t, f i) / (∏ i ∈ t, g i) := ih (by intro i hi; exact hg0 i (Finset.mem_insert_of_mem hi)) (by intro i hi; exact hgtop i (Finset.mem_insert_of_mem hi)) have hprod0 : (∏ i ∈ t, g i) ≠ 0 := by exact Finset.prod_ne_zero_iff.mpr (by intro i hi exact hg0 i (Finset.mem_insert_of_mem hi)) have hprodtop : (∏ i ∈ t, g i) ≠ ∞ := by exact Finset.prod_ne_top_of_ne_top _ g (by intro i hi exact hgtop i (Finset.mem_insert_of_mem hi)) rw [Finset.prod_insert ha, Finset.prod_insert ha, Finset.prod_insert ha, ih'] rw [div_eq_mul_inv, div_eq_mul_inv, div_eq_mul_inv] rw [ENNReal.mul_inv] · ac_rfl · exact inr hprodtop · exact inr hprod0 -
mechCFactor_eq_qLocalMass_div_jointReflemma — For a structural causal model and fixed assignment, an observed node block, faithful reference measures, and an observed assignment, if each fixed variable's random copy has no outgoing edge, then the mechanism c-factor equals the local q-mass divided by the block's reference singleton mass.hypothesesN :sharedType u_1N → Type u_2∀ n, Fintype (Ω n)∀ n, MeasurableSingletonClass (Ω n)M :SCM N Ωref :s :M.FixedValueshS :S ⊆ M.observedhref :hfe :∀ n : NifSWIGNode.fixed n ∈ M.fixedthen∀ v : SWIGNode N, ¬ M.dag.edge (SWIGNode.random n) vconclusionM.mechCFactor ref S hS s xProof (Lean source)
lemma mechCFactor_eq_qLocalMass_div_jointRef [∀ n, Fintype (Ω n)] [∀ n, MeasurableSingletonClass (Ω n)] (M : SCM N Ω) (ref : ReferenceMeasures Ω) (s : M.FixedValues) (S : Finset (SWIGNode N)) (hS : S ⊆ M.observed) (href : ReferenceFaithful ref) (hfe : ∀ n : N, SWIGNode.fixed n ∈ M.fixed → ∀ v : SWIGNode N, ¬ M.dag.edge (SWIGNode.random n) v) (x : ValuesOn M.observed (swigΩ Ω)) : M.mechCFactor ref S hS s x = M.qLocalMass s S hS x / jointRef ref S ({valuesProjection hS x} : Set (ValuesOn S (swigΩ Ω))) := by have hnum : QmechMeasure M S hS (M.mechDoValues S s x) {valuesProjection hS x} = M.qLocalMass s S hS x := QmechMeasure_singleton_eq_qLocalMass M S hS hfe s x have hden0 : jointRef ref S ({valuesProjection hS x} : Set (ValuesOn S (swigΩ Ω))) ≠ 0 := jointRef_singleton_ne_zero ref href S (valuesProjection hS x) have hdenTop : jointRef ref S ({valuesProjection hS x} : Set (ValuesOn S (swigΩ Ω))) ≠ ∞ := by exact ne_of_lt (MeasureTheory.measure_lt_top (jointRef ref S) ({valuesProjection hS x} : Set (ValuesOn S (swigΩ Ω)))) unfold mechCFactor rw [rnDeriv_singleton_eq_div _ _ (absolutelyContinuous_jointRef_of_faithful ref href S (QmechMeasure M S hS (M.mechDoValues S s x))) (valuesProjection hS x) hden0 hdenTop] rw [hnum] -
component_ref_atom_product_eq_jointReflemma — Multiplying the singleton reference masses for all observed variables in one c-component equals the singleton mass of their joint reference measure.hypothesesN :sharedType u_1N → Type u_2∀ n, MeasurableSingletonClass (Ω n)M :SCM N Ωref :hS :S ⊆ M.observedhScomp :S ∈ M.toSWIGGraph.cComponentSetProof (Lean source)
lemma component_ref_atom_product_eq_jointRef [∀ n, MeasurableSingletonClass (Ω n)] (M : SCM N Ω) (ref : ReferenceMeasures Ω) (S : Finset (SWIGNode N)) (hS : S ⊆ M.observed) (hScomp : S ∈ M.toSWIGGraph.cComponentSet) (x : ValuesOn M.observed (swigΩ Ω)) : (∏ i ∈ Finset.univ.filter (fun i : Fin M.observed.card => M.toSWIGGraph.cComponentOf (M.observedAt i).val = S), ref.μ (M.observedAt i).val ({x (M.observedAt i)} : Set (swigΩ Ω (M.observedAt i).val))) = jointRef ref S ({valuesProjection hS x} : Set (ValuesOn S (swigΩ Ω))) := by classical have hprod : (∏ i ∈ Finset.univ.filter (fun i : Fin M.observed.card => M.toSWIGGraph.cComponentOf (M.observedAt i).val = S), ref.μ (M.observedAt i).val ({x (M.observedAt i)} : Set (swigΩ Ω (M.observedAt i).val))) = ∏ v : {v // v ∈ S}, ref.μ v.val ({(valuesProjection hS x) v} : Set (swigΩ Ω v.val)) := by refine Finset.prod_bij (fun i hi => ⟨(M.observedAt i).val, (mem_cComponent_iff_cComponentOf_eq M.toSWIGGraph (M.observedAt i).property hScomp).mpr (Finset.mem_filter.mp hi).2⟩) ?_ ?_ ?_ ?_ · intro i hi exact Finset.mem_univ _ · intro i _hi j _hj hij have hval : (M.observedAt i).val = (M.observedAt j).val := congrArg (fun v : {v // v ∈ S} => v.val) hij have hsub : M.observedAt i = M.observedAt j := Subtype.ext hval calc i = M.observedIndex (M.observedAt i) := (M.observedIndex_observedAt i).symm _ = M.observedIndex (M.observedAt j) := by rw [hsub] _ = j := M.observedIndex_observedAt j · intro v _hv let i : Fin M.observed.card := M.observedIndex ⟨v.val, hS v.property⟩ have hnode : (M.observedAt i).val = v.val := M.observedAt_observedIndex ⟨v.val, hS v.property⟩ refine ⟨i, ?_, ?_⟩ · rw [mem_filter] refine ⟨Finset.mem_univ _, ?_⟩ have hvcomp : M.toSWIGGraph.cComponentOf v.val = S := (mem_cComponent_iff_cComponentOf_eq M.toSWIGGraph (hS v.property) hScomp).mp v.property simpa [hnode] using hvcomp · exact Subtype.ext hnode · intro i hi simp [valuesProjection] rw [jointRef_singleton_eq_prod] exact hprod -
qLocalMass_fixSet_invariantlemma — Local q-mass is invariant under a fixSet intervention when no coordinate in S is one of the intervened random nodes and the full assignment pins each intervened random node to the corresponding fixed value.hypothesesN :sharedType u_1N → Type u_2M :SCM N ΩX :Finset NhObs :∀ D ∈ X, SWIGNode.random D ∈ M.observedhFix :∀ D ∈ X, SWIGNode.fixed D ∉ M.fixedsDo :(M.fixSet X hObs hFix).FixedValueshS :S ⊆ M.observedhSX :∀ n ∈ X, SWIGNode.random n ∉ Shpin :∀ D (hD : D ∈ X),x ⟨SWIGNode.random D, hObs D hD⟩= sDo ⟨SWIGNode.fixed D, mem_union_right _ (Finset.mem_image.mpr ⟨D, hD, rfl⟩)⟩conclusion(M.fixSet X hObs hFix).qLocalMass sDo S (by simpa [fixSet_observed] using hS) x= M.qLocalMass (M.fixSetProj X hObs hFix sDo) S hS xProof (Lean source)
lemma qLocalMass_fixSet_invariant (M : SCM N Ω) (X : Finset N) (hObs : ∀ D ∈ X, SWIGNode.random D ∈ M.observed) (hFix : ∀ D ∈ X, SWIGNode.fixed D ∉ M.fixed) (sDo : (M.fixSet X hObs hFix).FixedValues) (S : Finset (SWIGNode N)) (hS : S ⊆ M.observed) (hSX : ∀ n ∈ X, SWIGNode.random n ∉ S) (x : ValuesOn M.observed (swigΩ Ω)) (hpin : ∀ D (hD : D ∈ X), x ⟨SWIGNode.random D, hObs D hD⟩ = sDo ⟨SWIGNode.fixed D, mem_union_right _ (Finset.mem_image.mpr ⟨D, hD, rfl⟩)⟩) : (M.fixSet X hObs hFix).qLocalMass sDo S (by simpa [fixSet_observed] using hS) x = M.qLocalMass (M.fixSetProj X hObs hFix sDo) S hS x := by classical let MX := M.fixSet X hObs hFix let hSXobs : S ⊆ MX.observed := by simpa [MX, fixSet_observed] using hS have hobsAgree : ∀ w (hw : w ∈ M.observed), x ⟨w, by simpa [MX, fixSet_observed] using hw⟩ = x ⟨w, hw⟩ := by intro w hw rfl have hproj : M.fixSetProj X hObs hFix sDo = M.fixSetProj X hObs hFix sDo := rfl unfold qLocalMass congr 1 ext ℓ constructor · intro hLocal v hv have hnot : v ∉ X.image SWIGNode.random := by intro hvX rcases Finset.mem_image.mp hvX with ⟨D, hD, rfl⟩ exact hSX D hD hv exact (localConsistent_fixSet_iff M X hObs hFix sDo (M.fixSetProj X hObs hFix sDo) x x v (hSXobs hv) (hS hv) hnot hobsAgree hpin hproj ℓ).mp (hLocal v hv) · intro hLocal v hv have hnot : v ∉ X.image SWIGNode.random := by intro hvX rcases Finset.mem_image.mp hvX with ⟨D, hD, rfl⟩ exact hSX D hD hv exact (localConsistent_fixSet_iff M X hObs hFix sDo (M.fixSetProj X hObs hFix sDo) x x v (hSXobs hv) (hS hv) hnot hobsAgree hpin hproj ℓ).mpr (hLocal v hv)
Ratios 1 core · 6 supporting This file computes each observational step density as a ratio of component q-masses and reference atoms. ★ obsStepCondDensity_eq_component_ratio_div_ref
Prefix ratios for mechanism c-factors
This file computes each observational step density as a ratio of component q-masses and reference atoms. Its component-intersection and cancellation lemmas provide the algebraic bridge from the observational prefix product to a single mechanism c-factor.
For a finite structural causal model with finite measurable node-value spaces, coordinate reference measures and a fixed-node assignment, an observed c-component, evidence that it is a listed component, a position in the observed topological order, evidence that the node at that position belongs to the component, faithfulness of the reference measures, positive observational atom masses, and an observed realization, the one-step observational conditional density equals the component's successive local-mass ratio divided by the next coordinate's reference mass.
Formal statement
Proof (Lean source)
6 supporting declarations (lemmas, instances)
-
prefixNodes_obsParentClosedlemma — The first k observed nodes in a structural causal model's topological order form a set closed under observed parents.hypothesesconclusionM.ObsParentClosed (M.prefixNodes k)Proof (Lean source)
lemma prefixNodes_obsParentClosed (M : SCM N Ω) (k : ℕ) : M.ObsParentClosed (M.prefixNodes k) := by classical refine ⟨M.prefixNodes_subset_observed k, ?_⟩ intro v hv w hwObs hEdge rcases (M.mem_prefixNodes_iff k v).mp hv with ⟨hvObs, hvlt⟩ let i : Fin M.observed.card := M.observedIndex ⟨v, hvObs⟩ have hi_eq : (M.observedAt i).val = v := by exact M.observedAt_observedIndex ⟨v, hvObs⟩ have hwPred : w ∈ M.toSWIGGraph.observedPredecessors (M.observedAt i).val := by rw [hi_eq] exact Finset.mem_filter.mpr ⟨hwObs, M.dag.topoOrder_lt w v hEdge⟩ have hwPrefixI : w ∈ M.prefixNodes i.val := by simpa using ((M.observedPredecessors_observedAt i.isLt).symm ▸ hwPred) exact M.prefixNodes_mono (show i.val ≤ k from le_of_lt hvlt) hwPrefixI -
mem_cComponent_iff_cComponentOf_eqlemma — For an observed node and a listed c-component, membership in that component is equivalent to the computed c-component being the listed set.hypothesesconclusionv ∈ S ↔ G.cComponentOf v = SProof (Lean source)
lemma mem_cComponent_iff_cComponentOf_eq (G : SWIGGraph N) {v : SWIGNode N} {S : Finset (SWIGNode N)} (hv : v ∈ G.observed) (hS : S ∈ G.cComponentSet) : v ∈ S ↔ G.cComponentOf v = S := by constructor · intro hvS rw [SWIGGraph.cComponentSet, mem_image] at hS obtain ⟨w, hw, rfl⟩ := hS have hwv : G.bidirectedReachable w v := (G.mem_cComponentOf_iff_reachable hw).mp hvS exact (G.cComponentOf_eq_of_reachable hwv).symm · intro hcomp exact hcomp ▸ G.mem_cComponentOf_self hv -
qLocalMass_ne_toplemma — Every local q-mass associated with fixed values, an observed node set, and an observed assignment is finite.hypothesesconclusionM.qLocalMass s T hT x ≠ ∞ -
div_mul_commonlemma — Cancelling a common nonzero finite factor preserves a quotient of extended nonnegative reals.Proof (Lean source)
lemma ENNReal.div_mul_common {a b r : ENNReal} (hr0 : r ≠ 0) (hrtop : r ≠ ∞) : (a * r) / (b * r) = a / b := by rw [ENNReal.div_eq_inv_mul, ENNReal.div_eq_inv_mul] rw [ENNReal.mul_inv] · rw [show b⁻¹ * r⁻¹ * (a * r) = (r⁻¹ * r) * (b⁻¹ * a) by ac_rfl] rw [ENNReal.inv_mul_cancel hr0 hrtop] simp [mul_comm] · exact inr hrtop · exact inr hr0 -
prod_ne_top_of_ne_toplemma — A finite product of finite extended nonnegative reals is finite.hypothesesconclusion(∏ i ∈ s, f i) ≠ ∞Proof (Lean source)
lemma Finset.prod_ne_top_of_ne_top {ι : Type*} [DecidableEq ι] (s : Finset ι) (f : ι → ENNReal) (hf : ∀ i ∈ s, f i ≠ ∞) : (∏ i ∈ s, f i) ≠ ∞ := by classical induction s using Finset.induction_on with | empty => simp | insert a s ha ih => rw [Finset.prod_insert ha] exact ENNReal.mul_ne_top (hf a (Finset.mem_insert_self a s)) (ih (by intro i hi; exact hf i (Finset.mem_insert_of_mem hi))) -
cComponent_inter_prefix_succ_eq_of_node_nelemma — Given a finite structural causal model, a district, and a valid observed-node index, if the set is a district and the indexed node's district differs from it, then the district's intersection with the observed prefix is unchanged at that step.hypothesesN :sharedType u_1N → Type u_2M :SCM N ΩhScomp :S ∈ M.toSWIGGraph.cComponentSeti :Fin M.observed.cardhiS :M.toSWIGGraph.cComponentOf (M.observedAt i).val ≠ SconclusionS ∩ M.prefixNodes (i.val + 1) = S ∩ M.prefixNodes i.valProof (Lean source)
lemma cComponent_inter_prefix_succ_eq_of_node_ne (M : SCM N Ω) {S : Finset (SWIGNode N)} (hScomp : S ∈ M.toSWIGGraph.cComponentSet) {i : Fin M.observed.card} (hiS : M.toSWIGGraph.cComponentOf (M.observedAt i).val ≠ S) : S ∩ M.prefixNodes (i.val + 1) = S ∩ M.prefixNodes i.val := by classical ext v constructor · intro hv rcases Finset.mem_inter.mp hv with ⟨hvS, hvpre⟩ rw [M.prefixNodes_succ i.isLt] at hvpre rcases Finset.mem_union.mp hvpre with hvold | hvnew · exact Finset.mem_inter.mpr ⟨hvS, hvold⟩ · have hvnode : v = (M.observedAt i).val := by simpa using hvnew subst hvnode exact False.elim (hiS ((mem_cComponent_iff_cComponentOf_eq M.toSWIGGraph (M.observedAt i).property hScomp).mp hvS)) · intro hv rcases Finset.mem_inter.mp hv with ⟨hvS, hvpre⟩ exact Finset.mem_inter.mpr ⟨hvS, M.prefixNodes_mono (le_succ i.val) hvpre⟩