PQ002F

prime_field_polynomial_trim_nonempty_degree_exists

Positive retained length constructs an actual represented degree, with no claim of a degree for empty output.

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) → ¬M = 0 → ∃ x. FpRepresentedDegree(p,d,e,M,x)

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_nonempty_inputinput. (exists fom_gap_pfp_trim_nonempty_inputinput_index_bound. fom_gap_pfp_trim_nonempty_inputinput_index_bound + S (fom_index_pfp_trim_nonempty_inputinput) = L) -> exists fom_value_pfp_trim_nonempty_inputinput. ((((exists fom_beta_height_pfp_trim_nonempty_inputinput_entry. fom_beta_height_pfp_trim_nonempty_inputinput_entry + S (fom_value_pfp_trim_nonempty_inputinput) = S ((S (fom_index_pfp_trim_nonempty_inputinput)) * c)) /\ exists fom_beta_quotient_pfp_trim_nonempty_inputinput_entry. b = fom_beta_quotient_pfp_trim_nonempty_inputinput_entry * S ((S (fom_index_pfp_trim_nonempty_inputinput)) * c) + (fom_value_pfp_trim_nonempty_inputinput))) /\ (exists fom_gap_pfp_trim_nonempty_inputinput_value_bound. fom_gap_pfp_trim_nonempty_inputinput_value_bound + S (fom_value_pfp_trim_nonempty_inputinput) = p))) /\ (((forall pfp_repeat_index_trim_nonempty_inputremoved. (exists pfa_gap_trim_nonempty_inputremovedindex. pfa_gap_trim_nonempty_inputremovedindex + S (pfp_repeat_index_trim_nonempty_inputremoved) = (t)) -> (((exists ff_h_pfp_trim_nonempty_inputremovedentry. ff_h_pfp_trim_nonempty_inputremovedentry + S (0) = S ((S (pfp_repeat_index_trim_nonempty_inputremoved)) * c)) /\ exists ff_q_pfp_trim_nonempty_inputremovedentry. b = ff_q_pfp_trim_nonempty_inputremovedentry * S ((S (pfp_repeat_index_trim_nonempty_inputremoved)) * c) + (0)))) /\ (((forall pftrim_index_trim_nonempty_inputsuffix pftrim_value_trim_nonempty_inputsuffix. (exists pfa_gap_trim_nonempty_inputsuffixbound. pfa_gap_trim_nonempty_inputsuffixbound + S (pftrim_index_trim_nonempty_inputsuffix) = (M)) -> (((exists ff_h_pfp_trim_nonempty_inputsuffixsource. ff_h_pfp_trim_nonempty_inputsuffixsource + S (pftrim_value_trim_nonempty_inputsuffix) = S ((S ((t)+pftrim_index_trim_nonempty_inputsuffix)) * c)) /\ exists ff_q_pfp_trim_nonempty_inputsuffixsource. b = ff_q_pfp_trim_nonempty_inputsuffixsource * S ((S ((t)+pftrim_index_trim_nonempty_inputsuffix)) * c) + (pftrim_value_trim_nonempty_inputsuffix))) -> (((exists ff_h_pfp_trim_nonempty_inputsuffixoutput. ff_h_pfp_trim_nonempty_inputsuffixoutput + S (pftrim_value_trim_nonempty_inputsuffix) = S ((S (pftrim_index_trim_nonempty_inputsuffix)) * e)) /\ exists ff_q_pfp_trim_nonempty_inputsuffixoutput. d = ff_q_pfp_trim_nonempty_inputsuffixoutput * S ((S (pftrim_index_trim_nonempty_inputsuffix)) * e) + (pftrim_value_trim_nonempty_inputsuffix)))) /\ (((M)=0 \/ (exists pftrim_leading_trim_nonempty_inputnormal. ((((exists ff_h_pfp_trim_nonempty_inputnormalentry. ff_h_pfp_trim_nonempty_inputnormalentry + S (pftrim_leading_trim_nonempty_inputnormal) = S ((S (0)) * e)) /\ exists ff_q_pfp_trim_nonempty_inputnormalentry. d = ff_q_pfp_trim_nonempty_inputnormalentry * S ((S (0)) * e) + (pftrim_leading_trim_nonempty_inputnormal))) /\ ((~(pftrim_leading_trim_nonempty_inputnormal=0))))))))))))))) -> ~(M=0) -> exists q. ((((M)=S (q)) /\ (((forall fom_index_pfp_trim_nonempty_degreecoefficients. (exists fom_gap_pfp_trim_nonempty_degreecoefficients_index_bound. fom_gap_pfp_trim_nonempty_degreecoefficients_index_bound + S (fom_index_pfp_trim_nonempty_degreecoefficients) = M) -> exists fom_value_pfp_trim_nonempty_degreecoefficients. ((((exists fom_beta_height_pfp_trim_nonempty_degreecoefficients_entry. fom_beta_height_pfp_trim_nonempty_degreecoefficients_entry + S (fom_value_pfp_trim_nonempty_degreecoefficients) = S ((S (fom_index_pfp_trim_nonempty_degreecoefficients)) * e)) /\ exists fom_beta_quotient_pfp_trim_nonempty_degreecoefficients_entry. d = fom_beta_quotient_pfp_trim_nonempty_degreecoefficients_entry * S ((S (fom_index_pfp_trim_nonempty_degreecoefficients)) * e) + (fom_value_pfp_trim_nonempty_degreecoefficients))) /\ (exists fom_gap_pfp_trim_nonempty_degreecoefficients_value_bound. fom_gap_pfp_trim_nonempty_degreecoefficients_value_bound + S (fom_value_pfp_trim_nonempty_degreecoefficients) = p))) /\ ((exists pfd_leading_trim_nonempty_degree. ((((exists ff_h_pfp_trim_nonempty_degreeentry. ff_h_pfp_trim_nonempty_degreeentry + S (pfd_leading_trim_nonempty_degree) = S ((S (0)) * e)) /\ exists ff_q_pfp_trim_nonempty_degreeentry. d = ff_q_pfp_trim_nonempty_degreeentry * S ((S (0)) * e) + (pfd_leading_trim_nonempty_degree))) /\ ((~(pfd_leading_trim_nonempty_degree=0))))))))))

Complete tactic proof in conservative notation

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

28 script commands · 6 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.

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

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
  10. L10
    intro hM
02Establish hqL11–14

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply nonzero is succ.

  1. L11
    have hq : exists q. M=S q
  2. L12
    specialize nonzero_is_succ (M)
  3. L13
    apply nonzero_is_succ
  4. L14
    exact hM
03Separate the logical casesL15–15

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

  1. L15
    cases hq
04Construct an explicit witnessL16–16

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

  1. L16
    exists x
05Use earlier factsL17–26

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

  1. L17
    specialize prime_field_polynomial_trim_represented_degree (p)
  2. L18
    specialize prime_field_polynomial_trim_represented_degree (b)
  3. L19
    specialize prime_field_polynomial_trim_represented_degree (c)
  4. L20
    specialize prime_field_polynomial_trim_represented_degree (L)
  5. L21
    specialize prime_field_polynomial_trim_represented_degree (t)
  6. L22
    specialize prime_field_polynomial_trim_represented_degree (d)
  7. L23
    specialize prime_field_polynomial_trim_represented_degree (e)
  8. L24
    specialize prime_field_polynomial_trim_represented_degree (M)
  9. L25
    specialize prime_field_polynomial_trim_represented_degree (x)
  10. L26
    apply prime_field_polynomial_trim_represented_degree
06Use earlier factsL27–28

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

  1. L27
    exact h
  2. L28
    exact hq_witness

Library-wide reading audit

Original defined command ledger · 28 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. 0010intro hM
  11. 0011have hq : exists q. M=S q
  12. 0012specialize nonzero_is_succ (M)
  13. 0013apply nonzero_is_succ
  14. 0014exact hM
  15. 0015cases hq
  16. 0016exists x
  17. 0017specialize prime_field_polynomial_trim_represented_degree (p)
  18. 0018specialize prime_field_polynomial_trim_represented_degree (b)
  19. 0019specialize prime_field_polynomial_trim_represented_degree (c)
  20. 0020specialize prime_field_polynomial_trim_represented_degree (L)
  21. 0021specialize prime_field_polynomial_trim_represented_degree (t)
  22. 0022specialize prime_field_polynomial_trim_represented_degree (d)
  23. 0023specialize prime_field_polynomial_trim_represented_degree (e)
  24. 0024specialize prime_field_polynomial_trim_represented_degree (M)
  25. 0025specialize prime_field_polynomial_trim_represented_degree (x)
  26. 0026apply prime_field_polynomial_trim_represented_degree
  27. 0027exact h
  28. 0028exact hq_witness