kernel-Nat.div_gcd_pos_of_pos_left
- Kind
- kernel-term
- Status
- checked
Supports: ∀ {a : ℕ} (b : ℕ), 0 < a → 0 < a / a.gcd b
test "$(cargo run -q -p axeyum-lean-kernel --example nat_theorem_inventory -- div_gcd_pos_of_pos_left 2>/dev/null | grep -Ec '^Nat\.div_gcd_pos_of_pos_left[[:space:]]')" -ge 1 Evidence notes
`build_nat_prelude` admits `Nat.div_gcd_pos_of_pos_left` 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. Built in this session's `nat_prelude/gcd_dvd_mirrors.rs` (lane nat-gcd-dvd-mirrors), via the shared helper `pos_of_dvd_and_pos_numerator`: `div_mul_cancel` gives `(m/n)*n = m` from `dvd n m`; if `m/n` were `0` that would force `m = 0` (`zero_mul`), contradicting the hypothesis `0 < m` (via `not_lt_zero`); `Nat.zero_or_succ` on `m/n` therefore leaves only the successor case, closed directly by `zero_lt_succ`. Applied with n = gcd(a,b), m = a via `gcd_dvd_left`. `nat_theorem_inventory`'s rendered type is `(x0:AxNat)->(x1:AxNat)->(x2:lt zero x0)->lt zero (div x0 (gcd x0 x1))`, matching this fact's `formal.statement`. `nat_theorem_inventory` exits non-zero for a name that does not exist, and the `grep -c` count (tested `-ge 1`, not piped into `grep -q`) requires the admitted declaration to actually be printed. Verified both ways: the real name greps to a count `-ge 1` (confirmed by direct run, which also confirms this exact name does not collide with its sibling `Nat.div_gcd_pos_of_pos_left_right`/`Nat.div_gcd_pos_of_pos_left_left`); grepping a made-up name (`Nat.div_gcd_pos_of_pos_left_bogus`) fails closed (`nat_theorem_inventory` exits 1 on an absent name).