FS001L · theorem body

four_square_descent_remainder_complement_exists

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

Every nonzero-modulus remainder has a complementary nonnegative residue and a decidable ordering between the two.

historical independently replay-verified empty-context experiment; the experiment itself persisted no certificate and granted no release authority; current checked use follows separately sealed proof bundles; no Stable promotion.

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

∀ k. ∀ n. ¬k = 0 → ∃ x. ∃ y. ∃ z. n = k · x + y ∧ (y + z = k ∧ (Le(y,z)Le(z,y)))

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 k n. ~(k = 0) -> exists q r s. ((n = k * q + r) /\ ((r + s = k) /\ ((exists t. t + r = s) \/ (exists t. t + s = r))))

Proof neighborhood

Direct theorem prerequisites

division_remainder_exists · Stable closed add_comm · Stable closed le_total · 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

30 script commands · 13 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.

01Fix variables and assumptionsL1–3

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

  1. L1
    intro k
  2. L2
    intro n
  3. L3
    intro hnonzero
02Establish hdivisionL4–8

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply division remainder exists.

  1. L4
    have hdivision : ∃ q. ∃ r. DivRem(n,k,q,r)Definitions: DivRem(n,k,q,r)Original native command in the exact edition
  2. L5
    specialize division_remainder_exists k
  3. L6
    specialize division_remainder_exists n
  4. L7
    apply division_remainder_exists
  5. L8
    exact hnonzero
03Separate the logical casesL9–12

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

  1. L9
    cases hdivision
  2. L10
    cases hdivision_witness
  3. L11
    cases hdivision_witness_witness
  4. L12
    cases hdivision_witness_witness_right
04Construct an explicit witnessL13–15

Supply the displayed value, then prove that it has the required property.

  1. L13
    exists x
  2. L14
    exists x1
  3. L15
    exists S x2
05Separate the logical casesL16–16

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

  1. L16
    split
06Use earlier factsL17–17

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

  1. L17
    exact hdivision_witness_witness_left
07Separate the logical casesL18–18

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

  1. L18
    split
08Calculate and transport equalitiesL19–20

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L19
    trans x2 + S x1
  2. L20
    trans S (x1 + x2)
09Use earlier factsL21–21

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

  1. L21
    apply PA4
10Calculate and transport equalitiesL22–23

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L22
    trans S (x2 + x1)
  2. L23
    congr
11Use earlier factsL24–24

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

  1. L24
    apply add_comm
12Calculate and transport equalitiesL25–25

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L25
    symm
13Use earlier factsL26–30

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

  1. L26
    apply PA4
  2. L27
    exact hdivision_witness_witness_right_witness
  3. L28
    specialize le_total x1
  4. L29
    specialize le_total (S x2)
  5. L30
    exact le_total

Library-wide reading audit

Original defined command ledger · 30 lines
  1. 0001intro k
  2. 0002intro n
  3. 0003intro hnonzero
  4. 0004have hdivision : ∃ q. ∃ r. DivRem(n,k,q,r)
    Exact native replay linehave hdivision : exists q r. ((n = k * q + r) /\ (exists t. t + S r = k))
  5. 0005specialize division_remainder_exists k
  6. 0006specialize division_remainder_exists n
  7. 0007apply division_remainder_exists
  8. 0008exact hnonzero
  9. 0009cases hdivision
  10. 0010cases hdivision_witness
  11. 0011cases hdivision_witness_witness
  12. 0012cases hdivision_witness_witness_right
  13. 0013exists x
  14. 0014exists x1
  15. 0015exists S x2
  16. 0016split
  17. 0017exact hdivision_witness_witness_left
  18. 0018split
  19. 0019trans x2 + S x1
  20. 0020trans S (x1 + x2)
  21. 0021apply PA4
  22. 0022trans S (x2 + x1)
  23. 0023congr
  24. 0024apply add_comm
  25. 0025symm
  26. 0026apply PA4
  27. 0027exact hdivision_witness_witness_right_witness
  28. 0028specialize le_total x1
  29. 0029specialize le_total (S x2)
  30. 0030exact le_total