kernel-Nat.clog_eq_one
- Kind
- kernel-term
- Status
- checked
Supports: ∀ {b n : ℕ}, 2 ≤ n → n ≤ b → Nat.clog b n = 1
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- clog_eq_one 2>/dev/null | grep -Ec '^Nat\.clog_eq_one[[:space:]]')" -ge 1 Evidence notes
`build_nat_prelude` admits `Nat.clog_eq_one` through the trusted `Kernel::add_declaration` gate (declared in `nat_prelude/log_clog_mirrors.rs`'s `declare_clog_eq_one`, lane `nat-mirror-residue`). Route: `cases_zero_succ` on `n` (`n = 0` refuted by `not_succ_le_zero` against `Le 2 0`); at `n = succ n'`, `Le 2 (succ n') -> Le (succ n') b` gives `Le 2 b` via `le_trans`, both guard cuts (`2 <= b`, `2 <= succ n'`) known true via `ble_eq_true_of_le`. The recursive argument's numerator `(succ n' + b) - 1` is shown equal to `n' + b` via `Nat.succ_add` (congruence) plus the pure-defeq collapse `sub x 1 ~ pred x`; `Nat.add_div_right` then rewrites `(n' + b) / b` to `n' / b + 1`, and `n' / b = 0` because `n' < b` IS `h2 : Le (succ n') b` under `Nat.lt`'s own definition (`div_lt_of_lt_mul` against `n' < b*1`, `le_of_lt_succ`, `le_antisymm` with `zero_le`). So the quotient is exactly `1`. A new fuel-agnostic helper `clog_aux_at_one_eq_zero : Eq (clogAux base fuel 1) 0` (any `fuel`, any `base`) closes the recursive call: `fuel = 0` is the fuel-exhaustion row (`refl`); at `fuel = succ f'` the INNER guard `2 <= 1` compares two LITERALS and iota-collapses to `false` with no lemma, leaving `bool_select_nat (ble 2 base) 0 0`, stuck on the symbolic outer test but equal on both branches -- exactly `bool_select_nat_same`'s shape. Two `bool_transport`s (the same reduced->general recipe `clog_pos`/`log_pos` use, aimed at `Eq (_, 1)` instead of `Lt 0 _`) then lift `Eq (succ (clogAux base n' quotient)) 1` up through both stuck guard tests to `Eq (clog b (succ n')) 1`. `nat_theorem_inventory`'s rendered type for `Nat.clog_eq_one` is `(x0:AxNat)->(x1:AxNat)->(Le (succ (succ zero)) x1)->(Le x1 x0)->Eq (clog x0 x1) (succ zero)`, 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 `clog_eq_onexxxxx`: `error: no Nat theorem matches ... -- an absent theorem is a failed check, not an empty report`, count 0), and the `grep -c` count (tested `-ge 1`, not piped into `grep -q`) requires the admitted declaration to actually be printed.