Exact expanded PA statement
forall p n q r t. n = p * q + r -> (exists gsp_lt_gap_gsd_r_below_p. gsp_lt_gap_gsd_r_below_p + S r = p) -> (exists gsp_lt_gap_gsd_canonical_t_below. gsp_lt_gap_gsd_canonical_t_below + S t = p) -> (exists wpp_mod_left_gsd_n_mod_t wpp_mod_right_gsd_n_mod_t. (n) + p * wpp_mod_left_gsd_n_mod_t = (t) + p * wpp_mod_right_gsd_n_mod_t) -> r = tStructural proof guide
Generated structural guide
A bounded value congruent to an exact division input is its canonical remainder.
Use the direct prerequisites mul_comm, remainder_decomposition_to_mod_eq, mod_eq_symm, mod_eq_trans, mod_eq_bounded_unique as previously established PA formulas.
The proof proceeds by intermediate claims (4).
Referenced ingredients
Proof neighborhood
Direct dependencies
PA000H mul_comm PA003C remainder_decomposition_to_mod_eq PA003L mod_eq_symm PA0024 mod_eq_trans PA002U mod_eq_bounded_uniqueDirect dependents
Formal native tactic body
Dependencies are introduced as named hypotheses before line 1. Linked names are exact direct references. This Alpha-v16 checked-use theorem is independently kernel-checked when replayed; it is not a Stable theorem.
- 0001
intro p - 0002
intro n - 0003
intro q - 0004
intro r - 0005
intro t - 0006
intro hdivision - 0007
intro hrbelow - 0008
intro htbelow - 0009
intro hnmodt - 0010
have hdirected : n = q * p + r - 0011
trans p * q + r - 0012
exact hdivision - 0013
congr - 0014
apply mul_comm - 0015
refl - 0016
have hnmodr : exists wpp_mod_left_gsd_proof_n_mod_r wpp_mod_right_gsd_proof_n_mod_r. (n) + p * wpp_mod_left_gsd_proof_n_mod_r = (r) + p * wpp_mod_right_gsd_proof_n_mod_r - 0017
specialize remainder_decomposition_to_mod_eq p - 0018
specialize remainder_decomposition_to_mod_eq n - 0019
specialize remainder_decomposition_to_mod_eq q - 0020
specialize remainder_decomposition_to_mod_eq r - 0021
apply remainder_decomposition_to_mod_eq - 0022
exact hdirected - 0023
have hrmodn : exists wpp_mod_left_gsd_proof_r_mod_n wpp_mod_right_gsd_proof_r_mod_n. (r) + p * wpp_mod_left_gsd_proof_r_mod_n = (n) + p * wpp_mod_right_gsd_proof_r_mod_n - 0024
specialize mod_eq_symm p - 0025
specialize mod_eq_symm n - 0026
specialize mod_eq_symm r - 0027
apply mod_eq_symm - 0028
exact hnmodr - 0029
have hrmodt : exists wpp_mod_left_gsd_proof_r_mod_t wpp_mod_right_gsd_proof_r_mod_t. (r) + p * wpp_mod_left_gsd_proof_r_mod_t = (t) + p * wpp_mod_right_gsd_proof_r_mod_t - 0030
specialize mod_eq_trans p - 0031
specialize mod_eq_trans r - 0032
specialize mod_eq_trans n - 0033
specialize mod_eq_trans t - 0034
apply mod_eq_trans - 0035
exact hrmodn - 0036
exact hnmodt - 0037
specialize mod_eq_bounded_unique p - 0038
specialize mod_eq_bounded_unique r - 0039
specialize mod_eq_bounded_unique t - 0040
apply mod_eq_bounded_unique - 0041
exact hrbelow - 0042
exact htbelow - 0043
exact hrmodt