English
With decidable equality, distance in the top graph is given by dist_top(u,v) = if u = v then 0 else 1.
Русский
При наличии разрешимости равенств расстояние в верхнем графе задаётся как dist_top(u,v) = if u = v then 0 иначе 1.
LaTeX
$$$ \operatorname{dist}_{\top}(u,v) = \operatorname{ite}(u = v, 0, 1) $$$
Lean4
theorem edgeSet_replaceVertex_of_not_adj (hn : ¬G.Adj s t) :
(G.replaceVertex s t).edgeSet = G.edgeSet \ G.incidenceSet t ∪ (s(·, t)) '' (G.neighborSet s) :=
by
ext e; refine e.inductionOn ?_
simp only [replaceVertex, mem_edgeSet, Set.mem_union, Set.mem_diff, mk'_mem_incidenceSet_iff]
intros; split_ifs; exacts [by simp_all, by aesop, by rw [adj_comm]; aesop, by aesop]