kernel-Nat.base_induction
- Kind
- kernel-term
- Status
- checked
Supports: ∀ {P : ℕ → Prop} {n : ℕ} (b : ℕ), 1 < b → (∀ m < b, P m) → (∀ (m k : ℕ), k < b → 0 < m → P m → P (b * m + k)) → P n
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- base_induction 2>/dev/null | grep -Ec '^Nat\.base_induction[[:space:]]')" -ge 1 Evidence notes
`build_nat_prelude` admits `Nat.base_induction` through the trusted `Kernel::add_declaration` gate (declared by hand in the new `nat_prelude/base_induction.rs`'s `declare_base_induction` -- `P : Nat -> Prop` is a genuine motive parameter, so `NatOps::theorem`'s `Nat`-only arity mechanism cannot express this statement, exactly as `Nat.dvd`/`Nat.modEq` in `divisibility.rs`/`modular.rs` are also hand-assembled `pi_fv`/`lam_fv` chains rather than `d.theorem` calls). CORRECTION TO PROVENANCE: the pinned source is Lean CORE (`~/.elan/toolchains/leanprover--lean4---v4.30.0/src/lean/Init/Data/Nat/Div/Lemmas.lean:256-267`), not Mathlib proper -- the nursery manifest's own `module`/`source_group` fields already name `Init.Data.Nat.Div.Lemmas`, and reading the actual source at that path confirms `theorem base_induction {P : Nat -> Prop} {n : Nat} (b : Nat) (hb : 1 < b) ... : P n := by induction n using Nat.strongRecOn ...`. This matters for the mirror-flip criterion: `P : Nat -> Prop` is fixed at `Prop`, never an arbitrary `Sort*`, and the declaration is a `theorem` (not a `def`), so this is NOT the fuel-cannot-be-a-dependent-recursor case that permanently blocks a mirror whose Mathlib/Lean-core definition is `WellFounded.fix` with a DEPENDENT motive (`Nat.binaryRec` et al.) -- proving `forall n, P n` for a fixed proposition-valued `P` needs no computational recursor at all, only ordinary well-founded strong induction, which this prelude already has as a primitive (`NatPrelude::lt_well_founded` + `WellFounded.fix`, used the same way by `declare_gcd_semantics`/`declare_gcd_bezout`/`declare_exists_prime_factorization`/`declare_irrational`). Route: `WellFounded.fix Nat Nat.lt P lt_well_founded step n`, where `step` (given `v` and `ih : forall y, y<v -> P y`) case-splits `lt_or_ge v b` -- `Lt v b` closes by `single v` directly; `Le b v` decomposes `v = b*qv+rv` (`div_mod_exec` via a local `div_mod_reconstructed`, this file's own per-file copy of `group.rs`'s helper), case-splits `qv` (`qv=0` contradicts `Le b v`, since it would force `v=rv<b`; `qv=succ qvpred` bounds `qv<v` via `mul_le_mul_left(qv,2,b,hb)` + `le_add_right`/`le_succ_succ` (`mul qv 2` is defeq `add qv qv`) + `mul_comm` + `le_add_right` again, three `lt_of_lt_of_le`-style chains), then closes by `digit qv rv (rv<b) (0<qv) (ih qv (qv<v))` transported along `v=b*qv+rv`. `nat_theorem_inventory`'s rendered type for `Nat.base_induction` is `(x0:(x0:AxNat)->Prop)->(x1:AxNat)->(x2:AxNat)->(x3:AxNat.lt(AxNat.succ AxNat.zero)x2)->(x4:(x4:AxNat)->(x5:AxNat.lt x4 x2)->x0 x4)->(x5:(x5:AxNat)->(x6:AxNat)->(x7:AxNat.lt x6 x2)->(x8:AxNat.lt AxNat.zero x5)->(x9:x0 x5)->x0(AxNat.add(AxNat.mul x2 x5)x6))->x0 x1`, matching this fact's `formal.statement` verbatim (`x0`=P, `x1`=n, `x2`=b, `x3`=hb, `x4`=single, `x5`=digit). `nat_theorem_inventory` exits non-zero for a name that does not exist (verified against `base_induction_bogus`, count 0), and the `grep -c` count (tested `-ge 1`, not piped into `grep -q`) requires the admitted declaration to actually be printed.