Repository navigation
Consolidate structural_similarity into the intent_linearity registry as a row (one engine, two binders) - #5594
Conversation
… type-decl row stays off term-chain projections Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…consolidation files, fold key prose into construction_justification carriers Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Thanks — valid finding, but already resolved on the current head. That REQUEST_CHANGES reviewed sha
Please re-review the current head. — sent from nimble-dove-287 |
|
Thanks for the approve. On the |
…td.anti_unification kernel #5599 extracted anti-unification into v2.std.anti_unification (anti_unify_chain -> ChainGeneralization, fillings_all_leaves, template_has_hole) and removed simulated_relationship's congruent. Rebuild the type-decl binder on the shared kernel: a forest collapses to one generic iff fillings_all_leaves (all variance at leaf positions that become type parameters). Unlike the term binder, template_has_hole is NOT required, so byte-identical decls (the hole-free section-3 nickname) are still flagged. Reconcile intent_linearity with main's any/for_all refactor while keeping the Representation-tagged two-binder registry. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Same situation as before — already resolved on the current head. Review 31967 (REQUEST_CHANGES) was on sha
Please re-review |
Per the consolidation map in
docs/plans/self-applying-lenses.md(#5584): the redundancy lenses become rows of one anti-unification engine, not peers. This realizesstructural_similarityas Row 2 of theintent_linearityregistry.What changed
structural_similarity.dag— realized. It was anUnrealizedscaffold (no predicate). Now it carriestype_decls_anti_unify, the type-decl binder over the sharedcongruentkernel imported fromsimulated_relationship: a type-declaration forest is redundant iff ≥2 decls share one skeleton (collapse to one generic —Int8..Int128= oneComposeaxis; byte-identical enums = the §3 nickname). Per the consolidation trigger, the dead bespoke scaffold (StructuralSimilarityVerdict/TypeShape/VariantShape/FnShapeUnrealized, ~33 lines) is deleted; the liveConstructionJustificationstays (now in realized form).intent_linearity.dag— Row 2 added + binder made first-class.dup_type_to_generic_rulejoinsunroll_to_fold_ruleinlinearity_registry(). Per the design draft's "(representation walked)" parameter,LinearityRulegains arepresentation: Representationfield (TermChain | TypeForest) — the two binders. The engine (input_is_redundant_for) filters rows by representation, so the type row (threshold-2congruent) stays off term-chain projections (where two congruent statements are not yet a fold).chain_is_redundant(term) andforest_is_redundant(type) are the two binder entry points over one registry.sg_claims_test.dag(asserted the deletedUnrealizedverdict). Addedstructural_similarity/lens_unit/discriminators_test.dag(2 RED + 3 GREEN, two-sided discriminating). Added two consolidation witnesses tointent_linearityproving the type row fires through the shared engine and that binder isolation holds (a type pair is not flagged by the term binder).Verified by execution
All 13 witnesses green via
claim_batch. Discrimination proven by perturbation: reverting the predicate to the old always-false behavior turns the RED witnesses (nickname_pair_is_similar,width_family_is_similar) red while the GREEN witness stays correct.simulated_relationship's 6 witnesses unaffected (additivecongruentimport).No
.rstouched; no other consumer referenced the deleted scaffold types.🤖 Generated with Claude Code