{
  "index": "1951-A-5",
  "type": "NT",
  "tag": [
    "NT",
    "GEO"
  ],
  "difficulty": "",
  "question": "5. Consider in the plane the network of points having integral coordinates. For lines having rational slope show that:\n(i) the line passes through no points of the network or through infinitely many;\n(ii) there exists for each line a positive number \\( d \\) having the property that no point of the network, except such as may be on the line, is closer to the line than the distance \\( d \\).",
  "solution": "Solution. (i) If \\( L \\) is a line with rational slope its equation may be written as \\( a x+b y+c=0 \\) where \\( a \\) and \\( b \\) are integers not both zero. Suppose \\( \\left(x_{1}, y_{1}\\right) \\) is a point on the line and that \\( x_{1} \\) and \\( y_{1} \\) are both integers. Then points of the form \\( \\left(x_{1}+k b, y_{1}-k a\\right), k=0, \\pm 1, \\pm 2, \\ldots \\) all lie on the line, since\n\\[\na\\left(x_{1}+k b\\right)+b\\left(y_{1}-k a\\right)+c=a x_{1}+b y_{1}+c=0\n\\]\n\nThus, if there is one point with integer coordinates on a line with rational slope, there are infinitely many.\n(ii) The distance from the point \\( (p, q) \\) to the line \\( L \\) with equation \\( a x+ \\) \\( b y+c=0 \\) is\n\\[\nd=\\frac{|a p+b q+c|}{\\sqrt{a^{2}}+\\tilde{b}^{2}} .\n\\]\n\nSince \\( L \\) has rational slope we can choose \\( a \\) and \\( b \\) to be integers. Then \\( a p+b q \\) takes on only integer values. Therefore, if \\( c \\) is an integer, \\( d \\) is either 0 or at least \\( 1 / \\sqrt{a^{2}+b^{2}} \\). If \\( c \\) is not an integer, \\( d \\) is at least \\( e / \\sqrt{a^{2}+b^{2}} \\), where \\( e \\) is the distance from \\( c \\) to the nearest integer.\n\nRemark. If we choose the equation of \\( L \\) so that \\( a \\) and \\( b \\) are relatively prime integers, then \\( a p+b q \\) takes all integer values and the least distance to \\( L \\) from a point with integral coordinates not on \\( L \\) is exactly \\( 1 / \\sqrt{a^{2}+b^{2}} \\) if \\( c \\) is an integer and \\( e / \\sqrt{a^{2}+b^{2}} \\) if it is not.\n\nProperties of the integral lattice were discussed by Martin Gardner, \"Mathematical Games,\" Scientific American, May 1965, pages 120-122, and also by Fritz Herzog and B. M. Stewart, \"Patterns of Visible and Non-Visible Lattice Points,\" American Mathematical Monthly, vol. 78 (1971), pages 487-493. Further references to the extensive literature can be found in these sources.",
  "vars": [
    "x",
    "y",
    "x_1",
    "y_1",
    "p",
    "q",
    "k"
  ],
  "params": [
    "a",
    "b",
    "c",
    "d",
    "L",
    "e"
  ],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "x": "coordx",
        "y": "coordy",
        "x_1": "pointxone",
        "y_1": "pointyone",
        "p": "latticex",
        "q": "latticey",
        "k": "intkval",
        "a": "intcoeffa",
        "b": "intcoeffb",
        "c": "intconstc",
        "d": "mindist",
        "L": "lineref"
      },
      "question": "5. Consider in the plane the network of points having integral coordinates. For lines having rational slope show that:\n(i) the line passes through no points of the network or through infinitely many;\n(ii) there exists for each line a positive number \\( mindist \\) having the property that no point of the network, except such as may be on the line, is closer to the line than the distance \\( mindist \\).",
      "solution": "Solution. (i) If \\( lineref \\) is a line with rational slope its equation may be written as \\( intcoeffa\\, coordx + intcoeffb\\, coordy + intconstc = 0 \\) where \\( intcoeffa \\) and \\( intcoeffb \\) are integers not both zero. Suppose \\( (pointxone, pointyone) \\) is a point on the line and that \\( pointxone \\) and \\( pointyone \\) are both integers. Then points of the form \\( (pointxone + intkval\\, intcoeffb,\\, pointyone - intkval\\, intcoeffa),\\, intkval = 0, \\pm 1, \\pm 2, \\ldots \\) all lie on the line, since\n\\\\[\nintcoeffa(pointxone + intkval\\, intcoeffb) + intcoeffb(pointyone - intkval\\, intcoeffa) + intconstc = intcoeffa\\, pointxone + intcoeffb\\, pointyone + intconstc = 0 .\n\\\\]\nThus, if there is one point with integer coordinates on a line with rational slope, there are infinitely many.\n\n(ii) The distance from the point \\( (latticex, latticey) \\) to the line \\( lineref \\) with equation \\( intcoeffa\\, coordx + intcoeffb\\, coordy + intconstc = 0 \\) is\n\\\\[\nmindist = \\frac{|\\, intcoeffa\\, latticex + intcoeffb\\, latticey + intconstc \\,|}{\\sqrt{intcoeffa^{2}+intcoeffb^{2}}} .\n\\\\]\nSince \\( lineref \\) has rational slope we can choose \\( intcoeffa \\) and \\( intcoeffb \\) to be integers. Then \\( intcoeffa\\, latticex + intcoeffb\\, latticey \\) takes on only integer values. Therefore, if \\( intconstc \\) is an integer, \\( mindist \\) is either 0 or at least \\( 1 / \\sqrt{intcoeffa^{2}+intcoeffb^{2}} \\). If \\( intconstc \\) is not an integer, \\( mindist \\) is at least \\( e / \\sqrt{intcoeffa^{2}+intcoeffb^{2}} \\), where \\( e \\) is the distance from \\( intconstc \\) to the nearest integer.\n\nRemark. If we choose the equation of \\( lineref \\) so that \\( intcoeffa \\) and \\( intcoeffb \\) are relatively prime integers, then \\( intcoeffa\\, latticex + intcoeffb\\, latticey \\) takes all integer values and the least distance to \\( lineref \\) from a point with integral coordinates not on \\( lineref \\) is exactly \\( 1 / \\sqrt{intcoeffa^{2}+intcoeffb^{2}} \\) if \\( intconstc \\) is an integer and \\( e / \\sqrt{intcoeffa^{2}+intcoeffb^{2}} \\) if it is not.\n\nProperties of the integral lattice were discussed by Martin Gardner, \"Mathematical Games,\" Scientific American, May 1965, pages 120-122, and also by Fritz Herzog and B. M. Stewart, \"Patterns of Visible and Non-Visible Lattice Points,\" American Mathematical Monthly, vol. 78 (1971), pages 487-493. Further references to the extensive literature can be found in these sources."
    },
    "descriptive_long_confusing": {
      "map": {
        "x": "blueberries",
        "y": "kangaroos",
        "x_1": "marigolds",
        "y_1": "pendulums",
        "p": "satellites",
        "q": "harmonica",
        "k": "fireflies",
        "a": "raincloud",
        "b": "pineapple",
        "c": "ostriches",
        "d": "chandelier",
        "L": "telescope",
        "e": "goldfish"
      },
      "question": "5. Consider in the plane the network of points having integral coordinates. For lines having rational slope show that:\n(i) the line passes through no points of the network or through infinitely many;\n(ii) there exists for each line a positive number \\( chandelier \\) having the property that no point of the network, except such as may be on the line, is closer to the line than the distance \\( chandelier \\).",
      "solution": "Solution. (i) If \\( telescope \\) is a line with rational slope its equation may be written as \\( raincloud blueberries+pineapple kangaroos+ostriches=0 \\) where \\( raincloud \\) and \\( pineapple \\) are integers not both zero. Suppose \\( \\left(marigolds, pendulums\\right) \\) is a point on the line and that \\( marigolds \\) and \\( pendulums \\) are both integers. Then points of the form \\( \\left(marigolds+fireflies pineapple, pendulums-fireflies raincloud\\right), fireflies=0, \\pm 1, \\pm 2, \\ldots \\) all lie on the line, since\n\\[\nraincloud\\left(marigolds+fireflies pineapple\\right)+pineapple\\left(pendulums-fireflies raincloud\\right)+ostriches=raincloud marigolds+pineapple pendulums+ostriches=0\n\\]\n\nThus, if there is one point with integer coordinates on a line with rational slope, there are infinitely many.\n(ii) The distance from the point \\( (satellites, harmonica) \\) to the line \\( telescope \\) with equation \\( raincloud blueberries+ \\) \\( pineapple kangaroos+ostriches=0 \\) is\n\\[\nchandelier=\\frac{|raincloud satellites+pineapple harmonica+ostriches|}{\\sqrt{raincloud^{2}}+\\tilde{pineapple}^{2}} .\n\\]\n\nSince \\( telescope \\) has rational slope we can choose \\( raincloud \\) and \\( pineapple \\) to be integers. Then \\( raincloud satellites+pineapple harmonica \\) takes on only integer values. Therefore, if \\( ostriches \\) is an integer, \\( chandelier \\) is either 0 or at least \\( 1 / \\sqrt{raincloud^{2}+pineapple^{2}} \\). If \\( ostriches \\) is not an integer, \\( chandelier \\) is at least \\( goldfish / \\sqrt{raincloud^{2}+pineapple^{2}} \\), where \\( goldfish \\) is the distance from \\( ostriches \\) to the nearest integer.\n\nRemark. If we choose the equation of \\( telescope \\) so that \\( raincloud \\) and \\( pineapple \\) are relatively prime integers, then \\( raincloud satellites+pineapple harmonica \\) takes all integer values and the least distance to \\( telescope \\) from a point with integral coordinates not on \\( telescope \\) is exactly \\( 1 / \\sqrt{raincloud^{2}+pineapple^{2}} \\) if \\( ostriches \\) is an integer and \\( goldfish / \\sqrt{raincloud^{2}+pineapple^{2}} \\) if it is not.\n\nProperties of the integral lattice were discussed by Martin Gardner, \"Mathematical Games,\" Scientific American, May 1965, pages 120-122, and also by Fritz Herzog and B. M. Stewart, \"Patterns of Visible and Non-Visible Lattice Points,\" American Mathematical Monthly, vol. 78 (1971), pages 487-493. Further references to the extensive literature can be found in these sources."
    },
    "descriptive_long_misleading": {
      "map": {
        "x": "verticaler",
        "y": "horizontall",
        "x_1": "verticalprime",
        "y_1": "horizontalprime",
        "p": "fractional",
        "q": "irrational",
        "k": "continuum",
        "a": "noninteger",
        "b": "transcend",
        "c": "variable",
        "d": "closeness",
        "L": "curvature"
      },
      "question": "5. Consider in the plane the network of points having integral coordinates. For lines having rational slope show that:\n(i) the line passes through no points of the network or through infinitely many;\n(ii) there exists for each line a positive number \\( closeness \\) having the property that no point of the network, except such as may be on the line, is closer to the line than the distance \\( closeness \\).",
      "solution": "Solution. (i) If \\( curvature \\) is a line with rational slope its equation may be written as \\( noninteger\\, verticaler+transcend\\, horizontall+variable=0 \\) where \\( noninteger \\) and \\( transcend \\) are integers not both zero. Suppose \\( \\left(verticalprime, horizontalprime\\right) \\) is a point on the line and that \\( verticalprime \\) and \\( horizontalprime \\) are both integers. Then points of the form \\( \\left(verticalprime+continuum\\, transcend, horizontalprime-continuum\\, noninteger\\right), continuum=0, \\pm 1, \\pm 2, \\ldots \\) all lie on the line, since\n\\[\nnoninteger\\left(verticalprime+continuum\\, transcend\\right)+transcend\\left(horizontalprime-continuum\\, noninteger\\right)+variable=noninteger\\, verticalprime+transcend\\, horizontalprime+variable=0\n\\]\n\nThus, if there is one point with integer coordinates on a line with rational slope, there are infinitely many.\n(ii) The distance from the point \\( (fractional, irrational) \\) to the line \\( curvature \\) with equation \\( noninteger\\, verticaler+ \\) \\( transcend\\, horizontall+variable=0 \\) is\n\\[\ncloseness=\\frac{|noninteger\\, fractional+transcend\\, irrational+variable|}{\\sqrt{noninteger^{2}}+\\tilde{transcend}^{2}} .\n\\]\n\nSince \\( curvature \\) has rational slope we can choose \\( noninteger \\) and \\( transcend \\) to be integers. Then \\( noninteger\\, fractional+transcend\\, irrational \\) takes on only integer values. Therefore, if \\( variable \\) is an integer, \\( closeness \\) is either 0 or at least \\( 1 / \\sqrt{noninteger^{2}+transcend^{2}} \\). If \\( variable \\) is not an integer, \\( closeness \\) is at least \\( e / \\sqrt{noninteger^{2}+transcend^{2}} \\), where \\( e \\) is the distance from \\( variable \\) to the nearest integer.\n\nRemark. If we choose the equation of \\( curvature \\) so that \\( noninteger \\) and \\( transcend \\) are relatively prime integers, then \\( noninteger\\, fractional+transcend\\, irrational \\) takes all integer values and the least distance to \\( curvature \\) from a point with integral coordinates not on \\( curvature \\) is exactly \\( 1 / \\sqrt{noninteger^{2}+transcend^{2}} \\) if \\( variable \\) is an integer and \\( e / \\sqrt{noninteger^{2}+transcend^{2}} \\) if it is not."
    },
    "garbled_string": {
      "map": {
        "x": "qzxwvtnp",
        "y": "hjgrksla",
        "x_1": "uvkaczsm",
        "y_1": "plordfji",
        "p": "vyqtebmn",
        "q": "ctswhlak",
        "k": "orezpqul",
        "a": "brfagynk",
        "b": "sphlemrt",
        "c": "dnyvaxgo",
        "d": "xalmefuo",
        "L": "jwerolib"
      },
      "question": "5. Consider in the plane the network of points having integral coordinates. For lines having rational slope show that:\n(i) the line passes through no points of the network or through infinitely many;\n(ii) there exists for each line a positive number \\( xalmefuo \\) having the property that no point of the network, except such as may be on the line, is closer to the line than the distance \\( xalmefuo \\).",
      "solution": "Solution. (i) If \\( jwerolib \\) is a line with rational slope its equation may be written as \\( brfagynk\\, qzxwvtnp+sphlemrt\\, hjgrksla+dnyvaxgo=0 \\) where \\( brfagynk \\) and \\( sphlemrt \\) are integers not both zero. Suppose \\( \\left( uvkaczsm , plordfji \\right) \\) is a point on the line and that \\( uvkaczsm \\) and \\( plordfji \\) are both integers. Then points of the form \\( \\left( uvkaczsm + orezpqul\\, sphlemrt , plordfji - orezpqul\\, brfagynk \\right),\\; orezpqul=0, \\pm 1, \\pm 2, \\ldots \\) all lie on the line, since\n\\[\nbrfagynk\\left( uvkaczsm + orezpqul\\, sphlemrt \\right)+sphlemrt\\left( plordfji - orezpqul\\, brfagynk \\right)+dnyvaxgo=brfagynk\\, uvkaczsm + sphlemrt\\, plordfji + dnyvaxgo=0\n\\]\nThus, if there is one point with integer coordinates on a line with rational slope, there are infinitely many.\n\n(ii) The distance from the point \\( (vyqtebmn, ctswhlak) \\) to the line \\( jwerolib \\) with equation \\( brfagynk\\, qzxwvtnp+sphlemrt\\, hjgrksla+dnyvaxgo=0 \\) is\n\\[\nxalmefuo=\\frac{|brfagynk\\, vyqtebmn+sphlemrt\\, ctswhlak+dnyvaxgo|}{\\sqrt{brfagynk^{2}}+\\tilde{sphlemrt}^{2}} .\n\\]\nSince \\( jwerolib \\) has rational slope we can choose \\( brfagynk \\) and \\( sphlemrt \\) to be integers. Then \\( brfagynk\\, vyqtebmn + sphlemrt\\, ctswhlak \\) takes on only integer values. Therefore, if \\( dnyvaxgo \\) is an integer, \\( xalmefuo \\) is either 0 or at least \\( 1 / \\sqrt{brfagynk^{2}+sphlemrt^{2}} \\). If \\( dnyvaxgo \\) is not an integer, \\( xalmefuo \\) is at least \\( e / \\sqrt{brfagynk^{2}+sphlemrt^{2}} \\), where \\( e \\) is the distance from \\( dnyvaxgo \\) to the nearest integer.\n\nRemark. If we choose the equation of \\( jwerolib \\) so that \\( brfagynk \\) and \\( sphlemrt \\) are relatively prime integers, then \\( brfagynk\\, vyqtebmn + sphlemrt\\, ctswhlak \\) takes all integer values and the least distance to \\( jwerolib \\) from a point with integral coordinates not on \\( jwerolib \\) is exactly \\( 1 / \\sqrt{brfagynk^{2}+sphlemrt^{2}} \\) if \\( dnyvaxgo \\) is an integer and \\( e / \\sqrt{brfagynk^{2}+sphlemrt^{2}} \\) if it is not.\n\nProperties of the integral lattice were discussed by Martin Gardner, \"Mathematical Games,\" Scientific American, May 1965, pages 120-122, and also by Fritz Herzog and B. M. Stewart, \"Patterns of Visible and Non-Visible Lattice Points,\" American Mathematical Monthly, vol. 78 (1971), pages 487-493. Further references to the extensive literature can be found in these sources."
    },
    "kernel_variant": {
      "question": "Let n ≥ 2 and 1 ≤ s < n.  \nLet A be an s × n–matrix with integral entries and rank(A)=s and let β∈ℝˢ.  \nSet  \n\n  L = { x∈ℝⁿ : A x = β } ,               ℤⁿ the standard lattice in ℝⁿ.\n\nThroughout ‖·‖ is the Euclidean norm and, for any matrix T,  \n\n  T† := Tᵗ (T Tᵗ)⁻¹              (the Moore–Penrose pseudo–inverse).\n\nFor an affine subspace M⊂ℝⁿ put  \n\n  δ(M)= inf{ dist(x , M) : x∈ℤⁿ },  dist(x , M)= inf_{y∈M} ‖x−y‖.\n\nIntroduce the image lattice of A  \n\n  Λ := A(ℤⁿ) ⊂ ℤˢ (rank Λ = s),          ind(Λ)= [ℤˢ : Λ]<∞.\n\n(i)  Orthogonal projection and Smith normal form.  \n     (a)  (Smith form)   Show that there are unimodular matrices U∈GL_s(ℤ), V∈GL_n(ℤ) such that  \n\n    U A V = ( D 0 ),  D = diag(d₁,…,d_s), d₁|d₂|⋯|d_s>0.  \n\n     (b)  Put P := A†A – the orthogonal projection of ℝⁿ onto Row(A)=Im Aᵗ.  \n          Prove the distance identity\n\n    dist(x , L)² = (A x − β)ᵗ (A Aᵗ)⁻¹ (A x − β)  (x∈ℝⁿ).     (1)\n\n          Deduce the lattice–distance formula  \n\n    δ(L)² = min_{m∈Λ} (β − m)ᵗ (A Aᵗ)⁻¹ (β − m).               (2)\n\n(ii)  Arithmetic of the intersection L∩ℤⁿ.  \n      Put γ := U β.  Show that  \n\n    L∩ℤⁿ ≠ ∅  ⇔  γ ≡ 0 (mod D)                             (3)\n\n      and, if this holds, define the lattice H := ker₍ℤ₎ A = { x∈ℤⁿ : A x = 0 }.  Prove  \n\n      (a)  H has rank n−s;  \n      (b)  the last n−s columns v_{s+1},…,v_n of V form a ℤ–basis of H;  \n      (c)  [ℤⁿ : H] = det D = d₁⋯d_s.\n\n(iii)  Minimal positive distance when L misses the lattice.  \n      Assume L∩ℤⁿ = ∅ (equivalently γ ≠ 0 mod D).\n\n      (a)  Using (2) show  \n\n    δ(L) = min_{m∈Λ} ‖A† (β − m)‖  > 0.                        (4)\n\n      (b)  The minimum is attained; moreover all lattice points realising δ(L) lie in finitely many cosets of H.\n\n(iv)  Infinitely many closest lattice points.  \n      Prove that the set { x∈ℤⁿ : dist(x , L)=δ(L) } is infinite.\n\n(v)   Counting lattice points in a fundamental strip around L.  \n      Keep the Smith data from (i)(a) and set  \n\n    F_D = U⁻¹ ( [0,d₁)×⋯×[0,d_s) )              (a fundamental parallelepiped of Λ).\n\n      For R>0 define  \n\n    S_R = { x∈ℤⁿ : dist(x , L) ≤ R  and  A x − β ∈ F_D } ,    N(R)=#S_R.\n\n      Prove the asymptotic formula\n\n    N(R) = C_A · Vol_{\\,n−s}(B_{\\,n−s}(R)) + O(R^{\\,n−s−1}), R→∞,     (5)\n\n      where  B_d(R) is the d–dimensional Euclidean ball radius R and  \n\n    C_A = √det(A Aᵗ)  /  (d₁⋯d_s).                              (6)\n\n(Hint: orthogonally project ℤⁿ onto ker A; prove that the projection is injective on S_R by the choice of F_D, then apply the Lipschitz principle to the projected lattice.)\n\nOnly elementary lattice facts (Smith form, basic geometry of numbers, Lipschitz counting) may be used; deep results such as Minkowski’s theorem are unnecessary.\n\n\n\n──────────────────────────────────────────",
      "solution": "Notation.  ⟨·,·⟩ is the usual inner product on ℝⁿ, ‖·‖ its norm; for a matrix T  \nrank T, det T, Tᵗ, T† = Tᵗ(TTᵗ)⁻¹ have their standard meanings.\n\nStep 1.  Smith normal form – part (i)(a).  \nBecause rank A = s, the elementary divisor theorem yields unimodular U∈GL_s(ℤ),  \nV∈GL_n(ℤ) with\n\n  U A V = ( D 0 ),  D = diag(d₁,…,d_s), d₁|⋯|d_s>0.             ∎\n\n\n\nStep 2.  The distance formula and the correct minimisation – part (i)(b).  \nRow(A)=Im Aᵗ is s–dimensional.  For every x∈ℝⁿ the orthogonal decomposition\n\n  x = (I−A†A)x + A†A x                                             (7)\n\ngives proj_{Row(A)}(x)=A†A x.  \nFor L with equation A x=β the point\n\n  x₀ := x − A†(A x − β)                                            (8)\n\nsatisfies A x₀ = β and x−x₀ ⟂ L, hence is the unique closest point.  Therefore\n\n  dist(x , L) = ‖A†(A x − β)‖\n\nand squaring yields (1).  \n\nFor lattice points x∈ℤⁿ the vector m:=A x lies in the image lattice Λ = A(ℤⁿ).  \nTaking the infimum over x∈ℤⁿ gives\n\n  δ(L)² = min_{m∈Λ} (β − m)ᵗ(AAᵗ)⁻¹(β − m),                       (2)\n\nwhich replaces the erroneous minimisation over all of ℤˢ.                ∎\n\n\n\nStep 3.  Arithmetic criterion – part (ii).  \nPut γ := Uβ.  For x∈ℤⁿ write (y,z):=V⁻¹x with y∈ℤˢ, z∈ℤ^{n−s}.  Then\n\n  A x = β ⇔ (D 0)(y,z)ᵗ = γ.                                      (9)\n\nThus L∩ℤⁿ≠∅ exactly when γ ≡ 0 (mod D), establishing (3).           ∎\n\n\n\nStep 4.  The lattice ker₍ℤ₎A – part (ii)(a–c).  \nColumns v_{s+1},…,v_n of V satisfy (D 0)v_j=0, hence lie in ker A.  \nBeing part of a unimodular matrix, they are linearly independent and span\n\n  H = ker₍ℤ₎A = ℤⁿ∩ker A,\n\nso H is a lattice of rank n−s and {v_{s+1},…,v_n} is a ℤ–basis.  \nBecause det V=±1,\n\n  [ℤⁿ : H] = det D = d₁⋯d_s.                                      ∎\n\n\n\nStep 5.  Positive minimal distance – part (iii).  \nAssume γ ≠ 0 (mod D); by (3) we have L∩ℤⁿ=∅.  Define\n\n  f(m) := ‖A†(β − m)‖  (m∈Λ).\n\nThe lattice Λ has finite index det D in ℤˢ, hence possesses a compact\nfundamental parallelepiped P.  Each coset β+P contains at least one point of the\nform β−m (m∈Λ), so f attains a minimum on the finite set (β+P)∩(β−Λ),\nestablishing (4) and δ(L)>0.  \n\nIf m₀∈Λ minimises f, put\n\n  R_{m₀} := { x∈ℤⁿ : A x = m₀ }.\n\nEvery h∈H satisfies A h=0, hence dist(x+h , L)=dist(x , L) for all x∈ℤⁿ.  \nConsequently all nearest lattice points lie in the finitely many cosets\nR_{m₀}+h with h ranging over a complete set of representatives of H mod d₁⋯d_s H.                                                               ∎\n\n\n\nStep 6.  Infinitely many closest points – part (iv).  \nFix one nearest point x₀∈ℤⁿ.  Because H has rank n−s≥1, the set {x₀+h : h∈H}\nis infinite and all its points realise δ(L).                        ∎\n\n\n\nStep 7.  Counting lattice points in a strip – part (v).  \n\n(1) Choice of fundamental domain.  \nΛ = A(ℤⁿ)=U⁻¹Dℤˢ, so\n\n  F_D := U⁻¹([0,d₁)×⋯×[0,d_s))                                  (10)\n\nis a half-open fundamental parallelepiped for Λ.\n\n(2) Orthogonal projection onto ker A.  \nLet π:ℝⁿ→ker A be the orthogonal projection π(x)=x−A†A x.\nThe image Λ_ker := π(ℤⁿ) is an (n−s)–dimensional lattice in ker A.\n\nA standard determinant computation (see e.g. Cassels, “Rational quadratic\nforms”, App. 2) gives\n\n  det Λ_ker = det D / √det(AAᵗ).                                  (11)\n\n(3) Injectivity of π on S_R.  \nSuppose x₁,x₂ ∈ S_R and π(x₁)=π(x₂).  Then v:=x₁−x₂ ∈ Row(A), so\nm:=A v ∈ Λ.  Because Ax₁−β and Ax₂−β both lie in the fundamental domain\nF_D, their difference m lies simultaneously in Λ and in\nF_D−F_D ⊂ (−d₁,d₁)×⋯×(−d_s,d_s).  The only lattice point of Λ in this box\nis 0, hence m=0 and x₁=x₂.  Thus π is injective on S_R.\n\n(4) Counting lattice points.  \nWrite\n\n  T_R := { v∈ker A : ‖v‖ ≤ R }.\n\nBecause π is injective on S_R and Ax−β∈F_D by definition,\n\n  N(R) = # ( Λ_ker ∩ T_R ).                                      (12)\n\nThe boundary of T_R is Lipschitz, so the classical Lipschitz\nprinciple implies\n\n  #(Λ_ker ∩ T_R) = Vol_{n−s}(T_R)/det Λ_ker + O(R^{\\,n−s−1}).     (13)\n\nSince Vol_{n−s}(T_R)=Vol_{n−s}(B_{n−s}(R)) and (11) gives  \n1/det Λ_ker = √det(AAᵗ)/(d₁⋯d_s) = C_A, formulae (5)–(6) follow.               ∎\n\n\n\nAll requested assertions are now proved without the earlier flaw.                                ∎\n\n\n\n──────────────────────────────────────────",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T19:09:31.437744",
        "was_fixed": false,
        "difficulty_analysis": "1. Higher dimension & more variables: The problem moves from a single line in ℝ² to an arbitrary codimension-s affine subspace in ℝⁿ, introducing an arbitrarily large number of variables and constraints.\n\n2. Advanced structures: The solution demands the Smith normal form of an integer matrix, unimodular changes of basis, and an explicit description of quotient and kernel lattices.\n\n3. Deeper theory: Parts (iii)–(v) require geometry-of-numbers tools (compactness arguments, lattice volumes, Lipschitz counting lemma) that do not appear in the original exercise.\n\n4. Multiple interacting concepts: One must blend linear algebra over ℤ, Euclidean geometry, discrete group theory, and asymptotic lattice-point counting, each feeding into the next step.\n\n5. More steps & insight: Determining δ(L), proving its attainment, classifying all nearest lattice points, and deriving the asymptotic formula together constitute a substantially longer and more intricate chain of reasoning than the original two-part line problem.\n\nHence the enhanced variant is significantly harder and technically richer while preserving the core idea of analysing the interplay between rational affine subspaces and the integer lattice."
      }
    },
    "original_kernel_variant": {
      "question": "Let n ≥ 2 and 1 ≤ s < n.  \nLet A be an s × n–matrix with integral entries and rank(A)=s and let β∈ℝˢ.  \nSet  \n\n  L = { x∈ℝⁿ : A x = β } ,               ℤⁿ the standard lattice in ℝⁿ.\n\nThroughout ‖·‖ is the Euclidean norm and, for any matrix T,  \n\n  T† := Tᵗ (T Tᵗ)⁻¹              (the Moore–Penrose pseudo–inverse).\n\nFor an affine subspace M⊂ℝⁿ put  \n\n  δ(M)= inf{ dist(x , M) : x∈ℤⁿ },  dist(x , M)= inf_{y∈M} ‖x−y‖.\n\nIntroduce the image lattice of A  \n\n  Λ := A(ℤⁿ) ⊂ ℤˢ (rank Λ = s),          ind(Λ)= [ℤˢ : Λ]<∞.\n\n(i)  Orthogonal projection and Smith normal form.  \n     (a)  (Smith form)   Show that there are unimodular matrices U∈GL_s(ℤ), V∈GL_n(ℤ) such that  \n\n    U A V = ( D 0 ),  D = diag(d₁,…,d_s), d₁|d₂|⋯|d_s>0.  \n\n     (b)  Put P := A†A – the orthogonal projection of ℝⁿ onto Row(A)=Im Aᵗ.  \n          Prove the distance identity\n\n    dist(x , L)² = (A x − β)ᵗ (A Aᵗ)⁻¹ (A x − β)  (x∈ℝⁿ).     (1)\n\n          Deduce the lattice–distance formula  \n\n    δ(L)² = min_{m∈Λ} (β − m)ᵗ (A Aᵗ)⁻¹ (β − m).               (2)\n\n(ii)  Arithmetic of the intersection L∩ℤⁿ.  \n      Put γ := U β.  Show that  \n\n    L∩ℤⁿ ≠ ∅  ⇔  γ ≡ 0 (mod D)                             (3)\n\n      and, if this holds, define the lattice H := ker₍ℤ₎ A = { x∈ℤⁿ : A x = 0 }.  Prove  \n\n      (a)  H has rank n−s;  \n      (b)  the last n−s columns v_{s+1},…,v_n of V form a ℤ–basis of H;  \n      (c)  [ℤⁿ : H] = det D = d₁⋯d_s.\n\n(iii)  Minimal positive distance when L misses the lattice.  \n      Assume L∩ℤⁿ = ∅ (equivalently γ ≠ 0 mod D).\n\n      (a)  Using (2) show  \n\n    δ(L) = min_{m∈Λ} ‖A† (β − m)‖  > 0.                        (4)\n\n      (b)  The minimum is attained; moreover all lattice points realising δ(L) lie in finitely many cosets of H.\n\n(iv)  Infinitely many closest lattice points.  \n      Prove that the set { x∈ℤⁿ : dist(x , L)=δ(L) } is infinite.\n\n(v)   Counting lattice points in a fundamental strip around L.  \n      Keep the Smith data from (i)(a) and set  \n\n    F_D = U⁻¹ ( [0,d₁)×⋯×[0,d_s) )              (a fundamental parallelepiped of Λ).\n\n      For R>0 define  \n\n    S_R = { x∈ℤⁿ : dist(x , L) ≤ R  and  A x − β ∈ F_D } ,    N(R)=#S_R.\n\n      Prove the asymptotic formula\n\n    N(R) = C_A · Vol_{\\,n−s}(B_{\\,n−s}(R)) + O(R^{\\,n−s−1}), R→∞,     (5)\n\n      where  B_d(R) is the d–dimensional Euclidean ball radius R and  \n\n    C_A = √det(A Aᵗ)  /  (d₁⋯d_s).                              (6)\n\n(Hint: orthogonally project ℤⁿ onto ker A; prove that the projection is injective on S_R by the choice of F_D, then apply the Lipschitz principle to the projected lattice.)\n\nOnly elementary lattice facts (Smith form, basic geometry of numbers, Lipschitz counting) may be used; deep results such as Minkowski’s theorem are unnecessary.\n\n\n\n──────────────────────────────────────────",
      "solution": "Notation.  ⟨·,·⟩ is the usual inner product on ℝⁿ, ‖·‖ its norm; for a matrix T  \nrank T, det T, Tᵗ, T† = Tᵗ(TTᵗ)⁻¹ have their standard meanings.\n\nStep 1.  Smith normal form – part (i)(a).  \nBecause rank A = s, the elementary divisor theorem yields unimodular U∈GL_s(ℤ),  \nV∈GL_n(ℤ) with\n\n  U A V = ( D 0 ),  D = diag(d₁,…,d_s), d₁|⋯|d_s>0.             ∎\n\n\n\nStep 2.  The distance formula and the correct minimisation – part (i)(b).  \nRow(A)=Im Aᵗ is s–dimensional.  For every x∈ℝⁿ the orthogonal decomposition\n\n  x = (I−A†A)x + A†A x                                             (7)\n\ngives proj_{Row(A)}(x)=A†A x.  \nFor L with equation A x=β the point\n\n  x₀ := x − A†(A x − β)                                            (8)\n\nsatisfies A x₀ = β and x−x₀ ⟂ L, hence is the unique closest point.  Therefore\n\n  dist(x , L) = ‖A†(A x − β)‖\n\nand squaring yields (1).  \n\nFor lattice points x∈ℤⁿ the vector m:=A x lies in the image lattice Λ = A(ℤⁿ).  \nTaking the infimum over x∈ℤⁿ gives\n\n  δ(L)² = min_{m∈Λ} (β − m)ᵗ(AAᵗ)⁻¹(β − m),                       (2)\n\nwhich replaces the erroneous minimisation over all of ℤˢ.                ∎\n\n\n\nStep 3.  Arithmetic criterion – part (ii).  \nPut γ := Uβ.  For x∈ℤⁿ write (y,z):=V⁻¹x with y∈ℤˢ, z∈ℤ^{n−s}.  Then\n\n  A x = β ⇔ (D 0)(y,z)ᵗ = γ.                                      (9)\n\nThus L∩ℤⁿ≠∅ exactly when γ ≡ 0 (mod D), establishing (3).           ∎\n\n\n\nStep 4.  The lattice ker₍ℤ₎A – part (ii)(a–c).  \nColumns v_{s+1},…,v_n of V satisfy (D 0)v_j=0, hence lie in ker A.  \nBeing part of a unimodular matrix, they are linearly independent and span\n\n  H = ker₍ℤ₎A = ℤⁿ∩ker A,\n\nso H is a lattice of rank n−s and {v_{s+1},…,v_n} is a ℤ–basis.  \nBecause det V=±1,\n\n  [ℤⁿ : H] = det D = d₁⋯d_s.                                      ∎\n\n\n\nStep 5.  Positive minimal distance – part (iii).  \nAssume γ ≠ 0 (mod D); by (3) we have L∩ℤⁿ=∅.  Define\n\n  f(m) := ‖A†(β − m)‖  (m∈Λ).\n\nThe lattice Λ has finite index det D in ℤˢ, hence possesses a compact\nfundamental parallelepiped P.  Each coset β+P contains at least one point of the\nform β−m (m∈Λ), so f attains a minimum on the finite set (β+P)∩(β−Λ),\nestablishing (4) and δ(L)>0.  \n\nIf m₀∈Λ minimises f, put\n\n  R_{m₀} := { x∈ℤⁿ : A x = m₀ }.\n\nEvery h∈H satisfies A h=0, hence dist(x+h , L)=dist(x , L) for all x∈ℤⁿ.  \nConsequently all nearest lattice points lie in the finitely many cosets\nR_{m₀}+h with h ranging over a complete set of representatives of H mod d₁⋯d_s H.                                                               ∎\n\n\n\nStep 6.  Infinitely many closest points – part (iv).  \nFix one nearest point x₀∈ℤⁿ.  Because H has rank n−s≥1, the set {x₀+h : h∈H}\nis infinite and all its points realise δ(L).                        ∎\n\n\n\nStep 7.  Counting lattice points in a strip – part (v).  \n\n(1) Choice of fundamental domain.  \nΛ = A(ℤⁿ)=U⁻¹Dℤˢ, so\n\n  F_D := U⁻¹([0,d₁)×⋯×[0,d_s))                                  (10)\n\nis a half-open fundamental parallelepiped for Λ.\n\n(2) Orthogonal projection onto ker A.  \nLet π:ℝⁿ→ker A be the orthogonal projection π(x)=x−A†A x.\nThe image Λ_ker := π(ℤⁿ) is an (n−s)–dimensional lattice in ker A.\n\nA standard determinant computation (see e.g. Cassels, “Rational quadratic\nforms”, App. 2) gives\n\n  det Λ_ker = det D / √det(AAᵗ).                                  (11)\n\n(3) Injectivity of π on S_R.  \nSuppose x₁,x₂ ∈ S_R and π(x₁)=π(x₂).  Then v:=x₁−x₂ ∈ Row(A), so\nm:=A v ∈ Λ.  Because Ax₁−β and Ax₂−β both lie in the fundamental domain\nF_D, their difference m lies simultaneously in Λ and in\nF_D−F_D ⊂ (−d₁,d₁)×⋯×(−d_s,d_s).  The only lattice point of Λ in this box\nis 0, hence m=0 and x₁=x₂.  Thus π is injective on S_R.\n\n(4) Counting lattice points.  \nWrite\n\n  T_R := { v∈ker A : ‖v‖ ≤ R }.\n\nBecause π is injective on S_R and Ax−β∈F_D by definition,\n\n  N(R) = # ( Λ_ker ∩ T_R ).                                      (12)\n\nThe boundary of T_R is Lipschitz, so the classical Lipschitz\nprinciple implies\n\n  #(Λ_ker ∩ T_R) = Vol_{n−s}(T_R)/det Λ_ker + O(R^{\\,n−s−1}).     (13)\n\nSince Vol_{n−s}(T_R)=Vol_{n−s}(B_{n−s}(R)) and (11) gives  \n1/det Λ_ker = √det(AAᵗ)/(d₁⋯d_s) = C_A, formulae (5)–(6) follow.               ∎\n\n\n\nAll requested assertions are now proved without the earlier flaw.                                ∎\n\n\n\n──────────────────────────────────────────",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T01:37:45.378126",
        "was_fixed": false,
        "difficulty_analysis": "1. Higher dimension & more variables: The problem moves from a single line in ℝ² to an arbitrary codimension-s affine subspace in ℝⁿ, introducing an arbitrarily large number of variables and constraints.\n\n2. Advanced structures: The solution demands the Smith normal form of an integer matrix, unimodular changes of basis, and an explicit description of quotient and kernel lattices.\n\n3. Deeper theory: Parts (iii)–(v) require geometry-of-numbers tools (compactness arguments, lattice volumes, Lipschitz counting lemma) that do not appear in the original exercise.\n\n4. Multiple interacting concepts: One must blend linear algebra over ℤ, Euclidean geometry, discrete group theory, and asymptotic lattice-point counting, each feeding into the next step.\n\n5. More steps & insight: Determining δ(L), proving its attainment, classifying all nearest lattice points, and deriving the asymptotic formula together constitute a substantially longer and more intricate chain of reasoning than the original two-part line problem.\n\nHence the enhanced variant is significantly harder and technically richer while preserving the core idea of analysing the interplay between rational affine subspaces and the integer lattice."
      }
    }
  },
  "checked": true,
  "problem_type": "proof",
  "iteratively_fixed": true
}