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)Structural proof guide
Bounded induction constructs a relational gcd whenever the right input is at most the bound.
Direct prerequisites: multiple_refl, le_zero, le_eq_or_lt, le_of_succ_le_succ, division_remainder_exists, is_gcd_euclid_forward. The authored body proceeds by structural induction (1), case analysis (5), intermediate claims (9), equality transport (1).
Proof neighborhood
Direct dependencies
BT0028 multiple_refl BT000Y le_zero BT001C le_eq_or_lt BT0017 le_of_succ_le_succ BT001P division_remainder_exists BT002S is_gcd_euclid_forwardDirect 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
split - 0012
specialize multiple_refl a - 0013
exact multiple_refl - 0014
exists 0 - 0015
trans 0 - 0016
exact hb0 - 0017
symm - 0018
apply PA5 - 0019
intro c - 0020
intro hca - 0021
intro hcb - 0022
exact hca - 0023
intro b - 0024
intro hb - 0025
intro a - 0026
specialize le_eq_or_lt b - 0027
specialize le_eq_or_lt (S B) - 0028
have hsplit : b = S B \/ exists k. k + S b = S B - 0029
apply le_eq_or_lt - 0030
exact hb - 0031
cases hsplit - 0032
have hb0 : ~(b = 0) - 0033
intro hzero - 0034
apply PA1 - 0035
trans b - 0036
symm - 0037
exact hsplit_left - 0038
exact hzero - 0039
have hdiv : exists q r. a = b * q + r /\ exists k. k + S r = b - 0040
apply division_remainder_exists - 0041
exact hb0 - 0042
cases hdiv - 0043
cases hdiv_witness - 0044
cases hdiv_witness_witness - 0045
have hrB : exists k. k + x1 = B - 0046
apply le_of_succ_le_succ - 0047
rewrite hsplit_left at hdiv_witness_witness_right - 0048
exact hdiv_witness_witness_right - 0049
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) - 0050
specialize IH x1 - 0051
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) - 0052
apply IH - 0053
exact hrB - 0054
specialize hall b - 0055
exact hall - 0056
cases hsmall - 0057
exists x2 - 0058
specialize is_gcd_euclid_forward x2 - 0059
specialize is_gcd_euclid_forward a - 0060
specialize is_gcd_euclid_forward b - 0061
specialize is_gcd_euclid_forward x - 0062
specialize is_gcd_euclid_forward x1 - 0063
apply is_gcd_euclid_forward - 0064
exact hdiv_witness_witness_left - 0065
exact hsmall_witness - 0066
have hbB : exists k. k + b = B - 0067
apply le_of_succ_le_succ - 0068
exact hsplit_right - 0069
specialize IH b - 0070
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) - 0071
apply IH - 0072
exact hbB - 0073
specialize hall a - 0074
exact hall