kernel-reconstructed-rhombus-cofactor-identity
- Kind
- kernel-term
- Status
- checked
Supports: conclusion = sum over i of cofactor_i * generator_i at nine universally quantified Rat variables, admitted by crate::Kernel::add_declaration as Check.geometry_rhombus_cofactor_identity. The polynomials are NOT hand-copied: the test calls axeyum_cas::geometry_corpus::corpus() for the rhombus-diagonals-perpendicular problem, runs axeyum_cas::geometry_certify::certify on it, and translates cert.generators / cert.conclusions[0].poly / cert.conclusions[0].cofactors -- asserting first that all four cofactors are NON-constant (so this certificate cannot be reached by the constant-cofactor predecessor) and that the variable ORDER is the certificate's own, coordinates then saturation variables. The proof is emitted by prove_mono_mul / prove_head_product / prove_term_mul / prove_poly_mul, whose every step is a Rat ring lemma (mul_assoc, mul_comm, mul_one, mul_zero, left_distrib, right_distrib, add_assoc, add_comm, add_zero, zero_add, Rat.ofInt_add, Rat.ofInt_mul); the kernel re-derives all of them. The declaration's axiom_footprint is asserted EMPTY and its kind asserted Declaration::Theorem in the same test.
cargo test -p axeyum-lean-kernel --lib rat_prelude::cas_geometry_mul_bridge_tests::tests::geometry_rhombus_cofactor_identity_kernel_checked -- --exact 2>/dev/null | grep -cE '^test rat_prelude::cas_geometry_mul_bridge_tests::tests::geometry_rhombus_cofactor_identity_kernel_checked \.\.\. ok$' Evidence notes
Measured wall-clock 152.79s for this test alone, of which about 120s is the CAS certify call that produces the certificate -- measured separately by rhombus_certificate_identity_holds_at_integer_points, which does no kernel work at all and still takes 120.04s. The kernel side is therefore roughly 33s, against 7.66s for the difference-of-squares smoke test that builds no certificate. MUTATION-VERIFIED both halves separately, each killing the two kernel-checked tests in the module and leaving the three non-kernel tests green: (a) perturbing the emitted product coefficient in prove_head_product (a.1 * b.1 -> a.1 * b.1 + 1) kills it at the merged == conclusion assertion, printing a 105-term wrong normal form against the certificate's 8-term conclusion, which pins the STATEMENT to the certificate rather than to whatever the emitter produced; (b) swapping the arguments of the single mul_comm in prove_mono_mul's right-head singleton branch (same lemma, same arity, wrong direction) leaves that assertion PASSING -- the normal form is unchanged, only the proof is wrong -- and kills it with TypeMismatch out of add_declaration, showing the PROOF is genuinely re-derived by the trust anchor. The two mutations therefore die through different guards, which is the discrimination that matters.