FP0053

prime_field_unit_multiple_from_residue

Public research checkpoint, not admitted to Alpha or Stable. Alpha v30 remains 3222 checked-use theorems; Stable remains 432. The on-demand Alpha Lean service does not yet expose these checkpoint theorems; their independently checked literal bundles and unchanged sources are available below.

Public research checkpoint: original HA and independently compiled Lean verified; not Alpha-enrolled, no Alpha checked-use authority; not Stable

Construct a genuine repeated-addition history ending at any supplied canonical residue; the trace invariant is proved, not assumed.

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.

Public research checkpoint: original HA and independently compiled Lean verified; not Alpha-enrolled, no Alpha checked-use authority; not Stable

Proof neighborhood

Direct dependencies

Direct dependents

Formal native tactic body

Dependencies are introduced as named hypotheses before line 1. Local theorem links identify exact declared prerequisites. The literal dependency-closed bundle is checked by original HA and the independently compiled Lean verifier. Public delivery grants no Alpha checked-use authority or Stable membership.

Read the argument

Proof checkpoints

35 script commands · 8 reading checkpoints · 3 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.

Named ingredients (2)

Long local formulas use this family’s existing definitions. Each new abbreviation was expanded back to the identical native formula, including its free-variable context. The original edition is preserved below.

01Fix variables and assumptionsL1–5

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

  1. L1
    intro p
  2. L2
    intro n
  3. L3
    intro r
  4. L4
    intro hp
  5. L5
    intro hr
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.

  1. L6
    have ht : ∃ b. ∃ c. ∃ s. FpUnitTrace(p,b,c,n,s)Definitions: FpUnitTrace
  2. L7
    specialize prime_field_unit_trace_exists (p)
  3. L8
    specialize prime_field_unit_trace_exists (n)
  4. L9
    apply prime_field_unit_trace_exists
  5. L10
    exact hp
03Separate the logical casesL11–13

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

  1. L11
    cases ht
  2. L12
    cases ht_witness
  3. L13
    cases ht_witness_witness
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.

  1. 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)))
  2. L15
    specialize prime_field_unit_trace_residue (p)
  3. L16
    specialize prime_field_unit_trace_residue (n)
  4. L17
    specialize prime_field_unit_trace_residue (x)
  5. L18
    specialize prime_field_unit_trace_residue (x1)
  6. L19
    specialize prime_field_unit_trace_residue (x2)
  7. L20
    apply prime_field_unit_trace_residue
  8. L21
    exact hp
  9. 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.

  1. L23
    have heq : x2 = r
  2. L24
    specialize binary_canonical_residue_functional (p)
  3. L25
    specialize binary_canonical_residue_functional (n)
  4. L26
    specialize binary_canonical_residue_functional (x2)
  5. L27
    specialize binary_canonical_residue_functional (r)
  6. L28
    apply binary_canonical_residue_functional
  7. L29
    exact hs
  8. L30
    exact hr
06Construct an explicit witnessL31–32

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

  1. L31
    exists x
  2. L32
    exists x1
07Calculate and transport equalitiesL33–34

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

  1. L33
    rewrite heq at ht_witness_witness_witness
  2. L34
    rewrite heq at ht_witness_witness_witness
08Use earlier factsL35–35

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

  1. L35
    exact ht_witness_witness_witness

Library-wide reading audit

Original exact command ledger · 35 lines
  1. 0001intro p
  2. 0002intro n
  3. 0003intro r
  4. 0004intro hp
  5. 0005intro hr
  6. 0006have 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)))))))))))))))))))
  7. 0007specialize prime_field_unit_trace_exists (p)
  8. 0008specialize prime_field_unit_trace_exists (n)
  9. 0009apply prime_field_unit_trace_exists
  10. 0010exact hp
  11. 0011cases ht
  12. 0012cases ht_witness
  13. 0013cases ht_witness_witness
  14. 0014have 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)))
  15. 0015specialize prime_field_unit_trace_residue (p)
  16. 0016specialize prime_field_unit_trace_residue (n)
  17. 0017specialize prime_field_unit_trace_residue (x)
  18. 0018specialize prime_field_unit_trace_residue (x1)
  19. 0019specialize prime_field_unit_trace_residue (x2)
  20. 0020apply prime_field_unit_trace_residue
  21. 0021exact hp
  22. 0022exact ht_witness_witness_witness
  23. 0023have heq : x2 = r
  24. 0024specialize binary_canonical_residue_functional (p)
  25. 0025specialize binary_canonical_residue_functional (n)
  26. 0026specialize binary_canonical_residue_functional (x2)
  27. 0027specialize binary_canonical_residue_functional (r)
  28. 0028apply binary_canonical_residue_functional
  29. 0029exact hs
  30. 0030exact hr
  31. 0031exists x
  32. 0032exists x1
  33. 0033rewrite heq at ht_witness_witness_witness
  34. 0034rewrite heq at ht_witness_witness_witness
  35. 0035exact ht_witness_witness_witness