kernel-Nat.logAux_le_fuel
- Kind
- kernel-term
- Status
- checked
Supports: For all b, f, and n, logAux b f n <= f.
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- logAux_le_fuel 2>/dev/null | grep -Ec '^Nat\.logAux_le_fuel[[:space:]]')" -ge 1 Evidence notes
`build_nat_prelude` admits this theorem through the trusted `Kernel::add_declaration` gate, which re-checks the proof term against the stated type, so producing this row at all is a machine-checked proof. This is the genuinely harder tier of `Nat.log` (identified when `Nat.log` itself landed, hours earlier the same day): proving `logAux b f n <= f` needs induction on the FUEL `f` with the VALUE `n` generalized inside the motive (`fun f => forall n, Le (logAux b f n) f`), because the recursive call inside `logAux b (succ f) n` is at `logAux b f (n / b)` -- a DIFFERENT `n` than the outer statement fixes. Fixing `n` and inducting on `f` alone gives an induction hypothesis about `logAux b f n` that does not apply at `n / b`. The technique -- quantifying a second argument inside the motive of an induction on the first -- is the one `nat_prelude/parity.rs`'s `declare_add_self_ne_succ_add_self` uses for its own double induction. The step case unfolds `logAux b (succ f) n` to its guard's `bool_select_nat` form (reconstructed exactly as `log_of_lt`'s step case does, so the kernel's delta+iota unfold matches it), then case-splits BOTH nested `Nat.ble` cuts with a new local helper (`le_of_bool_select`, generalizing `log_of_lt`'s single-branch `bool_transport` technique to both branches and to an inequality goal): when either cut is false the term is `0` and `Nat.zero_le` closes it; when both are true the term is `succ (logAux b f (n / b))` and `Nat.le_succ_succ` applied to `ih (n / b)` closes it.