import Mathlib.Data.Set.Basic
import Mathlib.Data.Set.Card
import Mathlib.Order.Interval.Finset.Nat
import Mathlib.Tactic.Ring
/-!
# International Mathematical Olympiad 1987, Problem 4
Prove that there is no function f : ℕ → ℕ such that f(f(n)) = n + 1987
for every n.
-/
namespace Imo1987P4
theorem imo1987_p4 : ¬∃ f : ℕ → ℕ, ∀ n, f (f n) = n + 1987 := sorry
end Imo1987P4
This problem has a complete formalized solution.