Pure Lean 4 · No Mathlib
MediumFunctions & Relations
55. Uniqueness of Function Inverses
Prove that if `g` is a left inverse of `f` and `h` is a right inverse of `f`, then `g` and `h` are equal as functions. Use function extensionality (`funext`) to reduce function equality to pointwise equality.
Target Theorem
theorem inverse_unique (α β : Type) (f : α → β) (g h : β → α) (hg : ∀ x, g (f x) = x) (hh : ∀ y, f (h y) = y) : g = hHints (0/2)
Stuck? Reveal hints one step at a time without spoiling the full proof.
Symbols:
Infoview & Diagnosticsline 1idle
Write your proof above and click Submit Proof (or open in live.lean-lang.org).