Exact expanded 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))Structural proof guide
Bounded Euclidean descent simultaneously constructs a relational gcd and balanced natural Bezout witnesses.
Direct prerequisites: zero_add, le_zero, le_eq_or_lt, le_of_succ_le_succ, division_remainder_exists, is_gcd_zero_right, is_gcd_euclid_forward, balanced_bezout_euclid_step. The authored body proceeds by structural induction (1), case analysis (10), intermediate claims (9), equality transport (4).
Proof neighborhood
Direct dependencies
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 dependents
Formal native tactic body
Dependencies are hypotheses of this body receipt. The focused endpoint audits separately check the complete empty-context certificates.
- 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 \/ 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 : 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 : 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 : 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 : 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 : exists k. k + b = B - 0073
apply le_of_succ_le_succ - 0074
exact hsplit_right - 0075
specialize IH b - 0076
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