Alphabeta Math
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

✓ 19 results · all verified · 0 also independently AI-judged
Every result on this page is machine-checked by a proof checker and read in full and owner-audited; the judge is an additional, independent cross-model AI review of the proofs. The 19 not AI-judged were verified by owner audit (typically over a confirmed judge false positive), not failures.

Congruences, the Integers Modulo n and the Chinese Remainder Theorem

1 · Prerequisites

2 · Summary

Congruence turns divisibility into an equivalence relation and hence into the quotient Z/n, where addition and multiplication are independent of representatives. The boundary moduli are part of the construction: congruence modulo 0 is equality, congruence modulo 1 is universal, and Z/1 is the one-element ring rather than a field. For positive moduli, units are exactly the coprime residue classes, so their number is Euler's totient. Linear congruences are reduced by their gcd, giving both their solvability criterion and their exact number of solution classes.

The two-modulus theorem first proves the full compatibility criterion: residues modulo positive m,n coexist exactly when gcd⁡(m,n) divides their difference, and then determine one class modulo mn/gcd⁡(m,n). Its coprime specialization extends to finite pairwise-coprime lists and preserves both operations. This yields multiplicativity of φ, while inclusion-exclusion gives Euler's finite prime-divisor product. Partitioning standard residues by n/gcd⁡(a,n) gives ∑d∣n, d>0φ(d)=n. Finally, prime modulus makes Z/p a field, and inverse pairing in its unit group proves Wilson's theorem.

3 · Logical flowchart

4 · Definitions, theorems and proofs

DefinitionDefinition: Literature-sourcedProof: Not applicableaudited 2026-07-31Open item page →

Congruence modulo an integer: a≡b(modn) when n∣(a−b), including the moduli 0 and 1

Definition

Let a,b,n∈Z. We say that a is congruent to b modulo n, and write

a≡b(modn),

when n∣(a−b) in the sense of Divisibility in Z: d∣a when a=dq for some integer q. Thus there is an integer q with a−b=nq. The modulus is any integer; it is not required to be positive.

At modulus 0, the condition is 0∣(a−b), which holds exactly when a−b=0. Hence

a≡b(mod0)⟺a=b.

At modulus 1, every two integers are congruent because 1 divides every integer. Changing the sign of the modulus changes nothing: n∣(a−b) exactly when −n∣(a−b).

Remarks

  • Congruence is a relation on integers. The quotient sets and operations below use nonnegative or positive moduli only where their statements require it.
  • The notation a mod n is not used for a chosen remainder here. The relation a≡b(modn) is defined even for n=0, where a remainder operation would not be available.
LemmaStatement: AI-adaptedProof: AI-adaptedprecheck passaudited 2026-07-31Open item page →

Congruence modulo every integer is an equivalence relation on Z

Statement

For every integer n, the relation a≡b(modn) on Z (Congruence modulo an integer: a≡b(modn) when n∣(a−b), including the moduli 0 and 1) is an equivalence relation (Equivalence relation, equivalence class, and the quotient set A/∼). For n=0 it is equality, and for n=1 it is the universal relation.

Facts & Assumptions

Given: An integer n and integers a,b,c.

[L1]

Divisibility is reflexive and linear: d∣u and d∣v imply d∣ux+vy for all integers x,y; also d∣u implies d∣−u (Divisibility is reflexive and transitive on Z, and is linear: if d∣a and d∣b then d∣ax+by for all integers x,y; also d∣a implies d∣ac, −d∣a and d∣−a).

[F2]

An equivalence relation is reflexive, symmetric and transitive (Equivalence relation, equivalence class, and the quotient set A/∼).

Proof

technique · direct
1.1

Reflexivity: a−a=0=n⋅0, so n∣(a−a) and a≡a(modn).

F1algebra
1.2

Symmetry: if a≡b(modn), then n∣(a−b), hence n∣−(a−b)=b−a, so b≡a(modn).

F1L1
1.3

Transitivity: if a≡b(modn) and b≡c(modn), then n∣(a−b) and n∣(b−c), hence n∣(a−b)+(b−c)=a−c, so a≡c(modn).

F1L1algebra
2.1

Steps 1.1, 1.2 and 1.3 establish the three clauses in [F2], so congruence modulo n is an equivalence relation.

step 1.1step 1.2step 1.3F2
3.1

When n=0, [F1] reads 0∣(a−b), which is equivalent to a=b; when n=1, it always holds because a−b=1⋅(a−b).

F1algebra∎
LemmaStatement: AI-adaptedProof: AI-adaptedprecheck passaudited 2026-07-31Open item page →

Congruent integers may be added, subtracted and multiplied: representative changes preserve both arithmetic operations

Statement

Let n,a,a′,b,b′∈Z. If a≡a′(modn) and b≡b′(modn), then

a+b≡a′+b′(modn),a−b≡a′−b′(modn),ab≡a′b′(modn).

In particular −a≡−a′(modn), and for every k∈N the natural powers of Powers gn: natural exponents in a monoid and integer exponents in a group, with g0=e satisfy ak≡(a′)k(modn).

Facts & Assumptions

Given: Integers n,a,a′,b,b′ with a≡a′(modn) and b≡b′(modn).

[L1]
[L2]

Z is a commutative ring, so subtraction, distributivity and the identities used below are valid (The integers form a commutative ring).

[F2]

Natural powers in the multiplicative monoid of Z satisfy x0=1 and xk+1=xkx (Powers gn: natural exponents in a monoid and integer exponents in a group, with g0=e).

[L3]

A property true at 0 and inherited by successors holds for every natural number (The principle of mathematical induction).

Proof

technique · direct
1.1

By [F1], n∣(a−a′) and n∣(b−b′).

givenF1
2.1

Since (a+b)−(a′+b′)=(a−a′)+(b−b′), linearity gives a+b≡a′+b′(modn).

step 1.1F1L1L2
2.2

Since (a−b)−(a′−b′)=(a−a′)−(b−b′), linearity gives a−b≡a′−b′(modn); also n∣(a−a′) gives n∣−(a−a′)=(−a)−(−a′), so −a≡−a′(modn).

step 1.1F1L1L2
2.3

The identity ab−a′b′=a(b−b′)+b′(a−a′) and linearity give n∣(ab−a′b′), hence ab≡a′b′(modn).

step 1.1F1L1L2
3.1

The power claim holds at k=0 because a0=1=(a′)0. If it holds at k, then step 2.3 applied to ak≡(a′)k and a≡a′ gives ak+1=aka≡(a′)ka′=(a′)k+1. Thus it holds for every k∈N by induction.

step 2.3F2L3∎
DefinitionDefinition: AI-adaptedProof: Not applicableaudited 2026-07-31Open item page →

The congruence class [a]n and the quotient set Z/n

Definition

Fix an integer n. Congruence modulo n is an equivalence relation on Z by Congruence modulo every integer is an equivalence relation on Z. The congruence class of a modulo n is

[a]n:={ b∈Z:b≡a(modn) },

and the integers modulo n form the quotient set

Z/n:={ [a]n:a∈Z }.

This is the quotient-set construction of Equivalence relation, equivalence class, and the quotient set A/∼. By The equivalence classes of an equivalence relation are nonempty, cover A, and are pairwise equal or disjoint; conversely every such cover arises from exactly one equivalence relation, two classes are equal exactly when their representatives are congruent:

[a]n=[b]n⟺a≡b(modn).

At n=0 each class is a singleton because congruence modulo 0 is equality. At n=1 there is one class, namely Z itself.

Remarks

  • The notation Z/n in this item denotes a quotient set. It does not yet assert any algebraic structure.
  • Since congruence modulo n and modulo −n are the same relation, their quotient sets are literally the same collection of subsets of Z.
TheoremStatement: AI-adaptedProof: AI-generatedprecheck passaudited 2026-07-31Open item page →

For n≥1, every class in Z/n has one representative r with 0≤r<n, so ∣Z/n∣=n; while Z/0 is in bijection with Z

Statement

Let n be a positive integer. Every class in Z/n (The congruence class [a]n and the quotient set Z/n) contains exactly one integer r with 0≤r<n. Consequently the map

r⟼[r]n(0≤r<n)

is a bijection from the von Neumann natural n to Z/n, and ∣Z/n∣=n. This includes n=1, where the only representative is 0. For n=0, the map a↦[a]0 is a bijection Z→Z/0.

Facts & Assumptions

Given: A positive integer n and integers a,b; separately, the modulus 0.

[L1]

For n>0 there are unique integers q,r with a=qn+r and 0≤r<n (Division with remainder in Z: for a∈Z and b>0 there are unique q,r∈Z with a=qb+r and 0≤r<b).

[F1]

[u]n=[v]n exactly when n∣(u−v) (The congruence class [a]n and the quotient set Z/n).

[L2]

The natural-number embedding into Z is injective and has image the nonnegative integers; the von Neumann natural n is the set of naturals r<n (The naturals embed in the integers, The natural numbers N (von Neumann)).

[F2]

A bijection transports finite cardinality, and ∣n∣=n (Injection, surjection, bijection, The cardinality ∣A∣ of a finite set).

Proof

technique · direct
1.1

By [L1], write a=qn+r with 0≤r<n. Then n∣(a−r), so [a]n=[r]n.

L1F1
1.2

If 0≤r,s<n and [r]n=[s]n, then r−s=kn for some integer k, so r=kn+s. Both r=0n+r and r=kn+s express r with a remainder in the range from 0 to n−1, so uniqueness in [L1] gives r=s.

F1L1
1.3

At modulus 0, [F1] says [a]0=[b]0 exactly when 0∣(a−b), exactly when a=b. Hence a↦[a]0 is injective, and it is surjective by the definition of the quotient set.

F1algebra
2.1

Thus r↦[r]n from the natural n to Z/n is surjective by step 1.1 and injective by step 1.2, hence bijective.

step 1.1step 1.2L2F2
3.1

Since n is finite with cardinality n, the bijection in step 2.1 gives ∣Z/n∣=n. At n=1 its domain is 1={0}, so there is one class.

step 2.1F2L2
4.1

Steps 1.1 through 3.1 prove the positive-modulus statement, and step 1.3 proves the bijection at modulus 0.

step 1.1step 1.2step 2.1step 3.1step 1.3∎
DefinitionDefinition: AI-adaptedProof: Not applicableaudited 2026-07-31Open item page →

Addition and multiplication on Z/n by [a]n+[b]n=[a+b]n and [a]n[b]n=[ab]n

Definition

Let n∈N, including n=0 and n=1. For classes in Z/n (The congruence class [a]n and the quotient set Z/n) define

[a]n+[b]n:=[a+b]n,[a]n[b]n:=[ab]n.

These are binary operations in the sense of Binary operation on a set; associativity, commutativity, and a subset closed under the operation. Indeed, if [a]n=[a′]n and [b]n=[b′]n, then a≡a′(modn) and b≡b′(modn), so

a+b≡a′+b′(modn),ab≡a′b′(modn)

by Congruent integers may be added, subtracted and multiplied: representative changes preserve both arithmetic operations. Thus the two displayed classes do not depend on the representatives chosen.

For n=0, every class is a singleton and these operations reproduce integer addition and multiplication under the bijection Z→Z/0. For n=1, the quotient has one element, so [0]1=[1]1 and both operations are the unique binary operation on a one-element set.

Remarks

  • The representative-independence argument is part of the definition. Without it the displayed formulas would be rules on integers, not operations on classes.
  • No field assertion is made here. In particular, the coincidence [0]1=[1]1 will exclude Z/1 from being a field.
TheoremStatement: AI-adaptedProof: AI-generatedprecheck passaudited 2026-07-31Open item page →

For every natural n, (Z/n,+) is an abelian group, multiplication is a commutative monoid operation, and both distributive laws hold

Statement

For every n∈N, with addition and multiplication as in Addition and multiplication on Z/n by [a]n+[b]n=[a+b]n and [a]n[b]n=[ab]n:

  1. (Z/n,+,[0]n) is an abelian group (Group and abelian group), with −[a]n=[−a]n;
  2. (Z/n,⋅,[1]n) is a commutative monoid (Semigroup and monoid);
  3. multiplication distributes over addition on both sides.

The assertions include n=0 and n=1. At n=1, the two distinguished identities coincide because [0]1=[1]1.

Facts & Assumptions

Given: A natural number n and classes [a]n,[b]n,[c]n in Z/n.

[F1]

[u]n+[v]n=[u+v]n and [u]n[v]n=[uv]n, and these values are independent of representatives (Addition and multiplication on Z/n by [a]n+[b]n=[a+b]n and [a]n[b]n=[ab]n).

[L1]

Z is a commutative ring: addition and multiplication are associative and commutative, 0 and 1 are identities, every integer has an additive inverse, and multiplication distributes over addition (The integers form a commutative ring).

[F2]

An abelian group is an associative commutative binary operation with an identity and inverses; a commutative monoid is an associative commutative binary operation with an identity (Group and abelian group, Semigroup and monoid).

Proof

technique · direct
1.1

Associativity and commutativity of addition follow from ([a]n+[b]n)+[c]n=[(a+b)+c]n=[a+(b+c)]n=[a]n+([b]n+[c]n) and [a+b]n=[b+a]n.

F1L1
1.2

The class [0]n is an additive identity, and [−a]n is an additive inverse of [a]n, since [a+0]n=[a]n and [a+(−a)]n=[0]n.

F1L1
1.3

Associativity and commutativity of multiplication follow from [(ab)c]n=[a(bc)]n and [ab]n=[ba]n, while [1]n is a multiplicative identity because [a⋅1]n=[a]n.

F1L1
1.4

Left distributivity is [a]n([b]n+[c]n)=[a(b+c)]n=[ab+ac]n=[a]n[b]n+[a]n[c]n; right distributivity follows identically, or from commutativity.

F1L1
2.1

Steps 1.1 and 1.2 verify the abelian-group clauses, step 1.3 verifies the commutative-monoid clauses, and step 1.4 gives both distributive laws.

step 1.1step 1.2step 1.3step 1.4F2∎
DefinitionDefinition: AI-adaptedProof: Not applicableaudited 2026-07-31Open item page →

The unit group (Z/n)× and Euler's totient φ(n)=∣(Z/n)×∣ for n≥1

Definition

Let n≥1 be an integer. Multiplication makes Z/n a commutative monoid with identity [1]n by For every natural n, (Z/n,+) is an abelian group, multiplication is a commutative monoid operation, and both distributive laws hold. A class u∈Z/n is a unit when it is invertible in that monoid (Left inverse, right inverse, and invertible element of a monoid). The set of all units is

(Z/n)×:={ u∈Z/n:some v∈Z/n satisfies uv=[1]n }.

By The invertible elements of a monoid form a group under the restricted operation, multiplication restricts to a group operation on (Z/n)×, called the unit group modulo n.

The quotient Z/n is finite with cardinality n by For n≥1, every class in Z/n has one representative r with 0≤r<n, so ∣Z/n∣=n; while Z/0 is in bijection with Z, and its unit set is a finite subset by A subset of a finite set is finite, with ∣B∣≤∣A∣, and equality holds if and only if B=A. Euler's totient function is therefore defined for every positive integer n by

φ(n):=∣(Z/n)×∣∈N

(The cardinality ∣A∣ of a finite set). For n=1, the quotient has one element, which is its multiplicative identity and hence a unit, so φ(1)=1 follows from the definition.

Remarks

  • The domain of φ here is the positive integers. No value φ(0) is defined.
  • The one-element multiplicative monoid is a group, even though its identity is also its additive zero. It is not a field because a field requires distinct elements 0 and 1 (Field).
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-07-31Open item page →

For n≥1, [a]n is a unit if and only if gcd⁡(a,n)=1

Statement

Let n≥1 and a∈Z. Then [a]n is a unit of Z/n (The unit group (Z/n)× and Euler's totient φ(n)=∣(Z/n)×∣ for n≥1) if and only if

gcd⁡(a,n)=1,

that is, if and only if a and n are coprime (Coprime integers: gcd⁡(a,b)=1). Consequently the condition gcd⁡(a,n)=1 depends only on the class [a]n.

Facts & Assumptions

Proof

technique · direct
1.1

Suppose gcd⁡(a,n)=1. By [L1], choose integers x,y with ax+ny=1. Reducing this equality modulo n gives [a]n[x]n=[1]n, so [a]n is a unit.

L1F1choose
1.2

Conversely, suppose [a]n is a unit. Choose b with [a]n[b]n=[1]n. Then ab≡1(modn), so ab−1=nq for some integer q, and ab+n(−q)=1. By [L1], gcd⁡(a,n)=1.

F1L1choose
1.3

If a≡a′(modn) and gcd⁡(a,n)=1, write a′=a+nk. A Bézout identity ax+ny=1 then becomes a′x+n(y−kx)=1, so gcd⁡(a′,n)=1 by [L1]; symmetry gives the converse. Thus the criterion is representative independent.

L1L2algebra
2.1

Steps 1.1 and 1.2 prove the equivalence, and step 1.3 proves its final representative-independence assertion.

step 1.1step 1.2step 1.3∎
CorollaryStatement: AI-adaptedProof: AI-generatedprecheck passaudited 2026-07-31Open item page →

φ(1)=1, and φ(p)=p−1 for every prime p

Statement

Euler's totient satisfies φ(1)=1. If p is prime (Prime and composite integers: p is prime when p>1 and its only positive divisors are 1 and p), then

φ(p)=p−1.

Facts & Assumptions

Proof

technique · direct
1.1

Modulo 1 there is one class, and it is the multiplicative identity, hence a unit. Therefore φ(1)=1.

F1L2
1.2

Let 0≤r<p. If r=0, then p∣r, so [r]p is not a unit by the unit criterion. If r>0, then p∤r: otherwise r=pk with p>0 and r>0, forcing k≥1 and r≥p, contrary to r<p.

F1F2L2algebra
2.1

For 0<r<p, [L1] gives gcd⁡(p,r)=1, hence gcd⁡(r,p)=1, so [r]p is a unit by the unit criterion. Thus the units are exactly the classes with representatives 1,2,…,p−1.

step 1.2F1L1
3.1

Translation by 1 is a bijection from the natural p−1 onto the representatives r with 0<r<p. Hence that finite set, and therefore the unit group, has cardinality p−1.

step 2.1L2L3algebra
4.1

By [F1] and step 3.1, φ(p)=p−1; together with step 1.1 this proves both clauses.

step 1.1step 3.1F1∎
LemmaStatement: AI-adaptedProof: AI-generatedprecheck passaudited 2026-07-31Open item page →

For a prime p and k≥1, multiplication by p bijects the standard representatives modulo pk−1 with the representatives modulo pk divisible by p

Statement

Let p be prime and let k∈N with k≥1. Write k−1 for the unique natural j with j+1=k. Multiplication by p gives a bijection

{ r∈Z:0≤r<pk−1 }⟶{ s∈Z:0≤s<pk, p∣s },r⟼pr.

Thus the standard representatives modulo pk divisible by p are exactly 0,p,2p,…,(pk−1−1)p, and there are pk−1 of them.

Facts & Assumptions

Given: A prime p and a natural k≥1.

[F2]
[F3]

A map is bijective when it is injective and surjective (Injection, surjection, bijection).

[L1]

If px=py and p≠0, then x=y (The integers have no zero divisors; multiplicative cancellation).

Proof

technique · direct
1.1

If 0≤r<pk−1, then 0≤pr<p⋅pk−1=pk, and p∣pr. Thus the displayed rule has values in the stated codomain.

F1F4algebra
1.2

The rule is injective: pr=pr′ implies r=r′ because p≠0.

L1F4
1.3

It is surjective: if 0≤s<pk and p∣s, write s=pr. Since p>0, the inequalities give 0≤r<pk−1 after using pk=ppk−1.

F1F4algebrachoose
2.1

Steps 1.1, 1.2 and 1.3 give a bijection, and [F2] transports the domain cardinality pk−1 to the codomain.

step 1.1step 1.2step 1.3F2F3∎
TheoremStatement: AI-adaptedProof: AI-generatedprecheck passaudited 2026-07-31Open item page →

For a prime p and k≥1, φ(pk)=pk−pk−1

Statement

For every prime p and natural k≥1,

φ(pk)=pk−pk−1.

Equivalently, among the pk standard classes modulo pk, the nonunits are exactly those whose standard representatives are divisible by p.

Facts & Assumptions

Given: A prime p, a natural k≥1, and an arbitrary standard representative r with 0≤r<pk.

[F2]

The gcd of a nonzero pair is its greatest common divisor: it is a common divisor, it is at least every common divisor, and divisibility is transitive. Hence every divisor of gcd⁡(a,b) divides both a and b (Common divisor, and the greatest common divisor gcd⁡(a,b), with the convention gcd⁡(0,0):=0, Divisibility is reflexive and transitive on Z, and is linear: if d∣a and d∣b then d∣ax+by for all integers x,y; also d∣a implies d∣ac, −d∣a and d∣−a).

Proof

technique · direct
1.1

If p∣r, then p is a common divisor of r and pk. Since p>1 by [F1], the greatest-common-divisor property in [F2] gives gcd⁡(r,pk)≠1, so [r]pk is not a unit.

L1F1F2
1.2

Suppose p∤r, so p and r are coprime by [L2]. If gcd⁡(r,pk)>1, [L3] gives a prime q dividing that gcd. Then [F2] gives q∣r and q∣pk. Uniqueness of prime factorisation applied to pk, a product of copies of p, forces q=p, contradicting the coprimality of p and r. Hence gcd⁡(r,pk)=1, so [r]pk is a unit.

L1L2L3F2
2.1

Since r was arbitrary, the standard representatives split disjointly into the unit representatives and the representatives divisible by p. The whole set has cardinality pk by [L5], and the second block has cardinality pk−1 by [L4].

step 1.1step 1.2L4L5
3.1

By the sum rule, pk=φ(pk)+pk−1 in N, so φ(pk)=pk−pk−1.

step 2.1L5L6∎
LemmaStatement: AI-adaptedProof: AI-generatedprecheck passaudited 2026-07-31Open item page →

If n≥1, d=gcd⁡(a,n) and d∣b, then ax≡b(modn) reduces to a congruence with coprime coefficient modulo n/d

Statement

Let a,b∈Z, let n≥1, and put d:=gcd⁡(a,n). If d∣b, write

a=da′,n=dn′,b=db′.

Then d>0, the integers a′,n′ are coprime, and for every x∈Z,

ax≡b(modn)⟺a′x≡b′(modn′).

Thus the reduced modulus is the positive integer n′=n/d and its coefficient is coprime to it (Congruence modulo an integer: a≡b(modn) when n∣(a−b), including the moduli 0 and 1).

Facts & Assumptions

Given: Integers a,b, a positive integer n, d:=gcd⁡(a,n), and d∣b.

[L1]

The gcd is a nonnegative common divisor, and it is positive when its two arguments are not both zero (Common divisor, and the greatest common divisor gcd⁡(a,b), with the convention gcd⁡(0,0):=0).

[L2]

If d=gcd⁡(u,v)≠0, then the uniquely determined quotients u/d and v/d are coprime (If d=gcd⁡(a,b) is nonzero then a/d and b/d are coprime, The integers have no zero divisors; multiplicative cancellation).

Proof

technique · direct
1.1

Since n>0, the pair (a,n) is not (0,0), so d>0 by [L1]. Because d divides a,n,b, there are integers a′,n′,b′ with a=da′, n=dn′ and b=db′; these quotients are unique by cancellation, n′>0, and a′,n′ are coprime by [L2].

L1L2L3
2.1

For any integer x, the congruence ax≡b(modn) says dn′∣d(a′x−b′), so it holds exactly when there is an integer q with d(a′x−b′)=dn′q; since d≠0, cancellation makes this equivalent to a′x−b′=n′q, namely a′x≡b′(modn′).

step 1.1L3L4∎
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-07-31Open item page →

For n≥1, ax≡b(modn) is solvable exactly when gcd⁡(a,n)∣b, and then has exactly gcd⁡(a,n) solution classes modulo n

Statement

Let a,b∈Z and n≥1, and put d:=gcd⁡(a,n). The congruence

ax≡b(modn)

has an integer solution if and only if d∣b. When it is solvable, it has exactly d solution classes in Z/n. More explicitly, if a=da′, n=dn′, b=db′ and x0 solves a′x0≡b′(modn′), the solutions modulo n are

[x0+jn′]n(0≤j<d).

Facts & Assumptions

Given: Integers a,b, a positive integer n, and d:=gcd⁡(a,n).

[L2]

If d∣b, the original congruence is equivalent to a′x≡b′(modn′), where a=da′, n=dn′, b=db′, n′>0, and a′,n′ are coprime (If n≥1, d=gcd⁡(a,n) and d∣b, then ax≡b(modn) reduces to a congruence with coprime coefficient modulo n/d).

[L4]

Every class modulo a positive integer c has a unique representative r with 0≤r<c, and the quotient has cardinality c (For n≥1, every class in Z/n has one representative r with 0≤r<n, so ∣Z/n∣=n; while Z/0 is in bijection with Z, The cardinality ∣A∣ of a finite set).

Proof

technique · direct
1.1

If x solves the congruence, then n∣ax−b, so ax−b=nq for some q and b=ax−nq. Since d∣a and d∣n, it follows that d∣b.

L1
1.2

Conversely suppose d∣b and use the notation of [L2]. Choose u,v with ua′+vn′=1 by [L3]. Then x0:=ub′ satisfies a′x0−b′=b′(ua′−1)=−b′vn′, so it solves the reduced congruence and hence the original one.

L2L3
1.3

By [L4], every integer q has a unique residue j with 0≤j<d modulo d. Thus every integer congruent to x0 modulo n′ is congruent modulo dn′=n to exactly one x0+jn′ with 0≤j<d.

L4
2.1

Every solution x of the reduced congruence is congruent to x0 modulo n′. Indeed, n′∣a′(x−x0); multiplying ua′+vn′=1 by x−x0 shows that n′ divides x−x0. Conversely every x≡x0(modn′) solves the reduced congruence.

step 1.2L2L3
2.2

If 0≤i,j<d and [x0+in′]n=[x0+jn′]n, then dn′∣(i−j)n′, so cancellation gives d∣i−j; uniqueness of the standard representatives modulo d yields i=j. Hence the displayed d classes are distinct.

step 1.3L4
3.1

Steps 1.1 and 1.2 prove the solvability criterion. When it holds, steps 2.1, 1.3 and 2.2 show that the displayed list is exhaustive and contains exactly d distinct solution classes.

step 1.1step 1.2step 2.1step 1.3step 2.2∎
LemmaStatement: AI-adaptedProof: AI-generatedprecheck passaudited 2026-07-31Open item page →

For a finite pairwise-coprime list of positive integers, the product divides every common multiple, and each initial product is coprime to every remaining modulus

Statement

Let n0,…,nr−1 be a finite list of positive integers such that gcd⁡(ni,nj)=1 whenever i≠j. Put Pk:=∏i<kni, with P0=1.

  1. For every k≤j<r, gcd⁡(Pk,nj)=1.
  2. If every ni divides an integer M, then Pr∣M.

The products are finite monoid products (The product g0g1⋯gn−1 of a finite list in a monoid, by recursion, with the empty product (n=0) equal to the identity).

Facts & Assumptions

Given: A natural r, a pairwise-coprime list of positive integers n0,…,nr−1, its initial products Pk, and an integer M divisible by every list member.

[L6]

Induction proves a statement at every natural number from its base case and successor implication (The principle of mathematical induction).

Proof

technique · induction
1.1

Fix k≤j<r. If gcd⁡(Pk,nj)>1, [L2] supplies a prime q dividing this gcd. Then q∣Pk, so [L1] gives an i<k≤j with q∣ni; also q∣nj, contradicting gcd⁡(ni,nj)=1 because i≠j and the positive prime q>1 would divide that gcd. Hence gcd⁡(Pk,nj)=1.

L1L2L5
1.2

At k=0, P0=1 divides M.

baseL4
2.1

Assume Pk∣M for some k<r. The hypothesis gives nk∣M, and step 1.1 gives gcd⁡(Pk,nk)=1; hence [L3] gives Pknk=Pk+1∣M.

ihstep 1.1L3L4
3.1

Induction using steps 1.2 and 2.1 yields Pk∣M for every k≤r, and in particular Pr∣M; together with step 1.1 this proves both clauses.

step 1.1step 1.2step 2.1L6discharge-induction∎
LemmaStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-07-31Open item page →

For coprime positive m,n, every pair of residue classes modulo m and n has a unique simultaneous class modulo mn

Statement

Let m,n be positive integers, a,b∈Z, and d:=gcd⁡(m,n). The simultaneous system

x≡a(modm),x≡b(modn)

is solvable if and only if d∣(a−b). If it is solvable, all its solutions form one congruence class modulo mn/d.

In particular, when m,n are coprime, every pair of classes [a]m,[b]n determines a unique simultaneous class [x]mn. This includes m=1 or n=1.

Facts & Assumptions

Proof

technique · direct
1.1

If x solves both congruences, then m∣(x−a) and n∣(x−b). Since d divides m,n, it divides both differences and therefore their difference b−a; equivalently d∣(a−b).

L1L4
1.2

Conversely suppose d∣(a−b) and write a−b=dc, m=dm′, n=dn′ as in [L2]. Choose u,v with um′+vn′=1 by [L3], put t:=−uc, and set x:=a+mt. Then x≡a(modm), while x−b=(a−b)+dm′t=d(c−m′uc)=dcn′v, so x≡b(modn).

L2L3L4
1.3

If x,y are two solutions, then m∣(x−y), so x−y=dm′q for some integer q. Also n=dn′∣(x−y), hence cancellation of d gives n′∣m′q; multiplying a Bézout identity for m′,n′ by q shows n′∣q. Thus dm′n′=mn/d divides x−y.

L2L3L4
1.4

Conversely, if mn/d=dm′n′ divides x−y, then both m=dm′ and n=dn′ divide x−y, so x and y satisfy exactly the same two residue conditions. Hence, when compatible, the solution set is one class modulo mn/d.

L2L4L5
2.1

When gcd⁡(m,n)=1, one has d=1 and the compatibility condition is automatic; the modulus mn/d is mn, so steps 1.1 through 1.4 give the stated bijection between pairs of residue classes and simultaneous classes. The same proof applies when either modulus is 1.

step 1.1step 1.2step 1.3step 1.4L5∎
TheoremStatement: AI-adaptedProof: AI-adaptedprecheck passaudited 2026-07-31Open item page →

Chinese remainder theorem for a finite pairwise-coprime list: simultaneous residues determine one class modulo the product, and the resulting bijection preserves addition and multiplication

Statement

Let n0,…,nr−1 be a finite pairwise-coprime list of positive integers and let N:=∏i<rni. The map

Φ:Z/N⟶∏i<rZ/ni,[x]N⟼([x]ni)i<r,

is a bijection. It preserves addition, multiplication, [0], and [1] componentwise. For the empty list, N=1 and both sides have one element.

Facts & Assumptions

Given: A natural r, a finite pairwise-coprime list of positive integers n0,…,nr−1, and N:=∏i<rni.

[L1]

Every initial product Pk:=∏i<kni is coprime to nk, and the full product divides every common multiple of all list entries (For a finite pairwise-coprime list of positive integers, the product divides every common multiple, and each initial product is coprime to every remaining modulus).

[L2]

For coprime positive m,n, each pair of residue classes modulo m,n determines exactly one class modulo mn (For coprime positive m,n, every pair of residue classes modulo m and n has a unique simultaneous class modulo mn).

[L5]

A map is bijective exactly when it is both injective and surjective (Injection, surjection, bijection).

[L6]

Induction proves a statement at every natural number from its base case and successor implication (The principle of mathematical induction).

[F1]

The quotient Z/c is the set of congruence classes modulo c (The congruence class [a]n and the quotient set Z/n).

Proof

technique · induction
1.1

For r=0, N=P0=1. The quotient Z/1 has one class because congruence modulo 1 is universal, and the empty Cartesian product has its single empty tuple; hence Φ is a bijection and all componentwise preservation assertions are vacuous.

baseL3L4F1
1.2

Assume the simultaneous-residue assertion for the first k moduli. Given classes modulo the first k+1 moduli, the induction hypothesis supplies a unique class [y]Pk having the first k residues. Since gcd⁡(Pk,nk)=1 by [L1], [L2] supplies a unique class [x]Pknk=[x]Pk+1 reducing to [y]Pk and to the prescribed class modulo nk. It therefore has all prescribed residues.

ihL1L2L3
1.3

If x≡y(modN), every ni divides N and hence divides x−y, so Φ is well defined. For representatives x,y, its ith coordinate sends [x+y]N to [x+y]ni=[x]ni+[y]ni and sends [xy]N to [xy]ni=[x]ni[y]ni; it similarly sends [0]N,[1]N to the componentwise identities.

L3L4
2.1

If two classes modulo Pk+1 have the same first k+1 residues, their representatives have difference divisible by every ni for i<k+1, hence by Pk+1 using [L1]; the two classes are equal. Thus the class constructed in step 1.2 is unique.

ihstep 1.2L1L4
3.1

Induction gives existence and uniqueness for every finite length r. Therefore Φ is surjective and injective, hence bijective by [L5].

step 1.1step 1.2step 2.1L5L6
4.1

Steps 3.1 and 1.3 prove all assertions, including the empty-list boundary case from step 1.1.

step 1.1step 3.1step 1.3discharge-induction∎
CorollaryStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-07-31Open item page →

Euler's totient is multiplicative: gcd⁡(m,n)=1 implies φ(mn)=φ(m)φ(n) for positive m,n

Statement

For positive integers m,n with gcd⁡(m,n)=1,

φ(mn)=φ(m)φ(n).

Thus Euler's totient is multiplicative on coprime positive arguments.

Facts & Assumptions

Given: Coprime positive integers m,n.

[L2]

A unit is an element with a multiplicative inverse, and φ(c) is the cardinality of the unit group modulo the positive integer c (The unit group (Z/n)× and Euler's totient φ(n)=∣(Z/n)×∣ for n≥1).

Proof

technique · direct
1.1

A class u modulo mn is a unit if and only if both components of its CRT image are units: an inverse of u maps to componentwise inverses, while inverses of both components form a pair whose unique CRT preimage multiplies with u to the unique preimage of the identity.

L1L2
2.1

Consequently the CRT bijection restricts to a bijection (Z/(mn))×→(Z/m)××(Z/n)×. Taking finite cardinalities and applying [L3] gives φ(mn)=φ(m)φ(n).

step 1.1L2L3∎
TheoremStatement: AI-adaptedProof: AI-generatedprecheck passaudited 2026-07-31Open item page →

Euler's product formula φ(n)=n∏p∣n(1−1/p)=∏pk∥n(pk−pk−1) for n≥1, stated through a finite injective list of its prime divisors

Statement

Let n≥1, and let p0,…,pr−1 be an injective finite list consisting exactly of the prime divisors of n. Put ki:=vpi(n), so ki≥1. Then

φ(n)=∏i<r(piki−piki−1).

After carrying the natural numbers into Q, the same identity is

φ(n)=n∏i<r(1−1pi).

At n=1 the list is empty, both products are empty products equal to 1, and φ(1)=1. These finite-list formulas are the precise meanings of the two products displayed in the title.

Facts & Assumptions

Given: A positive integer n and an injective finite list p0,…,pr−1 consisting exactly of its prime divisors; ki:=vpi(n).

[L1]

A class modulo n is a unit exactly when its representative is coprime to n, and φ(n) counts the unit classes (For n≥1, [a]n is a unit if and only if gcd⁡(a,n)=1, The unit group (Z/n)× and Euler's totient φ(n)=∣(Z/n)×∣ for n≥1).

[L6]

Natural finite products have empty value 1 and obey the successor recursion (Finite sums and finite products of natural numbers, ∑k<nak and ∏k<nak in N); the integers embed injectively in the field Q, which in turn embeds injectively as an ordered subfield of R (The integers embed in the rationals, The rationals form a field, The rationals embed densely in the reals).

[L7]

Induction is valid on natural numbers (The principle of mathematical induction).

[L10]

Multiplication by a nonzero integer is cancellative (The integers have no zero divisors; multiplicative cancellation).

Proof

technique · direct
1.1

For i<r, let Ai:={a∈X:pi∣a}. Since the pi are distinct primes, they are pairwise coprime by [L8]. For J⊆{0,…,r−1} put qJ:=∏j∈Jpj, with q∅=1. By [L5], the intersection AJ consists exactly of the standard representatives divisible by qJ.

L2L5L8
1.2

A representative a∈X lies outside every Ai exactly when no prime divisor of n divides a. This is equivalent to gcd⁡(a,n)=1: a common divisor greater than 1 would have a prime divisor by [L9], and every such prime would occur in the list. Therefore X∖⋃iAi is precisely the set of unit representatives and has cardinality φ(n).

L1L4L9
1.3

By [L4], n=∏i<rpiki. In Q, finite distributivity and ki≥1 give piki(1−1/pi)=piki−piki−1 for each i, hence n∏i<r(1−1/pi)=∏i<r(piki−piki−1).

L4L6
2.1

The integer qJ divides n by [L4]. Multiplication by qJ bijects the integers t with 0≤t<n/qJ onto AJ: its values lie between 0 and n−1, every member of AJ has the required quotient, and [L10] gives injectivity. Hence ∣AJ∣=n/qJ.

step 1.1L2L4L10
3.1

Inclusion-exclusion applied to steps 1.1, 2.1 and 1.2 gives this equality after embedding its integer and rational terms in R. Both sides come from Q, and the ordered-field embedding Q→R is injective by [L6], so already in Q one has φ(n)=∑J⊆{0,…,r−1}(−1)∣J∣n/qJ.

step 1.1step 2.1step 1.2L3L6
4.1

Finite distributivity gives ∏i<r(1−1/pi)=∑J(−1)∣J∣/qJ: the empty case reads 1=1, and adjoining pr replaces every old term 1/qJ by the pair 1/qJ and −1/(qJpr), indexed respectively by subsets not containing and containing r. Multiplying this identity by n and using step 3.1 yields φ(n)=n∏i<r(1−1/pi).

step 3.1L6L7
5.1

Combining steps 4.1 and 1.3 proves both formulas. When n=1, there are no prime divisors, so the list is empty; the products equal 1 by [L6], and φ(1)=1 by [L1].

step 4.1step 1.3L1L6∎

Remarks

TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-07-31Open item page →

For every positive integer n, ∑d∣n, d>0φ(d)=n

Statement

For every positive integer n,

∑d∣nd>0φ(d)=n.

The sum is over the finite set of positive divisors of n (The sum ∑i∈Sai over a finite index set, and its product form).

Facts & Assumptions

Given: A positive integer n, its standard representative set X:={a∈Z:0≤a<n}, and its positive-divisor set D:={d∈Z:d∣n, d>0}.

[L5]

Integer divisibility gives quotient witnesses, and nonzero integer factors cancel (Divisibility in Z: d∣a when a=dq for some integer q, The integers have no zero divisors; multiplicative cancellation).

Proof

technique · direct
1.1

For each d∈D, put Xd:={a∈X:n/gcd⁡(a,n)=d}. Every a∈X lies in exactly one such block: its positive gcd g=gcd⁡(a,n) divides n, and d=n/g is a positive divisor of n. Thus the Xd form a partition of X.

L2L5
1.2

Fix d∈D and put c:=n/d>0. Multiplication by c sends each standard unit representative u modulo d to a:=cu∈X, because 0≤u<d gives 0≤cu<n; moreover gcd⁡(a,n)=gcd⁡(cu,cd)=cgcd⁡(u,d)=c, so n/gcd⁡(a,n)=d and a∈Xd.

L1L2
1.3

Conversely, if a∈Xd, then gcd⁡(a,n)=n/d=c, so c∣a and a=cu for a unique integer u. The bounds on a give 0≤u<d, and c=cgcd⁡(u,d) by [L2], so cancellation gives gcd⁡(u,d)=1. Thus u is a standard unit representative modulo d.

L1L2L5
2.1

Steps 1.2 and 1.3 are inverse constructions, so ∣Xd∣=φ(d) for every d∈D.

step 1.2step 1.3L1
3.1

The index set D is finite by [L3]. Applying the sum rule to the partition in step 1.1 and using step 2.1 gives n=∣X∣=∑d∈D∣Xd∣=∑d∈Dφ(d).

step 1.1step 2.1L1L3L4∎

Remarks

  • The partition by n/gcd⁡(a,n) is an incidence identity: each residue is assigned to one positive divisor, and the block over d is counted by the units modulo d.
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-07-31Open item page →

For every prime p, the two operations on Z/p make it a field

Statement

For every prime p, the operations of addition and multiplication on Z/p make it a field (Field).

Facts & Assumptions

Given: A prime integer p.

[L1]

Modular addition makes Z/p an abelian group, modular multiplication makes it a commutative monoid, and both distributive laws hold (For every natural n, (Z/n,+) is an abelian group, multiplication is a commutative monoid operation, and both distributive laws hold).

[L3]

For positive modulus p, [a]p is invertible exactly when gcd⁡(a,p)=1 (For n≥1, [a]n is a unit if and only if gcd⁡(a,n)=1).

[L4]

Equality [a]p=[b]p is equivalent to a≡b(modp), which means p∣(a−b) (The congruence class [a]n and the quotient set Z/n, Congruence modulo an integer: a≡b(modn) when n∣(a−b), including the moduli 0 and 1).

[L5]

A field is a commutative ring with 0≠1 in which every nonzero element is multiplicatively invertible (Field).

Proof

technique · direct
1.1

By [L1], all additive, multiplicative, identity, inverse, commutativity, associativity and distributive field axioms already hold except possibly [0]p≠[1]p and invertibility of nonzero classes.

L1L5
1.2

Since p>1, it does not divide 1, so [L4] gives [0]p≠[1]p.

L2L4
1.3

If [a]p≠[0]p, then p∤a by [L4]. Hence gcd⁡(a,p)=1 by [L2], and [L3] makes [a]p invertible.

L2L3L4
2.1

Steps 1.1 through 1.3 verify every clause of [L5], so Z/p is a field.

step 1.1step 1.2step 1.3L5∎
LemmaStatement: AI-adaptedProof: AI-adaptedprecheck passaudited 2026-07-31Open item page →

In (Z/p)×, inversion pairs every class except [1]p and [−1]p, which are the only self-inverse classes

Statement

Let p be prime. In the finite unit group (Z/p)×, inversion partitions all classes other than [1]p and [−1]p into disjoint pairs {u,u−1} with distinct members. The only self-inverse classes are [1]p and [−1]p.

When p=2 these two displayed classes coincide, and the unit group has that single element.

Facts & Assumptions

Proof

technique · direct
1.1

If a unit u is self-inverse, then u2=[1]p, so (u−[1]p)(u+[1]p)=[0]p. In a field a product is zero only if a factor is zero: if the first factor is nonzero, multiply by its inverse. Hence u=[1]p or u=−[1]p=[−1]p.

L1
1.2

Conversely, [1]p2=[1]p and [−1]p2=[1]p, so both displayed classes are self-inverse.

L1
1.3

If p=2, then 2∣(1−(−1)), so [1]2=[−1]2; the unique nonzero standard class is [1]2, and it is the only unit.

L1L2
2.1

On the remaining finite set, inversion has no fixed point by steps 1.1 and 1.2. Since u is an inverse of u−1, uniqueness in [L3] gives (u−1)−1=u. Therefore the inversion orbits are disjoint pairs {u,u−1} with distinct members.

step 1.1step 1.2L2L3
3.1

Steps 1.1 through 2.1 prove the pairing and its boundary case.

step 1.1step 1.2step 2.1step 1.3∎
TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-07-31Open item page →

Wilson's theorem: for every prime p, (p−1)!≡−1(modp)

Statement

For every prime p,

(p−1)!≡−1(modp).

Facts & Assumptions

Given: A prime p.

[L1]

The unit classes modulo p other than [1]p and [−1]p occur in disjoint inverse pairs, while those displayed classes are the only self-inverse ones; at p=2 they coincide (In (Z/p)×, inversion pairs every class except [1]p and [−1]p, which are the only self-inverse classes).

[L4]

Equality of residue classes modulo p is equivalent to congruence modulo p (The congruence class [a]n and the quotient set Z/n), and congruence means divisibility of the difference (Congruence modulo an integer: a≡b(modn) when n∣(a−b), including the moduli 0 and 1).

[L5]

The quotient Z/p is a field, so every nonzero class is a unit (For every prime p, the two operations on Z/p make it a field).

[F1]

Products of residue classes are computed by multiplying representatives: [a]p[b]p=[ab]p (Addition and multiplication on Z/n by [a]n+[b]n=[a+b]n and [a]n[b]n=[ab]n).

Proof

technique · direct
1.1

By [L5], the nonzero classes are exactly the unit classes. Multiply them all and regroup by [L1]: every two-element inverse pair contributes [1]p. If the two displayed self-inverse classes are distinct, their contribution is [1]p[−1]p=[−1]p; if they coincide, their single common contribution is itself [−1]p. Thus in every case the product of all nonzero classes is [−1]p.

L1L3L5
2.1

By [L2] and [F1], that same class product is [(p−1)!]p. Therefore [(p−1)!]p=[−1]p, which is exactly (p−1)!≡−1(modp) by [L4].

step 1.1L2L4F1∎

5 · Examples, counterexamples and false statements

None yet.

Sources