{
  "id": "3014",
  "ident": "NS.03014",
  "slug": "erdos-725",
  "title": "Erdős Problem 725",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Give an asymptotic formula for the number of $k\\times n$ Latin rectangles.\n\nThe formula $F(k,n)$ must satisfy $L(k,n)\\sim F(k,n)$ as $n\\to\\infty$ for every choice of\n$k=k(n)\\leq n$, so it also covers Latin squares ($k=n$).",
  "subjects": [
    "math.CO",
    "msc:05"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos725.erdos_725",
  "statement_lean": "theorem erdos_725 (k : ℕ → ℕ) (hk : ∀ n, k n ≤ n) :\n    (fun n ↦ (L (k n) n : ℝ)) ~[atTop] fun n ↦ erdos_725.answer (k n) n",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Erdős Problem 725\n\n*References:*\n- [erdosproblems.com/725](https://www.erdosproblems.com/725)\n- [Er81] Erdős, P., *On the combinatorial problems which I would most like to see solved*.\n  Combinatorica 1 (1981), 25-42. [PDF](https://www.renyi.hu/~p_erdos/1981-16.pdf)\n- [ErKa46] Erdős, P. and Kaplansky, I., *The asymptotic number of Latin rectangles*.\n  Amer. J. Math. 68 (1946), 230-236. [PDF](https://www.renyi.hu/~p_erdos/1946-12.pdf)\n- [Ya51] Yamamoto, K., *On the asymptotic number of Latin rectangles*.\n  Jpn. J. Math. 21 (1951), 113-119.\n-/\n\n@[expose] public section\n\nopen Filter Asymptotics\n\nnamespace Erdos725\n\n/-- `M` is a $k\\times n$ Latin rectangle: `M i j` is the entry in row `i` and column `j`, the\nentries are in `Fin n` (standing for $\\{1,\\dots,n\\}$), every row is a permutation of the\nentries, and no entry is repeated in a column. -/\nabbrev IsLatinRectangle {k n : ℕ} (M : Fin k → Fin n → Fin n) : Prop :=\n  (∀ i, Function.Injective (M i)) ∧ ∀ j, Function.Injective fun i ↦ M i j\n\n/-- $L(k,n)$ is the number of $k\\times n$ Latin rectangles. Rows, columns and entries are\nlabelled and the rows are ordered. It is $0$ for $k>n\\geq 1$ and $1$ for $k=0$. -/\nnoncomputable def L (k n : ℕ) : ℕ :=\n  Nat.card {M : Fin k → Fin n → Fin n // IsLatinRectangle M}\n\n/-- There are $n!$ Latin rectangles with one row. -/\n@[category test, AMS 5]\ntheorem L_one (n : ℕ) : L 1 n = n.factorial := by\n  have e : {M : Fin 1 → Fin n → Fin n // IsLatinRectangle M} ≃ Equiv.Perm (Fin n) :=\n    { toFun := fun M ↦ Equiv.ofBijective (M.1 0) (Finite.injective_iff_bijective.1 (M.2.1 0))\n      invFun := fun σ ↦ ⟨fun _ ↦ σ, fun _ ↦ σ.injective, fun _ a b _ ↦ Subsingleton.elim a b⟩\n      left_inv := fun M ↦ by\n        refine Subtype.ext (funext fun i ↦ ?_)\n        have hi : i = 0 := Subsingleton.elim i 0\n        subst hi\n        rfl\n      right_inv := fun σ ↦ Equiv.ext fun _ ↦ rfl }\n  unfold L\n  rw [Nat.card_congr e, Nat.card_perm, Nat.card_eq_fintype_card, Fintype.card_fin]\n\ndef erdos_725.answer : ℕ → ℕ → ℝ := sorry\n\n/--\nGive an asymptotic formula for the number of $k\\times n$ Latin rectangles.\n\nThe formula $F(k,n)$ must satisfy $L(k,n)\\sim F(k,n)$ as $n\\to\\infty$ for every choice of\n$k=k(n)\\leq n$, so it also covers Latin squares ($k=n$).\n-/\n@[category research open, question value, AMS 5]\ntheorem erdos_725 (k : ℕ → ℕ) (hk : ∀ n, k n ≤ n) :\n    (fun n ↦ (L (k n) n : ℝ)) ~[atTop] fun n ↦ erdos_725.answer (k n) n := by\n  sorry\n\n/--\nErdős and Kaplansky [ErKa46] proved the count is\n$$\\sim e^{-\\binom{k}{2}}(n!)^k$$\nwhen $k=o((\\log n)^{3/2-\\epsilon})$.\n\nHere $\\epsilon>0$ is fixed.\n-/\n@[category research solved, AMS 5]\ntheorem erdos_725.variants.erdos_kaplansky (ε : ℝ) (hε : 0 < ε) (k : ℕ → ℕ)\n    (hk : (fun n ↦ (k n : ℝ)) =o[atTop] fun n ↦ Real.log n ^ (3 / 2 - ε)) :\n    (fun n ↦ (L (k n) n : ℝ)) ~[atTop]\n      fun n ↦ Real.exp (-((k n).choose 2 : ℝ)) * (n.factorial : ℝ) ^ k n := by\n  sorry\n\n/--\nYamamoto [Ya51] extended this to $k\\leq n^{1/3-o(1)}$.\n\nAs in [Ya51, p. 113], we assume $k<n^{1/3-\\delta}$ with $n^{-\\delta}\\to 0$, where $\\delta$\nmay be a positive constant or a function of $n$.\n-/\n@[category research solved, AMS 5]\ntheorem erdos_725.variants.yamamoto (δ : ℕ → ℝ)\n    (hδ : Tendsto (fun n : ℕ ↦ (n : ℝ) ^ (-δ n)) atTop (nhds 0)) (k : ℕ → ℕ)\n    (hk : ∀ᶠ n in atTop, (k n : ℝ) < (n : ℝ) ^ (1 / 3 - δ n)) :\n    (fun n ↦ (L (k n) n : ℝ)) ~[atTop]\n      fun n ↦ Real.exp (-((k n).choose 2 : ℝ)) * (n.factorial : ℝ) ^ k n := by\n  sorry\n\nend Erdos725\n",
  "statement_hash": "1675cb0c04a2ed4567ae9f132dcf58989e2b449f04eb073504a9ef18dcffbb08",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}