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
∀ p. ∀ a. ∀ n. ∀ u. ∀ v. ∀ b. ∀ c. ∀ h. ∀ A. p = S n → Prime(p) → ScaledInversePrefix(p,a,n,u,v,n) → n = h + h → (∀ x. ∀ y. ∀ z. Lt(x,h + h) → BetaAt(b,c,x,y) → BetaAt(u,v,y,S z) → ContainsPrefix(b,c,h + h,z)) ∧ ((∀ x. Lt(x,h + h) → ∃ y. BetaAt(b,c,x,y) ∧ Lt(y,n)) ∧ InjectivePrefix(b,c,h + h)) → (∀ x. Lt(x,h) → ∃ y. ∃ z. BetaAt(b,c,x + x,y) ∧ (BetaAt(b,c,S (x + x),z) ∧ BetaAt(u,v,y,S z))) → Pow(a,h,A) → ModEq(p,A,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
PD0002 Lt PD0004 Prime PD0008 ModEq PD0013 BetaAt PD0020 Pow PD0025 InjectivePrefix PD0027 ContainsPrefix PD0039 ScaledInversePrefix16 occurrences
In local proof propositions
PD0002 Lt PD0008 ModEq PD0013 BetaAt PD0014 Product PD0023 Factorial PD0024 BoundedPrefix PD0025 InjectivePrefix16 occurrences
Exact expanded native-PA statement
forall p a n u v b c h A. p = S n -> ((~(p = 1) /\ forall esi_prime_left_enr_prime esi_prime_right_enr_prime. p = esi_prime_left_enr_prime * esi_prime_right_enr_prime -> esi_prime_left_enr_prime = 1 \/ esi_prime_right_enr_prime = 1)) -> (forall esip_index_enr_prefix. (exists esip_gap_enr_prefix_prefix_bound. esip_gap_enr_prefix_prefix_bound + S (esip_index_enr_prefix) = n) -> exists esip_mate_enr_prefix. ((((exists ff_h_esip_enr_prefix_entry. ff_h_esip_enr_prefix_entry + S (esip_mate_enr_prefix) = S ((S (esip_index_enr_prefix)) * v)) /\ exists ff_q_esip_enr_prefix_entry. u = ff_q_esip_enr_prefix_entry * S ((S (esip_index_enr_prefix)) * v) + (esip_mate_enr_prefix))) /\ ((exists esip_gap_enr_prefix_relation_index_bound. esip_gap_enr_prefix_relation_index_bound + S (esip_index_enr_prefix) = n) /\ ((((~((S esip_index_enr_prefix) = 0) /\ (exists esip_gap_enr_prefix_relation_scaled_left_bound. esip_gap_enr_prefix_relation_scaled_left_bound + S (S esip_index_enr_prefix) = p))) /\ (((~(esip_mate_enr_prefix = 0) /\ (exists esip_gap_enr_prefix_relation_scaled_right_bound. esip_gap_enr_prefix_relation_scaled_right_bound + S (esip_mate_enr_prefix) = p))) /\ (exists esi_mod_left_enr_prefix_relation_scaled_mod esi_mod_right_enr_prefix_relation_scaled_mod. ((S esip_index_enr_prefix) * esip_mate_enr_prefix) + p * esi_mod_left_enr_prefix_relation_scaled_mod = (a) + p * esi_mod_right_enr_prefix_relation_scaled_mod))))))) -> n = h + h -> (((forall espo_position_enr_terminal_state_closed espo_source_enr_terminal_state_closed espo_mate_enr_terminal_state_closed. (exists wpo_gap_enr_terminal_state_closed_position_bound. wpo_gap_enr_terminal_state_closed_position_bound + S (espo_position_enr_terminal_state_closed) = h + h) -> (((exists wpo_beta_height_enr_terminal_state_closed_source_entry. wpo_beta_height_enr_terminal_state_closed_source_entry + S (espo_source_enr_terminal_state_closed) = S ((S (espo_position_enr_terminal_state_closed)) * c)) /\ exists wpo_beta_quotient_enr_terminal_state_closed_source_entry. b = wpo_beta_quotient_enr_terminal_state_closed_source_entry * S ((S (espo_position_enr_terminal_state_closed)) * c) + (espo_source_enr_terminal_state_closed))) -> (((exists wpo_beta_height_enr_terminal_state_closed_scaled_entry. wpo_beta_height_enr_terminal_state_closed_scaled_entry + S (S espo_mate_enr_terminal_state_closed) = S ((S (espo_source_enr_terminal_state_closed)) * v)) /\ exists wpo_beta_quotient_enr_terminal_state_closed_scaled_entry. u = wpo_beta_quotient_enr_terminal_state_closed_scaled_entry * S ((S (espo_source_enr_terminal_state_closed)) * v) + (S espo_mate_enr_terminal_state_closed))) -> exists espo_mate_position_enr_terminal_state_closed. ((exists wpo_gap_enr_terminal_state_closed_mate_bound. wpo_gap_enr_terminal_state_closed_mate_bound + S (espo_mate_position_enr_terminal_state_closed) = h + h) /\ (((exists wpo_beta_height_enr_terminal_state_closed_mate_entry. wpo_beta_height_enr_terminal_state_closed_mate_entry + S (espo_mate_enr_terminal_state_closed) = S ((S (espo_mate_position_enr_terminal_state_closed)) * c)) /\ exists wpo_beta_quotient_enr_terminal_state_closed_mate_entry. b = wpo_beta_quotient_enr_terminal_state_closed_mate_entry * S ((S (espo_mate_position_enr_terminal_state_closed)) * c) + (espo_mate_enr_terminal_state_closed))))) /\ (((forall fom_index_enr_terminal_state_bounded. (exists fom_gap_enr_terminal_state_bounded_index_bound. fom_gap_enr_terminal_state_bounded_index_bound + S (fom_index_enr_terminal_state_bounded) = h + h) -> exists fom_value_enr_terminal_state_bounded. ((((exists fom_beta_height_enr_terminal_state_bounded_entry. fom_beta_height_enr_terminal_state_bounded_entry + S (fom_value_enr_terminal_state_bounded) = S ((S (fom_index_enr_terminal_state_bounded)) * c)) /\ exists fom_beta_quotient_enr_terminal_state_bounded_entry. b = fom_beta_quotient_enr_terminal_state_bounded_entry * S ((S (fom_index_enr_terminal_state_bounded)) * c) + (fom_value_enr_terminal_state_bounded))) /\ (exists fom_gap_enr_terminal_state_bounded_value_bound. fom_gap_enr_terminal_state_bounded_value_bound + S (fom_value_enr_terminal_state_bounded) = n))) /\ (forall wpo_injective_left_enr_terminal_state_injective wpo_injective_right_enr_terminal_state_injective wpo_injective_value_enr_terminal_state_injective. (exists wpo_gap_enr_terminal_state_injective_left_bound. wpo_gap_enr_terminal_state_injective_left_bound + S (wpo_injective_left_enr_terminal_state_injective) = h + h) -> (exists wpo_gap_enr_terminal_state_injective_right_bound. wpo_gap_enr_terminal_state_injective_right_bound + S (wpo_injective_right_enr_terminal_state_injective) = h + h) -> (((exists wpo_beta_height_enr_terminal_state_injective_left_entry. wpo_beta_height_enr_terminal_state_injective_left_entry + S (wpo_injective_value_enr_terminal_state_injective) = S ((S (wpo_injective_left_enr_terminal_state_injective)) * c)) /\ exists wpo_beta_quotient_enr_terminal_state_injective_left_entry. b = wpo_beta_quotient_enr_terminal_state_injective_left_entry * S ((S (wpo_injective_left_enr_terminal_state_injective)) * c) + (wpo_injective_value_enr_terminal_state_injective))) -> (((exists wpo_beta_height_enr_terminal_state_injective_right_entry. wpo_beta_height_enr_terminal_state_injective_right_entry + S (wpo_injective_value_enr_terminal_state_injective) = S ((S (wpo_injective_right_enr_terminal_state_injective)) * c)) /\ exists wpo_beta_quotient_enr_terminal_state_injective_right_entry. b = wpo_beta_quotient_enr_terminal_state_injective_right_entry * S ((S (wpo_injective_right_enr_terminal_state_injective)) * c) + (wpo_injective_value_enr_terminal_state_injective))) -> wpo_injective_left_enr_terminal_state_injective = wpo_injective_right_enr_terminal_state_injective))))) -> (forall espi_pair_enr_history. (exists wpo_gap_enr_history_pair_bound. wpo_gap_enr_history_pair_bound + S (espi_pair_enr_history) = h) -> exists espi_left_enr_history espi_right_enr_history. (((((exists wpo_beta_height_enr_history_left_entry. wpo_beta_height_enr_history_left_entry + S (espi_left_enr_history) = S ((S (espi_pair_enr_history + espi_pair_enr_history)) * c)) /\ exists wpo_beta_quotient_enr_history_left_entry. b = wpo_beta_quotient_enr_history_left_entry * S ((S (espi_pair_enr_history + espi_pair_enr_history)) * c) + (espi_left_enr_history))) /\ (((((exists wpo_beta_height_enr_history_right_entry. wpo_beta_height_enr_history_right_entry + S (espi_right_enr_history) = S ((S (S (espi_pair_enr_history + espi_pair_enr_history))) * c)) /\ exists wpo_beta_quotient_enr_history_right_entry. b = wpo_beta_quotient_enr_history_right_entry * S ((S (S (espi_pair_enr_history + espi_pair_enr_history))) * c) + (espi_right_enr_history))) /\ (((exists wpo_beta_height_enr_history_scaled_edge. wpo_beta_height_enr_history_scaled_edge + S (S espi_right_enr_history) = S ((S (espi_left_enr_history)) * v)) /\ exists wpo_beta_quotient_enr_history_scaled_edge. u = wpo_beta_quotient_enr_history_scaled_edge * S ((S (espi_left_enr_history)) * v) + (S espi_right_enr_history)))))))) -> (exists ff_b_enr_terminal_power ff_c_enr_terminal_power. ((forall ff_i_enr_terminal_power_repeat. (exists ff_lt_enr_terminal_power_repeat_bound. ff_lt_enr_terminal_power_repeat_bound + S ff_i_enr_terminal_power_repeat = h) -> (((exists ff_h_enr_terminal_power_repeat_decoded. ff_h_enr_terminal_power_repeat_decoded + S (a) = S ((S (ff_i_enr_terminal_power_repeat)) * ff_c_enr_terminal_power)) /\ exists ff_q_enr_terminal_power_repeat_decoded. ff_b_enr_terminal_power = ff_q_enr_terminal_power_repeat_decoded * S ((S (ff_i_enr_terminal_power_repeat)) * ff_c_enr_terminal_power) + (a)))) /\ (exists ff_u_enr_terminal_power_product ff_v_enr_terminal_power_product. ((((exists ff_h_enr_terminal_power_product_start. ff_h_enr_terminal_power_product_start + S (1) = S ((S (0)) * ff_v_enr_terminal_power_product)) /\ exists ff_q_enr_terminal_power_product_start. ff_u_enr_terminal_power_product = ff_q_enr_terminal_power_product_start * S ((S (0)) * ff_v_enr_terminal_power_product) + (1))) /\ ((((exists ff_h_enr_terminal_power_product_terminal. ff_h_enr_terminal_power_product_terminal + S (A) = S ((S (h)) * ff_v_enr_terminal_power_product)) /\ exists ff_q_enr_terminal_power_product_terminal. ff_u_enr_terminal_power_product = ff_q_enr_terminal_power_product_terminal * S ((S (h)) * ff_v_enr_terminal_power_product) + (A))) /\ forall ff_i_enr_terminal_power_product. (exists ff_lt_enr_terminal_power_product_bound. ff_lt_enr_terminal_power_product_bound + S ff_i_enr_terminal_power_product = h) -> exists ff_p_enr_terminal_power_product ff_r_enr_terminal_power_product ff_s_enr_terminal_power_product. ((((exists ff_h_enr_terminal_power_product_factor. ff_h_enr_terminal_power_product_factor + S (ff_p_enr_terminal_power_product) = S ((S (ff_i_enr_terminal_power_product)) * ff_c_enr_terminal_power)) /\ exists ff_q_enr_terminal_power_product_factor. ff_b_enr_terminal_power = ff_q_enr_terminal_power_product_factor * S ((S (ff_i_enr_terminal_power_product)) * ff_c_enr_terminal_power) + (ff_p_enr_terminal_power_product))) /\ ((((exists ff_h_enr_terminal_power_product_partial. ff_h_enr_terminal_power_product_partial + S (ff_r_enr_terminal_power_product) = S ((S (ff_i_enr_terminal_power_product)) * ff_v_enr_terminal_power_product)) /\ exists ff_q_enr_terminal_power_product_partial. ff_u_enr_terminal_power_product = ff_q_enr_terminal_power_product_partial * S ((S (ff_i_enr_terminal_power_product)) * ff_v_enr_terminal_power_product) + (ff_r_enr_terminal_power_product))) /\ ((((exists ff_h_enr_terminal_power_product_successor. ff_h_enr_terminal_power_product_successor + S (ff_s_enr_terminal_power_product) = S ((S (S ff_i_enr_terminal_power_product)) * ff_v_enr_terminal_power_product)) /\ exists ff_q_enr_terminal_power_product_successor. ff_u_enr_terminal_power_product = ff_q_enr_terminal_power_product_successor * S ((S (S ff_i_enr_terminal_power_product)) * ff_v_enr_terminal_power_product) + (ff_s_enr_terminal_power_product))) /\ ff_s_enr_terminal_power_product = ff_r_enr_terminal_power_product * ff_p_enr_terminal_power_product)))))))) -> (exists wpp_mod_left_enr_terminal_result wpp_mod_right_enr_terminal_result. (A) + p * wpp_mod_left_enr_terminal_result = (n) + p * wpp_mod_right_enr_terminal_result)Proof neighborhood
Direct theorem prerequisites
PA008C beta_successor_lift_exists PA009X scaled_pair_order_successor_lift_adjacent_targets PA003X beta_product_exists PA00A0 beta_adjacent_target_pairs_product_power PA0060 factorial_exists PA00A1 scaled_pair_order_successor_lift_product_is_factorial PA00BJ prime_factorial_wilson_congruence PA003L mod_eq_symm PA0024 mod_eq_transDirect 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 (9)
01Fix variables and assumptionsL1–10
02Fix variables and assumptionsL11–16
03Separate the logical casesL17–18
04Establish hlift_existsL19–23
Establish this local claim before using it. It is not an additional assumption.
- L19
have hlift_exists : ∃ f. ∃ g. ∀ x. ∀ y. Lt(x,n) → BetaAt(b,c,x,y) → BetaAt(f,g,x,S y)Definitions: Lt(x,n)BetaAt(b,c,x,y)BetaAt(f,g,x,S y)Original native command in the exact edition - L20
specialize beta_successor_lift_exists b - L21
specialize beta_successor_lift_exists c - L22
specialize beta_successor_lift_exists n - L23
exact beta_successor_lift_exists
05Separate the logical casesL24–25
06Establish hpairsL26–35
Establish this local claim before using it. It is not an additional assumption.
- L26
have hpairs : ∀ wpp_pair_enr_target_pairs_x. ∀ wpp_left_enr_target_pairs_x. ∀ wpp_right_enr_target_pairs_x. Lt(wpp_pair_enr_target_pairs_x,h) → BetaAt(x,x1,wpp_pair_enr_target_pairs_x + wpp_pair_enr_target_pairs_x,wpp_left_enr_target_pairs_x) → BetaAt(x,x1,S (wpp_pair_enr_target_pairs_x + wpp_pair_enr_target_pairs_x),wpp_right_enr_target_pairs_x) → ModEq(p,wpp_left_enr_target_pairs_x · wpp_right_enr_target_pairs_x,a)Definitions: Lt(wpp_pair_enr_target_pairs_x,h)BetaAt(x,x1,wpp_pair_enr_target_pairs_x + wpp_pair_enr_target_pairs_x,wpp_left_enr_target_pairs_x)BetaAt(x,x1,S (wpp_pair_enr_target_pairs_x + wpp_pair_enr_target_pairs_x),wpp_right_enr_target_pairs_x)ModEq(p,wpp_left_enr_target_pairs_x · wpp_right_enr_target_pairs_x,a)Original native command in the exact edition - L27
specialize scaled_pair_order_successor_lift_adjacent_targets p - L28
specialize scaled_pair_order_successor_lift_adjacent_targets a - L29
specialize scaled_pair_order_successor_lift_adjacent_targets n - L30
specialize scaled_pair_order_successor_lift_adjacent_targets u - L31
specialize scaled_pair_order_successor_lift_adjacent_targets v - L32
specialize scaled_pair_order_successor_lift_adjacent_targets b - L33
specialize scaled_pair_order_successor_lift_adjacent_targets c - L34
specialize scaled_pair_order_successor_lift_adjacent_targets x - L35
specialize scaled_pair_order_successor_lift_adjacent_targets x1
07Use earlier factsL36–42
Instantiate or apply named facts and discharge the corresponding proof obligations.
08Establish hproduct_existsL43–47
Establish this local claim before using it. It is not an additional assumption.
- L43
have hproduct_exists : ∃ Q. Product(x,x1,n,Q)Definitions: Product(x,x1,n,Q)Original native command in the exact edition - L44
specialize beta_product_exists x - L45
specialize beta_product_exists x1 - L46
specialize beta_product_exists n - L47
exact beta_product_exists
09Separate the logical casesL48–48
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L48
cases hproduct_exists
10Establish hproduct_evenL49–53
Establish this local claim before using it. It is not an additional assumption.
- L49
have hproduct_even : Product(x,x1,h + h,x2)Definitions: Product(x,x1,h + h,x2)Original native command in the exact edition - L50
rewrite <- heven - L51
rewrite <- heven - L52
rewrite <- heven - L53
exact hproduct_exists_witness
11Establish hproduct_powerL54–63
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply beta adjacent target pairs product power.
- L54
have hproduct_power : ModEq(p,x2,A)Definitions: ModEq(p,x2,A)Original native command in the exact edition - L55
specialize beta_adjacent_target_pairs_product_power p - L56
specialize beta_adjacent_target_pairs_product_power a - L57
specialize beta_adjacent_target_pairs_product_power x - L58
specialize beta_adjacent_target_pairs_product_power x1 - L59
specialize beta_adjacent_target_pairs_product_power h - L60
specialize beta_adjacent_target_pairs_product_power x2 - L61
specialize beta_adjacent_target_pairs_product_power A - L62
apply beta_adjacent_target_pairs_product_power - L63
exact hpairs
12Use earlier factsL64–65
13Establish hfactorial_existsL66–68
Establish this local claim before using it. It is not an additional assumption.
- L66
have hfactorial_exists : ∃ F. Factorial(n,F)Definitions: Factorial(n,F)Original native command in the exact edition - L67
specialize factorial_exists n - L68
exact factorial_exists
14Separate the logical casesL69–69
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L69
cases hfactorial_exists
15Establish hbounded_nL70–72
Establish this local claim before using it. It is not an additional assumption.
- L70
have hbounded_n : BoundedPrefix(b,c,n)Definitions: BoundedPrefix(b,c,n)Original native command in the exact edition - L71
rewrite heven - L72
exact hstate_right_left
16Establish hinjective_nL73–76
Establish this local claim before using it. It is not an additional assumption.
- L73
have hinjective_n : InjectivePrefix(b,c,n)Definitions: InjectivePrefix(b,c,n)Original native command in the exact edition - L74
rewrite heven - L75
rewrite heven - L76
exact hstate_right_right
17Establish hQFL77–86
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply scaled pair order successor lift product is factorial.
- L77
have hQF : x2 = x3 - L78
specialize scaled_pair_order_successor_lift_product_is_factorial b - L79
specialize scaled_pair_order_successor_lift_product_is_factorial c - L80
specialize scaled_pair_order_successor_lift_product_is_factorial x - L81
specialize scaled_pair_order_successor_lift_product_is_factorial x1 - L82
specialize scaled_pair_order_successor_lift_product_is_factorial n - L83
specialize scaled_pair_order_successor_lift_product_is_factorial x2 - L84
specialize scaled_pair_order_successor_lift_product_is_factorial x3 - L85
apply scaled_pair_order_successor_lift_product_is_factorial - L86
exact hbounded_n
18Use earlier factsL87–90
19Establish hpower_productL91–96
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq symm.
- L91
have hpower_product : ModEq(p,A,x2)Definitions: ModEq(p,A,x2)Original native command in the exact edition - L92
specialize mod_eq_symm p - L93
specialize mod_eq_symm x2 - L94
specialize mod_eq_symm A - L95
apply mod_eq_symm - L96
exact hproduct_power
20Establish hpower_factorialL97–99
Establish this local claim before using it. It is not an additional assumption.
- L97
have hpower_factorial : ModEq(p,A,x3)Definitions: ModEq(p,A,x3)Original native command in the exact edition - L98
rewrite <- hQF - L99
exact hpower_product
21Establish hfactorial_modL100–109
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply prime factorial wilson congruence.
- L100
have hfactorial_mod : ModEq(p,x3,n)Definitions: ModEq(p,x3,n)Original native command in the exact edition - L101
specialize prime_factorial_wilson_congruence p - L102
specialize prime_factorial_wilson_congruence n - L103
specialize prime_factorial_wilson_congruence x3 - L104
apply prime_factorial_wilson_congruence - L105
exact hpn - L106
exact hp - L107
exact hfactorial_exists_witness - L108
specialize mod_eq_trans p - L109
specialize mod_eq_trans A
Original defined command ledger · 114 lines
- 0001
intro p - 0002
intro a - 0003
intro n - 0004
intro u - 0005
intro v - 0006
intro b - 0007
intro c - 0008
intro h - 0009
intro A - 0010
intro hpn - 0011
intro hp - 0012
intro hprefix - 0013
intro heven - 0014
intro hstate - 0015
intro hhistory - 0016
intro hpower - 0017
cases hstate - 0018
cases hstate_right - 0019
have hlift_exists : ∃ f. ∃ g. ∀ x. ∀ y. Lt(x,n) → BetaAt(b,c,x,y) → BetaAt(f,g,x,S y)Exact native replay line
have hlift_exists : exists f g. (forall wsl_index_enr_lift_n wsl_value_enr_lift_n. (exists wpo_gap_enr_lift_n_bound. wpo_gap_enr_lift_n_bound + S (wsl_index_enr_lift_n) = n) -> (((exists wpo_beta_height_enr_lift_n_source. wpo_beta_height_enr_lift_n_source + S (wsl_value_enr_lift_n) = S ((S (wsl_index_enr_lift_n)) * c)) /\ exists wpo_beta_quotient_enr_lift_n_source. b = wpo_beta_quotient_enr_lift_n_source * S ((S (wsl_index_enr_lift_n)) * c) + (wsl_value_enr_lift_n))) -> (((exists wpo_beta_height_enr_lift_n_target. wpo_beta_height_enr_lift_n_target + S (S wsl_value_enr_lift_n) = S ((S (wsl_index_enr_lift_n)) * g)) /\ exists wpo_beta_quotient_enr_lift_n_target. f = wpo_beta_quotient_enr_lift_n_target * S ((S (wsl_index_enr_lift_n)) * g) + (S wsl_value_enr_lift_n)))) - 0020
specialize beta_successor_lift_exists b - 0021
specialize beta_successor_lift_exists c - 0022
specialize beta_successor_lift_exists n - 0023
exact beta_successor_lift_exists - 0024
cases hlift_exists - 0025
cases hlift_exists_witness - 0026
have hpairs : ∀ wpp_pair_enr_target_pairs_x. ∀ wpp_left_enr_target_pairs_x. ∀ wpp_right_enr_target_pairs_x. Lt(wpp_pair_enr_target_pairs_x,h) → BetaAt(x,x1,wpp_pair_enr_target_pairs_x + wpp_pair_enr_target_pairs_x,wpp_left_enr_target_pairs_x) → BetaAt(x,x1,S (wpp_pair_enr_target_pairs_x + wpp_pair_enr_target_pairs_x),wpp_right_enr_target_pairs_x) → ModEq(p,wpp_left_enr_target_pairs_x · wpp_right_enr_target_pairs_x,a)Exact native replay line
have hpairs : forall wpp_pair_enr_target_pairs_x wpp_left_enr_target_pairs_x wpp_right_enr_target_pairs_x. (exists wpp_gap_enr_target_pairs_x_pair_bound. wpp_gap_enr_target_pairs_x_pair_bound + S (wpp_pair_enr_target_pairs_x) = h) -> (((exists wpp_beta_height_enr_target_pairs_x_left_entry. wpp_beta_height_enr_target_pairs_x_left_entry + S (wpp_left_enr_target_pairs_x) = S ((S ((wpp_pair_enr_target_pairs_x + wpp_pair_enr_target_pairs_x))) * x1)) /\ exists wpp_beta_quotient_enr_target_pairs_x_left_entry. x = wpp_beta_quotient_enr_target_pairs_x_left_entry * S ((S ((wpp_pair_enr_target_pairs_x + wpp_pair_enr_target_pairs_x))) * x1) + (wpp_left_enr_target_pairs_x))) -> (((exists wpp_beta_height_enr_target_pairs_x_right_entry. wpp_beta_height_enr_target_pairs_x_right_entry + S (wpp_right_enr_target_pairs_x) = S ((S (S (wpp_pair_enr_target_pairs_x + wpp_pair_enr_target_pairs_x))) * x1)) /\ exists wpp_beta_quotient_enr_target_pairs_x_right_entry. x = wpp_beta_quotient_enr_target_pairs_x_right_entry * S ((S (S (wpp_pair_enr_target_pairs_x + wpp_pair_enr_target_pairs_x))) * x1) + (wpp_right_enr_target_pairs_x))) -> (exists wpp_mod_left_enr_target_pairs_x_pair_mod wpp_mod_right_enr_target_pairs_x_pair_mod. (wpp_left_enr_target_pairs_x * wpp_right_enr_target_pairs_x) + p * wpp_mod_left_enr_target_pairs_x_pair_mod = (a) + p * wpp_mod_right_enr_target_pairs_x_pair_mod) - 0027
specialize scaled_pair_order_successor_lift_adjacent_targets p - 0028
specialize scaled_pair_order_successor_lift_adjacent_targets a - 0029
specialize scaled_pair_order_successor_lift_adjacent_targets n - 0030
specialize scaled_pair_order_successor_lift_adjacent_targets u - 0031
specialize scaled_pair_order_successor_lift_adjacent_targets v - 0032
specialize scaled_pair_order_successor_lift_adjacent_targets b - 0033
specialize scaled_pair_order_successor_lift_adjacent_targets c - 0034
specialize scaled_pair_order_successor_lift_adjacent_targets x - 0035
specialize scaled_pair_order_successor_lift_adjacent_targets x1 - 0036
specialize scaled_pair_order_successor_lift_adjacent_targets h - 0037
apply scaled_pair_order_successor_lift_adjacent_targets - 0038
exact heven - 0039
exact hprefix - 0040
exact hstate_right_left - 0041
exact hhistory - 0042
exact hlift_exists_witness_witness - 0043
have hproduct_exists : ∃ Q. Product(x,x1,n,Q)Exact native replay line
have hproduct_exists : exists Q. exists ff_u_enr_terminal_product_x ff_v_enr_terminal_product_x. ((((exists ff_h_enr_terminal_product_x_start. ff_h_enr_terminal_product_x_start + S (1) = S ((S (0)) * ff_v_enr_terminal_product_x)) /\ exists ff_q_enr_terminal_product_x_start. ff_u_enr_terminal_product_x = ff_q_enr_terminal_product_x_start * S ((S (0)) * ff_v_enr_terminal_product_x) + (1))) /\ ((((exists ff_h_enr_terminal_product_x_terminal. ff_h_enr_terminal_product_x_terminal + S (Q) = S ((S (n)) * ff_v_enr_terminal_product_x)) /\ exists ff_q_enr_terminal_product_x_terminal. ff_u_enr_terminal_product_x = ff_q_enr_terminal_product_x_terminal * S ((S (n)) * ff_v_enr_terminal_product_x) + (Q))) /\ forall ff_i_enr_terminal_product_x. (exists ff_lt_enr_terminal_product_x_bound. ff_lt_enr_terminal_product_x_bound + S ff_i_enr_terminal_product_x = n) -> exists ff_p_enr_terminal_product_x ff_r_enr_terminal_product_x ff_s_enr_terminal_product_x. ((((exists ff_h_enr_terminal_product_x_factor. ff_h_enr_terminal_product_x_factor + S (ff_p_enr_terminal_product_x) = S ((S (ff_i_enr_terminal_product_x)) * x1)) /\ exists ff_q_enr_terminal_product_x_factor. x = ff_q_enr_terminal_product_x_factor * S ((S (ff_i_enr_terminal_product_x)) * x1) + (ff_p_enr_terminal_product_x))) /\ ((((exists ff_h_enr_terminal_product_x_partial. ff_h_enr_terminal_product_x_partial + S (ff_r_enr_terminal_product_x) = S ((S (ff_i_enr_terminal_product_x)) * ff_v_enr_terminal_product_x)) /\ exists ff_q_enr_terminal_product_x_partial. ff_u_enr_terminal_product_x = ff_q_enr_terminal_product_x_partial * S ((S (ff_i_enr_terminal_product_x)) * ff_v_enr_terminal_product_x) + (ff_r_enr_terminal_product_x))) /\ ((((exists ff_h_enr_terminal_product_x_successor. ff_h_enr_terminal_product_x_successor + S (ff_s_enr_terminal_product_x) = S ((S (S ff_i_enr_terminal_product_x)) * ff_v_enr_terminal_product_x)) /\ exists ff_q_enr_terminal_product_x_successor. ff_u_enr_terminal_product_x = ff_q_enr_terminal_product_x_successor * S ((S (S ff_i_enr_terminal_product_x)) * ff_v_enr_terminal_product_x) + (ff_s_enr_terminal_product_x))) /\ ff_s_enr_terminal_product_x = ff_r_enr_terminal_product_x * ff_p_enr_terminal_product_x))))) - 0044
specialize beta_product_exists x - 0045
specialize beta_product_exists x1 - 0046
specialize beta_product_exists n - 0047
exact beta_product_exists - 0048
cases hproduct_exists - 0049
have hproduct_even : Product(x,x1,h + h,x2)Exact native replay line
have hproduct_even : exists ff_u_enr_terminal_product_even ff_v_enr_terminal_product_even. ((((exists ff_h_enr_terminal_product_even_start. ff_h_enr_terminal_product_even_start + S (1) = S ((S (0)) * ff_v_enr_terminal_product_even)) /\ exists ff_q_enr_terminal_product_even_start. ff_u_enr_terminal_product_even = ff_q_enr_terminal_product_even_start * S ((S (0)) * ff_v_enr_terminal_product_even) + (1))) /\ ((((exists ff_h_enr_terminal_product_even_terminal. ff_h_enr_terminal_product_even_terminal + S (x2) = S ((S (h + h)) * ff_v_enr_terminal_product_even)) /\ exists ff_q_enr_terminal_product_even_terminal. ff_u_enr_terminal_product_even = ff_q_enr_terminal_product_even_terminal * S ((S (h + h)) * ff_v_enr_terminal_product_even) + (x2))) /\ forall ff_i_enr_terminal_product_even. (exists ff_lt_enr_terminal_product_even_bound. ff_lt_enr_terminal_product_even_bound + S ff_i_enr_terminal_product_even = h + h) -> exists ff_p_enr_terminal_product_even ff_r_enr_terminal_product_even ff_s_enr_terminal_product_even. ((((exists ff_h_enr_terminal_product_even_factor. ff_h_enr_terminal_product_even_factor + S (ff_p_enr_terminal_product_even) = S ((S (ff_i_enr_terminal_product_even)) * x1)) /\ exists ff_q_enr_terminal_product_even_factor. x = ff_q_enr_terminal_product_even_factor * S ((S (ff_i_enr_terminal_product_even)) * x1) + (ff_p_enr_terminal_product_even))) /\ ((((exists ff_h_enr_terminal_product_even_partial. ff_h_enr_terminal_product_even_partial + S (ff_r_enr_terminal_product_even) = S ((S (ff_i_enr_terminal_product_even)) * ff_v_enr_terminal_product_even)) /\ exists ff_q_enr_terminal_product_even_partial. ff_u_enr_terminal_product_even = ff_q_enr_terminal_product_even_partial * S ((S (ff_i_enr_terminal_product_even)) * ff_v_enr_terminal_product_even) + (ff_r_enr_terminal_product_even))) /\ ((((exists ff_h_enr_terminal_product_even_successor. ff_h_enr_terminal_product_even_successor + S (ff_s_enr_terminal_product_even) = S ((S (S ff_i_enr_terminal_product_even)) * ff_v_enr_terminal_product_even)) /\ exists ff_q_enr_terminal_product_even_successor. ff_u_enr_terminal_product_even = ff_q_enr_terminal_product_even_successor * S ((S (S ff_i_enr_terminal_product_even)) * ff_v_enr_terminal_product_even) + (ff_s_enr_terminal_product_even))) /\ ff_s_enr_terminal_product_even = ff_r_enr_terminal_product_even * ff_p_enr_terminal_product_even))))) - 0050
rewrite <- heven - 0051
rewrite <- heven - 0052
rewrite <- heven - 0053
exact hproduct_exists_witness - 0054
have hproduct_power : ModEq(p,x2,A)Exact native replay line
have hproduct_power : exists wpp_mod_left_enr_product_mod_power wpp_mod_right_enr_product_mod_power. (x2) + p * wpp_mod_left_enr_product_mod_power = (A) + p * wpp_mod_right_enr_product_mod_power - 0055
specialize beta_adjacent_target_pairs_product_power p - 0056
specialize beta_adjacent_target_pairs_product_power a - 0057
specialize beta_adjacent_target_pairs_product_power x - 0058
specialize beta_adjacent_target_pairs_product_power x1 - 0059
specialize beta_adjacent_target_pairs_product_power h - 0060
specialize beta_adjacent_target_pairs_product_power x2 - 0061
specialize beta_adjacent_target_pairs_product_power A - 0062
apply beta_adjacent_target_pairs_product_power - 0063
exact hpairs - 0064
exact hproduct_even - 0065
exact hpower - 0066
have hfactorial_exists : ∃ F. Factorial(n,F)Exact native replay line
have hfactorial_exists : exists F. (exists ff_b_enr_terminal_factorial ff_c_enr_terminal_factorial. ((forall ff_i_enr_terminal_factorial_range. (exists ff_lt_enr_terminal_factorial_range_bound. ff_lt_enr_terminal_factorial_range_bound + S ff_i_enr_terminal_factorial_range = n) -> (((exists ff_h_enr_terminal_factorial_range_decoded. ff_h_enr_terminal_factorial_range_decoded + S (1 + ff_i_enr_terminal_factorial_range) = S ((S (ff_i_enr_terminal_factorial_range)) * ff_c_enr_terminal_factorial)) /\ exists ff_q_enr_terminal_factorial_range_decoded. ff_b_enr_terminal_factorial = ff_q_enr_terminal_factorial_range_decoded * S ((S (ff_i_enr_terminal_factorial_range)) * ff_c_enr_terminal_factorial) + (1 + ff_i_enr_terminal_factorial_range)))) /\ (exists ff_u_enr_terminal_factorial_product ff_v_enr_terminal_factorial_product. ((((exists ff_h_enr_terminal_factorial_product_start. ff_h_enr_terminal_factorial_product_start + S (1) = S ((S (0)) * ff_v_enr_terminal_factorial_product)) /\ exists ff_q_enr_terminal_factorial_product_start. ff_u_enr_terminal_factorial_product = ff_q_enr_terminal_factorial_product_start * S ((S (0)) * ff_v_enr_terminal_factorial_product) + (1))) /\ ((((exists ff_h_enr_terminal_factorial_product_terminal. ff_h_enr_terminal_factorial_product_terminal + S (F) = S ((S (n)) * ff_v_enr_terminal_factorial_product)) /\ exists ff_q_enr_terminal_factorial_product_terminal. ff_u_enr_terminal_factorial_product = ff_q_enr_terminal_factorial_product_terminal * S ((S (n)) * ff_v_enr_terminal_factorial_product) + (F))) /\ forall ff_i_enr_terminal_factorial_product. (exists ff_lt_enr_terminal_factorial_product_bound. ff_lt_enr_terminal_factorial_product_bound + S ff_i_enr_terminal_factorial_product = n) -> exists ff_p_enr_terminal_factorial_product ff_r_enr_terminal_factorial_product ff_s_enr_terminal_factorial_product. ((((exists ff_h_enr_terminal_factorial_product_factor. ff_h_enr_terminal_factorial_product_factor + S (ff_p_enr_terminal_factorial_product) = S ((S (ff_i_enr_terminal_factorial_product)) * ff_c_enr_terminal_factorial)) /\ exists ff_q_enr_terminal_factorial_product_factor. ff_b_enr_terminal_factorial = ff_q_enr_terminal_factorial_product_factor * S ((S (ff_i_enr_terminal_factorial_product)) * ff_c_enr_terminal_factorial) + (ff_p_enr_terminal_factorial_product))) /\ ((((exists ff_h_enr_terminal_factorial_product_partial. ff_h_enr_terminal_factorial_product_partial + S (ff_r_enr_terminal_factorial_product) = S ((S (ff_i_enr_terminal_factorial_product)) * ff_v_enr_terminal_factorial_product)) /\ exists ff_q_enr_terminal_factorial_product_partial. ff_u_enr_terminal_factorial_product = ff_q_enr_terminal_factorial_product_partial * S ((S (ff_i_enr_terminal_factorial_product)) * ff_v_enr_terminal_factorial_product) + (ff_r_enr_terminal_factorial_product))) /\ ((((exists ff_h_enr_terminal_factorial_product_successor. ff_h_enr_terminal_factorial_product_successor + S (ff_s_enr_terminal_factorial_product) = S ((S (S ff_i_enr_terminal_factorial_product)) * ff_v_enr_terminal_factorial_product)) /\ exists ff_q_enr_terminal_factorial_product_successor. ff_u_enr_terminal_factorial_product = ff_q_enr_terminal_factorial_product_successor * S ((S (S ff_i_enr_terminal_factorial_product)) * ff_v_enr_terminal_factorial_product) + (ff_s_enr_terminal_factorial_product))) /\ ff_s_enr_terminal_factorial_product = ff_r_enr_terminal_factorial_product * ff_p_enr_terminal_factorial_product)))))))) - 0067
specialize factorial_exists n - 0068
exact factorial_exists - 0069
cases hfactorial_exists - 0070
have hbounded_n : BoundedPrefix(b,c,n)Exact native replay line
have hbounded_n : forall fom_index_enr_generic_bounded. (exists fom_gap_enr_generic_bounded_index_bound. fom_gap_enr_generic_bounded_index_bound + S (fom_index_enr_generic_bounded) = n) -> exists fom_value_enr_generic_bounded. ((((exists fom_beta_height_enr_generic_bounded_entry. fom_beta_height_enr_generic_bounded_entry + S (fom_value_enr_generic_bounded) = S ((S (fom_index_enr_generic_bounded)) * c)) /\ exists fom_beta_quotient_enr_generic_bounded_entry. b = fom_beta_quotient_enr_generic_bounded_entry * S ((S (fom_index_enr_generic_bounded)) * c) + (fom_value_enr_generic_bounded))) /\ (exists fom_gap_enr_generic_bounded_value_bound. fom_gap_enr_generic_bounded_value_bound + S (fom_value_enr_generic_bounded) = n)) - 0071
rewrite heven - 0072
exact hstate_right_left - 0073
have hinjective_n : InjectivePrefix(b,c,n)Exact native replay line
have hinjective_n : forall wpo_injective_left_enr_generic_injective wpo_injective_right_enr_generic_injective wpo_injective_value_enr_generic_injective. (exists wpo_gap_enr_generic_injective_left_bound. wpo_gap_enr_generic_injective_left_bound + S (wpo_injective_left_enr_generic_injective) = n) -> (exists wpo_gap_enr_generic_injective_right_bound. wpo_gap_enr_generic_injective_right_bound + S (wpo_injective_right_enr_generic_injective) = n) -> (((exists wpo_beta_height_enr_generic_injective_left_entry. wpo_beta_height_enr_generic_injective_left_entry + S (wpo_injective_value_enr_generic_injective) = S ((S (wpo_injective_left_enr_generic_injective)) * c)) /\ exists wpo_beta_quotient_enr_generic_injective_left_entry. b = wpo_beta_quotient_enr_generic_injective_left_entry * S ((S (wpo_injective_left_enr_generic_injective)) * c) + (wpo_injective_value_enr_generic_injective))) -> (((exists wpo_beta_height_enr_generic_injective_right_entry. wpo_beta_height_enr_generic_injective_right_entry + S (wpo_injective_value_enr_generic_injective) = S ((S (wpo_injective_right_enr_generic_injective)) * c)) /\ exists wpo_beta_quotient_enr_generic_injective_right_entry. b = wpo_beta_quotient_enr_generic_injective_right_entry * S ((S (wpo_injective_right_enr_generic_injective)) * c) + (wpo_injective_value_enr_generic_injective))) -> wpo_injective_left_enr_generic_injective = wpo_injective_right_enr_generic_injective - 0074
rewrite heven - 0075
rewrite heven - 0076
exact hstate_right_right - 0077
have hQF : x2 = x3 - 0078
specialize scaled_pair_order_successor_lift_product_is_factorial b - 0079
specialize scaled_pair_order_successor_lift_product_is_factorial c - 0080
specialize scaled_pair_order_successor_lift_product_is_factorial x - 0081
specialize scaled_pair_order_successor_lift_product_is_factorial x1 - 0082
specialize scaled_pair_order_successor_lift_product_is_factorial n - 0083
specialize scaled_pair_order_successor_lift_product_is_factorial x2 - 0084
specialize scaled_pair_order_successor_lift_product_is_factorial x3 - 0085
apply scaled_pair_order_successor_lift_product_is_factorial - 0086
exact hbounded_n - 0087
exact hinjective_n - 0088
exact hlift_exists_witness_witness - 0089
exact hproduct_exists_witness - 0090
exact hfactorial_exists_witness - 0091
have hpower_product : ModEq(p,A,x2)Exact native replay line
have hpower_product : exists wpp_mod_left_enr_power_mod_product wpp_mod_right_enr_power_mod_product. (A) + p * wpp_mod_left_enr_power_mod_product = (x2) + p * wpp_mod_right_enr_power_mod_product - 0092
specialize mod_eq_symm p - 0093
specialize mod_eq_symm x2 - 0094
specialize mod_eq_symm A - 0095
apply mod_eq_symm - 0096
exact hproduct_power - 0097
have hpower_factorial : ModEq(p,A,x3)Exact native replay line
have hpower_factorial : exists wpp_mod_left_enr_power_mod_factorial wpp_mod_right_enr_power_mod_factorial. (A) + p * wpp_mod_left_enr_power_mod_factorial = (x3) + p * wpp_mod_right_enr_power_mod_factorial - 0098
rewrite <- hQF - 0099
exact hpower_product - 0100
have hfactorial_mod : ModEq(p,x3,n)Exact native replay line
have hfactorial_mod : exists wpp_mod_left_enr_factorial_mod_predecessor wpp_mod_right_enr_factorial_mod_predecessor. (x3) + p * wpp_mod_left_enr_factorial_mod_predecessor = (n) + p * wpp_mod_right_enr_factorial_mod_predecessor - 0101
specialize prime_factorial_wilson_congruence p - 0102
specialize prime_factorial_wilson_congruence n - 0103
specialize prime_factorial_wilson_congruence x3 - 0104
apply prime_factorial_wilson_congruence - 0105
exact hpn - 0106
exact hp - 0107
exact hfactorial_exists_witness - 0108
specialize mod_eq_trans p - 0109
specialize mod_eq_trans A - 0110
specialize mod_eq_trans x3 - 0111
specialize mod_eq_trans n - 0112
apply mod_eq_trans - 0113
exact hpower_factorial - 0114
exact hfactorial_mod