# Question 23707: Legendre Classes Include Zero before Nonzero Residue Classification

[Return to catalogue page 119](https://ocme.evemisslab.com/en/questions/page/119/)

[← Question derivation index](https://ocme.evemisslab.com/en/questions/) · [Original question batch](https://ocme.evemisslab.com/en/practice/batch-20261014-advance-20261112-r06-legendre-symbol-foundations/#q-20261014-advance-20261112-r06-legendre-symbol-0007)

This teaching derivation has second-context AI mathematical and bilingual semantic review, limited to the model and assumptions stated in this question. It has no human review or new Lean proof and does not promote the original question or MKO to Canonical truth.

R0046-23707 · q-20261014-advance-20261112-r06-legendre-symbol-0007



## Original question and givens

Use bounded odd prime p=19 and the complete nonzero square table. Give (prime, class_symbol_rows, complete_partition, certificate).


- G001 — Use bounded odd prime p=19 and the complete nonzero square table. Give (prime, class_symbol_rows, complete_partition, certificate).





## Definition and scope

Use the original question domain, assumptions and cited MKO definitions. This item has second-context mathematical and bilingual review, with the model, answer and every arithmetic step independently recomputed from the original parameters; the source question remains a candidate.


- [mko-legendre-symbol](https://ocme.evemisslab.com/en/mko/mko-legendre-symbol/)





## Step-by-step derivation

S001 · impliesBefore

source operation=legendre-classification-table;original snapshot and mathematics retained

After

explicit ordered source output fields=[prime, class_symbol_rows, complete_partition, certificate]

Conditions: none

Keep the source snapshot while listing ordered fields without JavaScript.Radius uses its original mode to select6 or11 fields without padding;distinguish nonclaims from actual negations.

Step identifiers and dependenciesRule: source_ordered_interface_explicit_without_javascript · Uses: G001





S002 · impliesBefore

Legendre ORIGINAL odd prime:ORIGINAL modulus=19;ALL possible trial divisors through square root=[2, 3, 4]

After

ALL [divisor,remainder] rows=[[2, 1], [3, 1], [4, 3]];prime=Yes

Conditions: none

Qualify primality over the full trial range,not by guessing from Legendre/Euler classification.This is a modulus premise,not the square status of a.

Step identifiers and dependenciesRule: legendre_complete_prime_trial_not_Euler_classification · Uses: G001, S001





S003 · calculationBefore

Legendre ORIGINAL nonzero root1 exact square := mul(1, 1)

After

Legendre ORIGINAL nonzero root1 exact square = 1

Conditions: none

Substitute original roles and established intermediates exactly,without floats or treating finite tests as universal limits.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S002





S004 · impliesBefore

ORIGINAL root x=1 in1..18;exact square=1

After

square=0*19+1;canonical square class=1;ALL root indices retained

Conditions: none

Include every nonzero root.A few squares do not prove another class rootless;no Euler criterion is pre-used.

Step identifiers and dependenciesRule: legendre_ALL_nonzero_square_rows_before_symbol_definition · Uses: G001, S003





S005 · calculationBefore

Legendre ORIGINAL nonzero root2 exact square := mul(2, 2)

After

Legendre ORIGINAL nonzero root2 exact square = 4

Conditions: none

Substitute original roles and established intermediates exactly,without floats or treating finite tests as universal limits.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S004





S006 · impliesBefore

ORIGINAL root x=2 in1..18;exact square=4

After

square=0*19+4;canonical square class=4;ALL root indices retained

Conditions: none

Include every nonzero root.A few squares do not prove another class rootless;no Euler criterion is pre-used.

Step identifiers and dependenciesRule: legendre_ALL_nonzero_square_rows_before_symbol_definition · Uses: G001, S005





S007 · calculationBefore

Legendre ORIGINAL nonzero root3 exact square := mul(3, 3)

After

Legendre ORIGINAL nonzero root3 exact square = 9

Conditions: none

Substitute original roles and established intermediates exactly,without floats or treating finite tests as universal limits.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S006





S008 · impliesBefore

ORIGINAL root x=3 in1..18;exact square=9

After

square=0*19+9;canonical square class=9;ALL root indices retained

Conditions: none

Include every nonzero root.A few squares do not prove another class rootless;no Euler criterion is pre-used.

Step identifiers and dependenciesRule: legendre_ALL_nonzero_square_rows_before_symbol_definition · Uses: G001, S007





S009 · calculationBefore

Legendre ORIGINAL nonzero root4 exact square := mul(4, 4)

After

Legendre ORIGINAL nonzero root4 exact square = 16

Conditions: none

Substitute original roles and established intermediates exactly,without floats or treating finite tests as universal limits.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S008





S010 · impliesBefore

ORIGINAL root x=4 in1..18;exact square=16

After

square=0*19+16;canonical square class=16;ALL root indices retained

Conditions: none

Include every nonzero root.A few squares do not prove another class rootless;no Euler criterion is pre-used.

Step identifiers and dependenciesRule: legendre_ALL_nonzero_square_rows_before_symbol_definition · Uses: G001, S009





S011 · calculationBefore

Legendre ORIGINAL nonzero root5 exact square := mul(5, 5)

After

Legendre ORIGINAL nonzero root5 exact square = 25

Conditions: none

Substitute original roles and established intermediates exactly,without floats or treating finite tests as universal limits.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S010





S012 · impliesBefore

ORIGINAL root x=5 in1..18;exact square=25

After

square=1*19+6;canonical square class=6;ALL root indices retained

Conditions: none

Include every nonzero root.A few squares do not prove another class rootless;no Euler criterion is pre-used.

Step identifiers and dependenciesRule: legendre_ALL_nonzero_square_rows_before_symbol_definition · Uses: G001, S011





S013 · calculationBefore

Legendre ORIGINAL nonzero root6 exact square := mul(6, 6)

After

Legendre ORIGINAL nonzero root6 exact square = 36

Conditions: none

Substitute original roles and established intermediates exactly,without floats or treating finite tests as universal limits.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S012





S014 · impliesBefore

ORIGINAL root x=6 in1..18;exact square=36

After

square=1*19+17;canonical square class=17;ALL root indices retained

Conditions: none

Include every nonzero root.A few squares do not prove another class rootless;no Euler criterion is pre-used.

Step identifiers and dependenciesRule: legendre_ALL_nonzero_square_rows_before_symbol_definition · Uses: G001, S013





S015 · calculationBefore

Legendre ORIGINAL nonzero root7 exact square := mul(7, 7)

After

Legendre ORIGINAL nonzero root7 exact square = 49

Conditions: none

Substitute original roles and established intermediates exactly,without floats or treating finite tests as universal limits.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S014





S016 · impliesBefore

ORIGINAL root x=7 in1..18;exact square=49

After

square=2*19+11;canonical square class=11;ALL root indices retained

Conditions: none

Include every nonzero root.A few squares do not prove another class rootless;no Euler criterion is pre-used.

Step identifiers and dependenciesRule: legendre_ALL_nonzero_square_rows_before_symbol_definition · Uses: G001, S015





S017 · calculationBefore

Legendre ORIGINAL nonzero root8 exact square := mul(8, 8)

After

Legendre ORIGINAL nonzero root8 exact square = 64

Conditions: none

Substitute original roles and established intermediates exactly,without floats or treating finite tests as universal limits.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S016





S018 · impliesBefore

ORIGINAL root x=8 in1..18;exact square=64

After

square=3*19+7;canonical square class=7;ALL root indices retained

Conditions: none

Include every nonzero root.A few squares do not prove another class rootless;no Euler criterion is pre-used.

Step identifiers and dependenciesRule: legendre_ALL_nonzero_square_rows_before_symbol_definition · Uses: G001, S017





S019 · calculationBefore

Legendre ORIGINAL nonzero root9 exact square := mul(9, 9)

After

Legendre ORIGINAL nonzero root9 exact square = 81

Conditions: none

Substitute original roles and established intermediates exactly,without floats or treating finite tests as universal limits.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S018





S020 · impliesBefore

ORIGINAL root x=9 in1..18;exact square=81

After

square=4*19+5;canonical square class=5;ALL root indices retained

Conditions: none

Include every nonzero root.A few squares do not prove another class rootless;no Euler criterion is pre-used.

Step identifiers and dependenciesRule: legendre_ALL_nonzero_square_rows_before_symbol_definition · Uses: G001, S019





S021 · calculationBefore

Legendre ORIGINAL nonzero root10 exact square := mul(10, 10)

After

Legendre ORIGINAL nonzero root10 exact square = 100

Conditions: none

Substitute original roles and established intermediates exactly,without floats or treating finite tests as universal limits.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S020





S022 · impliesBefore

ORIGINAL root x=10 in1..18;exact square=100

After

square=5*19+5;canonical square class=5;ALL root indices retained

Conditions: none

Include every nonzero root.A few squares do not prove another class rootless;no Euler criterion is pre-used.

Step identifiers and dependenciesRule: legendre_ALL_nonzero_square_rows_before_symbol_definition · Uses: G001, S021





S023 · calculationBefore

Legendre ORIGINAL nonzero root11 exact square := mul(11, 11)

After

Legendre ORIGINAL nonzero root11 exact square = 121

Conditions: none

Substitute original roles and established intermediates exactly,without floats or treating finite tests as universal limits.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S022





S024 · impliesBefore

ORIGINAL root x=11 in1..18;exact square=121

After

square=6*19+7;canonical square class=7;ALL root indices retained

Conditions: none

Include every nonzero root.A few squares do not prove another class rootless;no Euler criterion is pre-used.

Step identifiers and dependenciesRule: legendre_ALL_nonzero_square_rows_before_symbol_definition · Uses: G001, S023





S025 · calculationBefore

Legendre ORIGINAL nonzero root12 exact square := mul(12, 12)

After

Legendre ORIGINAL nonzero root12 exact square = 144

Conditions: none

Substitute original roles and established intermediates exactly,without floats or treating finite tests as universal limits.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S024





S026 · impliesBefore

ORIGINAL root x=12 in1..18;exact square=144

After

square=7*19+11;canonical square class=11;ALL root indices retained

Conditions: none

Include every nonzero root.A few squares do not prove another class rootless;no Euler criterion is pre-used.

Step identifiers and dependenciesRule: legendre_ALL_nonzero_square_rows_before_symbol_definition · Uses: G001, S025





S027 · calculationBefore

Legendre ORIGINAL nonzero root13 exact square := mul(13, 13)

After

Legendre ORIGINAL nonzero root13 exact square = 169

Conditions: none

Substitute original roles and established intermediates exactly,without floats or treating finite tests as universal limits.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S026





S028 · impliesBefore

ORIGINAL root x=13 in1..18;exact square=169

After

square=8*19+17;canonical square class=17;ALL root indices retained

Conditions: none

Include every nonzero root.A few squares do not prove another class rootless;no Euler criterion is pre-used.

Step identifiers and dependenciesRule: legendre_ALL_nonzero_square_rows_before_symbol_definition · Uses: G001, S027





S029 · calculationBefore

Legendre ORIGINAL nonzero root14 exact square := mul(14, 14)

After

Legendre ORIGINAL nonzero root14 exact square = 196

Conditions: none

Substitute original roles and established intermediates exactly,without floats or treating finite tests as universal limits.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S028





S030 · impliesBefore

ORIGINAL root x=14 in1..18;exact square=196

After

square=10*19+6;canonical square class=6;ALL root indices retained

Conditions: none

Include every nonzero root.A few squares do not prove another class rootless;no Euler criterion is pre-used.

Step identifiers and dependenciesRule: legendre_ALL_nonzero_square_rows_before_symbol_definition · Uses: G001, S029





S031 · calculationBefore

Legendre ORIGINAL nonzero root15 exact square := mul(15, 15)

After

Legendre ORIGINAL nonzero root15 exact square = 225

Conditions: none

Substitute original roles and established intermediates exactly,without floats or treating finite tests as universal limits.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S030





S032 · impliesBefore

ORIGINAL root x=15 in1..18;exact square=225

After

square=11*19+16;canonical square class=16;ALL root indices retained

Conditions: none

Include every nonzero root.A few squares do not prove another class rootless;no Euler criterion is pre-used.

Step identifiers and dependenciesRule: legendre_ALL_nonzero_square_rows_before_symbol_definition · Uses: G001, S031





S033 · calculationBefore

Legendre ORIGINAL nonzero root16 exact square := mul(16, 16)

After

Legendre ORIGINAL nonzero root16 exact square = 256

Conditions: none

Substitute original roles and established intermediates exactly,without floats or treating finite tests as universal limits.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S032





S034 · impliesBefore

ORIGINAL root x=16 in1..18;exact square=256

After

square=13*19+9;canonical square class=9;ALL root indices retained

Conditions: none

Include every nonzero root.A few squares do not prove another class rootless;no Euler criterion is pre-used.

Step identifiers and dependenciesRule: legendre_ALL_nonzero_square_rows_before_symbol_definition · Uses: G001, S033





S035 · calculationBefore

Legendre ORIGINAL nonzero root17 exact square := mul(17, 17)

After

Legendre ORIGINAL nonzero root17 exact square = 289

Conditions: none

Substitute original roles and established intermediates exactly,without floats or treating finite tests as universal limits.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S034





S036 · impliesBefore

ORIGINAL root x=17 in1..18;exact square=289

After

square=15*19+4;canonical square class=4;ALL root indices retained

Conditions: none

Include every nonzero root.A few squares do not prove another class rootless;no Euler criterion is pre-used.

Step identifiers and dependenciesRule: legendre_ALL_nonzero_square_rows_before_symbol_definition · Uses: G001, S035





S037 · calculationBefore

Legendre ORIGINAL nonzero root18 exact square := mul(18, 18)

After

Legendre ORIGINAL nonzero root18 exact square = 324

Conditions: none

Substitute original roles and established intermediates exactly,without floats or treating finite tests as universal limits.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S036





S038 · impliesBefore

ORIGINAL root x=18 in1..18;exact square=324

After

square=17*19+1;canonical square class=1;ALL root indices retained

Conditions: none

Include every nonzero root.A few squares do not prove another class rootless;no Euler criterion is pre-used.

Step identifiers and dependenciesRule: legendre_ALL_nonzero_square_rows_before_symbol_definition · Uses: G001, S037





S039 · impliesBefore

ORIGINAL prime=19;COMPLETE nonzero square table=[[1, 1], [2, 4], [3, 9], [4, 16], [5, 6], [6, 17], [7, 11], [8, 7], [9, 5], [10, 5], [11, 7], [12, 11], [13, 17], [14, 6], [15, 16], [16, 9], [17, 4], [18, 1]];nonzero square classes=[1, 4, 5, 6, 7, 9, 11, 16, 17]

After

for EACH normalized class r,first r0 ->symbol0;else square-table member ->symbol1;otherwise ->symbol-1;these cases partition ALL0..p-1

Conditions: none

Separate zero first;the fact that0 is a square does not give symbol+1.Nonzero classes are classified by the complete square table.This is definition plus exhaustive evidence,not a later multiplicativity or Euler formula.

Step identifiers and dependenciesRule: legendre_ZERO_then_residue_nonresidue_three_way_definition · Uses: G001, S038









## Reverse checks


- S039 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S038 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S037 · premise_and_result_audit — Recompute Legendre ORIGINAL nonzero root18 exact square with exact rational arithmetic, not rounded decimals.
- S036 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S035 · premise_and_result_audit — Recompute Legendre ORIGINAL nonzero root17 exact square with exact rational arithmetic, not rounded decimals.
- S034 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S033 · premise_and_result_audit — Recompute Legendre ORIGINAL nonzero root16 exact square with exact rational arithmetic, not rounded decimals.
- S032 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S031 · premise_and_result_audit — Recompute Legendre ORIGINAL nonzero root15 exact square with exact rational arithmetic, not rounded decimals.
- S030 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S029 · premise_and_result_audit — Recompute Legendre ORIGINAL nonzero root14 exact square with exact rational arithmetic, not rounded decimals.
- S028 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S027 · premise_and_result_audit — Recompute Legendre ORIGINAL nonzero root13 exact square with exact rational arithmetic, not rounded decimals.
- S026 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S025 · premise_and_result_audit — Recompute Legendre ORIGINAL nonzero root12 exact square with exact rational arithmetic, not rounded decimals.
- S024 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S023 · premise_and_result_audit — Recompute Legendre ORIGINAL nonzero root11 exact square with exact rational arithmetic, not rounded decimals.
- S022 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S021 · premise_and_result_audit — Recompute Legendre ORIGINAL nonzero root10 exact square with exact rational arithmetic, not rounded decimals.
- S020 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S019 · premise_and_result_audit — Recompute Legendre ORIGINAL nonzero root9 exact square with exact rational arithmetic, not rounded decimals.
- S018 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S017 · premise_and_result_audit — Recompute Legendre ORIGINAL nonzero root8 exact square with exact rational arithmetic, not rounded decimals.
- S016 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S015 · premise_and_result_audit — Recompute Legendre ORIGINAL nonzero root7 exact square with exact rational arithmetic, not rounded decimals.
- S014 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S013 · premise_and_result_audit — Recompute Legendre ORIGINAL nonzero root6 exact square with exact rational arithmetic, not rounded decimals.
- S012 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S011 · premise_and_result_audit — Recompute Legendre ORIGINAL nonzero root5 exact square with exact rational arithmetic, not rounded decimals.
- S010 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S009 · premise_and_result_audit — Recompute Legendre ORIGINAL nonzero root4 exact square with exact rational arithmetic, not rounded decimals.
- S008 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S007 · premise_and_result_audit — Recompute Legendre ORIGINAL nonzero root3 exact square with exact rational arithmetic, not rounded decimals.
- S006 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S005 · premise_and_result_audit — Recompute Legendre ORIGINAL nonzero root2 exact square with exact rational arithmetic, not rounded decimals.
- S004 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S003 · premise_and_result_audit — Recompute Legendre ORIGINAL nonzero root1 exact square with exact rational arithmetic, not rounded decimals.
- S002 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S001 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.





## Result

(19, [[0, 0], [1, 1], [2, -1], [3, -1], [4, 1], [5, 1], [6, 1], [7, 1], [8, -1], [9, 1], [10, -1], [11, 1], [12, -1], [13, -1], [14, -1], [15, -1], [16, 1], [17, 1], [18, -1]], Yes, zero_residue_nonresidue_partition_is_complete)

The full substitutions and premise checks give the original answer; source identity,format and status are unchanged.





## This question review and source binding

Review date: 2026-10-26

Original questions, answers, step expressions, numeric ASTs and historical records are retained. Source candidate labels remain historical and are not overwritten as formal proof.

Source hashes and review receipts
- input commit: 0f7be61e2c22317a4075561dc822c87d881a50db
- original question SHA-256: b8442f7b4cb82a93c40811d3ea0f00e8caa198e1ba43dc445b775d31ae477098
- candidate record SHA-256: 601731a74281f819e32fe6db965a3132af2210b741e6450ebc22184aa8087290
- semantic review receipt SHA-256: a7c0d888ade6d307703c4222c4137c78c0d2448babdcba2fa3446fe6fdd343c1
- question-first witness SHA-256: c9571f97a37d503ad6a61034cc00108543a05c37ef246d1c4962f55136a3de02
- Lean: NOT_RUN · human review: NOT_PERFORMED

[Same-source full JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261014-advance-20261112-r06-legendre-symbol-0007.json)




