TS003B · theorem body

prime_mod_four_good_or_three

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

The constructive prime residue trichotomy splits into one represented-prime branch and one three-modulo-four branch.

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_ftsp_p frm_prime_right_ftsp_p. p = frm_prime_left_ftsp_p * frm_prime_right_ftsp_p -> frm_prime_left_ftsp_p = 1 \/ frm_prime_right_ftsp_p = 1)) -> ((p = 2 \/ exists k. p = 4 * k + 1) \/ exists k. p = 4 * k + 3)

Proof neighborhood

Direct theorem prerequisites

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

16 script commands · 8 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 hclassesL3–6

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply prime mod four trichotomy.

  1. L3
    have hclasses : p = 2 ∨ (Mod4One(p) ∨ Mod4Three(p))Definitions: Mod4One(p)Mod4Three(p)Original native command in the exact edition
  2. L4
    specialize prime_mod_four_trichotomy p
  3. L5
    apply prime_mod_four_trichotomy
  4. L6
    exact hprime
03Separate the logical casesL7–9

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

  1. L7
    cases hclasses
  2. L8
    left
  3. L9
    left
04Use earlier factsL10–10

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

  1. L10
    exact hclasses_left
05Separate the logical casesL11–13

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

  1. L11
    cases hclasses_right
  2. L12
    left
  3. L13
    right
06Use earlier factsL14–14

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

  1. L14
    exact hclasses_right_left
07Separate the logical casesL15–15

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

  1. L15
    right
08Use earlier factsL16–16

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

  1. L16
    exact hclasses_right_right

Library-wide reading audit

Original defined command ledger · 16 lines
  1. 0001intro p
  2. 0002intro hprime
  3. 0003have hclasses : p = 2 ∨ (Mod4One(p)Mod4Three(p))
    Exact native replay linehave hclasses : (p = 2 \/ ((exists k. p = 4 * k + 1) \/ (exists k. p = 4 * k + 3)))
  4. 0004specialize prime_mod_four_trichotomy p
  5. 0005apply prime_mod_four_trichotomy
  6. 0006exact hprime
  7. 0007cases hclasses
  8. 0008left
  9. 0009left
  10. 0010exact hclasses_left
  11. 0011cases hclasses_right
  12. 0012left
  13. 0013right
  14. 0014exact hclasses_right_left
  15. 0015right
  16. 0016exact hclasses_right_right