# Question 24182: Residues Give Plus One and Nonresidues Minus One under the Qualified Criterion

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

[← Question derivation index](https://ocme.evemisslab.com/en/questions/) · [Original question batch](https://ocme.evemisslab.com/en/practice/batch-20261015-advance-20261113-r04-euler-criterion-quadratic-residue-foundations/#q-20261015-advance-20261113-r04-euler-criterion-quadratic-residue-0057)

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.

R0047-24182 · q-20261015-advance-20261113-r04-euler-criterion-quadratic-residue-0057



## Original question and givens

Use odd prime p=19, original a=11, normalized nonzero class. Give (prime, normalized_class, classification, nonzero_roots, Legendre_symbol, signed_power, equal, certificate).


- G001 — Use odd prime p=19, original a=11, normalized nonzero class. Give (prime, normalized_class, classification, nonzero_roots, Legendre_symbol, signed_power, equal, 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-euler-criterion-quadratic-residue](https://ocme.evemisslab.com/en/mko/mko-euler-criterion-quadratic-residue/)





## Step-by-step derivation

S001 · impliesBefore

source roles = [eulercrit-residue-nonresidue-cases]

After

derived = [[prime, normalized_class, classification, nonzero_roots, Legendre_symbol, signed_power, equal, certificate]]

Conditions: none

List the source field order without JavaScript.Gradient boundary uses its original mode to choose6,8 or7 fields;no padding or answer-derived mode.

Step identifiers and dependenciesRule: source_ordered_fields_without_JS · Uses: G001





S002 · impliesBefore

source roles = [19]

After

derived = [[[2, 1], [3, 1], [4, 3]], Yes]

Conditions: none

A composite has a factor at most its square root;complete trial division qualifies the modulus,not a guessed square/Euler equality.

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





S003 · calculationBefore

Euler ORIGINAL signed quotient times modulus := mul(0, 19)

After

Euler ORIGINAL signed quotient times modulus = 0

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S004 · calculationBefore

Euler ORIGINAL signed a minus modulus multiple := sub(11, 0)

After

Euler ORIGINAL signed a minus modulus multiple = 11

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S005 · impliesBefore

source roles = [11, 19, 0]

After

derived = [11, Yes]

Conditions: none

Use a=qp+r with0<=r<p,including negative a;retain original a where the interface requests it.

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





S006 · impliesBefore

source roles = [19, 11, 11]

After

derived = [Yes, Yes]

Conditions: none

Qualify odd primality and the nonzero class first.Define Legendre by the square table before comparing a power.

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





S007 · calculationBefore

Euler square root candidate1 := mul(1, 1)

After

Euler square root candidate1 = 1

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S008 · calculationBefore

Euler square root candidate2 := mul(2, 2)

After

Euler square root candidate2 = 4

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S009 · calculationBefore

Euler square root candidate3 := mul(3, 3)

After

Euler square root candidate3 = 9

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S010 · calculationBefore

Euler square root candidate4 := mul(4, 4)

After

Euler square root candidate4 = 16

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S011 · calculationBefore

Euler square root candidate5 := mul(5, 5)

After

Euler square root candidate5 = 25

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S012 · calculationBefore

Euler square root candidate6 := mul(6, 6)

After

Euler square root candidate6 = 36

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S013 · calculationBefore

Euler square root candidate7 := mul(7, 7)

After

Euler square root candidate7 = 49

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S014 · calculationBefore

Euler square root candidate8 := mul(8, 8)

After

Euler square root candidate8 = 64

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S015 · calculationBefore

Euler square root candidate9 := mul(9, 9)

After

Euler square root candidate9 = 81

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S016 · calculationBefore

Euler square root candidate10 := mul(10, 10)

After

Euler square root candidate10 = 100

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S017 · calculationBefore

Euler square root candidate11 := mul(11, 11)

After

Euler square root candidate11 = 121

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S018 · calculationBefore

Euler square root candidate12 := mul(12, 12)

After

Euler square root candidate12 = 144

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S019 · calculationBefore

Euler square root candidate13 := mul(13, 13)

After

Euler square root candidate13 = 169

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S020 · calculationBefore

Euler square root candidate14 := mul(14, 14)

After

Euler square root candidate14 = 196

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S021 · calculationBefore

Euler square root candidate15 := mul(15, 15)

After

Euler square root candidate15 = 225

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S022 · calculationBefore

Euler square root candidate16 := mul(16, 16)

After

Euler square root candidate16 = 256

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S023 · calculationBefore

Euler square root candidate17 := mul(17, 17)

After

Euler square root candidate17 = 289

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S024 · calculationBefore

Euler square root candidate18 := mul(18, 18)

After

Euler square root candidate18 = 324

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S025 · impliesBefore

source roles = [19, 11]

After

derived = [[[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]], [7, 12], 1]

Conditions: none

Enumerate every nonzero square;roots give+1 and complete absence gives−1.This route does not use Euler criterion to compute Legendre.

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





S026 · calculationBefore

Euler binary power accumulate0 := mul(1, 11)

After

Euler binary power accumulate0 = 11

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S027 · calculationBefore

Euler binary power square0 := mul(11, 11)

After

Euler binary power square0 = 121

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S028 · impliesBefore

source roles = [0, [1, 11, 9], 19, 11, 9]

After

derived = [11, 121, 11, 7, 4]

Conditions: none

Maintain acc*base^remaining congruent to the original half-power:accumulate an odd bit,square the base,and halve the exponent to0.This is separate from the square-table calculation.

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





S029 · calculationBefore

Euler binary power square1 := mul(7, 7)

After

Euler binary power square1 = 49

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S030 · impliesBefore

source roles = [1, [11, 7, 4], 19, 11, 9]

After

derived = [null, 49, 11, 11, 2]

Conditions: none

Maintain acc*base^remaining congruent to the original half-power:accumulate an odd bit,square the base,and halve the exponent to0.This is separate from the square-table calculation.

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





S031 · calculationBefore

Euler binary power square2 := mul(11, 11)

After

Euler binary power square2 = 121

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S032 · impliesBefore

source roles = [2, [11, 11, 2], 19, 11, 9]

After

derived = [null, 121, 11, 7, 1]

Conditions: none

Maintain acc*base^remaining congruent to the original half-power:accumulate an odd bit,square the base,and halve the exponent to0.This is separate from the square-table calculation.

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





S033 · calculationBefore

Euler binary power accumulate3 := mul(11, 7)

After

Euler binary power accumulate3 = 77

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S034 · calculationBefore

Euler binary power square3 := mul(7, 7)

After

Euler binary power square3 = 49

Conditions: none

Substitute original roles and established intermediates exactly;check nonzero denominators and do not round.

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





S035 · impliesBefore

source roles = [3, [11, 7, 1], 19, 11, 9]

After

derived = [77, 49, 1, 11, 0]

Conditions: none

Maintain acc*base^remaining congruent to the original half-power:accumulate an odd bit,square the base,and halve the exponent to0.This is separate from the square-table calculation.

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





S036 · impliesBefore

source roles = [19, [7, 12], 1, 1]

After

derived = [1, Yes, one finite instance is not a general theorem proof]

Conditions: none

p−1 represents−1 modulo p,not integer equality.Compare the two computations for this instance;one finite table is not a general theorem proof.

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









## Reverse checks


- 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 — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S034 · premise_and_result_audit — Recompute Euler binary power square3 with exact rational arithmetic, not rounded decimals.
- S033 · premise_and_result_audit — Recompute Euler binary power accumulate3 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 Euler binary power square2 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 Euler binary power square1 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 Euler binary power square0 with exact rational arithmetic, not rounded decimals.
- S026 · premise_and_result_audit — Recompute Euler binary power accumulate0 with exact rational arithmetic, not rounded decimals.
- S025 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S024 · premise_and_result_audit — Recompute Euler square root candidate18 with exact rational arithmetic, not rounded decimals.
- S023 · premise_and_result_audit — Recompute Euler square root candidate17 with exact rational arithmetic, not rounded decimals.
- S022 · premise_and_result_audit — Recompute Euler square root candidate16 with exact rational arithmetic, not rounded decimals.
- S021 · premise_and_result_audit — Recompute Euler square root candidate15 with exact rational arithmetic, not rounded decimals.
- S020 · premise_and_result_audit — Recompute Euler square root candidate14 with exact rational arithmetic, not rounded decimals.
- S019 · premise_and_result_audit — Recompute Euler square root candidate13 with exact rational arithmetic, not rounded decimals.
- S018 · premise_and_result_audit — Recompute Euler square root candidate12 with exact rational arithmetic, not rounded decimals.
- S017 · premise_and_result_audit — Recompute Euler square root candidate11 with exact rational arithmetic, not rounded decimals.
- S016 · premise_and_result_audit — Recompute Euler square root candidate10 with exact rational arithmetic, not rounded decimals.
- S015 · premise_and_result_audit — Recompute Euler square root candidate9 with exact rational arithmetic, not rounded decimals.
- S014 · premise_and_result_audit — Recompute Euler square root candidate8 with exact rational arithmetic, not rounded decimals.
- S013 · premise_and_result_audit — Recompute Euler square root candidate7 with exact rational arithmetic, not rounded decimals.
- S012 · premise_and_result_audit — Recompute Euler square root candidate6 with exact rational arithmetic, not rounded decimals.
- S011 · premise_and_result_audit — Recompute Euler square root candidate5 with exact rational arithmetic, not rounded decimals.
- S010 · premise_and_result_audit — Recompute Euler square root candidate4 with exact rational arithmetic, not rounded decimals.
- S009 · premise_and_result_audit — Recompute Euler square root candidate3 with exact rational arithmetic, not rounded decimals.
- S008 · premise_and_result_audit — Recompute Euler square root candidate2 with exact rational arithmetic, not rounded decimals.
- S007 · premise_and_result_audit — Recompute Euler square root candidate1 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 — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S004 · premise_and_result_audit — Recompute Euler ORIGINAL signed a minus modulus multiple with exact rational arithmetic, not rounded decimals.
- S003 · premise_and_result_audit — Recompute Euler ORIGINAL signed quotient times modulus 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, 11, quadratic_residue, [7, 12], 1, 1, Yes, residue_maps_to_plus_one)

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: e684c15d7c516a6b0e8e0b8f074760e36b5f4ef61a4b37ddcc2f9de0de440b84
- candidate record SHA-256: fbd420db1a8f6eaece1418744d0c561ca416e489605f71cb90a77ec9fff7474c
- semantic review receipt SHA-256: 9b43b9823e9bd2478d6caa5b57ffed161c2c8956af86974e901d5662ad994386
- question-first witness SHA-256: eb97596068e2d5648033bab2b8f6ca9b653bbe8cb77c0f8e1d16d0c40e46f50b
- Lean: NOT_RUN · human review: NOT_PERFORMED

[Same-source full JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261015-advance-20261113-r04-euler-criterion-quadratic-residue-0057.json)




