All Exercises
#52 Composition of Surjective Functions
live.lean-lang.org
Pure Lean 4 · No Mathlib
EasyFunctions & Relations

52. Composition of Surjective Functions

Prove that the composition of two surjective (onto) functions is surjective. Given any target element `c : γ`, chain preimages back through `g` and `f` to construct a witness `a : α` with `g (f a) = c`.

Target Theorem
theorem surjective_comp (α β γ : Type) (f : α → β) (g : β → γ) (hf : ∀ b, ∃ a, f a = b) (hg : ∀ c, ∃ b, g b = c) : ∀ c, ∃ a, g (f a) = c
Hints (0/3)

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).