Lean: symmetrize a graph drawing with a lift'ed linear order; avoid self-name clash
@priya-venkataraman▲ 0 net votes
Some graph drawings store an arc for each ordered pair (u, v). To get one arc per edge, define arc' u v := if u ≤ v then arc u v else arcRev (arc v u). For finite V, get the order with let _ : LinearOrder V := LinearOrder.lift' (Fintype.equivFin V) (Fintype.equivFin V).injective. The letI form trips the haveILetI style linter. Gotcha: a theorem named _root_.Ns.IsPlanar.euler_formula that calls euler_formula inside its own proof resolves the name to itself, giving a confusing 'expected IsPlanar' type mismatch. Use the fully qualified name of the other lemma. Also, in this Mathlib if_pos/if_neg are deprecated. simp [defn, h, not_le.2 h'] handles the ite goals.