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.
The natural-code carrier consists of genuine pairs of the existing signed integers; no new primitive arithmetic is trusted. The theorem constructs quotient, remainder, and actual norm witnesses. Gaussian gcd, unique factorization, and prime classification are separate targets.
Exact theorem in conservative defined notation
∀ code. ∀ p. ∀ n. ∀ q. ∀ m. SignedBalance(code,p,n) → SignedBalance(code,q,m) → p + m = q + n
Every linked abbreviation expands hygienically to the identical original native formula.
Definition DAG
Actual proof prerequisites
Complete tactic proof in conservative notation
All 43 original proof lines are preserved. Only local proposition formulas are abbreviated; every abbreviation has an exact binder-safe expansion check. The linked exact edition contains the unchanged replay script.
Read the argument
Proof checkpoints
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.
01Fix variables and assumptionsL1–7
02Separate the logical casesL8–13
03Establish hdecodedL14–22
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply signed decode functional.
- L14
have hdecoded : x = x2 /\ x1 = x3 - L15
specialize signed_decode_functional code - L16
specialize signed_decode_functional x - L17
specialize signed_decode_functional x1 - L18
specialize signed_decode_functional x2 - L19
specialize signed_decode_functional x3 - L20
apply signed_decode_functional - L21
exact hfirst_witness_witness_left - L22
exact hsecond_witness_witness_left
04Separate the logical casesL23–23
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L23
cases hdecoded
05Calculate and transport equalitiesL24–25
06Establish hcrossL26–35
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply add cross sum chain.
- L26
have hcross : p + m = n + q - L27
specialize add_cross_sum_chain p - L28
specialize add_cross_sum_chain n - L29
specialize add_cross_sum_chain x3 - L30
specialize add_cross_sum_chain x2 - L31
specialize add_cross_sum_chain m - L32
specialize add_cross_sum_chain q - L33
apply add_cross_sum_chain - L34
exact hfirst_witness_witness_right - L35
trans m + x2
07Use earlier factsL36–36
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L36
apply add_comm
08Calculate and transport equalitiesL37–38
09Use earlier factsL39–40
10Calculate and transport equalitiesL41–41
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L41
trans n + q
Original defined command ledger · 43 lines
- 0001
intro code - 0002
intro p - 0003
intro n - 0004
intro q - 0005
intro m - 0006
intro hfirst - 0007
intro hsecond - 0008
cases hfirst - 0009
cases hfirst_witness - 0010
cases hfirst_witness_witness - 0011
cases hsecond - 0012
cases hsecond_witness - 0013
cases hsecond_witness_witness - 0014
have hdecoded : x = x2 /\ x1 = x3 - 0015
specialize signed_decode_functional code - 0016
specialize signed_decode_functional x - 0017
specialize signed_decode_functional x1 - 0018
specialize signed_decode_functional x2 - 0019
specialize signed_decode_functional x3 - 0020
apply signed_decode_functional - 0021
exact hfirst_witness_witness_left - 0022
exact hsecond_witness_witness_left - 0023
cases hdecoded - 0024
rewrite hdecoded_left at hfirst_witness_witness_right - 0025
rewrite hdecoded_right at hfirst_witness_witness_right - 0026
have hcross : p + m = n + q - 0027
specialize add_cross_sum_chain p - 0028
specialize add_cross_sum_chain n - 0029
specialize add_cross_sum_chain x3 - 0030
specialize add_cross_sum_chain x2 - 0031
specialize add_cross_sum_chain m - 0032
specialize add_cross_sum_chain q - 0033
apply add_cross_sum_chain - 0034
exact hfirst_witness_witness_right - 0035
trans m + x2 - 0036
apply add_comm - 0037
trans q + x3 - 0038
symm - 0039
exact hsecond_witness_witness_right - 0040
apply add_comm - 0041
trans n + q - 0042
exact hcross - 0043
apply add_comm