{
  "index": "1998-A-6",
  "type": "GEO",
  "tag": [
    "GEO",
    "NT"
  ],
  "difficulty": "",
  "question": "Let $A, B, C$ denote distinct points with integer coordinates in $\\mathbb\nR^2$.  Prove that if\n\\[(|AB|+|BC|)^2<8\\cdot [ABC]+1\\]\nthen $A, B, C$ are three vertices of a square.  Here $|XY|$ is the length\nof segment $XY$ and $[ABC]$ is the area of triangle $ABC$.",
  "solution": "Recall the inequalities $|AB|^2 + |BC|^2 \\geq 2|AB||BC|$ (AM-GM)\nand $|AB||BC| \\geq 2[ABC]$ (Law of Sines). Also recall that the area of\na triangle with integer coordinates is half an integer\n(if its vertices lie at $(0,0), (p,q), (r,s)$, the area is\n$|ps-qr|/2$), and that if $A$ and $B$ have integer coordinates, then\n$|AB|^2$\nis an integer (Pythagoras). Now observe that\n\\begin{align*}\n8[ABC] &\\leq |AB|^2+|BC|^2 + 4[ABC] \\\\\n&\\leq |AB|^2 + |BC|^2 + 2|AB| |BC| \\\\\n&< 8[ABC]+1,\n\\end{align*}\nand that the first and second expressions are both integers.\nWe conclude that\n$8[ABC] = |AB|^2+ |BC|^2+4[ABC]$, and so $|AB|^2+|BC|^2 =\n2|AB| |BC|\n= 4[ABC]$; that is, $B$ is a right angle and $AB=BC$, as desired.",
  "vars": [
    "A",
    "B",
    "C",
    "X",
    "Y",
    "p",
    "q",
    "r",
    "s"
  ],
  "params": [],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "A": "vertexa",
        "B": "vertexb",
        "C": "vertexc",
        "X": "vertexx",
        "Y": "vertexy",
        "p": "coordp",
        "q": "coordq",
        "r": "coordr",
        "s": "coords"
      },
      "question": "Let $vertexa, vertexb, vertexc$ denote distinct points with integer coordinates in $\\mathbb R^2$.  Prove that if\n\\[(|vertexavertexb|+|vertexbvertexc|)^2<8\\cdot [vertexavertexbvertexc]+1\\]\nthen $vertexa, vertexb, vertexc$ are three vertices of a square.  Here $|vertexxvertexy|$ is the length\nof segment $vertexxvertexy$ and $[vertexavertexbvertexc]$ is the area of triangle $vertexavertexbvertexc$.",
      "solution": "Recall the inequalities $|vertexavertexb|^2 + |vertexbvertexc|^2 \\geq 2|vertexavertexb||vertexbvertexc|$ (AM-GM)\nand $|vertexavertexb||vertexbvertexc| \\geq 2[vertexavertexbvertexc]$ (Law of Sines). Also recall that the area of\na triangle with integer coordinates is half an integer\n(if its vertices lie at $(0,0), (coordp,coordq), (coordr,coords)$, the area is\n$|coordpcoords-coordqcoordr|/2$), and that if $vertexa$ and $vertexb$ have integer coordinates, then\n$|vertexavertexb|^2$\nis an integer (Pythagoras). Now observe that\n\\begin{align*}\n8[vertexavertexbvertexc] &\\leq |vertexavertexb|^2+|vertexbvertexc|^2 + 4[vertexavertexbvertexc] \\\\\n&\\leq |vertexavertexb|^2 + |vertexbvertexc|^2 + 2|vertexavertexb| |vertexbvertexc| \\\\\n&< 8[vertexavertexbvertexc]+1,\n\\end{align*}\nand that the first and second expressions are both integers.\nWe conclude that\n$8[vertexavertexbvertexc] = |vertexavertexb|^2+ |vertexbvertexc|^2+4[vertexavertexbvertexc]$, and so $|vertexavertexb|^2+|vertexbvertexc|^2 =\n2|vertexavertexb| |vertexbvertexc|\n= 4[vertexavertexbvertexc]$; that is, $vertexb$ is a right angle and $vertexavertexb=vertexbvertexc$, as desired."
    },
    "descriptive_long_confusing": {
      "map": {
        "A": "dandelion",
        "B": "peppermint",
        "C": "chandelier",
        "X": "accordion",
        "Y": "brainstorm",
        "p": "rainforest",
        "q": "lighthouse",
        "r": "farmhouse",
        "s": "chocolate"
      },
      "question": "Let $dandelion, peppermint, chandelier$ denote distinct points with integer coordinates in $\\mathbb R^2$.  Prove that if\n\\[(|dandelionpeppermint|+|peppermintchandelier|)^2<8\\cdot [dandelionpeppermintchandelier]+1\\]\nthen $dandelion, peppermint, chandelier$ are three vertices of a square.  Here $|accordionbrainstorm|$ is the length\nof segment $accordionbrainstorm$ and $[dandelionpeppermintchandelier]$ is the area of triangle $dandelionpeppermintchandelier$.",
      "solution": "Recall the inequalities $|dandelionpeppermint|^2 + |peppermintchandelier|^2 \\geq 2|dandelionpeppermint||peppermintchandelier|$ (AM-GM)\nand $|dandelionpeppermint||peppermintchandelier| \\geq 2[dandelionpeppermintchandelier]$ (Law of Sines). Also recall that the area of\na triangle with integer coordinates is half an integer\n(if its vertices lie at $(0,0), (rainforest,lighthouse), (farmhouse,chocolate)$, the area is\n$|rainforest chocolate - farmhouse lighthouse|/2$), and that if $dandelion$ and $peppermint$ have integer coordinates, then\n$|dandelionpeppermint|^2$\nis an integer (Pythagoras). Now observe that\n\\begin{align*}\n8[dandelionpeppermintchandelier] &\\leq |dandelionpeppermint|^2+|peppermintchandelier|^2 + 4[dandelionpeppermintchandelier] \\\\\n&\\leq |dandelionpeppermint|^2 + |peppermintchandelier|^2 + 2|dandelionpeppermint| |peppermintchandelier| \\\\\n&< 8[dandelionpeppermintchandelier]+1,\n\\end{align*}\nand that the first and second expressions are both integers.\nWe conclude that\n$8[dandelionpeppermintchandelier] = |dandelionpeppermint|^2+ |peppermintchandelier|^2+4[dandelionpeppermintchandelier]$, and so $|dandelionpeppermint|^2+|peppermintchandelier|^2 =\n2|dandelionpeppermint| |peppermintchandelier|\n= 4[dandelionpeppermintchandelier]$; that is, $peppermint$ is a right angle and $dandelionpeppermint = peppermintchandelier$, as desired."
    },
    "descriptive_long_misleading": {
      "map": {
        "A": "nonlocality",
        "B": "wholeness",
        "C": "everywhere",
        "X": "nothingness",
        "Y": "emptiness",
        "p": "voidness",
        "q": "limitless",
        "r": "vastness",
        "s": "endlessness"
      },
      "question": "Let $nonlocality, wholeness, everywhere$ denote distinct points with integer coordinates in $\\mathbb R^2$.  Prove that if\n\\[(|nonlocalitywholeness|+|wholenesseverywhere|)^2<8\\cdot [nonlocalitywholenesseverywhere]+1\\]\nthen $nonlocality, wholeness, everywhere$ are three vertices of a square.  Here $|nothingnessemptiness|$ is the length\nof segment $nothingnessemptiness$ and $[nonlocalitywholenesseverywhere]$ is the area of triangle $nonlocalitywholenesseverywhere$.",
      "solution": "Recall the inequalities $|nonlocalitywholeness|^2 + |wholenesseverywhere|^2 \\geq 2|nonlocalitywholeness||wholenesseverywhere|$ (AM-GM)\nand $|nonlocalitywholeness||wholenesseverywhere| \\geq 2[nonlocalitywholenesseverywhere]$ (Law of Sines). Also recall that the area of\na triangle with integer coordinates is half an integer\n(if its vertices lie at $(0,0), (voidness,limitless), (vastness,endlessness)$, the area is\n$|voidnessendlessness-limitlessvastness|/2$), and that if $nonlocality$ and $wholeness$ have integer coordinates, then\n$|nonlocalitywholeness|^2$\nis an integer (Pythagoras). Now observe that\n\\begin{align*}\n8[nonlocalitywholenesseverywhere] &\\leq |nonlocalitywholeness|^2+|wholenesseverywhere|^2 + 4[nonlocalitywholenesseverywhere] \\\\\n&\\leq |nonlocalitywholeness|^2 + |wholenesseverywhere|^2 + 2|nonlocalitywholeness| |wholenesseverywhere| \\\\\n&< 8[nonlocalitywholenesseverywhere]+1,\n\\end{align*}\nand that the first and second expressions are both integers.\nWe conclude that\n$8[nonlocalitywholenesseverywhere] = |nonlocalitywholeness|^2+ |wholenesseverywhere|^2+4[nonlocalitywholenesseverywhere]$, and so $|nonlocalitywholeness|^2+|wholenesseverywhere|^2 =\n2|nonlocalitywholeness| |wholenesseverywhere|\n= 4[nonlocalitywholenesseverywhere]$; that is, $wholeness$ is a right angle and $nonlocalitywholeness=wholenesseverywhere$, as desired."
    },
    "garbled_string": {
      "map": {
        "A": "qzxwvtnp",
        "B": "hjgrksla",
        "C": "mnbvcxqe",
        "X": "plokijuh",
        "Y": "edcrfvtg",
        "p": "qazmlpoh",
        "q": "wsxneirg",
        "r": "edcvfjkl",
        "s": "rfvtgnhy"
      },
      "question": "Let $qzxwvtnp, hjgrksla, mnbvcxqe$ denote distinct points with integer coordinates in $\\mathbb\nR^2$.  Prove that if\n\\[(|qzxwvtnphjgrksla|+|hjgrkslamnbvcxqe|)^2<8\\cdot [qzxwvtnphjgrkslamnbvcxqe]+1\\]\nthen $qzxwvtnp, hjgrksla, mnbvcxqe$ are three vertices of a square.  Here $|plokijuhedcrfvtg|$ is the length\nof segment $plokijuhedcrfvtg$ and $[qzxwvtnphjgrkslamnbvcxqe]$ is the area of triangle $qzxwvtnphjgrkslamnbvcxqe$.",
      "solution": "Recall the inequalities $|qzxwvtnphjgrksla|^2 + |hjgrkslamnbvcxqe|^2 \\geq 2|qzxwvtnphjgrksla||hjgrkslamnbvcxqe|$ (AM-GM)\nand $|qzxwvtnphjgrksla||hjgrkslamnbvcxqe| \\geq 2[qzxwvtnphjgrkslamnbvcxqe]$ (Law of Sines). Also recall that the area of\na triangle with integer coordinates is half an integer\n(if its vertices lie at $(0,0), (qazmlpoh,wsxneirg), (edcvfjkl,rfvtgnhy)$, the area is\n$|qazmlpohrfvtgnhy-wsxneirgedcvfjkl|/2$), and that if $qzxwvtnp$ and $hjgrksla$ have integer coordinates, then\n$|qzxwvtnphjgrksla|^2$\nis an integer (Pythagoras). Now observe that\n\\begin{align*}\n8[qzxwvtnphjgrkslamnbvcxqe] &\\leq |qzxwvtnphjgrksla|^2+|hjgrkslamnbvcxqe|^2 + 4[qzxwvtnphjgrkslamnbvcxqe] \\\\\n&\\leq |qzxwvtnphjgrksla|^2 + |hjgrkslamnbvcxqe|^2 + 2|qzxwvtnphjgrksla| |hjgrkslamnbvcxqe| \\\\\n&< 8[qzxwvtnphjgrkslamnbvcxqe]+1,\n\\end{align*}\nand that the first and second expressions are both integers.\nWe conclude that\n$8[qzxwvtnphjgrkslamnbvcxqe] = |qzxwvtnphjgrksla|^2+ |hjgrkslamnbvcxqe|^2+4[qzxwvtnphjgrkslamnbvcxqe]$, and so $|qzxwvtnphjgrksla|^2+|hjgrkslamnbvcxqe|^2 =\n2|qzxwvtnphjgrksla| |hjgrkslamnbvcxqe|\n= 4[qzxwvtnphjgrkslamnbvcxqe]$; that is, $hjgrksla$ is a right angle and $qzxwvtnphjgrksla=hjgrkslamnbvcxqe$, as desired."
    },
    "kernel_variant": {
      "question": "Let $A,B,C$ be distinct points with integer coordinates in the plane.  Assume that the two sides $BC$ and $CA$ of triangle $ABC$ satisfy\n\n\\[\n\bigl(|BC|+|CA|\\bigr)^2 \\\\;<\\\\; 8\\,[ABC] \\\\+\\\\ \\tfrac12,\n\\]\n\nwhere $|XY|$ denotes the Euclidean distance between $X$ and $Y$, and $[ABC]$ denotes the area of $\\triangle ABC$.  Prove that under this hypothesis the points $A,B,C$ are three consecutive vertices of a square.\n\n(For comparison, the more familiar inequality\n\\[(|AB|+|BC|)^2<8\\,[ABC]+1\\]\nleads to the same conclusion; the present formulation is an equivalent—indeed slightly stronger—variant obtained by relabelling the vertices and rescaling the additive constant.)",
      "solution": "Throughout, let\n  a = |BC|,\\; b = |CA|,\\quad\\text{and}\\quad 2[ABC]=ab\\sin C,           \\tag{1}\nwhere $C=\\angle BCA$.\n\nStep 1 (Lattice facts).  If two lattice points $P,Q$ are given then $|PQ|^2\\in\\mathbb Z$ (Pythagoras).  For any lattice triangle the doubled area $2[ABC]$ is an integer (Pick/Shoelace formula).\n\nStep 2 (A chain of inequalities).\nUsing $(1)$ we have $ab\\ge 2[ABC]$.  Hence\n\\[\n(a+b)^2=a^2+b^2+2ab\\ge a^2+b^2+4[ABC].               \\tag{2}\n\\]\nOn the other hand the AM–GM inequality gives $a^2+b^2\\ge 2ab\\ge 4[ABC]$, so\n\\[\na^2+b^2+4[ABC]\\ge 8[ABC].                               \\tag{3}\n\\]\n\nStep 3 (An integer squeeze).\nSet\n\\[\nN=a^2+b^2+4[ABC], \\qquad M=8[ABC].\n\\]\nBecause $a^2,b^2\\in\\mathbb Z$ and $2[ABC]\\in\\mathbb Z$, both $N$ and $M$ are integers.  From (2) and (3) we have\n\\[\nM\\le N\\le(a+b)^2< M+\\tfrac12.                            \\tag{4}\n\\]\nNo integer lies strictly between $M$ and $M+\\tfrac12$, so (4) forces $N=M$.  Consequently\n\\[\na^2+b^2=4[ABC].                                         \\tag{5}\n\\]\n\nStep 4 (The equality conditions).\nEquality in (2) requires $ab=2[ABC]$, i.e. $\\sin C=1$ and $\\angle C=90^\\circ$.  Equality in the AM–GM step demands $a=b$.  Hence $\\triangle ABC$ is right–isosceles with right angle at $C$ and legs $BC=CA$.\n\nStep 5 (Geometric conclusion).\nSince $BC\\perp CA$ and $BC=CA$, the segments $BC$ and $CA$ are adjacent, congruent, perpendicular edges of a square.  Therefore the points $B,C,A$ (in that order) are three consecutive vertices of this square, completing the proof.",
      "_meta": {
        "core_steps": [
          "Lattice fact: for integer-coordinate points, |AB|² and 2·[ABC] are integers.",
          "Lower bound via AM–GM and Law of Sines: (|AB|+|BC|)² ≥ |AB|²+|BC|²+4[ABC] ≥ 8·[ABC].",
          "Integer squeeze: hypothesis gives (|AB|+|BC|)² < 8·[ABC]+1, so the integer |AB|²+|BC|²+4[ABC] must equal 8·[ABC].",
          "Equality cases force AB = BC and ∠B = 90° (right-isosceles triangle).",
          "Such a triangle matches three consecutive vertices of a square."
        ],
        "mutable_slots": {
          "slot1": {
            "description": "Additive margin that must be <1 so no integer fits strictly between the bounds.",
            "original": "+1"
          },
          "slot2": {
            "description": "Choice of the two consecutive sides whose lengths are summed; any cyclic permutation of the vertices works.",
            "original": "(|AB|+|BC|)²"
          }
        }
      }
    }
  },
  "checked": true,
  "problem_type": "proof",
  "iteratively_fixed": true
}