Exact expanded PA statement
forall B n. ~(n = 0) -> ((forall c d. (exists k. k + c = B) -> n = c * d -> c = 1 \/ d = 1) \/ exists c d. ((((exists k. k + c = B) /\ ~(c = 1)) /\ ~(d = 1)) /\ n = c * d))Structural proof guide
Constructively decide whether a nonzero natural has a bounded nontrivial factor pair.
Direct prerequisites: mul_zero_left, succ_ne_zero, le_zero, le_refl, le_succ, mul_left_cancel_nonzero, eq_decidable, multiple_decidable_nonzero, factor_property_succ. The authored body proceeds by structural induction (1), case analysis (10), intermediate claims (6), equality transport (1).
Proof neighborhood
Direct dependencies
BT0004 mul_zero_left BT000C succ_ne_zero BT000Y le_zero BT000E le_refl BT0018 le_succ BT0022 mul_left_cancel_nonzero BT003A eq_decidable BT003B multiple_decidable_nonzero BT003D factor_property_succDirect 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 n - 0004
intro hn - 0005
left - 0006
intro c - 0007
intro d - 0008
intro hc - 0009
intro hfac - 0010
have hc0 : c = 0 - 0011
apply le_zero - 0012
exact hc - 0013
exfalso - 0014
apply hn - 0015
trans c * d - 0016
exact hfac - 0017
rewrite hc0 - 0018
apply mul_zero_left - 0019
intro n - 0020
intro hn - 0021
specialize IH n - 0022
have hprev : (forall c d. (exists k. k + c = B) -> n = c * d -> c = 1 \/ d = 1) \/ exists c d. ((((exists k. k + c = B) /\ ~(c = 1)) /\ ~(d = 1)) /\ n = c * d) - 0023
apply IH - 0024
exact hn - 0025
cases hprev - 0026
have hs0 : ~(S B = 0) - 0027
specialize succ_ne_zero B - 0028
exact succ_ne_zero - 0029
specialize multiple_decidable_nonzero (S B) - 0030
specialize multiple_decidable_nonzero n - 0031
have hdiv : (exists q. n = S B * q) \/ ~(exists q. n = S B * q) - 0032
apply multiple_decidable_nonzero - 0033
exact hs0 - 0034
cases hdiv - 0035
cases hdiv_left - 0036
specialize eq_decidable (S B) - 0037
specialize eq_decidable 1 - 0038
have hc1 : S B = 1 \/ ~(S B = 1) - 0039
apply eq_decidable - 0040
cases hc1 - 0041
left - 0042
apply factor_property_succ - 0043
exact hprev_left - 0044
intro d - 0045
intro hboundary - 0046
left - 0047
exact hc1_left - 0048
specialize eq_decidable_before x - 0049
specialize eq_decidable_before 1 - 0050
have hq1 : x = 1 \/ ~(x = 1) - 0051
apply eq_decidable_before - 0052
cases hq1 - 0053
left - 0054
apply factor_property_succ - 0055
exact hprev_left - 0056
intro d - 0057
intro hboundary - 0058
right - 0059
trans x - 0060
apply mul_left_cancel_nonzero - 0061
exact hs0 - 0062
trans n - 0063
symm - 0064
exact hboundary - 0065
exact hdiv_left_witness - 0066
exact hq1_left - 0067
right - 0068
exists S B - 0069
exists x - 0070
split - 0071
split - 0072
split - 0073
apply le_refl - 0074
exact hc1_right - 0075
exact hq1_right - 0076
exact hdiv_left_witness - 0077
left - 0078
apply factor_property_succ - 0079
exact hprev_left - 0080
intro d - 0081
intro hboundary - 0082
exfalso - 0083
apply hdiv_right - 0084
exists d - 0085
exact hboundary - 0086
right - 0087
cases hprev_right - 0088
cases hprev_right_witness - 0089
cases hprev_right_witness_witness - 0090
cases hprev_right_witness_witness_left - 0091
cases hprev_right_witness_witness_left_left - 0092
exists x - 0093
exists x1 - 0094
split - 0095
split - 0096
split - 0097
apply le_succ - 0098
exact hprev_right_witness_witness_left_left_left - 0099
exact hprev_right_witness_witness_left_left_right - 0100
exact hprev_right_witness_witness_left_right - 0101
exact hprev_right_witness_witness_right