Repository navigation
Conversation
Resolve mapped target types before selecting a conversion sort. Accept only the typed identity operator promised by the mapping and keep arbitrary mapped instances unsupported. Add red/green coverage for cast constants, arithmetic and constructor read-back. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Lane: myia-po-2023:CoursIA
jsboige
added a commit
to MyIntelligenceAgency/Z3.Linq
that referenced
this pull request
Nov 24, 2026
Twenty consumer notebooks executed with 235/235 cells and no errors. The mapped conversion defect reproduces on upstream main and is proposed as endjin#129. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Lane: myia-po-2023:CoursIA
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TheoremVariableTypeMappingAttributebefore selecting a conversion target sort.Reproduction
On current
endjin/main964f17704e38399e6ad15a971d3d5aee61fcfb32, the first regression test fails with:The same mapped type already solves as an environment symbol, but
VisitConvertusesTypeCode.Objectand cannot select a sort.Verification
964f177:Solve_ConstantCastToMappedType_TranslatesUsingTheMappedSort, 0 passed / 1 failed.964f17704e,solutions/Directory.Build.propssets<TargetFramework>net10.0</TargetFramework>for every project,Z3.Linq.csprojdeclares no target of its own, and CI installsdotnet-version: '10.x'. There is no net8.0 target here to validate against; the target mismatch met in an earlier net8.0 attempt was that absence, not an unverified part of this patch.Downstream note, for anyone cherry-picking onto a tree that multi-targets net8.0 and evaluates the whole constraint before translating it: there
(ExactReal)2.5is folded into a constant of the mapped type beforeVisitConvertis reached, so this patch alone leaves those tests red, and the fork adds a guard that skips that fold for such constraints (MyIntelligenceAgency#50: suite 475/475 on net10.0 and net8.0 with it). Upstream hands the conversion node to the visitor as written — its red run above fails insideVisitConvert— so nothing here depends on that guard.Part of jsboige/CoursIA#19237 (G4 follow-up for MyIntelligenceAgency#40). This PR does not merge or close #40.
🤖 Generated with Claude Code