kernel-Nat.log_div_mul_self
- Kind
- kernel-term
- Status
- checked
Supports: ∀ (b n : ℕ), Nat.log b (n / b * b) = Nat.log b n
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- log_div_mul_self 2>/dev/null | grep -Ec '^Nat\.log_div_mul_self[[:space:]]')" -ge 1 Evidence notes
`build_nat_prelude` admits `Nat.log_div_mul_self` through the trusted `Kernel::add_declaration` gate (declared in `nat_prelude/log_clog_mirrors.rs`'s `declare_log_div_mul_self`, lane `log-div-mul-self`). Route: split `1 < b` vs `b <= 1` (the second closes both sides at `0` via `log_of_left_le_one`); inside `1 < b`, derive `b = succ bp` via `succ_pred_of_pos` (transported back at the very end rather than by a `cases_zero_succ` refutation, since `b = 0/1` are already excluded by the hypothesis) and split `n < b` (both sides round to `0`: `n/b*b <= n < b` via `div_mod_bounds`'s lower conjunct plus `mul_comm`, closed by `log_of_lt` on each side) from `b <= n`. In the `b <= n` case, `n = succ n'` and `n/b*b = succ scaled'` are each established via `succ_pred_of_pos`, and `log`'s recursive equation is unfolded ONCE on each side (`log_succ_unfold`, `declare_log_pos`'s `at_n_succ` guard-collapse recipe retargeted from `Lt zero _` to an `Eq`), landing on `logAux base n' q` and `logAux base scaled' q` for the SAME quotient `q := n/b` (`mul_div_cancel_left`, `div (mul q b) b = q` via `Nat.add_mul_div_right` at `x := 0` plus `zero_add`/`zero_div`, identifies the two `logAux` calls' quotient arguments). `log_aux_agree_of_fuel` -- a double-fuel agreement induction generalizing `rec_agreement.rs`'s `land_aux_agree_of_fuel`/`agree_by_double_fuel_induction` from `landAux`'s structural `m = 0` guard to `logAux`'s order-comparison guard `ble base value` -- then equates `logAux base n' q` and `logAux base scaled' q` given `q <= n'` and `q <= scaled'` (each from `div_lt_self` + `le_of_lt_succ`); its base case and its step case's `a = 0` sub-branch both close via the PRE-EXISTING `log_clog_order.rs::log_aux_zero_value` (made `pub(super)` for this reuse, no new fuel-agnostic zero-value lemma had to be built), and its `a = succ predecessor` sub-branch needs no guard-truth case split at all, because both fuels being compared reduce `logAux`'s own `Nat.rec` against an IDENTICAL guard term once `c`'s positivity gives it a literal successor shape -- `d.congr` isolates the differing recursive sub-term, closed by the IH. `nat_theorem_inventory`'s rendered type for `Nat.log_div_mul_self` is `(x0:AxNat)->(x1:AxNat)->Eq (log x0 (mul (div x1 x0) x0)) (log x0 x1)`, matching this fact's `formal.statement` verbatim (`x0`=b, `x1`=n). `nat_theorem_inventory` exits non-zero for a name that does not exist (verified against `log_div_mul_selfxxxxx`: `error: no Nat theorem matches ... -- an absent theorem is a failed check, not an empty report`, count 0, exit 1), and the `grep -c` count (tested `-ge 1`, not piped into `grep -q`) requires the admitted declaration to actually be printed.