Exact expanded PA statement
forall d n q r z s. (((n) = (d) * (q) + (r) /\ exists blsr_lt_gap_successor_cases_old_bound. blsr_lt_gap_successor_cases_old_bound + S (r) = (d))) -> (((S n) = (d) * (z) + (s) /\ exists blsr_lt_gap_successor_cases_new_bound. blsr_lt_gap_successor_cases_new_bound + S (s) = (d))) -> ((S r = d /\ (z = S q /\ s = 0)) \/ ((exists blsr_lt_gap_successor_cases_no_carry. blsr_lt_gap_successor_cases_no_carry + S (S r) = (d)) /\ (z = q /\ s = S r)))Structural proof guide
Successor division has exactly the carry and no-carry quotient cases.
Direct prerequisites: le_eq_or_lt, division_remainder_unique. The authored body proceeds by case analysis (3), intermediate claims (6), equality transport (4).
Proof neighborhood
Direct dependencies
Direct 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 d - 0002
intro n - 0003
intro q - 0004
intro r - 0005
intro z - 0006
intro s - 0007
intro hold - 0008
intro hnew - 0009
cases hold - 0010
cases hnew - 0011
have hsplit : S r = d \/ exists blsr_lt_gap_successor_cases_no_carry. blsr_lt_gap_successor_cases_no_carry + S (S r) = (d) - 0012
specialize le_eq_or_lt (S r) - 0013
specialize le_eq_or_lt d - 0014
apply le_eq_or_lt - 0015
exact hold_right - 0016
cases hsplit - 0017
left - 0018
split - 0019
exact hsplit_left - 0020
have hequation : S n = d * S q + 0 - 0021
trans S (d * q + r) - 0022
congr - 0023
exact hold_left - 0024
trans d * q + S r - 0025
symm - 0026
apply PA4 - 0027
rewrite hsplit_left - 0028
rewrite PA3 - 0029
symm - 0030
apply PA6 - 0031
have hbound : exists blsr_lt_gap_successor_cases_carry_zero. blsr_lt_gap_successor_cases_carry_zero + S (0) = (d) - 0032
exists r - 0033
rewrite PA4 - 0034
rewrite PA3 - 0035
exact hsplit_left - 0036
have hunique : z = S q /\ s = 0 - 0037
specialize division_remainder_unique d - 0038
specialize division_remainder_unique (S n) - 0039
specialize division_remainder_unique z - 0040
specialize division_remainder_unique s - 0041
specialize division_remainder_unique (S q) - 0042
specialize division_remainder_unique 0 - 0043
apply division_remainder_unique - 0044
exact hnew_left - 0045
exact hnew_right - 0046
exact hequation - 0047
exact hbound - 0048
exact hunique - 0049
right - 0050
split - 0051
exact hsplit_right - 0052
have hequation : S n = d * q + S r - 0053
trans S (d * q + r) - 0054
congr - 0055
exact hold_left - 0056
symm - 0057
apply PA4 - 0058
have hunique : z = q /\ s = S r - 0059
specialize division_remainder_unique d - 0060
specialize division_remainder_unique (S n) - 0061
specialize division_remainder_unique z - 0062
specialize division_remainder_unique s - 0063
specialize division_remainder_unique q - 0064
specialize division_remainder_unique (S r) - 0065
apply division_remainder_unique - 0066
exact hnew_left - 0067
exact hnew_right - 0068
exact hequation - 0069
exact hsplit_right - 0070
exact hunique