Exact expanded PA statement
forall p x y z. (exists wip_strict_gap_unique_y_bound. wip_strict_gap_unique_y_bound + S y = p) -> (exists wip_strict_gap_unique_z_bound. wip_strict_gap_unique_z_bound + S z = p) -> (exists wip_mod_left_unique_xy wip_mod_right_unique_xy. x * y + p * wip_mod_left_unique_xy = 1 + p * wip_mod_right_unique_xy) -> (exists wip_mod_left_unique_xz wip_mod_right_unique_xz. x * z + p * wip_mod_left_unique_xz = 1 + p * wip_mod_right_unique_xz) -> y = zStructural proof guide
Generated structural guide
Two bounded inverses of the same residue are equal.
Use the direct prerequisites mod_eq_symm, mod_eq_mul_left, mod_eq_mul_right, mul_assoc, mul_comm, mul_one, one_mul, mod_eq_trans, mod_eq_bounded_unique as previously established PA formulas.
The proof proceeds by intermediate claims (7), equality transport (3).
Referenced ingredients
Proof neighborhood
Direct dependencies
PA003L mod_eq_symm PA0020 mod_eq_mul_left PA001Y mod_eq_mul_right PA000B mul_assoc PA000H mul_comm PA0002 mul_one PA000M one_mul 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 Stable checked-use theorem is independently kernel-checked when replayed.
- 0001
intro p - 0002
intro x - 0003
intro y - 0004
intro z - 0005
intro hy - 0006
intro hz - 0007
intro hxy - 0008
intro hxz - 0009
have hreverse : exists wip_mod_left_unique_reverse_xz wip_mod_right_unique_reverse_xz. 1 + p * wip_mod_left_unique_reverse_xz = x * z + p * wip_mod_right_unique_reverse_xz - 0010
specialize mod_eq_symm p - 0011
specialize mod_eq_symm (x * z) - 0012
specialize mod_eq_symm 1 - 0013
apply mod_eq_symm - 0014
exact hxz - 0015
have hleftscaled : exists wip_mod_left_unique_left_scaled wip_mod_right_unique_left_scaled. y * 1 + p * wip_mod_left_unique_left_scaled = y * (x * z) + p * wip_mod_right_unique_left_scaled - 0016
specialize mod_eq_mul_left p - 0017
specialize mod_eq_mul_left 1 - 0018
specialize mod_eq_mul_left (x * z) - 0019
specialize mod_eq_mul_left y - 0020
apply mod_eq_mul_left - 0021
exact hreverse - 0022
have hrightscaled : exists wip_mod_left_unique_right_scaled wip_mod_right_unique_right_scaled. (x * y) * z + p * wip_mod_left_unique_right_scaled = 1 * z + p * wip_mod_right_unique_right_scaled - 0023
specialize mod_eq_mul_right p - 0024
specialize mod_eq_mul_right (x * y) - 0025
specialize mod_eq_mul_right 1 - 0026
specialize mod_eq_mul_right z - 0027
apply mod_eq_mul_right - 0028
exact hxy - 0029
have hleft : y * 1 = y - 0030
specialize mul_one y - 0031
exact mul_one - 0032
have hmiddle : y * (x * z) = (x * y) * z - 0033
trans (y * x) * z - 0034
symm - 0035
specialize mul_assoc y - 0036
specialize mul_assoc x - 0037
specialize mul_assoc z - 0038
apply mul_assoc - 0039
congr - 0040
apply mul_comm - 0041
refl - 0042
have hright : 1 * z = z - 0043
specialize one_mul z - 0044
exact one_mul - 0045
rewrite hleft at hleftscaled - 0046
rewrite hmiddle at hleftscaled - 0047
rewrite hright at hrightscaled - 0048
have hyz : exists wip_mod_left_unique_result wip_mod_right_unique_result. y + p * wip_mod_left_unique_result = z + p * wip_mod_right_unique_result - 0049
specialize mod_eq_trans p - 0050
specialize mod_eq_trans y - 0051
specialize mod_eq_trans ((x * y) * z) - 0052
specialize mod_eq_trans z - 0053
apply mod_eq_trans - 0054
exact hleftscaled - 0055
exact hrightscaled - 0056
specialize mod_eq_bounded_unique p - 0057
specialize mod_eq_bounded_unique y - 0058
specialize mod_eq_bounded_unique z - 0059
apply mod_eq_bounded_unique - 0060
exact hy - 0061
exact hz - 0062
exact hyz