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 u f g N. ((((L)=(t)+(M)) /\ (((forall fom_index_pfp_unique_firstinput. (exists fom_gap_pfp_unique_firstinput_index_bound. fom_gap_pfp_unique_firstinput_index_bound + S (fom_index_pfp_unique_firstinput) = L) -> exists fom_value_pfp_unique_firstinput. ((((exists fom_beta_height_pfp_unique_firstinput_entry. fom_beta_height_pfp_unique_firstinput_entry + S (fom_value_pfp_unique_firstinput) = S ((S (fom_index_pfp_unique_firstinput)) * c)) /\ exists fom_beta_quotient_pfp_unique_firstinput_entry. b = fom_beta_quotient_pfp_unique_firstinput_entry * S ((S (fom_index_pfp_unique_firstinput)) * c) + (fom_value_pfp_unique_firstinput))) /\ (exists fom_gap_pfp_unique_firstinput_value_bound. fom_gap_pfp_unique_firstinput_value_bound + S (fom_value_pfp_unique_firstinput) = p))) /\ (((forall pfp_repeat_index_unique_firstremoved. (exists pfa_gap_unique_firstremovedindex. pfa_gap_unique_firstremovedindex + S (pfp_repeat_index_unique_firstremoved) = (t)) -> (((exists ff_h_pfp_unique_firstremovedentry. ff_h_pfp_unique_firstremovedentry + S (0) = S ((S (pfp_repeat_index_unique_firstremoved)) * c)) /\ exists ff_q_pfp_unique_firstremovedentry. b = ff_q_pfp_unique_firstremovedentry * S ((S (pfp_repeat_index_unique_firstremoved)) * c) + (0)))) /\ (((forall pftrim_index_unique_firstsuffix pftrim_value_unique_firstsuffix. (exists pfa_gap_unique_firstsuffixbound. pfa_gap_unique_firstsuffixbound + S (pftrim_index_unique_firstsuffix) = (M)) -> (((exists ff_h_pfp_unique_firstsuffixsource. ff_h_pfp_unique_firstsuffixsource + S (pftrim_value_unique_firstsuffix) = S ((S ((t)+pftrim_index_unique_firstsuffix)) * c)) /\ exists ff_q_pfp_unique_firstsuffixsource. b = ff_q_pfp_unique_firstsuffixsource * S ((S ((t)+pftrim_index_unique_firstsuffix)) * c) + (pftrim_value_unique_firstsuffix))) -> (((exists ff_h_pfp_unique_firstsuffixoutput. ff_h_pfp_unique_firstsuffixoutput + S (pftrim_value_unique_firstsuffix) = S ((S (pftrim_index_unique_firstsuffix)) * e)) /\ exists ff_q_pfp_unique_firstsuffixoutput. d = ff_q_pfp_unique_firstsuffixoutput * S ((S (pftrim_index_unique_firstsuffix)) * e) + (pftrim_value_unique_firstsuffix)))) /\ (((M)=0 \/ (exists pftrim_leading_unique_firstnormal. ((((exists ff_h_pfp_unique_firstnormalentry. ff_h_pfp_unique_firstnormalentry + S (pftrim_leading_unique_firstnormal) = S ((S (0)) * e)) /\ exists ff_q_pfp_unique_firstnormalentry. d = ff_q_pfp_unique_firstnormalentry * S ((S (0)) * e) + (pftrim_leading_unique_firstnormal))) /\ ((~(pftrim_leading_unique_firstnormal=0))))))))))))))) -> ((((L)=(u)+(N)) /\ (((forall fom_index_pfp_unique_secondinput. (exists fom_gap_pfp_unique_secondinput_index_bound. fom_gap_pfp_unique_secondinput_index_bound + S (fom_index_pfp_unique_secondinput) = L) -> exists fom_value_pfp_unique_secondinput. ((((exists fom_beta_height_pfp_unique_secondinput_entry. fom_beta_height_pfp_unique_secondinput_entry + S (fom_value_pfp_unique_secondinput) = S ((S (fom_index_pfp_unique_secondinput)) * c)) /\ exists fom_beta_quotient_pfp_unique_secondinput_entry. b = fom_beta_quotient_pfp_unique_secondinput_entry * S ((S (fom_index_pfp_unique_secondinput)) * c) + (fom_value_pfp_unique_secondinput))) /\ (exists fom_gap_pfp_unique_secondinput_value_bound. fom_gap_pfp_unique_secondinput_value_bound + S (fom_value_pfp_unique_secondinput) = p))) /\ (((forall pfp_repeat_index_unique_secondremoved. (exists pfa_gap_unique_secondremovedindex. pfa_gap_unique_secondremovedindex + S (pfp_repeat_index_unique_secondremoved) = (u)) -> (((exists ff_h_pfp_unique_secondremovedentry. ff_h_pfp_unique_secondremovedentry + S (0) = S ((S (pfp_repeat_index_unique_secondremoved)) * c)) /\ exists ff_q_pfp_unique_secondremovedentry. b = ff_q_pfp_unique_secondremovedentry * S ((S (pfp_repeat_index_unique_secondremoved)) * c) + (0)))) /\ (((forall pftrim_index_unique_secondsuffix pftrim_value_unique_secondsuffix. (exists pfa_gap_unique_secondsuffixbound. pfa_gap_unique_secondsuffixbound + S (pftrim_index_unique_secondsuffix) = (N)) -> (((exists ff_h_pfp_unique_secondsuffixsource. ff_h_pfp_unique_secondsuffixsource + S (pftrim_value_unique_secondsuffix) = S ((S ((u)+pftrim_index_unique_secondsuffix)) * c)) /\ exists ff_q_pfp_unique_secondsuffixsource. b = ff_q_pfp_unique_secondsuffixsource * S ((S ((u)+pftrim_index_unique_secondsuffix)) * c) + (pftrim_value_unique_secondsuffix))) -> (((exists ff_h_pfp_unique_secondsuffixoutput. ff_h_pfp_unique_secondsuffixoutput + S (pftrim_value_unique_secondsuffix) = S ((S (pftrim_index_unique_secondsuffix)) * g)) /\ exists ff_q_pfp_unique_secondsuffixoutput. f = ff_q_pfp_unique_secondsuffixoutput * S ((S (pftrim_index_unique_secondsuffix)) * g) + (pftrim_value_unique_secondsuffix)))) /\ (((N)=0 \/ (exists pftrim_leading_unique_secondnormal. ((((exists ff_h_pfp_unique_secondnormalentry. ff_h_pfp_unique_secondnormalentry + S (pftrim_leading_unique_secondnormal) = S ((S (0)) * g)) /\ exists ff_q_pfp_unique_secondnormalentry. f = ff_q_pfp_unique_secondnormalentry * S ((S (0)) * g) + (pftrim_leading_unique_secondnormal))) /\ ((~(pftrim_leading_unique_secondnormal=0))))))))))))))) -> (exists pftrim_gap_unique_removed_le. pftrim_gap_unique_removed_le+(t)=(u))Constructive proof overview
Generated structural guide
One normalized cut cannot lie after another: otherwise a supposedly leading nonzero coefficient belongs to the other removed zero prefix.
The unchanged tactic script uses 5 declared prerequisites and contains 79 exact native proof lines.
Alpha v34 checked-use · first admitted v32 · independently kernel and Lean verified; not Stable
Proof neighborhood
Direct dependencies
PQ0024 prime_field_polynomial_trim_length_bounds le_or_lt Stable theorem; checked-use authorized eq_decidable Stable theorem; checked-use authorized lt_not_le Stable theorem; checked-use authorized PQ0025 prime_field_polynomial_trim_leading_source_nonzeroDirect dependents
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
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–10
02Fix variables and assumptionsL11–14
03Establish hboundL15–24
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply prime field polynomial trim length bounds.
- L15
have hbound : ((exists pftrim_gap_compare_t. pftrim_gap_compare_t+(t)=(L)) /\ ((exists pftrim_gap_compare_M. pftrim_gap_compare_M+(M)=(L)))) - L16
specialize prime_field_polynomial_trim_length_bounds (p) - L17
specialize prime_field_polynomial_trim_length_bounds (b) - L18
specialize prime_field_polynomial_trim_length_bounds (c) - L19
specialize prime_field_polynomial_trim_length_bounds (L) - L20
specialize prime_field_polynomial_trim_length_bounds (t) - L21
specialize prime_field_polynomial_trim_length_bounds (d) - L22
specialize prime_field_polynomial_trim_length_bounds (e) - L23
specialize prime_field_polynomial_trim_length_bounds (M) - L24
apply prime_field_polynomial_trim_length_bounds
04Use earlier factsL25–25
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L25
exact h
05Separate the logical casesL26–26
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L26
cases hbound
06Establish horderL27–30
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply le or lt.
07Separate the logical casesL31–31
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L31
cases horder
08Use earlier factsL32–32
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L32
exact horder_left
09Separate the logical casesL33–33
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L33
exfalso
10Establish hNL34–37
11Separate the logical casesL38–38
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L38
cases hN
12Establish hkcopyL39–40
Establish this local claim before using it. It is not an additional assumption.
- L39
have hkcopy : FpPolynomialTrim(p,b,c,L,u,f,g,N)Definitions: FpPolynomialTrim - L40
exact hk
13Separate the logical casesL41–44
14Establish hlenL45–54
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply lt not le.
15Use earlier factsL55–55
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L55
exact hbound_left
16Establish hcopyL56–57
Establish this local claim before using it. It is not an additional assumption.
- L56
have hcopy : FpPolynomialTrim(p,b,c,L,t,d,e,M)Definitions: FpPolynomialTrim - L57
exact h
17Separate the logical casesL58–61
18Establish hzL62–71
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply hcopy right right left.
- L62
have hz : ((exists ff_h_pfp_compare_zero. ff_h_pfp_compare_zero + S (0) = S ((S (u)) * c)) /\ exists ff_q_pfp_compare_zero. b = ff_q_pfp_compare_zero * S ((S (u)) * c) + (0)) - L63
specialize hcopy_right_right_left (u) - L64
apply hcopy_right_right_left - L65
exact horder_right - L66
specialize prime_field_polynomial_trim_leading_source_nonzero (p) - L67
specialize prime_field_polynomial_trim_leading_source_nonzero (b) - L68
specialize prime_field_polynomial_trim_leading_source_nonzero (c) - L69
specialize prime_field_polynomial_trim_leading_source_nonzero (L) - L70
specialize prime_field_polynomial_trim_leading_source_nonzero (u) - L71
specialize prime_field_polynomial_trim_leading_source_nonzero (f)
19Use earlier factsL72–78
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L72
specialize prime_field_polynomial_trim_leading_source_nonzero (g) - L73
specialize prime_field_polynomial_trim_leading_source_nonzero (N) - L74
specialize prime_field_polynomial_trim_leading_source_nonzero (0) - L75
apply prime_field_polynomial_trim_leading_source_nonzero - L76
exact hk - L77
exact hN_right - L78
exact hz
20Calculate and transport equalitiesL79–79
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L79
refl
Original exact command ledger · 79 lines
- 0001
intro p - 0002
intro b - 0003
intro c - 0004
intro L - 0005
intro t - 0006
intro d - 0007
intro e - 0008
intro M - 0009
intro u - 0010
intro f - 0011
intro g - 0012
intro N - 0013
intro h - 0014
intro hk - 0015
have hbound : ((exists pftrim_gap_compare_t. pftrim_gap_compare_t+(t)=(L)) /\ ((exists pftrim_gap_compare_M. pftrim_gap_compare_M+(M)=(L)))) - 0016
specialize prime_field_polynomial_trim_length_bounds (p) - 0017
specialize prime_field_polynomial_trim_length_bounds (b) - 0018
specialize prime_field_polynomial_trim_length_bounds (c) - 0019
specialize prime_field_polynomial_trim_length_bounds (L) - 0020
specialize prime_field_polynomial_trim_length_bounds (t) - 0021
specialize prime_field_polynomial_trim_length_bounds (d) - 0022
specialize prime_field_polynomial_trim_length_bounds (e) - 0023
specialize prime_field_polynomial_trim_length_bounds (M) - 0024
apply prime_field_polynomial_trim_length_bounds - 0025
exact h - 0026
cases hbound - 0027
have horder : (exists pftrim_gap_compare_le. pftrim_gap_compare_le+(t)=(u)) \/ (exists pfa_gap_compare_lt. pfa_gap_compare_lt + S (u) = (t)) - 0028
specialize le_or_lt (t) - 0029
specialize le_or_lt (u) - 0030
apply le_or_lt - 0031
cases horder - 0032
exact horder_left - 0033
exfalso - 0034
have hN : N=0 \/ ~(N=0) - 0035
specialize eq_decidable (N) - 0036
specialize eq_decidable (0) - 0037
apply eq_decidable - 0038
cases hN - 0039
have hkcopy : (((L)=(u)+(N)) /\ (((forall fom_index_pfp_compare_second_copyinput. (exists fom_gap_pfp_compare_second_copyinput_index_bound. fom_gap_pfp_compare_second_copyinput_index_bound + S (fom_index_pfp_compare_second_copyinput) = L) -> exists fom_value_pfp_compare_second_copyinput. ((((exists fom_beta_height_pfp_compare_second_copyinput_entry. fom_beta_height_pfp_compare_second_copyinput_entry + S (fom_value_pfp_compare_second_copyinput) = S ((S (fom_index_pfp_compare_second_copyinput)) * c)) /\ exists fom_beta_quotient_pfp_compare_second_copyinput_entry. b = fom_beta_quotient_pfp_compare_second_copyinput_entry * S ((S (fom_index_pfp_compare_second_copyinput)) * c) + (fom_value_pfp_compare_second_copyinput))) /\ (exists fom_gap_pfp_compare_second_copyinput_value_bound. fom_gap_pfp_compare_second_copyinput_value_bound + S (fom_value_pfp_compare_second_copyinput) = p))) /\ (((forall pfp_repeat_index_compare_second_copyremoved. (exists pfa_gap_compare_second_copyremovedindex. pfa_gap_compare_second_copyremovedindex + S (pfp_repeat_index_compare_second_copyremoved) = (u)) -> (((exists ff_h_pfp_compare_second_copyremovedentry. ff_h_pfp_compare_second_copyremovedentry + S (0) = S ((S (pfp_repeat_index_compare_second_copyremoved)) * c)) /\ exists ff_q_pfp_compare_second_copyremovedentry. b = ff_q_pfp_compare_second_copyremovedentry * S ((S (pfp_repeat_index_compare_second_copyremoved)) * c) + (0)))) /\ (((forall pftrim_index_compare_second_copysuffix pftrim_value_compare_second_copysuffix. (exists pfa_gap_compare_second_copysuffixbound. pfa_gap_compare_second_copysuffixbound + S (pftrim_index_compare_second_copysuffix) = (N)) -> (((exists ff_h_pfp_compare_second_copysuffixsource. ff_h_pfp_compare_second_copysuffixsource + S (pftrim_value_compare_second_copysuffix) = S ((S ((u)+pftrim_index_compare_second_copysuffix)) * c)) /\ exists ff_q_pfp_compare_second_copysuffixsource. b = ff_q_pfp_compare_second_copysuffixsource * S ((S ((u)+pftrim_index_compare_second_copysuffix)) * c) + (pftrim_value_compare_second_copysuffix))) -> (((exists ff_h_pfp_compare_second_copysuffixoutput. ff_h_pfp_compare_second_copysuffixoutput + S (pftrim_value_compare_second_copysuffix) = S ((S (pftrim_index_compare_second_copysuffix)) * g)) /\ exists ff_q_pfp_compare_second_copysuffixoutput. f = ff_q_pfp_compare_second_copysuffixoutput * S ((S (pftrim_index_compare_second_copysuffix)) * g) + (pftrim_value_compare_second_copysuffix)))) /\ (((N)=0 \/ (exists pftrim_leading_compare_second_copynormal. ((((exists ff_h_pfp_compare_second_copynormalentry. ff_h_pfp_compare_second_copynormalentry + S (pftrim_leading_compare_second_copynormal) = S ((S (0)) * g)) /\ exists ff_q_pfp_compare_second_copynormalentry. f = ff_q_pfp_compare_second_copynormalentry * S ((S (0)) * g) + (pftrim_leading_compare_second_copynormal))) /\ ((~(pftrim_leading_compare_second_copynormal=0)))))))))))))) - 0040
exact hk - 0041
cases hkcopy - 0042
cases hkcopy_right - 0043
cases hkcopy_right_right - 0044
cases hkcopy_right_right_right - 0045
have hlen : L=u - 0046
trans u+N - 0047
exact hkcopy_left - 0048
rewrite hN_left - 0049
simp - 0050
rewrite hlen at hbound_left - 0051
specialize lt_not_le (u) - 0052
specialize lt_not_le (t) - 0053
apply lt_not_le - 0054
exact horder_right - 0055
exact hbound_left - 0056
have hcopy : (((L)=(t)+(M)) /\ (((forall fom_index_pfp_compare_first_copyinput. (exists fom_gap_pfp_compare_first_copyinput_index_bound. fom_gap_pfp_compare_first_copyinput_index_bound + S (fom_index_pfp_compare_first_copyinput) = L) -> exists fom_value_pfp_compare_first_copyinput. ((((exists fom_beta_height_pfp_compare_first_copyinput_entry. fom_beta_height_pfp_compare_first_copyinput_entry + S (fom_value_pfp_compare_first_copyinput) = S ((S (fom_index_pfp_compare_first_copyinput)) * c)) /\ exists fom_beta_quotient_pfp_compare_first_copyinput_entry. b = fom_beta_quotient_pfp_compare_first_copyinput_entry * S ((S (fom_index_pfp_compare_first_copyinput)) * c) + (fom_value_pfp_compare_first_copyinput))) /\ (exists fom_gap_pfp_compare_first_copyinput_value_bound. fom_gap_pfp_compare_first_copyinput_value_bound + S (fom_value_pfp_compare_first_copyinput) = p))) /\ (((forall pfp_repeat_index_compare_first_copyremoved. (exists pfa_gap_compare_first_copyremovedindex. pfa_gap_compare_first_copyremovedindex + S (pfp_repeat_index_compare_first_copyremoved) = (t)) -> (((exists ff_h_pfp_compare_first_copyremovedentry. ff_h_pfp_compare_first_copyremovedentry + S (0) = S ((S (pfp_repeat_index_compare_first_copyremoved)) * c)) /\ exists ff_q_pfp_compare_first_copyremovedentry. b = ff_q_pfp_compare_first_copyremovedentry * S ((S (pfp_repeat_index_compare_first_copyremoved)) * c) + (0)))) /\ (((forall pftrim_index_compare_first_copysuffix pftrim_value_compare_first_copysuffix. (exists pfa_gap_compare_first_copysuffixbound. pfa_gap_compare_first_copysuffixbound + S (pftrim_index_compare_first_copysuffix) = (M)) -> (((exists ff_h_pfp_compare_first_copysuffixsource. ff_h_pfp_compare_first_copysuffixsource + S (pftrim_value_compare_first_copysuffix) = S ((S ((t)+pftrim_index_compare_first_copysuffix)) * c)) /\ exists ff_q_pfp_compare_first_copysuffixsource. b = ff_q_pfp_compare_first_copysuffixsource * S ((S ((t)+pftrim_index_compare_first_copysuffix)) * c) + (pftrim_value_compare_first_copysuffix))) -> (((exists ff_h_pfp_compare_first_copysuffixoutput. ff_h_pfp_compare_first_copysuffixoutput + S (pftrim_value_compare_first_copysuffix) = S ((S (pftrim_index_compare_first_copysuffix)) * e)) /\ exists ff_q_pfp_compare_first_copysuffixoutput. d = ff_q_pfp_compare_first_copysuffixoutput * S ((S (pftrim_index_compare_first_copysuffix)) * e) + (pftrim_value_compare_first_copysuffix)))) /\ (((M)=0 \/ (exists pftrim_leading_compare_first_copynormal. ((((exists ff_h_pfp_compare_first_copynormalentry. ff_h_pfp_compare_first_copynormalentry + S (pftrim_leading_compare_first_copynormal) = S ((S (0)) * e)) /\ exists ff_q_pfp_compare_first_copynormalentry. d = ff_q_pfp_compare_first_copynormalentry * S ((S (0)) * e) + (pftrim_leading_compare_first_copynormal))) /\ ((~(pftrim_leading_compare_first_copynormal=0)))))))))))))) - 0057
exact h - 0058
cases hcopy - 0059
cases hcopy_right - 0060
cases hcopy_right_right - 0061
cases hcopy_right_right_right - 0062
have hz : ((exists ff_h_pfp_compare_zero. ff_h_pfp_compare_zero + S (0) = S ((S (u)) * c)) /\ exists ff_q_pfp_compare_zero. b = ff_q_pfp_compare_zero * S ((S (u)) * c) + (0)) - 0063
specialize hcopy_right_right_left (u) - 0064
apply hcopy_right_right_left - 0065
exact horder_right - 0066
specialize prime_field_polynomial_trim_leading_source_nonzero (p) - 0067
specialize prime_field_polynomial_trim_leading_source_nonzero (b) - 0068
specialize prime_field_polynomial_trim_leading_source_nonzero (c) - 0069
specialize prime_field_polynomial_trim_leading_source_nonzero (L) - 0070
specialize prime_field_polynomial_trim_leading_source_nonzero (u) - 0071
specialize prime_field_polynomial_trim_leading_source_nonzero (f) - 0072
specialize prime_field_polynomial_trim_leading_source_nonzero (g) - 0073
specialize prime_field_polynomial_trim_leading_source_nonzero (N) - 0074
specialize prime_field_polynomial_trim_leading_source_nonzero (0) - 0075
apply prime_field_polynomial_trim_leading_source_nonzero - 0076
exact hk - 0077
exact hN_right - 0078
exact hz - 0079
refl