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 ab ac L. (forall fom_index_pfp_gcd_reduced_input. (exists fom_gap_pfp_gcd_reduced_input_index_bound. fom_gap_pfp_gcd_reduced_input_index_bound + S (fom_index_pfp_gcd_reduced_input) = L) -> exists fom_value_pfp_gcd_reduced_input. ((((exists fom_beta_height_pfp_gcd_reduced_input_entry. fom_beta_height_pfp_gcd_reduced_input_entry + S (fom_value_pfp_gcd_reduced_input) = S ((S (fom_index_pfp_gcd_reduced_input)) * ac)) /\ exists fom_beta_quotient_pfp_gcd_reduced_input_entry. ab = fom_beta_quotient_pfp_gcd_reduced_input_entry * S ((S (fom_index_pfp_gcd_reduced_input)) * ac) + (fom_value_pfp_gcd_reduced_input))) /\ (exists fom_gap_pfp_gcd_reduced_input_value_bound. fom_gap_pfp_gcd_reduced_input_value_bound + S (fom_value_pfp_gcd_reduced_input) = p))) -> (exists tb tc K. ((forall fom_index_pfp_gcd_reduced_result_bounded. (exists fom_gap_pfp_gcd_reduced_result_bounded_index_bound. fom_gap_pfp_gcd_reduced_result_bounded_index_bound + S (fom_index_pfp_gcd_reduced_result_bounded) = K) -> exists fom_value_pfp_gcd_reduced_result_bounded. ((((exists fom_beta_height_pfp_gcd_reduced_result_bounded_entry. fom_beta_height_pfp_gcd_reduced_result_bounded_entry + S (fom_value_pfp_gcd_reduced_result_bounded) = S ((S (fom_index_pfp_gcd_reduced_result_bounded)) * tc)) /\ exists fom_beta_quotient_pfp_gcd_reduced_result_bounded_entry. tb = fom_beta_quotient_pfp_gcd_reduced_result_bounded_entry * S ((S (fom_index_pfp_gcd_reduced_result_bounded)) * tc) + (fom_value_pfp_gcd_reduced_result_bounded))) /\ (exists fom_gap_pfp_gcd_reduced_result_bounded_value_bound. fom_gap_pfp_gcd_reduced_result_bounded_value_bound + S (fom_value_pfp_gcd_reduced_result_bounded) = p))) /\ (((forall pfrep_power_gcd_reduced_result_equivalent pfrep_left_gcd_reduced_result_equivalent pfrep_right_gcd_reduced_result_equivalent. ((exists pfrep_position_gcd_reduced_result_equivalentfirst. ((pfrep_position_gcd_reduced_result_equivalentfirst+S (pfrep_power_gcd_reduced_result_equivalent)=(K)) /\ ((((exists ff_h_pfp_gcd_reduced_result_equivalentfirstentry. ff_h_pfp_gcd_reduced_result_equivalentfirstentry + S (pfrep_left_gcd_reduced_result_equivalent) = S ((S (pfrep_position_gcd_reduced_result_equivalentfirst)) * tc)) /\ exists ff_q_pfp_gcd_reduced_result_equivalentfirstentry. tb = ff_q_pfp_gcd_reduced_result_equivalentfirstentry * S ((S (pfrep_position_gcd_reduced_result_equivalentfirst)) * tc) + (pfrep_left_gcd_reduced_result_equivalent)))))) \/ (((exists pfrep_gap_gcd_reduced_result_equivalentfirstoutside. pfrep_gap_gcd_reduced_result_equivalentfirstoutside+(K)=(pfrep_power_gcd_reduced_result_equivalent)) /\ (((pfrep_left_gcd_reduced_result_equivalent)=0))))) -> ((exists pfrep_position_gcd_reduced_result_equivalentsecond. ((pfrep_position_gcd_reduced_result_equivalentsecond+S (pfrep_power_gcd_reduced_result_equivalent)=(L)) /\ ((((exists ff_h_pfp_gcd_reduced_result_equivalentsecondentry. ff_h_pfp_gcd_reduced_result_equivalentsecondentry + S (pfrep_right_gcd_reduced_result_equivalent) = S ((S (pfrep_position_gcd_reduced_result_equivalentsecond)) * ac)) /\ exists ff_q_pfp_gcd_reduced_result_equivalentsecondentry. ab = ff_q_pfp_gcd_reduced_result_equivalentsecondentry * S ((S (pfrep_position_gcd_reduced_result_equivalentsecond)) * ac) + (pfrep_right_gcd_reduced_result_equivalent)))))) \/ (((exists pfrep_gap_gcd_reduced_result_equivalentsecondoutside. pfrep_gap_gcd_reduced_result_equivalentsecondoutside+(L)=(pfrep_power_gcd_reduced_result_equivalent)) /\ (((pfrep_right_gcd_reduced_result_equivalent)=0))))) -> pfrep_left_gcd_reduced_result_equivalent=pfrep_right_gcd_reduced_result_equivalent) /\ (((exists pfc_gap_gcd_reduced_result_length. pfc_gap_gcd_reduced_result_length+(K)=(L)) /\ (((K)=0 \/ (exists pfg_degree_gcd_reduced_result. (((K)=S (pfg_degree_gcd_reduced_result)) /\ (((forall fom_index_pfp_gcd_reduced_result_degreecoefficients. (exists fom_gap_pfp_gcd_reduced_result_degreecoefficients_index_bound. fom_gap_pfp_gcd_reduced_result_degreecoefficients_index_bound + S (fom_index_pfp_gcd_reduced_result_degreecoefficients) = K) -> exists fom_value_pfp_gcd_reduced_result_degreecoefficients. ((((exists fom_beta_height_pfp_gcd_reduced_result_degreecoefficients_entry. fom_beta_height_pfp_gcd_reduced_result_degreecoefficients_entry + S (fom_value_pfp_gcd_reduced_result_degreecoefficients) = S ((S (fom_index_pfp_gcd_reduced_result_degreecoefficients)) * tc)) /\ exists fom_beta_quotient_pfp_gcd_reduced_result_degreecoefficients_entry. tb = fom_beta_quotient_pfp_gcd_reduced_result_degreecoefficients_entry * S ((S (fom_index_pfp_gcd_reduced_result_degreecoefficients)) * tc) + (fom_value_pfp_gcd_reduced_result_degreecoefficients))) /\ (exists fom_gap_pfp_gcd_reduced_result_degreecoefficients_value_bound. fom_gap_pfp_gcd_reduced_result_degreecoefficients_value_bound + S (fom_value_pfp_gcd_reduced_result_degreecoefficients) = p))) /\ ((exists pfd_leading_gcd_reduced_result_degree. ((((exists ff_h_pfp_gcd_reduced_result_degreeentry. ff_h_pfp_gcd_reduced_result_degreeentry + S (pfd_leading_gcd_reduced_result_degree) = S ((S (0)) * tc)) /\ exists ff_q_pfp_gcd_reduced_result_degreeentry. tb = ff_q_pfp_gcd_reduced_result_degreeentry * S ((S (0)) * tc) + (pfd_leading_gcd_reduced_result_degree))) /\ ((~(pfd_leading_gcd_reduced_result_degree=0))))))))))))))))))Constructive proof overview
Generated structural guide
Construct a formally equivalent canonical representative of no greater retained length, either empty or with an actual nonzero leading coefficient and represented degree. This trims stored leading zeros without requiring a prime modulus.
The unchanged tactic script uses 7 declared prerequisites and contains 81 exact native proof lines.
Alpha v34 checked-use · first admitted v34 · independently kernel and Lean verified; not Stable
Proof neighborhood
Direct dependencies
prime_field_polynomial_trim_exists Alpha theorem; checked-use authorized prime_field_polynomial_trim_output_coefficients Alpha theorem; checked-use authorized prime_field_polynomial_equivalent_symmetric Alpha theorem; checked-use authorized prime_field_polynomial_trim_equivalent Alpha theorem; checked-use authorized prime_field_polynomial_trim_length_bounds Alpha theorem; checked-use authorized eq_decidable Alpha theorem; checked-use authorized prime_field_polynomial_trim_nonempty_degree_exists Alpha theorem; checked-use authorizedDirect 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.
01Fix variables and assumptionsL1–5
02Establish htL6–12
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply prime field polynomial trim exists.
- L6
have ht : ∃ t. ∃ tb. ∃ tc. ∃ K. FpPolynomialTrim(p,ab,ac,L,t,tb,tc,K)Definitions: FpPolynomialTrim - L7
specialize prime_field_polynomial_trim_exists (p) - L8
specialize prime_field_polynomial_trim_exists (ab) - L9
specialize prime_field_polynomial_trim_exists (ac) - L10
specialize prime_field_polynomial_trim_exists (L) - L11
apply prime_field_polynomial_trim_exists - L12
exact hA
03Separate the logical casesL13–16
04Construct an explicit witnessL17–19
05Separate the logical casesL20–20
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L20
split
06Use earlier factsL21–30
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L21
specialize prime_field_polynomial_trim_output_coefficients (p) - L22
specialize prime_field_polynomial_trim_output_coefficients (ab) - L23
specialize prime_field_polynomial_trim_output_coefficients (ac) - L24
specialize prime_field_polynomial_trim_output_coefficients (L) - L25
specialize prime_field_polynomial_trim_output_coefficients (x) - L26
specialize prime_field_polynomial_trim_output_coefficients (x1) - L27
specialize prime_field_polynomial_trim_output_coefficients (x2) - L28
specialize prime_field_polynomial_trim_output_coefficients (x3) - L29
apply prime_field_polynomial_trim_output_coefficients - L30
exact ht_witness_witness_witness_witness
07Separate the logical casesL31–31
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L31
split
08Use earlier factsL32–41
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L32
specialize prime_field_polynomial_equivalent_symmetric (ab) - L33
specialize prime_field_polynomial_equivalent_symmetric (ac) - L34
specialize prime_field_polynomial_equivalent_symmetric (L) - L35
specialize prime_field_polynomial_equivalent_symmetric (x1) - L36
specialize prime_field_polynomial_equivalent_symmetric (x2) - L37
specialize prime_field_polynomial_equivalent_symmetric (x3) - L38
apply prime_field_polynomial_equivalent_symmetric - L39
specialize prime_field_polynomial_trim_equivalent (p) - L40
specialize prime_field_polynomial_trim_equivalent (ab) - L41
specialize prime_field_polynomial_trim_equivalent (ac)
09Use earlier factsL42–48
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L42
specialize prime_field_polynomial_trim_equivalent (L) - L43
specialize prime_field_polynomial_trim_equivalent (x) - L44
specialize prime_field_polynomial_trim_equivalent (x1) - L45
specialize prime_field_polynomial_trim_equivalent (x2) - L46
specialize prime_field_polynomial_trim_equivalent (x3) - L47
apply prime_field_polynomial_trim_equivalent - L48
exact ht_witness_witness_witness_witness
10Separate the logical casesL49–49
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L49
split
11Establish hbL50–59
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply prime field polynomial trim length bounds.
- L50
have hb : ((exists pfc_gap_gcd_reduced_removed. pfc_gap_gcd_reduced_removed+(x)=(L)) /\ ((exists pfc_gap_gcd_reduced_retained. pfc_gap_gcd_reduced_retained+(x3)=(L)))) - L51
specialize prime_field_polynomial_trim_length_bounds (p) - L52
specialize prime_field_polynomial_trim_length_bounds (ab) - L53
specialize prime_field_polynomial_trim_length_bounds (ac) - L54
specialize prime_field_polynomial_trim_length_bounds (L) - L55
specialize prime_field_polynomial_trim_length_bounds (x) - L56
specialize prime_field_polynomial_trim_length_bounds (x1) - L57
specialize prime_field_polynomial_trim_length_bounds (x2) - L58
specialize prime_field_polynomial_trim_length_bounds (x3) - L59
apply prime_field_polynomial_trim_length_bounds
12Use earlier factsL60–60
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L60
exact ht_witness_witness_witness_witness
13Separate the logical casesL61–61
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L61
cases hb
14Use earlier factsL62–62
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L62
exact hb_right
15Establish hzL63–66
16Separate the logical casesL67–68
17Use earlier factsL69–69
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L69
exact hz_left
18Separate the logical casesL70–70
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L70
right
19Use earlier factsL71–80
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L71
specialize prime_field_polynomial_trim_nonempty_degree_exists (p) - L72
specialize prime_field_polynomial_trim_nonempty_degree_exists (ab) - L73
specialize prime_field_polynomial_trim_nonempty_degree_exists (ac) - L74
specialize prime_field_polynomial_trim_nonempty_degree_exists (L) - L75
specialize prime_field_polynomial_trim_nonempty_degree_exists (x) - L76
specialize prime_field_polynomial_trim_nonempty_degree_exists (x1) - L77
specialize prime_field_polynomial_trim_nonempty_degree_exists (x2) - L78
specialize prime_field_polynomial_trim_nonempty_degree_exists (x3) - L79
apply prime_field_polynomial_trim_nonempty_degree_exists - L80
exact ht_witness_witness_witness_witness
20Use earlier factsL81–81
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L81
exact hz_right
Original exact command ledger · 81 lines
- 0001
intro p - 0002
intro ab - 0003
intro ac - 0004
intro L - 0005
intro hA - 0006
have ht : exists t tb tc K. (((L)=(t)+(K)) /\ (((forall fom_index_pfp_gcd_reduced_triminput. (exists fom_gap_pfp_gcd_reduced_triminput_index_bound. fom_gap_pfp_gcd_reduced_triminput_index_bound + S (fom_index_pfp_gcd_reduced_triminput) = L) -> exists fom_value_pfp_gcd_reduced_triminput. ((((exists fom_beta_height_pfp_gcd_reduced_triminput_entry. fom_beta_height_pfp_gcd_reduced_triminput_entry + S (fom_value_pfp_gcd_reduced_triminput) = S ((S (fom_index_pfp_gcd_reduced_triminput)) * ac)) /\ exists fom_beta_quotient_pfp_gcd_reduced_triminput_entry. ab = fom_beta_quotient_pfp_gcd_reduced_triminput_entry * S ((S (fom_index_pfp_gcd_reduced_triminput)) * ac) + (fom_value_pfp_gcd_reduced_triminput))) /\ (exists fom_gap_pfp_gcd_reduced_triminput_value_bound. fom_gap_pfp_gcd_reduced_triminput_value_bound + S (fom_value_pfp_gcd_reduced_triminput) = p))) /\ (((forall pfp_repeat_index_gcd_reduced_trimremoved. (exists pfa_gap_gcd_reduced_trimremovedindex. pfa_gap_gcd_reduced_trimremovedindex + S (pfp_repeat_index_gcd_reduced_trimremoved) = (t)) -> (((exists ff_h_pfp_gcd_reduced_trimremovedentry. ff_h_pfp_gcd_reduced_trimremovedentry + S (0) = S ((S (pfp_repeat_index_gcd_reduced_trimremoved)) * ac)) /\ exists ff_q_pfp_gcd_reduced_trimremovedentry. ab = ff_q_pfp_gcd_reduced_trimremovedentry * S ((S (pfp_repeat_index_gcd_reduced_trimremoved)) * ac) + (0)))) /\ (((forall pftrim_index_gcd_reduced_trimsuffix pftrim_value_gcd_reduced_trimsuffix. (exists pfa_gap_gcd_reduced_trimsuffixbound. pfa_gap_gcd_reduced_trimsuffixbound + S (pftrim_index_gcd_reduced_trimsuffix) = (K)) -> (((exists ff_h_pfp_gcd_reduced_trimsuffixsource. ff_h_pfp_gcd_reduced_trimsuffixsource + S (pftrim_value_gcd_reduced_trimsuffix) = S ((S ((t)+pftrim_index_gcd_reduced_trimsuffix)) * ac)) /\ exists ff_q_pfp_gcd_reduced_trimsuffixsource. ab = ff_q_pfp_gcd_reduced_trimsuffixsource * S ((S ((t)+pftrim_index_gcd_reduced_trimsuffix)) * ac) + (pftrim_value_gcd_reduced_trimsuffix))) -> (((exists ff_h_pfp_gcd_reduced_trimsuffixoutput. ff_h_pfp_gcd_reduced_trimsuffixoutput + S (pftrim_value_gcd_reduced_trimsuffix) = S ((S (pftrim_index_gcd_reduced_trimsuffix)) * tc)) /\ exists ff_q_pfp_gcd_reduced_trimsuffixoutput. tb = ff_q_pfp_gcd_reduced_trimsuffixoutput * S ((S (pftrim_index_gcd_reduced_trimsuffix)) * tc) + (pftrim_value_gcd_reduced_trimsuffix)))) /\ (((K)=0 \/ (exists pftrim_leading_gcd_reduced_trimnormal. ((((exists ff_h_pfp_gcd_reduced_trimnormalentry. ff_h_pfp_gcd_reduced_trimnormalentry + S (pftrim_leading_gcd_reduced_trimnormal) = S ((S (0)) * tc)) /\ exists ff_q_pfp_gcd_reduced_trimnormalentry. tb = ff_q_pfp_gcd_reduced_trimnormalentry * S ((S (0)) * tc) + (pftrim_leading_gcd_reduced_trimnormal))) /\ ((~(pftrim_leading_gcd_reduced_trimnormal=0)))))))))))))) - 0007
specialize prime_field_polynomial_trim_exists (p) - 0008
specialize prime_field_polynomial_trim_exists (ab) - 0009
specialize prime_field_polynomial_trim_exists (ac) - 0010
specialize prime_field_polynomial_trim_exists (L) - 0011
apply prime_field_polynomial_trim_exists - 0012
exact hA - 0013
cases ht - 0014
cases ht_witness - 0015
cases ht_witness_witness - 0016
cases ht_witness_witness_witness - 0017
exists x1 - 0018
exists x2 - 0019
exists x3 - 0020
split - 0021
specialize prime_field_polynomial_trim_output_coefficients (p) - 0022
specialize prime_field_polynomial_trim_output_coefficients (ab) - 0023
specialize prime_field_polynomial_trim_output_coefficients (ac) - 0024
specialize prime_field_polynomial_trim_output_coefficients (L) - 0025
specialize prime_field_polynomial_trim_output_coefficients (x) - 0026
specialize prime_field_polynomial_trim_output_coefficients (x1) - 0027
specialize prime_field_polynomial_trim_output_coefficients (x2) - 0028
specialize prime_field_polynomial_trim_output_coefficients (x3) - 0029
apply prime_field_polynomial_trim_output_coefficients - 0030
exact ht_witness_witness_witness_witness - 0031
split - 0032
specialize prime_field_polynomial_equivalent_symmetric (ab) - 0033
specialize prime_field_polynomial_equivalent_symmetric (ac) - 0034
specialize prime_field_polynomial_equivalent_symmetric (L) - 0035
specialize prime_field_polynomial_equivalent_symmetric (x1) - 0036
specialize prime_field_polynomial_equivalent_symmetric (x2) - 0037
specialize prime_field_polynomial_equivalent_symmetric (x3) - 0038
apply prime_field_polynomial_equivalent_symmetric - 0039
specialize prime_field_polynomial_trim_equivalent (p) - 0040
specialize prime_field_polynomial_trim_equivalent (ab) - 0041
specialize prime_field_polynomial_trim_equivalent (ac) - 0042
specialize prime_field_polynomial_trim_equivalent (L) - 0043
specialize prime_field_polynomial_trim_equivalent (x) - 0044
specialize prime_field_polynomial_trim_equivalent (x1) - 0045
specialize prime_field_polynomial_trim_equivalent (x2) - 0046
specialize prime_field_polynomial_trim_equivalent (x3) - 0047
apply prime_field_polynomial_trim_equivalent - 0048
exact ht_witness_witness_witness_witness - 0049
split - 0050
have hb : ((exists pfc_gap_gcd_reduced_removed. pfc_gap_gcd_reduced_removed+(x)=(L)) /\ ((exists pfc_gap_gcd_reduced_retained. pfc_gap_gcd_reduced_retained+(x3)=(L)))) - 0051
specialize prime_field_polynomial_trim_length_bounds (p) - 0052
specialize prime_field_polynomial_trim_length_bounds (ab) - 0053
specialize prime_field_polynomial_trim_length_bounds (ac) - 0054
specialize prime_field_polynomial_trim_length_bounds (L) - 0055
specialize prime_field_polynomial_trim_length_bounds (x) - 0056
specialize prime_field_polynomial_trim_length_bounds (x1) - 0057
specialize prime_field_polynomial_trim_length_bounds (x2) - 0058
specialize prime_field_polynomial_trim_length_bounds (x3) - 0059
apply prime_field_polynomial_trim_length_bounds - 0060
exact ht_witness_witness_witness_witness - 0061
cases hb - 0062
exact hb_right - 0063
have hz : x3=0 \/ ~(x3=0) - 0064
specialize eq_decidable (x3) - 0065
specialize eq_decidable (0) - 0066
apply eq_decidable - 0067
cases hz - 0068
left - 0069
exact hz_left - 0070
right - 0071
specialize prime_field_polynomial_trim_nonempty_degree_exists (p) - 0072
specialize prime_field_polynomial_trim_nonempty_degree_exists (ab) - 0073
specialize prime_field_polynomial_trim_nonempty_degree_exists (ac) - 0074
specialize prime_field_polynomial_trim_nonempty_degree_exists (L) - 0075
specialize prime_field_polynomial_trim_nonempty_degree_exists (x) - 0076
specialize prime_field_polynomial_trim_nonempty_degree_exists (x1) - 0077
specialize prime_field_polynomial_trim_nonempty_degree_exists (x2) - 0078
specialize prime_field_polynomial_trim_nonempty_degree_exists (x3) - 0079
apply prime_field_polynomial_trim_nonempty_degree_exists - 0080
exact ht_witness_witness_witness_witness - 0081
exact hz_right