English
Two additive monoid homomorphisms f,g: ℤ → A are equal if they agree on 1.
Русский
Два гомоморфа аддитивного моноида f,g: ℤ → A равны, если они agree на 1.
LaTeX
$$$$ \\forall A [AddMonoid A],\\ f,g: \\mathbb{Z} \\to^+ A,\\ f(1) = g(1) \\Rightarrow f = g. $$$$
Lean4
/-- Two additive monoid homomorphisms `f`, `g` from `ℤ` to an additive monoid are equal
if `f 1 = g 1`. -/
@[ext high]
theorem ext_int [AddMonoid A] {f g : ℤ →+ A} (h1 : f 1 = g 1) : f = g :=
have : f.comp (Int.ofNatHom : ℕ →+ ℤ) = g.comp (Int.ofNatHom : ℕ →+ ℤ) := ext_nat' _ _ h1
have this' : ∀ n : ℕ, f n = g n := DFunLike.ext_iff.1 this
ext fun n =>
match n with
| (n : ℕ) => this' n
| .negSucc n => eq_on_neg _ _ (this' <| n + 1)