PA00BH · theorem

beta_range_two_product_restore_last

Alpha v34 checked-use theorem · independently closed; not Stable

Restore the final factor l+2 after the leading unit has been absorbed.

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

∀ b. ∀ c. ∀ l. ∀ P. ∀ n. ∀ F. n = S S l → Range(b,c,2,l)Product(b,c,l,P)Factorial(n,F) → F = P · n

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

2 occurrences

Exact expanded native-PA statement
forall b c l P n F. n = S (S l) -> (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 ff_b_wer_endpoint ff_c_wer_endpoint. ((forall ff_i_wer_endpoint_range. (exists ff_lt_wer_endpoint_range_bound. ff_lt_wer_endpoint_range_bound + S ff_i_wer_endpoint_range = n) -> (((exists ff_h_wer_endpoint_range_decoded. ff_h_wer_endpoint_range_decoded + S (1 + ff_i_wer_endpoint_range) = S ((S (ff_i_wer_endpoint_range)) * ff_c_wer_endpoint)) /\ exists ff_q_wer_endpoint_range_decoded. ff_b_wer_endpoint = ff_q_wer_endpoint_range_decoded * S ((S (ff_i_wer_endpoint_range)) * ff_c_wer_endpoint) + (1 + ff_i_wer_endpoint_range)))) /\ (exists ff_u_wer_endpoint_product ff_v_wer_endpoint_product. ((((exists ff_h_wer_endpoint_product_start. ff_h_wer_endpoint_product_start + S (1) = S ((S (0)) * ff_v_wer_endpoint_product)) /\ exists ff_q_wer_endpoint_product_start. ff_u_wer_endpoint_product = ff_q_wer_endpoint_product_start * S ((S (0)) * ff_v_wer_endpoint_product) + (1))) /\ ((((exists ff_h_wer_endpoint_product_terminal. ff_h_wer_endpoint_product_terminal + S (F) = S ((S (n)) * ff_v_wer_endpoint_product)) /\ exists ff_q_wer_endpoint_product_terminal. ff_u_wer_endpoint_product = ff_q_wer_endpoint_product_terminal * S ((S (n)) * ff_v_wer_endpoint_product) + (F))) /\ forall ff_i_wer_endpoint_product. (exists ff_lt_wer_endpoint_product_bound. ff_lt_wer_endpoint_product_bound + S ff_i_wer_endpoint_product = n) -> exists ff_p_wer_endpoint_product ff_r_wer_endpoint_product ff_s_wer_endpoint_product. ((((exists ff_h_wer_endpoint_product_factor. ff_h_wer_endpoint_product_factor + S (ff_p_wer_endpoint_product) = S ((S (ff_i_wer_endpoint_product)) * ff_c_wer_endpoint)) /\ exists ff_q_wer_endpoint_product_factor. ff_b_wer_endpoint = ff_q_wer_endpoint_product_factor * S ((S (ff_i_wer_endpoint_product)) * ff_c_wer_endpoint) + (ff_p_wer_endpoint_product))) /\ ((((exists ff_h_wer_endpoint_product_partial. ff_h_wer_endpoint_product_partial + S (ff_r_wer_endpoint_product) = S ((S (ff_i_wer_endpoint_product)) * ff_v_wer_endpoint_product)) /\ exists ff_q_wer_endpoint_product_partial. ff_u_wer_endpoint_product = ff_q_wer_endpoint_product_partial * S ((S (ff_i_wer_endpoint_product)) * ff_v_wer_endpoint_product) + (ff_r_wer_endpoint_product))) /\ ((((exists ff_h_wer_endpoint_product_successor. ff_h_wer_endpoint_product_successor + S (ff_s_wer_endpoint_product) = S ((S (S ff_i_wer_endpoint_product)) * ff_v_wer_endpoint_product)) /\ exists ff_q_wer_endpoint_product_successor. ff_u_wer_endpoint_product = ff_q_wer_endpoint_product_successor * S ((S (S ff_i_wer_endpoint_product)) * ff_v_wer_endpoint_product) + (ff_s_wer_endpoint_product))) /\ ff_s_wer_endpoint_product = ff_r_wer_endpoint_product * ff_p_wer_endpoint_product)))))))) -> F = P * n

Proof neighborhood

Direct theorem prerequisites

Direct 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

45 script commands · 12 reading checkpoints · 3 local claims

This is a reading aid, not a new proof or a proof-tree certificate. Checkpoint groups are consecutive commands, not inferred branch boundaries. Every step links to the preserved script.

Definition notation is shown below. Open the paired exact edition for the original native formulas. Source pairing is not a new equivalence certificate.

Named ingredients (4)
01Fix variables and assumptionsL1–10

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

  1. L1
    intro b
  2. L2
    intro c
  3. L3
    intro l
  4. L4
    intro P
  5. L5
    intro n
  6. L6
    intro F
  7. L7
    intro hterminal
  8. L8
    intro hrange
  9. L9
    intro hproduct
  10. L10
    intro hfactorial
02Establish hprefix_factorialL11–18

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply beta range two product is factorial succ.

  1. L11
    have hprefix_factorial : Factorial(S l,P)Definitions: Factorial(S l,P)Original native command in the exact edition
  2. L12
    specialize beta_range_two_product_is_factorial_succ l
  3. L13
    specialize beta_range_two_product_is_factorial_succ b
  4. L14
    specialize beta_range_two_product_is_factorial_succ c
  5. L15
    specialize beta_range_two_product_is_factorial_succ P
  6. L16
    apply beta_range_two_product_is_factorial_succ
  7. L17
    exact hrange
  8. L18
    exact hproduct
03Establish hdecompL19–25

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply factorial succ decompose.

  1. L19
    have hdecomp : ∃ R. Factorial(S l,R) ∧ F = R · S S lDefinitions: Factorial(S l,R)Original native command in the exact edition
  2. L20
    specialize factorial_succ_decompose (S l)
  3. L21
    specialize factorial_succ_decompose n
  4. L22
    specialize factorial_succ_decompose F
  5. L23
    apply factorial_succ_decompose
  6. L24
    exact hterminal
  7. L25
    exact hfactorial
04Separate the logical casesL26–27

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

  1. L26
    cases hdecomp
  2. L27
    cases hdecomp_witness
05Establish hprefL28–37

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply factorial functional.

  1. L28
    have hpref : P = x
  2. L29
    specialize factorial_functional (S l)
  3. L30
    specialize factorial_functional P
  4. L31
    specialize factorial_functional x
  5. L32
    apply factorial_functional
  6. L33
    exact hprefix_factorial
  7. L34
    exact hdecomp_witness_left
  8. L35
    trans x * S (S l)
  9. L36
    exact hdecomp_witness_right
  10. L37
    trans P * S (S l)
06Use earlier factsL38–38

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

  1. L38
    apply mul_congr
07Calculate and transport equalitiesL39–39

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L39
    symm
08Use earlier factsL40–40

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

  1. L40
    exact hpref
09Calculate and transport equalitiesL41–41

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L41
    refl
10Use earlier factsL42–42

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

  1. L42
    apply mul_congr
11Calculate and transport equalitiesL43–44

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L43
    refl
  2. L44
    symm
12Use earlier factsL45–45

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

  1. L45
    exact hterminal

Library-wide reading audit

Original defined command ledger · 45 lines
  1. 0001intro b
  2. 0002intro c
  3. 0003intro l
  4. 0004intro P
  5. 0005intro n
  6. 0006intro F
  7. 0007intro hterminal
  8. 0008intro hrange
  9. 0009intro hproduct
  10. 0010intro hfactorial
  11. 0011have hprefix_factorial : Factorial(S l,P)
    Exact native replay linehave hprefix_factorial : exists wer_factor_code_wer_endpoint_prefix_factorial wer_factor_scale_wer_endpoint_prefix_factorial. ((forall wer_range_index_wer_endpoint_prefix_factorial_range. (exists wer_range_gap_wer_endpoint_prefix_factorial_range. wer_range_gap_wer_endpoint_prefix_factorial_range + S wer_range_index_wer_endpoint_prefix_factorial_range = S l) -> (((exists ff_h_wer_endpoint_prefix_factorial_range_decoded. ff_h_wer_endpoint_prefix_factorial_range_decoded + S (1 + wer_range_index_wer_endpoint_prefix_factorial_range) = S ((S (wer_range_index_wer_endpoint_prefix_factorial_range)) * wer_factor_scale_wer_endpoint_prefix_factorial)) /\ exists ff_q_wer_endpoint_prefix_factorial_range_decoded. wer_factor_code_wer_endpoint_prefix_factorial = ff_q_wer_endpoint_prefix_factorial_range_decoded * S ((S (wer_range_index_wer_endpoint_prefix_factorial_range)) * wer_factor_scale_wer_endpoint_prefix_factorial) + (1 + wer_range_index_wer_endpoint_prefix_factorial_range)))) /\ (exists ff_u_wer_endpoint_prefix_factorial_product ff_v_wer_endpoint_prefix_factorial_product. ((((exists ff_h_wer_endpoint_prefix_factorial_product_start. ff_h_wer_endpoint_prefix_factorial_product_start + S (1) = S ((S (0)) * ff_v_wer_endpoint_prefix_factorial_product)) /\ exists ff_q_wer_endpoint_prefix_factorial_product_start. ff_u_wer_endpoint_prefix_factorial_product = ff_q_wer_endpoint_prefix_factorial_product_start * S ((S (0)) * ff_v_wer_endpoint_prefix_factorial_product) + (1))) /\ ((((exists ff_h_wer_endpoint_prefix_factorial_product_terminal. ff_h_wer_endpoint_prefix_factorial_product_terminal + S (P) = S ((S (S l)) * ff_v_wer_endpoint_prefix_factorial_product)) /\ exists ff_q_wer_endpoint_prefix_factorial_product_terminal. ff_u_wer_endpoint_prefix_factorial_product = ff_q_wer_endpoint_prefix_factorial_product_terminal * S ((S (S l)) * ff_v_wer_endpoint_prefix_factorial_product) + (P))) /\ forall ff_i_wer_endpoint_prefix_factorial_product. (exists ff_lt_wer_endpoint_prefix_factorial_product_bound. ff_lt_wer_endpoint_prefix_factorial_product_bound + S ff_i_wer_endpoint_prefix_factorial_product = S l) -> exists ff_p_wer_endpoint_prefix_factorial_product ff_r_wer_endpoint_prefix_factorial_product ff_s_wer_endpoint_prefix_factorial_product. ((((exists ff_h_wer_endpoint_prefix_factorial_product_factor. ff_h_wer_endpoint_prefix_factorial_product_factor + S (ff_p_wer_endpoint_prefix_factorial_product) = S ((S (ff_i_wer_endpoint_prefix_factorial_product)) * wer_factor_scale_wer_endpoint_prefix_factorial)) /\ exists ff_q_wer_endpoint_prefix_factorial_product_factor. wer_factor_code_wer_endpoint_prefix_factorial = ff_q_wer_endpoint_prefix_factorial_product_factor * S ((S (ff_i_wer_endpoint_prefix_factorial_product)) * wer_factor_scale_wer_endpoint_prefix_factorial) + (ff_p_wer_endpoint_prefix_factorial_product))) /\ ((((exists ff_h_wer_endpoint_prefix_factorial_product_partial. ff_h_wer_endpoint_prefix_factorial_product_partial + S (ff_r_wer_endpoint_prefix_factorial_product) = S ((S (ff_i_wer_endpoint_prefix_factorial_product)) * ff_v_wer_endpoint_prefix_factorial_product)) /\ exists ff_q_wer_endpoint_prefix_factorial_product_partial. ff_u_wer_endpoint_prefix_factorial_product = ff_q_wer_endpoint_prefix_factorial_product_partial * S ((S (ff_i_wer_endpoint_prefix_factorial_product)) * ff_v_wer_endpoint_prefix_factorial_product) + (ff_r_wer_endpoint_prefix_factorial_product))) /\ ((((exists ff_h_wer_endpoint_prefix_factorial_product_successor. ff_h_wer_endpoint_prefix_factorial_product_successor + S (ff_s_wer_endpoint_prefix_factorial_product) = S ((S (S ff_i_wer_endpoint_prefix_factorial_product)) * ff_v_wer_endpoint_prefix_factorial_product)) /\ exists ff_q_wer_endpoint_prefix_factorial_product_successor. ff_u_wer_endpoint_prefix_factorial_product = ff_q_wer_endpoint_prefix_factorial_product_successor * S ((S (S ff_i_wer_endpoint_prefix_factorial_product)) * ff_v_wer_endpoint_prefix_factorial_product) + (ff_s_wer_endpoint_prefix_factorial_product))) /\ ff_s_wer_endpoint_prefix_factorial_product = ff_r_wer_endpoint_prefix_factorial_product * ff_p_wer_endpoint_prefix_factorial_product)))))))
  12. 0012specialize beta_range_two_product_is_factorial_succ l
  13. 0013specialize beta_range_two_product_is_factorial_succ b
  14. 0014specialize beta_range_two_product_is_factorial_succ c
  15. 0015specialize beta_range_two_product_is_factorial_succ P
  16. 0016apply beta_range_two_product_is_factorial_succ
  17. 0017exact hrange
  18. 0018exact hproduct
  19. 0019have hdecomp : ∃ R. Factorial(S l,R) ∧ F = R · S S l
    Exact native replay linehave hdecomp : exists R. ((exists wer_factor_code_wer_endpoint_previous_factorial wer_factor_scale_wer_endpoint_previous_factorial. ((forall wer_range_index_wer_endpoint_previous_factorial_range. (exists wer_range_gap_wer_endpoint_previous_factorial_range. wer_range_gap_wer_endpoint_previous_factorial_range + S wer_range_index_wer_endpoint_previous_factorial_range = S l) -> (((exists ff_h_wer_endpoint_previous_factorial_range_decoded. ff_h_wer_endpoint_previous_factorial_range_decoded + S (1 + wer_range_index_wer_endpoint_previous_factorial_range) = S ((S (wer_range_index_wer_endpoint_previous_factorial_range)) * wer_factor_scale_wer_endpoint_previous_factorial)) /\ exists ff_q_wer_endpoint_previous_factorial_range_decoded. wer_factor_code_wer_endpoint_previous_factorial = ff_q_wer_endpoint_previous_factorial_range_decoded * S ((S (wer_range_index_wer_endpoint_previous_factorial_range)) * wer_factor_scale_wer_endpoint_previous_factorial) + (1 + wer_range_index_wer_endpoint_previous_factorial_range)))) /\ (exists ff_u_wer_endpoint_previous_factorial_product ff_v_wer_endpoint_previous_factorial_product. ((((exists ff_h_wer_endpoint_previous_factorial_product_start. ff_h_wer_endpoint_previous_factorial_product_start + S (1) = S ((S (0)) * ff_v_wer_endpoint_previous_factorial_product)) /\ exists ff_q_wer_endpoint_previous_factorial_product_start. ff_u_wer_endpoint_previous_factorial_product = ff_q_wer_endpoint_previous_factorial_product_start * S ((S (0)) * ff_v_wer_endpoint_previous_factorial_product) + (1))) /\ ((((exists ff_h_wer_endpoint_previous_factorial_product_terminal. ff_h_wer_endpoint_previous_factorial_product_terminal + S (R) = S ((S (S l)) * ff_v_wer_endpoint_previous_factorial_product)) /\ exists ff_q_wer_endpoint_previous_factorial_product_terminal. ff_u_wer_endpoint_previous_factorial_product = ff_q_wer_endpoint_previous_factorial_product_terminal * S ((S (S l)) * ff_v_wer_endpoint_previous_factorial_product) + (R))) /\ forall ff_i_wer_endpoint_previous_factorial_product. (exists ff_lt_wer_endpoint_previous_factorial_product_bound. ff_lt_wer_endpoint_previous_factorial_product_bound + S ff_i_wer_endpoint_previous_factorial_product = S l) -> exists ff_p_wer_endpoint_previous_factorial_product ff_r_wer_endpoint_previous_factorial_product ff_s_wer_endpoint_previous_factorial_product. ((((exists ff_h_wer_endpoint_previous_factorial_product_factor. ff_h_wer_endpoint_previous_factorial_product_factor + S (ff_p_wer_endpoint_previous_factorial_product) = S ((S (ff_i_wer_endpoint_previous_factorial_product)) * wer_factor_scale_wer_endpoint_previous_factorial)) /\ exists ff_q_wer_endpoint_previous_factorial_product_factor. wer_factor_code_wer_endpoint_previous_factorial = ff_q_wer_endpoint_previous_factorial_product_factor * S ((S (ff_i_wer_endpoint_previous_factorial_product)) * wer_factor_scale_wer_endpoint_previous_factorial) + (ff_p_wer_endpoint_previous_factorial_product))) /\ ((((exists ff_h_wer_endpoint_previous_factorial_product_partial. ff_h_wer_endpoint_previous_factorial_product_partial + S (ff_r_wer_endpoint_previous_factorial_product) = S ((S (ff_i_wer_endpoint_previous_factorial_product)) * ff_v_wer_endpoint_previous_factorial_product)) /\ exists ff_q_wer_endpoint_previous_factorial_product_partial. ff_u_wer_endpoint_previous_factorial_product = ff_q_wer_endpoint_previous_factorial_product_partial * S ((S (ff_i_wer_endpoint_previous_factorial_product)) * ff_v_wer_endpoint_previous_factorial_product) + (ff_r_wer_endpoint_previous_factorial_product))) /\ ((((exists ff_h_wer_endpoint_previous_factorial_product_successor. ff_h_wer_endpoint_previous_factorial_product_successor + S (ff_s_wer_endpoint_previous_factorial_product) = S ((S (S ff_i_wer_endpoint_previous_factorial_product)) * ff_v_wer_endpoint_previous_factorial_product)) /\ exists ff_q_wer_endpoint_previous_factorial_product_successor. ff_u_wer_endpoint_previous_factorial_product = ff_q_wer_endpoint_previous_factorial_product_successor * S ((S (S ff_i_wer_endpoint_previous_factorial_product)) * ff_v_wer_endpoint_previous_factorial_product) + (ff_s_wer_endpoint_previous_factorial_product))) /\ ff_s_wer_endpoint_previous_factorial_product = ff_r_wer_endpoint_previous_factorial_product * ff_p_wer_endpoint_previous_factorial_product)))))))) /\ F = R * S (S l))
  20. 0020specialize factorial_succ_decompose (S l)
  21. 0021specialize factorial_succ_decompose n
  22. 0022specialize factorial_succ_decompose F
  23. 0023apply factorial_succ_decompose
  24. 0024exact hterminal
  25. 0025exact hfactorial
  26. 0026cases hdecomp
  27. 0027cases hdecomp_witness
  28. 0028have hpref : P = x
  29. 0029specialize factorial_functional (S l)
  30. 0030specialize factorial_functional P
  31. 0031specialize factorial_functional x
  32. 0032apply factorial_functional
  33. 0033exact hprefix_factorial
  34. 0034exact hdecomp_witness_left
  35. 0035trans x * S (S l)
  36. 0036exact hdecomp_witness_right
  37. 0037trans P * S (S l)
  38. 0038apply mul_congr
  39. 0039symm
  40. 0040exact hpref
  41. 0041refl
  42. 0042apply mul_congr
  43. 0043refl
  44. 0044symm
  45. 0045exact hterminal