kernel-Nat.add_min_add_right
- Kind
- kernel-term
- Status
- checked
Supports: ((x0 : AxNat) -> ((x1 : AxNat) -> ((x2 : AxNat) -> Eq.{1} AxNat (Min.min (AxNat.add x0 x2) (AxNat.add x1 x2)) (AxNat.add (Min.min x0 x1) x2))))
test "$(cargo run -q --release -p axeyum-lean-kernel --example nat_theorem_inventory -- add_min_add_right 2>/dev/null | grep -Ec '^Nat\.add_min_add_right[[:space:]]')" -ge 1 Evidence notes
`build_nat_prelude` admits `Nat.add_min_add_right` through the trusted `Kernel::add_declaration` gate, declared in `nat_prelude/minmax_lemmas.rs`. `nat_theorem_inventory`'s rendered type is `((x0 : AxNat) -> ((x1 : AxNat) -> ((x2 : AxNat) -> Eq.{1} AxNat (Min.min (AxNat.add x0 x2) (AxNat.add x1 x2)) (AxNat.add (Min.min x0 x1) x2))))`, matching this fact's `formal.statement` modulo binder info. The flip is honest under the def-vs-theorem criterion, checked at the pinned toolchain source rather than from a paraphrase: Lean core's `max`/`min` at `Nat` ARE `if a <= b then b else a` / `if a <= b then a else b` (`Init/Prelude.lean:1311` `maxOfLe`, `:1328` `minOfLe`, `Init/Data/Nat/Basic.lean:873` `instance : Max Nat := maxOfLe`, `Init/Prelude.lean:2088` `instance : Min Nat := minOfLe`, and `Basic.lean:871` `Nat.min_def : min n m = if n <= m then n else m := rfl`), decided by `Nat.decLe` i.e. `Nat.ble`. `nat_prelude/minmax.rs` declares `Max.max`/`Min.min` with exactly that body, so this is the SAME function and only the delivery (a class projection at an instance) differs -- the same relation `HAdd.hAdd`/`instAddNat` bear to `Nat.add` in every already-settled mirror mentioning `+`. The rendered type differs from the pinned surface statement only in binder INFO (all binders explicit here; Mathlib marks some implicit), which is elaboration, not proposition. The tool exits non-zero for a name that does not exist, and the `grep -c` count (tested `-ge 1`, consuming the pipe, never `grep -q`) requires the admitted declaration to actually be printed; verified both ways -- the real name greps to a count `-ge 1`, a made-up `Nat.add_min_add_right_bogus` greps to `0`. Note `nat_theorem_inventory` keeps only its LAST name argument, so this command passes exactly one.