All Exercises
#54 Right Inverse Implies Surjectivity
live.lean-lang.org
Pure Lean 4 · No Mathlib
EasyFunctions & Relations

54. Right Inverse Implies Surjectivity

Prove that any function `f : α → β` with a right inverse (section) `g : β → α` satisfying `∀ y, f (g y) = y` must be surjective.

Target Theorem
theorem right_inverse_surjective (α β : Type) (f : α → β) (g : β → α) (h : ∀ y, f (g y) = y) : ∀ y, ∃ x, f x = y
Hints (0/2)

Stuck? Reveal hints one step at a time without spoiling the full proof.

Symbols:
Initializing Lean 4 editor…
Infoview & Diagnosticsline 1idle
Write your proof above and click Submit Proof (or open in live.lean-lang.org).