op869_extend_postdegree
An original vertex has the same post-degree after padding.
Statement
theorem op869_extend_postdegree {n m : ℕ} (h : n ≤ m) (P : Fin n → Finset (Fin n)) (a : Fin n) :
op869_predecessor_postdegree (op869_extend_predecessors h P) (Fin.castLE h a) =
op869_predecessor_postdegree P a- Source
- Padding and monotonicity for the finite adversary game of arXiv:2610.41516 Section 2.
- Verified
- 18 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 3
- op869_predecessor_postdegreeThe post-degree of a vertex in an ordered predecessor presentation is the number of later vertices that list it as a predecessor.
- op869_extend_predecessorsExtend a predecessor presentation to a larger initial-segment universe, leaving added vertices isolated.
- op869_mem_extend_predecessorsMembership in a padded predecessor set is equivalent to original membership under the initial-segment embedding.
- Used by 1
- op869_extend_postdegree_boundIf every original post-degree is at most D, padding preserves this bound at all vertices.
The proof, explained
The post-degree of a vertex a is the number of vertices greater than a that have a as a predecessor. The proof establishes that the set of post-neighbors of castLE(a) in the extended graph is precisely the image under the canonical embedding castLE of the set of post-neighbors of a in the original graph. This set equality is verified by extensionality using the characterization of extended predecessors and the injectivity of castLE. Because embeddings preserve the cardinality of finite sets, the post-degree is unchanged by padding.
The equality of post-degrees reduces to showing that the set of post-neighbors of castLE(a) in the extended graph is the image under castLE of the post-neighbors of a in the original graph, which by extensionality reduces to an equivalence for each vertex y.
The post-degree is the size of the set of post-neighbors—vertices larger than the given vertex that have it as a predecessor. We state an auxiliary lemma (hset) asserting that the extended post-neighbor set of castLE(a) is the image under the embedding castLE of the original post-neighbor set of a. By extensionality, it suffices to prove membership equivalence for an arbitrary vertex y. Simplifying membership in the filtered and mapped finsets reduces the goal to showing that y > castLE(a) and castLE(a) ∈ P_ext(y) if and only if y is the castLE image of an original post-neighbor of a, which splits into two implications.
uses
Finset.mem_filter,Finset.mem_univ,true_and,Finset.mem_mapclassical have hset : (Finset.univ.filter (fun y : Fin m => Fin.castLE h a < y ∧ Fin.castLE h a ∈ op869_extend_predecessors h P y)) = (Finset.univ.filter (fun y : Fin n => a < y ∧ a ∈ P y)).map (Fin.castLEEmb h) := by ext y simp only [Finset.mem_filter, Finset.mem_univ, true_and, Finset.mem_map] constructor
Every post-neighbor of castLE(a) in the extended graph is the image under castLE of a post-neighbor of a in the original graph.
Assume y is a post-neighbor of castLE(a), meaning castLE(a) < y and castLE(a) ∈ P_ext(y). By the definition of extended predecessors (op869_mem_extend_predecessors), there exist original vertices a' and b such that castLE(a') = castLE(a), castLE(b) = y, and a' ∈ P(b). Since castLE is injective (Fin.castLE_injective), a' = a, so a ∈ P(b). Substituting y = castLE(b) into castLE(a) < y gives castLE(a) < castLE(b), which means a < b on the underlying values. Thus b is an original post-neighbor of a whose image is y.
uses
op869_mem_extend_predecessors,Fin.castLE_injective· rintro ⟨hay, hmem⟩ obtain ⟨a', b, ha, hb, hab⟩ := (op869_mem_extend_predecessors h P (Fin.castLE h a) y).mp hmem have haa : a' = a := Fin.castLE_injective h ha subst a' refine ⟨b, ⟨?_, hab⟩, hb⟩ rw [← hb] at hay exact hayThe image under castLE of any post-neighbor of a in the original graph is a post-neighbor of castLE(a) in the extended graph.
Suppose b is an original post-neighbor of a, meaning a < b and a ∈ P(b), and set y = castLE(b). The inequality castLE(a) < castLE(b) follows directly from a < b on the underlying natural numbers. By the reverse direction of op869_mem_extend_predecessors, the pair (a, b) witnesses that castLE(a) ∈ P_ext(castLE(b)).
uses
op869_mem_extend_predecessors· rintro ⟨b, ⟨hab, hmem⟩, rfl⟩ exact ⟨hab, (op869_mem_extend_predecessors h P _ _).mpr ⟨a, b, rfl, rfl, hmem⟩⟩
The post-degree of castLE(a) in the extended graph equals the post-degree of a in the original graph.
Unfolding the definition of post-degree expresses each post-degree as the cardinality of its corresponding post-neighbor set. Rewriting with the set equality established above and using the fact that the embedding castLE preserves the cardinality of finite sets (Finset.card_map) completes the proof.
uses
Finset.card_mapunfold op869_predecessor_postdegree rw [hset, Finset.card_map]
Finset.mem_filter- An element belongs to a filtered finset {x ∈ s | p x} if and only if it belongs to s and satisfies the predicate p.
Finset.mem_univ- Every element of a finite type belongs to the universal finset `Finset.univ`.
true_and- The conjunction of True with any proposition p is equivalent to p.
Finset.mem_map- An element y belongs to the image under an embedding f of a finset s if and only if y = f x for some x ∈ s.
op869_mem_extend_predecessors- A vertex x is an extended predecessor of y if and only if x and y are the castLE images of original vertices a and b such that a is a predecessor of b.
Fin.castLE_injective- The canonical inclusion map `Fin.castLE` from `Fin n` to `Fin m` (for n ≤ m) is injective.
Finset.card_map- Mapping a finset under an injective embedding preserves its cardinality.
- In Lean, the inequality `Fin.castLE h a < Fin.castLE h b` is definitionally equal to `a < b` because the strict order on `Fin` compares the underlying natural values, which `Fin.castLE` preserves identically. Consequently, rewriting `y` with `Fin.castLE h b` in `Fin.castLE h a < y` directly yields `a < b` without requiring an explicit order-embedding lemma.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
/-- An original vertex has the same post-degree after padding. -/theorem op869_extend_postdegree {n m : ℕ} (h : n ≤ m) (P : Fin n → Finset (Fin n)) (a : Fin n) : op869_predecessor_postdegree (op869_extend_predecessors h P) (Fin.castLE h a) = op869_predecessor_postdegree P a := by classical have hset : (Finset.univ.filter (fun y : Fin m => Fin.castLE h a < y ∧ Fin.castLE h a ∈ op869_extend_predecessors h P y)) = (Finset.univ.filter (fun y : Fin n => a < y ∧ a ∈ P y)).map (Fin.castLEEmb h) := by ext y simp only [Finset.mem_filter, Finset.mem_univ, true_and, Finset.mem_map] constructor · rintro ⟨hay, hmem⟩ obtain ⟨a', b, ha, hb, hab⟩ := (op869_mem_extend_predecessors h P (Fin.castLE h a) y).mp hmem have haa : a' = a := Fin.castLE_injective h ha subst a' refine ⟨b, ⟨?_, hab⟩, hb⟩ rw [← hb] at hay exact hay · rintro ⟨b, ⟨hab, hmem⟩, rfl⟩ exact ⟨hab, (op869_mem_extend_predecessors h P _ _).mpr ⟨a, b, rfl, rfl, hmem⟩⟩ unfold op869_predecessor_postdegree rw [hset, Finset.card_map]