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
∀ B. ∀ b. Le(b,B) → ∀ x. ∃ y. IsGCD(y,x,b) ∧ (∃ z. ∃ n. ∃ m. ∃ k. x · z + b · n = y + (x · m + b · k))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
7 occurrences
Exact expanded native-PA statement
forall B b. (exists t. t + b = B) -> forall a. exists d. ((((exists x. a = d * x) /\ (exists y. b = d * y)) /\ forall c. (exists u. a = c * u) -> (exists v. b = c * v) -> exists w. d = c * w) /\ exists xp yp xn yn. a * xp + b * yp = d + (a * xn + b * yn))Proof neighborhood
Direct theorem prerequisites
BT0000 zero_add BT000Y le_zero BT001C le_eq_or_lt BT0017 le_of_succ_le_succ BT001P division_remainder_exists BT002L is_gcd_zero_right BT002S is_gcd_euclid_forward BT0033 balanced_bezout_euclid_stepDirect 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 (7)
01Fix variables and assumptionsL1–1
Work with arbitrary variables or the premises of the current implication.
- L1
intro B
02Induction on BL2–5
03Establish hb0L6–8
04Construct an explicit witnessL9–9
Supply the displayed value, then prove that it has the required property.
- L9
exists a
05Separate the logical casesL10–10
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L10
split
06Calculate and transport equalitiesL11–12
07Use earlier factsL13–14
08Construct an explicit witnessL15–18
09Calculate and transport equalitiesL19–20
10Fix variables and assumptionsL21–23
11Use earlier factsL24–25
12Establish hsplitL26–28
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply le eq or lt.
13Separate the logical casesL29–29
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L29
cases hsplit
14Establish hb0L30–36
15Establish hdivL37–39
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply division remainder exists.
- L37
have hdiv : ∃ q. ∃ r. DivRem(a,b,q,r)Definitions: DivRem(a,b,q,r)Original native command in the exact edition - L38
apply division_remainder_exists - L39
exact hb0
16Separate the logical casesL40–42
17Establish hrBL43–46
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply le of succ le succ.
18Establish hsmallL47–48
Establish this local claim before using it. It is not an additional assumption.
- L47
have hsmall : ∃ d. IsGCD(d,b,x1) ∧ (∃ x. ∃ y. ∃ z. ∃ n. b · x + x1 · y = d + (b · z + x1 · n))Definitions: IsGCD(d,b,x1)Original native command in the exact edition - L48
specialize IH x1
19Establish hallL49–53
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply IH.
- L49
have hall : ∀ z. ∃ d. IsGCD(d,z,x1) ∧ (∃ x. ∃ y. ∃ n. ∃ m. z · x + x1 · y = d + (z · n + x1 · m))Definitions: IsGCD(d,z,x1)Original native command in the exact edition - L50
apply IH - L51
exact hrB - L52
specialize hall b - L53
exact hall
20Separate the logical casesL54–59
21Construct an explicit witnessL60–60
Supply the displayed value, then prove that it has the required property.
- L60
exists x2
22Separate the logical casesL61–61
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L61
split
23Use earlier factsL62–64
24Construct an explicit witnessL65–68
25Use earlier factsL69–71
26Establish hbBL72–75
27Establish hallL76–80
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply IH.
- L76
have hall : ∀ z. ∃ d. IsGCD(d,z,b) ∧ (∃ x. ∃ y. ∃ n. ∃ m. z · x + b · y = d + (z · n + b · m))Definitions: IsGCD(d,z,b)Original native command in the exact edition - L77
apply IH - L78
exact hbB - L79
specialize hall a - L80
exact hall
Original defined command ledger · 80 lines
- 0001
intro B - 0002
induction B - 0003
intro b - 0004
intro hb - 0005
intro a - 0006
have hb0 : b = 0 - 0007
apply le_zero - 0008
exact hb - 0009
exists a - 0010
split - 0011
rewrite hb0 - 0012
rewrite hb0 - 0013
specialize is_gcd_zero_right a - 0014
exact is_gcd_zero_right - 0015
exists 1 - 0016
exists 0 - 0017
exists 0 - 0018
exists 0 - 0019
rewrite hb0 - 0020
simp [zero_add] - 0021
intro b - 0022
intro hb - 0023
intro a - 0024
specialize le_eq_or_lt b - 0025
specialize le_eq_or_lt (S B) - 0026
have hsplit : b = S B ∨ Lt(b,S B)Exact native replay line
have hsplit : b = S B \/ exists k. k + S b = S B - 0027
apply le_eq_or_lt - 0028
exact hb - 0029
cases hsplit - 0030
have hb0 : ~(b = 0) - 0031
intro hzero - 0032
apply PA1 - 0033
trans b - 0034
symm - 0035
exact hsplit_left - 0036
exact hzero - 0037
have hdiv : ∃ q. ∃ r. DivRem(a,b,q,r)Exact native replay line
have hdiv : exists q r. a = b * q + r /\ exists k. k + S r = b - 0038
apply division_remainder_exists - 0039
exact hb0 - 0040
cases hdiv - 0041
cases hdiv_witness - 0042
cases hdiv_witness_witness - 0043
have hrB : Le(x1,B)Exact native replay line
have hrB : exists k. k + x1 = B - 0044
apply le_of_succ_le_succ - 0045
rewrite hsplit_left at hdiv_witness_witness_right - 0046
exact hdiv_witness_witness_right - 0047
have hsmall : ∃ d. IsGCD(d,b,x1) ∧ (∃ x. ∃ y. ∃ z. ∃ n. b · x + x1 · y = d + (b · z + x1 · n))Exact native replay line
have hsmall : exists d. ((((exists u. b = d * u) /\ (exists v. x1 = d * v)) /\ forall c. (exists s. b = c * s) -> (exists t. x1 = c * t) -> exists w. d = c * w) /\ exists xp yp xn yn. b * xp + x1 * yp = d + (b * xn + x1 * yn)) - 0048
specialize IH x1 - 0049
have hall : ∀ z. ∃ d. IsGCD(d,z,x1) ∧ (∃ x. ∃ y. ∃ n. ∃ m. z · x + x1 · y = d + (z · n + x1 · m))Exact native replay line
have hall : forall z. exists d. ((((exists u. z = d * u) /\ (exists v. x1 = d * v)) /\ forall c. (exists s. z = c * s) -> (exists t. x1 = c * t) -> exists w. d = c * w) /\ exists xp yp xn yn. z * xp + x1 * yp = d + (z * xn + x1 * yn)) - 0050
apply IH - 0051
exact hrB - 0052
specialize hall b - 0053
exact hall - 0054
cases hsmall - 0055
cases hsmall_witness - 0056
cases hsmall_witness_right - 0057
cases hsmall_witness_right_witness - 0058
cases hsmall_witness_right_witness_witness - 0059
cases hsmall_witness_right_witness_witness_witness - 0060
exists x2 - 0061
split - 0062
apply is_gcd_euclid_forward - 0063
exact hdiv_witness_witness_left - 0064
exact hsmall_witness_left - 0065
exists x4 - 0066
exists x3 + x * x6 - 0067
exists x6 - 0068
exists x5 + x * x4 - 0069
apply balanced_bezout_euclid_step - 0070
exact hdiv_witness_witness_left - 0071
exact hsmall_witness_right_witness_witness_witness_witness - 0072
have hbB : Le(b,B)Exact native replay line
have hbB : exists k. k + b = B - 0073
apply le_of_succ_le_succ - 0074
exact hsplit_right - 0075
specialize IH b - 0076
have hall : ∀ z. ∃ d. IsGCD(d,z,b) ∧ (∃ x. ∃ y. ∃ n. ∃ m. z · x + b · y = d + (z · n + b · m))Exact native replay line
have hall : forall z. exists d. ((((exists u. z = d * u) /\ (exists v. b = d * v)) /\ forall c. (exists s. z = c * s) -> (exists t. b = c * t) -> exists w. d = c * w) /\ exists xp yp xn yn. z * xp + b * yp = d + (z * xn + b * yn)) - 0077
apply IH - 0078
exact hbB - 0079
specialize hall a - 0080
exact hall