Repository navigation
Add named projections of parallel typed resources - #475
Open
MarcIlunga wants to merge 1 commit into
Open
MarcIlunga wants to merge 1 commit into
MarcIlunga wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Adds named projection converters
TypedConverter.projectLeftandTypedConverter.projectRightfor binary parallel typed resources, together with their attachment, retained-draw marginalization, and naturality laws across bothRandomSystems.Typed.Contextand the instance/notation layers.Main changes
src/RandomSystems/Typed/Context.lean:eq_discard,comp_discard,rightUnitor_inv_attach,leftUnitor_inv_attach,comp_rightUnitor_inv,comp_leftUnitor_inv.TypedConverter.projectLeft((ρ_ A).inv ≫ (id A ⊗ discard B)) andTypedConverter.projectRight((λ_ B).inv ≫ (discard A ⊗ id B)).projectLeft_smul_parallel,projectRight_smul_parallel), retained-draw marginalization (projectLeft_smul_sample_parallel,projectRight_smul_sample_parallel), converter naturality (projectLeft_comp_parallel,projectRight_comp_parallel,projectLeft_comp_parallel_id,projectRight_comp_parallel_id), and attachment naturality (projectLeft_smul_parallel_smul,projectRight_smul_parallel_smul).src/ConstructiveCryptography/Instances/Algebra.leanandsrc/ConstructiveCryptography/Notation.lean: exposes the instance-levelInterface.projectLeft_*/Interface.projectRight_*laws (∥,≫,⊗ₘ,▷,◁) and registers them incc_normalization.src/RandomSystems/Typed/README.md: documents the projection converters and laws with updated anchors.src/Tests/ParallelProjections.lean(exported fromsrc/Tests.lean): tests unequal interfaces and query allowances, retained shared randomness (consistent vs. conflicting masses without resampling), and naturality with nontrivial converters, plus#print axiomson all 18 exported declarations.Validation
lake build --wfail(3160 jobs)scripts/check-sources.shandscripts/check-axioms.sh(14496 declarations in 384 modules, 0 outside standard axioms)lake env lean -Dweak.linter.mathlibStandardSet=trueclean on all touched filesDependencies: none (standalone off
main).Closes #213.