# Question 27786: All Nonzero Prime Residues Pair with Inverses, with a Special p=2 Case

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

[← Question derivation index](https://ocme.evemisslab.com/en/questions/) · [Original question batch](https://ocme.evemisslab.com/en/practice/batch-20261015-advance-20261118-r04-wilson-theorem-foundations/#q-20261015-advance-20261118-r04-wilson-theorem-0036)

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.

R0054-27786 · q-20261015-advance-20261118-r04-wilson-theorem-0036



## Original question and givens

Use prime modulus p=31. Give (p, all_inverse_pairs, self_inverse_residues, distinct_cancelling_pairs, self_inverse_scope, factorial_residue, Wilson_congruence).


- G001 — Use prime modulus p=31. Give (p, all_inverse_pairs, self_inverse_residues, distinct_cancelling_pairs, self_inverse_scope, factorial_residue, Wilson_congruence).





## 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-wilson-theorem](https://ocme.evemisslab.com/en/mko/mko-wilson-theorem/)





## Step-by-step derivation

S001 · impliesBefore

source roles = [wilson-prime-inverse-pairing]

After

derived = [[p, all_inverse_pairs, self_inverse_residues, distinct_cancelling_pairs, self_inverse_scope, factorial_residue, Wilson_congruence]]

Conditions: none

List the complete operation/mode field order without JavaScript or answer-shape inference;Boolean,string,null and an unclaimed result remain distinct.

Step identifiers and dependenciesRule: source_ordered_fields_without_JS · Uses: G001





S002 · impliesBefore

source roles = [31, 1]

After

derived = [1, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S003 · impliesBefore

source roles = [31, 2]

After

derived = [16, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S004 · impliesBefore

source roles = [31, 3]

After

derived = [21, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S005 · impliesBefore

source roles = [31, 4]

After

derived = [8, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S006 · impliesBefore

source roles = [31, 5]

After

derived = [25, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S007 · impliesBefore

source roles = [31, 6]

After

derived = [26, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S008 · impliesBefore

source roles = [31, 7]

After

derived = [9, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S009 · impliesBefore

source roles = [31, 8]

After

derived = [4, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S010 · impliesBefore

source roles = [31, 9]

After

derived = [7, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S011 · impliesBefore

source roles = [31, 10]

After

derived = [28, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S012 · impliesBefore

source roles = [31, 11]

After

derived = [17, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S013 · impliesBefore

source roles = [31, 12]

After

derived = [13, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S014 · impliesBefore

source roles = [31, 13]

After

derived = [12, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S015 · impliesBefore

source roles = [31, 14]

After

derived = [20, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S016 · impliesBefore

source roles = [31, 15]

After

derived = [29, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S017 · impliesBefore

source roles = [31, 16]

After

derived = [2, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S018 · impliesBefore

source roles = [31, 17]

After

derived = [11, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S019 · impliesBefore

source roles = [31, 18]

After

derived = [19, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S020 · impliesBefore

source roles = [31, 19]

After

derived = [18, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S021 · impliesBefore

source roles = [31, 20]

After

derived = [14, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S022 · impliesBefore

source roles = [31, 21]

After

derived = [3, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S023 · impliesBefore

source roles = [31, 22]

After

derived = [24, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S024 · impliesBefore

source roles = [31, 23]

After

derived = [27, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S025 · impliesBefore

source roles = [31, 24]

After

derived = [22, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S026 · impliesBefore

source roles = [31, 25]

After

derived = [5, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S027 · impliesBefore

source roles = [31, 26]

After

derived = [6, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S028 · impliesBefore

source roles = [31, 27]

After

derived = [23, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S029 · impliesBefore

source roles = [31, 28]

After

derived = [10, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S030 · impliesBefore

source roles = [31, 29]

After

derived = [15, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S031 · impliesBefore

source roles = [31, 30]

After

derived = [30, 1]

Conditions: none

Every nonzero residue at a prime modulus is a unit.For each a find the first source inverse;two inverses coincide by cancellation of a.

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





S032 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product1 := mul(1, 1)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product1 = 1

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S033 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 1, 1, 1]

After

derived = [0, 1, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

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





S034 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product2 := mul(1, 2)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product2 = 2

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S035 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 2, 1, 2]

After

derived = [0, 2, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

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





S036 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product3 := mul(2, 3)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product3 = 6

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S037 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 3, 2, 6]

After

derived = [0, 6, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

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





S038 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product4 := mul(6, 4)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product4 = 24

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S039 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 4, 6, 24]

After

derived = [0, 24, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

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





S040 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product5 := mul(24, 5)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product5 = 120

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S041 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 5, 24, 120]

After

derived = [3, 27, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S040





S042 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product6 := mul(27, 6)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product6 = 162

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S043 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 6, 27, 162]

After

derived = [5, 7, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S042





S044 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product7 := mul(7, 7)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product7 = 49

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S045 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 7, 7, 49]

After

derived = [1, 18, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S044





S046 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product8 := mul(18, 8)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product8 = 144

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S047 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 8, 18, 144]

After

derived = [4, 20, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S046





S048 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product9 := mul(20, 9)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product9 = 180

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S049 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 9, 20, 180]

After

derived = [5, 25, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S048





S050 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product10 := mul(25, 10)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product10 = 250

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S051 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 10, 25, 250]

After

derived = [8, 2, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S050





S052 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product11 := mul(2, 11)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product11 = 22

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S053 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 11, 2, 22]

After

derived = [0, 22, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S052





S054 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product12 := mul(22, 12)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product12 = 264

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S055 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 12, 22, 264]

After

derived = [8, 16, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S054





S056 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product13 := mul(16, 13)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product13 = 208

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S057 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 13, 16, 208]

After

derived = [6, 22, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S056





S058 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product14 := mul(22, 14)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product14 = 308

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S059 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 14, 22, 308]

After

derived = [9, 29, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S058





S060 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product15 := mul(29, 15)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product15 = 435

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S061 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 15, 29, 435]

After

derived = [14, 1, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S060





S062 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product16 := mul(1, 16)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product16 = 16

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S063 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 16, 1, 16]

After

derived = [0, 16, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S062





S064 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product17 := mul(16, 17)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product17 = 272

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S065 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 17, 16, 272]

After

derived = [8, 24, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S064





S066 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product18 := mul(24, 18)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product18 = 432

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S067 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 18, 24, 432]

After

derived = [13, 29, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S066





S068 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product19 := mul(29, 19)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product19 = 551

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S069 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 19, 29, 551]

After

derived = [17, 24, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S068





S070 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product20 := mul(24, 20)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product20 = 480

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S071 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 20, 24, 480]

After

derived = [15, 15, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S070





S072 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product21 := mul(15, 21)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product21 = 315

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S073 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 21, 15, 315]

After

derived = [10, 5, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S072





S074 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product22 := mul(5, 22)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product22 = 110

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S075 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 22, 5, 110]

After

derived = [3, 17, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S074





S076 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product23 := mul(17, 23)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product23 = 391

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S077 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 23, 17, 391]

After

derived = [12, 19, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S076





S078 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product24 := mul(19, 24)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product24 = 456

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S079 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 24, 19, 456]

After

derived = [14, 22, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S078





S080 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product25 := mul(22, 25)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product25 = 550

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S081 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 25, 22, 550]

After

derived = [17, 23, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S080





S082 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product26 := mul(23, 26)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product26 = 598

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S083 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 26, 23, 598]

After

derived = [19, 9, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S082





S084 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product27 := mul(9, 27)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product27 = 243

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S085 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 27, 9, 243]

After

derived = [7, 26, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S084





S086 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product28 := mul(26, 28)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product28 = 728

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S087 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 28, 26, 728]

After

derived = [23, 15, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S086





S088 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product29 := mul(15, 29)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product29 = 435

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S089 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 29, 15, 435]

After

derived = [14, 1, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S088





S090 · calculationBefore

Wilson ORIGINAL prime factorial ORIGINAL running factorial product30 := mul(1, 30)

After

Wilson ORIGINAL prime factorial ORIGINAL running factorial product30 = 30

Conditions: none

Substitute original roles and established intermediates exactly,not approximations or internally consistent changed operands;extra teaching algebra adds no source-domain gate.

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





S091 · impliesBefore

source roles = [Wilson ORIGINAL prime factorial, 31, 30, 1, 30]

After

derived = [0, 30, Yes, Yes]

Conditions: none

Retain the prior residue and full product at every k,then its unique Euclidean remainder in0..n-1.The invariant is value congruent to k! mod n,not an assumed last table entry.

Step identifiers and dependenciesRule: Wilson_EACH_running_factorial_exact_Euclidean_remainder · Uses: G001, S090





S092 · impliesBefore

source roles = [31, [[1, 1], [2, 16], [3, 21], [4, 8], [5, 25], [6, 26], [7, 9], [8, 4], [9, 7], [10, 28], [11, 17], [12, 13], [13, 12], [14, 20], [15, 29], [16, 2], [17, 11], [18, 19], [19, 18], [20, 14], [21, 3], [22, 24], [23, 27], [24, 22], [25, 5], [26, 6], [27, 23], [28, 10], [29, 15], [30, 30]]]

After

derived = [[1, 30], [[2, 16, 1], [3, 21, 1], [4, 8, 1], [5, 25, 1], [6, 26, 1], [7, 9, 1], [10, 28, 1], [11, 17, 1], [12, 13, 1], [14, 20, 1], [15, 29, 1], [18, 19, 1], [22, 24, 1], [23, 27, 1]], 30, Yes]

Conditions: none

Nonself inverse pairs multiply to1.A self-inverse satisfies(r-1)(r+1)=0 modulo a prime,so is±1.For p>2 their product is-1;at p2 only the single1=-1 remains.This general teaching argument does not turn the finite table/program into a Lean proof.

Step identifiers and dependenciesRule: Wilson_GENERAL_inverse_pairing_and_p2_exception · Uses: G001, S091









## Reverse checks


- S092 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S091 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S090 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product30 with exact rational arithmetic, not rounded decimals.
- S089 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S088 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product29 with exact rational arithmetic, not rounded decimals.
- S087 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S086 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product28 with exact rational arithmetic, not rounded decimals.
- S085 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S084 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product27 with exact rational arithmetic, not rounded decimals.
- S083 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S082 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product26 with exact rational arithmetic, not rounded decimals.
- S081 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S080 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product25 with exact rational arithmetic, not rounded decimals.
- S079 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S078 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product24 with exact rational arithmetic, not rounded decimals.
- S077 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S076 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product23 with exact rational arithmetic, not rounded decimals.
- S075 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S074 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product22 with exact rational arithmetic, not rounded decimals.
- S073 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S072 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product21 with exact rational arithmetic, not rounded decimals.
- S071 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S070 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product20 with exact rational arithmetic, not rounded decimals.
- S069 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S068 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product19 with exact rational arithmetic, not rounded decimals.
- S067 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S066 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product18 with exact rational arithmetic, not rounded decimals.
- S065 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S064 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product17 with exact rational arithmetic, not rounded decimals.
- S063 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S062 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product16 with exact rational arithmetic, not rounded decimals.
- S061 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S060 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product15 with exact rational arithmetic, not rounded decimals.
- S059 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S058 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product14 with exact rational arithmetic, not rounded decimals.
- S057 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S056 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product13 with exact rational arithmetic, not rounded decimals.
- S055 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S054 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product12 with exact rational arithmetic, not rounded decimals.
- S053 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S052 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product11 with exact rational arithmetic, not rounded decimals.
- S051 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S050 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product10 with exact rational arithmetic, not rounded decimals.
- S049 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S048 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product9 with exact rational arithmetic, not rounded decimals.
- S047 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S046 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product8 with exact rational arithmetic, not rounded decimals.
- S045 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S044 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product7 with exact rational arithmetic, not rounded decimals.
- S043 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S042 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product6 with exact rational arithmetic, not rounded decimals.
- S041 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S040 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product5 with exact rational arithmetic, not rounded decimals.
- S039 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S038 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product4 with exact rational arithmetic, not rounded decimals.
- S037 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S036 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product3 with exact rational arithmetic, not rounded decimals.
- S035 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S034 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product2 with exact rational arithmetic, not rounded decimals.
- S033 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S032 · premise_and_result_audit — Recompute Wilson ORIGINAL prime factorial ORIGINAL running factorial product1 with exact rational arithmetic, not rounded decimals.
- S031 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S030 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S029 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S028 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S027 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S026 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S025 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S024 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S023 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S022 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S021 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S020 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S019 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S018 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S017 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S016 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S015 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S014 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S013 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S012 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S011 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S010 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S009 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S008 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S007 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S006 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S005 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S004 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S003 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S002 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.
- S001 · premise_and_result_audit — Reverse-check original data,operands,complete scope and premises;finite witnesses,conditional theorem use and formal proof remain distinct.





## Result

(31, [[1, 1], [2, 16], [3, 21], [4, 8], [5, 25], [6, 26], [7, 9], [8, 4], [9, 7], [10, 28], [11, 17], [12, 13], [13, 12], [14, 20], [15, 29], [16, 2], [17, 11], [18, 19], [19, 18], [20, 14], [21, 3], [22, 24], [23, 27], [24, 22], [25, 5], [26, 6], [27, 23], [28, 10], [29, 15], [30, 30]], [1, 30], [[2, 16, 1], [3, 21, 1], [4, 8, 1], [5, 25, 1], [6, 26, 1], [7, 9, 1], [10, 28, 1], [11, 17, 1], [12, 13, 1], [14, 20, 1], [15, 29, 1], [18, 19, 1], [22, 24, 1], [23, 27, 1]], self_inverse_residues_1_and_p_minus_1, 30, Yes)

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: 2e1b314590ae01c803bc9f2d2291bf3c29d0bba5b0be9fa5f23b8234f590d76d
- candidate record SHA-256: 7452bf82951900665b24953bb56f9da9401eda1e936f8b8d793c49c8d08ed8cd
- semantic review receipt SHA-256: 0a76d8e93c08bb16998a0483f3dfc0504f269fc3e1982e6cd868cab0a2856d54
- question-first witness SHA-256: 09127b736c225714dfa0b7ceb0e6a6e66df27438b480cad8217d3c2f99ce9437
- Lean: NOT_RUN · human review: NOT_PERFORMED

[Same-source full JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261015-advance-20261118-r04-wilson-theorem-0036.json)




