{
  "status": "proved",
  "decl": "Nat.midy",
  "lean_source": "import Mathlib.FieldTheory.Finite.Basic\nimport Mathlib.Tactic.LinearCombination\n\n/-!\n# Midy's theorem\n\nThe long-division remainder and quotient give the actual digits and blocks of a fractional\nexpansion. For a prime denominator, we identify the least digit period with the multiplicative\norder of the base, then show that the two halves of an even period are complementary.\n-/\n\nnamespace Nat\n\n/-- The remainder after consuming `n` fractional digits in base `b`. -/\ndef longDivRemainder (b p a n : ℕ) : ℕ := (a * b ^ n) % p\n\n/-- The digit at index `n` (starting at zero) in the base-`b` long division of `a/p`. -/\ndef longDivDigit (b p a n : ℕ) : ℕ := (longDivRemainder b p a n * b) / p\n\n/-- The value of the first `n` digits of the long division, viewed as a block of width `n`. -/\ndef longDivBlock (b p a n : ℕ) : ℕ := (a * b ^ n) / p\n\ntheorem longDivRemainder_zero {b p a : ℕ} (ha : a < p) :\n    longDivRemainder b p a 0 = a := by\n  simp [longDivRemainder, Nat.mod_eq_of_lt ha]\n\n/-- The prefix quotient and remainder determine the exact truncation of the fraction. -/\ntheorem longDivBlock_spec (b p a n : ℕ) :\n    longDivRemainder b p a n + p * longDivBlock b p a n = a * b ^ n :=\n  Nat.mod_add_div _ _\n\ntheorem longDivBlock_lt {b p a n : ℕ} (hp : 0 < p) (hb : 0 < b) (ha : a < p) :\n    longDivBlock b p a n < b ^ n := by\n  apply (Nat.div_lt_iff_lt_mul hp).2\n  rw [Nat.mul_comm (b ^ n) p]\n  exact Nat.mul_lt_mul_of_pos_right ha (pow_pos hb _)\n\ntheorem longDivRemainder_add (b p a m n : ℕ) :\n    longDivRemainder b p a (m + n) =\n      longDivRemainder b p (longDivRemainder b p a m) n := by\n  simp only [longDivRemainder, pow_add, ← Nat.mul_assoc]\n  exact (Nat.mod_mul_mod _ _ _).symm\n\ntheorem longDivRemainder_succ (b p a n : ℕ) :\n    longDivRemainder b p a (n + 1) = (longDivRemainder b p a n * b) % p := by\n  rw [longDivRemainder_add]\n  simp [longDivRemainder]\n\n/-- One step of long division gives the next digit and remainder by Euclidean division. -/\ntheorem longDivDigit_step (b p a n : ℕ) :\n    longDivRemainder b p a (n + 1) + p * longDivDigit b p a n =\n      longDivRemainder b p a n * b := by\n  rw [longDivRemainder_succ, longDivDigit, Nat.mod_add_div]\n\ntheorem longDivDigit_add (b p a m n : ℕ) :\n    longDivDigit b p a (m + n) = longDivDigit b p (longDivRemainder b p a m) n := by\n  simp only [longDivDigit, longDivRemainder_add]\n\ntheorem longDivDigit_lt {b p a n : ℕ} (hp : 0 < p) (hb : 0 < b) :\n    longDivDigit b p a n < b := by\n  apply (Nat.div_lt_iff_lt_mul hp).2\n  rw [Nat.mul_comm b p]\n  exact Nat.mul_lt_mul_of_pos_right (Nat.mod_lt _ hp) hb\n\ntheorem longDivBlock_add {b p a : ℕ} (hp : 0 < p) (m n : ℕ) :\n    longDivBlock b p a (m + n) =\n      longDivBlock b p a m * b ^ n + longDivBlock b p (longDivRemainder b p a m) n := by\n  unfold longDivBlock longDivRemainder\n  calc\n    (a * b ^ (m + n)) / p = ((a * b ^ m % p + p * (a * b ^ m / p)) * b ^ n) / p := by\n      rw [Nat.mod_add_div, pow_add, Nat.mul_assoc]\n    _ = _ := by\n      rw [Nat.add_mul, Nat.mul_assoc, Nat.add_mul_div_left _ _ hp, Nat.add_comm]\n\ntheorem longDivBlock_succ {b p a : ℕ} (hp : 0 < p) (n : ℕ) :\n    longDivBlock b p a (n + 1) = longDivBlock b p a n * b + longDivDigit b p a n := by\n  rw [longDivBlock_add hp]\n  simp [longDivBlock, longDivDigit]\n\nprivate theorem longDivBlock_eq_of_digits_eq {b p a c : ℕ}\n    (hp : 0 < p) (ha : a < p) (hc : c < p)\n    (hd : ∀ n, longDivDigit b p a n = longDivDigit b p c n) (n : ℕ) :\n    longDivBlock b p a n = longDivBlock b p c n := by\n  induction n with\n  | zero => simp [longDivBlock, Nat.div_eq_of_lt ha, Nat.div_eq_of_lt hc]\n  | succ n ih => rw [longDivBlock_succ hp, longDivBlock_succ hp, ih, hd]\n\nprivate theorem eq_of_longDivDigits_eq {b p a c : ℕ}\n    (hb : 2 ≤ b) (hp : 0 < p) (ha : a < p) (hc : c < p)\n    (hd : ∀ n, longDivDigit b p a n = longDivDigit b p c n) : a = c := by\n  have hq := longDivBlock_eq_of_digits_eq hp ha hc hd p\n  unfold longDivBlock at hq\n  have hra := Nat.mod_add_div (a * b ^ p) p\n  have hrc := Nat.mod_add_div (c * b ^ p) p\n  rw [hq] at hra\n  have hpow : p ≤ b ^ p := (Nat.lt_pow_self (by omega : 1 < b)).le\n  have hra' := Nat.mod_lt (a * b ^ p) hp\n  have hrc' := Nat.mod_lt (c * b ^ p) hp\n  rcases lt_trichotomy a c with h | h | h\n  · have hgap := Nat.mul_le_mul_right (b ^ p) (show a + 1 ≤ c by omega)\n    rw [Nat.add_mul, Nat.one_mul] at hgap\n    omega\n  · exact h\n  · have hgap := Nat.mul_le_mul_right (b ^ p) (show c + 1 ≤ a by omega)\n    rw [Nat.add_mul, Nat.one_mul] at hgap\n    omega\n\nprivate theorem longDivRemainder_eq_iff_zmod {b p a t c : ℕ}\n    (hp : 0 < p) (hc : c < p) :\n    longDivRemainder b p a t = c ↔ (a : ZMod p) * (b : ZMod p) ^ t = (c : ZMod p) := by\n  have hr : longDivRemainder b p a t < p := Nat.mod_lt _ hp\n  have hcast : (longDivRemainder b p a t : ZMod p) = (a : ZMod p) * (b : ZMod p) ^ t := by\n    simp [longDivRemainder, ZMod.natCast_mod]\n  rw [← hcast, ZMod.natCast_eq_natCast_iff', Nat.mod_eq_of_lt hr, Nat.mod_eq_of_lt hc]\n\n/-- A shift preserves every digit of the expansion exactly when it is a multiple of\nthe multiplicative order of the base. -/\ntheorem longDivDigit_period_iff {b p a t : ℕ}\n    (hb : 2 ≤ b) (hp : p.Prime) (ha : 0 < a) (hap : a < p) :\n    (∀ n, longDivDigit b p a (t + n) = longDivDigit b p a n) ↔\n      orderOf (b : ZMod p) ∣ t := by\n  let : Fact p.Prime := ⟨hp⟩\n  have ha0 : (a : ZMod p) ≠ 0 := by\n    intro h\n    exact (not_le_of_gt hap) (Nat.le_of_dvd ha ((ZMod.natCast_eq_zero_iff a p).mp h))\n  have hr : longDivRemainder b p a t < p := Nat.mod_lt _ hp.pos\n  have hequiv : longDivRemainder b p a t = a ↔ (b : ZMod p) ^ t = 1 := by\n    rw [longDivRemainder_eq_iff_zmod hp.pos hap]\n    constructor\n    · intro h\n      exact mul_left_cancel₀ ha0 (h.trans (mul_one _).symm)\n    · intro h\n      rw [h, mul_one]\n  rw [orderOf_dvd_iff_pow_eq_one, ← hequiv]\n  simp only [longDivDigit_add]\n  exact ⟨eq_of_longDivDigits_eq hb hp.pos hr hap, fun h n => by rw [h]⟩\n\n/-- The value of any returning block, with its length specifying the leading zeroes. -/\ntheorem longDivBlock_eq_of_remainder_eq {b p a t : ℕ}\n    (hp : 0 < p) (hb : 0 < b) (h : longDivRemainder b p a t = a) :\n    longDivBlock b p a t = a * (b ^ t - 1) / p := by\n  have hpow : 1 ≤ b ^ t := Nat.one_le_pow _ _ hb\n  have hqr := Nat.mod_add_div (a * b ^ t) p\n  change (a * b ^ t) % p = a at h\n  rw [h] at hqr\n  have hmul : a * (b ^ t - 1) = p * (a * b ^ t / p) := by\n    rw [Nat.mul_sub_left_distrib, Nat.mul_one]\n    omega\n  rw [hmul, Nat.mul_div_cancel_left _ hp]\n  rfl\n\n/-- Euclidean division of the complementary part of a multiple of `p`. -/\nprivate theorem divMod_complement {p q x y : ℕ} (hp : 0 < p)\n    (hxy : x + y = p * q) (hr : 0 < x % p) :\n    x / p + y / p = q - 1 ∧ y % p = p - x % p := by\n  have hrp := Nat.mod_lt x hp\n  have hxd := Nat.mod_add_div x p\n  have hd : x / p < q := by\n    by_contra! h\n    have hle : x ≤ p * q := by rw [← hxy]; omega\n    have hx : p * (x / p) < x := by omega\n    exact (not_lt_of_ge hle) (lt_of_le_of_lt (Nat.mul_le_mul_left p h) hx)\n  have hq : x / p + 1 + (q - 1 - x / p) = q := by omega\n  have hprod := congrArg (p * ·) hq\n  simp only [Nat.mul_add, Nat.mul_one] at hprod\n  have hy : y = (p - x % p) + p * (q - 1 - x / p) := by omega\n  have hsmall : p - x % p < p := by omega\n  constructor\n  · rw [show y / p = q - 1 - x / p by\n      rw [hy, Nat.add_mul_div_left _ _ hp, Nat.div_eq_of_lt hsmall, Nat.zero_add]]\n    exact Nat.add_sub_of_le (by omega : x / p ≤ q - 1)\n  · calc\n      y % p = ((p - x % p) + p * (q - 1 - x / p)) % p := congrArg (· % p) hy\n      _ = p - x % p := by\n        rw [Nat.add_mul_mod_self_left, Nat.mod_eq_of_lt hsmall]\n\nprivate theorem longDivRemainder_pos {b p a n : ℕ}\n    (hp : p.Prime) (ha : 0 < a) (hap : a < p) (hb : ¬ p ∣ b) :\n    0 < longDivRemainder b p a n := by\n  apply Nat.pos_of_ne_zero\n  intro h\n  have hd : p ∣ a * b ^ n := Nat.dvd_of_mod_eq_zero h\n  rcases hp.dvd_mul.mp hd with h | h\n  · exact (not_le_of_gt hap) (Nat.le_of_dvd ha h)\n  · exact hb (hp.dvd_of_dvd_pow h)\n\n/-- The least positive digit period is exactly the order of the base modulo the prime. -/\ntheorem longDivDigit_minPeriod_iff {b p a t : ℕ}\n    (hb : 2 ≤ b) (hp : p.Prime) (hbp : ¬ p ∣ b) (ha : 0 < a) (hap : a < p) :\n    (0 < t ∧ (∀ n, longDivDigit b p a (t + n) = longDivDigit b p a n) ∧\n      ∀ s, 0 < s → (∀ n, longDivDigit b p a (s + n) = longDivDigit b p a n) → t ≤ s) ↔\n      orderOf (b : ZMod p) = t := by\n  let : Fact p.Prime := ⟨hp⟩\n  have hb0 : (b : ZMod p) ≠ 0 := by\n    simpa [ZMod.natCast_eq_zero_iff] using hbp\n  have hpos : 0 < orderOf (b : ZMod p) :=\n    Nat.pos_of_dvd_of_pos (ZMod.orderOf_dvd_card_sub_one hb0) (by\n      have := hp.two_le\n      omega)\n  constructor\n  · rintro ⟨ht, hperiod, hmin⟩\n    exact le_antisymm\n      (Nat.le_of_dvd ht ((longDivDigit_period_iff hb hp ha hap).mp hperiod))\n      (hmin _ hpos ((longDivDigit_period_iff hb hp ha hap).mpr (dvd_refl _)))\n  · rintro rfl\n    exact ⟨hpos, (longDivDigit_period_iff hb hp ha hap).mpr (dvd_refl _),\n      fun s hs hperiod => Nat.le_of_dvd hs ((longDivDigit_period_iff hb hp ha hap).mp hperiod)⟩\n\n/-- Midy's theorem (Wikidata Q856158).\n\"In base `b`, if the expansion of `a/p` has least period `2k`, its two halves add to\n`b^k - 1`, and every corresponding pair of digits adds to `b - 1`.\"\n\nHere `b ≥ 2`, `p` is a prime that does not divide `b`, and `0 < a < p`.\nThe least-period hypothesis is expressed by multiplicative order, equivalently\n`Nat.longDivDigit_minPeriod_iff`. Each half has width `k`, including initial zeroes.\nThe final equality gives the value of the whole period block of width `2k`. -/\ntheorem midy {b p a k : ℕ} (hb : 2 ≤ b) (hp : p.Prime) (hbp : ¬ p ∣ b)\n    (ha : 0 < a) (hap : a < p) (hk : orderOf (b : ZMod p) = 2 * k) :\n    longDivBlock b p a k + longDivBlock b p (longDivRemainder b p a k) k = b ^ k - 1 ∧\n      (∀ i < k, longDivDigit b p a i + longDivDigit b p a (k + i) = b - 1) ∧\n      longDivBlock b p a (2 * k) = a * (b ^ (2 * k) - 1) / p := by\n  let : Fact p.Prime := ⟨hp⟩\n  have hmin := (longDivDigit_minPeriod_iff hb hp hbp ha hap).mpr hk\n  have hkpos : 0 < k := by have := hmin.1; omega\n  have hsq : ((b : ZMod p) ^ k) ^ 2 = 1 := by\n    rw [← pow_mul, Nat.mul_comm k 2, ← hk, pow_orderOf_eq_one]\n  have hne : (b : ZMod p) ^ k ≠ 1 := by\n    intro h\n    have hd := orderOf_dvd_iff_pow_eq_one.mpr h\n    rw [hk] at hd\n    have := Nat.le_of_dvd hkpos hd\n    omega\n  have hneg : (b : ZMod p) ^ k = -1 := by\n    have hfactor : ((b : ZMod p) ^ k - 1) * ((b : ZMod p) ^ k + 1) = 0 := by\n      linear_combination hsq\n    rcases _root_.mul_eq_zero.mp hfactor with h | h\n    · exact (hne (sub_eq_zero.mp h)).elim\n    · exact eq_neg_of_add_eq_zero_left h\n  have hhalf : longDivRemainder b p a k = p - a := by\n    apply (longDivRemainder_eq_iff_zmod hp.pos (by omega : p - a < p)).2\n    rw [hneg, Nat.cast_sub hap.le, ZMod.natCast_self]\n    simp\n  have hparts (q : ℕ) : a * q + (p - a) * q = p * q := by\n    rw [← Nat.add_mul, Nat.add_sub_of_le hap.le]\n  have hblocks := (divMod_complement hp.pos (hparts (b ^ k))\n    (longDivRemainder_pos hp ha hap hbp : 0 < a * b ^ k % p)).1\n  have hfull : longDivRemainder b p a (2 * k) = a := by\n    apply (longDivRemainder_eq_iff_zmod hp.pos hap).2\n    rw [← hk, pow_orderOf_eq_one, mul_one]\n  refine ⟨by simpa only [hhalf, longDivBlock] using hblocks, ?_,\n    longDivBlock_eq_of_remainder_eq hp.pos (by omega) hfull⟩\n  intro i _\n  rw [longDivDigit_add, hhalf]\n  have step (i : ℕ)\n      (hi : longDivRemainder b p (p - a) i = p - longDivRemainder b p a i) :\n      longDivDigit b p a i + longDivDigit b p (p - a) i = b - 1 ∧\n        longDivRemainder b p (p - a) (i + 1) = p - longDivRemainder b p a (i + 1) := by\n    have hs : longDivRemainder b p a i * b + longDivRemainder b p (p - a) i * b = p * b := by\n      have hle : longDivRemainder b p a i ≤ p := (Nat.mod_lt _ hp.pos).le\n      rw [hi, ← Nat.add_mul, Nat.add_sub_of_le hle]\n    have hr : 0 < (longDivRemainder b p a i * b) % p := by\n      rw [← longDivRemainder_succ]\n      exact longDivRemainder_pos hp ha hap hbp\n    simpa only [longDivDigit, longDivRemainder_succ] using divMod_complement hp.pos hs hr\n  have hinv (n : ℕ) :\n      longDivRemainder b p (p - a) n = p - longDivRemainder b p a n := by\n    induction n with\n    | zero =>\n      rw [longDivRemainder_zero (by omega : p - a < p), longDivRemainder_zero hap]\n    | succ n ih => exact (step n ih).2\n  exact (step i (hinv i)).1\n\nend Nat\n\n#print axioms Nat.midy\n",
  "build_output": "'Nat.midy' depends on axioms: [propext, Classical.choice, Quot.sound]\n",
  "explanation": "In any base b ≥ 2, divide a by a prime p with 0 < a < p and p not dividing b. The remainder after n digits is the remainder of a·b^n modulo p. Multiplying it by b and dividing by p gives the next digit and next remainder. The prefix block is the quotient of a·b^n by p. Appending one digit multiplies the previous prefix by b and adds the digit.\n\nReturning to remainder a repeats all subsequent digits. Conversely, equal digit streams from two remainders give equal prefix quotients by the append rule. Once b^n ≥ p, distinct remainders would give scaled numerators at least p apart, which cannot share a quotient by p. Returning to a is therefore equivalent to a digit period. Modulo p, cancellation of a shows that this is equivalent to b^n = 1, so the least positive digit period is the order of b.\n\nAt half the order, b^k is a square root of 1 modulo p and differs from 1, so it is −1. The second half starts with remainder p−a. The scaled starting remainders a·b^k and (p−a)·b^k sum to p·b^k. Their nonzero remainders add to p, so the two quotients add to b^k−1. Running the two long divisions in parallel preserves the complementary-remainder invariant and makes each pair of digit quotients sum to b−1. Return to a at 2k gives p times the whole block equal to a·(b^(2k)−1), yielding the stated quotient. In decimal, 1/7 gives 142 + 857 = 999.\n\nSingle-target triage, grade A. The standard long-division argument takes about a page on paper. This file is 275 lines including the supporting lemmas. The pinned Mathlib and Lean supply ZMod over prime moduli, cast equality modulo p, orderOf and its power/divisibility criterion, prime divisibility of products and powers, and natural-number quotient/remainder identities. The local additions are the fractional long-division definitions, their shift and prefix identities, the digit-period equivalence, and the complementary quotient/remainder argument.",
  "fidelity": {
    "base_and_numerator": "The base b is any natural number at least 2. The numerator a is arbitrary with 0 < a < p.",
    "prime_denominator": "The assumptions explicitly require primality and p not dividing b.",
    "minimal_even_period": "The hypothesis is orderOf (b : ZMod p) = 2 * k. Nat.longDivDigit_minPeriod_iff equates that order with the least positive shift preserving every actual digit. In particular, the hypothesis forces k > 0.",
    "actual_digits_and_width": "Nat.longDivDigit_step and Nat.longDivRemainder_zero give the Euclidean-division rule and starting remainder. Nat.longDivDigit_lt bounds the digits. Nat.longDivBlock_spec and Nat.longDivBlock_succ identify the exact prefix quotient with successive digit append operations. Width is represented by the length parameter and the digit indices, so a zero at the start of a block occupies a position. Nat.longDivBlock_lt bounds the block value by b to its width.",
    "half_blocks": "The first width-k block starts at a. The second starts at the remainder after k steps. Nat.longDivDigit_add identifies its digits with those at k+i in the original stream, and Nat.longDivBlock_add gives block concatenation. Their exact natural-number sum is b^k−1.",
    "corresponding_digits": "For every index i < k, the digits at i and k+i sum in ℕ to b−1.",
    "full_block": "The width-2k prefix is the full minimal period block. The last conjunct gives its value as a·(b^(2k)−1)/p, with exact divisibility established in the proof.",
    "verification": "Local clause-by-clause review. Lean 4.36.0 and prebuilt Mathlib fc4f59e were used via lean -DautoImplicit=false Midy.lean. Both archives passed the SHA-256 checks from fetch.json. The file compiled without diagnostics apart from the requested axiom output. Scratch checks covered 1/7 in decimal, 1/5 in binary with first block 00, and 3/5 in binary with second block 01 and an application of Nat.midy. Independent-agent clean rebuild and review: UNVERIFIED."
  },
  "prior_work": [
    {
      "urls": [
        "https://leanprover-community.github.io/1000-missing.html",
        "https://leanprover-community.github.io/1000.html",
        "https://raw.githubusercontent.com/leanprover-community/mathlib4/e54979a532247ae4eb9d5578a8fd40a1bc332101/docs/1000.yaml"
      ],
      "finding": "Q856158 is listed as missing and has no completed entry. Searched Mathlib/, Archive/ and docs/1000.yaml in Mathlib master at e54979a532247ae4eb9d5578a8fd40a1bc332101 for case-insensitive Midy and Q856158. The only matches were the uncompleted catalogue entry."
    },
    {
      "urls": [
        "https://api.github.com/search/issues?q=repo%3Aleanprover-community%2Fmathlib4+is%3Apr+is%3Aopen+Midy"
      ],
      "finding": "The Mathlib open-PR query for Midy returned zero matches."
    },
    {
      "urls": [
        "https://api.github.com/search/issues?q=%22Midy+theorem%22+%22Lean%22",
        "https://github.com/rjwalters/lean-genius/pull/25071",
        "https://raw.githubusercontent.com/rjwalters/lean-genius/a4a3e05/proofs/Proofs/MidyTheorem.lean",
        "https://api.github.com/search/repositories?q=Midy+language%3ALean",
        "https://api.github.com/search/code?q=Midy+language%3ALean"
      ],
      "finding": "GitHub issue search found the merged lean-genius PR #25071, dated June 16, 2026. Its midy_theorem declaration splits the reciprocal repetend (b^(2k)−1)/p by quotient and remainder with divisor b^k under the hypothesis p ∣ b^k+1. The PR also records a bridge from even order to this divisibility. The prior declaration concerns numerator 1 and the block sum. This submission proves the arbitrary-numerator block sum, digit-by-digit complement and minimal period of the long-division digit stream. The prior proof was not used. Repository search by Midy and Lean returned zero repositories. Global GitHub code search required authentication. Priority for the full vetted statement is UNVERIFIED."
    },
    {
      "urls": [
        "https://leanprover.zulipchat.com/#narrow/search/Midy",
        "https://leanprover-community.github.io/archive/stream/270676-lean4/index.html",
        "https://leanprover-community.github.io/archive/stream/287929-mathlib4/index.html",
        "https://leanprover-community.github.io/archive/stream/217875-Is-there-code-for-X%3F/index.html",
        "https://leanprover-community.github.io/archive/stream/116395-maths/index.html",
        "https://leanprover-community.github.io/archive/stream/524981-Formal-conjectures/index.html"
      ],
      "finding": "Searched the public topic indexes for lean4, mathlib4, Is there code for X?, maths and Formal conjectures for Midy. No matching topic appeared. The live full-message search required authentication and remains UNVERIFIED."
    }
  ],
  "database_entry": {
    "wikidata_id": "Q856158",
    "declaration": "Nat.midy",
    "file": "Midy.lean"
  },
  "stuck": null,
  "sources": [
    "https://leanprover-community.github.io/1000-missing.html",
    "https://leanprover-community.github.io/1000.html",
    "https://raw.githubusercontent.com/leanprover-community/mathlib4/e54979a532247ae4eb9d5578a8fd40a1bc332101/docs/1000.yaml",
    "https://api.github.com/search/issues?q=repo%3Aleanprover-community%2Fmathlib4+is%3Apr+is%3Aopen+Midy",
    "https://api.github.com/search/issues?q=%22Midy+theorem%22+%22Lean%22",
    "https://api.github.com/search/repositories?q=Midy+language%3ALean",
    "https://github.com/rjwalters/lean-genius/pull/25071",
    "https://raw.githubusercontent.com/rjwalters/lean-genius/a4a3e05/proofs/Proofs/MidyTheorem.lean",
    "https://leanprover-community.github.io/archive/stream/270676-lean4/index.html",
    "https://leanprover-community.github.io/archive/stream/287929-mathlib4/index.html",
    "https://leanprover-community.github.io/archive/stream/217875-Is-there-code-for-X%3F/index.html",
    "https://leanprover-community.github.io/archive/stream/116395-maths/index.html",
    "https://leanprover-community.github.io/archive/stream/524981-Formal-conjectures/index.html",
    "https://loogle.lean-lang.org/?q=ZMod",
    "https://arxiv.org/html/math/0605182v1",
    "https://arxiv.org/abs/math/0605182",
    "https://raw.githubusercontent.com/leanprover-community/mathlib4/fc4f59e/Mathlib/Data/ZMod/Basic.lean",
    "https://raw.githubusercontent.com/leanprover-community/mathlib4/fc4f59e/Mathlib/GroupTheory/OrderOfElement.lean",
    "https://raw.githubusercontent.com/leanprover-community/mathlib4/fc4f59e/Mathlib/FieldTheory/Finite/Basic.lean",
    "https://github.com/Identity-md/lean-bundles/releases/download/pequalnp-e125f04d0dc6/fetch.json"
  ]
}
