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. ∀ h. ∀ a. ∀ x. ∀ q. ∀ r. p = 2 · h + 1 → a · x = q · p + r → Lt(r,p) → ¬r = 0 → ∃ y. Lt(0,y) ∧ (Le(y,h) ∧ (ModEq(p,a · x,y) ∨ ModEq(p,a · x,2 · h · y)))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
7 occurrences
Exact expanded native-PA statement
forall p h a x q r. p = 2 * h + 1 -> a * x = q * p + r -> (exists gsh_lt_gap_product_remainder. gsh_lt_gap_product_remainder + S r = p) -> ~(r = 0) -> (exists m. (exists gsh_lt_gap_product_positive. gsh_lt_gap_product_positive + S 0 = m) /\ ((exists gsh_le_gap_product_bounded. gsh_le_gap_product_bounded + m = h) /\ ((exists gsh_mod_left_product_lower gsh_mod_right_product_lower. (a * x) + p * gsh_mod_left_product_lower = (m) + p * gsh_mod_right_product_lower) \/ (exists gsh_mod_left_product_upper gsh_mod_right_product_upper. (a * x) + p * gsh_mod_left_product_upper = ((2 * h) * m) + p * gsh_mod_right_product_upper))))Proof neighborhood
Direct theorem prerequisites
PA0009 add_assoc PA000F add_comm PA000G mul_succ_left PA0002 mul_one PA003B le_or_lt PA002L one_le_of_ne_zero PA003C remainder_decomposition_to_mod_eq PA006Y odd_upper_remainder_reflection 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
02Establish hcanonicalL11–17
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply remainder decomposition to mod eq.
- L11
have hcanonical : ModEq(p,a · x,r)Definitions: ModEq(p,a · x,r)Original native command in the exact edition - L12
specialize remainder_decomposition_to_mod_eq p - L13
specialize remainder_decomposition_to_mod_eq (a * x) - L14
specialize remainder_decomposition_to_mod_eq q - L15
specialize remainder_decomposition_to_mod_eq r - L16
apply remainder_decomposition_to_mod_eq - L17
exact hdecomp
03Establish hsplitL18–21
04Separate the logical casesL22–22
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L22
cases hsplit
05Construct an explicit witnessL23–23
Supply the displayed value, then prove that it has the required property.
- L23
exists r
06Separate the logical casesL24–24
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L24
split
07Use earlier factsL25–27
08Separate the logical casesL28–28
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L28
split
09Use earlier factsL29–29
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L29
exact hsplit_left
10Separate the logical casesL30–30
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L30
left
11Use earlier factsL31–31
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L31
exact hcanonical
12Establish hreflectionL32–39
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply odd upper remainder reflection.
- L32
have hreflection : ∃ m. Lt(0,m) ∧ (Le(m,h) ∧ r + m = p)Definitions: Lt(0,m)Le(m,h)Original native command in the exact edition - L33
specialize odd_upper_remainder_reflection p - L34
specialize odd_upper_remainder_reflection h - L35
specialize odd_upper_remainder_reflection r - L36
apply odd_upper_remainder_reflection - L37
exact hp - L38
exact hrp - L39
exact hsplit_right
13Separate the logical casesL40–42
14Establish hreflected_remainderL43–43
Establish this local claim before using it. It is not an additional assumption.
- L43
have hreflected_remainder : ModEq(p,r,2 · h · x1)Definitions: ModEq(p,r,2 · h · x1)Original native command in the exact edition
15Construct an explicit witnessL44–45
16Calculate and transport equalitiesL46–49
17Use earlier factsL50–51
18Calculate and transport equalitiesL52–54
19Use earlier factsL55–55
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L55
apply add_comm
20Calculate and transport equalitiesL56–56
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L56
symm
21Use earlier factsL57–57
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L57
apply add_assoc
22Calculate and transport equalitiesL58–58
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L58
rewrite hreflection_witness_right_right
23Use earlier factsL59–59
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L59
specialize mul_one p
24Calculate and transport equalitiesL60–60
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L60
rewrite mul_one
25Use earlier factsL61–61
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L61
apply add_comm
26Establish hreflected_productL62–69
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq trans.
- L62
have hreflected_product : ModEq(p,a · x,2 · h · x1)Definitions: ModEq(p,a · x,2 · h · x1)Original native command in the exact edition - L63
specialize mod_eq_trans p - L64
specialize mod_eq_trans (a * x) - L65
specialize mod_eq_trans r - L66
specialize mod_eq_trans ((2 * h) * x1) - L67
apply mod_eq_trans - L68
exact hcanonical - L69
exact hreflected_remainder
27Construct an explicit witnessL70–70
Supply the displayed value, then prove that it has the required property.
- L70
exists x1
28Separate the logical casesL71–71
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L71
split
29Use earlier factsL72–72
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L72
exact hreflection_witness_left
30Separate the logical casesL73–73
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L73
split
31Use earlier factsL74–74
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L74
exact hreflection_witness_right_left
32Separate the logical casesL75–75
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L75
right
33Use earlier factsL76–76
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L76
exact hreflected_product
Original defined command ledger · 76 lines
- 0001
intro p - 0002
intro h - 0003
intro a - 0004
intro x - 0005
intro q - 0006
intro r - 0007
intro hp - 0008
intro hdecomp - 0009
intro hrp - 0010
intro hr0 - 0011
have hcanonical : ModEq(p,a · x,r)Exact native replay line
have hcanonical : exists gsh_mod_left_canonical_remainder gsh_mod_right_canonical_remainder. (a * x) + p * gsh_mod_left_canonical_remainder = (r) + p * gsh_mod_right_canonical_remainder - 0012
specialize remainder_decomposition_to_mod_eq p - 0013
specialize remainder_decomposition_to_mod_eq (a * x) - 0014
specialize remainder_decomposition_to_mod_eq q - 0015
specialize remainder_decomposition_to_mod_eq r - 0016
apply remainder_decomposition_to_mod_eq - 0017
exact hdecomp - 0018
have hsplit : Le(r,h) ∨ Lt(h,r)Exact native replay line
have hsplit : (exists d. d + r = h) \/ (exists d. d + S h = r) - 0019
specialize le_or_lt r - 0020
specialize le_or_lt h - 0021
exact le_or_lt - 0022
cases hsplit - 0023
exists r - 0024
split - 0025
specialize one_le_of_ne_zero r - 0026
apply one_le_of_ne_zero - 0027
exact hr0 - 0028
split - 0029
exact hsplit_left - 0030
left - 0031
exact hcanonical - 0032
have hreflection : ∃ m. Lt(0,m) ∧ (Le(m,h) ∧ r + m = p)Exact native replay line
have hreflection : exists m. (exists gsh_lt_gap_reflection_positive. gsh_lt_gap_reflection_positive + S 0 = m) /\ ((exists gsh_le_gap_reflection_bounded. gsh_le_gap_reflection_bounded + m = h) /\ r + m = p) - 0033
specialize odd_upper_remainder_reflection p - 0034
specialize odd_upper_remainder_reflection h - 0035
specialize odd_upper_remainder_reflection r - 0036
apply odd_upper_remainder_reflection - 0037
exact hp - 0038
exact hrp - 0039
exact hsplit_right - 0040
cases hreflection - 0041
cases hreflection_witness - 0042
cases hreflection_witness_right - 0043
have hreflected_remainder : ModEq(p,r,2 · h · x1)Exact native replay line
have hreflected_remainder : exists gsh_mod_left_reflected_remainder gsh_mod_right_reflected_remainder. (r) + p * gsh_mod_left_reflected_remainder = ((2 * h) * x1) + p * gsh_mod_right_reflected_remainder - 0044
exists x1 - 0045
exists 1 - 0046
trans (r + x1) + (2 * h) * x1 - 0047
rewrite hp - 0048
trans r + (x1 + (2 * h) * x1) - 0049
simp - 0050
specialize mul_succ_left (2 * h) - 0051
specialize mul_succ_left x1 - 0052
rewrite mul_succ_left - 0053
congr - 0054
refl - 0055
apply add_comm - 0056
symm - 0057
apply add_assoc - 0058
rewrite hreflection_witness_right_right - 0059
specialize mul_one p - 0060
rewrite mul_one - 0061
apply add_comm - 0062
have hreflected_product : ModEq(p,a · x,2 · h · x1)Exact native replay line
have hreflected_product : exists gsh_mod_left_reflected_product gsh_mod_right_reflected_product. (a * x) + p * gsh_mod_left_reflected_product = ((2 * h) * x1) + p * gsh_mod_right_reflected_product - 0063
specialize mod_eq_trans p - 0064
specialize mod_eq_trans (a * x) - 0065
specialize mod_eq_trans r - 0066
specialize mod_eq_trans ((2 * h) * x1) - 0067
apply mod_eq_trans - 0068
exact hcanonical - 0069
exact hreflected_remainder - 0070
exists x1 - 0071
split - 0072
exact hreflection_witness_left - 0073
split - 0074
exact hreflection_witness_right_left - 0075
right - 0076
exact hreflected_product