OAI/Combinatorics/GraphThreshold/ProbabilityTreeTrim.lean
35 declarations, 0 contain sorry, 0 declared as axioms
Deterministic removal of initial zero-capacity levels.
- def
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.firstChildline 14Source documentation
Choose one child deterministically from the actual nonempty child law.
def firstChild : {d : ℕ} → ProbabilityTree X (d + 1) → ProbabilityTree X d | _, @node _ _ _ _ law _ _ child => child (Classical.choice (branch_nonempty law))Mentions: OAI.LeanBlast.SecondKahnKalai.ProbabilityTree, OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.branch_nonempty
- def
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.firstLabelline 17 - def
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.prependChosenline 21Source documentation
Prepend the chosen incoming arc to a path of the chosen child.
def prependChosen : {d : ℕ} → (T : ProbabilityTree X (d + 1)) → (firstChild T).Path → T.Path | _, @node _ _ _ _ law _ _ _, p => ⟨Classical.choice (branch_nonempty law), p⟩ /-- Remove `k` initial levels. The additive depth form avoids subtraction casts. -/Mentions: OAI.LeanBlast.SecondKahnKalai.ProbabilityTree, OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.firstChild, OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.Path, OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.branch_nonempty
- def
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.dropline 26Source documentation
Remove
kinitial levels. The additive depth form avoids subtraction casts.def drop : (k : ℕ) → {d : ℕ} → ProbabilityTree X (d + k) → ProbabilityTree X d | 0, _, T => T | k + 1, _, T => drop k (firstChild T) /-- Lift a retained path through the fixed choices on the removed prefix. -/Mentions: OAI.LeanBlast.SecondKahnKalai.ProbabilityTree, OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.firstChild
- def
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.liftDropPathline 31Source documentation
Lift a retained path through the fixed choices on the removed prefix.
def liftDropPath : (k : ℕ) → {d : ℕ} → (T : ProbabilityTree X (d + k)) → (drop k T).Path → T.Path | 0, _, _, p => p | k + 1, _, T, p => prependChosen T (liftDropPath k (firstChild T) p) /-- Reindex a tree along equality of depths, without changing its data. -/Mentions: OAI.LeanBlast.SecondKahnKalai.ProbabilityTree, OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.drop, OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.Path, OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.prependChosen, OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.firstChild
- def
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.castDepthline 37Source documentation
Reindex a tree along equality of depths, without changing its data.
def castDepth {d e : ℕ} (h : d = e) (T : ProbabilityTree X d) : ProbabilityTree X e := h ▸ T - def
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.castPathline 39 - def
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.dropPrefixline 45Source documentation
Subtraction-indexed convenience wrapper for removing an initial prefix.
def dropPrefix {d : ℕ} (T : ProbabilityTree X d) (k : ℕ) (hk : k ≤ d) : ProbabilityTree X (d - k) := … - def
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.liftDropPrefixPathline 49 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.pathUnion_prependChosenline 58 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.firstChild_support_subsetline 64 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.firstChild_isDisjointline 70 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.firstChild_hasCapacitiesline 76 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.firstChild_hasSpreadline 81 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.firstLabel_card_leline 87 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.firstLabel_eq_emptyline 93 - def
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.prefixUnionline 100Source documentation
Labels committed by the deterministic choices on the removed prefix.
def prefixUnion : (k : ℕ) → {d : ℕ} → ProbabilityTree X (d + k) → Finset X | 0, _, _ => ∅ | k + 1, _, T => firstLabel T ∪ prefixUnion k (firstChild T)Mentions: OAI.LeanBlast.SecondKahnKalai.ProbabilityTree, OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.firstLabel, OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.firstChild
- theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.pathUnion_liftDropPathline 104 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.drop_support_subsetline 114 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.drop_isDisjointline 120 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.drop_hasCapacitiesline 127 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.drop_hasSpreadline 135 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.prefixUnion_eq_empty_of_capacitiesline 143 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.pathUnion_liftDropPath_eqline 153Source documentation
Removing zero-capacity levels preserves every retained full path union exactly.
theorem pathUnion_liftDropPath_eq (k : ℕ) {d : ℕ} {T : ProbabilityTree X (d + k)} {m : ℕ → ℕ} (hT : T.HasCapacities m) (hm : ∀ i, i < k → m i = 0) (p : (drop k T).Path) : T.pathUnion (liftDropPath k T p) = (drop k T).pathUnion p := by …Mentions: OAI.LeanBlast.SecondKahnKalai.ProbabilityTree, OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.drop, OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.Path, OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.liftDropPath, OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.pathUnion
- theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.support_castDepthline 158 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.isDisjoint_castDepthline 161 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.hasCapacities_castDepthline 165 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.hasSpread_castDepthline 168 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.pathUnion_castPath_symmline 171 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.dropPrefix_support_subsetline 175 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.dropPrefix_isDisjointline 180 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.dropPrefix_hasCapacitiesline 186 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.dropPrefix_hasSpreadline 192 - theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.pathUnion_liftDropPrefixPath_eqline 199Source documentation
Every path after zero-prefix trimming is an original full path with exactly the same union.
theorem pathUnion_liftDropPrefixPath_eq {d : ℕ} {T : ProbabilityTree X d} {m : ℕ → ℕ} (hT : T.HasCapacities m) (k : ℕ) (hk : k ≤ d) (hm : ∀ i, i < k → m i = 0) (p : (dropPrefix T k hk).Path) : T.pathUnion (liftDropPrefixPath T k hk p) = (dropPrefix T k hk).pathUnion p := by …Mentions: OAI.LeanBlast.SecondKahnKalai.ProbabilityTree, OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.dropPrefix, OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.Path, OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.liftDropPrefixPath, OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.pathUnion
- theorem
OAI.LeanBlast.SecondKahnKalai.ProbabilityTree.coveredBy_of_dropPrefixline 208