Exact expanded PA statement
forall m n q r q2 r2. n = m * q + r -> (exists k. k + S r = m) -> n = m * q2 + r2 -> (exists k. k + S r2 = m) -> q = q2 /\ r = r2Structural proof guide
Generated structural guide
Bounded quotient-remainder decompositions have unique quotients and remainders.
Use the direct prerequisites zero_add, le_total, zero_or_succ, add_left_cancel, positive_quotient_gap_impossible as previously established PA formulas.
The proof proceeds by case analysis (7), intermediate claims (1), equality transport (8).
Referenced ingredients
Proof neighborhood
Direct dependencies
PA0001 zero_add PA002A le_total PA0008 zero_or_succ PA002B add_left_cancel PA002D positive_quotient_gap_impossibleDirect dependents
Formal native tactic body
Dependencies are introduced as named hypotheses before line 1. Linked names are exact direct references. This Stable checked-use theorem is independently kernel-checked when replayed.
- 0001
intro m - 0002
intro n - 0003
intro q - 0004
intro r - 0005
intro q2 - 0006
intro r2 - 0007
intro h1 - 0008
intro hr - 0009
intro h2 - 0010
intro hr2 - 0011
have hsum : m * q + r = m * q2 + r2 - 0012
trans n - 0013
symm - 0014
exact h1 - 0015
exact h2 - 0016
specialize le_total q - 0017
specialize le_total q2 - 0018
cases le_total - 0019
cases le_total_left - 0020
specialize zero_or_succ x - 0021
cases zero_or_succ - 0022
rewrite zero_or_succ_left at le_total_left_witness - 0023
specialize zero_add q - 0024
rewrite zero_add at le_total_left_witness - 0025
split - 0026
exact le_total_left_witness - 0027
specialize add_left_cancel (m * q) - 0028
specialize add_left_cancel r - 0029
specialize add_left_cancel r2 - 0030
apply add_left_cancel - 0031
rewrite <- le_total_left_witness at hsum - 0032
exact hsum - 0033
cases zero_or_succ_right - 0034
exfalso - 0035
specialize positive_quotient_gap_impossible m - 0036
specialize positive_quotient_gap_impossible q - 0037
specialize positive_quotient_gap_impossible q2 - 0038
specialize positive_quotient_gap_impossible r - 0039
specialize positive_quotient_gap_impossible r2 - 0040
specialize positive_quotient_gap_impossible x1 - 0041
apply positive_quotient_gap_impossible - 0042
exact hr - 0043
rewrite zero_or_succ_right_witness at le_total_left_witness - 0044
exact le_total_left_witness - 0045
exact hsum - 0046
cases le_total_right - 0047
specialize zero_or_succ x - 0048
cases zero_or_succ - 0049
rewrite zero_or_succ_left at le_total_right_witness - 0050
specialize zero_add q2 - 0051
rewrite zero_add at le_total_right_witness - 0052
split - 0053
symm - 0054
exact le_total_right_witness - 0055
specialize add_left_cancel (m * q) - 0056
specialize add_left_cancel r - 0057
specialize add_left_cancel r2 - 0058
apply add_left_cancel - 0059
rewrite le_total_right_witness at hsum - 0060
exact hsum - 0061
cases zero_or_succ_right - 0062
exfalso - 0063
specialize positive_quotient_gap_impossible m - 0064
specialize positive_quotient_gap_impossible q2 - 0065
specialize positive_quotient_gap_impossible q - 0066
specialize positive_quotient_gap_impossible r2 - 0067
specialize positive_quotient_gap_impossible r - 0068
specialize positive_quotient_gap_impossible x1 - 0069
apply positive_quotient_gap_impossible - 0070
exact hr2 - 0071
rewrite zero_or_succ_right_witness at le_total_right_witness - 0072
exact le_total_right_witness - 0073
symm - 0074
exact hsum