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. ∀ a. ∀ b. ∀ q. ∀ r. ∀ s. ∀ t. ∀ Q. ∀ R. DivRem(a,d,q,r) → DivRem(b,d,s,t) → DivRem(a + b,d,Q,R) → Q = q + s ∨ Q = S (q + s)Every purple notation token opens its conservative definition. This reading surface never changes the unchanged intuitionistic kernel or confers checked-use authority.
Definitions used by this theorem
In the theorem statement
In local proof propositions
Exact expanded first-order statement
forall d a b q r s t Q R. (((a) = (d) * (q) + (r) /\ (exists bcf_lt_gap_kmvadqb_left_bound. bcf_lt_gap_kmvadqb_left_bound + S (r) = d))) -> (((b) = (d) * (s) + (t) /\ (exists bcf_lt_gap_kmvadqb_right_bound. bcf_lt_gap_kmvadqb_right_bound + S (t) = d))) -> (((a + b) = (d) * (Q) + (R) /\ (exists bcf_lt_gap_kmvadqb_total_bound. bcf_lt_gap_kmvadqb_total_bound + S (R) = d))) -> (Q = q + s \/ Q = S (q + s))Proof neighborhood
Direct theorem prerequisites
Direct theorem dependents
Definition-aware tactic body
Only propositions whose conservative expansion has been checked for exact first-order equivalence are compacted. Every changed line retains its immutable exact replay 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.
01Fix variables and assumptionsL1–10
02Fix variables and assumptionsL11–12
03Separate the logical casesL13–15
04Establish hsum_eqL16–25
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply add shuffle middle.
05Use earlier factsL26–26
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L26
specialize le_or_lt d
06Separate the logical casesL27–27
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L27
cases le_or_lt
07Establish hsplitL28–32
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply le eq or lt.
- L28
have hsplit : r + t = d ∨ Lt(r + t,d)Definitions: Lt(r + t,d)Original native command in the exact edition - L29
specialize le_eq_or_lt (r + t) - L30
specialize le_eq_or_lt d - L31
apply le_eq_or_lt - L32
exact le_or_lt_left
08Separate the logical casesL33–33
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L33
cases hsplit
09Establish hd0L34–42
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply lt not le.
10Establish hzero_boundL43–46
11Establish hcandidate_eqL47–55
12Establish huniqueL56–65
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply division remainder unique.
- L56
have hunique : Q = S (q + s) /\ R = 0 - L57
specialize division_remainder_unique d - L58
specialize division_remainder_unique (a + b) - L59
specialize division_remainder_unique Q - L60
specialize division_remainder_unique R - L61
specialize division_remainder_unique (S (q + s)) - L62
specialize division_remainder_unique 0 - L63
apply division_remainder_unique - L64
exact htotal_left - L65
exact htotal_right
13Use earlier factsL66–67
14Separate the logical casesL68–69
15Use earlier factsL70–70
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L70
exact hunique_left
16Establish huniqueL71–80
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply division remainder unique.
- L71
have hunique : Q = q + s /\ R = r + t - L72
specialize division_remainder_unique d - L73
specialize division_remainder_unique (a + b) - L74
specialize division_remainder_unique Q - L75
specialize division_remainder_unique R - L76
specialize division_remainder_unique (q + s) - L77
specialize division_remainder_unique (r + t) - L78
apply division_remainder_unique - L79
exact htotal_left - L80
exact htotal_right
17Use earlier factsL81–82
18Separate the logical casesL83–84
19Use earlier factsL85–85
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L85
exact hunique_left
20Separate the logical casesL86–86
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L86
cases le_or_lt_right
21Establish hremaindersL87–96
22Use earlier factsL97–97
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L97
apply PA4
23Establish hsum_ltL98–106
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply add lt add.
- L98
have hsum_lt : Lt(r + t,d + d)Definitions: Lt(r + t,d + d)Original native command in the exact edition - L99
specialize add_lt_add r - L100
specialize add_lt_add d - L101
specialize add_lt_add t - L102
specialize add_lt_add d - L103
apply add_lt_add - L104
exact hleft_right - L105
exact hright_right - L106
rewrite hremainders at hsum_lt
24Establish hcarry_boundL107–112
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply add lt cancel left.
25Establish hcandidate_eqL113–122
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply add assoc.
26Calculate and transport equalitiesL123–123
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L123
refl
27Establish huniqueL124–133
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply division remainder unique.
- L124
have hunique : Q = S (q + s) /\ R = S x - L125
specialize division_remainder_unique d - L126
specialize division_remainder_unique (a + b) - L127
specialize division_remainder_unique Q - L128
specialize division_remainder_unique R - L129
specialize division_remainder_unique (S (q + s)) - L130
specialize division_remainder_unique (S x) - L131
apply division_remainder_unique - L132
exact htotal_left - L133
exact htotal_right
28Use earlier factsL134–135
29Separate the logical casesL136–137
30Use earlier factsL138–138
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L138
exact hunique_left
Original defined command ledger · 138 lines
- 0001
intro d - 0002
intro a - 0003
intro b - 0004
intro q - 0005
intro r - 0006
intro s - 0007
intro t - 0008
intro Q - 0009
intro R - 0010
intro hleft - 0011
intro hright - 0012
intro htotal - 0013
cases hleft - 0014
cases hright - 0015
cases htotal - 0016
have hsum_eq : a + b = d * (q + s) + (r + t) - 0017
rewrite hleft_left - 0018
rewrite hright_left - 0019
trans (d * q + d * s) + (r + t) - 0020
apply add_shuffle_middle - 0021
congr - 0022
symm - 0023
apply mul_add - 0024
refl - 0025
specialize le_or_lt (r + t) - 0026
specialize le_or_lt d - 0027
cases le_or_lt - 0028
have hsplit : r + t = d ∨ Lt(r + t,d)Exact native replay line
have hsplit : r + t = d \/ exists z. z + S (r + t) = d - 0029
specialize le_eq_or_lt (r + t) - 0030
specialize le_eq_or_lt d - 0031
apply le_eq_or_lt - 0032
exact le_or_lt_left - 0033
cases hsplit - 0034
have hd0 : ~(d = 0) - 0035
intro hd - 0036
rewrite hd at hleft_right - 0037
specialize lt_not_le r - 0038
specialize lt_not_le 0 - 0039
apply lt_not_le - 0040
exact hleft_right - 0041
specialize zero_le r - 0042
exact zero_le - 0043
have hzero_bound : Lt(0,d)Exact native replay line
have hzero_bound : exists z. z + S 0 = d - 0044
specialize one_le_of_ne_zero d - 0045
apply one_le_of_ne_zero - 0046
exact hd0 - 0047
have hcandidate_eq : a + b = d * S (q + s) + 0 - 0048
trans d * (q + s) + (r + t) - 0049
exact hsum_eq - 0050
rewrite hsplit_left - 0051
trans d * S (q + s) - 0052
symm - 0053
apply PA6 - 0054
symm - 0055
apply PA3 - 0056
have hunique : Q = S (q + s) /\ R = 0 - 0057
specialize division_remainder_unique d - 0058
specialize division_remainder_unique (a + b) - 0059
specialize division_remainder_unique Q - 0060
specialize division_remainder_unique R - 0061
specialize division_remainder_unique (S (q + s)) - 0062
specialize division_remainder_unique 0 - 0063
apply division_remainder_unique - 0064
exact htotal_left - 0065
exact htotal_right - 0066
exact hcandidate_eq - 0067
exact hzero_bound - 0068
cases hunique - 0069
right - 0070
exact hunique_left - 0071
have hunique : Q = q + s /\ R = r + t - 0072
specialize division_remainder_unique d - 0073
specialize division_remainder_unique (a + b) - 0074
specialize division_remainder_unique Q - 0075
specialize division_remainder_unique R - 0076
specialize division_remainder_unique (q + s) - 0077
specialize division_remainder_unique (r + t) - 0078
apply division_remainder_unique - 0079
exact htotal_left - 0080
exact htotal_right - 0081
exact hsum_eq - 0082
exact hsplit_right - 0083
cases hunique - 0084
left - 0085
exact hunique_left - 0086
cases le_or_lt_right - 0087
have hremainders : r + t = d + S x - 0088
trans x + S d - 0089
symm - 0090
exact le_or_lt_right_witness - 0091
trans S (x + d) - 0092
apply PA4 - 0093
trans S (d + x) - 0094
congr - 0095
apply add_comm - 0096
symm - 0097
apply PA4 - 0098
have hsum_lt : Lt(r + t,d + d)Exact native replay line
have hsum_lt : exists z. z + S (r + t) = d + d - 0099
specialize add_lt_add r - 0100
specialize add_lt_add d - 0101
specialize add_lt_add t - 0102
specialize add_lt_add d - 0103
apply add_lt_add - 0104
exact hleft_right - 0105
exact hright_right - 0106
rewrite hremainders at hsum_lt - 0107
have hcarry_bound : Lt(S x,d)Exact native replay line
have hcarry_bound : exists z. z + S (S x) = d - 0108
specialize add_lt_cancel_left d - 0109
specialize add_lt_cancel_left (S x) - 0110
specialize add_lt_cancel_left d - 0111
apply add_lt_cancel_left - 0112
exact hsum_lt - 0113
have hcandidate_eq : a + b = d * S (q + s) + S x - 0114
trans d * (q + s) + (r + t) - 0115
exact hsum_eq - 0116
rewrite hremainders - 0117
trans (d * (q + s) + d) + S x - 0118
symm - 0119
apply add_assoc - 0120
congr - 0121
symm - 0122
apply PA6 - 0123
refl - 0124
have hunique : Q = S (q + s) /\ R = S x - 0125
specialize division_remainder_unique d - 0126
specialize division_remainder_unique (a + b) - 0127
specialize division_remainder_unique Q - 0128
specialize division_remainder_unique R - 0129
specialize division_remainder_unique (S (q + s)) - 0130
specialize division_remainder_unique (S x) - 0131
apply division_remainder_unique - 0132
exact htotal_left - 0133
exact htotal_right - 0134
exact hcandidate_eq - 0135
exact hcarry_bound - 0136
cases hunique - 0137
right - 0138
exact hunique_left