lean_workbook_plus_50103
ProvedGiven that . We are asked to determine . This is basically finding its inverse mod. To elaborate, set . Then, . To compute this is finding the inverse of modulo . To do this, one could simply use the as stated by Derive_Foiler by converting our given congruence in the form of a linear diophantine equation which would look like this: . Since we can compute integer solutions for . Hence, the last four digits of are .
Preamble
import Mathlib.Analysis.Complex.Basic
Formal statement
theorem lean_workbook_plus_50103 (x : ℕ) (h₀ : 0 < x) (h₁ : x < 10000) (h₂ : (123^1000 % 10000) = 1) (h₃ : (123^9999 % 10000) = x) : x = 9187 := by sorry
Source