{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-legendre-symbol-01",
  "mko_id": "mko-legendre-symbol",
  "title": {
    "zh-Hant": "獨立平方表定義三值Legendre符號",
    "en": "The three-valued Legendre symbol from squares"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-legendre-symbol-01",
    "source": {
      "mko_id": "mko-legendre-symbol",
      "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
      "sha256": "56ce955775c56864a29a398a2adae655ad1f8d53a82d5d9970bc7d0e1a4cebde",
      "english_sha256": "c00926f8c5fb9b2c966956a02566cfdbfe62191fd6143c23260619d3a0da2cee"
    },
    "mode": "worked_example",
    "audience_prerequisites": [
      "calc"
    ],
    "goal": {
      "zh-Hant": "模7符號對0、1、2、3、4、5、6依序為0、1、1、−1、1、−1、−1。",
      "en": "Modulo 7 the symbol on 0,1,2,3,4,5,6 is respectively 0,1,1,-1,1,-1,-1."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "p=7；L(a)=(a/7)；a先取0至6的標準代表。",
          "en": "p=7; L(a)=(a/7), with a first normalized to 0 through 6."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1"
        ],
        "before_tex": "p=7",
        "after_tex": "7\\text{ odd prime};\\quad L(a)=L(a\\bmod7)",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "2不整除7且3²>7，核prime domain，再把符號綁residue類。",
          "en": "2 does not divide 7 and 3^2>7, qualifying odd primality, then bind the symbol to residue classes."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "符號的分母不是除法，a可負但p固定odd prime。",
            "en": "The denominator in the symbol is not division; a may be negative while p is an odd prime."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S02",
        "uses": [
          "G1",
          "S01"
        ],
        "before_tex": "x=1,2,3,4,5,6",
        "after_tex": "\\begin{array}{c|rrrrrr}x&1&2&3&4&5&6\\\\\\hline x^2\\bmod7&1&4&2&2&4&1\\end{array}",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "不經Euler判準，直接完整計全部六個平方。",
          "en": "Compute all six squares directly without Euler criterion."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01"
          ],
          "explanation": {
            "zh-Hant": "完整表同時支援root witness與nonresidue absence。",
            "en": "The complete table supports both root witnesses and nonsquare absence."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S03",
        "uses": [
          "G1",
          "S01"
        ],
        "before_tex": "a\\equiv0\\pmod7",
        "after_tex": "L(a)=0",
        "relation": "implies",
        "rule": "mko_definition",
        "conditions": [],
        "explanation": {
          "zh-Hant": "先判zero分支，不把0平方的事實誤歸+1。",
          "en": "Handle zero first rather than assigning +1 because zero is a square."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01"
          ],
          "explanation": {
            "zh-Hant": "a=14是zero類，仍值0。",
            "en": "a=14 is the zero class and has value 0."
          }
        },
        "leaf_basis": "mko_definition"
      },
      {
        "id": "S04",
        "uses": [
          "G1",
          "S02",
          "S03"
        ],
        "before_tex": "a\\bmod7\\in\\{1,2,4\\}",
        "after_tex": "L(1)=L(2)=L(4)=1",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "完整表有非零根，分別可取1、3、2，故值+1。",
          "en": "The table has nonzero roots, respectively 1,3,2, giving +1."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S02",
            "S03"
          ],
          "explanation": {
            "zh-Hant": "根只是witness；完整表還確定其他類的absence。",
            "en": "Roots are witnesses; the complete table also certifies absence for other classes."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S05",
        "uses": [
          "G1",
          "S02",
          "S03",
          "S04"
        ],
        "before_tex": "a\\bmod7\\in\\{3,5,6\\}",
        "after_tex": "L(3)=L(5)=L(6)=-1",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "這三個非零類不在全部平方值內，故值−1。",
          "en": "These nonzero classes are absent from all square values, giving -1."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S02",
            "S03",
            "S04"
          ],
          "explanation": {
            "zh-Hant": "不能只測x=1、2就宣告不存在根。",
            "en": "Testing only x=1,2 would not prove absence."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S06",
        "uses": [
          "G1",
          "S03",
          "S04",
          "S05"
        ],
        "before_tex": "a=0,1,2,3,4,5,6",
        "after_tex": "L(a)=0,1,1,-1,1,-1,-1\\text{ respectively}",
        "relation": "implies",
        "rule": "mko_definition",
        "conditions": [],
        "explanation": {
          "zh-Hant": "三分支構成全部七個類的完整符號表。",
          "en": "The three branches form the full symbol table on all seven classes."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S03",
            "S04",
            "S05"
          ],
          "explanation": {
            "zh-Hant": "0、+1、−1三值無重疊，每類恰分類一次。",
            "en": "The zero,+1,-1 branches are disjoint and classify each class once."
          }
        },
        "leaf_basis": "mko_definition"
      },
      {
        "id": "S07",
        "uses": [
          "G1",
          "S06"
        ],
        "before_tex": "-4\\equiv3,\\quad9\\equiv2,\\quad14\\equiv0\\pmod7",
        "after_tex": "L(-4)=-1,\\quad L(9)=1,\\quad L(14)=0",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "以同一完整表核負數、大正數與zero類，展示normalize先行。",
          "en": "Use the same table for a negative input, large positive input and zero class, showing normalization first."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S06"
          ],
          "explanation": {
            "zh-Hant": "9有平方整數外觀不是理由；值+1是因residue2有root3。",
            "en": "9's integer-square appearance is not the classification method; residue 2 has root 3."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S08",
        "uses": [
          "G1",
          "S06",
          "S07"
        ],
        "before_tex": "L(2)=1,\\quad L(3)=-1,\\quad2\\cdot3=6",
        "after_tex": "L(6)=-1=L(2)L(3)\\text{ in this instance}",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "可核一個乘法性例子，但它不是一般乘法性定理證明。",
          "en": "One multiplicativity instance can be checked, but it is not the general theorem."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S06",
            "S07"
          ],
          "explanation": {
            "zh-Hant": "整個分類未用half-power congruence，沒有以Euler判準循環定義。",
            "en": "The classification used no half-power congruence, avoiding a circular Euler-based definition."
          }
        },
        "leaf_basis": "calc"
      }
    ],
    "result": {
      "zh-Hant": "模7符號對0、1、2、3、4、5、6依序為0、1、1、−1、1、−1、−1。",
      "en": "Modulo 7 the symbol on 0,1,2,3,4,5,6 is respectively 0,1,1,-1,1,-1,-1."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "(14/7)=1因14≡0是平方。",
          "en": "(14/7)=1 because zero is a square."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "zero分支專門輸出0。",
          "en": "The zero branch specifically returns 0."
        }
      },
      {
        "claim": {
          "zh-Hant": "同樣表直接定義Legendre符號(a/8)。",
          "en": "The same table directly defines Legendre (a/8)."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "8不是odd prime，不在本符號domain。",
          "en": "8 is not an odd prime and is outside this symbol's domain."
        }
      },
      {
        "claim": {
          "zh-Hant": "一次乘法例子證一般乘法性。",
          "en": "One multiplication example proves general multiplicativity."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "只證2、3這一組，其他全稱量詞未處理。",
          "en": "It checks only the pair 2,3 and not the universal statement."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "calc",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "假設精確整數算術、帶餘除法、整除與gcd的定義；同餘等式始終綁定明示模數。假設完整trial division的質數判準。",
          "en": "Assume exact integer arithmetic, division with remainder, and definitions of divisibility and gcd; every congruence has an explicit modulus. Assume the complete trial-division primality criterion."
        }
      },
      {
        "id": "mko_definition",
        "kind": "cited",
        "statement": {
          "zh-Hant": "先把a normalize modulo odd prime p。若p|a則(a/p)=0；若a是nonzero quadratic residue則為1；否則為-1。Classification由完整nonzero square table或root witness取得，不提前使用Euler criterion。p=2與composite modulus不在本節點domain；少量multiplicativity samples也不構成一般證明。",
          "en": "Normalize a modulo odd prime p first. If p divides a, (a/p)=0; otherwise the value is 1 for a nonzero square class and−1 for another nonzero class. Classification uses a complete nonzero square table or root witness, not a prematurely assumed Euler criterion. Modulus2 and composite moduli are outside this node domain, and a few multiplicativity samples do not prove a general result."
        },
        "source": {
          "mko_id": "mko-legendre-symbol",
          "sha256": "56ce955775c56864a29a398a2adae655ad1f8d53a82d5d9970bc7d0e1a4cebde",
          "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f"
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "normalize_negative",
        "lhs": "(-4)%7",
        "rhs": "3",
        "step": "S07"
      },
      {
        "id": "normalize_zero",
        "lhs": "14%7",
        "rhs": "0",
        "step": "S07"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "odd prime7的完整平方表分類，不使用Euler判準或Jacobi擴張。",
      "en": "Complete square-table classification at odd prime 7, without Euler criterion or Jacobi extension."
    },
    "md_symbols": [
      [
        "L(a)",
        "Legendre值(a/7)",
        "Legendre value (a/7)"
      ],
      [
        "p",
        "固定odd prime7",
        "fixed odd prime 7"
      ]
    ],
    "md_error_controls": [
      {
        "title": "zero優先 / Zero first",
        "zh": "normalize後先判p|a，再分非零平方與非平方。",
        "en": "After normalization test p dividing a before nonzero square/nonsquare classification."
      },
      {
        "title": "非循環 / No circularity",
        "zh": "本稿符號來自完整squares，不用Euler criterion定義。",
        "en": "The symbol comes from complete squares, not its later Euler criterion."
      }
    ],
    "md_open_items": []
  },
  "revision": {
    "id": "ocme-new142-reader-adoption-20261021",
    "collection": "coverage-20261021",
    "source_commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
    "adopted_source_sha256": "bf6613da5aa41f52a17e16f75b5886f4fb614337c244c624146c4ed59148ad74",
    "original_source_sha256": "90e7d3c68f6ec4970520bf9ddc0f5ddc1a6905fc6b9958fe26e324b623ca2856",
    "owner_adopted": true,
    "bilingual_sync": "complete_source_bound",
    "formal_Lean": "NOT_RUN",
    "reader_review": "142_of_142_source_bound",
    "wording_review": "original_Lead_decisions_resolved",
    "glossary_reader_paraphrases": [
      "mko_definition"
    ],
    "independent_AI_concurrence": "SCOPED_LEAD_AND_BILINGUAL_CONTEXT_REVIEW",
    "issue_ids": [
      "BR142-S185"
    ],
    "parent_manifest_sha256": "d29f4cae8229ebd24f60d496cb1d3cd4ad8c0a4dca9d44daab0c3245c544283a",
    "scope": "Owner-adopted reader revision. Lead and bilingual review concern the recorded text and premises; no new universal or Lean proof, canonical promotion or historical-label rewrite."
  }
}
