digraph_residual_contains_self
For a finite type V with decidable equality, directed graphs G and H of type Digraph V with decidable adjacency relations, if G ≤ H, then every vertex v : V satisfies v ∈ digraph_residual_at G H v.
Statement
theorem digraph_residual_contains_self {V : Type*} [Fintype V] [DecidableEq V] (G H : Digraph V) [DecidableRel G.Adj] [DecidableRel H.Adj] (hGH : G ≤ H) (v : V) : v ∈ digraph_residual_at G H v
- Source
- arXiv:2611.32872 p. 3
- Verified
- 26 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- digraph_residual_atFor a finite type V with decidable equality, directed graphs G and H of type Digraph V with decidable adjacency relations, and a vertex v…
- Used by 1
- digraph_residual_total_expansion_le_of_tournamentFor a finite type V with decidable equality and directed graphs G and H of type Digraph V with decidable adjacency relations, if G is…
Read back from the Lean
For any finite type $V$ with decidable equality, directed graphs $G$ and $H$ on $V$ with decidable adjacency relations, if $G \le H$, then for every vertex $v \in V$, $v$ is an element of digraph_residual_at G H v (the set of all vertices $w \in V$ such that every in-neighbor of $v$ in $G$, as well as $v$ itself, is an in-neighbor of $w$ in $H$ or equal to $w$).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
By definition of the residual set, a vertex v belongs to digraph_residual_at G H v if every vertex u that is equal to v or has an edge to v in G also satisfies this condition in H with respect to v. The proof proceeds by case analysis on whether u = v or G.Adj u v: the equality case holds by reflexivity, and the adjacency case follows directly from the sub-digraph hypothesis G ≤ H.
Membership v ∈ digraph_residual_at G H v is equivalent to showing that for all u : V, if u = v or G.Adj u v, then u = v or H.Adj u v
Unfolding the definition of digraph_residual_at and simplifying the condition for membership in a filtered universal set via Finset.mem_filter, Finset.mem_univ, and true_and reduces the goal to checking the defining implication with w instantiated at v.
uses
digraph_residual_at,Finset.mem_filter,Finset.mem_univ,true_andsimp only [digraph_residual_at, Finset.mem_filter, Finset.mem_univ, true_and]To establish the implication for an arbitrary vertex u, it suffices to consider the cases u = v and G.Adj u v separately
We introduce an arbitrary vertex u and the assumption that u = v ∨ G.Adj u v, then perform a case split on this disjunction.
intro u hu rcases hu with rfl | hadj
In the case u = v, the required disjunction u = v ∨ H.Adj u v holds
Substituting u = v, the first alternative u = v holds immediately by reflexivity.
· left; rfl
In the case G.Adj u v, the required disjunction u = v ∨ H.Adj u v holds
Since G ≤ H means any directed edge in G is also a directed edge in H, the assumption G.Adj u v directly gives H.Adj u v, satisfying the second alternative.
· right; exact hGH hadj
digraph_residual_at- the definition of the residual set: digraph_residual_at G H v is the finset of vertices w such that for all u, if u = v or G.Adj u v, then u = w or H.Adj u w
Finset.mem_filter- an element a is in Finset.filter p s if and only if a ∈ s and p a holds
Finset.mem_univ- every element of a finite type belongs to Finset.univ
true_and- True ∧ p simplifies to p
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.
/-- Every vertex v belongs to its own residual R_v. -/theorem digraph_residual_contains_self {V : Type*} [Fintype V] [DecidableEq V] (G H : Digraph V) [DecidableRel G.Adj] [DecidableRel H.Adj] (hGH : G ≤ H) (v : V) : v ∈ digraph_residual_at G H v := by simp only [digraph_residual_at, Finset.mem_filter, Finset.mem_univ, true_and] intro u hu rcases hu with rfl | hadj · left; rfl · right; exact hGH hadj