PQ0030

prime_field_polynomial_trim_represented_identity

A canonical nonzero-leading representation trims to itself with zero removals, preserving its actual length and all decoded coefficients.

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. ∀ q. FpRepresentedDegree(p,b,c,L,q)FpPolynomialTrim(p,b,c,L,0,b,c,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 q. ((((L)=S (q)) /\ (((forall fom_index_pfp_trim_already_normalcoefficients. (exists fom_gap_pfp_trim_already_normalcoefficients_index_bound. fom_gap_pfp_trim_already_normalcoefficients_index_bound + S (fom_index_pfp_trim_already_normalcoefficients) = L) -> exists fom_value_pfp_trim_already_normalcoefficients. ((((exists fom_beta_height_pfp_trim_already_normalcoefficients_entry. fom_beta_height_pfp_trim_already_normalcoefficients_entry + S (fom_value_pfp_trim_already_normalcoefficients) = S ((S (fom_index_pfp_trim_already_normalcoefficients)) * c)) /\ exists fom_beta_quotient_pfp_trim_already_normalcoefficients_entry. b = fom_beta_quotient_pfp_trim_already_normalcoefficients_entry * S ((S (fom_index_pfp_trim_already_normalcoefficients)) * c) + (fom_value_pfp_trim_already_normalcoefficients))) /\ (exists fom_gap_pfp_trim_already_normalcoefficients_value_bound. fom_gap_pfp_trim_already_normalcoefficients_value_bound + S (fom_value_pfp_trim_already_normalcoefficients) = p))) /\ ((exists pfd_leading_trim_already_normal. ((((exists ff_h_pfp_trim_already_normalentry. ff_h_pfp_trim_already_normalentry + S (pfd_leading_trim_already_normal) = S ((S (0)) * c)) /\ exists ff_q_pfp_trim_already_normalentry. b = ff_q_pfp_trim_already_normalentry * S ((S (0)) * c) + (pfd_leading_trim_already_normal))) /\ ((~(pfd_leading_trim_already_normal=0)))))))))) -> ((((L)=(0)+(L)) /\ (((forall fom_index_pfp_trim_identityinput. (exists fom_gap_pfp_trim_identityinput_index_bound. fom_gap_pfp_trim_identityinput_index_bound + S (fom_index_pfp_trim_identityinput) = L) -> exists fom_value_pfp_trim_identityinput. ((((exists fom_beta_height_pfp_trim_identityinput_entry. fom_beta_height_pfp_trim_identityinput_entry + S (fom_value_pfp_trim_identityinput) = S ((S (fom_index_pfp_trim_identityinput)) * c)) /\ exists fom_beta_quotient_pfp_trim_identityinput_entry. b = fom_beta_quotient_pfp_trim_identityinput_entry * S ((S (fom_index_pfp_trim_identityinput)) * c) + (fom_value_pfp_trim_identityinput))) /\ (exists fom_gap_pfp_trim_identityinput_value_bound. fom_gap_pfp_trim_identityinput_value_bound + S (fom_value_pfp_trim_identityinput) = p))) /\ (((forall pfp_repeat_index_trim_identityremoved. (exists pfa_gap_trim_identityremovedindex. pfa_gap_trim_identityremovedindex + S (pfp_repeat_index_trim_identityremoved) = (0)) -> (((exists ff_h_pfp_trim_identityremovedentry. ff_h_pfp_trim_identityremovedentry + S (0) = S ((S (pfp_repeat_index_trim_identityremoved)) * c)) /\ exists ff_q_pfp_trim_identityremovedentry. b = ff_q_pfp_trim_identityremovedentry * S ((S (pfp_repeat_index_trim_identityremoved)) * c) + (0)))) /\ (((forall pftrim_index_trim_identitysuffix pftrim_value_trim_identitysuffix. (exists pfa_gap_trim_identitysuffixbound. pfa_gap_trim_identitysuffixbound + S (pftrim_index_trim_identitysuffix) = (L)) -> (((exists ff_h_pfp_trim_identitysuffixsource. ff_h_pfp_trim_identitysuffixsource + S (pftrim_value_trim_identitysuffix) = S ((S ((0)+pftrim_index_trim_identitysuffix)) * c)) /\ exists ff_q_pfp_trim_identitysuffixsource. b = ff_q_pfp_trim_identitysuffixsource * S ((S ((0)+pftrim_index_trim_identitysuffix)) * c) + (pftrim_value_trim_identitysuffix))) -> (((exists ff_h_pfp_trim_identitysuffixoutput. ff_h_pfp_trim_identitysuffixoutput + S (pftrim_value_trim_identitysuffix) = S ((S (pftrim_index_trim_identitysuffix)) * c)) /\ exists ff_q_pfp_trim_identitysuffixoutput. b = ff_q_pfp_trim_identitysuffixoutput * S ((S (pftrim_index_trim_identitysuffix)) * c) + (pftrim_value_trim_identitysuffix)))) /\ (((L)=0 \/ (exists pftrim_leading_trim_identitynormal. ((((exists ff_h_pfp_trim_identitynormalentry. ff_h_pfp_trim_identitynormalentry + S (pftrim_leading_trim_identitynormal) = S ((S (0)) * c)) /\ exists ff_q_pfp_trim_identitynormalentry. b = ff_q_pfp_trim_identitynormalentry * S ((S (0)) * c) + (pftrim_leading_trim_identitynormal))) /\ ((~(pftrim_leading_trim_identitynormal=0)))))))))))))))

Complete tactic proof in conservative notation

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

34 script commands · 14 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.

01Fix variables and assumptionsL1–6

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 q
  6. L6
    intro h
02Separate the logical casesL7–9

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

  1. L7
    cases h
  2. L8
    cases h_right
  3. L9
    split
03Calculate and transport equalitiesL10–10

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

  1. L10
    symm
04Use earlier factsL11–12

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

  1. L11
    specialize zero_add (L)
  2. L12
    apply zero_add
05Separate the logical casesL13–13

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

  1. L13
    split
06Use earlier factsL14–14

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

  1. L14
    exact h_right_left
07Separate the logical casesL15–15

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

  1. L15
    split
08Use earlier factsL16–20

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

  1. L16
    specialize beta_repeat_empty (b)
  2. L17
    specialize beta_repeat_empty (c)
  3. L18
    specialize beta_repeat_empty (0)
  4. L19
    specialize beta_repeat_empty (0)
  5. L20
    apply beta_repeat_empty
09Calculate and transport equalitiesL21–21

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

  1. L21
    refl
10Separate the logical casesL22–22

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

  1. L22
    split
11Fix variables and assumptionsL23–26

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

  1. L23
    intro i
  2. L24
    intro a
  3. L25
    intro hi
  4. L26
    intro ha
12Establish heqL27–32

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

  1. L27
    have heq : 0+i=i
  2. L28
    specialize zero_add (i)
  3. L29
    apply zero_add
  4. L30
    rewrite heq at ha
  5. L31
    rewrite heq at ha
  6. L32
    exact ha
13Separate the logical casesL33–33

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

  1. L33
    right
14Use earlier factsL34–34

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

  1. L34
    exact h_right_right

Library-wide reading audit

Original defined command ledger · 34 lines
  1. 0001intro p
  2. 0002intro b
  3. 0003intro c
  4. 0004intro L
  5. 0005intro q
  6. 0006intro h
  7. 0007cases h
  8. 0008cases h_right
  9. 0009split
  10. 0010symm
  11. 0011specialize zero_add (L)
  12. 0012apply zero_add
  13. 0013split
  14. 0014exact h_right_left
  15. 0015split
  16. 0016specialize beta_repeat_empty (b)
  17. 0017specialize beta_repeat_empty (c)
  18. 0018specialize beta_repeat_empty (0)
  19. 0019specialize beta_repeat_empty (0)
  20. 0020apply beta_repeat_empty
  21. 0021refl
  22. 0022split
  23. 0023intro i
  24. 0024intro a
  25. 0025intro hi
  26. 0026intro ha
  27. 0027have heq : 0+i=i
  28. 0028specialize zero_add (i)
  29. 0029apply zero_add
  30. 0030rewrite heq at ha
  31. 0031rewrite heq at ha
  32. 0032exact ha
  33. 0033right
  34. 0034exact h_right_right