PP002A

prime_field_polynomial_horner_exists_unique

Alpha v34 independently verified · alpha_closed; checked-use authorized; not Stable

Constructive totality and uniqueness of genuine finite prime-field polynomial evaluation, including p=2 and length zero.

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 b c t l. (~((p) = 1) /\ forall pfa_factor_left_unique_prime pfa_factor_right_unique_prime. (p) = pfa_factor_left_unique_prime * pfa_factor_right_unique_prime -> pfa_factor_left_unique_prime = 1 \/ pfa_factor_right_unique_prime = 1) -> (forall fom_index_pfp_unique_coefficients. (exists fom_gap_pfp_unique_coefficients_index_bound. fom_gap_pfp_unique_coefficients_index_bound + S (fom_index_pfp_unique_coefficients) = l) -> exists fom_value_pfp_unique_coefficients. ((((exists fom_beta_height_pfp_unique_coefficients_entry. fom_beta_height_pfp_unique_coefficients_entry + S (fom_value_pfp_unique_coefficients) = S ((S (fom_index_pfp_unique_coefficients)) * c)) /\ exists fom_beta_quotient_pfp_unique_coefficients_entry. b = fom_beta_quotient_pfp_unique_coefficients_entry * S ((S (fom_index_pfp_unique_coefficients)) * c) + (fom_value_pfp_unique_coefficients))) /\ (exists fom_gap_pfp_unique_coefficients_value_bound. fom_gap_pfp_unique_coefficients_value_bound + S (fom_value_pfp_unique_coefficients) = p))) -> (exists pfa_gap_unique_base. pfa_gap_unique_base + S (t) = (p)) -> exists r. (exists pfh_trace_code_unique_chosen pfh_trace_scale_unique_chosen. (((exists pfa_gap_unique_chosentracebase. pfa_gap_unique_chosentracebase + S (t) = (p)) /\ (((((exists ff_h_pfp_unique_chosentraceinitial. ff_h_pfp_unique_chosentraceinitial + S (0) = S ((S (0)) * pfh_trace_scale_unique_chosen)) /\ exists ff_q_pfp_unique_chosentraceinitial. pfh_trace_code_unique_chosen = ff_q_pfp_unique_chosentraceinitial * S ((S (0)) * pfh_trace_scale_unique_chosen) + (0))) /\ (((((exists ff_h_pfp_unique_chosentraceterminal. ff_h_pfp_unique_chosentraceterminal + S (r) = S ((S (l)) * pfh_trace_scale_unique_chosen)) /\ exists ff_q_pfp_unique_chosentraceterminal. pfh_trace_code_unique_chosen = ff_q_pfp_unique_chosentraceterminal * S ((S (l)) * pfh_trace_scale_unique_chosen) + (r))) /\ ((forall pfh_index_unique_chosentracesteps. (exists pfa_gap_unique_chosentracestepsindex. pfa_gap_unique_chosentracestepsindex + S (pfh_index_unique_chosentracesteps) = (l)) -> (exists pfh_coefficient_unique_chosentracestepsstep pfh_before_unique_chosentracestepsstep pfh_after_unique_chosentracestepsstep pfh_product_unique_chosentracestepsstep. ((((exists ff_h_pfp_unique_chosentracestepsstepcoefficient. ff_h_pfp_unique_chosentracestepsstepcoefficient + S (pfh_coefficient_unique_chosentracestepsstep) = S ((S (pfh_index_unique_chosentracesteps)) * c)) /\ exists ff_q_pfp_unique_chosentracestepsstepcoefficient. b = ff_q_pfp_unique_chosentracestepsstepcoefficient * S ((S (pfh_index_unique_chosentracesteps)) * c) + (pfh_coefficient_unique_chosentracestepsstep))) /\ (((((exists ff_h_pfp_unique_chosentracestepsstepbefore. ff_h_pfp_unique_chosentracestepsstepbefore + S (pfh_before_unique_chosentracestepsstep) = S ((S (pfh_index_unique_chosentracesteps)) * pfh_trace_scale_unique_chosen)) /\ exists ff_q_pfp_unique_chosentracestepsstepbefore. pfh_trace_code_unique_chosen = ff_q_pfp_unique_chosentracestepsstepbefore * S ((S (pfh_index_unique_chosentracesteps)) * pfh_trace_scale_unique_chosen) + (pfh_before_unique_chosentracestepsstep))) /\ (((((exists ff_h_pfp_unique_chosentracestepsstepafter. ff_h_pfp_unique_chosentracestepsstepafter + S (pfh_after_unique_chosentracestepsstep) = S ((S (S (pfh_index_unique_chosentracesteps))) * pfh_trace_scale_unique_chosen)) /\ exists ff_q_pfp_unique_chosentracestepsstepafter. pfh_trace_code_unique_chosen = ff_q_pfp_unique_chosentracestepsstepafter * S ((S (S (pfh_index_unique_chosentracesteps))) * pfh_trace_scale_unique_chosen) + (pfh_after_unique_chosentracestepsstep))) /\ (((((exists pfa_gap_unique_chosentracestepsstepmultiplyleft. pfa_gap_unique_chosentracestepsstepmultiplyleft + S (pfh_before_unique_chosentracestepsstep) = (p)) /\ (((exists pfa_gap_unique_chosentracestepsstepmultiplyright. pfa_gap_unique_chosentracestepsstepmultiplyright + S (t) = (p)) /\ ((((exists pfa_gap_unique_chosentracestepsstepmultiplyresultbound. pfa_gap_unique_chosentracestepsstepmultiplyresultbound + S (pfh_product_unique_chosentracestepsstep) = (p)) /\ ((exists pfa_offset_left_unique_chosentracestepsstepmultiplyresultcongruence pfa_offset_right_unique_chosentracestepsstepmultiplyresultcongruence. ((pfh_before_unique_chosentracestepsstep) * (t)) + (p) * pfa_offset_left_unique_chosentracestepsstepmultiplyresultcongruence = (pfh_product_unique_chosentracestepsstep) + (p) * pfa_offset_right_unique_chosentracestepsstepmultiplyresultcongruence))))))))) /\ ((((exists pfa_gap_unique_chosentracestepsstepaddleft. pfa_gap_unique_chosentracestepsstepaddleft + S (pfh_product_unique_chosentracestepsstep) = (p)) /\ (((exists pfa_gap_unique_chosentracestepsstepaddright. pfa_gap_unique_chosentracestepsstepaddright + S (pfh_coefficient_unique_chosentracestepsstep) = (p)) /\ ((((exists pfa_gap_unique_chosentracestepsstepaddresultbound. pfa_gap_unique_chosentracestepsstepaddresultbound + S (pfh_after_unique_chosentracestepsstep) = (p)) /\ ((exists pfa_offset_left_unique_chosentracestepsstepaddresultcongruence pfa_offset_right_unique_chosentracestepsstepaddresultcongruence. ((pfh_product_unique_chosentracestepsstep) + (pfh_coefficient_unique_chosentracestepsstep)) + (p) * pfa_offset_left_unique_chosentracestepsstepaddresultcongruence = (pfh_after_unique_chosentracestepsstep) + (p) * pfa_offset_right_unique_chosentracestepsstepaddresultcongruence))))))))))))))))))))))))))) /\ forall s. (exists pfh_trace_code_unique_other pfh_trace_scale_unique_other. (((exists pfa_gap_unique_othertracebase. pfa_gap_unique_othertracebase + S (t) = (p)) /\ (((((exists ff_h_pfp_unique_othertraceinitial. ff_h_pfp_unique_othertraceinitial + S (0) = S ((S (0)) * pfh_trace_scale_unique_other)) /\ exists ff_q_pfp_unique_othertraceinitial. pfh_trace_code_unique_other = ff_q_pfp_unique_othertraceinitial * S ((S (0)) * pfh_trace_scale_unique_other) + (0))) /\ (((((exists ff_h_pfp_unique_othertraceterminal. ff_h_pfp_unique_othertraceterminal + S (s) = S ((S (l)) * pfh_trace_scale_unique_other)) /\ exists ff_q_pfp_unique_othertraceterminal. pfh_trace_code_unique_other = ff_q_pfp_unique_othertraceterminal * S ((S (l)) * pfh_trace_scale_unique_other) + (s))) /\ ((forall pfh_index_unique_othertracesteps. (exists pfa_gap_unique_othertracestepsindex. pfa_gap_unique_othertracestepsindex + S (pfh_index_unique_othertracesteps) = (l)) -> (exists pfh_coefficient_unique_othertracestepsstep pfh_before_unique_othertracestepsstep pfh_after_unique_othertracestepsstep pfh_product_unique_othertracestepsstep. ((((exists ff_h_pfp_unique_othertracestepsstepcoefficient. ff_h_pfp_unique_othertracestepsstepcoefficient + S (pfh_coefficient_unique_othertracestepsstep) = S ((S (pfh_index_unique_othertracesteps)) * c)) /\ exists ff_q_pfp_unique_othertracestepsstepcoefficient. b = ff_q_pfp_unique_othertracestepsstepcoefficient * S ((S (pfh_index_unique_othertracesteps)) * c) + (pfh_coefficient_unique_othertracestepsstep))) /\ (((((exists ff_h_pfp_unique_othertracestepsstepbefore. ff_h_pfp_unique_othertracestepsstepbefore + S (pfh_before_unique_othertracestepsstep) = S ((S (pfh_index_unique_othertracesteps)) * pfh_trace_scale_unique_other)) /\ exists ff_q_pfp_unique_othertracestepsstepbefore. pfh_trace_code_unique_other = ff_q_pfp_unique_othertracestepsstepbefore * S ((S (pfh_index_unique_othertracesteps)) * pfh_trace_scale_unique_other) + (pfh_before_unique_othertracestepsstep))) /\ (((((exists ff_h_pfp_unique_othertracestepsstepafter. ff_h_pfp_unique_othertracestepsstepafter + S (pfh_after_unique_othertracestepsstep) = S ((S (S (pfh_index_unique_othertracesteps))) * pfh_trace_scale_unique_other)) /\ exists ff_q_pfp_unique_othertracestepsstepafter. pfh_trace_code_unique_other = ff_q_pfp_unique_othertracestepsstepafter * S ((S (S (pfh_index_unique_othertracesteps))) * pfh_trace_scale_unique_other) + (pfh_after_unique_othertracestepsstep))) /\ (((((exists pfa_gap_unique_othertracestepsstepmultiplyleft. pfa_gap_unique_othertracestepsstepmultiplyleft + S (pfh_before_unique_othertracestepsstep) = (p)) /\ (((exists pfa_gap_unique_othertracestepsstepmultiplyright. pfa_gap_unique_othertracestepsstepmultiplyright + S (t) = (p)) /\ ((((exists pfa_gap_unique_othertracestepsstepmultiplyresultbound. pfa_gap_unique_othertracestepsstepmultiplyresultbound + S (pfh_product_unique_othertracestepsstep) = (p)) /\ ((exists pfa_offset_left_unique_othertracestepsstepmultiplyresultcongruence pfa_offset_right_unique_othertracestepsstepmultiplyresultcongruence. ((pfh_before_unique_othertracestepsstep) * (t)) + (p) * pfa_offset_left_unique_othertracestepsstepmultiplyresultcongruence = (pfh_product_unique_othertracestepsstep) + (p) * pfa_offset_right_unique_othertracestepsstepmultiplyresultcongruence))))))))) /\ ((((exists pfa_gap_unique_othertracestepsstepaddleft. pfa_gap_unique_othertracestepsstepaddleft + S (pfh_product_unique_othertracestepsstep) = (p)) /\ (((exists pfa_gap_unique_othertracestepsstepaddright. pfa_gap_unique_othertracestepsstepaddright + S (pfh_coefficient_unique_othertracestepsstep) = (p)) /\ ((((exists pfa_gap_unique_othertracestepsstepaddresultbound. pfa_gap_unique_othertracestepsstepaddresultbound + S (pfh_after_unique_othertracestepsstep) = (p)) /\ ((exists pfa_offset_left_unique_othertracestepsstepaddresultcongruence pfa_offset_right_unique_othertracestepsstepaddresultcongruence. ((pfh_product_unique_othertracestepsstep) + (pfh_coefficient_unique_othertracestepsstep)) + (p) * pfa_offset_left_unique_othertracestepsstepaddresultcongruence = (pfh_after_unique_othertracestepsstep) + (p) * pfa_offset_right_unique_othertracestepsstepaddresultcongruence))))))))))))))))))))))))))) -> s=r

Constructive proof overview

Generated structural guide

Constructive totality and uniqueness of genuine finite prime-field polynomial evaluation, including p=2 and length zero.

The unchanged tactic script uses 2 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

Direct dependents

none

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

35 script commands · 9 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.

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–8

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

  1. L1
    intro p
  2. L2
    intro b
  3. L3
    intro c
  4. L4
    intro t
  5. L5
    intro l
  6. L6
    intro hp
  7. L7
    intro hc
  8. L8
    intro ht
02Establish heL9–18

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply prime field polynomial horner exists.

  1. L9
    have he : ∃ r. FpHorner(p,b,c,t,l,r)Definitions: FpHorner
  2. L10
    specialize prime_field_polynomial_horner_exists (p)
  3. L11
    specialize prime_field_polynomial_horner_exists (b)
  4. L12
    specialize prime_field_polynomial_horner_exists (c)
  5. L13
    specialize prime_field_polynomial_horner_exists (t)
  6. L14
    specialize prime_field_polynomial_horner_exists (l)
  7. L15
    apply prime_field_polynomial_horner_exists
  8. L16
    exact hp
  9. L17
    exact hc
  10. L18
    exact ht
03Separate the logical casesL19–19

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

  1. L19
    cases he
04Construct an explicit witnessL20–20

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

  1. L20
    exists x
05Separate the logical casesL21–21

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

  1. L21
    split
06Use earlier factsL22–22

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

  1. L22
    exact he_witness
07Fix variables and assumptionsL23–24

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

  1. L23
    intro s
  2. L24
    intro hs
08Use earlier factsL25–34

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

  1. L25
    specialize prime_field_polynomial_horner_functional (p)
  2. L26
    specialize prime_field_polynomial_horner_functional (b)
  3. L27
    specialize prime_field_polynomial_horner_functional (c)
  4. L28
    specialize prime_field_polynomial_horner_functional (t)
  5. L29
    specialize prime_field_polynomial_horner_functional (l)
  6. L30
    specialize prime_field_polynomial_horner_functional (s)
  7. L31
    specialize prime_field_polynomial_horner_functional (x)
  8. L32
    apply prime_field_polynomial_horner_functional
  9. L33
    exact hp
  10. L34
    exact hs
09Use earlier factsL35–35

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

  1. L35
    exact he_witness

Library-wide reading audit

Original exact command ledger · 35 lines
  1. 0001intro p
  2. 0002intro b
  3. 0003intro c
  4. 0004intro t
  5. 0005intro l
  6. 0006intro hp
  7. 0007intro hc
  8. 0008intro ht
  9. 0009have he : exists r. (exists pfh_trace_code_unique_execution pfh_trace_scale_unique_execution. (((exists pfa_gap_unique_executiontracebase. pfa_gap_unique_executiontracebase + S (t) = (p)) /\ (((((exists ff_h_pfp_unique_executiontraceinitial. ff_h_pfp_unique_executiontraceinitial + S (0) = S ((S (0)) * pfh_trace_scale_unique_execution)) /\ exists ff_q_pfp_unique_executiontraceinitial. pfh_trace_code_unique_execution = ff_q_pfp_unique_executiontraceinitial * S ((S (0)) * pfh_trace_scale_unique_execution) + (0))) /\ (((((exists ff_h_pfp_unique_executiontraceterminal. ff_h_pfp_unique_executiontraceterminal + S (r) = S ((S (l)) * pfh_trace_scale_unique_execution)) /\ exists ff_q_pfp_unique_executiontraceterminal. pfh_trace_code_unique_execution = ff_q_pfp_unique_executiontraceterminal * S ((S (l)) * pfh_trace_scale_unique_execution) + (r))) /\ ((forall pfh_index_unique_executiontracesteps. (exists pfa_gap_unique_executiontracestepsindex. pfa_gap_unique_executiontracestepsindex + S (pfh_index_unique_executiontracesteps) = (l)) -> (exists pfh_coefficient_unique_executiontracestepsstep pfh_before_unique_executiontracestepsstep pfh_after_unique_executiontracestepsstep pfh_product_unique_executiontracestepsstep. ((((exists ff_h_pfp_unique_executiontracestepsstepcoefficient. ff_h_pfp_unique_executiontracestepsstepcoefficient + S (pfh_coefficient_unique_executiontracestepsstep) = S ((S (pfh_index_unique_executiontracesteps)) * c)) /\ exists ff_q_pfp_unique_executiontracestepsstepcoefficient. b = ff_q_pfp_unique_executiontracestepsstepcoefficient * S ((S (pfh_index_unique_executiontracesteps)) * c) + (pfh_coefficient_unique_executiontracestepsstep))) /\ (((((exists ff_h_pfp_unique_executiontracestepsstepbefore. ff_h_pfp_unique_executiontracestepsstepbefore + S (pfh_before_unique_executiontracestepsstep) = S ((S (pfh_index_unique_executiontracesteps)) * pfh_trace_scale_unique_execution)) /\ exists ff_q_pfp_unique_executiontracestepsstepbefore. pfh_trace_code_unique_execution = ff_q_pfp_unique_executiontracestepsstepbefore * S ((S (pfh_index_unique_executiontracesteps)) * pfh_trace_scale_unique_execution) + (pfh_before_unique_executiontracestepsstep))) /\ (((((exists ff_h_pfp_unique_executiontracestepsstepafter. ff_h_pfp_unique_executiontracestepsstepafter + S (pfh_after_unique_executiontracestepsstep) = S ((S (S (pfh_index_unique_executiontracesteps))) * pfh_trace_scale_unique_execution)) /\ exists ff_q_pfp_unique_executiontracestepsstepafter. pfh_trace_code_unique_execution = ff_q_pfp_unique_executiontracestepsstepafter * S ((S (S (pfh_index_unique_executiontracesteps))) * pfh_trace_scale_unique_execution) + (pfh_after_unique_executiontracestepsstep))) /\ (((((exists pfa_gap_unique_executiontracestepsstepmultiplyleft. pfa_gap_unique_executiontracestepsstepmultiplyleft + S (pfh_before_unique_executiontracestepsstep) = (p)) /\ (((exists pfa_gap_unique_executiontracestepsstepmultiplyright. pfa_gap_unique_executiontracestepsstepmultiplyright + S (t) = (p)) /\ ((((exists pfa_gap_unique_executiontracestepsstepmultiplyresultbound. pfa_gap_unique_executiontracestepsstepmultiplyresultbound + S (pfh_product_unique_executiontracestepsstep) = (p)) /\ ((exists pfa_offset_left_unique_executiontracestepsstepmultiplyresultcongruence pfa_offset_right_unique_executiontracestepsstepmultiplyresultcongruence. ((pfh_before_unique_executiontracestepsstep) * (t)) + (p) * pfa_offset_left_unique_executiontracestepsstepmultiplyresultcongruence = (pfh_product_unique_executiontracestepsstep) + (p) * pfa_offset_right_unique_executiontracestepsstepmultiplyresultcongruence))))))))) /\ ((((exists pfa_gap_unique_executiontracestepsstepaddleft. pfa_gap_unique_executiontracestepsstepaddleft + S (pfh_product_unique_executiontracestepsstep) = (p)) /\ (((exists pfa_gap_unique_executiontracestepsstepaddright. pfa_gap_unique_executiontracestepsstepaddright + S (pfh_coefficient_unique_executiontracestepsstep) = (p)) /\ ((((exists pfa_gap_unique_executiontracestepsstepaddresultbound. pfa_gap_unique_executiontracestepsstepaddresultbound + S (pfh_after_unique_executiontracestepsstep) = (p)) /\ ((exists pfa_offset_left_unique_executiontracestepsstepaddresultcongruence pfa_offset_right_unique_executiontracestepsstepaddresultcongruence. ((pfh_product_unique_executiontracestepsstep) + (pfh_coefficient_unique_executiontracestepsstep)) + (p) * pfa_offset_left_unique_executiontracestepsstepaddresultcongruence = (pfh_after_unique_executiontracestepsstep) + (p) * pfa_offset_right_unique_executiontracestepsstepaddresultcongruence)))))))))))))))))))))))))))
  10. 0010specialize prime_field_polynomial_horner_exists (p)
  11. 0011specialize prime_field_polynomial_horner_exists (b)
  12. 0012specialize prime_field_polynomial_horner_exists (c)
  13. 0013specialize prime_field_polynomial_horner_exists (t)
  14. 0014specialize prime_field_polynomial_horner_exists (l)
  15. 0015apply prime_field_polynomial_horner_exists
  16. 0016exact hp
  17. 0017exact hc
  18. 0018exact ht
  19. 0019cases he
  20. 0020exists x
  21. 0021split
  22. 0022exact he_witness
  23. 0023intro s
  24. 0024intro hs
  25. 0025specialize prime_field_polynomial_horner_functional (p)
  26. 0026specialize prime_field_polynomial_horner_functional (b)
  27. 0027specialize prime_field_polynomial_horner_functional (c)
  28. 0028specialize prime_field_polynomial_horner_functional (t)
  29. 0029specialize prime_field_polynomial_horner_functional (l)
  30. 0030specialize prime_field_polynomial_horner_functional (s)
  31. 0031specialize prime_field_polynomial_horner_functional (x)
  32. 0032apply prime_field_polynomial_horner_functional
  33. 0033exact hp
  34. 0034exact hs
  35. 0035exact he_witness