Identifier
F:ml430-nat-pow-of-pow-add-prime-ab61d0d3
Proof route
kernel-lean
External status
proved
Axiom footprint
Empty

Recorded description

The proposition declared as `Nat.pow_of_pow_add_prime` in the pinned Mathlib v4.30 source.

Formal statement
∀ {a n : ℕ}, 1 < a → n ≠ 0 → Nat.Prime (a ^ n + 1) → ∃ m, n = 2 ^ m

Dependencies

The graph shows direct ledger edges. Follow a node to open its artifact page.

Direct dependencies appear to the left. The current fact is in the center. Facts that depend directly on it appear to the right. Mathlib v4.30 source propositio Mathlib v4.30 source propositio <= on the naturals is transitiv < on the naturals is irreflexiv One is a right identity for mul 1 is a left identity for multip [generated] kernel theorem Nat. [generated] kernel theorem Nat. Current fact
13 direct dependencies 0 direct dependents Graph shows the first 8 on each side.

Evidence

kernel-Nat.pow_of_pow_add_prime

Kind
kernel-term
Status
checked

Supports: ∀ {a n : ℕ}, 1 < a → n ≠ 0 → Nat.Prime (a ^ n + 1) → ∃ m, n = 2 ^ m

Checker command
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- pow_of_pow_add_prime 2>/dev/null | /usr/bin/grep -cE '^Nat\.pow_of_pow_add_prime[[:space:]]')" -ge 1
Evidence notes

`build_nat_prelude` admits `Nat.pow_of_pow_add_prime : forall a n, 1 < a -> n != 0 -> PrimeCond (a^n+1) -> exists m, n = 2^m` through the trusted `Kernel::add_declaration` gate (`nat_prelude/pow_add_prime.rs`, `declare_pow_of_pow_add_prime`). Primality is spelled inline (`2 <= x /\ forall c, c | x -> c = 1 \/ c = x`), matching this prelude's `exists_prime_dvd`/`exists_prime_factorization` convention -- there is no `Nat.Prime` predicate. Route: the odd-factor witnesses `(e, t)` from `Nat.pow_two_or_has_odd_factor` feed `Nat.dvd_pow_add_one_of_odd_mul_exp` (a prior lane's odd-factor divisibility step), exhibiting `a^e+1 | a^n+1`; primality then forces that divisor to be `1` or `a^n+1`, and both are excluded (`a^e+1 >= 2` from `pow_pos` since `a > 1`; `a^e+1 != a^n+1` from `e < n`, which needs `exponent_of(t) > 1` from `t != 0` via `mul_lt_mul_left`, combined with `pow_injective` and `lt_irrefl`). Checked against a genuinely FREE `a, n` (via `Kernel::infer_in` in a real `LocalContext`, `nat_prelude_tests.rs`) in addition to this named-declaration check; `nat_theorem_inventory` exits non-zero for a name that does not exist, and the anchored `grep -cE` count (tested `-ge 1`, not piped into `grep -q`) requires the admitted declaration to actually be printed. Verified against a fabricated name (`pow_of_pow_add_prime_bogus_xyz`) that the same command reports count 0.

kernel-Nat.pow_two_or_has_odd_factor

Kind
kernel-term
Status
checked

Supports: ∀ n, n ≠ 0 → (∃ m, n = 2^m) ∨ (∃ e t, n = e·(2t+1) ∧ t ≠ 0)

Checker command
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- pow_two_or_has_odd_factor 2>/dev/null | /usr/bin/grep -cE '^Nat\.pow_two_or_has_odd_factor[[:space:]]')" -ge 1
Evidence notes

The odd-factor extraction lemma `Nat.pow_two_or_has_odd_factor : forall n, n != 0 -> (exists m, n = 2^m) \/ (exists e t, n = e*(succ(2t)) /\ t != 0)` this fact's proof route depends on. NOT a `WellFounded.fix` construction: ordinary `Nat.rec` on a FUEL BOUND (`Le n fuel`, instantiated at `fuel := n` via `le_refl`) gives the induction hypothesis for every `n' <= fuel-1`, which is the strong-induction shape needed to recurse on `half := div n 2` rather than `n`'s predecessor. Splits on `Nat.even_or_odd` then on `half` via `cases_zero_succ` (`Nat`'s own constructors). Checked against a genuinely free `n` (`Kernel::infer_in`) and at the concrete instance `n=6`, where the construction's own recursion (traced by hand) produces witness `e=2, t=1` (`6=2*3`), matched against an independently-built statement of the `n=6` disjunction via `declare_theorem` (which checks the EXACT type, not merely some provable type) in `nat_prelude_tests.rs`. Verified against a fabricated name that the same anchored `grep -cE` count is 0.

footprint-Nat.pow_of_pow_add_prime

Kind
exhaustive-enumeration
Status
checked

Supports: axiom_footprint: [] -- the Nat prelude's trusted surface is empty

Checker command
cargo run -q -p axeyum-lean-kernel --example nat_axiom_inventory -- --require-axiom-free nat
Evidence notes

`nat_axiom_inventory --require-axiom-free nat` enumerates the built Nat environment and exits non-zero unless it admits no Axiom, Opaque or Quotient declaration. A theorem cannot depend on a trusted declaration the environment does not contain, so an empty trusted surface bounds `Nat.pow_of_pow_add_prime` and `Nat.pow_two_or_has_odd_factor`'s own footprints by `[]`. `nat_prelude_tests::every_nat_declaration_is_checked_and_axiom_free` additionally checks both by name, in-tree, via a coverage assertion derived from `kernel.environment()` itself (not a hand-maintained list read in isolation). Full `nat_prelude::` sweep: 222 passed, 0 failed.

Provenance

{
  "date": "2026-08-29",
  "established_by": "not established in this ledger",
  "source": "statement-only extraction of `Nat.pow_of_pow_add_prime` from Mathlib v4.30.0; no proof value was exposed",
  "prior_art": [
    {
      "who": "the Mathlib contributors",
      "what": "the theorem declaration `Nat.pow_of_pow_add_prime`",
      "where": "mathlib4 commit c5ea00351c28e24afc9f0f84379aa41082b1188f (v4.30.0)",
      "year": 2026,
      "attribution": "the proposition was read from the pinned statement-only inventory; the proof term and tactic trace were not consulted"
    }
  ]
}