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. ∀ r. ∀ e. ∀ z. p = S r → Pow(r,e,z) → (Even(e) → ModEq(p,z,1)) ∧ (Odd(e) → ModEq(p,z,r))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
5 occurrences
In local proof propositions
15 occurrences
Exact expanded native-PA statement
forall p r e z. p = S r -> (exists ff_b_main ff_c_main. ((forall ff_i_main_repeat. (exists ff_lt_main_repeat_bound. ff_lt_main_repeat_bound + S ff_i_main_repeat = e) -> (((exists ff_h_main_repeat_decoded. ff_h_main_repeat_decoded + S (r) = S ((S (ff_i_main_repeat)) * ff_c_main)) /\ exists ff_q_main_repeat_decoded. ff_b_main = ff_q_main_repeat_decoded * S ((S (ff_i_main_repeat)) * ff_c_main) + (r)))) /\ (exists ff_u_main_product ff_v_main_product. ((((exists ff_h_main_product_start. ff_h_main_product_start + S (1) = S ((S (0)) * ff_v_main_product)) /\ exists ff_q_main_product_start. ff_u_main_product = ff_q_main_product_start * S ((S (0)) * ff_v_main_product) + (1))) /\ ((((exists ff_h_main_product_terminal. ff_h_main_product_terminal + S (z) = S ((S (e)) * ff_v_main_product)) /\ exists ff_q_main_product_terminal. ff_u_main_product = ff_q_main_product_terminal * S ((S (e)) * ff_v_main_product) + (z))) /\ forall ff_i_main_product. (exists ff_lt_main_product_bound. ff_lt_main_product_bound + S ff_i_main_product = e) -> exists ff_p_main_product ff_r_main_product ff_s_main_product. ((((exists ff_h_main_product_factor. ff_h_main_product_factor + S (ff_p_main_product) = S ((S (ff_i_main_product)) * ff_c_main)) /\ exists ff_q_main_product_factor. ff_b_main = ff_q_main_product_factor * S ((S (ff_i_main_product)) * ff_c_main) + (ff_p_main_product))) /\ ((((exists ff_h_main_product_partial. ff_h_main_product_partial + S (ff_r_main_product) = S ((S (ff_i_main_product)) * ff_v_main_product)) /\ exists ff_q_main_product_partial. ff_u_main_product = ff_q_main_product_partial * S ((S (ff_i_main_product)) * ff_v_main_product) + (ff_r_main_product))) /\ ((((exists ff_h_main_product_successor. ff_h_main_product_successor + S (ff_s_main_product) = S ((S (S ff_i_main_product)) * ff_v_main_product)) /\ exists ff_q_main_product_successor. ff_u_main_product = ff_q_main_product_successor * S ((S (S ff_i_main_product)) * ff_v_main_product) + (ff_s_main_product))) /\ ff_s_main_product = ff_r_main_product * ff_p_main_product)))))))) -> (((exists gs_even_main. e = 2 * gs_even_main) -> (exists gs_u_result_even gs_v_result_even. (z) + p * gs_u_result_even = (1) + p * gs_v_result_even)) /\ ((exists gs_odd_main. e = 2 * gs_odd_main + 1) -> (exists gs_u_result_odd gs_v_result_odd. (z) + p * gs_u_result_odd = (r) + p * gs_v_result_odd)))Proof neighborhood
Direct theorem prerequisites
PA004B pow_zero PA004D pow_successor_decompose PA0056 odd_not_even PA005A even_successor_to_odd PA005C odd_successor_to_even PA005D predecessor_square_mod_one PA0023 mod_eq_refl PA004E mod_eq_mul PA0024 mod_eq_trans PA000M one_mulDirect 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–2
02Induction on eL3–6
03Separate the logical casesL7–7
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L7
split
04Fix variables and assumptionsL8–8
Work with arbitrary variables or the premises of the current implication.
- L8
intro he
05Establish hzL9–18
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply pow zero.
06Use earlier factsL19–19
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L19
exact mod_eq_refl
07Fix variables and assumptionsL20–20
Work with arbitrary variables or the premises of the current implication.
- L20
intro ho
08Separate the logical casesL21–21
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L21
exfalso
09Use earlier factsL22–24
10Construct an explicit witnessL25–25
Supply the displayed value, then prove that it has the required property.
- L25
exists 0
11Calculate and transport equalitiesL26–26
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L26
norm_num
12Fix variables and assumptionsL27–29
13Establish hstepL30–37
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply pow successor decompose.
- L30
have hstep : ∃ w. Pow(r,e,w) ∧ z = w · rDefinitions: Pow(r,e,w)Original native command in the exact edition - L31
specialize pow_successor_decompose r - L32
specialize pow_successor_decompose e - L33
specialize pow_successor_decompose (S e) - L34
specialize pow_successor_decompose z - L35
apply pow_successor_decompose - L36
refl - L37
exact hpow
14Separate the logical casesL38–39
15Establish hinvL40–44
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply IH.
- L40
have hinv : (Even(e) → ModEq(p,x,1)) ∧ (Odd(e) → ModEq(p,x,r))Definitions: Even(e)ModEq(p,x,1)Odd(e)ModEq(p,x,r)Original native command in the exact edition - L41
specialize IH x - L42
apply IH - L43
exact hp - L44
exact hstep_witness_left
16Separate the logical casesL45–46
17Fix variables and assumptionsL47–47
Work with arbitrary variables or the premises of the current implication.
- L47
intro hse
18Establish heoL48–51
19Establish hwrL52–54
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply hinv right.
20Establish hrrL55–58
Establish this local claim before using it. It is not an additional assumption.
21Establish hmulL59–67
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq mul.
22Establish hsqL68–72
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply predecessor square mod one.
- L68
have hsq : BalancedInverse(p,r,r)Definitions: BalancedInverse(p,r,r)Original native command in the exact edition - L69
specialize predecessor_square_mod_one p - L70
specialize predecessor_square_mod_one r - L71
apply predecessor_square_mod_one - L72
exact hp
23Establish hfinalL73–82
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq trans.
- L73
have hfinal : BalancedInverse(p,x,r)Definitions: BalancedInverse(p,x,r)Original native command in the exact edition - L74
specialize mod_eq_trans p - L75
specialize mod_eq_trans (x * r) - L76
specialize mod_eq_trans (r * r) - L77
specialize mod_eq_trans 1 - L78
apply mod_eq_trans - L79
exact hmul - L80
exact hsq - L81
rewrite hstep_witness_right - L82
exact hfinal
24Fix variables and assumptionsL83–83
Work with arbitrary variables or the premises of the current implication.
- L83
intro hso
25Establish heeL84–87
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply odd successor to even.
26Establish hw1L88–90
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply hinv left.
27Establish hrrL91–94
Establish this local claim before using it. It is not an additional assumption.
28Establish hmulL95–104
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq mul.
- L95
have hmul : ModEq(p,x · r,1 · r)Definitions: ModEq(p,x · r,1 · r)Original native command in the exact edition - L96
specialize mod_eq_mul p - L97
specialize mod_eq_mul x - L98
specialize mod_eq_mul 1 - L99
specialize mod_eq_mul r - L100
specialize mod_eq_mul r - L101
apply mod_eq_mul - L102
exact hw1 - L103
exact hrr - L104
specialize one_mul r
29Calculate and transport equalitiesL105–106
30Use earlier factsL107–107
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L107
exact hmul
Original defined command ledger · 107 lines
- 0001
intro p - 0002
intro r - 0003
induction e - 0004
intro z - 0005
intro hp - 0006
intro hpow - 0007
split - 0008
intro he - 0009
have hz : z = 1 - 0010
specialize pow_zero r - 0011
specialize pow_zero 0 - 0012
specialize pow_zero z - 0013
apply pow_zero - 0014
refl - 0015
exact hpow - 0016
rewrite hz - 0017
specialize mod_eq_refl p - 0018
specialize mod_eq_refl 1 - 0019
exact mod_eq_refl - 0020
intro ho - 0021
exfalso - 0022
specialize odd_not_even 0 - 0023
apply odd_not_even - 0024
exact ho - 0025
exists 0 - 0026
norm_num - 0027
intro z - 0028
intro hp - 0029
intro hpow - 0030
have hstep : ∃ w. Pow(r,e,w) ∧ z = w · rExact native replay line
have hstep : exists w. (exists ff_b_predecessor ff_c_predecessor. ((forall ff_i_predecessor_repeat. (exists ff_lt_predecessor_repeat_bound. ff_lt_predecessor_repeat_bound + S ff_i_predecessor_repeat = e) -> (((exists ff_h_predecessor_repeat_decoded. ff_h_predecessor_repeat_decoded + S (r) = S ((S (ff_i_predecessor_repeat)) * ff_c_predecessor)) /\ exists ff_q_predecessor_repeat_decoded. ff_b_predecessor = ff_q_predecessor_repeat_decoded * S ((S (ff_i_predecessor_repeat)) * ff_c_predecessor) + (r)))) /\ (exists ff_u_predecessor_product ff_v_predecessor_product. ((((exists ff_h_predecessor_product_start. ff_h_predecessor_product_start + S (1) = S ((S (0)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_start. ff_u_predecessor_product = ff_q_predecessor_product_start * S ((S (0)) * ff_v_predecessor_product) + (1))) /\ ((((exists ff_h_predecessor_product_terminal. ff_h_predecessor_product_terminal + S (w) = S ((S (e)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_terminal. ff_u_predecessor_product = ff_q_predecessor_product_terminal * S ((S (e)) * ff_v_predecessor_product) + (w))) /\ forall ff_i_predecessor_product. (exists ff_lt_predecessor_product_bound. ff_lt_predecessor_product_bound + S ff_i_predecessor_product = e) -> exists ff_p_predecessor_product ff_r_predecessor_product ff_s_predecessor_product. ((((exists ff_h_predecessor_product_factor. ff_h_predecessor_product_factor + S (ff_p_predecessor_product) = S ((S (ff_i_predecessor_product)) * ff_c_predecessor)) /\ exists ff_q_predecessor_product_factor. ff_b_predecessor = ff_q_predecessor_product_factor * S ((S (ff_i_predecessor_product)) * ff_c_predecessor) + (ff_p_predecessor_product))) /\ ((((exists ff_h_predecessor_product_partial. ff_h_predecessor_product_partial + S (ff_r_predecessor_product) = S ((S (ff_i_predecessor_product)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_partial. ff_u_predecessor_product = ff_q_predecessor_product_partial * S ((S (ff_i_predecessor_product)) * ff_v_predecessor_product) + (ff_r_predecessor_product))) /\ ((((exists ff_h_predecessor_product_successor. ff_h_predecessor_product_successor + S (ff_s_predecessor_product) = S ((S (S ff_i_predecessor_product)) * ff_v_predecessor_product)) /\ exists ff_q_predecessor_product_successor. ff_u_predecessor_product = ff_q_predecessor_product_successor * S ((S (S ff_i_predecessor_product)) * ff_v_predecessor_product) + (ff_s_predecessor_product))) /\ ff_s_predecessor_product = ff_r_predecessor_product * ff_p_predecessor_product)))))))) /\ z = w * r - 0031
specialize pow_successor_decompose r - 0032
specialize pow_successor_decompose e - 0033
specialize pow_successor_decompose (S e) - 0034
specialize pow_successor_decompose z - 0035
apply pow_successor_decompose - 0036
refl - 0037
exact hpow - 0038
cases hstep - 0039
cases hstep_witness - 0040
have hinv : (Even(e) → ModEq(p,x,1)) ∧ (Odd(e) → ModEq(p,x,r))Exact native replay line
have hinv : (((exists gs_even_ih. e = 2 * gs_even_ih) -> (exists gs_u_ih_even gs_v_ih_even. (x) + p * gs_u_ih_even = (1) + p * gs_v_ih_even)) /\ ((exists gs_odd_ih. e = 2 * gs_odd_ih + 1) -> (exists gs_u_ih_odd gs_v_ih_odd. (x) + p * gs_u_ih_odd = (r) + p * gs_v_ih_odd))) - 0041
specialize IH x - 0042
apply IH - 0043
exact hp - 0044
exact hstep_witness_left - 0045
cases hinv - 0046
split - 0047
intro hse - 0048
have heo : Odd(e)Exact native replay line
have heo : exists a. e = 2 * a + 1 - 0049
specialize even_successor_to_odd e - 0050
apply even_successor_to_odd - 0051
exact hse - 0052
have hwr : ModEq(p,x,r)Exact native replay line
have hwr : exists u v. x + p * u = r + p * v - 0053
apply hinv_right - 0054
exact heo - 0055
have hrr : ModEq(p,r,r)Exact native replay line
have hrr : exists u v. r + p * u = r + p * v - 0056
specialize mod_eq_refl p - 0057
specialize mod_eq_refl r - 0058
exact mod_eq_refl - 0059
have hmul : ModEq(p,x · r,r · r)Exact native replay line
have hmul : exists u v. (x * r) + p * u = (r * r) + p * v - 0060
specialize mod_eq_mul p - 0061
specialize mod_eq_mul x - 0062
specialize mod_eq_mul r - 0063
specialize mod_eq_mul r - 0064
specialize mod_eq_mul r - 0065
apply mod_eq_mul - 0066
exact hwr - 0067
exact hrr - 0068
have hsq : BalancedInverse(p,r,r)Exact native replay line
have hsq : exists u v. (r * r) + p * u = 1 + p * v - 0069
specialize predecessor_square_mod_one p - 0070
specialize predecessor_square_mod_one r - 0071
apply predecessor_square_mod_one - 0072
exact hp - 0073
have hfinal : BalancedInverse(p,x,r)Exact native replay line
have hfinal : exists u v. (x * r) + p * u = 1 + p * v - 0074
specialize mod_eq_trans p - 0075
specialize mod_eq_trans (x * r) - 0076
specialize mod_eq_trans (r * r) - 0077
specialize mod_eq_trans 1 - 0078
apply mod_eq_trans - 0079
exact hmul - 0080
exact hsq - 0081
rewrite hstep_witness_right - 0082
exact hfinal - 0083
intro hso - 0084
have hee : Even(e)Exact native replay line
have hee : exists a. e = 2 * a - 0085
specialize odd_successor_to_even e - 0086
apply odd_successor_to_even - 0087
exact hso - 0088
have hw1 : ModEq(p,x,1)Exact native replay line
have hw1 : exists u v. x + p * u = 1 + p * v - 0089
apply hinv_left - 0090
exact hee - 0091
have hrr : ModEq(p,r,r)Exact native replay line
have hrr : exists u v. r + p * u = r + p * v - 0092
specialize mod_eq_refl p - 0093
specialize mod_eq_refl r - 0094
exact mod_eq_refl - 0095
have hmul : ModEq(p,x · r,1 · r)Exact native replay line
have hmul : exists u v. (x * r) + p * u = (1 * r) + p * v - 0096
specialize mod_eq_mul p - 0097
specialize mod_eq_mul x - 0098
specialize mod_eq_mul 1 - 0099
specialize mod_eq_mul r - 0100
specialize mod_eq_mul r - 0101
apply mod_eq_mul - 0102
exact hw1 - 0103
exact hrr - 0104
specialize one_mul r - 0105
rewrite one_mul at hmul - 0106
rewrite hstep_witness_right - 0107
exact hmul