pith. machine review for the scientific record. sign in
theorem proved tactic proof

zmodCost_symm

show as:
view Lean formalization →

No prose has been written for this declaration yet. The Lean source and graph data below render without it.

generate prose now

formal statement (Lean)

  26theorem zmodCost_symm {n : ℕ} (a b : ZMod n) : zmodCost a b = zmodCost b a := by

proof body

Tactic-mode proof.

  27  by_cases h : a = b
  28  · subst h; simp [zmodCost]
  29  · have h' : b ≠ a := by intro hb; exact h hb.symm
  30    simp [zmodCost, h, h']
  31
  32/-- Interpret `LogicNat` in `ZMod n` by the usual coercion of its index. -/

used by (3)

From the project-wide theorem graph. These declarations reference this one in their body.

depends on (9)

Lean names referenced from this declaration's body.