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.
Statement with defined notation
∀ l. ∀ b. ∀ c. ∀ P. Range(b,c,2,l) → Product(b,c,l,P) → Factorial(S l,P)Every purple notation token opens its conservative definition. This is a reading surface; the compiler expands the statement before the unchanged kernel checks it.
Definitions used by this theorem
In the theorem statement
3 occurrences
In local proof propositions
7 occurrences
Exact expanded native-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))))))))Proof neighborhood
Direct theorem prerequisites
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 theorem dependents
Definition-aware tactic body
Only local propositions introduced by have or suffices are compacted. The untrusted compiler re-expands each one before the original tactic script is replayed; defined notation is never accepted by the kernel. Open the exact replay line beneath every changed command.
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
Establish this local claim before using it. It is not an additional assumption.
- L14
have hfactorial : ∃ F. Factorial(1,F)Definitions: Factorial(1,F)Original native command in the exact edition - L15
specialize factorial_exists 1 - L16
exact factorial_exists
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.
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.
- L46
have hdecomp : ∃ x. ∃ x1. BetaAt(b,c,l,x) ∧ (Product(b,c,l,x1) ∧ P = x1 · x)Definitions: BetaAt(b,c,l,x)Product(b,c,l,x1)Original native command in the exact edition - L47
specialize beta_product_succ_decompose b - L48
specialize beta_product_succ_decompose c - L49
specialize beta_product_succ_decompose l - L50
specialize beta_product_succ_decompose P - L51
apply beta_product_succ_decompose - L52
exact hproduct
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.
- L57
have hprefix_factorial : Factorial(S l,x1)Definitions: Factorial(S l,x1)Original native command in the exact edition - L58
specialize IH b - L59
specialize IH c - L60
specialize IH x1 - L61
apply IH - L62
exact hrange_prefix - L63
exact hdecomp_witness_witness_right_left
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
Establish this local claim before using it. It is not an additional assumption.
- L80
have hfull_factorial : ∃ F. Factorial(S S l,F)Definitions: Factorial(S S l,F)Original native command in the exact edition - L81
specialize factorial_exists (S (S l)) - L82
exact factorial_exists
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.
- L84
have hfactorial_decomp : ∃ x3. Factorial(S l,x3) ∧ x2 = x3 · S S lDefinitions: Factorial(S l,x3)Original native command in the exact edition - L85
specialize factorial_succ_decompose (S l) - L86
specialize factorial_succ_decompose (S (S l)) - L87
specialize factorial_succ_decompose x2 - L88
apply factorial_succ_decompose - L89
refl - L90
exact hfull_factorial_witness
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 defined 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 : ∃ F. Factorial(1,F)Exact native replay line
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 : Range(b,c,2,l)Exact native replay line
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 : ∃ x. ∃ x1. BetaAt(b,c,l,x) ∧ (Product(b,c,l,x1) ∧ P = x1 · x)Exact native replay line
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 : Factorial(S l,x1)Exact native replay line
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 : ∃ F. Factorial(S S l,F)Exact native replay line
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 : ∃ x3. Factorial(S l,x3) ∧ x2 = x3 · S S lExact native replay line
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