TS0021 · theorem body

prime_mod_four_trichotomy

Alpha v34 checked-use · independently kernel and Lean verified; not Stable

Every prime lies in exactly the constructive residue branches two, one modulo four, or three modulo four.

Current library: Alpha v34, 4,223 checked-use theorems; Stable remains 432. Historical first admissions, original proof editions, and non-admitted aliases are preserved. Exact original first-admission records.

Statement with defined notation

∀ p. Prime(p) → p = 2 ∨ (Mod4One(p)Mod4Three(p))

Every purple notation token opens its conservative definition. This reading surface never changes the unchanged intuitionistic kernel or confers checked-use authority.

Definitions used by this theorem

In the theorem statement

In local proof propositions

Exact expanded first-order statement
forall p. ((~(p = 1) /\ forall frm_prime_left_ftsc_prime frm_prime_right_ftsc_prime. p = frm_prime_left_ftsc_prime * frm_prime_right_ftsc_prime -> frm_prime_left_ftsc_prime = 1 \/ frm_prime_right_ftsc_prime = 1)) -> (p = 2 \/ ((exists ftsc_four_one_ftsc_prime. (p) = 4 * ftsc_four_one_ftsc_prime + 1) \/ (exists ftsc_four_three_ftsc_prime. (p) = 4 * ftsc_four_three_ftsc_prime + 3)))

Proof neighborhood

Direct theorem prerequisites

TS0020 prime_is_two_or_odd odd_mod4_cases · Stable closed

Direct theorem dependents

Definition-aware tactic body

Only propositions whose conservative expansion has been checked for exact first-order equivalence are compacted. Every changed line retains its immutable exact replay command.

Read the argument

Proof checkpoints

13 script commands · 6 reading checkpoints · 1 local claims

This is a reading aid, not a new proof or a proof-tree certificate. Checkpoint groups are consecutive commands, not inferred branch boundaries. Every step links to the preserved script.

Definition notation is shown below. Open the paired exact edition for the original native formulas. Source pairing is not a new equivalence certificate.

Named ingredients (1)
01Fix variables and assumptionsL1–2

Work with arbitrary variables or the premises of the current implication.

  1. L1
    intro p
  2. L2
    intro hprime
02Establish hparityL3–6

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply prime is two or odd.

  1. L3
    have hparity : p = 2 ∨ Odd(p)Definitions: Odd(p)Original native command in the exact edition
  2. L4
    specialize prime_is_two_or_odd p
  3. L5
    apply prime_is_two_or_odd
  4. L6
    exact hprime
03Separate the logical casesL7–8

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L7
    cases hparity
  2. L8
    left
04Use earlier factsL9–9

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L9
    exact hparity_left
05Separate the logical casesL10–10

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L10
    right
06Use earlier factsL11–13

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L11
    specialize odd_mod4_cases p
  2. L12
    apply odd_mod4_cases
  3. L13
    exact hparity_right

Library-wide reading audit

Original defined command ledger · 13 lines
  1. 0001intro p
  2. 0002intro hprime
  3. 0003have hparity : p = 2 ∨ Odd(p)
    Exact native replay linehave hparity : p = 2 \/ (exists ftsc_odd_ftsc_prime. (p) = 2 * ftsc_odd_ftsc_prime + 1)
  4. 0004specialize prime_is_two_or_odd p
  5. 0005apply prime_is_two_or_odd
  6. 0006exact hprime
  7. 0007cases hparity
  8. 0008left
  9. 0009exact hparity_left
  10. 0010right
  11. 0011specialize odd_mod4_cases p
  12. 0012apply odd_mod4_cases
  13. 0013exact hparity_right