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
∀ d. ∀ n. ∀ q. ∀ r. ∀ Q. ∀ R. DivRem(n,d,q,r) → DivRem(n + n,d,Q,R) → Q = q + q ∨ Q = S (q + q)Every purple notation token opens its conservative definition. Expanding the displayed statement recovers the exact first-order Peano-arithmetic formula checked by the unchanged kernel.
Definitions used by this theorem
In the theorem statement
2 occurrences
In local proof propositions
4 occurrences
Exact expanded native-PA statement
forall d n q r Q R. (((n) = (d) * (q) + (r) /\ (exists bcf_lt_gap_bddqb_source_bound. bcf_lt_gap_bddqb_source_bound + S (r) = d))) -> (((n + n) = (d) * (Q) + (R) /\ (exists bcf_lt_gap_bddqb_double_bound. bcf_lt_gap_bddqb_double_bound + S (R) = d))) -> (Q = q + q \/ Q = S (q + q))Proof neighborhood
Direct theorem prerequisites
BT001G le_or_lt BT001C le_eq_or_lt BT001I lt_not_le BT000W zero_le BT0010 one_le_of_ne_zero BT00MY add_shuffle_middle BT0007 mul_add BT0003 add_assoc BT0002 add_comm BT00XB add_lt_add BT00XC add_lt_cancel_left BT001U division_remainder_uniqueDirect theorem dependents
Definition-aware tactic body
Only local propositions introduced by have or suffices are compacted. Every changed line has an exact-AST conservative-expansion receipt; the kernel still receives the immutable original tactic script.
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 (12)
01Fix variables and assumptionsL1–8
02Separate the logical casesL9–10
03Establish hdouble_eqL11–20
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply add shuffle middle.
04Use earlier factsL21–21
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L21
specialize le_or_lt d
05Separate the logical casesL22–22
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L22
cases le_or_lt
06Establish hsplitL23–27
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply le eq or lt.
- L23
have hsplit : r + r = d ∨ Lt(r + r,d)Definitions: Lt(r + r,d)Original native command in the exact edition - L24
specialize le_eq_or_lt (r + r) - L25
specialize le_eq_or_lt d - L26
apply le_eq_or_lt - L27
exact le_or_lt_left
07Separate the logical casesL28–28
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L28
cases hsplit
08Establish hd0L29–37
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply lt not le.
09Establish hzero_boundL38–41
10Establish hcandidate_eqL42–50
11Establish huniqueL51–60
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply division remainder unique.
- L51
have hunique : Q = S (q + q) /\ R = 0 - L52
specialize division_remainder_unique d - L53
specialize division_remainder_unique (n + n) - L54
specialize division_remainder_unique Q - L55
specialize division_remainder_unique R - L56
specialize division_remainder_unique (S (q + q)) - L57
specialize division_remainder_unique 0 - L58
apply division_remainder_unique - L59
exact hdouble_left - L60
exact hdouble_right
12Use earlier factsL61–62
13Separate the logical casesL63–64
14Use earlier factsL65–65
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L65
exact hunique_left
15Establish huniqueL66–75
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply division remainder unique.
- L66
have hunique : Q = q + q /\ R = r + r - L67
specialize division_remainder_unique d - L68
specialize division_remainder_unique (n + n) - L69
specialize division_remainder_unique Q - L70
specialize division_remainder_unique R - L71
specialize division_remainder_unique (q + q) - L72
specialize division_remainder_unique (r + r) - L73
apply division_remainder_unique - L74
exact hdouble_left - L75
exact hdouble_right
16Use earlier factsL76–77
17Separate the logical casesL78–79
18Use earlier factsL80–80
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L80
exact hunique_left
19Separate the logical casesL81–81
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L81
cases le_or_lt_right
20Establish hrrL82–91
21Use earlier factsL92–92
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L92
apply PA4
22Establish hsum_ltL93–101
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply add lt add.
23Establish hcarry_boundL102–107
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply add lt cancel left.
24Establish hcandidate_eqL108–117
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply add assoc.
25Calculate and transport equalitiesL118–118
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L118
refl
26Establish huniqueL119–128
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply division remainder unique.
- L119
have hunique : Q = S (q + q) /\ R = S x - L120
specialize division_remainder_unique d - L121
specialize division_remainder_unique (n + n) - L122
specialize division_remainder_unique Q - L123
specialize division_remainder_unique R - L124
specialize division_remainder_unique (S (q + q)) - L125
specialize division_remainder_unique (S x) - L126
apply division_remainder_unique - L127
exact hdouble_left - L128
exact hdouble_right
27Use earlier factsL129–130
28Separate the logical casesL131–132
29Use earlier factsL133–133
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L133
exact hunique_left
Original defined command ledger · 133 lines
- 0001
intro d - 0002
intro n - 0003
intro q - 0004
intro r - 0005
intro Q - 0006
intro R - 0007
intro hsource - 0008
intro hdouble - 0009
cases hsource - 0010
cases hdouble - 0011
have hdouble_eq : n + n = d * (q + q) + (r + r) - 0012
rewrite hsource_left - 0013
rewrite hsource_left - 0014
trans (d * q + d * q) + (r + r) - 0015
apply add_shuffle_middle - 0016
congr - 0017
symm - 0018
apply mul_add - 0019
refl - 0020
specialize le_or_lt (r + r) - 0021
specialize le_or_lt d - 0022
cases le_or_lt - 0023
have hsplit : r + r = d ∨ Lt(r + r,d)Exact native replay line
have hsplit : r + r = d \/ exists k. k + S (r + r) = d - 0024
specialize le_eq_or_lt (r + r) - 0025
specialize le_eq_or_lt d - 0026
apply le_eq_or_lt - 0027
exact le_or_lt_left - 0028
cases hsplit - 0029
have hd0 : ~(d = 0) - 0030
intro hd - 0031
rewrite hd at hsource_right - 0032
specialize lt_not_le r - 0033
specialize lt_not_le 0 - 0034
apply lt_not_le - 0035
exact hsource_right - 0036
specialize zero_le r - 0037
exact zero_le - 0038
have hzero_bound : Lt(0,d)Exact native replay line
have hzero_bound : exists k. k + S 0 = d - 0039
specialize one_le_of_ne_zero d - 0040
apply one_le_of_ne_zero - 0041
exact hd0 - 0042
have hcandidate_eq : n + n = d * S (q + q) + 0 - 0043
trans d * (q + q) + (r + r) - 0044
exact hdouble_eq - 0045
rewrite hsplit_left - 0046
trans d * S (q + q) - 0047
symm - 0048
apply PA6 - 0049
symm - 0050
apply PA3 - 0051
have hunique : Q = S (q + q) /\ R = 0 - 0052
specialize division_remainder_unique d - 0053
specialize division_remainder_unique (n + n) - 0054
specialize division_remainder_unique Q - 0055
specialize division_remainder_unique R - 0056
specialize division_remainder_unique (S (q + q)) - 0057
specialize division_remainder_unique 0 - 0058
apply division_remainder_unique - 0059
exact hdouble_left - 0060
exact hdouble_right - 0061
exact hcandidate_eq - 0062
exact hzero_bound - 0063
cases hunique - 0064
right - 0065
exact hunique_left - 0066
have hunique : Q = q + q /\ R = r + r - 0067
specialize division_remainder_unique d - 0068
specialize division_remainder_unique (n + n) - 0069
specialize division_remainder_unique Q - 0070
specialize division_remainder_unique R - 0071
specialize division_remainder_unique (q + q) - 0072
specialize division_remainder_unique (r + r) - 0073
apply division_remainder_unique - 0074
exact hdouble_left - 0075
exact hdouble_right - 0076
exact hdouble_eq - 0077
exact hsplit_right - 0078
cases hunique - 0079
left - 0080
exact hunique_left - 0081
cases le_or_lt_right - 0082
have hrr : r + r = d + S x - 0083
trans x + S d - 0084
symm - 0085
exact le_or_lt_right_witness - 0086
trans S (x + d) - 0087
apply PA4 - 0088
trans S (d + x) - 0089
congr - 0090
apply add_comm - 0091
symm - 0092
apply PA4 - 0093
have hsum_lt : Lt(r + r,d + d)Exact native replay line
have hsum_lt : exists k. k + S (r + r) = d + d - 0094
specialize add_lt_add r - 0095
specialize add_lt_add d - 0096
specialize add_lt_add r - 0097
specialize add_lt_add d - 0098
apply add_lt_add - 0099
exact hsource_right - 0100
exact hsource_right - 0101
rewrite hrr at hsum_lt - 0102
have hcarry_bound : Lt(S x,d)Exact native replay line
have hcarry_bound : exists k. k + S (S x) = d - 0103
specialize add_lt_cancel_left d - 0104
specialize add_lt_cancel_left (S x) - 0105
specialize add_lt_cancel_left d - 0106
apply add_lt_cancel_left - 0107
exact hsum_lt - 0108
have hcandidate_eq : n + n = d * S (q + q) + S x - 0109
trans d * (q + q) + (r + r) - 0110
exact hdouble_eq - 0111
rewrite hrr - 0112
trans (d * (q + q) + d) + S x - 0113
symm - 0114
apply add_assoc - 0115
congr - 0116
symm - 0117
apply PA6 - 0118
refl - 0119
have hunique : Q = S (q + q) /\ R = S x - 0120
specialize division_remainder_unique d - 0121
specialize division_remainder_unique (n + n) - 0122
specialize division_remainder_unique Q - 0123
specialize division_remainder_unique R - 0124
specialize division_remainder_unique (S (q + q)) - 0125
specialize division_remainder_unique (S x) - 0126
apply division_remainder_unique - 0127
exact hdouble_left - 0128
exact hdouble_right - 0129
exact hcandidate_eq - 0130
exact hcarry_bound - 0131
cases hunique - 0132
right - 0133
exact hunique_left