PQ0047

prime_field_polynomial_synthetic_exists

Construct the actual quotient code and remainder from a real modular Horner history, for every nonempty canonical coefficient prefix.

Alpha v34 checked-use · first admitted v32 · independently kernel and Lean verified; not Stable

Current library: Alpha v34, 4,223 checked-use theorems; Stable remains 432. Historical first admissions, original proof editions, and non-admitted aliases are preserved.

All coefficients retain the established highest-degree-first order. Trimming handles empty and all-zero prefixes; monic normalization requires a nonzero leading coefficient. Synthetic division has a nonempty input of length S n and a quotient of length n, unique in decoded values. Its coefficient recurrence, actual evaluation remainder and positive-degree drop are checked. General polynomial Euclidean division, gcd/Bezout, an arbitrary-convolution factor theorem, irreducible-polynomial existence and the full G091 prime-power-field endpoint remain open. These exact theorems are first admitted to Alpha v32; Stable remains unchanged.

Exact theorem in conservative defined notation

∀ p. ∀ b. ∀ c. ∀ a. ∀ n. Prime(p)BetaPrefixInto(b,c,S n,p)Lt(a,p) → ∃ x. ∃ y. ∃ z. FpSyntheticDivision(p,b,c,a,n,x,y,z)

Every linked abbreviation expands hygienically to the identical original native formula.

Definition DAG

Actual proof prerequisites

Original expanded first-order statement
forall p b c a n. (~((p) = 1) /\ forall pfa_factor_left_construct_prime pfa_factor_right_construct_prime. (p) = pfa_factor_left_construct_prime * pfa_factor_right_construct_prime -> pfa_factor_left_construct_prime = 1 \/ pfa_factor_right_construct_prime = 1) -> (forall fom_index_pfp_construct_coefficients. (exists fom_gap_pfp_construct_coefficients_index_bound. fom_gap_pfp_construct_coefficients_index_bound + S (fom_index_pfp_construct_coefficients) = S n) -> exists fom_value_pfp_construct_coefficients. ((((exists fom_beta_height_pfp_construct_coefficients_entry. fom_beta_height_pfp_construct_coefficients_entry + S (fom_value_pfp_construct_coefficients) = S ((S (fom_index_pfp_construct_coefficients)) * c)) /\ exists fom_beta_quotient_pfp_construct_coefficients_entry. b = fom_beta_quotient_pfp_construct_coefficients_entry * S ((S (fom_index_pfp_construct_coefficients)) * c) + (fom_value_pfp_construct_coefficients))) /\ (exists fom_gap_pfp_construct_coefficients_value_bound. fom_gap_pfp_construct_coefficients_value_bound + S (fom_value_pfp_construct_coefficients) = p))) -> (exists pfa_gap_construct_base. pfa_gap_construct_base + S (a) = (p)) -> exists qb qc r. (exists pfs_history_code_construct_result pfs_history_scale_construct_result. ((((exists pfa_gap_construct_resulttracebase. pfa_gap_construct_resulttracebase + S (a) = (p)) /\ (((((exists ff_h_pfp_construct_resulttraceinitial. ff_h_pfp_construct_resulttraceinitial + S (0) = S ((S (0)) * pfs_history_scale_construct_result)) /\ exists ff_q_pfp_construct_resulttraceinitial. pfs_history_code_construct_result = ff_q_pfp_construct_resulttraceinitial * S ((S (0)) * pfs_history_scale_construct_result) + (0))) /\ (((((exists ff_h_pfp_construct_resulttraceterminal. ff_h_pfp_construct_resulttraceterminal + S (r) = S ((S (S (n))) * pfs_history_scale_construct_result)) /\ exists ff_q_pfp_construct_resulttraceterminal. pfs_history_code_construct_result = ff_q_pfp_construct_resulttraceterminal * S ((S (S (n))) * pfs_history_scale_construct_result) + (r))) /\ ((forall pfh_index_construct_resulttracesteps. (exists pfa_gap_construct_resulttracestepsindex. pfa_gap_construct_resulttracestepsindex + S (pfh_index_construct_resulttracesteps) = (S (n))) -> (exists pfh_coefficient_construct_resulttracestepsstep pfh_before_construct_resulttracestepsstep pfh_after_construct_resulttracestepsstep pfh_product_construct_resulttracestepsstep. ((((exists ff_h_pfp_construct_resulttracestepsstepcoefficient. ff_h_pfp_construct_resulttracestepsstepcoefficient + S (pfh_coefficient_construct_resulttracestepsstep) = S ((S (pfh_index_construct_resulttracesteps)) * c)) /\ exists ff_q_pfp_construct_resulttracestepsstepcoefficient. b = ff_q_pfp_construct_resulttracestepsstepcoefficient * S ((S (pfh_index_construct_resulttracesteps)) * c) + (pfh_coefficient_construct_resulttracestepsstep))) /\ (((((exists ff_h_pfp_construct_resulttracestepsstepbefore. ff_h_pfp_construct_resulttracestepsstepbefore + S (pfh_before_construct_resulttracestepsstep) = S ((S (pfh_index_construct_resulttracesteps)) * pfs_history_scale_construct_result)) /\ exists ff_q_pfp_construct_resulttracestepsstepbefore. pfs_history_code_construct_result = ff_q_pfp_construct_resulttracestepsstepbefore * S ((S (pfh_index_construct_resulttracesteps)) * pfs_history_scale_construct_result) + (pfh_before_construct_resulttracestepsstep))) /\ (((((exists ff_h_pfp_construct_resulttracestepsstepafter. ff_h_pfp_construct_resulttracestepsstepafter + S (pfh_after_construct_resulttracestepsstep) = S ((S (S (pfh_index_construct_resulttracesteps))) * pfs_history_scale_construct_result)) /\ exists ff_q_pfp_construct_resulttracestepsstepafter. pfs_history_code_construct_result = ff_q_pfp_construct_resulttracestepsstepafter * S ((S (S (pfh_index_construct_resulttracesteps))) * pfs_history_scale_construct_result) + (pfh_after_construct_resulttracestepsstep))) /\ (((((exists pfa_gap_construct_resulttracestepsstepmultiplyleft. pfa_gap_construct_resulttracestepsstepmultiplyleft + S (pfh_before_construct_resulttracestepsstep) = (p)) /\ (((exists pfa_gap_construct_resulttracestepsstepmultiplyright. pfa_gap_construct_resulttracestepsstepmultiplyright + S (a) = (p)) /\ ((((exists pfa_gap_construct_resulttracestepsstepmultiplyresultbound. pfa_gap_construct_resulttracestepsstepmultiplyresultbound + S (pfh_product_construct_resulttracestepsstep) = (p)) /\ ((exists pfa_offset_left_construct_resulttracestepsstepmultiplyresultcongruence pfa_offset_right_construct_resulttracestepsstepmultiplyresultcongruence. ((pfh_before_construct_resulttracestepsstep) * (a)) + (p) * pfa_offset_left_construct_resulttracestepsstepmultiplyresultcongruence = (pfh_product_construct_resulttracestepsstep) + (p) * pfa_offset_right_construct_resulttracestepsstepmultiplyresultcongruence))))))))) /\ ((((exists pfa_gap_construct_resulttracestepsstepaddleft. pfa_gap_construct_resulttracestepsstepaddleft + S (pfh_product_construct_resulttracestepsstep) = (p)) /\ (((exists pfa_gap_construct_resulttracestepsstepaddright. pfa_gap_construct_resulttracestepsstepaddright + S (pfh_coefficient_construct_resulttracestepsstep) = (p)) /\ ((((exists pfa_gap_construct_resulttracestepsstepaddresultbound. pfa_gap_construct_resulttracestepsstepaddresultbound + S (pfh_after_construct_resulttracestepsstep) = (p)) /\ ((exists pfa_offset_left_construct_resulttracestepsstepaddresultcongruence pfa_offset_right_construct_resulttracestepsstepaddresultcongruence. ((pfh_product_construct_resulttracestepsstep) + (pfh_coefficient_construct_resulttracestepsstep)) + (p) * pfa_offset_left_construct_resulttracestepsstepaddresultcongruence = (pfh_after_construct_resulttracestepsstep) + (p) * pfa_offset_right_construct_resulttracestepsstepaddresultcongruence)))))))))))))))))))))))))) /\ ((forall ff_index_mcp_pfs_construct_resultquotient ff_source_mcp_pfs_construct_resultquotient ff_target_mcp_pfs_construct_resultquotient. (exists mcp_gap_pfs_construct_resultquotient_bound. mcp_gap_pfs_construct_resultquotient_bound + S (ff_index_mcp_pfs_construct_resultquotient) = (n)) -> (((exists fs_h_mcp_pfs_construct_resultquotient_source. fs_h_mcp_pfs_construct_resultquotient_source + S (ff_source_mcp_pfs_construct_resultquotient) = S ((S ((1) + (1) * ff_index_mcp_pfs_construct_resultquotient)) * pfs_history_scale_construct_result)) /\ exists fs_q_mcp_pfs_construct_resultquotient_source. pfs_history_code_construct_result = fs_q_mcp_pfs_construct_resultquotient_source * S ((S ((1) + (1) * ff_index_mcp_pfs_construct_resultquotient)) * pfs_history_scale_construct_result) + (ff_source_mcp_pfs_construct_resultquotient))) -> (((exists fs_h_mcp_pfs_construct_resultquotient_target. fs_h_mcp_pfs_construct_resultquotient_target + S (ff_target_mcp_pfs_construct_resultquotient) = S ((S (ff_index_mcp_pfs_construct_resultquotient)) * qc)) /\ exists fs_q_mcp_pfs_construct_resultquotient_target. qb = fs_q_mcp_pfs_construct_resultquotient_target * S ((S (ff_index_mcp_pfs_construct_resultquotient)) * qc) + (ff_target_mcp_pfs_construct_resultquotient))) -> ff_target_mcp_pfs_construct_resultquotient = ff_source_mcp_pfs_construct_resultquotient))))

Complete tactic proof in conservative notation

All 38 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

38 script commands · 8 reading checkpoints · 2 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.

Definition notation is shown below. Open the paired exact edition for the original native formulas. Source pairing is not a new equivalence certificate.

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 a
  5. L5
    intro n
  6. L6
    intro hp
  7. L7
    intro hc
  8. L8
    intro ha
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,a,S n,r)Definitions: FpHorner(p,b,c,a,S n,r)Original native command in the exact edition
  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 (a)
  6. L14
    specialize prime_field_polynomial_horner_exists (S n)
  7. L15
    apply prime_field_polynomial_horner_exists
  8. L16
    exact hp
  9. L17
    exact hc
  10. L18
    exact ha
03Separate the logical casesL19–21

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

  1. L19
    cases he
  2. L20
    cases he_witness
  3. L21
    cases he_witness_witness
04Establish hqL22–28

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply beta affine matrix slice exists.

  1. L22
    have hq : ∃ qb. ∃ qc. MatrixAffineSlice(x1,x2,1,1,qb,qc,n)Definitions: MatrixAffineSlice(x1,x2,1,1,qb,qc,n)Original native command in the exact edition
  2. L23
    specialize beta_affine_matrix_slice_exists (x1)
  3. L24
    specialize beta_affine_matrix_slice_exists (x2)
  4. L25
    specialize beta_affine_matrix_slice_exists (1)
  5. L26
    specialize beta_affine_matrix_slice_exists (1)
  6. L27
    specialize beta_affine_matrix_slice_exists (n)
  7. L28
    apply beta_affine_matrix_slice_exists
05Separate the logical casesL29–30

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

  1. L29
    cases hq
  2. L30
    cases hq_witness
06Construct an explicit witnessL31–35

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

  1. L31
    exists x3
  2. L32
    exists x4
  3. L33
    exists x
  4. L34
    exists x1
  5. L35
    exists x2
07Separate the logical casesL36–36

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

  1. L36
    split
08Use earlier factsL37–38

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

  1. L37
    exact he_witness_witness_witness
  2. L38
    exact hq_witness_witness

Library-wide reading audit

Original defined command ledger · 38 lines
  1. 0001intro p
  2. 0002intro b
  3. 0003intro c
  4. 0004intro a
  5. 0005intro n
  6. 0006intro hp
  7. 0007intro hc
  8. 0008intro ha
  9. 0009have he : ∃ r. FpHorner(p,b,c,a,S n,r)
  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 (a)
  14. 0014specialize prime_field_polynomial_horner_exists (S n)
  15. 0015apply prime_field_polynomial_horner_exists
  16. 0016exact hp
  17. 0017exact hc
  18. 0018exact ha
  19. 0019cases he
  20. 0020cases he_witness
  21. 0021cases he_witness_witness
  22. 0022have hq : ∃ qb. ∃ qc. MatrixAffineSlice(x1,x2,1,1,qb,qc,n)
  23. 0023specialize beta_affine_matrix_slice_exists (x1)
  24. 0024specialize beta_affine_matrix_slice_exists (x2)
  25. 0025specialize beta_affine_matrix_slice_exists (1)
  26. 0026specialize beta_affine_matrix_slice_exists (1)
  27. 0027specialize beta_affine_matrix_slice_exists (n)
  28. 0028apply beta_affine_matrix_slice_exists
  29. 0029cases hq
  30. 0030cases hq_witness
  31. 0031exists x3
  32. 0032exists x4
  33. 0033exists x
  34. 0034exists x1
  35. 0035exists x2
  36. 0036split
  37. 0037exact he_witness_witness_witness
  38. 0038exact hq_witness_witness