PQ0023

prime_field_polynomial_trim_output_coefficients

The actual trimmed coefficients are canonical below the same modulus; this is a consequence, not a clause assumed in Trim.

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. ∀ L. ∀ t. ∀ d. ∀ e. ∀ M. FpPolynomialTrim(p,b,c,L,t,d,e,M)BetaPrefixInto(d,e,M,p)

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 L t d e M. ((((L)=(t)+(M)) /\ (((forall fom_index_pfp_trim_bounded_sourceinput. (exists fom_gap_pfp_trim_bounded_sourceinput_index_bound. fom_gap_pfp_trim_bounded_sourceinput_index_bound + S (fom_index_pfp_trim_bounded_sourceinput) = L) -> exists fom_value_pfp_trim_bounded_sourceinput. ((((exists fom_beta_height_pfp_trim_bounded_sourceinput_entry. fom_beta_height_pfp_trim_bounded_sourceinput_entry + S (fom_value_pfp_trim_bounded_sourceinput) = S ((S (fom_index_pfp_trim_bounded_sourceinput)) * c)) /\ exists fom_beta_quotient_pfp_trim_bounded_sourceinput_entry. b = fom_beta_quotient_pfp_trim_bounded_sourceinput_entry * S ((S (fom_index_pfp_trim_bounded_sourceinput)) * c) + (fom_value_pfp_trim_bounded_sourceinput))) /\ (exists fom_gap_pfp_trim_bounded_sourceinput_value_bound. fom_gap_pfp_trim_bounded_sourceinput_value_bound + S (fom_value_pfp_trim_bounded_sourceinput) = p))) /\ (((forall pfp_repeat_index_trim_bounded_sourceremoved. (exists pfa_gap_trim_bounded_sourceremovedindex. pfa_gap_trim_bounded_sourceremovedindex + S (pfp_repeat_index_trim_bounded_sourceremoved) = (t)) -> (((exists ff_h_pfp_trim_bounded_sourceremovedentry. ff_h_pfp_trim_bounded_sourceremovedentry + S (0) = S ((S (pfp_repeat_index_trim_bounded_sourceremoved)) * c)) /\ exists ff_q_pfp_trim_bounded_sourceremovedentry. b = ff_q_pfp_trim_bounded_sourceremovedentry * S ((S (pfp_repeat_index_trim_bounded_sourceremoved)) * c) + (0)))) /\ (((forall pftrim_index_trim_bounded_sourcesuffix pftrim_value_trim_bounded_sourcesuffix. (exists pfa_gap_trim_bounded_sourcesuffixbound. pfa_gap_trim_bounded_sourcesuffixbound + S (pftrim_index_trim_bounded_sourcesuffix) = (M)) -> (((exists ff_h_pfp_trim_bounded_sourcesuffixsource. ff_h_pfp_trim_bounded_sourcesuffixsource + S (pftrim_value_trim_bounded_sourcesuffix) = S ((S ((t)+pftrim_index_trim_bounded_sourcesuffix)) * c)) /\ exists ff_q_pfp_trim_bounded_sourcesuffixsource. b = ff_q_pfp_trim_bounded_sourcesuffixsource * S ((S ((t)+pftrim_index_trim_bounded_sourcesuffix)) * c) + (pftrim_value_trim_bounded_sourcesuffix))) -> (((exists ff_h_pfp_trim_bounded_sourcesuffixoutput. ff_h_pfp_trim_bounded_sourcesuffixoutput + S (pftrim_value_trim_bounded_sourcesuffix) = S ((S (pftrim_index_trim_bounded_sourcesuffix)) * e)) /\ exists ff_q_pfp_trim_bounded_sourcesuffixoutput. d = ff_q_pfp_trim_bounded_sourcesuffixoutput * S ((S (pftrim_index_trim_bounded_sourcesuffix)) * e) + (pftrim_value_trim_bounded_sourcesuffix)))) /\ (((M)=0 \/ (exists pftrim_leading_trim_bounded_sourcenormal. ((((exists ff_h_pfp_trim_bounded_sourcenormalentry. ff_h_pfp_trim_bounded_sourcenormalentry + S (pftrim_leading_trim_bounded_sourcenormal) = S ((S (0)) * e)) /\ exists ff_q_pfp_trim_bounded_sourcenormalentry. d = ff_q_pfp_trim_bounded_sourcenormalentry * S ((S (0)) * e) + (pftrim_leading_trim_bounded_sourcenormal))) /\ ((~(pftrim_leading_trim_bounded_sourcenormal=0))))))))))))))) -> (forall fom_index_pfp_trim_bounded_result. (exists fom_gap_pfp_trim_bounded_result_index_bound. fom_gap_pfp_trim_bounded_result_index_bound + S (fom_index_pfp_trim_bounded_result) = M) -> exists fom_value_pfp_trim_bounded_result. ((((exists fom_beta_height_pfp_trim_bounded_result_entry. fom_beta_height_pfp_trim_bounded_result_entry + S (fom_value_pfp_trim_bounded_result) = S ((S (fom_index_pfp_trim_bounded_result)) * e)) /\ exists fom_beta_quotient_pfp_trim_bounded_result_entry. d = fom_beta_quotient_pfp_trim_bounded_result_entry * S ((S (fom_index_pfp_trim_bounded_result)) * e) + (fom_value_pfp_trim_bounded_result))) /\ (exists fom_gap_pfp_trim_bounded_result_value_bound. fom_gap_pfp_trim_bounded_result_value_bound + S (fom_value_pfp_trim_bounded_result) = p)))

Complete tactic proof in conservative notation

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

25 script commands · 4 reading checkpoints · 0 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.

Named ingredients (1)
01Fix variables and assumptionsL1–9

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 L
  5. L5
    intro t
  6. L6
    intro d
  7. L7
    intro e
  8. L8
    intro M
  9. L9
    intro h
02Separate the logical casesL10–13

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

  1. L10
    cases h
  2. L11
    cases h_right
  3. L12
    cases h_right_right
  4. L13
    cases h_right_right_right
03Use earlier factsL14–23

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

  1. L14
    specialize prime_field_polynomial_suffix_bounded (p)
  2. L15
    specialize prime_field_polynomial_suffix_bounded (b)
  3. L16
    specialize prime_field_polynomial_suffix_bounded (c)
  4. L17
    specialize prime_field_polynomial_suffix_bounded (L)
  5. L18
    specialize prime_field_polynomial_suffix_bounded (t)
  6. L19
    specialize prime_field_polynomial_suffix_bounded (d)
  7. L20
    specialize prime_field_polynomial_suffix_bounded (e)
  8. L21
    specialize prime_field_polynomial_suffix_bounded (M)
  9. L22
    apply prime_field_polynomial_suffix_bounded
  10. L23
    exact h_left
04Use earlier factsL24–25

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

  1. L24
    exact h_right_left
  2. L25
    exact h_right_right_right_left

Library-wide reading audit

Original defined command ledger · 25 lines
  1. 0001intro p
  2. 0002intro b
  3. 0003intro c
  4. 0004intro L
  5. 0005intro t
  6. 0006intro d
  7. 0007intro e
  8. 0008intro M
  9. 0009intro h
  10. 0010cases h
  11. 0011cases h_right
  12. 0012cases h_right_right
  13. 0013cases h_right_right_right
  14. 0014specialize prime_field_polynomial_suffix_bounded (p)
  15. 0015specialize prime_field_polynomial_suffix_bounded (b)
  16. 0016specialize prime_field_polynomial_suffix_bounded (c)
  17. 0017specialize prime_field_polynomial_suffix_bounded (L)
  18. 0018specialize prime_field_polynomial_suffix_bounded (t)
  19. 0019specialize prime_field_polynomial_suffix_bounded (d)
  20. 0020specialize prime_field_polynomial_suffix_bounded (e)
  21. 0021specialize prime_field_polynomial_suffix_bounded (M)
  22. 0022apply prime_field_polynomial_suffix_bounded
  23. 0023exact h_left
  24. 0024exact h_right_left
  25. 0025exact h_right_right_right_left