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 original first-admission records.
Exact expanded PA statement
forall l b c P. (forall wtp_range_index_wer_range_two. (exists wtp_range_gap_wer_range_two. wtp_range_gap_wer_range_two + S wtp_range_index_wer_range_two = l) -> (((exists ff_h_wer_range_two_decoded. ff_h_wer_range_two_decoded + S (2 + wtp_range_index_wer_range_two) = S ((S (wtp_range_index_wer_range_two)) * c)) /\ exists ff_q_wer_range_two_decoded. b = ff_q_wer_range_two_decoded * S ((S (wtp_range_index_wer_range_two)) * c) + (2 + wtp_range_index_wer_range_two)))) -> (exists ff_u_wer_range_two_product ff_v_wer_range_two_product. ((((exists ff_h_wer_range_two_product_start. ff_h_wer_range_two_product_start + S (1) = S ((S (0)) * ff_v_wer_range_two_product)) /\ exists ff_q_wer_range_two_product_start. ff_u_wer_range_two_product = ff_q_wer_range_two_product_start * S ((S (0)) * ff_v_wer_range_two_product) + (1))) /\ ((((exists ff_h_wer_range_two_product_terminal. ff_h_wer_range_two_product_terminal + S (P) = S ((S (l)) * ff_v_wer_range_two_product)) /\ exists ff_q_wer_range_two_product_terminal. ff_u_wer_range_two_product = ff_q_wer_range_two_product_terminal * S ((S (l)) * ff_v_wer_range_two_product) + (P))) /\ forall ff_i_wer_range_two_product. (exists ff_lt_wer_range_two_product_bound. ff_lt_wer_range_two_product_bound + S ff_i_wer_range_two_product = l) -> exists ff_p_wer_range_two_product ff_r_wer_range_two_product ff_s_wer_range_two_product. ((((exists ff_h_wer_range_two_product_factor. ff_h_wer_range_two_product_factor + S (ff_p_wer_range_two_product) = S ((S (ff_i_wer_range_two_product)) * c)) /\ exists ff_q_wer_range_two_product_factor. b = ff_q_wer_range_two_product_factor * S ((S (ff_i_wer_range_two_product)) * c) + (ff_p_wer_range_two_product))) /\ ((((exists ff_h_wer_range_two_product_partial. ff_h_wer_range_two_product_partial + S (ff_r_wer_range_two_product) = S ((S (ff_i_wer_range_two_product)) * ff_v_wer_range_two_product)) /\ exists ff_q_wer_range_two_product_partial. ff_u_wer_range_two_product = ff_q_wer_range_two_product_partial * S ((S (ff_i_wer_range_two_product)) * ff_v_wer_range_two_product) + (ff_r_wer_range_two_product))) /\ ((((exists ff_h_wer_range_two_product_successor. ff_h_wer_range_two_product_successor + S (ff_s_wer_range_two_product) = S ((S (S ff_i_wer_range_two_product)) * ff_v_wer_range_two_product)) /\ exists ff_q_wer_range_two_product_successor. ff_u_wer_range_two_product = ff_q_wer_range_two_product_successor * S ((S (S ff_i_wer_range_two_product)) * ff_v_wer_range_two_product) + (ff_s_wer_range_two_product))) /\ ff_s_wer_range_two_product = ff_r_wer_range_two_product * ff_p_wer_range_two_product)))))) -> (exists wer_factor_code_wer_factorial_successor wer_factor_scale_wer_factorial_successor. ((forall wer_range_index_wer_factorial_successor_range. (exists wer_range_gap_wer_factorial_successor_range. wer_range_gap_wer_factorial_successor_range + S wer_range_index_wer_factorial_successor_range = S l) -> (((exists ff_h_wer_factorial_successor_range_decoded. ff_h_wer_factorial_successor_range_decoded + S (1 + wer_range_index_wer_factorial_successor_range) = S ((S (wer_range_index_wer_factorial_successor_range)) * wer_factor_scale_wer_factorial_successor)) /\ exists ff_q_wer_factorial_successor_range_decoded. wer_factor_code_wer_factorial_successor = ff_q_wer_factorial_successor_range_decoded * S ((S (wer_range_index_wer_factorial_successor_range)) * wer_factor_scale_wer_factorial_successor) + (1 + wer_range_index_wer_factorial_successor_range)))) /\ (exists ff_u_wer_factorial_successor_product ff_v_wer_factorial_successor_product. ((((exists ff_h_wer_factorial_successor_product_start. ff_h_wer_factorial_successor_product_start + S (1) = S ((S (0)) * ff_v_wer_factorial_successor_product)) /\ exists ff_q_wer_factorial_successor_product_start. ff_u_wer_factorial_successor_product = ff_q_wer_factorial_successor_product_start * S ((S (0)) * ff_v_wer_factorial_successor_product) + (1))) /\ ((((exists ff_h_wer_factorial_successor_product_terminal. ff_h_wer_factorial_successor_product_terminal + S (P) = S ((S (S l)) * ff_v_wer_factorial_successor_product)) /\ exists ff_q_wer_factorial_successor_product_terminal. ff_u_wer_factorial_successor_product = ff_q_wer_factorial_successor_product_terminal * S ((S (S l)) * ff_v_wer_factorial_successor_product) + (P))) /\ forall ff_i_wer_factorial_successor_product. (exists ff_lt_wer_factorial_successor_product_bound. ff_lt_wer_factorial_successor_product_bound + S ff_i_wer_factorial_successor_product = S l) -> exists ff_p_wer_factorial_successor_product ff_r_wer_factorial_successor_product ff_s_wer_factorial_successor_product. ((((exists ff_h_wer_factorial_successor_product_factor. ff_h_wer_factorial_successor_product_factor + S (ff_p_wer_factorial_successor_product) = S ((S (ff_i_wer_factorial_successor_product)) * wer_factor_scale_wer_factorial_successor)) /\ exists ff_q_wer_factorial_successor_product_factor. wer_factor_code_wer_factorial_successor = ff_q_wer_factorial_successor_product_factor * S ((S (ff_i_wer_factorial_successor_product)) * wer_factor_scale_wer_factorial_successor) + (ff_p_wer_factorial_successor_product))) /\ ((((exists ff_h_wer_factorial_successor_product_partial. ff_h_wer_factorial_successor_product_partial + S (ff_r_wer_factorial_successor_product) = S ((S (ff_i_wer_factorial_successor_product)) * ff_v_wer_factorial_successor_product)) /\ exists ff_q_wer_factorial_successor_product_partial. ff_u_wer_factorial_successor_product = ff_q_wer_factorial_successor_product_partial * S ((S (ff_i_wer_factorial_successor_product)) * ff_v_wer_factorial_successor_product) + (ff_r_wer_factorial_successor_product))) /\ ((((exists ff_h_wer_factorial_successor_product_successor. ff_h_wer_factorial_successor_product_successor + S (ff_s_wer_factorial_successor_product) = S ((S (S ff_i_wer_factorial_successor_product)) * ff_v_wer_factorial_successor_product)) /\ exists ff_q_wer_factorial_successor_product_successor. ff_u_wer_factorial_successor_product = ff_q_wer_factorial_successor_product_successor * S ((S (S ff_i_wer_factorial_successor_product)) * ff_v_wer_factorial_successor_product) + (ff_s_wer_factorial_successor_product))) /\ ff_s_wer_factorial_successor_product = ff_r_wer_factorial_successor_product * ff_p_wer_factorial_successor_product))))))))Structural proof guide
Generated structural guide
A product of 2,...,l+1 is the factorial of l+1; the missing leading factor is one.
Use the direct prerequisites factorial_one_value, beta_product_zero, beta_product_succ_decompose, beta_range_entry_eq, factorial_exists, factorial_succ_decompose, factorial_functional, le_succ, le_refl, add_succ_left, zero_add, mul_congr as previously established PA formulas.
The proof proceeds by structural induction (1), case analysis (8), intermediate claims (13), equality transport (4), certified simplification (1).
Referenced ingredients
Proof neighborhood
Direct dependencies
PA00A3 factorial_one_value PA0049 beta_product_zero PA004A beta_product_succ_decompose PA0032 beta_range_entry_eq PA0060 factorial_exists PA0065 factorial_succ_decompose PA006B factorial_functional PA002O le_succ PA001A le_refl PA000E add_succ_left PA0001 zero_add PA0050 mul_congrDirect dependents
Formal native tactic body
Dependencies are introduced as named hypotheses before line 1. Linked names are exact direct references. This Alpha-v25 checked-use theorem is independently kernel-checked when replayed; it is not a Stable theorem.
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 (10)
01Fix variables and assumptionsL1–1
Work with arbitrary variables or the premises of the current implication.
- L1
intro l
02Induction on lL2–7
03Establish hponeL8–13
04Establish hfactorialL14–16
05Separate the logical casesL17–17
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L17
cases hfactorial
06Establish hfoneL18–23
07Establish hpxL24–33
08Fix variables and assumptionsL34–36
09Establish hrange_prefixL37–45
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply hrange.
- L37
have hrange_prefix : forall wtp_range_index_wer_step_prefix_range. (exists wtp_range_gap_wer_step_prefix_range. wtp_range_gap_wer_step_prefix_range + S wtp_range_index_wer_step_prefix_range = l) -> (((exists ff_h_wer_step_prefix_range_decoded. ff_h_wer_step_prefix_range_decoded + S (2 + wtp_range_index_wer_step_prefix_range) = S ((S (wtp_range_index_wer_step_prefix_range)) * c)) /\ exists ff_q_wer_step_prefix_range_decoded. b = ff_q_wer_step_prefix_range_decoded * S ((S (wtp_range_index_wer_step_prefix_range)) * c) + (2 + wtp_range_index_wer_step_prefix_range))) - L38
intro i - L39
intro hi - L40
specialize hrange i - L41
apply hrange - L42
specialize le_succ (S i) - L43
specialize le_succ l - L44
apply le_succ - L45
exact hi
10Establish hdecompL46–52
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply beta product succ decompose.
11Separate the logical casesL53–56
12Establish hprefix_factorialL57–63
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply IH.
13Establish hfactor_valueL64–64
Establish this local claim before using it. It is not an additional assumption.
- L64
have hfactor_value : x = S (S l)
14Establish hfactor_rawL65–74
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply beta range entry eq.
- L65
have hfactor_raw : x = 2 + l - L66
specialize beta_range_entry_eq b - L67
specialize beta_range_entry_eq c - L68
specialize beta_range_entry_eq 2 - L69
specialize beta_range_entry_eq (S l) - L70
specialize beta_range_entry_eq l - L71
specialize beta_range_entry_eq x - L72
apply beta_range_entry_eq - L73
exact hrange - L74
specialize le_refl (S l)
15Use earlier factsL75–76
16Calculate and transport equalitiesL77–77
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L77
trans 2 + l
17Use earlier factsL78–78
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L78
exact hfactor_raw
18Calculate and transport equalitiesL79–79
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L79
simp [add_succ_left, zero_add]
19Establish hfull_factorialL80–82
20Separate the logical casesL83–83
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L83
cases hfull_factorial
21Establish hfactorial_decompL84–90
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply factorial succ decompose.
22Separate the logical casesL91–92
23Establish hprefix_eqL93–99
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply factorial functional.
24Establish hproduct_eqL100–109
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mul congr.
25Calculate and transport equalitiesL110–111
26Use earlier factsL112–112
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L112
exact hfactorial_decomp_witness_right
27Calculate and transport equalitiesL113–114
28Use earlier factsL115–115
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L115
exact hfull_factorial_witness
Original exact command ledger · 115 lines
- 0001
intro l - 0002
induction l - 0003
intro b - 0004
intro c - 0005
intro P - 0006
intro hrange - 0007
intro hproduct - 0008
have hpone : P = 1 - 0009
specialize beta_product_zero b - 0010
specialize beta_product_zero c - 0011
specialize beta_product_zero P - 0012
apply beta_product_zero - 0013
exact hproduct - 0014
have hfactorial : exists F. (exists wer_factor_code_wer_factorial_one_F wer_factor_scale_wer_factorial_one_F. ((forall wer_range_index_wer_factorial_one_F_range. (exists wer_range_gap_wer_factorial_one_F_range. wer_range_gap_wer_factorial_one_F_range + S wer_range_index_wer_factorial_one_F_range = 1) -> (((exists ff_h_wer_factorial_one_F_range_decoded. ff_h_wer_factorial_one_F_range_decoded + S (1 + wer_range_index_wer_factorial_one_F_range) = S ((S (wer_range_index_wer_factorial_one_F_range)) * wer_factor_scale_wer_factorial_one_F)) /\ exists ff_q_wer_factorial_one_F_range_decoded. wer_factor_code_wer_factorial_one_F = ff_q_wer_factorial_one_F_range_decoded * S ((S (wer_range_index_wer_factorial_one_F_range)) * wer_factor_scale_wer_factorial_one_F) + (1 + wer_range_index_wer_factorial_one_F_range)))) /\ (exists ff_u_wer_factorial_one_F_product ff_v_wer_factorial_one_F_product. ((((exists ff_h_wer_factorial_one_F_product_start. ff_h_wer_factorial_one_F_product_start + S (1) = S ((S (0)) * ff_v_wer_factorial_one_F_product)) /\ exists ff_q_wer_factorial_one_F_product_start. ff_u_wer_factorial_one_F_product = ff_q_wer_factorial_one_F_product_start * S ((S (0)) * ff_v_wer_factorial_one_F_product) + (1))) /\ ((((exists ff_h_wer_factorial_one_F_product_terminal. ff_h_wer_factorial_one_F_product_terminal + S (F) = S ((S (1)) * ff_v_wer_factorial_one_F_product)) /\ exists ff_q_wer_factorial_one_F_product_terminal. ff_u_wer_factorial_one_F_product = ff_q_wer_factorial_one_F_product_terminal * S ((S (1)) * ff_v_wer_factorial_one_F_product) + (F))) /\ forall ff_i_wer_factorial_one_F_product. (exists ff_lt_wer_factorial_one_F_product_bound. ff_lt_wer_factorial_one_F_product_bound + S ff_i_wer_factorial_one_F_product = 1) -> exists ff_p_wer_factorial_one_F_product ff_r_wer_factorial_one_F_product ff_s_wer_factorial_one_F_product. ((((exists ff_h_wer_factorial_one_F_product_factor. ff_h_wer_factorial_one_F_product_factor + S (ff_p_wer_factorial_one_F_product) = S ((S (ff_i_wer_factorial_one_F_product)) * wer_factor_scale_wer_factorial_one_F)) /\ exists ff_q_wer_factorial_one_F_product_factor. wer_factor_code_wer_factorial_one_F = ff_q_wer_factorial_one_F_product_factor * S ((S (ff_i_wer_factorial_one_F_product)) * wer_factor_scale_wer_factorial_one_F) + (ff_p_wer_factorial_one_F_product))) /\ ((((exists ff_h_wer_factorial_one_F_product_partial. ff_h_wer_factorial_one_F_product_partial + S (ff_r_wer_factorial_one_F_product) = S ((S (ff_i_wer_factorial_one_F_product)) * ff_v_wer_factorial_one_F_product)) /\ exists ff_q_wer_factorial_one_F_product_partial. ff_u_wer_factorial_one_F_product = ff_q_wer_factorial_one_F_product_partial * S ((S (ff_i_wer_factorial_one_F_product)) * ff_v_wer_factorial_one_F_product) + (ff_r_wer_factorial_one_F_product))) /\ ((((exists ff_h_wer_factorial_one_F_product_successor. ff_h_wer_factorial_one_F_product_successor + S (ff_s_wer_factorial_one_F_product) = S ((S (S ff_i_wer_factorial_one_F_product)) * ff_v_wer_factorial_one_F_product)) /\ exists ff_q_wer_factorial_one_F_product_successor. ff_u_wer_factorial_one_F_product = ff_q_wer_factorial_one_F_product_successor * S ((S (S ff_i_wer_factorial_one_F_product)) * ff_v_wer_factorial_one_F_product) + (ff_s_wer_factorial_one_F_product))) /\ ff_s_wer_factorial_one_F_product = ff_r_wer_factorial_one_F_product * ff_p_wer_factorial_one_F_product)))))))) - 0015
specialize factorial_exists 1 - 0016
exact factorial_exists - 0017
cases hfactorial - 0018
have hfone : x = 1 - 0019
specialize factorial_one_value 1 - 0020
specialize factorial_one_value x - 0021
apply factorial_one_value - 0022
refl - 0023
exact hfactorial_witness - 0024
have hpx : P = x - 0025
trans 1 - 0026
exact hpone - 0027
symm - 0028
exact hfone - 0029
rewrite hpx - 0030
rewrite hpx - 0031
exact hfactorial_witness - 0032
intro b - 0033
intro c - 0034
intro P - 0035
intro hrange - 0036
intro hproduct - 0037
have hrange_prefix : forall wtp_range_index_wer_step_prefix_range. (exists wtp_range_gap_wer_step_prefix_range. wtp_range_gap_wer_step_prefix_range + S wtp_range_index_wer_step_prefix_range = l) -> (((exists ff_h_wer_step_prefix_range_decoded. ff_h_wer_step_prefix_range_decoded + S (2 + wtp_range_index_wer_step_prefix_range) = S ((S (wtp_range_index_wer_step_prefix_range)) * c)) /\ exists ff_q_wer_step_prefix_range_decoded. b = ff_q_wer_step_prefix_range_decoded * S ((S (wtp_range_index_wer_step_prefix_range)) * c) + (2 + wtp_range_index_wer_step_prefix_range))) - 0038
intro i - 0039
intro hi - 0040
specialize hrange i - 0041
apply hrange - 0042
specialize le_succ (S i) - 0043
specialize le_succ l - 0044
apply le_succ - 0045
exact hi - 0046
have hdecomp : exists x x1. ((((exists ff_h_wer_step_factor. ff_h_wer_step_factor + S (x) = S ((S (l)) * c)) /\ exists ff_q_wer_step_factor. b = ff_q_wer_step_factor * S ((S (l)) * c) + (x))) /\ ((exists ff_u_wer_step_prefix_product ff_v_wer_step_prefix_product. ((((exists ff_h_wer_step_prefix_product_start. ff_h_wer_step_prefix_product_start + S (1) = S ((S (0)) * ff_v_wer_step_prefix_product)) /\ exists ff_q_wer_step_prefix_product_start. ff_u_wer_step_prefix_product = ff_q_wer_step_prefix_product_start * S ((S (0)) * ff_v_wer_step_prefix_product) + (1))) /\ ((((exists ff_h_wer_step_prefix_product_terminal. ff_h_wer_step_prefix_product_terminal + S (x1) = S ((S (l)) * ff_v_wer_step_prefix_product)) /\ exists ff_q_wer_step_prefix_product_terminal. ff_u_wer_step_prefix_product = ff_q_wer_step_prefix_product_terminal * S ((S (l)) * ff_v_wer_step_prefix_product) + (x1))) /\ forall ff_i_wer_step_prefix_product. (exists ff_lt_wer_step_prefix_product_bound. ff_lt_wer_step_prefix_product_bound + S ff_i_wer_step_prefix_product = l) -> exists ff_p_wer_step_prefix_product ff_r_wer_step_prefix_product ff_s_wer_step_prefix_product. ((((exists ff_h_wer_step_prefix_product_factor. ff_h_wer_step_prefix_product_factor + S (ff_p_wer_step_prefix_product) = S ((S (ff_i_wer_step_prefix_product)) * c)) /\ exists ff_q_wer_step_prefix_product_factor. b = ff_q_wer_step_prefix_product_factor * S ((S (ff_i_wer_step_prefix_product)) * c) + (ff_p_wer_step_prefix_product))) /\ ((((exists ff_h_wer_step_prefix_product_partial. ff_h_wer_step_prefix_product_partial + S (ff_r_wer_step_prefix_product) = S ((S (ff_i_wer_step_prefix_product)) * ff_v_wer_step_prefix_product)) /\ exists ff_q_wer_step_prefix_product_partial. ff_u_wer_step_prefix_product = ff_q_wer_step_prefix_product_partial * S ((S (ff_i_wer_step_prefix_product)) * ff_v_wer_step_prefix_product) + (ff_r_wer_step_prefix_product))) /\ ((((exists ff_h_wer_step_prefix_product_successor. ff_h_wer_step_prefix_product_successor + S (ff_s_wer_step_prefix_product) = S ((S (S ff_i_wer_step_prefix_product)) * ff_v_wer_step_prefix_product)) /\ exists ff_q_wer_step_prefix_product_successor. ff_u_wer_step_prefix_product = ff_q_wer_step_prefix_product_successor * S ((S (S ff_i_wer_step_prefix_product)) * ff_v_wer_step_prefix_product) + (ff_s_wer_step_prefix_product))) /\ ff_s_wer_step_prefix_product = ff_r_wer_step_prefix_product * ff_p_wer_step_prefix_product)))))) /\ P = x1 * x)) - 0047
specialize beta_product_succ_decompose b - 0048
specialize beta_product_succ_decompose c - 0049
specialize beta_product_succ_decompose l - 0050
specialize beta_product_succ_decompose P - 0051
apply beta_product_succ_decompose - 0052
exact hproduct - 0053
cases hdecomp - 0054
cases hdecomp_witness - 0055
cases hdecomp_witness_witness - 0056
cases hdecomp_witness_witness_right - 0057
have hprefix_factorial : exists wer_factor_code_wer_step_prefix_factorial wer_factor_scale_wer_step_prefix_factorial. ((forall wer_range_index_wer_step_prefix_factorial_range. (exists wer_range_gap_wer_step_prefix_factorial_range. wer_range_gap_wer_step_prefix_factorial_range + S wer_range_index_wer_step_prefix_factorial_range = S l) -> (((exists ff_h_wer_step_prefix_factorial_range_decoded. ff_h_wer_step_prefix_factorial_range_decoded + S (1 + wer_range_index_wer_step_prefix_factorial_range) = S ((S (wer_range_index_wer_step_prefix_factorial_range)) * wer_factor_scale_wer_step_prefix_factorial)) /\ exists ff_q_wer_step_prefix_factorial_range_decoded. wer_factor_code_wer_step_prefix_factorial = ff_q_wer_step_prefix_factorial_range_decoded * S ((S (wer_range_index_wer_step_prefix_factorial_range)) * wer_factor_scale_wer_step_prefix_factorial) + (1 + wer_range_index_wer_step_prefix_factorial_range)))) /\ (exists ff_u_wer_step_prefix_factorial_product ff_v_wer_step_prefix_factorial_product. ((((exists ff_h_wer_step_prefix_factorial_product_start. ff_h_wer_step_prefix_factorial_product_start + S (1) = S ((S (0)) * ff_v_wer_step_prefix_factorial_product)) /\ exists ff_q_wer_step_prefix_factorial_product_start. ff_u_wer_step_prefix_factorial_product = ff_q_wer_step_prefix_factorial_product_start * S ((S (0)) * ff_v_wer_step_prefix_factorial_product) + (1))) /\ ((((exists ff_h_wer_step_prefix_factorial_product_terminal. ff_h_wer_step_prefix_factorial_product_terminal + S (x1) = S ((S (S l)) * ff_v_wer_step_prefix_factorial_product)) /\ exists ff_q_wer_step_prefix_factorial_product_terminal. ff_u_wer_step_prefix_factorial_product = ff_q_wer_step_prefix_factorial_product_terminal * S ((S (S l)) * ff_v_wer_step_prefix_factorial_product) + (x1))) /\ forall ff_i_wer_step_prefix_factorial_product. (exists ff_lt_wer_step_prefix_factorial_product_bound. ff_lt_wer_step_prefix_factorial_product_bound + S ff_i_wer_step_prefix_factorial_product = S l) -> exists ff_p_wer_step_prefix_factorial_product ff_r_wer_step_prefix_factorial_product ff_s_wer_step_prefix_factorial_product. ((((exists ff_h_wer_step_prefix_factorial_product_factor. ff_h_wer_step_prefix_factorial_product_factor + S (ff_p_wer_step_prefix_factorial_product) = S ((S (ff_i_wer_step_prefix_factorial_product)) * wer_factor_scale_wer_step_prefix_factorial)) /\ exists ff_q_wer_step_prefix_factorial_product_factor. wer_factor_code_wer_step_prefix_factorial = ff_q_wer_step_prefix_factorial_product_factor * S ((S (ff_i_wer_step_prefix_factorial_product)) * wer_factor_scale_wer_step_prefix_factorial) + (ff_p_wer_step_prefix_factorial_product))) /\ ((((exists ff_h_wer_step_prefix_factorial_product_partial. ff_h_wer_step_prefix_factorial_product_partial + S (ff_r_wer_step_prefix_factorial_product) = S ((S (ff_i_wer_step_prefix_factorial_product)) * ff_v_wer_step_prefix_factorial_product)) /\ exists ff_q_wer_step_prefix_factorial_product_partial. ff_u_wer_step_prefix_factorial_product = ff_q_wer_step_prefix_factorial_product_partial * S ((S (ff_i_wer_step_prefix_factorial_product)) * ff_v_wer_step_prefix_factorial_product) + (ff_r_wer_step_prefix_factorial_product))) /\ ((((exists ff_h_wer_step_prefix_factorial_product_successor. ff_h_wer_step_prefix_factorial_product_successor + S (ff_s_wer_step_prefix_factorial_product) = S ((S (S ff_i_wer_step_prefix_factorial_product)) * ff_v_wer_step_prefix_factorial_product)) /\ exists ff_q_wer_step_prefix_factorial_product_successor. ff_u_wer_step_prefix_factorial_product = ff_q_wer_step_prefix_factorial_product_successor * S ((S (S ff_i_wer_step_prefix_factorial_product)) * ff_v_wer_step_prefix_factorial_product) + (ff_s_wer_step_prefix_factorial_product))) /\ ff_s_wer_step_prefix_factorial_product = ff_r_wer_step_prefix_factorial_product * ff_p_wer_step_prefix_factorial_product))))))) - 0058
specialize IH b - 0059
specialize IH c - 0060
specialize IH x1 - 0061
apply IH - 0062
exact hrange_prefix - 0063
exact hdecomp_witness_witness_right_left - 0064
have hfactor_value : x = S (S l) - 0065
have hfactor_raw : x = 2 + l - 0066
specialize beta_range_entry_eq b - 0067
specialize beta_range_entry_eq c - 0068
specialize beta_range_entry_eq 2 - 0069
specialize beta_range_entry_eq (S l) - 0070
specialize beta_range_entry_eq l - 0071
specialize beta_range_entry_eq x - 0072
apply beta_range_entry_eq - 0073
exact hrange - 0074
specialize le_refl (S l) - 0075
exact le_refl - 0076
exact hdecomp_witness_witness_left - 0077
trans 2 + l - 0078
exact hfactor_raw - 0079
simp [add_succ_left, zero_add] - 0080
have hfull_factorial : exists F. (exists wer_factor_code_wer_step_full_factorial_F wer_factor_scale_wer_step_full_factorial_F. ((forall wer_range_index_wer_step_full_factorial_F_range. (exists wer_range_gap_wer_step_full_factorial_F_range. wer_range_gap_wer_step_full_factorial_F_range + S wer_range_index_wer_step_full_factorial_F_range = S (S l)) -> (((exists ff_h_wer_step_full_factorial_F_range_decoded. ff_h_wer_step_full_factorial_F_range_decoded + S (1 + wer_range_index_wer_step_full_factorial_F_range) = S ((S (wer_range_index_wer_step_full_factorial_F_range)) * wer_factor_scale_wer_step_full_factorial_F)) /\ exists ff_q_wer_step_full_factorial_F_range_decoded. wer_factor_code_wer_step_full_factorial_F = ff_q_wer_step_full_factorial_F_range_decoded * S ((S (wer_range_index_wer_step_full_factorial_F_range)) * wer_factor_scale_wer_step_full_factorial_F) + (1 + wer_range_index_wer_step_full_factorial_F_range)))) /\ (exists ff_u_wer_step_full_factorial_F_product ff_v_wer_step_full_factorial_F_product. ((((exists ff_h_wer_step_full_factorial_F_product_start. ff_h_wer_step_full_factorial_F_product_start + S (1) = S ((S (0)) * ff_v_wer_step_full_factorial_F_product)) /\ exists ff_q_wer_step_full_factorial_F_product_start. ff_u_wer_step_full_factorial_F_product = ff_q_wer_step_full_factorial_F_product_start * S ((S (0)) * ff_v_wer_step_full_factorial_F_product) + (1))) /\ ((((exists ff_h_wer_step_full_factorial_F_product_terminal. ff_h_wer_step_full_factorial_F_product_terminal + S (F) = S ((S (S (S l))) * ff_v_wer_step_full_factorial_F_product)) /\ exists ff_q_wer_step_full_factorial_F_product_terminal. ff_u_wer_step_full_factorial_F_product = ff_q_wer_step_full_factorial_F_product_terminal * S ((S (S (S l))) * ff_v_wer_step_full_factorial_F_product) + (F))) /\ forall ff_i_wer_step_full_factorial_F_product. (exists ff_lt_wer_step_full_factorial_F_product_bound. ff_lt_wer_step_full_factorial_F_product_bound + S ff_i_wer_step_full_factorial_F_product = S (S l)) -> exists ff_p_wer_step_full_factorial_F_product ff_r_wer_step_full_factorial_F_product ff_s_wer_step_full_factorial_F_product. ((((exists ff_h_wer_step_full_factorial_F_product_factor. ff_h_wer_step_full_factorial_F_product_factor + S (ff_p_wer_step_full_factorial_F_product) = S ((S (ff_i_wer_step_full_factorial_F_product)) * wer_factor_scale_wer_step_full_factorial_F)) /\ exists ff_q_wer_step_full_factorial_F_product_factor. wer_factor_code_wer_step_full_factorial_F = ff_q_wer_step_full_factorial_F_product_factor * S ((S (ff_i_wer_step_full_factorial_F_product)) * wer_factor_scale_wer_step_full_factorial_F) + (ff_p_wer_step_full_factorial_F_product))) /\ ((((exists ff_h_wer_step_full_factorial_F_product_partial. ff_h_wer_step_full_factorial_F_product_partial + S (ff_r_wer_step_full_factorial_F_product) = S ((S (ff_i_wer_step_full_factorial_F_product)) * ff_v_wer_step_full_factorial_F_product)) /\ exists ff_q_wer_step_full_factorial_F_product_partial. ff_u_wer_step_full_factorial_F_product = ff_q_wer_step_full_factorial_F_product_partial * S ((S (ff_i_wer_step_full_factorial_F_product)) * ff_v_wer_step_full_factorial_F_product) + (ff_r_wer_step_full_factorial_F_product))) /\ ((((exists ff_h_wer_step_full_factorial_F_product_successor. ff_h_wer_step_full_factorial_F_product_successor + S (ff_s_wer_step_full_factorial_F_product) = S ((S (S ff_i_wer_step_full_factorial_F_product)) * ff_v_wer_step_full_factorial_F_product)) /\ exists ff_q_wer_step_full_factorial_F_product_successor. ff_u_wer_step_full_factorial_F_product = ff_q_wer_step_full_factorial_F_product_successor * S ((S (S ff_i_wer_step_full_factorial_F_product)) * ff_v_wer_step_full_factorial_F_product) + (ff_s_wer_step_full_factorial_F_product))) /\ ff_s_wer_step_full_factorial_F_product = ff_r_wer_step_full_factorial_F_product * ff_p_wer_step_full_factorial_F_product)))))))) - 0081
specialize factorial_exists (S (S l)) - 0082
exact factorial_exists - 0083
cases hfull_factorial - 0084
have hfactorial_decomp : exists x3. ((exists wer_factor_code_wer_step_previous_factorial wer_factor_scale_wer_step_previous_factorial. ((forall wer_range_index_wer_step_previous_factorial_range. (exists wer_range_gap_wer_step_previous_factorial_range. wer_range_gap_wer_step_previous_factorial_range + S wer_range_index_wer_step_previous_factorial_range = S l) -> (((exists ff_h_wer_step_previous_factorial_range_decoded. ff_h_wer_step_previous_factorial_range_decoded + S (1 + wer_range_index_wer_step_previous_factorial_range) = S ((S (wer_range_index_wer_step_previous_factorial_range)) * wer_factor_scale_wer_step_previous_factorial)) /\ exists ff_q_wer_step_previous_factorial_range_decoded. wer_factor_code_wer_step_previous_factorial = ff_q_wer_step_previous_factorial_range_decoded * S ((S (wer_range_index_wer_step_previous_factorial_range)) * wer_factor_scale_wer_step_previous_factorial) + (1 + wer_range_index_wer_step_previous_factorial_range)))) /\ (exists ff_u_wer_step_previous_factorial_product ff_v_wer_step_previous_factorial_product. ((((exists ff_h_wer_step_previous_factorial_product_start. ff_h_wer_step_previous_factorial_product_start + S (1) = S ((S (0)) * ff_v_wer_step_previous_factorial_product)) /\ exists ff_q_wer_step_previous_factorial_product_start. ff_u_wer_step_previous_factorial_product = ff_q_wer_step_previous_factorial_product_start * S ((S (0)) * ff_v_wer_step_previous_factorial_product) + (1))) /\ ((((exists ff_h_wer_step_previous_factorial_product_terminal. ff_h_wer_step_previous_factorial_product_terminal + S (x3) = S ((S (S l)) * ff_v_wer_step_previous_factorial_product)) /\ exists ff_q_wer_step_previous_factorial_product_terminal. ff_u_wer_step_previous_factorial_product = ff_q_wer_step_previous_factorial_product_terminal * S ((S (S l)) * ff_v_wer_step_previous_factorial_product) + (x3))) /\ forall ff_i_wer_step_previous_factorial_product. (exists ff_lt_wer_step_previous_factorial_product_bound. ff_lt_wer_step_previous_factorial_product_bound + S ff_i_wer_step_previous_factorial_product = S l) -> exists ff_p_wer_step_previous_factorial_product ff_r_wer_step_previous_factorial_product ff_s_wer_step_previous_factorial_product. ((((exists ff_h_wer_step_previous_factorial_product_factor. ff_h_wer_step_previous_factorial_product_factor + S (ff_p_wer_step_previous_factorial_product) = S ((S (ff_i_wer_step_previous_factorial_product)) * wer_factor_scale_wer_step_previous_factorial)) /\ exists ff_q_wer_step_previous_factorial_product_factor. wer_factor_code_wer_step_previous_factorial = ff_q_wer_step_previous_factorial_product_factor * S ((S (ff_i_wer_step_previous_factorial_product)) * wer_factor_scale_wer_step_previous_factorial) + (ff_p_wer_step_previous_factorial_product))) /\ ((((exists ff_h_wer_step_previous_factorial_product_partial. ff_h_wer_step_previous_factorial_product_partial + S (ff_r_wer_step_previous_factorial_product) = S ((S (ff_i_wer_step_previous_factorial_product)) * ff_v_wer_step_previous_factorial_product)) /\ exists ff_q_wer_step_previous_factorial_product_partial. ff_u_wer_step_previous_factorial_product = ff_q_wer_step_previous_factorial_product_partial * S ((S (ff_i_wer_step_previous_factorial_product)) * ff_v_wer_step_previous_factorial_product) + (ff_r_wer_step_previous_factorial_product))) /\ ((((exists ff_h_wer_step_previous_factorial_product_successor. ff_h_wer_step_previous_factorial_product_successor + S (ff_s_wer_step_previous_factorial_product) = S ((S (S ff_i_wer_step_previous_factorial_product)) * ff_v_wer_step_previous_factorial_product)) /\ exists ff_q_wer_step_previous_factorial_product_successor. ff_u_wer_step_previous_factorial_product = ff_q_wer_step_previous_factorial_product_successor * S ((S (S ff_i_wer_step_previous_factorial_product)) * ff_v_wer_step_previous_factorial_product) + (ff_s_wer_step_previous_factorial_product))) /\ ff_s_wer_step_previous_factorial_product = ff_r_wer_step_previous_factorial_product * ff_p_wer_step_previous_factorial_product)))))))) /\ x2 = x3 * S (S l)) - 0085
specialize factorial_succ_decompose (S l) - 0086
specialize factorial_succ_decompose (S (S l)) - 0087
specialize factorial_succ_decompose x2 - 0088
apply factorial_succ_decompose - 0089
refl - 0090
exact hfull_factorial_witness - 0091
cases hfactorial_decomp - 0092
cases hfactorial_decomp_witness - 0093
have hprefix_eq : x1 = x3 - 0094
specialize factorial_functional (S l) - 0095
specialize factorial_functional x1 - 0096
specialize factorial_functional x3 - 0097
apply factorial_functional - 0098
exact hprefix_factorial - 0099
exact hfactorial_decomp_witness_left - 0100
have hproduct_eq : P = x2 - 0101
trans x1 * x - 0102
exact hdecomp_witness_witness_right_right - 0103
trans x1 * S (S l) - 0104
apply mul_congr - 0105
refl - 0106
exact hfactor_value - 0107
trans x3 * S (S l) - 0108
apply mul_congr - 0109
exact hprefix_eq - 0110
refl - 0111
symm - 0112
exact hfactorial_decomp_witness_right - 0113
rewrite hproduct_eq - 0114
rewrite hproduct_eq - 0115
exact hfull_factorial_witness