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.
Exact expanded first-order arithmetic statement
forall sa sb P Q sh N. (sa + sb) + Q = P + N -> (sh + (2 * P + 2 * P) = ((2 * 2) * sa + sb) + (2 * Q + 2 * Q)) -> sh + 3 * sb = 4 * NConstructive proof overview
Generated structural guide
The elementary compensation proves 4N=(2a-b)²+3b² without integer subtraction or an inequality assumption.
The unchanged tactic script uses 12 declared prerequisites and contains 324 exact native proof lines.
Alpha v34 checked-use · first admitted v28 · independently kernel and Lean verified; not Stable
Proof neighborhood
Direct dependencies
add_right_cancel Stable theorem; checked-use authorized add_mul Stable theorem; checked-use authorized mul_add Stable theorem; checked-use authorized mul_assoc Stable theorem; checked-use authorized add_assoc Stable theorem; checked-use authorized add_comm Stable theorem; checked-use authorized four_square_add_swap_right_tail Alpha theorem; checked-use authorized mul_succ_left Stable theorem; checked-use authorized mul_zero_left Stable theorem; checked-use authorized zero_add Stable theorem; checked-use authorized one_mul Stable theorem; checked-use authorized mul_one Stable theorem; checked-use authorizedDirect dependents
Formal native tactic body
Dependencies are introduced as named hypotheses before line 1. Local theorem links identify exact declared prerequisites. This exact body belongs to a complete independently kernel-checked constructive proof bundle and has Alpha checked-use authority; it does not imply Stable membership.
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–8
02Use earlier factsL9–12
03Calculate and transport equalitiesL13–22
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L13
trans (sh + (2 * P + 2 * P)) + 3 * sb - L14
trans ((sh) + ((sb) + ((sb) + ((sb) + ((P) + ((P) + ((P) + (P)))))))) - L15
simp [add_mul, mul_add, mul_assoc, add_assoc, mul_succ_left, mul_zero_left, zero_add, one_mul, mul_one] - L16
trans ((sh) + ((sb) + ((sb) + ((sb) + ((P) + ((P) + ((P) + (P)))))))) - L17
congr - L18
refl - L19
congr - L20
refl - L21
congr - L22
refl
04Calculate and transport equalitiesL23–32
05Calculate and transport equalitiesL33–41
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
06Use earlier factsL42–44
07Calculate and transport equalitiesL45–53
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
08Use earlier factsL54–56
09Calculate and transport equalitiesL57–65
10Use earlier factsL66–68
11Calculate and transport equalitiesL69–77
12Use earlier factsL78–80
13Calculate and transport equalitiesL81–90
14Calculate and transport equalitiesL91–100
15Calculate and transport equalitiesL101–110
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L101
symm - L102
simp [add_mul, mul_add, mul_assoc, add_assoc, mul_succ_left, mul_zero_left, zero_add, one_mul, mul_one] - L103
rewrite hdifference - L104
trans 4 * ((sa + sb) + Q) - L105
trans ((sa) + ((sa) + ((sa) + ((sa) + ((sb) + ((Q) + ((Q) + ((Q) + ((Q) + ((sb) + ((sb) + (sb)))))))))))) - L106
simp [add_mul, mul_add, mul_assoc, add_assoc, mul_succ_left, mul_zero_left, zero_add, one_mul, mul_one] - L107
trans ((sa) + ((sa) + ((sa) + ((sa) + ((sb) + ((Q) + ((Q) + ((Q) + ((Q) + ((sb) + ((sb) + (sb)))))))))))) - L108
congr - L109
refl - L110
congr
16Calculate and transport equalitiesL111–120
17Calculate and transport equalitiesL121–130
18Calculate and transport equalitiesL131–140
19Calculate and transport equalitiesL141–150
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
20Calculate and transport equalitiesL151–151
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L151
refl
21Use earlier factsL152–155
22Calculate and transport equalitiesL156–165
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
23Calculate and transport equalitiesL166–167
24Use earlier factsL168–171
25Calculate and transport equalitiesL172–181
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
26Calculate and transport equalitiesL182–183
27Use earlier factsL184–187
28Calculate and transport equalitiesL188–197
29Calculate and transport equalitiesL198–207
30Calculate and transport equalitiesL208–217
31Calculate and transport equalitiesL218–220
32Use earlier factsL221–221
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L221
exact hnorm
33Calculate and transport equalitiesL222–231
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L222
trans ((P) + ((P) + ((P) + ((P) + ((N) + ((N) + ((N) + (N)))))))) - L223
simp [add_mul, mul_add, mul_assoc, add_assoc, mul_succ_left, mul_zero_left, zero_add, one_mul, mul_one] - L224
trans ((P) + ((P) + ((P) + ((P) + ((N) + ((N) + ((N) + (N)))))))) - L225
congr - L226
refl - L227
congr - L228
refl - L229
congr - L230
refl - L231
congr
34Calculate and transport equalitiesL232–241
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
35Calculate and transport equalitiesL242–250
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
36Use earlier factsL251–254
37Calculate and transport equalitiesL255–264
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
38Calculate and transport equalitiesL265–266
39Use earlier factsL267–270
40Calculate and transport equalitiesL271–280
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
41Calculate and transport equalitiesL281–282
42Use earlier factsL283–286
43Calculate and transport equalitiesL287–296
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
44Calculate and transport equalitiesL297–298
45Use earlier factsL299–302
46Calculate and transport equalitiesL303–312
47Calculate and transport equalitiesL313–322
Original exact command ledger · 324 lines
- 0001
intro sa - 0002
intro sb - 0003
intro P - 0004
intro Q - 0005
intro sh - 0006
intro N - 0007
intro hnorm - 0008
intro hdifference - 0009
specialize add_right_cancel (sh + 3 * sb) - 0010
specialize add_right_cancel (4 * N) - 0011
specialize add_right_cancel (4 * P) - 0012
apply add_right_cancel - 0013
trans (sh + (2 * P + 2 * P)) + 3 * sb - 0014
trans ((sh) + ((sb) + ((sb) + ((sb) + ((P) + ((P) + ((P) + (P)))))))) - 0015
simp [add_mul, mul_add, mul_assoc, add_assoc, mul_succ_left, mul_zero_left, zero_add, one_mul, mul_one] - 0016
trans ((sh) + ((sb) + ((sb) + ((sb) + ((P) + ((P) + ((P) + (P)))))))) - 0017
congr - 0018
refl - 0019
congr - 0020
refl - 0021
congr - 0022
refl - 0023
congr - 0024
refl - 0025
congr - 0026
refl - 0027
congr - 0028
refl - 0029
congr - 0030
refl - 0031
refl - 0032
trans ((sh) + ((P) + ((P) + ((P) + ((P) + ((sb) + ((sb) + (sb)))))))) - 0033
congr - 0034
refl - 0035
trans ((P) + ((sb) + ((sb) + ((sb) + ((P) + ((P) + (P))))))) - 0036
trans ((sb) + ((P) + ((sb) + ((sb) + ((P) + ((P) + (P))))))) - 0037
congr - 0038
refl - 0039
trans ((sb) + ((P) + ((sb) + ((P) + ((P) + (P)))))) - 0040
congr - 0041
refl - 0042
apply four_square_add_swap_right_tail - 0043
apply four_square_add_swap_right_tail - 0044
apply four_square_add_swap_right_tail - 0045
congr - 0046
refl - 0047
trans ((P) + ((sb) + ((sb) + ((sb) + ((P) + (P)))))) - 0048
trans ((sb) + ((P) + ((sb) + ((sb) + ((P) + (P)))))) - 0049
congr - 0050
refl - 0051
trans ((sb) + ((P) + ((sb) + ((P) + (P))))) - 0052
congr - 0053
refl - 0054
apply four_square_add_swap_right_tail - 0055
apply four_square_add_swap_right_tail - 0056
apply four_square_add_swap_right_tail - 0057
congr - 0058
refl - 0059
trans ((P) + ((sb) + ((sb) + ((sb) + (P))))) - 0060
trans ((sb) + ((P) + ((sb) + ((sb) + (P))))) - 0061
congr - 0062
refl - 0063
trans ((sb) + ((P) + ((sb) + (P)))) - 0064
congr - 0065
refl - 0066
apply four_square_add_swap_right_tail - 0067
apply four_square_add_swap_right_tail - 0068
apply four_square_add_swap_right_tail - 0069
congr - 0070
refl - 0071
trans ((P) + ((sb) + ((sb) + (sb)))) - 0072
trans ((sb) + ((P) + ((sb) + (sb)))) - 0073
congr - 0074
refl - 0075
trans ((sb) + ((P) + (sb))) - 0076
congr - 0077
refl - 0078
apply add_comm - 0079
apply four_square_add_swap_right_tail - 0080
apply four_square_add_swap_right_tail - 0081
congr - 0082
refl - 0083
refl - 0084
trans ((sh) + ((P) + ((P) + ((P) + ((P) + ((sb) + ((sb) + (sb)))))))) - 0085
symm - 0086
congr - 0087
refl - 0088
congr - 0089
refl - 0090
congr - 0091
refl - 0092
congr - 0093
refl - 0094
congr - 0095
refl - 0096
congr - 0097
refl - 0098
congr - 0099
refl - 0100
refl - 0101
symm - 0102
simp [add_mul, mul_add, mul_assoc, add_assoc, mul_succ_left, mul_zero_left, zero_add, one_mul, mul_one] - 0103
rewrite hdifference - 0104
trans 4 * ((sa + sb) + Q) - 0105
trans ((sa) + ((sa) + ((sa) + ((sa) + ((sb) + ((Q) + ((Q) + ((Q) + ((Q) + ((sb) + ((sb) + (sb)))))))))))) - 0106
simp [add_mul, mul_add, mul_assoc, add_assoc, mul_succ_left, mul_zero_left, zero_add, one_mul, mul_one] - 0107
trans ((sa) + ((sa) + ((sa) + ((sa) + ((sb) + ((Q) + ((Q) + ((Q) + ((Q) + ((sb) + ((sb) + (sb)))))))))))) - 0108
congr - 0109
refl - 0110
congr - 0111
refl - 0112
congr - 0113
refl - 0114
congr - 0115
refl - 0116
congr - 0117
refl - 0118
congr - 0119
refl - 0120
congr - 0121
refl - 0122
congr - 0123
refl - 0124
congr - 0125
refl - 0126
congr - 0127
refl - 0128
congr - 0129
refl - 0130
refl - 0131
trans ((sa) + ((sa) + ((sa) + ((sa) + ((sb) + ((sb) + ((sb) + ((sb) + ((Q) + ((Q) + ((Q) + (Q)))))))))))) - 0132
congr - 0133
refl - 0134
congr - 0135
refl - 0136
congr - 0137
refl - 0138
congr - 0139
refl - 0140
congr - 0141
refl - 0142
trans ((sb) + ((Q) + ((Q) + ((Q) + ((Q) + ((sb) + (sb))))))) - 0143
trans ((Q) + ((sb) + ((Q) + ((Q) + ((Q) + ((sb) + (sb))))))) - 0144
congr - 0145
refl - 0146
trans ((Q) + ((sb) + ((Q) + ((Q) + ((sb) + (sb)))))) - 0147
congr - 0148
refl - 0149
trans ((Q) + ((sb) + ((Q) + ((sb) + (sb))))) - 0150
congr - 0151
refl - 0152
apply four_square_add_swap_right_tail - 0153
apply four_square_add_swap_right_tail - 0154
apply four_square_add_swap_right_tail - 0155
apply four_square_add_swap_right_tail - 0156
congr - 0157
refl - 0158
trans ((sb) + ((Q) + ((Q) + ((Q) + ((Q) + (sb)))))) - 0159
trans ((Q) + ((sb) + ((Q) + ((Q) + ((Q) + (sb)))))) - 0160
congr - 0161
refl - 0162
trans ((Q) + ((sb) + ((Q) + ((Q) + (sb))))) - 0163
congr - 0164
refl - 0165
trans ((Q) + ((sb) + ((Q) + (sb)))) - 0166
congr - 0167
refl - 0168
apply four_square_add_swap_right_tail - 0169
apply four_square_add_swap_right_tail - 0170
apply four_square_add_swap_right_tail - 0171
apply four_square_add_swap_right_tail - 0172
congr - 0173
refl - 0174
trans ((sb) + ((Q) + ((Q) + ((Q) + (Q))))) - 0175
trans ((Q) + ((sb) + ((Q) + ((Q) + (Q))))) - 0176
congr - 0177
refl - 0178
trans ((Q) + ((sb) + ((Q) + (Q)))) - 0179
congr - 0180
refl - 0181
trans ((Q) + ((sb) + (Q))) - 0182
congr - 0183
refl - 0184
apply add_comm - 0185
apply four_square_add_swap_right_tail - 0186
apply four_square_add_swap_right_tail - 0187
apply four_square_add_swap_right_tail - 0188
congr - 0189
refl - 0190
refl - 0191
trans ((sa) + ((sa) + ((sa) + ((sa) + ((sb) + ((sb) + ((sb) + ((sb) + ((Q) + ((Q) + ((Q) + (Q)))))))))))) - 0192
symm - 0193
congr - 0194
refl - 0195
congr - 0196
refl - 0197
congr - 0198
refl - 0199
congr - 0200
refl - 0201
congr - 0202
refl - 0203
congr - 0204
refl - 0205
congr - 0206
refl - 0207
congr - 0208
refl - 0209
congr - 0210
refl - 0211
congr - 0212
refl - 0213
congr - 0214
refl - 0215
refl - 0216
symm - 0217
simp [add_mul, mul_add, mul_assoc, add_assoc, mul_succ_left, mul_zero_left, zero_add, one_mul, mul_one] - 0218
trans 4 * (P + N) - 0219
congr - 0220
refl - 0221
exact hnorm - 0222
trans ((P) + ((P) + ((P) + ((P) + ((N) + ((N) + ((N) + (N)))))))) - 0223
simp [add_mul, mul_add, mul_assoc, add_assoc, mul_succ_left, mul_zero_left, zero_add, one_mul, mul_one] - 0224
trans ((P) + ((P) + ((P) + ((P) + ((N) + ((N) + ((N) + (N)))))))) - 0225
congr - 0226
refl - 0227
congr - 0228
refl - 0229
congr - 0230
refl - 0231
congr - 0232
refl - 0233
congr - 0234
refl - 0235
congr - 0236
refl - 0237
congr - 0238
refl - 0239
refl - 0240
trans ((N) + ((N) + ((N) + ((N) + ((P) + ((P) + ((P) + (P)))))))) - 0241
trans ((N) + ((P) + ((P) + ((P) + ((P) + ((N) + ((N) + (N)))))))) - 0242
trans ((P) + ((N) + ((P) + ((P) + ((P) + ((N) + ((N) + (N)))))))) - 0243
congr - 0244
refl - 0245
trans ((P) + ((N) + ((P) + ((P) + ((N) + ((N) + (N))))))) - 0246
congr - 0247
refl - 0248
trans ((P) + ((N) + ((P) + ((N) + ((N) + (N)))))) - 0249
congr - 0250
refl - 0251
apply four_square_add_swap_right_tail - 0252
apply four_square_add_swap_right_tail - 0253
apply four_square_add_swap_right_tail - 0254
apply four_square_add_swap_right_tail - 0255
congr - 0256
refl - 0257
trans ((N) + ((P) + ((P) + ((P) + ((P) + ((N) + (N))))))) - 0258
trans ((P) + ((N) + ((P) + ((P) + ((P) + ((N) + (N))))))) - 0259
congr - 0260
refl - 0261
trans ((P) + ((N) + ((P) + ((P) + ((N) + (N)))))) - 0262
congr - 0263
refl - 0264
trans ((P) + ((N) + ((P) + ((N) + (N))))) - 0265
congr - 0266
refl - 0267
apply four_square_add_swap_right_tail - 0268
apply four_square_add_swap_right_tail - 0269
apply four_square_add_swap_right_tail - 0270
apply four_square_add_swap_right_tail - 0271
congr - 0272
refl - 0273
trans ((N) + ((P) + ((P) + ((P) + ((P) + (N)))))) - 0274
trans ((P) + ((N) + ((P) + ((P) + ((P) + (N)))))) - 0275
congr - 0276
refl - 0277
trans ((P) + ((N) + ((P) + ((P) + (N))))) - 0278
congr - 0279
refl - 0280
trans ((P) + ((N) + ((P) + (N)))) - 0281
congr - 0282
refl - 0283
apply four_square_add_swap_right_tail - 0284
apply four_square_add_swap_right_tail - 0285
apply four_square_add_swap_right_tail - 0286
apply four_square_add_swap_right_tail - 0287
congr - 0288
refl - 0289
trans ((N) + ((P) + ((P) + ((P) + (P))))) - 0290
trans ((P) + ((N) + ((P) + ((P) + (P))))) - 0291
congr - 0292
refl - 0293
trans ((P) + ((N) + ((P) + (P)))) - 0294
congr - 0295
refl - 0296
trans ((P) + ((N) + (P))) - 0297
congr - 0298
refl - 0299
apply add_comm - 0300
apply four_square_add_swap_right_tail - 0301
apply four_square_add_swap_right_tail - 0302
apply four_square_add_swap_right_tail - 0303
congr - 0304
refl - 0305
refl - 0306
trans ((N) + ((N) + ((N) + ((N) + ((P) + ((P) + ((P) + (P)))))))) - 0307
symm - 0308
congr - 0309
refl - 0310
congr - 0311
refl - 0312
congr - 0313
refl - 0314
congr - 0315
refl - 0316
congr - 0317
refl - 0318
congr - 0319
refl - 0320
congr - 0321
refl - 0322
refl - 0323
symm - 0324
simp [add_mul, mul_add, mul_assoc, add_assoc, mul_succ_left, mul_zero_left, zero_add, one_mul, mul_one]