Recompute indegrees from remaining edges at every stage, rather than reusing original indegrees.
Step identifiers and dependencies
Rule: remaining_indegree · Uses: G001, S001
S003 · implies
Before
cycle candidate edge v0→v2
After
edge present: Yes
Conditions: none
Check every edge of the directed closed path returning to its start, not merely an impression that Kahn became stuck.
Step identifiers and dependencies
Rule: cycle_edge_witness · Uses: G001, S002
S004 · implies
Before
cycle candidate edge v2→v0
After
edge present: Yes
Conditions: none
Check every edge of the directed closed path returning to its start, not merely an impression that Kahn became stuck.
Step identifiers and dependencies
Rule: cycle_edge_witness · Uses: G001, S003
S005 · implies
Before
[v0, v2, v0]
After
pos(v0) < pos(v2) < pos(v0) is impossible
Conditions: none
A topological order would give a chain of strict position inequalities around the complete directed cycle, forcing the start before itself, a contradiction.
The full substitutions and premise audits recover the original answer, retaining its field order and verdict meanings.
This question review and source binding
Review date: 2026-10-26
Original questions, answers, step expressions, numeric ASTs and historical records are retained. Source candidate labels remain historical and are not overwritten as formal proof.