PQ0028

prime_field_polynomial_trim_zero_iff

Alpha v34 independently verified · alpha_closed; checked-use authorized; not Stable

For an actual trim, empty output and an all-zero input prefix are constructively equivalent.

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

Exact expanded first-order arithmetic statement

forall p b c L t d e M. ((((L)=(t)+(M)) /\ (((forall fom_index_pfp_trim_zero_equivalenceinput. (exists fom_gap_pfp_trim_zero_equivalenceinput_index_bound. fom_gap_pfp_trim_zero_equivalenceinput_index_bound + S (fom_index_pfp_trim_zero_equivalenceinput) = L) -> exists fom_value_pfp_trim_zero_equivalenceinput. ((((exists fom_beta_height_pfp_trim_zero_equivalenceinput_entry. fom_beta_height_pfp_trim_zero_equivalenceinput_entry + S (fom_value_pfp_trim_zero_equivalenceinput) = S ((S (fom_index_pfp_trim_zero_equivalenceinput)) * c)) /\ exists fom_beta_quotient_pfp_trim_zero_equivalenceinput_entry. b = fom_beta_quotient_pfp_trim_zero_equivalenceinput_entry * S ((S (fom_index_pfp_trim_zero_equivalenceinput)) * c) + (fom_value_pfp_trim_zero_equivalenceinput))) /\ (exists fom_gap_pfp_trim_zero_equivalenceinput_value_bound. fom_gap_pfp_trim_zero_equivalenceinput_value_bound + S (fom_value_pfp_trim_zero_equivalenceinput) = p))) /\ (((forall pfp_repeat_index_trim_zero_equivalenceremoved. (exists pfa_gap_trim_zero_equivalenceremovedindex. pfa_gap_trim_zero_equivalenceremovedindex + S (pfp_repeat_index_trim_zero_equivalenceremoved) = (t)) -> (((exists ff_h_pfp_trim_zero_equivalenceremovedentry. ff_h_pfp_trim_zero_equivalenceremovedentry + S (0) = S ((S (pfp_repeat_index_trim_zero_equivalenceremoved)) * c)) /\ exists ff_q_pfp_trim_zero_equivalenceremovedentry. b = ff_q_pfp_trim_zero_equivalenceremovedentry * S ((S (pfp_repeat_index_trim_zero_equivalenceremoved)) * c) + (0)))) /\ (((forall pftrim_index_trim_zero_equivalencesuffix pftrim_value_trim_zero_equivalencesuffix. (exists pfa_gap_trim_zero_equivalencesuffixbound. pfa_gap_trim_zero_equivalencesuffixbound + S (pftrim_index_trim_zero_equivalencesuffix) = (M)) -> (((exists ff_h_pfp_trim_zero_equivalencesuffixsource. ff_h_pfp_trim_zero_equivalencesuffixsource + S (pftrim_value_trim_zero_equivalencesuffix) = S ((S ((t)+pftrim_index_trim_zero_equivalencesuffix)) * c)) /\ exists ff_q_pfp_trim_zero_equivalencesuffixsource. b = ff_q_pfp_trim_zero_equivalencesuffixsource * S ((S ((t)+pftrim_index_trim_zero_equivalencesuffix)) * c) + (pftrim_value_trim_zero_equivalencesuffix))) -> (((exists ff_h_pfp_trim_zero_equivalencesuffixoutput. ff_h_pfp_trim_zero_equivalencesuffixoutput + S (pftrim_value_trim_zero_equivalencesuffix) = S ((S (pftrim_index_trim_zero_equivalencesuffix)) * e)) /\ exists ff_q_pfp_trim_zero_equivalencesuffixoutput. d = ff_q_pfp_trim_zero_equivalencesuffixoutput * S ((S (pftrim_index_trim_zero_equivalencesuffix)) * e) + (pftrim_value_trim_zero_equivalencesuffix)))) /\ (((M)=0 \/ (exists pftrim_leading_trim_zero_equivalencenormal. ((((exists ff_h_pfp_trim_zero_equivalencenormalentry. ff_h_pfp_trim_zero_equivalencenormalentry + S (pftrim_leading_trim_zero_equivalencenormal) = S ((S (0)) * e)) /\ exists ff_q_pfp_trim_zero_equivalencenormalentry. d = ff_q_pfp_trim_zero_equivalencenormalentry * S ((S (0)) * e) + (pftrim_leading_trim_zero_equivalencenormal))) /\ ((~(pftrim_leading_trim_zero_equivalencenormal=0))))))))))))))) -> ((M=0 -> (forall pfp_repeat_index_trim_zero_forward. (exists pfa_gap_trim_zero_forwardindex. pfa_gap_trim_zero_forwardindex + S (pfp_repeat_index_trim_zero_forward) = (L)) -> (((exists ff_h_pfp_trim_zero_forwardentry. ff_h_pfp_trim_zero_forwardentry + S (0) = S ((S (pfp_repeat_index_trim_zero_forward)) * c)) /\ exists ff_q_pfp_trim_zero_forwardentry. b = ff_q_pfp_trim_zero_forwardentry * S ((S (pfp_repeat_index_trim_zero_forward)) * c) + (0))))) /\ (((forall pfp_repeat_index_trim_zero_backward. (exists pfa_gap_trim_zero_backwardindex. pfa_gap_trim_zero_backwardindex + S (pfp_repeat_index_trim_zero_backward) = (L)) -> (((exists ff_h_pfp_trim_zero_backwardentry. ff_h_pfp_trim_zero_backwardentry + S (0) = S ((S (pfp_repeat_index_trim_zero_backward)) * c)) /\ exists ff_q_pfp_trim_zero_backwardentry. b = ff_q_pfp_trim_zero_backwardentry * S ((S (pfp_repeat_index_trim_zero_backward)) * c) + (0)))) -> M=0)))

Constructive proof overview

Generated structural guide

For an actual trim, empty output and an all-zero input prefix are constructively equivalent.

The unchanged tactic script uses 2 declared prerequisites and contains 34 exact native proof lines.

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

Proof neighborhood

Direct dependencies

Direct dependents

none

Formal native tactic body

Dependencies are introduced as named hypotheses before line 1. Local theorem links identify exact declared prerequisites. This exact body belongs to a complete independently kernel-checked constructive proof bundle and has Alpha checked-use authority; it does not imply Stable membership.

Read the argument

Proof checkpoints

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

Named ingredients (2)
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–10

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

  1. L10
    split
03Fix variables and assumptionsL11–11

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

  1. L11
    intro hz
04Use earlier factsL12–21

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

  1. L12
    specialize prime_field_polynomial_trim_zero_of_empty (p)
  2. L13
    specialize prime_field_polynomial_trim_zero_of_empty (b)
  3. L14
    specialize prime_field_polynomial_trim_zero_of_empty (c)
  4. L15
    specialize prime_field_polynomial_trim_zero_of_empty (L)
  5. L16
    specialize prime_field_polynomial_trim_zero_of_empty (t)
  6. L17
    specialize prime_field_polynomial_trim_zero_of_empty (d)
  7. L18
    specialize prime_field_polynomial_trim_zero_of_empty (e)
  8. L19
    specialize prime_field_polynomial_trim_zero_of_empty (M)
  9. L20
    apply prime_field_polynomial_trim_zero_of_empty
  10. L21
    exact h
05Use earlier factsL22–22

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

  1. L22
    exact hz
06Fix variables and assumptionsL23–23

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

  1. L23
    intro hz
07Use earlier factsL24–33

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

  1. L24
    specialize prime_field_polynomial_trim_empty_of_zero (p)
  2. L25
    specialize prime_field_polynomial_trim_empty_of_zero (b)
  3. L26
    specialize prime_field_polynomial_trim_empty_of_zero (c)
  4. L27
    specialize prime_field_polynomial_trim_empty_of_zero (L)
  5. L28
    specialize prime_field_polynomial_trim_empty_of_zero (t)
  6. L29
    specialize prime_field_polynomial_trim_empty_of_zero (d)
  7. L30
    specialize prime_field_polynomial_trim_empty_of_zero (e)
  8. L31
    specialize prime_field_polynomial_trim_empty_of_zero (M)
  9. L32
    apply prime_field_polynomial_trim_empty_of_zero
  10. L33
    exact h
08Use earlier factsL34–34

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

  1. L34
    exact hz

Library-wide reading audit

Original exact command ledger · 34 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. 0010split
  11. 0011intro hz
  12. 0012specialize prime_field_polynomial_trim_zero_of_empty (p)
  13. 0013specialize prime_field_polynomial_trim_zero_of_empty (b)
  14. 0014specialize prime_field_polynomial_trim_zero_of_empty (c)
  15. 0015specialize prime_field_polynomial_trim_zero_of_empty (L)
  16. 0016specialize prime_field_polynomial_trim_zero_of_empty (t)
  17. 0017specialize prime_field_polynomial_trim_zero_of_empty (d)
  18. 0018specialize prime_field_polynomial_trim_zero_of_empty (e)
  19. 0019specialize prime_field_polynomial_trim_zero_of_empty (M)
  20. 0020apply prime_field_polynomial_trim_zero_of_empty
  21. 0021exact h
  22. 0022exact hz
  23. 0023intro hz
  24. 0024specialize prime_field_polynomial_trim_empty_of_zero (p)
  25. 0025specialize prime_field_polynomial_trim_empty_of_zero (b)
  26. 0026specialize prime_field_polynomial_trim_empty_of_zero (c)
  27. 0027specialize prime_field_polynomial_trim_empty_of_zero (L)
  28. 0028specialize prime_field_polynomial_trim_empty_of_zero (t)
  29. 0029specialize prime_field_polynomial_trim_empty_of_zero (d)
  30. 0030specialize prime_field_polynomial_trim_empty_of_zero (e)
  31. 0031specialize prime_field_polynomial_trim_empty_of_zero (M)
  32. 0032apply prime_field_polynomial_trim_empty_of_zero
  33. 0033exact h
  34. 0034exact hz