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.
Primes, Euclid's Lemma and the Fundamental Theorem of Arithmetic
1 · Prerequisites
- Binary Operations, Monoids, Groups and Subgroups
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Countability and Uncountability
- Divisibility, Greatest Common Divisors and Bézout's Identity
- Foundations of the Real Numbers for Analysis
- Relations, Functions, and Quotients
- The ZFC Axioms and the Basic Set Constructions
2 · Summary
Divisibility in , Bézout’s identity, the gcd characterisation, and the coprime-divides-product lemma provide the arithmetic background. In particular, If and then ; and if , and then converts coprimality into divisibility of a factor without assuming primality, while The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity supplies the finite-product convention used throughout. Integer order, absolute value, and the natural-number embedding control positivity, signs, induction, and the empty product.
Prime integers and -adic valuations are defined. Euclid’s lemma and its finite-product form lead to existence and uniqueness of prime factorisation and to infinitude of the primes. Canonical factorisation then expresses divisibility, gcd, and lcm through valuations. Finally extends from nonzero integers to nonzero rationals, and the valuation formulas show that a rational th root of an integer is itself an integer.
3 · Logical flowchart
4 · Definitions, theorems and proofs
Prime and composite integers: is prime when and its only positive divisors are and
Definition
Let (The integers as equivalence classes of pairs of naturals), ordered as in Order on the integers, with divisibility as in Divisibility in : when for some integer . Then is prime when
In words: exceeds , and its only positive divisors are and . An integer with that is not prime is composite; unfolding the definition, is composite exactly when and has a positive divisor with and .
Numerals. For the symbol inside means , the embedding of The naturals embed in the integers; in particular and are the ring constants of Arithmetic on the integers.
Boundary values, stated rather than assumed. contains (The natural numbers (von Neumann)) and contains , and the negatives, so the small cases are recorded explicitly. The clause decides all of them at once:
- is not prime, since is false, and not composite either, since composite also requires .
- is not prime, since is false. This is decided by the size clause alone and not by counting divisors: every integer divides (Divisibility in : when for some integer ), so the divisor condition is not what rules out.
- Every negative integer is neither prime nor composite, again because fails. So a prime is in particular positive, and , , are not primes in this library, though each is times one.
Thus "prime" and "composite" between them classify exactly the integers greater than , and nothing else.
The same condition read over all divisors. For the following are equivalent:
- the only positive divisors of are and ;
- the only divisors of are , , and .
That 2 implies 1 is immediate, since of those four only and are positive (, so and ). For the converse let . Since we have , so by If and then and ; hence the set of divisors of a nonzero integer is bounded above by ; and , because is or (The absolute value of an integer) and those two divide together (Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and ). Also and (Absolute value in : ; exactly when ; ; ; ; and exactly when ), so and clause 1 gives or . If then or , by the case split defining ; and if then for a unit (For integers and the following are equivalent: and ; for a unit ; . Being associates is an equivalence relation whose class of is , is a commutative monoid whose group of units is ; equivalently holds exactly for and ), that is or . Both readings are used below without further comment.
Why is excluded, and it is not a matter of taste. The exclusion is forced by the uniqueness half of The fundamental theorem of arithmetic: every integer is a product of primes, and the factorisation is unique up to order — if with every and prime, then and for some , proved on this page: if counted as a prime, a factorisation could be padded with any number of factors , so lists of different lengths would represent the same integer and no permutation could match them. Existence of a factorisation would survive the change; it is uniqueness alone that fixes the convention, and the explicit witness is recorded on the companion page.
Remarks
-
The witness for the exclusion of . The companion page carries it explicitly: If were admitted as a prime, uniqueness would fail: , lists of different lengths that no permutation matches ↗ displays , three lists of lengths , and that no permutation can match.
-
No ring vocabulary is used here, deliberately. In a general commutative ring one distinguishes a prime element from an irreducible element, and in the two notions coincide; that dictionary needs the definition of a ring, which this library develops far above this page, so it is not stated here and nothing below depends on it. What is proved here is the arithmetic content of the coincidence: For an integer : is prime if and only if, for all integers and , implies or shows that for the definition above is equivalent to the property that forces or .
-
Primality is about ; coprimality is about a pair. Coprime integers: is the condition on two integers and needs no primality at all — and are coprime and neither is prime. The bridge in the other direction is For a prime and any integer , is when and otherwise; so makes and coprime, the next item, and it is the only place on this page where primality is converted into coprimality.
For a prime and any integer , is when and otherwise; so makes and coprime
Statement
Let be a prime (Prime and composite integers: is prime when and its only positive divisors are and ) and let . Then
with as in Common divisor, and the greatest common divisor , with the convention and divisibility as in Divisibility in : when for some integer . In particular, if then and are coprime (Coprime integers: ).
Facts & Assumptions
Given: A prime , an integer , and (Common divisor, and the greatest common divisor , with the convention ).
, and every positive divisor of satisfies or (Prime and composite integers: is prime when and its only positive divisors are and ).
unless , in which case ( is symmetric and unchanged by signs: ; moreover , , , and unless ).
Divisibility is reflexive and transitive: for every , and with gives (Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and , Divisibility in : when for some integer ).
exactly when or ( is a commutative monoid whose group of units is ; equivalently holds exactly for and ).
and are coprime exactly when (Coprime integers: ).
The order on is total, antisymmetric and transitive and is compatible with addition; means together with (The integers form a totally ordered ring, Order on the integers).
The embedding is injective, preserves the order, and has as image exactly the nonnegative integers, with and ; and in (The naturals embed in the integers, The natural numbers (von Neumann), The integers as equivalence classes of pairs of naturals).
is a commutative ring: addition is associative and commutative, , and every has an additive inverse , with ; we write for (The integers form a commutative ring, Arithmetic on the integers).
Proof
in : lies in the image of , hence , and because is injective and in .
Suppose . Then is a common divisor of and , since , so .
: adding to both sides of preserves the order, giving .
and , so ; consequently , and in particular .
and : the first because , the second because and the order is transitive.
is a positive divisor of , so or .
In that case : otherwise , forcing or and contradicting step 3.1. So by step 3.2.
Suppose instead . Then , since and would give . So by step 3.2, that is, and are coprime.
Either or , and no third possibility exists, so the two cases above are exhaustive and give the stated value of in each.
Remarks
-
This is the only place on this page where primality becomes coprimality. Every later appeal to Bézout's identity — Euclid's lemma (Euclid's lemma: if is prime and then or ) first among them — runs through this lemma rather than through the definition of a prime, because the published If and then ; and if , and then is stated for coprime integers and uses no primality at all.
-
The hypothesis that is prime is used twice, and both uses are essential: once for , which puts outside the pair where the convention lives and excludes from being a unit, and once for the divisor condition, which is what leaves only the two candidate values and . For a composite the conclusion fails: , which is neither nor , while .
Euclid's lemma: if is prime and then or
Statement
Let be a prime (Prime and composite integers: is prime when and its only positive divisors are and ) and let . If (Divisibility in : when for some integer ) then
Facts & Assumptions
Given: A prime and integers with .
For a prime and any integer : if then (For a prime and any integer , is when and otherwise; so makes and coprime, Common divisor, and the greatest common divisor , with the convention ).
If and then , for all integers (If and then ; and if , and then ).
and are coprime exactly when (Coprime integers: ).
means for some ; divisibility is reflexive and transitive (Divisibility in : when for some integer , Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and ).
is a commutative ring; in particular multiplication is commutative and associative (The integers form a commutative ring, Arithmetic on the integers, The integers as equivalence classes of pairs of naturals).
, and every positive divisor of is or (Prime and composite integers: is prime when and its only positive divisors are and ).
Proof
Suppose . Then the disjunction or holds on its first alternative, and there is nothing further to prove.
Suppose instead . Then , so and are coprime.
Apply [L2] with , and . Its two hypotheses are exactly , which is step 1.2, and , which is given; its conclusion is .
Either or , so the two cases are exhaustive; in the first and in the second , which is the assertion.
Remarks
-
This is a two-line consequence, and that is the point. The work was done one page earlier: If and then ; and if , and then proves that together with forces , and its own Remarks record that "no primality is used" in it — the proof is pure Bézout. The summary of the page carrying it says in as many words that "primes, Euclid's lemma and unique factorisation are not proved here; they belong to a later page". This is that page, and the only new ingredient is For a prime and any integer , is when and otherwise; so makes and coprime, which converts primality into the coprimality that lemma actually consumes.
-
The hypothesis cannot be weakened to . For a composite modulus the conclusion fails, and the published witness is while and : dividing a product does not force dividing a factor, and the coprimality hypothesis is what fails: while and . Its Remarks identify the failure as exactly the failure of coprimality, which is what primality supplies here.
-
The converse holds too. For the property proved here characterises primality; that is For an integer : is prime if and only if, for all integers and , implies or , next on this page.
For an integer : is prime if and only if, for all integers and , implies or
Statement
Let with . The following are equivalent:
- is prime (Prime and composite integers: is prime when and its only positive divisors are and );
- for all , implies or (Divisibility in : when for some integer ).
Facts & Assumptions
Given: An integer with .
is prime exactly when and every positive divisor of satisfies or (Prime and composite integers: is prime when and its only positive divisors are and ).
If is prime and then or (Euclid's lemma: if is prime and then or ).
and together hold exactly when , and exactly when for a unit (For integers and the following are equivalent: and ; for a unit ; . Being associates is an equivalence relation whose class of is , is a commutative monoid whose group of units is ; equivalently holds exactly for and ).
exactly when or ( is a commutative monoid whose group of units is ; equivalently holds exactly for and ).
means for some ; divisibility is reflexive (Divisibility in : when for some integer , Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and ).
is a commutative ring: multiplication is associative and commutative, , and every has an additive inverse (The integers form a commutative ring, Arithmetic on the integers, The integers as equivalence classes of pairs of naturals).
The order on is total, antisymmetric and transitive and is compatible with addition; means together with (The integers form a totally ordered ring, Order on the integers).
The embedding is injective, preserves the order, and has as image exactly the nonnegative integers, with and ; and in (The naturals embed in the integers, The natural numbers (von Neumann)).
Proof
: lies in the image of , so , and because is injective and in . Adding throughout gives .
Claim 1 implies claim 2: if is prime this is exactly [L2].
Assume claim 2, and let be a positive divisor of ; fix with .
, so and .
Then , since and ; so claim 2 applied with and gives or .
Suppose . Since also , [L3] gives , hence for a unit . If then , contradicting ; so and .
Suppose instead , and fix with . Then , and , so cancellation gives . Hence , so or , and leaves .
By step 2.2 one of the two cases occurs, so every positive divisor of satisfies or ; together with the standing hypothesis this says is prime, so claim 2 implies claim 1.
The two implications of steps 1.2 and 4.1 give the equivalence.
Remarks
-
Both directions need , and it is a standing hypothesis rather than part of either claim. Claim 2 alone does not force primality: satisfies it vacuously, since for every , and so does , because forces and hence or (The integers have no zero divisors; multiplicative cancellation). Neither is prime, and the clause of Prime and composite integers: is prime when and its only positive divisors are and is what excludes them.
-
The two halves of the equivalence are the two notions a general theory keeps apart. Claim 1 says cannot be split into smaller positive factors; claim 2 says , when it divides a product, already divides a factor. In they coincide, and that coincidence is what makes unique factorisation work; the counterexample In the multiplicative monoid of positive integers one more than a multiple of , the element has two genuinely different factorisations into irreducibles, and ↗ on the companion page shows what fails in a setting where the analogue of claim 1 holds and the analogue of claim 2 does not.
If a prime divides a finite product of integers then for some ; at the product is and the hypothesis cannot hold
Statement
Let be a prime (Prime and composite integers: is prime when and its only positive divisors are and ), let , and let , with the finite product taken in the commutative monoid of is a commutative monoid whose group of units is ; equivalently holds exactly for and as in The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity. If
then for some .
At the product is the empty product , and is impossible for a prime, so the hypothesis is never satisfied there and the assertion is true rather than excluded. Since depends only on (The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity), the statement applies verbatim to a finite list .
Facts & Assumptions
Given: A prime ; the property : "for every family , if then for some ".
is a commutative monoid, and holds exactly for and ( is a commutative monoid whose group of units is ; equivalently holds exactly for and , Semigroup and monoid).
In a monoid, and ; the value depends only on (The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity).
If is prime and then or (Euclid's lemma: if is prime and then or ).
Induction: a property holding at and inherited by successors holds at every natural number (The principle of mathematical induction).
On : , and exactly when (On the order is membership: , The natural numbers (von Neumann)).
The order on is total, antisymmetric and transitive and is compatible with addition (The integers form a totally ordered ring, Order on the integers); is a commutative ring (The integers form a commutative ring, Arithmetic on the integers, The integers as equivalence classes of pairs of naturals).
The embedding is injective, preserves the order, and has as image exactly the nonnegative integers, with and ; and in (The naturals embed in the integers).
Proof
, since is nonnegative and by injectivity of ; adding gives . Hence , so and .
Let and assume .
Let and suppose . By the recursion clause this product equals , so [L3] gives or .
holds: for every family , and would force or , which step 1.1 excludes. So the hypothesis of is never satisfied and is true vacuously.
In the first case step 1.2 supplies with , and gives ; in the second case works, since . Either way some has , so holds.
holds and implies for every , so holds for every .
Remarks
-
The case is real and is not an exception. The empty product is by The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity, and a prime never divides , so the implication holds with a false hypothesis. Stating the corollary from upwards would be a weaker theorem for no gain, and would have to be repaired at every use.
-
No commutativity is used. The proof consumes only the recursion clause and Euclid's lemma; the monoid is named commutative only because is, and because later items on this page do use commutativity.
-
A prime dividing a product of primes equals one of them. If every is prime and , then for some , and then is a positive divisor of the prime other than , so by Prime and composite integers: is prime when and its only positive divisors are and . That one-line consequence is the engine of the uniqueness half of The fundamental theorem of arithmetic: every integer is a product of primes, and the factorisation is unique up to order — if with every and prime, then and for some .
Every integer has a prime divisor; indeed the least divisor of that exceeds is prime
Statement
Let with , and put
(Divisibility in : when for some integer ). Then is nonempty and has a least element , and is prime (Prime and composite integers: is prime when and its only positive divisors are and ). In particular every integer greater than has a prime divisor.
Facts & Assumptions
Given: An integer with , and the set above.
Divisibility is reflexive and transitive (Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and ).
A nonempty set of integers with a lower bound has a unique least element (A nonempty set of integers bounded above has a greatest element, and a nonempty set of integers bounded below has a least element).
is prime exactly when and every positive divisor of is or (Prime and composite integers: is prime when and its only positive divisors are and ).
The order on is total, antisymmetric and transitive and is compatible with addition; means together with (The integers form a totally ordered ring, Order on the integers).
The embedding is injective, preserves addition and order, and has as image exactly the nonnegative integers, with and (The naturals embed in the integers).
On : for every , since (Order on the natural numbers); exactly when (Discreteness: is the immediate successor); and (The natural numbers (von Neumann)).
Proof
in : lies in the image of , so , and because is injective and .
Discreteness: if and then . Indeed , so for some ; since ; hence in , so , and applying the order-preserving gives .
, since and ; so is nonempty.
is a lower bound for : every satisfies , hence .
By [L3] the set has a unique least element : that is, , , and for every .
and , so and , and .
Let be a positive divisor of with . Then by step 1.2, and , so .
Also and , so by transitivity; with this gives , hence .
On the other hand with gives , and because ; so . With step 4.1 and antisymmetry, .
So every positive divisor of is or , and : is prime. Since , the integer has a prime divisor.
Remarks
-
Well-ordering is used through the integer bridge, not directly. The well-ordering principle gives a least element of a nonempty subset of , whereas is a set of integers. A nonempty set of integers bounded above has a greatest element, and a nonempty set of integers bounded below has a least element is the published lemma that crosses that gap, and its Statement covers the lower-bound case explicitly, so it is what this proof cites.
-
The bound is genuinely the least divisor above , not merely some prime divisor. That is what makes the argument work: minimality is the only reason has no proper divisor above , since any such divisor would divide as well and be smaller.
-
The hypothesis cannot be dropped. At the set is empty, since forces or ( is a commutative monoid whose group of units is ; equivalently holds exactly for and ) and neither exceeds ; so has no prime divisor, which is exactly why the empty product is the right factorisation of in Every integer is a finite product of primes: there are and a list of primes with , the case being the empty product. At every integer divides , so is the whole set of integers greater than ; it does have a least element, namely , but a statement about the divisors of is of no use below and the lemma is not claimed there.
Every integer is a finite product of primes: there are and a list of primes with , the case being the empty product
Statement
Write finite products in the commutative monoid of is a commutative monoid whose group of units is ; equivalently holds exactly for and , as in The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity; a list of primes of length means a function on the von Neumann natural with every prime (Prime and composite integers: is prime when and its only positive divisors are and ).
-
Existence. For every with there are and a list of primes with
At this holds with : the empty product is , so is a product of primes, of no primes at all, and needs no separate clause.
-
Every such product is at least . Conversely, for every and every list of primes, . So the integers of clause 1 are exactly the values of finite products of primes.
Facts & Assumptions
Given: The commutative monoid ( is a commutative monoid whose group of units is ; equivalently holds exactly for and , Semigroup and monoid); the embedding of The naturals embed in the integers; and the property : "if then for some and some list of primes".
and ; the value depends only on , so a list determines (The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity).
Every integer has a prime divisor (Every integer has a prime divisor; indeed the least divisor of that exceeds is prime, Divisibility in : when for some integer ).
Strong induction: if for every the truth of below implies , then holds everywhere on (Strong (complete) induction).
Induction: a subset of containing and closed under is (The principle of mathematical induction).
is injective, preserves addition, multiplication and order, and its image is exactly the nonnegative integers, with and (The naturals embed in the integers, The integers as equivalence classes of pairs of naturals).
Every prime satisfies (Prime and composite integers: is prime when and its only positive divisors are and ).
The order on is total, antisymmetric and transitive, is compatible with addition, and positives are closed under multiplication (The integers form a totally ordered ring, Order on the integers).
is a commutative ring: multiplication is associative and commutative, , , multiplication distributes over addition, and every has an additive inverse , with and ; we write for (The integers form a commutative ring, Arithmetic on the integers).
On : for every (Order on the natural numbers); exactly when (Discreteness: is the immediate successor); (The natural numbers (von Neumann)); and , with exactly when (On the order is membership: ).
Proof
in : lies in the image of , so , and because is injective and .
Discreteness: if and then . Indeed , so for some ; since ; so in , hence , and applying the order-preserving gives .
Let and assume for every .
Clause 2. Let be the set of such that for every list of primes. Then , the empty product being . If and is a list of primes, then , where the restriction of to is again a list of primes, so the first factor is ; and ; positives being closed under multiplication the product is , hence by step 1.2. So , and .
holds vacuously: and is false, since .
Suppose and write ; by totality either or . If , take : the empty list is a list of primes and , so holds.
Suppose instead . Fix a prime with and an integer with .
: would give , and would give , hence , that is and ; both contradict . So and therefore by step 1.2.
: since we have , and , so ; and , whence and .
As , write with . Then : otherwise , and preserving the order would give , contradicting step 5.1.
By step 1.3 applied to there are and a list of primes with .
Define by for and ; every value is prime, and , the middle equality because the product over depends only on , which agree with . So holds with .
Steps 2.3 and 8.1 cover the two possibilities for , so follows from the truth of below ; with step 2.2 as the case , strong induction gives for every .
Finally, any satisfies , so for some , and is clause 1 for that ; clause 2 is step 2.1.
Remarks
-
is a product of primes here, and this is not a dodge. The empty product is the identity of the monoid by The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity, so gives the value exactly. Excluding and starting at would force a special case into every later statement, including The fundamental theorem of arithmetic: every integer is a product of primes, and the factorisation is unique up to order — if with every and prime, then and for some , whose uniqueness clause at is precisely the assertion that only the empty list represents .
-
Uniqueness is a separate theorem and is not proved here. Existence needs only a least prime divisor and a descent; uniqueness needs Euclid's lemma. In the multiplicative monoid of positive integers one more than a multiple of , the element has two genuinely different factorisations into irreducibles, and ↗ on the companion page exhibits a setting where the existence half holds and the uniqueness half fails, which is what shows the two halves are genuinely independent.
-
The list is appended to, not prepended to. The successor clause of The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity multiplies on the right, so putting the new prime at position costs nothing, whereas putting it at position would need the splitting law of Generalised associativity: in a monoid the product of a finite list does not depend on the bracketing, and in a commutative monoid it does not depend on the order of the factors either. Order is irrelevant to the value, by the commutative clause of that theorem, so nothing is lost.
The fundamental theorem of arithmetic: every integer is a product of primes, and the factorisation is unique up to order — if with every and prime, then and for some
Statement
Finite products are taken in the commutative monoid of is a commutative monoid whose group of units is ; equivalently holds exactly for and as in The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity, and a list of primes of length is a function on the von Neumann natural with every prime (Prime and composite integers: is prime when and its only positive divisors are and ).
-
Existence. Every with is for some and some list of primes of length (Every integer is a finite product of primes: there are and a list of primes with , the case being the empty product).
-
Uniqueness up to order. Let and be lists of primes, of lengths and . If
then , and there is a permutation (The symmetric group : the bijections of a set under composition) with
At clause 2 says that the only list of primes whose product is is the empty list, and the permutation condition is vacuous.
Facts & Assumptions
Given: The commutative monoid ( is a commutative monoid whose group of units is ; equivalently holds exactly for and , Semigroup and monoid); and the property : "for every and all lists , of primes of lengths and with , one has and for all , for some ".
and ; the value depends only on (The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity).
Commutative case of generalised associativity: for a commutative monoid, , and with for , one has (Generalised associativity: in a monoid the product of a finite list does not depend on the bracketing, and in a commutative monoid it does not depend on the order of the factors either).
If a prime divides then for some (If a prime divides a finite product of integers then for some ; at the product is and the hypothesis cannot hold, Euclid's lemma: if is prime and then or ).
Every prime satisfies , and every positive divisor of a prime is or (Prime and composite integers: is prime when and its only positive divisors are and ).
is the set of bijections under composition, with identity ; it is closed under composition, and for in the transposition is a permutation of with (The symmetric group : the bijections of a set under composition, is a group under composition, and it is non-abelian whenever has at least three distinct elements, Injection, surjection, bijection).
Induction on (The principle of mathematical induction).
On : , , , exactly when , and (On the order is membership: , The natural numbers (von Neumann)).
Every natural number other than is a successor (Every nonzero natural number is a successor).
The order on is total, antisymmetric and transitive and is compatible with addition; is a commutative ring (The integers form a totally ordered ring, Order on the integers, The integers form a commutative ring, Arithmetic on the integers, The integers as equivalence classes of pairs of naturals).
is injective, preserves the order, and has as image the nonnegative integers, with , (The naturals embed in the integers).
Proof
: is nonnegative and differs from by injectivity of . Hence every prime satisfies , so , and, adding to , also .
If is a list of primes of length then , where : indeed the product equals .
Let and assume .
Let be a list of primes of length and one of length , with . Then , so .
A prime never divides : would force or , both excluded by step 1.1.
By [L3] there is with . Since , is a positive divisor of the prime other than , so .
holds. Let be a list of primes of length with , so . If , then and step 1.2 gives , contradicting step 2.1; so . Then , since , and the condition " for all " is vacuous.
: otherwise and , contradicting step 2.1. Write .
Define by if and otherwise; in both cases is a permutation of with and . Note and , so both lie in .
Put for ; every is prime, and by the commutative clause [L2], the monoid being commutative.
Also , so .
Comparing with step 1.4, , and by step 1.1, so cancellation gives .
The restrictions of to and of to are lists of primes of lengths and , and their products are the two sides of step 7.1, since a finite product depends only on the entries it names. So applies: , hence , and there is with for every .
Define by for and . Since with , and is a bijection of , the map is a bijection of , that is .
Put , a permutation of because is closed under composition.
For we get . If then ; and if then . Since these two possibilities are exhaustive, so throughout.
Steps 8.1 and 11.1 give and a permutation with for all , so holds; with step 3.1 as base, induction gives for every , which is clause 2. Clause 1 is Every integer is a finite product of primes: there are and a list of primes with , the case being the empty product.
Remarks
-
"Unique up to order" is spelt out, not gestured at. The symmetric group : the bijections of a set under composition is available at this point in the library, so the uniqueness clause names a permutation of the von Neumann natural and asserts an equality for every index, rather than saying the two factorisations "agree up to rearrangement". The letter is used because is already the successor function on throughout this library.
-
The theorem is stated for . It is not stated for , which would exclude the empty product and gain nothing, and it is not stated for all nonzero , which is false as it stands because a negative integer is not a product of primes. The signed form is Every nonzero integer is with and every prime; and are determined by , and the list is determined up to a permutation, where the sign is carried by a unit.
-
Where each hypothesis is used. Primality of lets If a prime divides a finite product of integers then for some ; at the product is and the hypothesis cannot hold supply the index , and also makes a nonzero factor different from . Primality of the selected is then used separately in step 2.2: the positive divisor , being different from , must equal . Drop Euclid's lemma and the argument collapses before that comparison — In the multiplicative monoid of positive integers one more than a multiple of , the element has two genuinely different factorisations into irreducibles, and ↗ is the witness.
-
Reading the theorem by exponents. Collecting equal primes turns clause 2 into For and any injective list of primes containing every prime divisor of , one has ; the exponents are determined by , and for every prime outside the list, which records the multiplicity of each prime as its -adic valuation. That is the same theorem in different notation, not a further result.
Every nonzero integer is with and every prime; and are determined by , and the list is determined up to a permutation
Statement
Let with , and take finite products in the commutative monoid of is a commutative monoid whose group of units is ; equivalently holds exactly for and , as in The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity.
-
Existence. There are , and a list of primes (Prime and composite integers: is prime when and its only positive divisors are and ) with
-
Uniqueness. If also with and a list of primes, then , , and for every , for some (The symmetric group : the bijections of a set under composition).
Facts & Assumptions
Given: A nonzero integer .
Every integer is for some and some list of primes; and conversely every such product is (Every integer is a finite product of primes: there are and a list of primes with , the case being the empty product, The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity, is a commutative monoid whose group of units is ; equivalently holds exactly for and , Semigroup and monoid).
If for lists of primes, then and for all , for some (The fundamental theorem of arithmetic: every integer is a product of primes, and the factorisation is unique up to order — if with every and prime, then and for some , The symmetric group : the bijections of a set under composition).
when and when (The absolute value of an integer); , exactly when , and (Absolute value in : ; exactly when ; ; ; ; and exactly when ).
is a commutative ring: multiplication is associative and commutative, , , and every has an additive inverse, with (The integers form a commutative ring, Arithmetic on the integers, The integers as equivalence classes of pairs of naturals).
The order on is total, antisymmetric and transitive and is compatible with addition (The integers form a totally ordered ring, Order on the integers).
is injective, preserves the order, and has as image exactly the nonnegative integers, with and (The naturals embed in the integers).
On : for every (Order on the natural numbers); exactly when (Discreteness: is the immediate successor); (The natural numbers (von Neumann)).
Proof
, since is nonnegative and differs from by injectivity; and if then , because with , so and preserves the order.
and , so and hence .
For uniqueness, suppose where and and . By [L1] both and , so both are positive and , .
By [L1] there are and a list of primes of length with .
Taking absolute values, and likewise , since and . Hence .
The order is total and , so or . If then and ; if then , so . In both cases clause 1 holds, with and respectively.
By [L2] applied to we get and a permutation with for every .
And with , since ; cancellation gives .
Clause 1 is step 4.1 and clause 2 is steps 4.2 and 4.3.
Remarks
-
This is why Prime and composite integers: is prime when and its only positive divisors are and can insist on without loss. The sign of is carried by the unit , not by the primes, so admitting negative primes would buy nothing and would break uniqueness, since and would be different lists with the same product.
-
The uniqueness of needs , and that is why the empty product is harmless. At the statement reads , so the nonzero integers with an empty prime list are exactly and — which is is a commutative monoid whose group of units is ; equivalently holds exactly for and again, from a different direction.
-
Nothing is claimed at . Zero is divisible by every prime and is not a product of primes times a unit at all, since every such product is or times a positive integer. It is excluded by hypothesis, not overlooked.
Euclid's theorem: for every and every list of primes there is a prime not among ; consequently the set of primes is not finite
Statement
Write (Prime and composite integers: is prime when and its only positive divisors are and ), and take finite products in the commutative monoid of is a commutative monoid whose group of units is ; equivalently holds exactly for and as in The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity.
- For every and every list of primes there is a prime with for every .
- Consequently is not finite: there is no with (Finite, countably infinite, countable, uncountable, Equinumerous sets, and ).
Clause 1 holds at as well, where the empty product is and the witness produced by the proof is a prime divisor of .
Facts & Assumptions
Given: The set of primes.
Every finite product of primes is (Every integer is a finite product of primes: there are and a list of primes with , the case being the empty product).
Every integer has a prime divisor (Every integer has a prime divisor; indeed the least divisor of that exceeds is prime).
Every prime satisfies (Prime and composite integers: is prime when and its only positive divisors are and ).
exactly when or ( is a commutative monoid whose group of units is ; equivalently holds exactly for and ).
Divisibility is reflexive and transitive, and is linear: and give , in particular (Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and , Divisibility in : when for some integer ).
is a commutative ring: addition and multiplication are associative and commutative, , , and every has an additive inverse (The integers form a commutative ring, Arithmetic on the integers, The integers as equivalence classes of pairs of naturals).
The order on is total, antisymmetric and transitive and is compatible with addition (The integers form a totally ordered ring, Order on the integers); is injective, preserves the order, and has as image the nonnegative integers, with , (The naturals embed in the integers, The natural numbers (von Neumann)).
On : exactly when (Discreteness: is the immediate successor); means for some (Order on the natural numbers, Addition of natural numbers); and with (On the order is membership: ).
A function is injective when it identifies no two points, surjective when its image is the whole codomain, and bijective when it is both (Injection, surjection, bijection); means a bijection exists, and is finite when for some (Equinumerous sets, and , Finite, countably infinite, countable, uncountable).
Proof
in , since is nonnegative and differs from by injectivity of ; adding gives .
Fix and a list of primes, and put and .
Suppose, for contradiction, that is finite: fix and a bijection .
by [L3], so by compatibility of the order with addition.
Suppose, for contradiction, that for some . Since we have , so for some .
Define by letting be the unique with ; such an exists because is surjective and is unique because is injective. Then is a list of primes of length , and for every .
By [L4] there is a prime with .
The splitting law then gives , and ; by associativity and commutativity where . Hence , that is .
So and , whence by linearity, forcing or and contradicting . Therefore for every , which is clause 1.
Clause 1 applied to supplies a prime with for every . But , so and , a contradiction. Hence no such and exist and is not finite, which is clause 2.
Remarks
-
The theorem does not say is prime, and reading it that way is a common slip. What is proved is that has a prime divisor, and that this divisor is not on the list. The false reading is refuted on the companion page by FALSE: for every finite list of distinct primes, is prime ↗, where .
-
Clause 1 is the constructive statement and clause 2 is a consequence of it. Clause 1 says nothing about infinite sets and needs no notion of cardinality; it just extends any finite list. Clause 2 turns that into "not finite" in the sense of Finite, countably infinite, countable, uncountable, and the only input it needs is that a bijection produces a list enumerating every prime.
-
This is not a statement about where the primes are. Arbitrarily long runs of composite integers exist (For every there are consecutive composite integers: with , each of is composite ↗), so the gaps between consecutive primes are unbounded; the two facts are compatible and neither weakens the other.
The -adic valuation of a nonzero integer: the greatest with
Definition
Let be a prime (Prime and composite integers: is prime when and its only positive divisors are and ) and let with . Powers for are the natural powers of Powers : natural exponents in a monoid and integer exponents in a group, with taken in the commutative monoid of is a commutative monoid whose group of units is ; equivalently holds exactly for and and Semigroup and monoid, so that
Put
(Divisibility in : when for some integer ). Then has a greatest element, and the -adic valuation of is
the greatest with .
Why a greatest element exists. Three facts are needed, and each is proved here rather than assumed.
The set is nonempty. and for every (Divisibility in : when for some integer ), so .
Every power of exceeds its own exponent. We claim and for every , where is the embedding of The naturals embed in the integers. Both are proved by induction (The principle of mathematical induction). At we have and , using , which holds because is nonnegative and differs from by injectivity of . Assume both at . Since we have , hence by discreteness of the order on (Discreteness: is the immediate successor, The naturals embed in the integers: an integer is with , so and ). Therefore , because and positives are closed under multiplication (The integers form a totally ordered ring); so . The same discreteness applied to gives , and because in (Addition of natural numbers) and preserves addition; so . The induction is complete.
The set is bounded. Let . Then with , so (If and then and ; hence the set of divisors of a nonzero integer is bounded above by ); and gives (The absolute value of an integer, Absolute value in : ; exactly when ; ; ; ; and exactly when ). Combining with the previous paragraph, . So the set of integers is nonempty and bounded above by , hence has a unique greatest element (A nonempty set of integers bounded above has a greatest element, and a nonempty set of integers bounded below has a least element). That greatest element lies in the set, so it is for some ; and since is injective and preserves the order in both directions, is the greatest element of and is unique. We set .
is left undefined. Every power of divides (Divisibility in : when for some integer ), so has no greatest element and the clause above defines nothing. Every statement about in this library therefore carries the hypothesis explicitly. The convention is not adopted: it would need a value set enlarging by a greatest element in which to place , and no such set is available at this point in the reading order. The library does build a totally ordered set with a greatest element — the extended real line, whose greatest element is — but it is constructed far above this page, and taking the values of there would make a definition about rest on the construction of .
Remarks
-
is a natural number, not an integer. It is a von Neumann natural (The natural numbers (von Neumann)), which is exactly what the exponent slot of Powers : natural exponents in a monoid and integer exponents in a group, with takes, so is meaningful without any translation. Where a valuation has to be subtracted from another, as in The -adic valuation extends to the nonzero rationals by , independently of the representation; it satisfies , and whenever , and are nonzero, the values are first carried into along (The naturals embed in the integers).
-
These are monoid powers, and deliberately not Integer powers . That definition is stated for an element of the ambient ordered field ; using it here would make a statement about rest on the whole construction of the real numbers for no gain. The two agree along the embeddings , since both are defined by the same recursion , and the embeddings preserve products and the constant ; nothing on this page depends on that observation, and it is recorded here only so the reader does not think a second notion of power has been introduced.
-
The definition is by a maximum, and For a prime and a nonzero integer : and ; holds exactly for ; exactly when ; ; and converts it into the form later proofs use: , , and with .
For a prime and a nonzero integer : and ; holds exactly for ; exactly when ; ; and
Statement
Let be a prime (Prime and composite integers: is prime when and its only positive divisors are and ), let with , and write (The -adic valuation of a nonzero integer: the greatest with ). Powers are the natural powers of Powers : natural exponents in a monoid and integer exponents in a group, with in the commutative monoid ( is a commutative monoid whose group of units is ; equivalently holds exactly for and ), and means . Then:
- for every ; in particular and ;
- and ;
- for : if and only if ;
- for some with and ;
- if and only if ;
- and .
Facts & Assumptions
Given: A prime , a nonzero integer , and .
is the greatest with ; in particular , and fails for every (The -adic valuation of a nonzero integer: the greatest with ).
Exponent law in a monoid, for natural exponents: (Exponent laws in a group: and for all , and when and commute).
Divisibility is reflexive and transitive; implies ; and , , are equivalent (Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and ).
means for some (Divisibility in : when for some integer ).
exactly when or ( is a commutative monoid whose group of units is ; equivalently holds exactly for and ).
Every prime satisfies (Prime and composite integers: is prime when and its only positive divisors are and ).
If and then ; and a product of two nonzero integers is nonzero (The integers have no zero divisors; multiplicative cancellation).
On : means for some (Order on the natural numbers); (Addition of natural numbers, The natural numbers (von Neumann)); and exactly when (On the order is membership: ); exactly when (Discreteness: is the immediate successor); and is a linear order, so it is antisymmetric and total ( is a linear order on ).
is a commutative ring, its order is total, antisymmetric and transitive and compatible with addition, and is injective, order preserving, with image the nonnegative integers and , (The integers form a commutative ring, Arithmetic on the integers, The integers as equivalence classes of pairs of naturals, The integers form a totally ordered ring, Order on the integers, The naturals embed in the integers).
Induction on : a subset containing and closed under is all of (The principle of mathematical induction).
Proof
.
in , since is nonnegative and differs from ; hence , and .
Clause 1. by [L1], and , so would contradict the maximality of ; hence .
Clause 2, the other direction. If then belongs to the set of which is the greatest element, so .
Clause 0: for every . The set of such contains , since ; and if then has both factors , so the product is positive, hence by discreteness of the order on (a positive integer is with , so and ). By induction the set is all of , and in particular and .
Clause 2, one direction. Let and write with . Then , so ; with and transitivity, .
Clause 3. By [L1] fix with . Then , since . If , say , then , so , contradicting step 1.3. Hence .
If then : write , so .
Clause 4. If then by step 2.2. Conversely if then , so by step 1.4.
. If with , then by step 2.4 and transitivity, so or , contradicting step 1.2. So no satisfies , while ; the greatest such is .
. First , so by step 1.4 applied to . Next , where : otherwise for some , and cancelling gives , so , contradicting step 1.2. Hence by step 2.2, that is , and antisymmetry gives .
, because holds exactly when , so the two sets of exponents coincide.
Clauses 0 to 5 are established.
Remarks
-
Clause 3 is the working form. Every later proof on this page writes a nonzero integer as with and then argues about ; that is how for nonzero integers , and whenever , and are all nonzero gets additivity, and it is where Euclid's lemma enters.
-
The hypothesis is carried everywhere because is not defined: every power of divides , so there is no greatest exponent (The -adic valuation of a nonzero integer: the greatest with ).
-
Clause 2 says the exponents form an initial segment, which is what makes "the greatest with " the same as "the number of times divides ". Without it the maximum could in principle skip values.
for nonzero integers , and whenever , and are all nonzero
Statement
Let be a prime (Prime and composite integers: is prime when and its only positive divisors are and ) and let be nonzero, with as in The -adic valuation of a nonzero integer: the greatest with . Then and
the sum taken in (Addition of natural numbers). If moreover , then
the minimum of two natural numbers, which exists because the order on is total ( is a linear order on ).
Facts & Assumptions
Given: A prime and nonzero integers ; and .
For a nonzero : , and for some nonzero with ; moreover holds exactly for (For a prime and a nonzero integer : and ; holds exactly for ; exactly when ; ; and , The -adic valuation of a nonzero integer: the greatest with ).
Exponent law in a monoid for natural exponents: (Exponent laws in a group: and for all , and when and commute, Powers : natural exponents in a monoid and integer exponents in a group, with , Semigroup and monoid, is a commutative monoid whose group of units is ; equivalently holds exactly for and ).
If is prime and then or (Euclid's lemma: if is prime and then or ).
Divisibility is linear: and give , in particular (Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and ); means for some (Divisibility in : when for some integer ).
A product of two nonzero integers is nonzero, and with gives (The integers have no zero divisors; multiplicative cancellation).
is a commutative ring: multiplication is associative and commutative and (The integers form a commutative ring, Arithmetic on the integers, The integers as equivalence classes of pairs of naturals); its order is total, antisymmetric and transitive (The integers form a totally ordered ring, Order on the integers, The naturals embed in the integers).
On : is a linear order, so any two naturals are comparable and have a minimum ( is a linear order on ); means for some (Order on the natural numbers); (Addition of natural numbers, The natural numbers (von Neumann)); exactly when (Discreteness: is the immediate successor), and exactly when (On the order is membership: ).
Proof
, so is defined.
Fix and with , , both nonzero, and , .
Now assume also , and put , which exists because is total on ; then and .
, using commutativity, associativity and the exponent law.
: otherwise [L3] would give or , both excluded by step 1.2.
By [L1], and , so by linearity; since , [L1] applied to gives , which is the second assertion.
, since and would otherwise be .
by step 2.1, so .
Suppose . Then , so ; fix with , using the exponent law. Cancelling against step 2.1 gives , that is , contradicting step 2.2.
Hence by totality and antisymmetry of the order on , which is the first assertion.
Both assertions are established.
Remarks
-
Primality is used exactly once, at step 2.2, and it is used through Euclid's lemma: if is prime and then or . That is the whole reason the additivity of is a theorem about primes and not about arbitrary integers greater than : for a composite base the analogue fails, and the companion page of the divisibility page already carries the failure of the product principle ( while and : dividing a product does not force dividing a factor, and the coprimality hypothesis is what fails).
-
The second clause is an inequality and cannot be an equality. Take , , : then while . The companion page's worked example computes such valuations explicitly ( and , with and read off the exponents ↗).
-
The minimum is taken in , through is a linear order on , not through the library's Maximum and minimum of a set, which is stated for real numbers. The values of are natural numbers, so no passage to is needed or wanted here.
For and any injective list of primes containing every prime divisor of , one has ; the exponents are determined by , and for every prime outside the list
Statement
Powers are the natural powers of Powers : natural exponents in a monoid and integer exponents in a group, with and finite products those of The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity, both taken in the commutative monoid of is a commutative monoid whose group of units is ; equivalently holds exactly for and . Call an injective list of primes when every is prime (Prime and composite integers: is prime when and its only positive divisors are and ) and forces (Injection, surjection, bijection).
Let with and let be an injective list of primes such that every prime divisor of equals for some . Then, with as in The -adic valuation of a nonzero integer: the greatest with :
- ;
- for every prime that is not among ;
- the exponents are determined by : if and , then for every .
Clause 3 needs only injectivity of the list, not the covering hypothesis.
Facts & Assumptions
Given: The commutative monoid ( is a commutative monoid whose group of units is ; equivalently holds exactly for and , Semigroup and monoid); and the property : "for every and every injective list of primes containing every prime divisor of , one has ".
and ; the value depends only on the entries named (The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity).
and ; and for natural exponents in a monoid (Powers : natural exponents in a monoid and integer exponents in a group, with , Exponent laws in a group: and for all , and when and commute).
For a prime and nonzero : for every , so and ; with and ; exactly for ; exactly when ; ; and (For a prime and a nonzero integer : and ; holds exactly for ; exactly when ; ; and , The -adic valuation of a nonzero integer: the greatest with ).
For a prime and nonzero : and ( for nonzero integers , and whenever , and are all nonzero).
Every integer has a prime divisor (Every integer has a prime divisor; indeed the least divisor of that exceeds is prime); every prime satisfies , and every positive divisor of a prime is or (Prime and composite integers: is prime when and its only positive divisors are and ).
Divisibility is reflexive and transitive; means for some (Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and , Divisibility in : when for some integer ).
Induction on (The principle of mathematical induction).
On : means for some (Order on the natural numbers); and addition is commutative (Addition of natural numbers, Addition is commutative, The natural numbers (von Neumann)); and exactly when (On the order is membership: ); exactly when (Discreteness: is the immediate successor).
is a commutative ring; its order is total, antisymmetric and transitive, is compatible with addition, and positives are closed under multiplication; is injective and order preserving with image the nonnegative integers, , (The integers form a commutative ring, Arithmetic on the integers, The integers as equivalence classes of pairs of naturals, The integers form a totally ordered ring, Order on the integers, The naturals embed in the integers).
Proof
Distinct primes do not divide one another: if and are primes with , then is a positive divisor of (as ) other than , so . Consequently whenever are primes.
holds: an empty list contains no prime, so has no prime divisor at all; if it would have one, so , and .
Let and assume .
Let and let be an injective list of primes containing every prime divisor of . Write , , and fix with , and .
For a prime and : , and for every prime . Both sets of for which these hold contain , since and for every prime ; and if they hold at then, and being nonzero, additivity gives and . Induction finishes both.
: and , so would make ; hence , and a positive integer is because with , so .
Clause 3. Let be an injective list of primes, , and ; we claim , that for every , and that for every prime off the list. Let be the set of for which this holds for all such and . Then : the empty product is , which is , has for every prime , and imposes no condition on indices. Suppose and let be injective with primes and . Writing we have , with and , so and both factors are nonzero; additivity then gives for every prime . Taking with gives , since by injectivity; taking gives , since is off the list ; and taking a prime off the whole list gives . So , and by induction.
The restriction is an injective list of primes containing every prime divisor of . Indeed if is prime with then , since ; so for some ; and , because ; hence , and gives , so .
For we have , using additivity on the nonzero factors and , and step 2.1 with , which holds by injectivity since .
By step 1.3 applied to and : .
Therefore , so holds.
With step 1.2 as base, induction gives for every , which is clause 1. Clause 2 follows because a prime off the list does not divide — otherwise it would be a prime divisor of and hence on the list — so ; and clause 3 is step 3.1.
Remarks
-
This is The fundamental theorem of arithmetic: every integer is a product of primes, and the factorisation is unique up to order — if with every and prime, then and for some read by exponents rather than by lists, not a further theorem. A list of primes with repetitions becomes an injective list with multiplicities, and the multiplicity of is exactly ; uniqueness up to a permutation becomes clause 3, that the exponent vector is determined.
-
There is deliberately no product over all primes. The familiar notation abbreviates a product with finitely many factors different from , and an indexed product with finite support is not available at this point in the library — The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity multiplies a finite list. The honest form quantifies over a finite injective list covering the prime divisors of and adds clause 2, which says every prime off the list contributes exponent . Nothing is lost: any two such lists agree on the exponents by clause 3.
-
Why injectivity is a hypothesis. Without it clause 3 fails outright: with , and or , both products are , so the exponent vector is not determined. Injectivity is what makes read off one multiplicity rather than a sum of several.
For positive integers and : if and only if for every prime
Statement
Let with and , and let be the -adic valuation of The -adic valuation of a nonzero integer: the greatest with . Then
Both valuations are defined, since and are nonzero.
Facts & Assumptions
Given: The property : "for every , if and for every prime , then ", where is the embedding of The naturals embed in the integers.
For a prime and nonzero : and ( for nonzero integers , and whenever , and are all nonzero).
For a prime and nonzero : exactly when (For a prime and a nonzero integer : and ; holds exactly for ; exactly when ; ; and , The -adic valuation of a nonzero integer: the greatest with ).
Every integer has a prime divisor (Every integer has a prime divisor; indeed the least divisor of that exceeds is prime); every prime satisfies (Prime and composite integers: is prime when and its only positive divisors are and ).
Strong induction on (Strong (complete) induction).
means for some ; divisibility is reflexive and transitive, and implies (Divisibility in : when for some integer , Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and ).
A product of two nonzero integers is nonzero (The integers have no zero divisors; multiplicative cancellation).
On : means for some , so always (Order on the natural numbers, Addition of natural numbers); holds exactly when (Order is compatible with addition); exactly when , and (Discreteness: is the immediate successor, The natural numbers (von Neumann)).
is a commutative ring; its order is total, antisymmetric and transitive, is compatible with addition, and positives are closed under multiplication (The integers form a commutative ring, Arithmetic on the integers, The integers as equivalence classes of pairs of naturals, The integers form a totally ordered ring, Order on the integers).
is injective, preserves addition, multiplication and order, and has as image exactly the nonnegative integers, with and (The naturals embed in the integers).
Proof
, since is nonnegative and differs from ; and every integer satisfies , because with , so and preserves the order.
The forward implication. Suppose and fix with . Then , since , so [L1] gives for every prime .
Let and assume for every .
holds vacuously: and is false.
Put and suppose , and let satisfy for every prime . If then , so assume .
Fix a prime with , and fix with . Then , hence by hypothesis, so ; fix with .
and : they are nonzero because and are, and if then contradicting , so and hence ; the same argument applies to .
: since we have , and , so .
For every prime : , so by cancellation of in the order of .
Write ; then , since otherwise and the order-preserving would give , contradicting step 5.1. By step 1.3 applied to , together with steps 4.1 and 5.2, .
Hence for the with , so and holds.
Steps 2.2 and 7.1 cover both possibilities for , so at follows from below ; with step 2.1, strong induction gives for every . Since a positive integer is for a unique , that is the reverse implication, and step 1.2 is the forward one.
Remarks
-
No canonical factorisation is needed. The reverse implication is often proved by writing both integers over a common list of primes and comparing exponents; the descent used here peels off one prime divisor at a time and needs only additivity of ( for nonzero integers , and whenever , and are all nonzero) and the existence of a prime divisor. The factorisation route is available too, via For and any injective list of primes containing every prime divisor of , one has ; the exponents are determined by , and for every prime outside the list, and gives the same statement.
-
Positivity is a real hypothesis, and only mildly so. is undefined at , so the pair must avoid it; signs are harmless, since is unchanged by replacing either argument by its negative (Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and ) and for the same reason. The statement is therefore about and in substance.
-
The valuation criterion is the shape the and formulas need, and For positive integers and and every prime : and ; so the exponent-wise greatest common divisor is the of the divisibility page and not a second notion uses exactly this lemma to check the characterisation of proved on the divisibility page.
For positive integers and and every prime : and ; so the exponent-wise greatest common divisor is the of the divisibility page and not a second notion
Statement
Let with and , write (Common divisor, and the greatest common divisor , with the convention ) and (Common multiple, and the least common multiple , taken to be when or ), and let be any prime (Prime and composite integers: is prime when and its only positive divisors are and ). Then and , so all four valuations below are defined (The -adic valuation of a nonzero integer: the greatest with ), and
- ;
- ,
the minimum and maximum being taken in , whose order is total ( is a linear order on ).
- The exponent recipe does not define a second notion. If satisfies for every prime , then ; and if satisfies for every prime , then .
Facts & Assumptions
Given: Integers ; , ; and, for a prime , and .
unless ; is a common divisor of and , and every common divisor of and divides it (Common divisor, and the greatest common divisor , with the convention , is symmetric and unchanged by signs: ; moreover , , , and unless , Every common divisor of and divides ; consequently exactly when , , , and every common divisor of and divides — a characterisation that holds at as well).
For both nonzero, is the least positive common multiple of and ; in particular and (Common multiple, and the least common multiple , taken to be when or ).
, and every common multiple of and is a multiple of (Every common multiple of and is a multiple of , and ).
For positive : exactly when for every prime (For positive integers and : if and only if for every prime ).
For a prime and nonzero : ( for nonzero integers , and whenever , and are all nonzero).
For a prime and nonzero : exactly when ; and for every (For a prime and a nonzero integer : and ; holds exactly for ; exactly when ; ; and , Powers : natural exponents in a monoid and integer exponents in a group, with , Semigroup and monoid, is a commutative monoid whose group of units is ; equivalently holds exactly for and ).
On : the order is total, so any two naturals have a minimum and a maximum ( is a linear order on ); addition is commutative (Addition is commutative) and cancellative (Addition is cancellative); means for some (Order on the natural numbers, Addition of natural numbers); exactly when , and (Discreteness: is the immediate successor, The natural numbers (von Neumann)).
is a commutative ring; its order is total, antisymmetric and transitive, is compatible with addition, and positives are closed under multiplication; a product of two nonzero integers is nonzero and cancellation holds (The integers form a commutative ring, Arithmetic on the integers, The integers as equivalence classes of pairs of naturals, The integers form a totally ordered ring, Order on the integers, The integers have no zero divisors; multiplicative cancellation).
is injective and order preserving with image the nonnegative integers, , (The naturals embed in the integers).
Proof
, and every integer satisfies : with , so and preserves the order.
For naturals the minimum and maximum exist by totality, and : if the left side is , and if it is .
and , so , and ; hence , and is the least positive common multiple of and , so . All of are nonzero and their valuations are defined.
and , so and by [L4]; hence .
Conversely and , so and by [L6]; thus is a common divisor of and and therefore divides . Since , [L6] applied to gives .
, so , and [L3] gives . Applying [L5] to the nonzero pairs and gives .
Clause 1: , by antisymmetry of the order on .
Clause 2: substituting step 4.1 and step 1.2, , so by cancellation of addition on .
Clause 3, first half. Let satisfy for every prime . Then for every by step 4.1, so and by [L4], hence ; both are positive, so .
Clause 3, second half, by the same argument with step 5.1 in place of step 4.1: for every forces and , hence .
Clauses 1, 2 and 3 are established.
Remarks
-
This is the agreement item for the two pages. The exponent-wise recipe for and for is a computation of the and defined on the divisibility page, not a rival definition: clause 3 says any positive integer with the right valuations is that , respectively that . Nothing here redefines either symbol.
-
The identity sum recovers the product formula. Adding clauses 1 and 2 gives for every , which is of Every common multiple of and is a multiple of , and read through valuations. That is a consistency check, and in this proof the implication was used in the other direction: the product formula is what pins from above. The independent bound , from and , also follows from [L2] and [L4] and agrees.
-
Both arguments are restricted to positive integers, and the restriction is not cosmetic. is undefined (The -adic valuation of a nonzero integer: the greatest with ), so the pair — the one where the convention lives — is out of scope entirely, and a negative argument is handled first by ( is symmetric and unchanged by signs: ; moreover , , , and unless ).
-
The minimum and maximum are taken in , through the totality of its order ( is a linear order on ), and not through the library's Maximum and minimum of a set, which is stated for real numbers. Valuations are natural numbers and there is no reason to leave .
The -adic valuation extends to the nonzero rationals by , independently of the representation; it satisfies , and whenever , and are nonzero
Statement
Let be a prime (Prime and composite integers: is prime when and its only positive divisors are and ). A rational is a class of pairs of integers with , written (The rationals as equivalence classes of pairs of integers), and holds exactly when (Arithmetic on the rationals). Write for the embedding of The naturals embed in the integers and , , for that of The integers embed in the rationals.
For a nonzero rational set
with on nonzero integers as in The -adic valuation of a nonzero integer: the greatest with . Then:
- The value does not depend on the representative, so is a well defined function from the nonzero rationals to .
- It extends the integer valuation: for every nonzero integer .
- for all nonzero rationals .
- whenever , and are all nonzero, the minimum being taken in the totally ordered .
Unlike its restriction to , this valuation takes integer values, which is why the difference is formed after transporting the two natural numbers into along .
Facts & Assumptions
Given: A prime ; nonzero rationals with representatives , , where are all nonzero.
exactly when ; consists of such classes with (The rationals as equivalence classes of pairs of integers).
, , and (Arithmetic on the rationals); is a field (The rationals form a field, Field).
is injective and preserves addition, multiplication and order (The integers embed in the rationals).
For a prime and nonzero integers : and ; and when , and are nonzero ( for nonzero integers , and whenever , and are all nonzero).
is injective and preserves addition, multiplication and order, with image the nonnegative integers and , (The naturals embed in the integers).
A product of two nonzero integers is nonzero (The integers have no zero divisors; multiplicative cancellation).
is a commutative ring: addition and multiplication are associative and commutative, , and every has an additive inverse , with and ; we write for (The integers form a commutative ring, Arithmetic on the integers, The integers as equivalence classes of pairs of naturals).
The order on is total, antisymmetric and transitive and is compatible with addition, so implies (The integers form a totally ordered ring, Order on the integers).
The order on is total, so any two naturals have a minimum; addition on is commutative ( is a linear order on , Addition is commutative, Order on the natural numbers, Addition of natural numbers, The natural numbers (von Neumann)).
Proof
If is a nonzero rational then and , so and are both defined.
Clause 1. Suppose with all four entries nonzero. Then , and both sides are nonzero, so [L4] gives in . Applying the addition-preserving and rearranging in gives .
Clause 4. Assume , and are nonzero. Then with , and because ; also and .
Clause 2. For a nonzero integer , , so .
Clause 3. , with and , so .
By [L4], ; applying the order-preserving injection turns this into the same inequality between the corresponding integers.
Since preserves addition, that value is , which rearranges in the commutative ring to .
Subtracting the integer from both sides, which preserves the order, and using that subtraction of a fixed element commutes with taking the smaller of two integers, gives .
Clauses 1 to 4 are established.
Remarks
-
Relation to the published -adic example. The published The -adic absolute value gives an ultrametric on , in which every triangle is isosceles and every point of a ball is a centre ↗ records that the general -adic machinery is available, but nevertheless develops from parity alone. The present lemma supplies the general algebraic extension: representation-independence is exactly the assertion that forces the two candidate values to agree.
-
Nothing metric is stated here, deliberately. The -adic absolute value and the ultrametric it induces need real powers with integer exponents and the definition of a metric space, all of which live far above this page in the library's order; they are not defined here and nothing on this page depends on them. What is proved is the algebra: a homomorphism from the nonzero rationals under multiplication to under addition, satisfying the ultrametric inequality on valuations.
-
The values are integers, not naturals. , so the extension genuinely leaves ; that is why the two integer valuations are transported along before being subtracted. As on , the value at is left undefined (The -adic valuation of a nonzero integer: the greatest with ).
A rational root of is an integer: if , , and is the image of , then is the image of an integer
Statement
is a field (The rationals form a field, Field), so is a commutative monoid and natural powers are defined in it by Powers : natural exponents in a monoid and integer exponents in a group, with . Write , , for the embedding of The integers embed in the rationals.
Let with , let , and let satisfy
Then for some .
Facts & Assumptions
Given: with , , and with .
A rational is a class with , , and exactly when (The rationals as equivalence classes of pairs of integers).
, , , and exactly when (Arithmetic on the rationals).
is a field: multiplication is associative and commutative on all of with and (The rationals form a field, Field), so is a commutative monoid (Semigroup and monoid).
and in a monoid (Powers : natural exponents in a monoid and integer exponents in a group, with ).
is injective and preserves addition and multiplication (The integers embed in the rationals).
For there are unique and with , , and (If is nonzero then and are coprime, Common divisor, and the greatest common divisor , with the convention , Coprime integers: ).
If then the set of common divisors of and is exactly ( and are coprime if and only if for some integers ; and in that case the only common divisors of and are and , is a commutative monoid whose group of units is ; equivalently holds exactly for and ).
If is prime and then or (Euclid's lemma: if is prime and then or ).
Every integer has a prime divisor, and every prime satisfies (Every integer has a prime divisor; indeed the least divisor of that exceeds is prime, Prime and composite integers: is prime when and its only positive divisors are and ).
Divisibility is reflexive and transitive, implies , and means for some (Divisibility is reflexive and transitive on , and is linear: if and then for all integers ; also implies , and , Divisibility in : when for some integer ).
Induction on (The principle of mathematical induction); every natural is a successor (Every nonzero natural number is a successor); exactly when , and (Discreteness: is the immediate successor, The natural numbers (von Neumann), Order on the natural numbers).
exactly when or ( is a commutative monoid whose group of units is ; equivalently holds exactly for and ).
A product of two nonzero integers is nonzero (The integers have no zero divisors; multiplicative cancellation); is a commutative ring whose order is total, antisymmetric and transitive (The integers form a commutative ring, Arithmetic on the integers, The integers as equivalence classes of pairs of naturals, The integers form a totally ordered ring, Order on the integers); is injective and order preserving with image the nonnegative integers (The naturals embed in the integers).
Proof
in , and every integer satisfies : with , so and preserves the order.
For integers with and every : and , powers on the left in and on the right in . The set of for which this holds contains , since and ; and if it holds at then and . Induction finishes it.
Suppose first . Since , write ; then , so and by injectivity of ; and is the image of an integer.
Suppose instead , and write with ; then . If , replace by , which represents the same rational because ; so we may assume .
For a prime , an integer and : if then . Let be the set of for which this implication holds; vacuously, since fails there. Suppose and . By [L9] either or ; in the second case we are done, and in the first, if then gives , while if then and is impossible for a prime, since would then be contradicted. So and .
Put ; since we have , so . Put and , so that , and .
and : if then , and if then , both contrary to step 1.4. Moreover , because .
By step 1.2, , and this equals , so , that is .
Suppose and fix a prime with . Since , write ; then , so and hence by transitivity. Then , so by step 2.1.
So is a common divisor of and , which are coprime, hence or by [L8] and [L14]; but , a contradiction. Therefore , and gives , so .
Hence is the image of an integer; together with step 1.3 this covers both cases.
Remarks
-
The instances live on the companion page. No rational squares to or to , and none cubes to : each is this corollary followed by ruling out the finitely many integer candidates by size, and all three are worked out in No rational squares to or to , and none cubes to : three instances of the rational-root corollary ↗.
-
The argument lives inside and never enters . No -th root is asserted to exist; the hypothesis is that a rational already satisfies , and the conclusion is about its denominator. The powers are monoid powers of Powers : natural exponents in a monoid and integer exponents in a group, with in , not Integer powers , which is stated in the ambient ordered field.
-
This is a second route to a fact the library already had. The published FALSE: some rational number squares to 2 refutes "some rational number squares to " by parity alone, on the construction pages, long before primes existed here. The case , of this corollary gives the same conclusion by a different argument, and the two agree: a rational squaring to would have to be an integer with , and leaves no candidate.
-
Where primality is used. Exactly once, in step 2.1, through Euclid's lemma: if is prime and then or : a prime dividing a power divides the base. For a composite divisor the step fails, which is why the classical proof cannot be run with an arbitrary common factor in place of a prime.
5 · Examples, counterexamples and false statements
None yet.
Sources
Standard references
Recommended treatments; not extraction sources.
- Prime number (Wikipedia)
- Composite number (Wikipedia)
- Inquiry into Advanced Algebra: Division, primes, and factorisation
- Euclid's lemma (Wikipedia)
- Coprime integers (Wikipedia)
- Neil Donaldson, Math 180A notes: Unique factorisation
- Number Theory: In Context — Fundamental Theorem of Arithmetic
- Fundamental theorem of arithmetic (Wikipedia)
- Janssen and Lindsey, Rings with Inquiry: Primes and Factorization
- Euclid's theorem (Wikipedia)
- P-adic valuation (Wikipedia)
- University of Chicago REU notes: p-adic numbers
- Valuation (algebra) (Wikipedia)
- Jürgen Neukirch, Algebraic Number Theory
- Carnegie Mellon University notes: Modern arithmetic
- Greatest common divisor (Wikipedia)
- Least common multiple (Wikipedia)
- Harris Kwong, A Spiral Workbook for Discrete Mathematics: Fundamental Theorem of Arithmetic
- Rational root theorem (Wikipedia)
- University of Toronto MAT 246 solutions: Rational roots