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

51. Composition of Injective Functions

Prove that the composition of two injective (one-to-one) functions is injective. Given `f : α → β` and `g : β → γ` that each map distinct inputs to distinct outputs, show that `g ∘ f` preserves injectivity.

Target Theorem
theorem injective_comp (α β γ : Type) (f : α → β) (g : β → γ) (hf : ∀ x y, f x = f y → x = y) (hg : ∀ x y, g x = g y → x = y) : ∀ x y, g (f x) = g (f y) → 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).