/-- A strictly increasing function is injective.
Hint: after `intro x hx y hy hxy`, split into the cases `x < y`, `x = y`, `x > y` with
`rcases lt_trichotomy x y with hlt | heq | hgt`. In the first case `hf hx hy hlt : f x < f y`. -/
theorem injOn_of_strictMonoOn {f : ℝ → ℝ} {s : Set ℝ} (hf : StrictMonoOn f s) :
Set.InjOn f s := by
sorryShow the compiled solution
/-- **A strictly increasing function is injective** on any set where it is strictly increasing.
If `x ≠ y`, one of them is smaller, say `x < y`; then `f x < f y`, so `f x ≠ f y`.
(Mathlib: `StrictMonoOn.injOn`.) -/
theorem injOn_of_strictMonoOn {f : ℝ → ℝ} {s : Set ℝ} (hf : StrictMonoOn f s) : Set.InjOn f s := by
intro x hx y hy hxy
rcases lt_trichotomy x y with hlt | heq | hgt
· exact absurd hxy (ne_of_lt (hf hx hy hlt))
· exact heq
· exact absurd hxy (ne_of_gt (hf hy hx hgt))Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/FunctionsAndGraphs.leanTry it in the Lean web editor