SL000S · theorem body

quadratic_supplement_two_nonresidue_iff_mod_eight_three_or_five

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

The complementary second supplementary law: two is a nonresidue exactly in classes three and five modulo eight.

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)Odd(p) → (¬QRes(p,2) → (∃ x. p = 8 · x + 3) ∨ (∃ x. p = 8 · x + 5)) ∧ ((∃ x. p = 8 · x + 3) ∨ (∃ x. p = 8 · x + 5) → ¬QRes(p,2))

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_qst_endpoint_prime frm_prime_right_qst_endpoint_prime. p = frm_prime_left_qst_endpoint_prime * frm_prime_right_qst_endpoint_prime -> frm_prime_left_qst_endpoint_prime = 1 \/ frm_prime_right_qst_endpoint_prime = 1)) -> (exists qst_odd_modulus. p = 2 * qst_odd_modulus + 1) -> ((((~(exists qst_root_two. exists qst_mod_left_two qst_mod_right_two. qst_root_two * qst_root_two + p * qst_mod_left_two = 2 + p * qst_mod_right_two)) -> (((exists qst_mod_eight_modulus_three. p = 8 * qst_mod_eight_modulus_three + 3) \/ (exists qst_mod_eight_modulus_five. p = 8 * qst_mod_eight_modulus_five + 5)))) /\ ((((exists qst_mod_eight_modulus_three. p = 8 * qst_mod_eight_modulus_three + 3) \/ (exists qst_mod_eight_modulus_five. p = 8 * qst_mod_eight_modulus_five + 5))) -> (~(exists qst_root_two. exists qst_mod_left_two qst_mod_right_two. qst_root_two * qst_root_two + p * qst_mod_left_two = 2 + p * qst_mod_right_two)))))

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

14 script commands · 5 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–3

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

  1. L1
    intro p
  2. L2
    intro hprime
  3. L3
    intro hodd
02Separate the logical casesL4–4

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

  1. L4
    cases hodd
03Establish hcompleteL5–12

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply quadratic supplement two half complete.

  1. L5
    have hcomplete : (QRes(p,2) → (∃ x. p = 8 · x + 1) ∨ (∃ x. p = 8 · x + 7)) ∧ ((∃ x. p = 8 · x + 1) ∨ (∃ x. p = 8 · x + 7) → QRes(p,2)) ∧ ((¬QRes(p,2) → (∃ x. p = 8 · x + 3) ∨ (∃ x. p = 8 · x + 5)) ∧ ((∃ x. p = 8 · x + 3) ∨ (∃ x. p = 8 · x + 5) → ¬QRes(p,2)))Definitions: QRes(p,2)Original native command in the exact edition
  2. L6
    specialize quadratic_supplement_two_half_complete p
  3. L7
    specialize quadratic_supplement_two_half_complete x
  4. L8
    specialize quadratic_supplement_two_half_complete 2
  5. L9
    apply quadratic_supplement_two_half_complete
  6. L10
    exact hodd_witness
  7. L11
    exact hprime
  8. L12
    refl
04Separate the logical casesL13–13

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

  1. L13
    cases hcomplete
05Use earlier factsL14–14

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

  1. L14
    exact hcomplete_right

Library-wide reading audit

Original defined command ledger · 14 lines
  1. 0001intro p
  2. 0002intro hprime
  3. 0003intro hodd
  4. 0004cases hodd
  5. 0005have hcomplete : (QRes(p,2) → (∃ x. p = 8 · x + 1) ∨ (∃ x. p = 8 · x + 7)) ∧ ((∃ x. p = 8 · x + 1) ∨ (∃ x. p = 8 · x + 7) → QRes(p,2)) ∧ ((¬QRes(p,2) → (∃ x. p = 8 · x + 3) ∨ (∃ x. p = 8 · x + 5)) ∧ ((∃ x. p = 8 · x + 3) ∨ (∃ x. p = 8 · x + 5) → ¬QRes(p,2)))
    Exact native replay linehave hcomplete : (((((exists qst_root_two. exists qst_mod_left_two qst_mod_right_two. qst_root_two * qst_root_two + p * qst_mod_left_two = 2 + p * qst_mod_right_two) -> (((exists qst_mod_eight_modulus_one. p = 8 * qst_mod_eight_modulus_one + 1) \/ (exists qst_mod_eight_modulus_seven. p = 8 * qst_mod_eight_modulus_seven + 7)))) /\ ((((exists qst_mod_eight_modulus_one. p = 8 * qst_mod_eight_modulus_one + 1) \/ (exists qst_mod_eight_modulus_seven. p = 8 * qst_mod_eight_modulus_seven + 7))) -> (exists qst_root_two. exists qst_mod_left_two qst_mod_right_two. qst_root_two * qst_root_two + p * qst_mod_left_two = 2 + p * qst_mod_right_two)))) /\ ((((~(exists qst_root_two. exists qst_mod_left_two qst_mod_right_two. qst_root_two * qst_root_two + p * qst_mod_left_two = 2 + p * qst_mod_right_two)) -> (((exists qst_mod_eight_modulus_three. p = 8 * qst_mod_eight_modulus_three + 3) \/ (exists qst_mod_eight_modulus_five. p = 8 * qst_mod_eight_modulus_five + 5)))) /\ ((((exists qst_mod_eight_modulus_three. p = 8 * qst_mod_eight_modulus_three + 3) \/ (exists qst_mod_eight_modulus_five. p = 8 * qst_mod_eight_modulus_five + 5))) -> (~(exists qst_root_two. exists qst_mod_left_two qst_mod_right_two. qst_root_two * qst_root_two + p * qst_mod_left_two = 2 + p * qst_mod_right_two))))))
  6. 0006specialize quadratic_supplement_two_half_complete p
  7. 0007specialize quadratic_supplement_two_half_complete x
  8. 0008specialize quadratic_supplement_two_half_complete 2
  9. 0009apply quadratic_supplement_two_half_complete
  10. 0010exact hodd_witness
  11. 0011exact hprime
  12. 0012refl
  13. 0013cases hcomplete
  14. 0014exact hcomplete_right