PQ0024

prime_field_polynomial_trim_length_bounds

Both the number of removed leading zeroes and the retained length are bounded by the actual annotated input length.

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)Le(t,L)Le(M,L)

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_length_sourceinput. (exists fom_gap_pfp_trim_length_sourceinput_index_bound. fom_gap_pfp_trim_length_sourceinput_index_bound + S (fom_index_pfp_trim_length_sourceinput) = L) -> exists fom_value_pfp_trim_length_sourceinput. ((((exists fom_beta_height_pfp_trim_length_sourceinput_entry. fom_beta_height_pfp_trim_length_sourceinput_entry + S (fom_value_pfp_trim_length_sourceinput) = S ((S (fom_index_pfp_trim_length_sourceinput)) * c)) /\ exists fom_beta_quotient_pfp_trim_length_sourceinput_entry. b = fom_beta_quotient_pfp_trim_length_sourceinput_entry * S ((S (fom_index_pfp_trim_length_sourceinput)) * c) + (fom_value_pfp_trim_length_sourceinput))) /\ (exists fom_gap_pfp_trim_length_sourceinput_value_bound. fom_gap_pfp_trim_length_sourceinput_value_bound + S (fom_value_pfp_trim_length_sourceinput) = p))) /\ (((forall pfp_repeat_index_trim_length_sourceremoved. (exists pfa_gap_trim_length_sourceremovedindex. pfa_gap_trim_length_sourceremovedindex + S (pfp_repeat_index_trim_length_sourceremoved) = (t)) -> (((exists ff_h_pfp_trim_length_sourceremovedentry. ff_h_pfp_trim_length_sourceremovedentry + S (0) = S ((S (pfp_repeat_index_trim_length_sourceremoved)) * c)) /\ exists ff_q_pfp_trim_length_sourceremovedentry. b = ff_q_pfp_trim_length_sourceremovedentry * S ((S (pfp_repeat_index_trim_length_sourceremoved)) * c) + (0)))) /\ (((forall pftrim_index_trim_length_sourcesuffix pftrim_value_trim_length_sourcesuffix. (exists pfa_gap_trim_length_sourcesuffixbound. pfa_gap_trim_length_sourcesuffixbound + S (pftrim_index_trim_length_sourcesuffix) = (M)) -> (((exists ff_h_pfp_trim_length_sourcesuffixsource. ff_h_pfp_trim_length_sourcesuffixsource + S (pftrim_value_trim_length_sourcesuffix) = S ((S ((t)+pftrim_index_trim_length_sourcesuffix)) * c)) /\ exists ff_q_pfp_trim_length_sourcesuffixsource. b = ff_q_pfp_trim_length_sourcesuffixsource * S ((S ((t)+pftrim_index_trim_length_sourcesuffix)) * c) + (pftrim_value_trim_length_sourcesuffix))) -> (((exists ff_h_pfp_trim_length_sourcesuffixoutput. ff_h_pfp_trim_length_sourcesuffixoutput + S (pftrim_value_trim_length_sourcesuffix) = S ((S (pftrim_index_trim_length_sourcesuffix)) * e)) /\ exists ff_q_pfp_trim_length_sourcesuffixoutput. d = ff_q_pfp_trim_length_sourcesuffixoutput * S ((S (pftrim_index_trim_length_sourcesuffix)) * e) + (pftrim_value_trim_length_sourcesuffix)))) /\ (((M)=0 \/ (exists pftrim_leading_trim_length_sourcenormal. ((((exists ff_h_pfp_trim_length_sourcenormalentry. ff_h_pfp_trim_length_sourcenormalentry + S (pftrim_leading_trim_length_sourcenormal) = S ((S (0)) * e)) /\ exists ff_q_pfp_trim_length_sourcenormalentry. d = ff_q_pfp_trim_length_sourcenormalentry * S ((S (0)) * e) + (pftrim_leading_trim_length_sourcenormal))) /\ ((~(pftrim_leading_trim_length_sourcenormal=0))))))))))))))) -> ((exists pftrim_gap_removed_bound. pftrim_gap_removed_bound+(t)=(L)) /\ ((exists pftrim_gap_retained_bound. pftrim_gap_retained_bound+(M)=(L))))

Complete tactic proof in conservative notation

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

22 script commands · 10 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.

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

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
  5. L14
    split
03Construct an explicit witnessL15–15

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

  1. L15
    exists M
04Calculate and transport equalitiesL16–16

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

  1. L16
    trans t+M
05Use earlier factsL17–17

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

  1. L17
    apply add_comm
06Calculate and transport equalitiesL18–18

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

  1. L18
    symm
07Use earlier factsL19–19

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

  1. L19
    exact h_left
08Construct an explicit witnessL20–20

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

  1. L20
    exists t
09Calculate and transport equalitiesL21–21

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

  1. L21
    symm
10Use earlier factsL22–22

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

  1. L22
    exact h_left

Library-wide reading audit

Original defined command ledger · 22 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. 0014split
  15. 0015exists M
  16. 0016trans t+M
  17. 0017apply add_comm
  18. 0018symm
  19. 0019exact h_left
  20. 0020exists t
  21. 0021symm
  22. 0022exact h_left