PF0008 · theorem body

pythagorean_square_gap_from_order

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

Every witnessed natural parameter inequality n≤m produces the exact subtraction-free square-difference witness m²=n²+d.

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

∀ m. ∀ n. Le(n,m) → ∃ x. m · m = n · n + x

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 m n. (exists gap. gap + n = m) -> exists d. m * m = n * n + d

Proof neighborhood

Direct theorem prerequisites

mul_le_mul · Alpha closed add_comm · 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.

01Fix variables and assumptionsL1–3

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

  1. L1
    intro m
  2. L2
    intro n
  3. L3
    intro hbound
02Establish hsquareL4–7

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mul le mul.

  1. L4
    have hsquare : Le(n · n,m · m)Definitions: Le(n · n,m · m)Original native command in the exact edition
  2. L5
    apply mul_le_mul
  3. L6
    exact hbound
  4. L7
    exact hbound
03Separate the logical casesL8–8

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

  1. L8
    cases hsquare
04Construct an explicit witnessL9–9

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

  1. L9
    exists x
05Calculate and transport equalitiesL10–11

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

  1. L10
    trans x + n * n
  2. L11
    symm
06Use earlier factsL12–13

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

  1. L12
    exact hsquare_witness
  2. L13
    apply add_comm

Library-wide reading audit

Original defined command ledger · 13 lines
  1. 0001intro m
  2. 0002intro n
  3. 0003intro hbound
  4. 0004have hsquare : Le(n · n,m · m)
    Exact native replay linehave hsquare : exists gap. gap + n * n = m * m
  5. 0005apply mul_le_mul
  6. 0006exact hbound
  7. 0007exact hbound
  8. 0008cases hsquare
  9. 0009exists x
  10. 0010trans x + n * n
  11. 0011symm
  12. 0012exact hsquare_witness
  13. 0013apply add_comm