kernel-reconstructed-medians-cofactor-identity
- Kind
- kernel-term
- Status
- checked
Supports: conclusion = (-1)*generator_0 + (-1)*generator_1 at eight universally quantified Rat variables, admitted by crate::Kernel::add_declaration as Check.geometry_medians_cofactor_identity. The polynomials are NOT hand-copied: the test calls axeyum_cas::geometry_corpus::corpus() for the medians-concurrent problem, runs axeyum_cas::geometry_certify::certify on it, and translates cert.generators / cert.conclusions[0].poly / cert.conclusions[0].cofactors through rat_poly (the Rational-coefficient generalisation of the parent bridge's int_poly, which never declines) -- asserting first that both cofactors are the constant Rational::integer(-1) and that the variable ORDER is the certificate's own. The proof is emitted by prove_scale_rat / prove_merge_rat / prove_const_combination_rat, generalising the constant-cofactor orthocentre bridge's prove_scale/prove_merge to Rational coefficients: every coefficient combination step is either a Rat ring lemma the kernel re-derives (left_distrib, right_distrib, mul_assoc, add_assoc, mul_comm, mul_zero, zero_add, add_zero) or a single Eq.refl ascription that the kernel's OWN Rat.add/Rat.mul computation checks (the same def_eq renormalisation int_prelude_tests.rs's rat_add_renormalises/rat_mul_renormalises tests already establish for concrete literals, needing no lemma). 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_frac_bridge_tests::tests::geometry_medians_cofactor_identity_kernel_checked -- --exact 2>/dev/null | grep -cE '^test rat_prelude::cas_geometry_frac_bridge_tests::tests::geometry_medians_cofactor_identity_kernel_checked \.\.\. ok$' Evidence notes
Measured wall-clock 8.14s for this test alone (debug, uncontended) -- far cheaper than the rhombus sibling's 152.79s, because medians-concurrent's cofactors are constant (no prove_mul/polynomial-times-polynomial needed) and its 10-term polynomials are far smaller than rhombus's 79-term ones. MUTATION-VERIFIED both halves separately, each killing this test alone and leaving the other two frac-bridge tests green: (a) perturbing the merge's combined coefficient (a_head.1 + b_head.1 -> a_head.1 + b_head.1 + 1) kills it at the merged == concl_for_build assertion, printing an 11-term wrong normal form against the certificate's 10-term conclusion, which pins the STATEMENT to the certificate rather than to whatever the emitter produced; (b) swapping the zero-drop path's closing lemma (Rat.zero_add -> Rat.add_zero, same arity, wrong side) 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.