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 expanded first-order arithmetic statement
forall p n r. (~((p) = 1) /\ forall pfa_factor_left_multiple_construct_domain pfa_factor_right_multiple_construct_domain. (p) = pfa_factor_left_multiple_construct_domain * pfa_factor_right_multiple_construct_domain -> pfa_factor_left_multiple_construct_domain = 1 \/ pfa_factor_right_multiple_construct_domain = 1) -> (((exists pfa_gap_multiple_construct_residuebound. pfa_gap_multiple_construct_residuebound + S (r) = (p)) /\ ((exists pfa_offset_left_multiple_construct_residuecongruence pfa_offset_right_multiple_construct_residuecongruence. (n) + (p) * pfa_offset_left_multiple_construct_residuecongruence = (r) + (p) * pfa_offset_right_multiple_construct_residuecongruence)))) -> (exists pff_history_code_multiple_construct_result pff_history_scale_multiple_construct_result. (((((exists ff_h_pft_multiple_construct_resulthistorystart. ff_h_pft_multiple_construct_resulthistorystart + S (0) = S ((S (0)) * pff_history_scale_multiple_construct_result)) /\ exists ff_q_pft_multiple_construct_resulthistorystart. pff_history_code_multiple_construct_result = ff_q_pft_multiple_construct_resulthistorystart * S ((S (0)) * pff_history_scale_multiple_construct_result) + (0))) /\ (((((exists ff_h_pft_multiple_construct_resulthistoryterminal. ff_h_pft_multiple_construct_resulthistoryterminal + S (r) = S ((S (n)) * pff_history_scale_multiple_construct_result)) /\ exists ff_q_pft_multiple_construct_resulthistoryterminal. pff_history_code_multiple_construct_result = ff_q_pft_multiple_construct_resulthistoryterminal * S ((S (n)) * pff_history_scale_multiple_construct_result) + (r))) /\ ((forall pff_trace_index_multiple_construct_resulthistorysteps. (exists pfa_gap_multiple_construct_resulthistorystepsindex. pfa_gap_multiple_construct_resulthistorystepsindex + S (pff_trace_index_multiple_construct_resulthistorysteps) = (n)) -> exists pff_trace_before_multiple_construct_resulthistorysteps pff_trace_after_multiple_construct_resulthistorysteps. ((((exists ff_h_pft_multiple_construct_resulthistorystepsbefore. ff_h_pft_multiple_construct_resulthistorystepsbefore + S (pff_trace_before_multiple_construct_resulthistorysteps) = S ((S (pff_trace_index_multiple_construct_resulthistorysteps)) * pff_history_scale_multiple_construct_result)) /\ exists ff_q_pft_multiple_construct_resulthistorystepsbefore. pff_history_code_multiple_construct_result = ff_q_pft_multiple_construct_resulthistorystepsbefore * S ((S (pff_trace_index_multiple_construct_resulthistorysteps)) * pff_history_scale_multiple_construct_result) + (pff_trace_before_multiple_construct_resulthistorysteps))) /\ (((((exists ff_h_pft_multiple_construct_resulthistorystepsafter. ff_h_pft_multiple_construct_resulthistorystepsafter + S (pff_trace_after_multiple_construct_resulthistorysteps) = S ((S (S (pff_trace_index_multiple_construct_resulthistorysteps))) * pff_history_scale_multiple_construct_result)) /\ exists ff_q_pft_multiple_construct_resulthistorystepsafter. pff_history_code_multiple_construct_result = ff_q_pft_multiple_construct_resulthistorystepsafter * S ((S (S (pff_trace_index_multiple_construct_resulthistorysteps))) * pff_history_scale_multiple_construct_result) + (pff_trace_after_multiple_construct_resulthistorysteps))) /\ ((((exists pfa_gap_multiple_construct_resulthistorystepsadditionleft. pfa_gap_multiple_construct_resulthistorystepsadditionleft + S (pff_trace_before_multiple_construct_resulthistorysteps) = (p)) /\ (((exists pfa_gap_multiple_construct_resulthistorystepsadditionright. pfa_gap_multiple_construct_resulthistorystepsadditionright + S (1) = (p)) /\ ((((exists pfa_gap_multiple_construct_resulthistorystepsadditionresultbound. pfa_gap_multiple_construct_resulthistorystepsadditionresultbound + S (pff_trace_after_multiple_construct_resulthistorysteps) = (p)) /\ ((exists pfa_offset_left_multiple_construct_resulthistorystepsadditionresultcongruence pfa_offset_right_multiple_construct_resulthistorystepsadditionresultcongruence. ((pff_trace_before_multiple_construct_resulthistorysteps) + (1)) + (p) * pfa_offset_left_multiple_construct_resulthistorystepsadditionresultcongruence = (pff_trace_after_multiple_construct_resulthistorysteps) + (p) * pfa_offset_right_multiple_construct_resulthistorystepsadditionresultcongruence))))))))))))))))))))Constructive proof overview
Generated structural guide
Construct a genuine repeated-addition history ending at any supplied canonical residue; the trace invariant is proved, not assumed.
The unchanged tactic script uses 3 declared prerequisites and contains 35 exact native proof lines.
Alpha v34 checked-use · first admitted v31 · independently kernel and Lean verified; not Stable
Proof neighborhood
Direct dependencies
FP0051 prime_field_unit_trace_exists FP004F prime_field_unit_trace_residue binary_canonical_residue_functional Alpha 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.
Named ingredients (2)
01Fix variables and assumptionsL1–5
02Establish htL6–10
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply prime field unit trace exists.
03Separate the logical casesL11–13
04Establish hsL14–22
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply prime field unit trace residue.
- L14
have hs : ((exists pfa_gap_multiple_construct_computedbound. pfa_gap_multiple_construct_computedbound + S (x2) = (p)) /\ ((exists pfa_offset_left_multiple_construct_computedcongruence pfa_offset_right_multiple_construct_computedcongruence. (n) + (p) * pfa_offset_left_multiple_construct_computedcongruence = (x2) + (p) * pfa_offset_right_multiple_construct_computedcongruence))) - L15
specialize prime_field_unit_trace_residue (p) - L16
specialize prime_field_unit_trace_residue (n) - L17
specialize prime_field_unit_trace_residue (x) - L18
specialize prime_field_unit_trace_residue (x1) - L19
specialize prime_field_unit_trace_residue (x2) - L20
apply prime_field_unit_trace_residue - L21
exact hp - L22
exact ht_witness_witness_witness
05Establish heqL23–30
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply binary canonical residue functional.
06Construct an explicit witnessL31–32
07Calculate and transport equalitiesL33–34
08Use earlier factsL35–35
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L35
exact ht_witness_witness_witness
Original exact command ledger · 35 lines
- 0001
intro p - 0002
intro n - 0003
intro r - 0004
intro hp - 0005
intro hr - 0006
have ht : exists b c s. (((((exists ff_h_pft_multiple_construct_tracestart. ff_h_pft_multiple_construct_tracestart + S (0) = S ((S (0)) * c)) /\ exists ff_q_pft_multiple_construct_tracestart. b = ff_q_pft_multiple_construct_tracestart * S ((S (0)) * c) + (0))) /\ (((((exists ff_h_pft_multiple_construct_traceterminal. ff_h_pft_multiple_construct_traceterminal + S (s) = S ((S (n)) * c)) /\ exists ff_q_pft_multiple_construct_traceterminal. b = ff_q_pft_multiple_construct_traceterminal * S ((S (n)) * c) + (s))) /\ ((forall pff_trace_index_multiple_construct_tracesteps. (exists pfa_gap_multiple_construct_tracestepsindex. pfa_gap_multiple_construct_tracestepsindex + S (pff_trace_index_multiple_construct_tracesteps) = (n)) -> exists pff_trace_before_multiple_construct_tracesteps pff_trace_after_multiple_construct_tracesteps. ((((exists ff_h_pft_multiple_construct_tracestepsbefore. ff_h_pft_multiple_construct_tracestepsbefore + S (pff_trace_before_multiple_construct_tracesteps) = S ((S (pff_trace_index_multiple_construct_tracesteps)) * c)) /\ exists ff_q_pft_multiple_construct_tracestepsbefore. b = ff_q_pft_multiple_construct_tracestepsbefore * S ((S (pff_trace_index_multiple_construct_tracesteps)) * c) + (pff_trace_before_multiple_construct_tracesteps))) /\ (((((exists ff_h_pft_multiple_construct_tracestepsafter. ff_h_pft_multiple_construct_tracestepsafter + S (pff_trace_after_multiple_construct_tracesteps) = S ((S (S (pff_trace_index_multiple_construct_tracesteps))) * c)) /\ exists ff_q_pft_multiple_construct_tracestepsafter. b = ff_q_pft_multiple_construct_tracestepsafter * S ((S (S (pff_trace_index_multiple_construct_tracesteps))) * c) + (pff_trace_after_multiple_construct_tracesteps))) /\ ((((exists pfa_gap_multiple_construct_tracestepsadditionleft. pfa_gap_multiple_construct_tracestepsadditionleft + S (pff_trace_before_multiple_construct_tracesteps) = (p)) /\ (((exists pfa_gap_multiple_construct_tracestepsadditionright. pfa_gap_multiple_construct_tracestepsadditionright + S (1) = (p)) /\ ((((exists pfa_gap_multiple_construct_tracestepsadditionresultbound. pfa_gap_multiple_construct_tracestepsadditionresultbound + S (pff_trace_after_multiple_construct_tracesteps) = (p)) /\ ((exists pfa_offset_left_multiple_construct_tracestepsadditionresultcongruence pfa_offset_right_multiple_construct_tracestepsadditionresultcongruence. ((pff_trace_before_multiple_construct_tracesteps) + (1)) + (p) * pfa_offset_left_multiple_construct_tracestepsadditionresultcongruence = (pff_trace_after_multiple_construct_tracesteps) + (p) * pfa_offset_right_multiple_construct_tracestepsadditionresultcongruence))))))))))))))))))) - 0007
specialize prime_field_unit_trace_exists (p) - 0008
specialize prime_field_unit_trace_exists (n) - 0009
apply prime_field_unit_trace_exists - 0010
exact hp - 0011
cases ht - 0012
cases ht_witness - 0013
cases ht_witness_witness - 0014
have hs : ((exists pfa_gap_multiple_construct_computedbound. pfa_gap_multiple_construct_computedbound + S (x2) = (p)) /\ ((exists pfa_offset_left_multiple_construct_computedcongruence pfa_offset_right_multiple_construct_computedcongruence. (n) + (p) * pfa_offset_left_multiple_construct_computedcongruence = (x2) + (p) * pfa_offset_right_multiple_construct_computedcongruence))) - 0015
specialize prime_field_unit_trace_residue (p) - 0016
specialize prime_field_unit_trace_residue (n) - 0017
specialize prime_field_unit_trace_residue (x) - 0018
specialize prime_field_unit_trace_residue (x1) - 0019
specialize prime_field_unit_trace_residue (x2) - 0020
apply prime_field_unit_trace_residue - 0021
exact hp - 0022
exact ht_witness_witness_witness - 0023
have heq : x2 = r - 0024
specialize binary_canonical_residue_functional (p) - 0025
specialize binary_canonical_residue_functional (n) - 0026
specialize binary_canonical_residue_functional (x2) - 0027
specialize binary_canonical_residue_functional (r) - 0028
apply binary_canonical_residue_functional - 0029
exact hs - 0030
exact hr - 0031
exists x - 0032
exists x1 - 0033
rewrite heq at ht_witness_witness_witness - 0034
rewrite heq at ht_witness_witness_witness - 0035
exact ht_witness_witness_witness