Uniform single-query circuit layouts and preparation
DefinitionInfoLossLAR_FirstBridgeBundle_08affine-transportinfo-loss-larquantum-reductions
The query circuit separates public coins, affine preprocessing, and the input registers of the original distinguisher. These definitions specify the coin layout, register loading, prepared basis states, query wiring, and the uniform circuit family emitted from the bounded classical machine description.
Definition code
import Definitions.Def_InfoLossLAR_FirstBridgeBundle_07
open _root_.InfoLossLARNativeSupplements.h7fd26e43562bbe30.AFT.BinaryArithmetic.RationalBits renaming exists_code → AFT.BinaryArithmetic.RationalBits.exists_code
open _root_.InfoLossLARNativeSupplements.h7fd26e43562bbe30.AFT.BinaryArithmetic.RationalBits renaming exists_code → _p2mNativeSupplement0
open _root_.InfoLossLARNativeSupplements.hbc5d2d237f3bc4c8.AFT.BinaryArithmetic renaming bits_value → AFT.BinaryArithmetic.bits_value
open _root_.InfoLossLARNativeSupplements.hbc5d2d237f3bc4c8.AFT.BinaryArithmetic renaming bits_value → _p2mNativeSupplement1
open _root_.InfoLossLARNativeSupplements.h5a8ca90c605f85fc.AFT.CanonicalMoments renaming independent_embedding_expectation_general → AFT.CanonicalMoments.independent_embedding_expectation_general
open _root_.InfoLossLARNativeSupplements.h5a8ca90c605f85fc.AFT.CanonicalMoments renaming independent_embedding_expectation_general → _p2mNativeSupplement2
open _root_.InfoLossLARNativeSupplements.hf808c8dbbd952db7.AFT.CanonicalMoments renaming independent_equiv_expectation_general → AFT.CanonicalMoments.independent_equiv_expectation_general
open _root_.InfoLossLARNativeSupplements.hf808c8dbbd952db7.AFT.CanonicalMoments renaming independent_equiv_expectation_general → _p2mNativeSupplement3
open _root_.InfoLossLARNativeSupplements.h854528c9e123c6f3.AFT.RationalNumerics.HeightBound renaming div → AFT.RationalNumerics.HeightBound.div
open _root_.InfoLossLARNativeSupplements.h854528c9e123c6f3.AFT.RationalNumerics.HeightBound renaming div → _p2mNativeSupplement4
open _root_.InfoLossLARNativeSupplements.ha562531658b7642e.AFT.RationalNumerics.HeightBound renaming inv → AFT.RationalNumerics.HeightBound.inv
open _root_.InfoLossLARNativeSupplements.ha562531658b7642e.AFT.RationalNumerics.HeightBound renaming inv → _p2mNativeSupplement5
open _root_.InfoLossLARNativeSupplements.h4f5add37bf40c2da.AFT.RationalNumerics.HeightBound renaming mono → AFT.RationalNumerics.HeightBound.mono
open _root_.InfoLossLARNativeSupplements.h4f5add37bf40c2da.AFT.RationalNumerics.HeightBound renaming mono → _p2mNativeSupplement6
open _root_.InfoLossLARNativeSupplements.hec331a1b1191da2d.AFT.RationalNumerics.HeightBound renaming mul → AFT.RationalNumerics.HeightBound.mul
open _root_.InfoLossLARNativeSupplements.hec331a1b1191da2d.AFT.RationalNumerics.HeightBound renaming mul → _p2mNativeSupplement7
open _root_.InfoLossLARNativeSupplements.hca9f3ecea512145f.AFT.RationalNumerics.HeightBound renaming of_int → AFT.RationalNumerics.HeightBound.of_int
open _root_.InfoLossLARNativeSupplements.hca9f3ecea512145f.AFT.RationalNumerics.HeightBound renaming of_int → _p2mNativeSupplement8
open _root_.InfoLossLARNativeSupplements.h5b3dd70c728d6348.AFT.RationalNumerics.HeightBound renaming of_nat → AFT.RationalNumerics.HeightBound.of_nat
open _root_.InfoLossLARNativeSupplements.h5b3dd70c728d6348.AFT.RationalNumerics.HeightBound renaming of_nat → _p2mNativeSupplement9
open _root_.InfoLossLARNativeSupplements.h8fac5110874b5cd9.AFT.RationalNumerics.HeightBound renaming one → AFT.RationalNumerics.HeightBound.one
open _root_.InfoLossLARNativeSupplements.h8fac5110874b5cd9.AFT.RationalNumerics.HeightBound renaming one → _p2mNativeSupplement10
open _root_.InfoLossLARNativeSupplements.h90032182500c2e77.AFT.RationalNumerics.HeightBound renaming pow → AFT.RationalNumerics.HeightBound.pow
open _root_.InfoLossLARNativeSupplements.h90032182500c2e77.AFT.RationalNumerics.HeightBound renaming pow → _p2mNativeSupplement11
open _root_.InfoLossLARNativeSupplements.h6381918e2bfc67e4.AFT.RationalNumerics renaming arctanSum_error → AFT.RationalNumerics.arctanSum_error
open _root_.InfoLossLARNativeSupplements.h6381918e2bfc67e4.AFT.RationalNumerics renaming arctanSum_error → _p2mNativeSupplement12
open _root_.InfoLossLARNativeSupplements.h3497cf28d345cc71.AFT.RationalNumerics renaming arctan_term_bound → AFT.RationalNumerics.arctan_term_bound
open _root_.InfoLossLARNativeSupplements.h3497cf28d345cc71.AFT.RationalNumerics renaming arctan_term_bound → _p2mNativeSupplement13
open _root_.InfoLossLARNativeSupplements.had468f01f375d910.AFT.RationalNumerics renaming boundedRootList_nodup → AFT.RationalNumerics.boundedRootList_nodup
open _root_.InfoLossLARNativeSupplements.had468f01f375d910.AFT.RationalNumerics renaming boundedRootList_nodup → _p2mNativeSupplement14
open _root_.InfoLossLARNativeSupplements.h41ae6c8d47a51d34.AFT.RationalNumerics renaming commonDenominator_le → AFT.RationalNumerics.commonDenominator_le
open _root_.InfoLossLARNativeSupplements.h41ae6c8d47a51d34.AFT.RationalNumerics renaming commonDenominator_le → _p2mNativeSupplement15
open _root_.InfoLossLARNativeSupplements.h5f0d1be1226eed7f.AFT.RationalNumerics renaming commonDenominator_pos → AFT.RationalNumerics.commonDenominator_pos
open _root_.InfoLossLARNativeSupplements.h5f0d1be1226eed7f.AFT.RationalNumerics renaming commonDenominator_pos → _p2mNativeSupplement16
open _root_.InfoLossLARNativeSupplements.h1076ff82614707e5.AFT.RationalNumerics renaming commonNumerator_abs_le → AFT.RationalNumerics.commonNumerator_abs_le
open _root_.InfoLossLARNativeSupplements.h1076ff82614707e5.AFT.RationalNumerics renaming commonNumerator_abs_le → _p2mNativeSupplement17
open _root_.InfoLossLARNativeSupplements.h3827d5d7d51242c6.AFT.RationalNumerics renaming commonNumerator_cast → AFT.RationalNumerics.commonNumerator_cast
open _root_.InfoLossLARNativeSupplements.h3827d5d7d51242c6.AFT.RationalNumerics renaming commonNumerator_cast → _p2mNativeSupplement18
open _root_.InfoLossLARNativeSupplements.h4b0b2c49d14fd209.AFT.RationalNumerics renaming commonNumerator_div → AFT.RationalNumerics.commonNumerator_div
open _root_.InfoLossLARNativeSupplements.h4b0b2c49d14fd209.AFT.RationalNumerics renaming commonNumerator_div → _p2mNativeSupplement19
open _root_.InfoLossLARNativeSupplements.h2882c93186ab7cf8.AFT.RationalNumerics renaming denominator_dvd_common → AFT.RationalNumerics.denominator_dvd_common
open _root_.InfoLossLARNativeSupplements.h2882c93186ab7cf8.AFT.RationalNumerics renaming denominator_dvd_common → _p2mNativeSupplement20
open _root_.InfoLossLARNativeSupplements.h05d99dd2bef78a64.AFT.RationalNumerics renaming integerLinearIteration_abs_le → AFT.RationalNumerics.integerLinearIteration_abs_le
open _root_.InfoLossLARNativeSupplements.h05d99dd2bef78a64.AFT.RationalNumerics renaming integerLinearIteration_abs_le → _p2mNativeSupplement21
open _root_.InfoLossLARNativeSupplements.hc6ad092b2f522781.AFT.RationalNumerics renaming integerLinearIteration_exact → AFT.RationalNumerics.integerLinearIteration_exact
open _root_.InfoLossLARNativeSupplements.hc6ad092b2f522781.AFT.RationalNumerics renaming integerLinearIteration_exact → _p2mNativeSupplement22
open _root_.InfoLossLARNativeSupplements.hdcd54a4fdf95f258.AFT.RationalNumerics renaming integerLinearIteration_height → AFT.RationalNumerics.integerLinearIteration_height
open _root_.InfoLossLARNativeSupplements.hdcd54a4fdf95f258.AFT.RationalNumerics renaming integerLinearIteration_height → _p2mNativeSupplement23
open _root_.InfoLossLARNativeSupplements.he7db6c4ee6224eee.AFT.RationalNumerics renaming linearIteration_height → AFT.RationalNumerics.linearIteration_height
open _root_.InfoLossLARNativeSupplements.he7db6c4ee6224eee.AFT.RationalNumerics renaming linearIteration_height → _p2mNativeSupplement24
open _root_.InfoLossLARNativeSupplements.h18af7218e3ae5082.AFT.RationalNumerics renaming mem_boundedRootList → AFT.RationalNumerics.mem_boundedRootList
open _root_.InfoLossLARNativeSupplements.h18af7218e3ae5082.AFT.RationalNumerics renaming mem_boundedRootList → _p2mNativeSupplement25
open _root_.InfoLossLARNativeSupplements.h878260dd8e6c9a6e.AFT.RationalNumerics renaming piApprox_error → AFT.RationalNumerics.piApprox_error
open _root_.InfoLossLARNativeSupplements.h878260dd8e6c9a6e.AFT.RationalNumerics renaming piApprox_error → _p2mNativeSupplement26
open _root_.InfoLossLARNativeSupplements.h91d71a61f0497f7b.AFT.RationalNumerics renaming piApprox_le_five → AFT.RationalNumerics.piApprox_le_five
open _root_.InfoLossLARNativeSupplements.h91d71a61f0497f7b.AFT.RationalNumerics renaming piApprox_le_five → _p2mNativeSupplement27
open _root_.InfoLossLARNativeSupplements.hb0db73987b7b1eff.AFT.V7Calibration renaming actualPublicBodyChoice_nonempty → AFT.V7Calibration.actualPublicBodyChoice_nonempty
open _root_.InfoLossLARNativeSupplements.hb0db73987b7b1eff.AFT.V7Calibration renaming actualPublicBodyChoice_nonempty → _p2mNativeSupplement28
open _root_.InfoLossLARNativeSupplements.hb6587a05bd2df660.AFT.V7Calibration renaming actualPublicPrimaryChoice_nonempty → AFT.V7Calibration.actualPublicPrimaryChoice_nonempty
open _root_.InfoLossLARNativeSupplements.hb6587a05bd2df660.AFT.V7Calibration renaming actualPublicPrimaryChoice_nonempty → _p2mNativeSupplement29
open _root_.InfoLossLARNativeSupplements.he83cfe7a7db39d44.CurrentAFT.BinaryFiniteProduct renaming current_value → CurrentAFT.BinaryFiniteProduct.current_value
open _root_.InfoLossLARNativeSupplements.he83cfe7a7db39d44.CurrentAFT.BinaryFiniteProduct renaming current_value → _p2mNativeSupplement30
open _root_.InfoLossLARNativeSupplements.hf109288ce2bff41a.CurrentAFT.BinaryFullResponseCounts renaming current_sizes → CurrentAFT.BinaryFullResponseCounts.current_sizes
open _root_.InfoLossLARNativeSupplements.hf109288ce2bff41a.CurrentAFT.BinaryFullResponseCounts renaming current_sizes → _p2mNativeSupplement31
open _root_.InfoLossLARNativeSupplements.hab90893a8a9293a2.CurrentAFT.BinaryListSum renaming current_value → CurrentAFT.BinaryListSum.current_value
open _root_.InfoLossLARNativeSupplements.hab90893a8a9293a2.CurrentAFT.BinaryListSum renaming current_value → _p2mNativeSupplement32
open _root_.InfoLossLARNativeSupplements.hb7b15c9a79e648be.CurrentAFT.BinaryRootMetadataSerializer renaming actualChoice_ordinary → CurrentAFT.BinaryRootMetadataSerializer.actualChoice_ordinary
open _root_.InfoLossLARNativeSupplements.hb7b15c9a79e648be.CurrentAFT.BinaryRootMetadataSerializer renaming actualChoice_ordinary → _p2mNativeSupplement33
open _root_.InfoLossLARNativeSupplements.h9bd8eaff2c880c78.CurrentAFT.BinaryRootMetadataSerializer renaming actualChoice_primary → CurrentAFT.BinaryRootMetadataSerializer.actualChoice_primary
open _root_.InfoLossLARNativeSupplements.h9bd8eaff2c880c78.CurrentAFT.BinaryRootMetadataSerializer renaming actualChoice_primary → _p2mNativeSupplement34
open _root_.InfoLossLARNativeSupplements.ha802267fba3ae37a.CurrentAFT.BinaryRootMetadataSerializer renaming candidate_input → CurrentAFT.BinaryRootMetadataSerializer.candidate_input
open _root_.InfoLossLARNativeSupplements.ha802267fba3ae37a.CurrentAFT.BinaryRootMetadataSerializer renaming candidate_input → _p2mNativeSupplement35
open _root_.InfoLossLARNativeSupplements.h1ccc0b12a2e9b2e7.CurrentAFT.BinaryRootMetadataSerializer renaming candidate_kept → CurrentAFT.BinaryRootMetadataSerializer.candidate_kept
open _root_.InfoLossLARNativeSupplements.h1ccc0b12a2e9b2e7.CurrentAFT.BinaryRootMetadataSerializer renaming candidate_kept → _p2mNativeSupplement36
open _root_.InfoLossLARNativeSupplements.hf63ab620f3c57a9b.CurrentAFT.BinaryRootMetadataSerializer renaming candidate_ordinary → CurrentAFT.BinaryRootMetadataSerializer.candidate_ordinary
open _root_.InfoLossLARNativeSupplements.hf63ab620f3c57a9b.CurrentAFT.BinaryRootMetadataSerializer renaming candidate_ordinary → _p2mNativeSupplement37
open _root_.InfoLossLARNativeSupplements.h8b1af35cb5128d1e.CurrentAFT.BinaryRootMetadataSerializer renaming candidate_primary → CurrentAFT.BinaryRootMetadataSerializer.candidate_primary
open _root_.InfoLossLARNativeSupplements.h8b1af35cb5128d1e.CurrentAFT.BinaryRootMetadataSerializer renaming candidate_primary → _p2mNativeSupplement38
open _root_.InfoLossLARNativeSupplements.hc002c1f58373bc9e.CurrentAFT.BinaryRootMetadataSerializer renaming classify_numbering → CurrentAFT.BinaryRootMetadataSerializer.classify_numbering
open _root_.InfoLossLARNativeSupplements.hc002c1f58373bc9e.CurrentAFT.BinaryRootMetadataSerializer renaming classify_numbering → _p2mNativeSupplement39
open _root_.InfoLossLARNativeSupplements.h0654708b8f7abd41.CurrentAFT.BinaryRootMetadataSerializer renaming current_castMetadata → CurrentAFT.BinaryRootMetadataSerializer.current_castMetadata
open _root_.InfoLossLARNativeSupplements.h0654708b8f7abd41.CurrentAFT.BinaryRootMetadataSerializer renaming current_castMetadata → _p2mNativeSupplement40
open _root_.InfoLossLARNativeSupplements.h62365cd168bf9746.CurrentAFT.BinaryRootMetadataSerializer renaming current_cast_tags → CurrentAFT.BinaryRootMetadataSerializer.current_cast_tags
open _root_.InfoLossLARNativeSupplements.h62365cd168bf9746.CurrentAFT.BinaryRootMetadataSerializer renaming current_cast_tags → _p2mNativeSupplement41
open _root_.InfoLossLARNativeSupplements.hd04a074a03468451.CurrentAFT.BinaryRootMetadataSerializer renaming current_congr_counts → CurrentAFT.BinaryRootMetadataSerializer.current_congr_counts
open _root_.InfoLossLARNativeSupplements.hd04a074a03468451.CurrentAFT.BinaryRootMetadataSerializer renaming current_congr_counts → _p2mNativeSupplement42
open _root_.InfoLossLARNativeSupplements.h92779a9b15e1ad74.CurrentAFT.BinaryRootMetadataSerializer renaming current_kept_le → CurrentAFT.BinaryRootMetadataSerializer.current_kept_le
open _root_.InfoLossLARNativeSupplements.h92779a9b15e1ad74.CurrentAFT.BinaryRootMetadataSerializer renaming current_kept_le → _p2mNativeSupplement43
open _root_.InfoLossLARNativeSupplements.h5d3e6518d488d268.CurrentAFT.BinaryRootMetadataSerializer renaming current_metadata_actual → CurrentAFT.BinaryRootMetadataSerializer.current_metadata_actual
open _root_.InfoLossLARNativeSupplements.h5d3e6518d488d268.CurrentAFT.BinaryRootMetadataSerializer renaming current_metadata_actual → _p2mNativeSupplement44
open _root_.InfoLossLARNativeSupplements.h6da04ab1cb4f0ae9.CurrentAFT.BinaryRootMetadataSerializer renaming current_native_counts → CurrentAFT.BinaryRootMetadataSerializer.current_native_counts
open _root_.InfoLossLARNativeSupplements.h6da04ab1cb4f0ae9.CurrentAFT.BinaryRootMetadataSerializer renaming current_native_counts → _p2mNativeSupplement45
open _root_.InfoLossLARNativeSupplements.h0034013fd46e34b6.CurrentAFT.BinaryRootMetadataSerializer renaming current_rational_actual → CurrentAFT.BinaryRootMetadataSerializer.current_rational_actual
open _root_.InfoLossLARNativeSupplements.h0034013fd46e34b6.CurrentAFT.BinaryRootMetadataSerializer renaming current_rational_actual → _p2mNativeSupplement46
open _root_.InfoLossLARNativeSupplements.he41810aeef644de7.CurrentAFT.BinaryRootMetadataSerializer renaming current_rational_native → CurrentAFT.BinaryRootMetadataSerializer.current_rational_native
open _root_.InfoLossLARNativeSupplements.he41810aeef644de7.CurrentAFT.BinaryRootMetadataSerializer renaming current_rational_native → _p2mNativeSupplement47
open _root_.InfoLossLARNativeSupplements.hdf21f91932116c35.CurrentAFT.BinaryRootMetadataSerializer renaming current_role → CurrentAFT.BinaryRootMetadataSerializer.current_role
open _root_.InfoLossLARNativeSupplements.hdf21f91932116c35.CurrentAFT.BinaryRootMetadataSerializer renaming current_role → _p2mNativeSupplement48
open _root_.InfoLossLARNativeSupplements.h2f02b0da80d0da15.CurrentAFT.BinaryRootMetadataSerializer renaming current_role_actual → CurrentAFT.BinaryRootMetadataSerializer.current_role_actual
open _root_.InfoLossLARNativeSupplements.h2f02b0da80d0da15.CurrentAFT.BinaryRootMetadataSerializer renaming current_role_actual → _p2mNativeSupplement49
open _root_.InfoLossLARNativeSupplements.hf05bd272bb1b56e1.CurrentAFT.BinaryRootMetadataSerializer renaming current_tagSlot → CurrentAFT.BinaryRootMetadataSerializer.current_tagSlot
open _root_.InfoLossLARNativeSupplements.hf05bd272bb1b56e1.CurrentAFT.BinaryRootMetadataSerializer renaming current_tagSlot → _p2mNativeSupplement50
open _root_.InfoLossLARNativeSupplements.h99dea6e0b2cb92cd.CurrentAFT.BinaryRootMetadataSerializer renaming current_tagSlot_actual → CurrentAFT.BinaryRootMetadataSerializer.current_tagSlot_actual
open _root_.InfoLossLARNativeSupplements.h99dea6e0b2cb92cd.CurrentAFT.BinaryRootMetadataSerializer renaming current_tagSlot_actual → _p2mNativeSupplement51
open _root_.InfoLossLARNativeSupplements.h5aa51497de94248a.CurrentAFT.BinaryRootMetadataSerializer renaming find_value → CurrentAFT.BinaryRootMetadataSerializer.find_value
open _root_.InfoLossLARNativeSupplements.h5aa51497de94248a.CurrentAFT.BinaryRootMetadataSerializer renaming find_value → _p2mNativeSupplement52
open _root_.InfoLossLARNativeSupplements.he1ba053a04ebe416.CurrentAFT.BinaryRootMetadataSerializer renaming inputOrdering_symm_kept → CurrentAFT.BinaryRootMetadataSerializer.inputOrdering_symm_kept
open _root_.InfoLossLARNativeSupplements.he1ba053a04ebe416.CurrentAFT.BinaryRootMetadataSerializer renaming inputOrdering_symm_kept → _p2mNativeSupplement53
open _root_.InfoLossLARNativeSupplements.hb19b481a4ab916e9.CurrentAFT.BinaryRootMetadataSerializer renaming inputOrdering_symm_ordinary → CurrentAFT.BinaryRootMetadataSerializer.inputOrdering_symm_ordinary
open _root_.InfoLossLARNativeSupplements.hb19b481a4ab916e9.CurrentAFT.BinaryRootMetadataSerializer renaming inputOrdering_symm_ordinary → _p2mNativeSupplement54
open _root_.InfoLossLARNativeSupplements.h925bf1f311c5581d.CurrentAFT.BinaryRootMetadataSerializer renaming inputOrdering_symm_primary → CurrentAFT.BinaryRootMetadataSerializer.inputOrdering_symm_primary
open _root_.InfoLossLARNativeSupplements.h925bf1f311c5581d.CurrentAFT.BinaryRootMetadataSerializer renaming inputOrdering_symm_primary → _p2mNativeSupplement55
open _root_.InfoLossLARNativeSupplements.h28bdeb915df6f31b.CurrentAFT.BinaryRootMetadataSerializer renaming keptOrdering_number → CurrentAFT.BinaryRootMetadataSerializer.keptOrdering_number
open _root_.InfoLossLARNativeSupplements.h28bdeb915df6f31b.CurrentAFT.BinaryRootMetadataSerializer renaming keptOrdering_number → _p2mNativeSupplement56
open _root_.InfoLossLARNativeSupplements.hd98ece77ce245c62.CurrentAFT.BinaryRootMetadataSerializer renaming kept_length_le → CurrentAFT.BinaryRootMetadataSerializer.kept_length_le
open _root_.InfoLossLARNativeSupplements.hd98ece77ce245c62.CurrentAFT.BinaryRootMetadataSerializer renaming kept_length_le → _p2mNativeSupplement57
open _root_.InfoLossLARNativeSupplements.h0c3b1f75a36dc0a1.CurrentAFT.BinaryRootMetadataSerializer renaming matchesBlock_input → CurrentAFT.BinaryRootMetadataSerializer.matchesBlock_input
open _root_.InfoLossLARNativeSupplements.h0c3b1f75a36dc0a1.CurrentAFT.BinaryRootMetadataSerializer renaming matchesBlock_input → _p2mNativeSupplement58
open _root_.InfoLossLARNativeSupplements.h3614eab28d16c434.CurrentAFT.BinaryRootMetadataSerializer renaming matchesBlock_value → CurrentAFT.BinaryRootMetadataSerializer.matchesBlock_value
open _root_.InfoLossLARNativeSupplements.h3614eab28d16c434.CurrentAFT.BinaryRootMetadataSerializer renaming matchesBlock_value → _p2mNativeSupplement59
open _root_.InfoLossLARNativeSupplements.h7211ad64e277ecd6.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_get → CurrentAFT.BinaryRootMetadataSerializer.nativeTag_get
open _root_.InfoLossLARNativeSupplements.h7211ad64e277ecd6.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_get → _p2mNativeSupplement60
open _root_.InfoLossLARNativeSupplements.h5bfd14958fa45ca1.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_increasing → CurrentAFT.BinaryRootMetadataSerializer.nativeTag_increasing
open _root_.InfoLossLARNativeSupplements.h5bfd14958fa45ca1.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_increasing → _p2mNativeSupplement61
open _root_.InfoLossLARNativeSupplements.h830e34787bfcc36e.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_membership → CurrentAFT.BinaryRootMetadataSerializer.nativeTag_membership
open _root_.InfoLossLARNativeSupplements.h830e34787bfcc36e.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_membership → _p2mNativeSupplement62
open _root_.InfoLossLARNativeSupplements.hdf4e90e4faeda9bb.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_tagsInput → CurrentAFT.BinaryRootMetadataSerializer.nativeTag_tagsInput
open _root_.InfoLossLARNativeSupplements.hdf4e90e4faeda9bb.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_tagsInput → _p2mNativeSupplement63
open _root_.InfoLossLARNativeSupplements.h0eb6479555712d22.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_tagsInput_vector → CurrentAFT.BinaryRootMetadataSerializer.nativeTag_tagsInput_vector
open _root_.InfoLossLARNativeSupplements.h0eb6479555712d22.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_tagsInput_vector → _p2mNativeSupplement64
open _root_.InfoLossLARNativeSupplements.he3484ce79e618bef.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_value → CurrentAFT.BinaryRootMetadataSerializer.nativeTag_value
open _root_.InfoLossLARNativeSupplements.he3484ce79e618bef.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_value → _p2mNativeSupplement65
open _root_.InfoLossLARNativeSupplements.hb10c61056b84e123.CurrentAFT.BinaryRootMetadataSerializer renaming position_input → CurrentAFT.BinaryRootMetadataSerializer.position_input
open _root_.InfoLossLARNativeSupplements.hb10c61056b84e123.CurrentAFT.BinaryRootMetadataSerializer renaming position_input → _p2mNativeSupplement66
open _root_.InfoLossLARNativeSupplements.h717398dca61c08fb.CurrentAFT.BinaryRootMetadataSerializer renaming rational_current_cast_tags → CurrentAFT.BinaryRootMetadataSerializer.rational_current_cast_tags
open _root_.InfoLossLARNativeSupplements.h717398dca61c08fb.CurrentAFT.BinaryRootMetadataSerializer renaming rational_current_cast_tags → _p2mNativeSupplement67
open _root_.InfoLossLARNativeSupplements.h5c1679d60747a3c8.CurrentAFT.BinaryRootMetadataSerializer renaming retainedInput_at_group → CurrentAFT.BinaryRootMetadataSerializer.retainedInput_at_group
open _root_.InfoLossLARNativeSupplements.h5c1679d60747a3c8.CurrentAFT.BinaryRootMetadataSerializer renaming retainedInput_at_group → _p2mNativeSupplement68
open _root_.InfoLossLARNativeSupplements.hd10b40ce4e5fb3ce.CurrentAFT.BinaryRootMetadataSerializer renaming retainedInput_get → CurrentAFT.BinaryRootMetadataSerializer.retainedInput_get
open _root_.InfoLossLARNativeSupplements.hd10b40ce4e5fb3ce.CurrentAFT.BinaryRootMetadataSerializer renaming retainedInput_get → _p2mNativeSupplement69
open _root_.InfoLossLARNativeSupplements.h790debae9bc7d744.CurrentAFT.BinaryRootMetadataSerializer renaming role_input → CurrentAFT.BinaryRootMetadataSerializer.role_input
open _root_.InfoLossLARNativeSupplements.h790debae9bc7d744.CurrentAFT.BinaryRootMetadataSerializer renaming role_input → _p2mNativeSupplement70
open _root_.InfoLossLARNativeSupplements.h36433fb6e771176d.CurrentAFT.BinaryRootMetadataSerializer renaming role_kept → CurrentAFT.BinaryRootMetadataSerializer.role_kept
open _root_.InfoLossLARNativeSupplements.h36433fb6e771176d.CurrentAFT.BinaryRootMetadataSerializer renaming role_kept → _p2mNativeSupplement71
open _root_.InfoLossLARNativeSupplements.h1c0aacbfbcab259c.CurrentAFT.BinaryRootMetadataSerializer renaming role_ordinary → CurrentAFT.BinaryRootMetadataSerializer.role_ordinary
open _root_.InfoLossLARNativeSupplements.h1c0aacbfbcab259c.CurrentAFT.BinaryRootMetadataSerializer renaming role_ordinary → _p2mNativeSupplement72
open _root_.InfoLossLARNativeSupplements.had28d56c66c172c2.CurrentAFT.BinaryRootMetadataSerializer renaming role_primary → CurrentAFT.BinaryRootMetadataSerializer.role_primary
open _root_.InfoLossLARNativeSupplements.had28d56c66c172c2.CurrentAFT.BinaryRootMetadataSerializer renaming role_primary → _p2mNativeSupplement73
open _root_.InfoLossLARNativeSupplements.hf7b606d7b6c71037.CurrentAFT.BinaryRootMetadataSerializer renaming splitIndex_value → CurrentAFT.BinaryRootMetadataSerializer.splitIndex_value
open _root_.InfoLossLARNativeSupplements.hf7b606d7b6c71037.CurrentAFT.BinaryRootMetadataSerializer renaming splitIndex_value → _p2mNativeSupplement74
open _root_.InfoLossLARNativeSupplements.hc171b658125977dd.CurrentAFT.BinaryRootMetadataSerializer renaming tagBlocks_card → CurrentAFT.BinaryRootMetadataSerializer.tagBlocks_card
open _root_.InfoLossLARNativeSupplements.hc171b658125977dd.CurrentAFT.BinaryRootMetadataSerializer renaming tagBlocks_card → _p2mNativeSupplement75
open _root_.InfoLossLARNativeSupplements.h864990220cd05a68.CurrentAFT.BinaryRootMetadataSerializer renaming tagSlot_input → CurrentAFT.BinaryRootMetadataSerializer.tagSlot_input
open _root_.InfoLossLARNativeSupplements.h864990220cd05a68.CurrentAFT.BinaryRootMetadataSerializer renaming tagSlot_input → _p2mNativeSupplement76
open _root_.InfoLossLARNativeSupplements.he99bee3d04267632.CurrentAFT.BinaryRootMetadataSerializer renaming tagsInput_get → CurrentAFT.BinaryRootMetadataSerializer.tagsInput_get
open _root_.InfoLossLARNativeSupplements.he99bee3d04267632.CurrentAFT.BinaryRootMetadataSerializer renaming tagsInput_get → _p2mNativeSupplement77
open _root_.InfoLossLARNativeSupplements.h15d8c2848429780a.CurrentAFT.BinaryRootMetadataSerializer renaming vector_count_cast_get → CurrentAFT.BinaryRootMetadataSerializer.vector_count_cast_get
open _root_.InfoLossLARNativeSupplements.h15d8c2848429780a.CurrentAFT.BinaryRootMetadataSerializer renaming vector_count_cast_get → _p2mNativeSupplement78
open _root_.InfoLossLARNativeSupplements.h6033ffbe1c08cc96.CurrentAFT.BinaryRootMetadataSerializer renaming vector_length_cast_get → CurrentAFT.BinaryRootMetadataSerializer.vector_length_cast_get
open _root_.InfoLossLARNativeSupplements.h6033ffbe1c08cc96.CurrentAFT.BinaryRootMetadataSerializer renaming vector_length_cast_get → _p2mNativeSupplement79
open _root_.InfoLossLARNativeSupplements.he438d921f6936ff8.CurrentAFT.BinaryRootMetadataSerializer renaming vector_mem_toList → CurrentAFT.BinaryRootMetadataSerializer.vector_mem_toList
open _root_.InfoLossLARNativeSupplements.he438d921f6936ff8.CurrentAFT.BinaryRootMetadataSerializer renaming vector_mem_toList → _p2mNativeSupplement80
open _root_.InfoLossLARNativeSupplements.he37fcb2fedaaad11.CurrentAFT.BinarySparseCycleEvaluation renaming current_tuple_value → CurrentAFT.BinarySparseCycleEvaluation.current_tuple_value
open _root_.InfoLossLARNativeSupplements.he37fcb2fedaaad11.CurrentAFT.BinarySparseCycleEvaluation renaming current_tuple_value → _p2mNativeSupplement81
open _root_.InfoLossLARNativeSupplements.h42f327202f6ffc34.CurrentAFT.BinarySparseCycleEvaluation renaming rootEntry_value → CurrentAFT.BinarySparseCycleEvaluation.rootEntry_value
open _root_.InfoLossLARNativeSupplements.h42f327202f6ffc34.CurrentAFT.BinarySparseCycleEvaluation renaming rootEntry_value → _p2mNativeSupplement82
open _root_.InfoLossLARNativeSupplements.h046841627a1cee9b.CurrentAFT.BinarySparseCycleEvaluation renaming roots_value → CurrentAFT.BinarySparseCycleEvaluation.roots_value
open _root_.InfoLossLARNativeSupplements.h046841627a1cee9b.CurrentAFT.BinarySparseCycleEvaluation renaming roots_value → _p2mNativeSupplement83
open _root_.InfoLossLARNativeSupplements.hd0df78f75d4d893f.CurrentAFT.BinarySparseCycleEvaluation renaming term_value → CurrentAFT.BinarySparseCycleEvaluation.term_value
open _root_.InfoLossLARNativeSupplements.hd0df78f75d4d893f.CurrentAFT.BinarySparseCycleEvaluation renaming term_value → _p2mNativeSupplement84
open _root_.InfoLossLARNativeSupplements.hf4f5fd4dcb0d678c.CurrentAFT.BinarySparseCycleEvaluation renaming weightEntry_value → CurrentAFT.BinarySparseCycleEvaluation.weightEntry_value
open _root_.InfoLossLARNativeSupplements.hf4f5fd4dcb0d678c.CurrentAFT.BinarySparseCycleEvaluation renaming weightEntry_value → _p2mNativeSupplement85
open _root_.InfoLossLARNativeSupplements.haf9b5363dbfc3f4c.CurrentAFT.BinarySparseCycleSemantic renaming coordinates_apply → CurrentAFT.BinarySparseCycleSemantic.coordinates_apply
open _root_.InfoLossLARNativeSupplements.haf9b5363dbfc3f4c.CurrentAFT.BinarySparseCycleSemantic renaming coordinates_apply → _p2mNativeSupplement86
open _root_.InfoLossLARNativeSupplements.hb39aff037bdc4326.CurrentAFT.BinarySparseCycleSemantic renaming current_value → CurrentAFT.BinarySparseCycleSemantic.current_value
open _root_.InfoLossLARNativeSupplements.hb39aff037bdc4326.CurrentAFT.BinarySparseCycleSemantic renaming current_value → _p2mNativeSupplement87
open _root_.InfoLossLARNativeSupplements.h0cda298b0874d5b6.CurrentAFT.BinarySparseCycleSemantic renaming product_coordinates → CurrentAFT.BinarySparseCycleSemantic.product_coordinates
open _root_.InfoLossLARNativeSupplements.h0cda298b0874d5b6.CurrentAFT.BinarySparseCycleSemantic renaming product_coordinates → _p2mNativeSupplement88
open _root_.InfoLossLARNativeSupplements.h10d530ee15bdc77f.CurrentAFT.BinarySparseCycleSemantic renaming roots_coordinates → CurrentAFT.BinarySparseCycleSemantic.roots_coordinates
open _root_.InfoLossLARNativeSupplements.h10d530ee15bdc77f.CurrentAFT.BinarySparseCycleSemantic renaming roots_coordinates → _p2mNativeSupplement89
open _root_.InfoLossLARNativeSupplements.h5cfbe96a887c7fbe.CurrentAFT.BinaryTouchedCycle renaming candidates_length → CurrentAFT.BinaryTouchedCycle.candidates_length
open _root_.InfoLossLARNativeSupplements.h5cfbe96a887c7fbe.CurrentAFT.BinaryTouchedCycle renaming candidates_length → _p2mNativeSupplement90
open _root_.InfoLossLARNativeSupplements.hbcb1352f59b47e7a.CurrentAFT.BinaryTouchedCycle renaming prepare_length → CurrentAFT.BinaryTouchedCycle.prepare_length
open _root_.InfoLossLARNativeSupplements.hbcb1352f59b47e7a.CurrentAFT.BinaryTouchedCycle renaming prepare_length → _p2mNativeSupplement91
open _root_.InfoLossLARNativeSupplements.h7b66ba8c3614b749.CurrentAFT.BinaryTouchedCycle renaming unique_length → CurrentAFT.BinaryTouchedCycle.unique_length
open _root_.InfoLossLARNativeSupplements.h7b66ba8c3614b749.CurrentAFT.BinaryTouchedCycle renaming unique_length → _p2mNativeSupplement92
open _root_.InfoLossLARNativeSupplements.h8bc15ae79e4624be.CurrentAFT.BinaryTouchedCycleBuffer renaming lookup_value → CurrentAFT.BinaryTouchedCycleBuffer.lookup_value
open _root_.InfoLossLARNativeSupplements.h8bc15ae79e4624be.CurrentAFT.BinaryTouchedCycleBuffer renaming lookup_value → _p2mNativeSupplement93
open _root_.InfoLossLARNativeSupplements.hf362d6b0d865f5c6.CurrentAFT.BinaryTouchedCycleRanks renaming positions_value → CurrentAFT.BinaryTouchedCycleRanks.positions_value
open _root_.InfoLossLARNativeSupplements.hf362d6b0d865f5c6.CurrentAFT.BinaryTouchedCycleRanks renaming positions_value → _p2mNativeSupplement94
open _root_.InfoLossLARNativeSupplements.h4cdf4f6ad2d19d90.CurrentAFT.BinaryTupleSum renaming current_value → CurrentAFT.BinaryTupleSum.current_value
open _root_.InfoLossLARNativeSupplements.h4cdf4f6ad2d19d90.CurrentAFT.BinaryTupleSum renaming current_value → _p2mNativeSupplement95
open _root_.InfoLossLARNativeSupplements.ha8fcea89e723dc23.CurrentAFT.BinaryTupleSum renaming get_ofFn_fun → CurrentAFT.BinaryTupleSum.get_ofFn_fun
open _root_.InfoLossLARNativeSupplements.ha8fcea89e723dc23.CurrentAFT.BinaryTupleSum renaming get_ofFn_fun → _p2mNativeSupplement96
open _root_.InfoLossLARNativeSupplements.ha84cbfc4268e8d40.CurrentAFT.BinaryTupleSum renaming prepend_get → CurrentAFT.BinaryTupleSum.prepend_get
open _root_.InfoLossLARNativeSupplements.ha84cbfc4268e8d40.CurrentAFT.BinaryTupleSum renaming prepend_get → _p2mNativeSupplement97
open _root_.InfoLossLARNativeSupplements.hcca3d782e3229b7c.CurrentAFT.BinaryTupleSum renaming prepend_value → CurrentAFT.BinaryTupleSum.prepend_value
open _root_.InfoLossLARNativeSupplements.hcca3d782e3229b7c.CurrentAFT.BinaryTupleSum renaming prepend_value → _p2mNativeSupplement98
open _root_.InfoLossLARNativeSupplements.h78d75bb492074482.CurrentAFT.CountedBoundedRootTags.Tag renaming card → CurrentAFT.CountedBoundedRootTags.Tag.card
open _root_.InfoLossLARNativeSupplements.h78d75bb492074482.CurrentAFT.CountedBoundedRootTags.Tag renaming card → _p2mNativeSupplement99
open _root_.InfoLossLARNativeSupplements.h9568a61082f27bb9.CurrentAFT.CountedBoundedRootTags.Tag renaming nodup → CurrentAFT.CountedBoundedRootTags.Tag.nodup
open _root_.InfoLossLARNativeSupplements.h9568a61082f27bb9.CurrentAFT.CountedBoundedRootTags.Tag renaming nodup → _p2mNativeSupplement100
open _root_.InfoLossLARNativeSupplements.hf6e7f4bd634f80a9.CurrentAFT.CountedBoundedRootTags.Tag renaming read_value → CurrentAFT.CountedBoundedRootTags.Tag.read_value
open _root_.InfoLossLARNativeSupplements.hf6e7f4bd634f80a9.CurrentAFT.CountedBoundedRootTags.Tag renaming read_value → _p2mNativeSupplement101
open _root_.InfoLossLARNativeSupplements.hd05ef333dfb7baf7.CurrentAFT.CountedBoundedRootTags.Tag renaming store_value → CurrentAFT.CountedBoundedRootTags.Tag.store_value
open _root_.InfoLossLARNativeSupplements.hd05ef333dfb7baf7.CurrentAFT.CountedBoundedRootTags.Tag renaming store_value → _p2mNativeSupplement102
open _root_.InfoLossLARNativeSupplements.h8bf8720ebb55498f.CurrentAFT.CountedBoundedRootTags.Tag renaming vector_increasing → CurrentAFT.CountedBoundedRootTags.Tag.vector_increasing
open _root_.InfoLossLARNativeSupplements.h8bf8720ebb55498f.CurrentAFT.CountedBoundedRootTags.Tag renaming vector_increasing → _p2mNativeSupplement103
open _root_.InfoLossLARNativeSupplements.h5fde173c8469afa6.CurrentAFT.CountedBoundedRootTags renaming current_sets → CurrentAFT.CountedBoundedRootTags.current_sets
open _root_.InfoLossLARNativeSupplements.h5fde173c8469afa6.CurrentAFT.CountedBoundedRootTags renaming current_sets → _p2mNativeSupplement104
open _root_.InfoLossLARNativeSupplements.he8f344a3055fc54a.CurrentAFT.CountedBoundedRootTags renaming entry_sets → CurrentAFT.CountedBoundedRootTags.entry_sets
open _root_.InfoLossLARNativeSupplements.he8f344a3055fc54a.CurrentAFT.CountedBoundedRootTags renaming entry_sets → _p2mNativeSupplement105
open _root_.InfoLossLARNativeSupplements.h2c50018e32584610.CurrentAFT.CountedBoundedRootTags renaming guarded_value → CurrentAFT.CountedBoundedRootTags.guarded_value
open _root_.InfoLossLARNativeSupplements.h2c50018e32584610.CurrentAFT.CountedBoundedRootTags renaming guarded_value → _p2mNativeSupplement106
open _root_.InfoLossLARNativeSupplements.h4aa23a1b871c5bc6.CurrentAFT.CountedBoundedRootTags renaming sum_value → CurrentAFT.CountedBoundedRootTags.sum_value
open _root_.InfoLossLARNativeSupplements.h4aa23a1b871c5bc6.CurrentAFT.CountedBoundedRootTags renaming sum_value → _p2mNativeSupplement107
open _root_.InfoLossLARNativeSupplements.h5a83c4211de0d052.CurrentAFT.CountedBoundedRootTags renaming sum_value_equiv → CurrentAFT.CountedBoundedRootTags.sum_value_equiv
open _root_.InfoLossLARNativeSupplements.h5a83c4211de0d052.CurrentAFT.CountedBoundedRootTags renaming sum_value_equiv → _p2mNativeSupplement108
open _root_.InfoLossLARNativeSupplements.h857ff8dbe55756b8.CurrentAFT.CurrentCycleEntryProgram renaming bodyCount_eq → CurrentAFT.CurrentCycleEntryProgram.bodyCount_eq
open _root_.InfoLossLARNativeSupplements.h857ff8dbe55756b8.CurrentAFT.CurrentCycleEntryProgram renaming bodyCount_eq → _p2mNativeSupplement109
open _root_.InfoLossLARNativeSupplements.h4b24203afd73c049.CurrentAFT.CurrentCycleEntryProgram renaming roots_mod_iff → CurrentAFT.CurrentCycleEntryProgram.roots_mod_iff
open _root_.InfoLossLARNativeSupplements.h4b24203afd73c049.CurrentAFT.CurrentCycleEntryProgram renaming roots_mod_iff → _p2mNativeSupplement110
open _root_.InfoLossLARNativeSupplements.h187f69822989eb63.CurrentAFT.CurrentCycleEntryProgram renaming selectedEntry_cast → CurrentAFT.CurrentCycleEntryProgram.selectedEntry_cast
open _root_.InfoLossLARNativeSupplements.h187f69822989eb63.CurrentAFT.CurrentCycleEntryProgram renaming selectedEntry_cast → _p2mNativeSupplement111
open _root_.InfoLossLARNativeSupplements.h9180bab9fc132623.CurrentAFT.CurrentCycleEntryProgram renaming selected_probability_source → CurrentAFT.CurrentCycleEntryProgram.selected_probability_source
open _root_.InfoLossLARNativeSupplements.h9180bab9fc132623.CurrentAFT.CurrentCycleEntryProgram renaming selected_probability_source → _p2mNativeSupplement112
open _root_.InfoLossLARNativeSupplements.hf7c0550335227b9c.CurrentAFT.CurrentGaussianBits renaming ratio_bounds → CurrentAFT.CurrentGaussianBits.ratio_bounds
open _root_.InfoLossLARNativeSupplements.hf7c0550335227b9c.CurrentAFT.CurrentGaussianBits renaming ratio_bounds → _p2mNativeSupplement113
open _root_.InfoLossLARNativeSupplements.ha029c925a85a9044.CurrentAFT.CurrentPublicShiftProgram renaming encode_value → CurrentAFT.CurrentPublicShiftProgram.encode_value
open _root_.InfoLossLARNativeSupplements.ha029c925a85a9044.CurrentAFT.CurrentPublicShiftProgram renaming encode_value → _p2mNativeSupplement114
open _root_.InfoLossLARNativeSupplements.h4ae04e3f1cb5b359.CurrentAFT.CurrentRootSlotIndex renaming tagPosition_eq → CurrentAFT.CurrentRootSlotIndex.tagPosition_eq
open _root_.InfoLossLARNativeSupplements.h4ae04e3f1cb5b359.CurrentAFT.CurrentRootSlotIndex renaming tagPosition_eq → _p2mNativeSupplement115
open _root_.InfoLossLARNativeSupplements.h20ee486b3d1dffd8.CurrentAFT.CyclePatternProgram renaming averagedEvaluate_cast → CurrentAFT.CyclePatternProgram.averagedEvaluate_cast
open _root_.InfoLossLARNativeSupplements.h20ee486b3d1dffd8.CurrentAFT.CyclePatternProgram renaming averagedEvaluate_cast → _p2mNativeSupplement116
open _root_.InfoLossLARNativeSupplements.hb37dd6f3dcea3b7d.CurrentAFT.CyclePatternProgram renaming evaluate_local → CurrentAFT.CyclePatternProgram.evaluate_local
open _root_.InfoLossLARNativeSupplements.hb37dd6f3dcea3b7d.CurrentAFT.CyclePatternProgram renaming evaluate_local → _p2mNativeSupplement117
open _root_.InfoLossLARNativeSupplements.h689ba464633d8cff.CurrentAFT.CyclePatternProgram renaming evaluate_semantics → CurrentAFT.CyclePatternProgram.evaluate_semantics
open _root_.InfoLossLARNativeSupplements.h689ba464633d8cff.CurrentAFT.CyclePatternProgram renaming evaluate_semantics → _p2mNativeSupplement118
open _root_.InfoLossLARNativeSupplements.hd02155c30f7ca58d.CurrentAFT.CyclePatternProgram renaming gaussianEvaluate_eq_windowEvaluate → CurrentAFT.CyclePatternProgram.gaussianEvaluate_eq_windowEvaluate
open _root_.InfoLossLARNativeSupplements.hd02155c30f7ca58d.CurrentAFT.CyclePatternProgram renaming gaussianEvaluate_eq_windowEvaluate → _p2mNativeSupplement119
open _root_.InfoLossLARNativeSupplements.hc532f8ed89f571a1.CurrentAFT.CyclePatternProgram renaming gaussianEvaluate_semantics → CurrentAFT.CyclePatternProgram.gaussianEvaluate_semantics
open _root_.InfoLossLARNativeSupplements.hc532f8ed89f571a1.CurrentAFT.CyclePatternProgram renaming gaussianEvaluate_semantics → _p2mNativeSupplement120
open _root_.InfoLossLARNativeSupplements.h3e1ece29cbe1b4d4.CurrentAFT.CyclePatternProgram renaming restricted_expectation → CurrentAFT.CyclePatternProgram.restricted_expectation
open _root_.InfoLossLARNativeSupplements.h3e1ece29cbe1b4d4.CurrentAFT.CyclePatternProgram renaming restricted_expectation → _p2mNativeSupplement121
open _root_.InfoLossLARNativeSupplements.h33993643e1712ab8.CurrentAFT.CycleRootExpansion renaming current_body_two_le → CurrentAFT.CycleRootExpansion.current_body_two_le
open _root_.InfoLossLARNativeSupplements.h33993643e1712ab8.CurrentAFT.CycleRootExpansion renaming current_body_two_le → _p2mNativeSupplement122
open _root_.InfoLossLARNativeSupplements.hd99e5f9e75bbb7e1.CurrentAFT.CycleSelections renaming averagedSelectedLaw_coordinate → CurrentAFT.CycleSelections.averagedSelectedLaw_coordinate
open _root_.InfoLossLARNativeSupplements.hd99e5f9e75bbb7e1.CurrentAFT.CycleSelections renaming averagedSelectedLaw_coordinate → _p2mNativeSupplement123
open _root_.InfoLossLARNativeSupplements.h788b7dba49e3cc6b.CurrentAFT.CycleSelections renaming selectedLaw_coordinate → CurrentAFT.CycleSelections.selectedLaw_coordinate
open _root_.InfoLossLARNativeSupplements.h788b7dba49e3cc6b.CurrentAFT.CycleSelections renaming selectedLaw_coordinate → _p2mNativeSupplement124
open _root_.InfoLossLARNativeSupplements.h8eafa7c1234de921.CurrentAFT.FullResponseEnumeration renaming mem_boundedSubsets → CurrentAFT.FullResponseEnumeration.mem_boundedSubsets
open _root_.InfoLossLARNativeSupplements.h8eafa7c1234de921.CurrentAFT.FullResponseEnumeration renaming mem_boundedSubsets → _p2mNativeSupplement125
open _root_.InfoLossLARNativeSupplements.h4d94229af05aca84.CurrentAFT.Parameters renaming modulus_eq_find → CurrentAFT.Parameters.modulus_eq_find
open _root_.InfoLossLARNativeSupplements.h4d94229af05aca84.CurrentAFT.Parameters renaming modulus_eq_find → _p2mNativeSupplement126
open _root_.InfoLossLARNativeSupplements.h7c8d9f04458b8eff.CurrentAFT.ProtectedCycle renaming cycleLaw_marginal → CurrentAFT.ProtectedCycle.cycleLaw_marginal
open _root_.InfoLossLARNativeSupplements.h7c8d9f04458b8eff.CurrentAFT.ProtectedCycle renaming cycleLaw_marginal → _p2mNativeSupplement127
open _root_.InfoLossLARNativeSupplements.ha0baf4dfdfb7707f.CurrentAFT.ProtectedCycle renaming cycleLaw_marginal_of_two_le → CurrentAFT.ProtectedCycle.cycleLaw_marginal_of_two_le
open _root_.InfoLossLARNativeSupplements.ha0baf4dfdfb7707f.CurrentAFT.ProtectedCycle renaming cycleLaw_marginal_of_two_le → _p2mNativeSupplement128
open _root_.InfoLossLARNativeSupplements.h94f62847a0770621.CurrentAFT.ProtectedCycle renaming independent_pair_law → CurrentAFT.ProtectedCycle.independent_pair_law
open _root_.InfoLossLARNativeSupplements.h94f62847a0770621.CurrentAFT.ProtectedCycle renaming independent_pair_law → _p2mNativeSupplement129
open _root_.InfoLossLARNativeSupplements.h2021c53cebcb97f7.CurrentAFT.RationalScalarFamilyAverage renaming current_eq_window_sum → CurrentAFT.RationalScalarFamilyAverage.current_eq_window_sum
open _root_.InfoLossLARNativeSupplements.h2021c53cebcb97f7.CurrentAFT.RationalScalarFamilyAverage renaming current_eq_window_sum → _p2mNativeSupplement130
open _root_.InfoLossLARNativeSupplements.h6473fbae786c301e.CurrentAFT.RootSignedMassProgram renaming referenceEntry_cast → CurrentAFT.RootSignedMassProgram.referenceEntry_cast
open _root_.InfoLossLARNativeSupplements.h6473fbae786c301e.CurrentAFT.RootSignedMassProgram renaming referenceEntry_cast → _p2mNativeSupplement131
open _root_.InfoLossLARNativeSupplements.h4c23fa31c2a53a0c.CurrentAFT.RootSignedMassProgram renaming singleton_probability → CurrentAFT.RootSignedMassProgram.singleton_probability
open _root_.InfoLossLARNativeSupplements.h4c23fa31c2a53a0c.CurrentAFT.RootSignedMassProgram renaming singleton_probability → _p2mNativeSupplement132
open _root_.InfoLossLARNativeSupplements.hb738544899c1bf50.CurrentAFT.TensorPublicProjection renaming independent_decision_expectation → CurrentAFT.TensorPublicProjection.independent_decision_expectation
open _root_.InfoLossLARNativeSupplements.hb738544899c1bf50.CurrentAFT.TensorPublicProjection renaming independent_decision_expectation → _p2mNativeSupplement133
open _root_.InfoLossLARNativeSupplements.hf2382f7ddc8e222e.AFT.RationalNumerics renaming natAbs_finset_sum_le → AFT.RationalNumerics.natAbs_finset_sum_le
open _root_.InfoLossLARNativeSupplements.hf2382f7ddc8e222e.AFT.RationalNumerics renaming natAbs_finset_sum_le → _p2mNativeSupplement134
open _root_.InfoLossLARNativeSupplements.h707562ec4bd11ae8.AFT.RationalNumerics.HeightBound renaming reduced_le → AFT.RationalNumerics.HeightBound.reduced_le
open _root_.InfoLossLARNativeSupplements.h707562ec4bd11ae8.AFT.RationalNumerics.HeightBound renaming reduced_le → _p2mNativeSupplement135
open _root_.InfoLossLARNativeSupplements.hd70d55bab6f2346d.CurrentAFT.CountedBoundedRootTags renaming bounded_sum → CurrentAFT.CountedBoundedRootTags.bounded_sum
open _root_.InfoLossLARNativeSupplements.hd70d55bab6f2346d.CurrentAFT.CountedBoundedRootTags renaming bounded_sum → _p2mNativeSupplement136
open _root_.InfoLossLARNativeSupplements.hb84db39a2a2ae627.CurrentAFT.CountedBoundedRootTags renaming flatMap_attach → CurrentAFT.CountedBoundedRootTags.flatMap_attach
open _root_.InfoLossLARNativeSupplements.hb84db39a2a2ae627.CurrentAFT.CountedBoundedRootTags renaming flatMap_attach → _p2mNativeSupplement137
open _root_.InfoLossLARNativeSupplements.he91e90e23380c2d0.CurrentAFT.JointTaggedPhysicalFock renaming law_nonempty → CurrentAFT.JointTaggedPhysicalFock.law_nonempty
open _root_.InfoLossLARNativeSupplements.he91e90e23380c2d0.CurrentAFT.JointTaggedPhysicalFock renaming law_nonempty → _p2mNativeSupplement138
section
set_option autoImplicit false
set_option backward.isDefEq.respectTransparency false
set_option maxHeartbeats 1500000
namespace InfoLossLAR.WorstCase
open AFT Matrix QAlgorithms.Complexity
open scoped BigOperators Classical
/-- The encoded query is computed from the observed matrix/response table and
one auxiliary vector plus one label for each block. -/
def rankOneEncodedQuery (lam : ℕ) (pp : Str) (q N d ℓ t : ℕ) [NeZero q]
(direction : (Fin ℓ → ZMod q) → (Fin d → ZMod q))
(coins : (Fin N → ZMod q) × (Fin t → Fin ℓ → ZMod q))
(input : Fin t → Matrix (Fin d) (Fin N) (ZMod q) × (Fin d → ZMod q)) : Str :=
encInput lam pp (encTable (fun index =>
_root_.InfoLossLAR.WorstCase.larRankOnePreprocess coins.1 direction (input index).1 (input index).2 (coins.2 index)))
/-- The executable bounded reduction makes the same fixed query on failure,
independently of the LWE table. -/
def boundedRankOnePre (lam : ℕ) (pp fallback : Str) (q N d ℓ t : ℕ) [NeZero q]
(direction : (Fin ℓ → ZMod q) → (Fin d → ZMod q))
(tape : Fin (Nat.size (q^(N+t*ℓ))) → Bool)
(input : Fin t → Matrix (Fin d) (Fin N) (ZMod q) × (Fin d → ZMod q)) : Str :=
match _root_.InfoLossLAR.WorstCase.boundedJointDraw q N t ℓ tape with
| none => fallback
| some coins => _root_.InfoLossLAR.WorstCase.rankOneEncodedQuery lam pp q N d ℓ t direction coins input
/-- The actual LWE response table for one shared secret; errors and public
matrices are independent, with fresh source errors in every block. -/
noncomputable def larObservedRealTableLaw (q N d t : ℕ) [NeZero q]
(source : _root_.AFT.FiniteDist (Fin d → ZMod q)) (secret : Fin N → ZMod q) :
_root_.AFT.FiniteDist (Fin t → Matrix (Fin d) (Fin N) (ZMod q) × (Fin d → ZMod q)) :=
((_root_.AFT.FiniteDist.uniform (Fin t → Matrix (Fin d) (Fin N) (ZMod q))).prod
(_root_.AFT.FiniteDist.independent (fun _ : Fin t => source))).map fun draw index =>
(draw.1 index,(draw.1 index).mulVec secret+draw.2 index)
/-- The ideal observed table samples every response uniformly and independently. -/
noncomputable def larObservedIdealTableLaw (q N d t : ℕ) [NeZero q] :
_root_.AFT.FiniteDist (Fin t → Matrix (Fin d) (Fin N) (ZMod q) × (Fin d → ZMod q)) :=
((_root_.AFT.FiniteDist.uniform (Fin t → Matrix (Fin d) (Fin N) (ZMod q))).prod
(_root_.AFT.FiniteDist.uniform (Fin t → Fin d → ZMod q))).map fun draw index =>
(draw.1 index,draw.2 index)
/-- The real experiment of the actual bounded Boolean preprocessing. -/
noncomputable def prBoundedRankOneRealLAR (D : Family) (lam : ℕ) (pp fallback : Str)
(q N d ℓ t : ℕ) [Fact q.Prime] [NeZero q]
(source : _root_.AFT.FiniteDist (Fin d → ZMod q))
(direction : (Fin ℓ → ZMod q) → (Fin d → ZMod q)) : ℝ :=
avg fun secret : Fin N → ZMod q =>
(_root_.InfoLossLAR.WorstCase.larObservedRealTableLaw q N d t source secret).expectation fun input =>
avg fun tape : Fin (Nat.size (q^(N+t*ℓ))) → Bool =>
acceptProb D (_root_.InfoLossLAR.WorstCase.boundedRankOnePre lam pp fallback q N d ℓ t direction tape input)
/-- The ideal experiment uses the identical bounded program and failure query. -/
noncomputable def prBoundedRankOneIdealLAR (D : Family) (lam : ℕ) (pp fallback : Str)
(q N d ℓ t : ℕ) [Fact q.Prime] [NeZero q]
(direction : (Fin ℓ → ZMod q) → (Fin d → ZMod q)) : ℝ :=
(_root_.InfoLossLAR.WorstCase.larObservedIdealTableLaw q N d t).expectation fun input =>
avg fun tape : Fin (Nat.size (q^(N+t*ℓ))) → Bool =>
acceptProb D (_root_.InfoLossLAR.WorstCase.boundedRankOnePre lam pp fallback q N d ℓ t direction tape input)
end InfoLossLAR.WorstCase
end
section
set_option autoImplicit false
set_option maxHeartbeats 2000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.LARCoinMachine
open InfoLossLAR.WorstCase QAlgorithms.Complexity
open OAI.MetricKMedian.Binary
open OAI.MetricKMedian.Binary.Automatic
open OAI.MetricKMedian.Binary.Automatic.Poly
open QMCNumericRuntime
open LARPlatformEncoding Polynomial
open scoped BigOperators
/-- The exponent is represented by supplied slots, so the machine never
expands a binary exponent into exponentially many steps. -/
def powerStep (state : ℕ × ℕ) (_ : Unit) : ℕ × ℕ := (state.1,state.2*state.1)
@[fun_prop] theorem powerStep_poly : Poly (fun x : (ℕ × ℕ) × Unit => _root_.Integration9_9.LARCoinMachine.powerStep x.1 x.2) := by
unfold _root_.Integration9_9.LARCoinMachine.powerStep
fun_prop
theorem _root_.Integration9_9.LARCoinMachine.powerState_length (state : ℕ × ℕ) :
(enc state).length=2*state.1.bits.length+1+state.2.bits.length := by
change (encodePair Nat.bits Nat.bits state).length = _
exact encodePair_length _ _ _
theorem _root_.Integration9_9.LARCoinMachine.powerStep_length (state : ℕ × ℕ) (slot : Unit) :
(enc (_root_.Integration9_9.LARCoinMachine.powerStep state slot)).length ≤ (enc state).length+state.1.bits.length := by
have h := NatBinary.mul_length state.2 state.1
simp only [_root_.Integration9_9.LARCoinMachine.powerState_length,_root_.Integration9_9.LARCoinMachine.powerStep]
omega
theorem _root_.Integration9_9.LARCoinMachine.powerFold_length (slots : List Unit) (state : ℕ × ℕ) :
(enc (slots.foldl _root_.Integration9_9.LARCoinMachine.powerStep state)).length ≤
(enc state).length+slots.length*state.1.bits.length := by
induction slots generalizing state with
| nil => simp
| cons slot slots ih =>
have h := ih (_root_.Integration9_9.LARCoinMachine.powerStep state slot)
have hs := _root_.Integration9_9.LARCoinMachine.powerStep_length state slot
have hb : (_root_.Integration9_9.LARCoinMachine.powerStep state slot).1=state.1 := rfl
rw [hb] at h
simp only [List.foldl_cons,List.length_cons]
nlinarith
theorem _root_.Integration9_9.LARCoinMachine.powerFold_bound (slots : List Unit) (state : ℕ × ℕ)
(pre suf : List Unit) (hsplit : slots=pre++suf) :
(enc (pre.foldl _root_.Integration9_9.LARCoinMachine.powerStep state)).length ≤
(X+X^2 : Polynomial ℕ).eval (encodePair (encodeList (enc : Unit → Str)) enc (slots,state)).length := by
let length := (encodePair (encodeList (enc : Unit → Str)) enc (slots,state)).length
have hlength : length=2*(encodeList (enc : Unit → Str) slots).length+1+(enc state).length :=
encodePair_length _ _ _
have hslots := EncodedList.length_le (enc : Unit → Str) slots
have hpre : pre.length ≤ slots.length := by simp only [hsplit,List.length_append]; omega
have hstate : (enc state).length ≤ length := by omega
have hbase : state.1.bits.length ≤ length := by rw [_root_.Integration9_9.LARCoinMachine.powerState_length] at hstate; omega
have hm : pre.length*state.1.bits.length ≤ length*length := Nat.mul_le_mul (by omega) hbase
have hf := _root_.Integration9_9.LARCoinMachine.powerFold_length pre state
change (enc (pre.foldl _root_.Integration9_9.LARCoinMachine.powerStep state)).length ≤ (X+X^2 : Polynomial ℕ).eval length
simp only [eval_add,eval_pow,eval_mul,eval_X,pow_two]
omega
@[fun_prop] theorem powerFold_poly :
Poly (fun x : List Unit × (ℕ × ℕ) => x.1.foldl _root_.Integration9_9.LARCoinMachine.powerStep x.2) :=
⟨_root_.Integration9_9.LARCoinMachine.powerStep_poly.program.listFold () (X+X^2) _root_.Integration9_9.LARCoinMachine.powerFold_bound⟩
def powerWithSlots (input : ℕ × List Unit) : ℕ :=
(input.2.foldl _root_.Integration9_9.LARCoinMachine.powerStep (input.1,1)).2
@[fun_prop] theorem powerWithSlots_poly : Poly _root_.Integration9_9.LARCoinMachine.powerWithSlots := by
have hf : Poly (fun input : ℕ × List Unit => input.2.foldl _root_.Integration9_9.LARCoinMachine.powerStep (input.1,1)) :=
Poly.comp (f := fun x : List Unit × (ℕ × ℕ) => x.1.foldl _root_.Integration9_9.LARCoinMachine.powerStep x.2)
(g := fun input : ℕ × List Unit => (input.2,(input.1,1))) _root_.Integration9_9.LARCoinMachine.powerFold_poly (by fun_prop)
unfold _root_.Integration9_9.LARCoinMachine.powerWithSlots
exact Poly.comp (f := (Prod.snd : (ℕ × ℕ) → ℕ))
(g := fun input : ℕ × List Unit => input.2.foldl _root_.Integration9_9.LARCoinMachine.powerStep (input.1,1)) Poly.snd hf
@[fun_prop] theorem naturalDivision_poly : Poly (fun x : ℕ × ℕ => x.1/x.2) := ⟨PolyProgram.natDiv⟩
@[fun_prop] theorem naturalModulus_poly : Poly (fun x : ℕ × ℕ => x.1%x.2) := ⟨PolyProgram.natMod⟩
@[fun_prop] theorem naturalSize_poly : Poly Nat.size := ⟨PolyProgram.natSize⟩
/-- Explicit quotient/remainder digit extraction on a supplied bounded
coordinate list, using the verified binary arithmetic machines. -/
def decodeBaseQ (input : ℕ × (List Unit × ℕ)) : List ℕ :=
(List.range input.2.1.length).map fun index =>
(input.2.2/_root_.Integration9_9.LARCoinMachine.powerWithSlots (input.1,input.2.1.take index))%input.1
@[fun_prop] theorem decodeBaseQ_poly : Poly _root_.Integration9_9.LARCoinMachine.decodeBaseQ := by
unfold _root_.Integration9_9.LARCoinMachine.decodeBaseQ
apply Poly.list_map
· have ht : Poly (fun x : (ℕ × (List Unit × ℕ)) × ℕ => x.1.2.1.take x.2) :=
Poly.comp (f := fun x : List Unit × ℕ => x.1.take x.2)
(g := fun x : (ℕ × (List Unit × ℕ)) × ℕ => (x.1.2.1,x.2)) parser_take_poly (by fun_prop)
have hp : Poly (fun x : (ℕ × (List Unit × ℕ)) × ℕ =>
_root_.Integration9_9.LARCoinMachine.powerWithSlots (x.1.1,x.1.2.1.take x.2)) :=
Poly.comp _root_.Integration9_9.LARCoinMachine.powerWithSlots_poly (Poly.pair (by fun_prop) ht)
have hd : Poly (fun x : (ℕ × (List Unit × ℕ)) × ℕ =>
x.1.2.2/_root_.Integration9_9.LARCoinMachine.powerWithSlots (x.1.1,x.1.2.1.take x.2)) :=
Poly.comp _root_.Integration9_9.LARCoinMachine.naturalDivision_poly (Poly.pair (by fun_prop) hp)
exact Poly.comp _root_.Integration9_9.LARCoinMachine.naturalModulus_poly (Poly.pair hd (by fun_prop))
· exact Poly.comp (f := fun xs : List Unit => List.range xs.length)
(g := fun input : ℕ × (List Unit × ℕ) => input.2.1) Poly.list_indices (by fun_prop)
/-- The actual Boolean program computes the bounded joint ticket and all
base-q digits. The caller handles the explicit success flag. -/
def jointDrawNumbers (input : ℕ × (List Unit × Str)) : Bool × List ℕ :=
let count := _root_.Integration9_9.LARCoinMachine.powerWithSlots (input.1,input.2.1)
let ticket := bitValue (input.2.2.take (Nat.size count))
(decide (ticket<count),_root_.Integration9_9.LARCoinMachine.decodeBaseQ (input.1,(input.2.1,ticket)))
@[fun_prop] theorem jointDrawNumbers_poly : Poly _root_.Integration9_9.LARCoinMachine.jointDrawNumbers := by
unfold _root_.Integration9_9.LARCoinMachine.jointDrawNumbers
have hp : Poly (fun input : ℕ × (List Unit × Str) => _root_.Integration9_9.LARCoinMachine.powerWithSlots (input.1,input.2.1)) :=
Poly.comp _root_.Integration9_9.LARCoinMachine.powerWithSlots_poly (by fun_prop)
have ht : Poly (fun input : ℕ × (List Unit × Str) =>
bitValue (input.2.2.take (Nat.size (_root_.Integration9_9.LARCoinMachine.powerWithSlots (input.1,input.2.1))))) :=
Poly.comp bitValue_poly (Poly.comp parser_take_poly
(Poly.pair (by fun_prop) (Poly.comp _root_.Integration9_9.LARCoinMachine.naturalSize_poly hp)))
exact Poly.pair (Poly.nat_lt_comp ht hp)
(Poly.comp _root_.Integration9_9.LARCoinMachine.decodeBaseQ_poly (Poly.pair (by fun_prop) (Poly.pair (by fun_prop) ht)))
end Integration9_9.LARCoinMachine
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.CyclePathClosure
end CurrentAFT.CyclePathClosure
namespace InfoLossLAR
end InfoLossLAR
namespace InfoLossLAR.WorstCase
end InfoLossLAR.WorstCase
namespace InfoLossLAR.WorstCase.boundedSplit
end InfoLossLAR.WorstCase.boundedSplit
namespace InfoLossLAR.WorstCase.computableFixedRoundingDirection
end InfoLossLAR.WorstCase.computableFixedRoundingDirection
namespace InfoLossLAR.WorstCase.computableRoundingDirectionInteger
end InfoLossLAR.WorstCase.computableRoundingDirectionInteger
namespace Integration9_9
end Integration9_9
namespace Integration9_9.FairBitPadding
end Integration9_9.FairBitPadding
namespace Integration9_9.LARCoinMachine
end Integration9_9.LARCoinMachine
set_option autoImplicit false
set_option maxHeartbeats 2000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.LARRankOneMachine
open InfoLossLAR.WorstCase QAlgorithms.Complexity
open OAI.MetricKMedian.Binary
open OAI.MetricKMedian.Binary.Automatic
open OAI.MetricKMedian.Binary.Automatic.Poly
open QMCNumericRuntime
open LARPlatformEncoding LARCoinMachine TM2PlatformSerialization
abbrev NaturalSample := List (List ℕ) × List ℕ
abbrev SampleInput := ℕ × (List ℕ × (ℕ × _root_.Integration9_9.LARRankOneMachine.NaturalSample))
/-- Natural-number implementation of the proved fixed-family carry direction. -/
def directionNumber (q rows mark index : ℕ) : ℕ :=
if index+1=rows then mark else mark*(q-(index+1))
/-- One output matrix entry, evaluated by exact binary natural arithmetic. -/
def rankOneNaturalEntry (input : _root_.Integration9_9.LARRankOneMachine.SampleInput × (ℕ × ℕ)) : ℕ :=
let q := input.1.1
let auxiliary := input.1.2.1
let mark := input.1.2.2.1
let sample := input.1.2.2.2
let row := (sample.1[input.2.1]?).getD []
let original := (row[input.2.2]?).getD 0
let response := (sample.2[input.2.1]?).getD 0
let shifted := response+_root_.Integration9_9.LARRankOneMachine.directionNumber q sample.1.length mark input.2.1
((q-original%q)+shifted*((auxiliary[input.2.2]?).getD 0))%q
@[fun_prop] theorem rankOneNaturalEntry_poly : Poly _root_.Integration9_9.LARRankOneMachine.rankOneNaturalEntry := by
unfold _root_.Integration9_9.LARRankOneMachine.rankOneNaturalEntry _root_.Integration9_9.LARRankOneMachine.directionNumber
fun_prop
/-- Every supplied row and column is traversed once by bounded list maps. -/
def rankOneNaturalSample (input : _root_.Integration9_9.LARRankOneMachine.SampleInput) : _root_.Integration9_9.LARRankOneMachine.NaturalSample :=
((List.range input.2.2.2.1.length).map (fun row =>
(List.range ((input.2.2.2.1[row]?).getD []).length).map (fun column =>
_root_.Integration9_9.LARRankOneMachine.rankOneNaturalEntry (input,(row,column)))),[input.2.2.1])
@[fun_prop] theorem rankOneNaturalSample_poly : Poly _root_.Integration9_9.LARRankOneMachine.rankOneNaturalSample := by
have he : Poly (fun x : (_root_.Integration9_9.LARRankOneMachine.SampleInput × ℕ) × ℕ =>
_root_.Integration9_9.LARRankOneMachine.rankOneNaturalEntry (x.1.1,(x.1.2,x.2))) :=
Poly.comp _root_.Integration9_9.LARRankOneMachine.rankOneNaturalEntry_poly (by fun_prop)
have hc : Poly (fun x : _root_.Integration9_9.LARRankOneMachine.SampleInput × ℕ =>
List.range ((x.1.2.2.2.1[x.2]?).getD []).length) :=
Poly.comp (f := fun xs : List ℕ => List.range xs.length)
(g := fun x : _root_.Integration9_9.LARRankOneMachine.SampleInput × ℕ => (x.1.2.2.2.1[x.2]?).getD [])
Poly.list_indices (by fun_prop)
have hr : Poly (fun x : _root_.Integration9_9.LARRankOneMachine.SampleInput × ℕ =>
(List.range ((x.1.2.2.2.1[x.2]?).getD []).length).map (fun column =>
_root_.Integration9_9.LARRankOneMachine.rankOneNaturalEntry (x.1,(x.2,column)))) := Poly.list_map he hc
have hs : Poly (fun x : _root_.Integration9_9.LARRankOneMachine.SampleInput => List.range x.2.2.2.1.length) :=
Poly.comp (f := fun xs : List (List ℕ) => List.range xs.length)
(g := fun x : _root_.Integration9_9.LARRankOneMachine.SampleInput => x.2.2.2.1) Poly.list_indices (by fun_prop)
unfold _root_.Integration9_9.LARRankOneMachine.rankOneNaturalSample
exact Poly.pair (Poly.list_map hr hs) (by fun_prop)
/-- Shared auxiliary digits are reused for the complete table; each supplied
mark is paired with its own observed sample. -/
def rankOneNaturalTable (input : ℕ × (List ℕ × (List ℕ × List _root_.Integration9_9.LARRankOneMachine.NaturalSample))) : List _root_.Integration9_9.LARRankOneMachine.NaturalSample :=
(input.2.2.2.zip input.2.2.1).map fun draw =>
_root_.Integration9_9.LARRankOneMachine.rankOneNaturalSample (input.1,(input.2.1,(draw.2,draw.1)))
@[fun_prop] theorem rankOneNaturalTable_poly : Poly _root_.Integration9_9.LARRankOneMachine.rankOneNaturalTable := by
unfold _root_.Integration9_9.LARRankOneMachine.rankOneNaturalTable
apply Poly.list_map
· exact Poly.comp (f := _root_.Integration9_9.LARRankOneMachine.rankOneNaturalSample)
(g := fun x : (ℕ × (List ℕ × (List ℕ × List _root_.Integration9_9.LARRankOneMachine.NaturalSample))) × (_root_.Integration9_9.LARRankOneMachine.NaturalSample × ℕ) =>
(x.1.1,(x.1.2.1,(x.2.2,x.2.1)))) _root_.Integration9_9.LARRankOneMachine.rankOneNaturalSample_poly (by fun_prop)
· exact Poly.comp (f := fun x : List _root_.Integration9_9.LARRankOneMachine.NaturalSample × List ℕ => x.1.zip x.2)
(g := fun input : ℕ × (List ℕ × (List ℕ × List _root_.Integration9_9.LARRankOneMachine.NaturalSample)) => (input.2.2.2,input.2.2.1))
Poly.list_zip (by fun_prop)
/-- Read the observed width from a supplied row rather than expanding a
possibly malformed binary dimension header. -/
def observedAuxiliarySlots (table : List _root_.Integration9_9.LARRankOneMachine.NaturalSample) : List Unit :=
(((table.head?).getD ([],[])).1.head?.getD []).map (fun _ => ())
@[fun_prop] theorem observedAuxiliarySlots_poly : Poly _root_.Integration9_9.LARRankOneMachine.observedAuxiliarySlots := by
unfold _root_.Integration9_9.LARRankOneMachine.observedAuxiliarySlots
fun_prop
/-- Existing row slots and existing block slots bound the shared/all-label draw. -/
def observedJointSlots (table : List _root_.Integration9_9.LARRankOneMachine.NaturalSample) : List Unit :=
_root_.Integration9_9.LARRankOneMachine.observedAuxiliarySlots table++table.map (fun _ => ())
@[fun_prop] theorem observedJointSlots_poly : Poly _root_.Integration9_9.LARRankOneMachine.observedJointSlots := by
unfold _root_.Integration9_9.LARRankOneMachine.observedJointSlots
fun_prop
abbrev ObservedInput := Str × (Str × List _root_.Integration9_9.LARRankOneMachine.NaturalSample)
abbrev BoundedContext := _root_.Integration9_9.LARRankOneMachine.ObservedInput × (ℕ × (ℕ × (Bool × List ℕ)))
def readCoinObserved (xs : Str) : Str × _root_.Integration9_9.LARRankOneMachine.ObservedInput :=
let coins := _root_.Integration9_9.LARPlatformEncoding.readS xs
let observed := _root_.Integration9_9.LARPlatformEncoding.readS coins.1
(coins.2,(_root_.Integration9_9.LARPlatformEncoding.readObservedInput observed.2).2)
@[fun_prop] theorem readCoinObserved_poly : Poly _root_.Integration9_9.LARRankOneMachine.readCoinObserved := by
unfold _root_.Integration9_9.LARRankOneMachine.readCoinObserved
fun_prop
def makeBoundedContext (input : Str × _root_.Integration9_9.LARRankOneMachine.ObservedInput) : _root_.Integration9_9.LARRankOneMachine.BoundedContext :=
let q := (_root_.Integration9_9.LARPlatformEncoding.readParameters input.2.2.1).2.1
let count := (_root_.Integration9_9.LARRankOneMachine.observedAuxiliarySlots input.2.2.2).length
let draw := _root_.Integration9_9.LARCoinMachine.jointDrawNumbers (q,(_root_.Integration9_9.LARRankOneMachine.observedJointSlots input.2.2.2,input.1))
(input.2,(q,(count,draw)))
@[fun_prop] theorem makeBoundedContext_poly : Poly _root_.Integration9_9.LARRankOneMachine.makeBoundedContext := by
have hq : Poly (fun input : Str × _root_.Integration9_9.LARRankOneMachine.ObservedInput => (_root_.Integration9_9.LARPlatformEncoding.readParameters input.2.2.1).2.1) := by fun_prop
have hn : Poly (fun input : Str × _root_.Integration9_9.LARRankOneMachine.ObservedInput => (_root_.Integration9_9.LARRankOneMachine.observedAuxiliarySlots input.2.2.2).length) := by fun_prop
have hs : Poly (fun input : Str × _root_.Integration9_9.LARRankOneMachine.ObservedInput => _root_.Integration9_9.LARRankOneMachine.observedJointSlots input.2.2.2) := by fun_prop
have hd : Poly (fun input : Str × _root_.Integration9_9.LARRankOneMachine.ObservedInput =>
_root_.Integration9_9.LARCoinMachine.jointDrawNumbers ((_root_.Integration9_9.LARPlatformEncoding.readParameters input.2.2.1).2.1,(_root_.Integration9_9.LARRankOneMachine.observedJointSlots input.2.2.2,input.1))) :=
Poly.comp _root_.Integration9_9.LARCoinMachine.jointDrawNumbers_poly (Poly.pair hq (Poly.pair hs Poly.fst))
unfold _root_.Integration9_9.LARRankOneMachine.makeBoundedContext
exact Poly.pair Poly.snd (Poly.pair hq (Poly.pair hn hd))
def renderBoundedContext (fallback : Str) (context : _root_.Integration9_9.LARRankOneMachine.BoundedContext) : Str :=
if context.2.2.2.1 then
_root_.Integration9_9.LARPlatformEncoding.serializeObservedInput (context.1.1,(context.1.2.1,_root_.Integration9_9.LARRankOneMachine.rankOneNaturalTable
(context.2.1,(context.2.2.2.2.take context.2.2.1,
(context.2.2.2.2.drop context.2.2.1,context.1.2.2)))))
else fallback
@[fun_prop] theorem renderBoundedContext_poly (fallback : Str) : Poly (_root_.Integration9_9.LARRankOneMachine.renderBoundedContext fallback) := by
have ht : Poly (fun context : _root_.Integration9_9.LARRankOneMachine.BoundedContext => context.2.2.2.2.take context.2.2.1) :=
Poly.comp (f := fun x : List ℕ × ℕ => x.1.take x.2)
(g := fun context : _root_.Integration9_9.LARRankOneMachine.BoundedContext => (context.2.2.2.2,context.2.2.1)) parser_take_poly (by fun_prop)
have hd : Poly (fun context : _root_.Integration9_9.LARRankOneMachine.BoundedContext => context.2.2.2.2.drop context.2.2.1) :=
Poly.comp (f := fun x : List ℕ × ℕ => x.1.drop x.2)
(g := fun context : _root_.Integration9_9.LARRankOneMachine.BoundedContext => (context.2.2.2.2,context.2.2.1)) parser_drop_poly (by fun_prop)
have hm : Poly (fun context : _root_.Integration9_9.LARRankOneMachine.BoundedContext => _root_.Integration9_9.LARRankOneMachine.rankOneNaturalTable
(context.2.1,(context.2.2.2.2.take context.2.2.1,
(context.2.2.2.2.drop context.2.2.1,context.1.2.2)))) :=
Poly.comp _root_.Integration9_9.LARRankOneMachine.rankOneNaturalTable_poly
(Poly.pair (by fun_prop) (Poly.pair ht (Poly.pair hd (by fun_prop))))
have ho : Poly (fun context : _root_.Integration9_9.LARRankOneMachine.BoundedContext =>
_root_.Integration9_9.LARPlatformEncoding.serializeObservedInput (context.1.1,(context.1.2.1,_root_.Integration9_9.LARRankOneMachine.rankOneNaturalTable
(context.2.1,(context.2.2.2.2.take context.2.2.1,
(context.2.2.2.2.drop context.2.2.1,context.1.2.2)))))) :=
Poly.comp _root_.Integration9_9.LARPlatformEncoding.serializeObservedInput_poly (Poly.pair (by fun_prop) (Poly.pair (by fun_prop) hm))
unfold _root_.Integration9_9.LARRankOneMachine.renderBoundedContext
exact Poly.ite (by fun_prop) ho (OAI.MetricKMedian.Binary.Automatic.Poly.const fallback)
/-- The actual raw string program: parse coins and observed input, perform
bounded exact joint sampling, update all matrix entries and serialize the
literal platform query. Its failure query is fixed independently of input. -/
def boundedRankOneStringPre (fallback : Str) (xs : Str) : Str :=
_root_.Integration9_9.LARRankOneMachine.renderBoundedContext fallback (_root_.Integration9_9.LARRankOneMachine.makeBoundedContext (_root_.Integration9_9.LARRankOneMachine.readCoinObserved xs))
@[fun_prop] theorem boundedRankOneStringPre_poly (fallback : Str) : Poly (_root_.Integration9_9.LARRankOneMachine.boundedRankOneStringPre fallback) := by
unfold _root_.Integration9_9.LARRankOneMachine.boundedRankOneStringPre
exact Poly.comp (_root_.Integration9_9.LARRankOneMachine.renderBoundedContext_poly fallback) (Poly.comp _root_.Integration9_9.LARRankOneMachine.makeBoundedContext_poly _root_.Integration9_9.LARRankOneMachine.readCoinObserved_poly)
/-- The joint interval size is computed from the actual parsed public
modulus and finite observed coordinate/block slots. -/
def observedTicketCount (xs : Str) : ℕ :=
let input := (_root_.Integration9_9.LARPlatformEncoding.readObservedInput xs).2
_root_.Integration9_9.LARCoinMachine.powerWithSlots ((_root_.Integration9_9.LARPlatformEncoding.readParameters input.2.1).2.1,_root_.Integration9_9.LARRankOneMachine.observedJointSlots input.2.2)
@[fun_prop] theorem observedTicketCount_poly : Poly _root_.Integration9_9.LARRankOneMachine.observedTicketCount := by
have hq : Poly (fun xs : Str => (_root_.Integration9_9.LARPlatformEncoding.readParameters (_root_.Integration9_9.LARPlatformEncoding.readObservedInput xs).2.2.1).2.1) := by fun_prop
have hs : Poly (fun xs : Str => _root_.Integration9_9.LARRankOneMachine.observedJointSlots (_root_.Integration9_9.LARPlatformEncoding.readObservedInput xs).2.2.2) := by fun_prop
unfold _root_.Integration9_9.LARRankOneMachine.observedTicketCount
exact Poly.comp (f := _root_.Integration9_9.LARCoinMachine.powerWithSlots)
(g := fun xs : Str => ((_root_.Integration9_9.LARPlatformEncoding.readParameters (_root_.Integration9_9.LARPlatformEncoding.readObservedInput xs).2.2.1).2.1,
_root_.Integration9_9.LARRankOneMachine.observedJointSlots (_root_.Integration9_9.LARPlatformEncoding.readObservedInput xs).2.2.2)) _root_.Integration9_9.LARCoinMachine.powerWithSlots_poly (Poly.pair hq hs)
@[simp] theorem readCoinObserved_encPair (coins observed : Str) :
_root_.Integration9_9.LARRankOneMachine.readCoinObserved (encPair coins observed)=(coins,(_root_.Integration9_9.LARPlatformEncoding.readObservedInput observed).2) := by
have hs : _root_.Integration9_9.LARPlatformEncoding.readS (encS observed)=([],observed) := by
simpa only [List.append_nil] using _root_.Integration9_9.LARPlatformEncoding.readS_append observed []
simp only [_root_.Integration9_9.LARRankOneMachine.readCoinObserved,encPair,_root_.Integration9_9.LARPlatformEncoding.readS_append,hs]
end Integration9_9.LARRankOneMachine
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.PublicParameterProgram
end CurrentAFT.PublicParameterProgram
namespace CurrentAFT.PublicParameterProgram.checkedPower
end CurrentAFT.PublicParameterProgram.checkedPower
namespace CurrentAFT.PublicParameterProgram.checkedProduct
end CurrentAFT.PublicParameterProgram.checkedProduct
namespace CurrentAFT.PublicParameterProgram.checkedScan
end CurrentAFT.PublicParameterProgram.checkedScan
namespace CurrentAFT.PublicParameterProgram.primeTest
end CurrentAFT.PublicParameterProgram.primeTest
namespace CurrentAFT.PublicParameterProgram.testWork
end CurrentAFT.PublicParameterProgram.testWork
namespace CurrentAFT.PublicParameterProgram.workBound
end CurrentAFT.PublicParameterProgram.workBound
namespace CurrentAFT.PublicParameterProgram.workPolynomial
end CurrentAFT.PublicParameterProgram.workPolynomial
namespace Integration9_9
end Integration9_9
namespace Integration9_9.TM2NativePrime
end Integration9_9.TM2NativePrime
namespace Integration9_9.TM2NativePrime.candidateTest
end Integration9_9.TM2NativePrime.candidateTest
namespace Integration9_9.TM2NativePrime.doubleSlots
end Integration9_9.TM2NativePrime.doubleSlots
namespace Integration9_9.TM2NativePrime.powerSlots
end Integration9_9.TM2NativePrime.powerSlots
namespace Integration9_9.TM2NativePrime.powerSlots.match_1
end Integration9_9.TM2NativePrime.powerSlots.match_1
namespace Integration9_9.TM2NativePrime.primeTrial
end Integration9_9.TM2NativePrime.primeTrial
namespace Integration9_9.TM2NativePrime.thresholdSlots
end Integration9_9.TM2NativePrime.thresholdSlots
namespace Integration9_9.TM2NativePrime.upperSlots
end Integration9_9.TM2NativePrime.upperSlots
namespace Integration9_9.TM2PolynomialBudget
end Integration9_9.TM2PolynomialBudget
set_option autoImplicit false
set_option maxHeartbeats 300000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.LARCoinLayout
open InfoLossLAR.WorstCase QAlgorithms.Complexity Function Polynomial
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open OAI.MetricKMedian.Binary.Automatic.Poly
open QMCNumericRuntime LARPlatformEncoding LARRankOneMachine TM2PlatformSerialization
@[fun_prop] theorem layoutNatPower_poly (exponent : ℕ) : OAI.MetricKMedian.Binary.Automatic.Poly (fun n : ℕ => n^exponent) := by
induction exponent with
| zero => simpa only [pow_zero] using (OAI.MetricKMedian.Binary.Automatic.Poly.const (α := ℕ) (1 : ℕ))
| succ exponent ih =>
change OAI.MetricKMedian.Binary.Automatic.Poly (fun n : ℕ => n^exponent*n)
fun_prop
@[fun_prop] theorem layoutPolynomialEval_poly (budget : Polynomial ℕ) : OAI.MetricKMedian.Binary.Automatic.Poly (fun n : ℕ => budget.eval n) := by
induction budget using Polynomial.induction_on' with
| add first second hf hs =>
simpa only [eval_add] using (show OAI.MetricKMedian.Binary.Automatic.Poly (fun n : ℕ => first.eval n+second.eval n) by fun_prop)
| monomial exponent coefficient =>
simpa only [eval_monomial] using
(show OAI.MetricKMedian.Binary.Automatic.Poly (fun n : ℕ => coefficient*n^exponent) by fun_prop)
/-- Search only existing input positions; malformed total lengths return zero. -/
def coinBaseLength (budget : Polynomial ℕ) (word : Str) : ℕ :=
(((List.range (word.length+1)).filter
(fun index => decide (budget.eval index+index=word.length))).head?).getD 0
@[fun_prop] theorem coinBaseLength_poly (budget : Polynomial ℕ) : OAI.MetricKMedian.Binary.Automatic.Poly (_root_.Integration9_9.LARCoinLayout.coinBaseLength budget) := by
have hi : OAI.MetricKMedian.Binary.Automatic.Poly (fun word : Str => List.range (word.length+1)) := by
have h := OAI.MetricKMedian.Binary.Automatic.Poly.comp (f := fun xs : Str => List.range xs.length)
(g := fun word : Str => false::word) OAI.MetricKMedian.Binary.Automatic.Poly.list_indices (by fun_prop)
simpa only [List.length_cons] using h
unfold _root_.Integration9_9.LARCoinLayout.coinBaseLength
fun_prop
/-- A total actual program turns coin-first input into the literal platform pair. -/
def coinFirstPair (budget : Polynomial ℕ) (word : Str) : Str :=
let coinCount := budget.eval (_root_.Integration9_9.LARCoinLayout.coinBaseLength budget word)
encPair (word.take coinCount) (word.drop coinCount)
@[fun_prop] theorem coinFirstPair_poly (budget : Polynomial ℕ) :
OAI.MetricKMedian.Binary.Automatic.Poly (_root_.Integration9_9.LARCoinLayout.coinFirstPair budget) := by
have hn : OAI.MetricKMedian.Binary.Automatic.Poly (fun word : Str => budget.eval (_root_.Integration9_9.LARCoinLayout.coinBaseLength budget word)) :=
OAI.MetricKMedian.Binary.Automatic.Poly.comp (f := fun n : ℕ => budget.eval n)
(g := _root_.Integration9_9.LARCoinLayout.coinBaseLength budget) (_root_.Integration9_9.LARCoinLayout.layoutPolynomialEval_poly budget) (_root_.Integration9_9.LARCoinLayout.coinBaseLength_poly budget)
have hp := OAI.MetricKMedian.Binary.Automatic.Poly.pair
(OAI.MetricKMedian.Binary.Automatic.Poly.identity (α := Str)) hn
have ht := OAI.MetricKMedian.Binary.Automatic.Poly.comp
(f := fun x : Str × ℕ => x.1.take x.2)
(g := fun word : Str => (word,budget.eval (_root_.Integration9_9.LARCoinLayout.coinBaseLength budget word))) parser_take_poly hp
have hd := OAI.MetricKMedian.Binary.Automatic.Poly.comp
(f := fun x : Str × ℕ => x.1.drop x.2)
(g := fun word : Str => (word,budget.eval (_root_.Integration9_9.LARCoinLayout.coinBaseLength budget word))) parser_drop_poly hp
exact OAI.MetricKMedian.Binary.Automatic.Poly.comp (f := fun pair : Str × Str => encPair pair.1 pair.2)
(g := fun word : Str => (word.take (budget.eval (_root_.Integration9_9.LARCoinLayout.coinBaseLength budget word)),
word.drop (budget.eval (_root_.Integration9_9.LARCoinLayout.coinBaseLength budget word)))) _root_.Integration9_9.LARPlatformEncoding.encPair_poly
(OAI.MetricKMedian.Binary.Automatic.Poly.pair ht hd)
def coinFirstPre (budget : Polynomial ℕ) (fallback : Str) (word : Str) : Str :=
_root_.Integration9_9.LARRankOneMachine.boundedRankOneStringPre fallback (_root_.Integration9_9.LARCoinLayout.coinFirstPair budget word)
@[fun_prop] theorem coinFirstPre_poly (budget : Polynomial ℕ) (fallback : Str) :
OAI.MetricKMedian.Binary.Automatic.Poly (_root_.Integration9_9.LARCoinLayout.coinFirstPre budget fallback) :=
OAI.MetricKMedian.Binary.Automatic.Poly.comp (f := _root_.Integration9_9.LARRankOneMachine.boundedRankOneStringPre fallback)
(g := _root_.Integration9_9.LARCoinLayout.coinFirstPair budget) (_root_.Integration9_9.LARRankOneMachine.boundedRankOneStringPre_poly fallback) (_root_.Integration9_9.LARCoinLayout.coinFirstPair_poly budget)
/-- A concrete native program on encoded Boolean lists is a concrete raw
Bool-stack program, not just an abstract stock computability assertion. -/
noncomputable def rawPolyProgram {f : Str → Str}
(h : OAI.MetricKMedian.Binary.Automatic.Poly f) : PolyProgram id id f :=
((BooleanLists.packProgram.comp h.program).comp BooleanLists.unpackProgram).congr f (fun _ => rfl)
/-- This is an actual Bool-stack PolyProgram, ready for the verified uniform
quantum compiler, and is total on every malformed-length input too. -/
noncomputable def coinFirstPreProgram (budget : Polynomial ℕ) (fallback : Str) :
PolyProgram id id (_root_.Integration9_9.LARCoinLayout.coinFirstPre budget fallback) :=
_root_.Integration9_9.LARCoinLayout.rawPolyProgram (f := _root_.Integration9_9.LARCoinLayout.coinFirstPre budget fallback) (_root_.Integration9_9.LARCoinLayout.coinFirstPre_poly budget fallback)
end Integration9_9.LARCoinLayout
end
section
set_option autoImplicit false
set_option maxHeartbeats 500000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.LARCoinLayout
open InfoLossLAR.WorstCase QAlgorithms.Complexity Polynomial
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open OAI.MetricKMedian.Binary.Automatic.Poly
open QMCNumericRuntime LARRankOneMachine TM2PlatformSerialization
/-- One-hot actual query length followed by a fixed-width zero-padded query. -/
def encodeQueryOutput (slots : List Unit) (query : Str) : Str :=
((List.range (slots.length+1)).map (fun index => decide (query.length=index))) ++
(query++slots.map (fun _ => false)).take slots.length
@[fun_prop] theorem encodeQueryOutput_poly :
Poly (fun x : List Unit × Str => _root_.Integration9_9.LARCoinLayout.encodeQueryOutput x.1 x.2) := by
have hi : Poly (fun slots : List Unit => List.range (slots.length+1)) := by
have h := Poly.comp (f := fun xs : List Unit => List.range xs.length)
(g := fun slots : List Unit => ()::slots) Poly.list_indices (by fun_prop)
simpa only [List.length_cons] using h
have flags : Poly (fun x : List Unit × Str =>
(List.range (x.1.length+1)).map (fun index => decide (x.2.length=index))) := by
apply Poly.list_map
· exact (by fun_prop : Poly (fun x : (List Unit × Str) × ℕ => decide (x.1.2.length=x.2)))
· exact Poly.comp (f := fun slots : List Unit => List.range (slots.length+1))
(g := fun x : List Unit × Str => x.1) hi Poly.fst
have payload : Poly (fun x : List Unit × Str =>
(x.2++x.1.map (fun _ => false)).take x.1.length) :=
Poly.comp (f := fun x : Str × ℕ => x.1.take x.2)
(g := fun x : List Unit × Str => (x.2++x.1.map (fun _ => false),x.1.length))
parser_take_poly (by fun_prop)
exact Poly.comp (f := fun x : Str × Str => x.1++x.2)
(g := fun x : List Unit × Str =>
((List.range (x.1.length+1)).map (fun index => decide (x.2.length=index)),
(x.2++x.1.map (fun _ => false)).take x.1.length)) Poly.list_append (Poly.pair flags payload)
theorem encodeQueryOutput_length (slots : List Unit) (query : Str) :
(_root_.Integration9_9.LARCoinLayout.encodeQueryOutput slots query).length=2*slots.length+1 := by
simp only [_root_.Integration9_9.LARCoinLayout.encodeQueryOutput,List.length_append,List.length_map,List.length_range,List.length_take]
rw [Nat.min_eq_left (by omega)]
omega
/-- The padding loop uses only a recovered prefix of the existing input. -/
def queryOutputSlots (coins outputBudget : Polynomial ℕ) (word : Str) : List Unit :=
List.replicate (outputBudget.eval ((word.take (_root_.Integration9_9.LARCoinLayout.coinBaseLength coins word)).map (fun _ => ())).length) ()
attribute [local irreducible] coinFirstPre queryOutputSlots
end Integration9_9.LARCoinLayout
end
section
set_option autoImplicit false
set_option maxHeartbeats 2000000
set_option backward.isDefEq.respectTransparency false
namespace InfoLossLAR.WorstCase
open QAlgorithms.Complexity
open scoped BigOperators
/-- A literal all-zero computational basis register. -/
def coinZero (count : ℕ) : QState count := fun state => if state=(fun _ => false) then 1 else 0
/-- Real platform Hadamards, one physical fair-coin wire after another. -/
def coinCircuit : (count : ℕ) → Layered count
| 0 => []
| count+1 => _root_.InfoLossLAR.WorstCase.leftCircuit (coinCircuit count)++_root_.InfoLossLAR.WorstCase.rightCircuit (n := count) [[.h 0]]
noncomputable def coinAmplitude (count : ℕ) : ℂ := (((Real.sqrt 2)⁻¹ : ℝ) : ℂ)^count
theorem coinCircuit_direct (count : ℕ) : _root_.InfoLossLAR.WorstCase.coinCircuit count=List.ofFn (fun wire : Fin count => [Instr.h wire]) := by
induction count with
| zero => rfl
| succ count ih =>
rw [_root_.InfoLossLAR.WorstCase.coinCircuit,ih]
conv_rhs => rw [List.ofFn_succ_last]
simp only [_root_.InfoLossLAR.WorstCase.leftCircuit,_root_.InfoLossLAR.WorstCase.rightCircuit,List.map_ofFn,List.map_cons,List.map_nil,_root_.InfoLossLAR.WorstCase.leftInstruction,_root_.InfoLossLAR.WorstCase.rightInstruction]
rfl
@[simp] theorem coinCircuit_depth (count : ℕ) : depth (_root_.InfoLossLAR.WorstCase.coinCircuit count)=count := by
rw [_root_.InfoLossLAR.WorstCase.coinCircuit_direct]
simp [depth]
/-- Coherent branch amplitudes retain the coin register verbatim. -/
noncomputable def coinBranchState {coins body : ℕ} (branches : Bits coins → QState body) : QState (coins+body) :=
fun state => _root_.InfoLossLAR.WorstCase.coinAmplitude coins*branches (_root_.InfoLossLAR.WorstCase.leftRegister state) (_root_.InfoLossLAR.WorstCase.rightRegister state)
section Description
open OAI.MetricKMedian.Binary
open OAI.MetricKMedian.Binary.Automatic
open OAI.MetricKMedian.Binary.Automatic.Poly
open QMCNumericRuntime Integration9_9.TM2PlatformSerialization
/-- Literal unary-wire description of all H gates; each unary token is
constructed from an existing input prefix, never from an expanded binary integer. -/
def coinCircuitDescription (xs : Str) : Str :=
_root_.Integration9_9.TM2PlatformSerialization.serializeWords ((List.range xs.length).map fun wire =>
_root_.Integration9_9.TM2PlatformSerialization.serializeWords [encNat 0++_root_.Integration9_9.TM2PlatformSerialization.lengthToken (xs.take wire)])
end Description
end InfoLossLAR.WorstCase
end
section
set_option autoImplicit false
set_option maxHeartbeats 2000000
set_option backward.isDefEq.respectTransparency false
namespace InfoLossLAR.WorstCase
open QAlgorithms.Complexity
open scoped BigOperators
/-- A literal computational basis vector, including all workspace bits. -/
def computationalBasis {n : ℕ} (input : Bits n) : QState n := fun output => if output=input then 1 else 0
end InfoLossLAR.WorstCase
end
section
set_option autoImplicit false
set_option maxHeartbeats 2500000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
namespace InfoLossLAR.WorstCase.TM2Boolean
open Turing QAlgorithms.Complexity
open Integration9_9.TM2OutputLength
variable {K Λ σ : Type} [DecidableEq K] [Fintype K]
[DecidableEq Λ] [Fintype Λ] [DecidableEq σ] [Fintype σ]
variable {width : ℕ}
/-- The actual word, with zeros on every workspace address. -/
def wordExtension (word : List Bool) (i : ℕ) : Bool := (word[i]?).getD false
noncomputable def machineGates (hw : 0 < width)
(program : Λ → TM2.Stmt (fun _ : K => Bool) Λ σ)
(input : K) (main : Λ) (initialState : σ) (ticks length : ℕ) :
List (_root_.InfoLossLAR.WorstCase.BooleanGate (length + ((_root_.InfoLossLAR.WorstCase.TM2Boolean.machineProgram hw program input main initialState ticks length).ops.length + 1))) :=
_root_.InfoLossLAR.WorstCase.BooleanProgram.gates length (_root_.InfoLossLAR.WorstCase.TM2Boolean.machineProgram hw program input main initialState ticks length).ops (by omega)
noncomputable def machineOutputWire (hw : 0 < width)
(program : Λ → TM2.Stmt (fun _ : K => Bool) Λ σ)
(input : K) (main : Λ) (initialState : σ) (ticks length : ℕ) (i : _root_.InfoLossLAR.WorstCase.TM2Boolean.Slot K Λ σ width) :
Fin (length + ((_root_.InfoLossLAR.WorstCase.TM2Boolean.machineProgram hw program input main initialState ticks length).ops.length + 1)) :=
⟨(_root_.InfoLossLAR.WorstCase.TM2Boolean.machineProgram hw program input main initialState ticks length).output i, by
have := (_root_.InfoLossLAR.WorstCase.TM2Boolean.machineProgram_valid hw program input main initialState ticks length).2 i
omega⟩
end InfoLossLAR.WorstCase.TM2Boolean
end
section
set_option autoImplicit false
set_option maxHeartbeats 3000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
namespace InfoLossLAR.WorstCase.TM2Boolean.CodeGenerator
open Turing QAlgorithms.Complexity
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open Integration9_9.TM2PlatformSerialization
open RPN
variable {K Λ σ : Type} [DecidableEq K] [Fintype K]
[DecidableEq Λ] [Fintype Λ] [DecidableEq σ] [Fintype σ]
noncomputable def description (program : Λ → TM2.Stmt (fun _ : K => Bool) Λ σ)
(input : K) (main : Λ) (initialState : σ) (x : _root_.InfoLossLAR.WorstCase.TM2Boolean.CodeGenerator.Request) (index : ℕ) : Str :=
let result := _root_.InfoLossLAR.WorstCase.TM2Boolean.CodeGenerator.generate program input main initialState x
_root_.Integration9_9.TM2PlatformSerialization.lengthToken result.2.2.2 ++
_root_.InfoLossLAR.WorstCase.TM2Boolean.RPN.boundedNat result.2.1 ((result.2.2.1[index]?).getD 0) ++
_root_.Integration9_9.TM2PlatformSerialization.serializeWords (_root_.InfoLossLAR.WorstCase.TM2Boolean.RPN.instructionWords result.2.1 x.1.length result.2.2.2)
theorem description_eq (program : Λ → TM2.Stmt (fun _ : K => Bool) Λ σ)
(input : K) (main : Λ) (initialState : σ) (x : _root_.InfoLossLAR.WorstCase.TM2Boolean.CodeGenerator.Request) (hw : 0 < x.2.1.length)
(i : _root_.InfoLossLAR.WorstCase.TM2Boolean.Slot K Λ σ x.2.1.length) :
_root_.InfoLossLAR.WorstCase.TM2Boolean.CodeGenerator.description program input main initialState x (_root_.InfoLossLAR.WorstCase.TM2Boolean.slotEquiv K Λ σ x.2.1.length i).val =
encNat (_root_.InfoLossLAR.WorstCase.TM2Boolean.machineProgram hw program input main initialState x.2.2.length x.1.length).ops.length ++
encNat ((_root_.InfoLossLAR.WorstCase.TM2Boolean.machineProgram hw program input main initialState x.2.2.length x.1.length).output i) ++
encStr ((_root_.InfoLossLAR.WorstCase.TM2Boolean.machineGates hw program input main initialState x.2.2.length x.1.length).map _root_.InfoLossLAR.WorstCase.BooleanGate.code) := by
let g := _root_.InfoLossLAR.WorstCase.TM2Boolean.CodeGenerator.generate program input main initialState x
let m := _root_.InfoLossLAR.WorstCase.TM2Boolean.machineProgram hw program input main initialState x.2.2.length x.1.length
obtain ⟨hops, hslots, hout⟩ := _root_.InfoLossLAR.WorstCase.TM2Boolean.CodeGenerator.generate_machineProgram program input main initialState x hw
have hlt := (_root_.InfoLossLAR.WorstCase.TM2Boolean.machineProgram_valid hw program input main initialState x.2.2.length x.1.length).2 i
have hi : ((g.2.2.1[(_root_.InfoLossLAR.WorstCase.TM2Boolean.slotEquiv K Λ σ x.2.1.length i).val]?).getD 0) ≤ g.2.1.length := by
change ((_root_.InfoLossLAR.WorstCase.TM2Boolean.CodeGenerator.generate program input main initialState x).2.2.1[_]?).getD 0 ≤ _
rw [hout i, hslots]
exact hlt.le
unfold _root_.InfoLossLAR.WorstCase.TM2Boolean.CodeGenerator.description
dsimp only
dsimp only [g] at hi
rw [_root_.InfoLossLAR.WorstCase.TM2Boolean.RPN.boundedNat_eq _ _ hi, hout i, _root_.Integration9_9.TM2PlatformSerialization.lengthToken_eq, hops, List.length_map]
rw [_root_.InfoLossLAR.WorstCase.TM2Boolean.RPN.instructionWords_gates (total := x.1.length+((_root_.InfoLossLAR.WorstCase.TM2Boolean.machineProgram hw program input main initialState x.2.2.length x.1.length).ops.length+1)) _ _ _ (by omega)
(_root_.InfoLossLAR.WorstCase.TM2Boolean.machineProgram_valid hw program input main initialState x.2.2.length x.1.length).1
(by rw [hslots])]
rw [_root_.Integration9_9.TM2PlatformSerialization.serializeWords_eq]
rfl
end InfoLossLAR.WorstCase.TM2Boolean.CodeGenerator
end
section
set_option autoImplicit false
set_option maxHeartbeats 2500000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
noncomputable section
namespace InfoLossLAR.WorstCase.TM2Boolean
open Turing StateTransition QAlgorithms.Complexity
open Integration9_9.TM2OutputLength
open OAI.MetricKMedian.Binary
namespace PolyProgramCircuit
variable {f : Str → Str} (P : PolyProgram id id f)
local instance _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.instDecidableEqLabelMachineListBool_solutions : DecidableEq P.machine.Label := Classical.decEq _
local instance _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.instDecidableEqStateMachineListBool_solutions : DecidableEq P.machine.State := Classical.decEq _
noncomputable def capacity (length : ℕ) : ℕ :=
length + _root_.Integration9_9.TM2OutputLength.programPushBound P.machine.code * P.time.eval length + 1
theorem capacity_pos (length : ℕ) : 0 < _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.capacity P length := by unfold _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.capacity; omega
noncomputable def compiled (length : ℕ) :
_root_.InfoLossLAR.WorstCase.TM2Boolean.MachineProgram P.machine.K P.machine.Label P.machine.State (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.capacity P length) :=
_root_.InfoLossLAR.WorstCase.TM2Boolean.machineProgram (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.capacity_pos P length) P.machine.code P.machine.input P.machine.main P.machine.initial
(P.time.eval length) length
noncomputable def result (word : Str) : Bits (word.length + ((_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.compiled P word.length).ops.length + 1)) :=
fun j => _root_.InfoLossLAR.WorstCase.BooleanProgram.run word.length (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.compiled P word.length).ops (_root_.InfoLossLAR.WorstCase.TM2Boolean.wordExtension word) j.val
noncomputable def outputWire (length : ℕ) (i : Fin (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.capacity P length)) (b : Option Bool) :
Fin (length + ((_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.compiled P length).ops.length + 1)) :=
_root_.InfoLossLAR.WorstCase.TM2Boolean.machineOutputWire (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.capacity_pos P length) P.machine.code P.machine.input P.machine.main P.machine.initial
(P.time.eval length) length (.inr (.inr (P.machine.output, i, b)))
/-- A polynomial counting every configuration field at every actual machine step. -/
noncomputable def spacePolynomial : Polynomial ℕ :=
(1 + P.time * Polynomial.C (_root_.InfoLossLAR.WorstCase.TM2Boolean.transitionBound P.machine.code 0)) *
(Polynomial.C (Fintype.card P.machine.Label + 1 + Fintype.card P.machine.State) +
Polynomial.C (3 * Fintype.card P.machine.K) *
(Polynomial.X + Polynomial.C (_root_.Integration9_9.TM2OutputLength.programPushBound P.machine.code) * P.time + 1))
end PolyProgramCircuit
end InfoLossLAR.WorstCase.TM2Boolean
end
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.PublicParameterProgram
end CurrentAFT.PublicParameterProgram
namespace CurrentAFT.PublicParameterProgram.checkedPower
end CurrentAFT.PublicParameterProgram.checkedPower
namespace CurrentAFT.PublicParameterProgram.checkedProduct
end CurrentAFT.PublicParameterProgram.checkedProduct
namespace CurrentAFT.PublicParameterProgram.checkedScan
end CurrentAFT.PublicParameterProgram.checkedScan
namespace CurrentAFT.PublicParameterProgram.primeTest
end CurrentAFT.PublicParameterProgram.primeTest
namespace CurrentAFT.PublicParameterProgram.testWork
end CurrentAFT.PublicParameterProgram.testWork
namespace CurrentAFT.PublicParameterProgram.workBound
end CurrentAFT.PublicParameterProgram.workBound
namespace CurrentAFT.PublicParameterProgram.workPolynomial
end CurrentAFT.PublicParameterProgram.workPolynomial
namespace Integration9_9
end Integration9_9
namespace Integration9_9.TM2NativePrime
end Integration9_9.TM2NativePrime
namespace Integration9_9.TM2NativePrime.candidateTest
end Integration9_9.TM2NativePrime.candidateTest
namespace Integration9_9.TM2NativePrime.doubleSlots
end Integration9_9.TM2NativePrime.doubleSlots
namespace Integration9_9.TM2NativePrime.powerSlots
end Integration9_9.TM2NativePrime.powerSlots
namespace Integration9_9.TM2NativePrime.powerSlots.match_1
end Integration9_9.TM2NativePrime.powerSlots.match_1
namespace Integration9_9.TM2NativePrime.primeTrial
end Integration9_9.TM2NativePrime.primeTrial
namespace Integration9_9.TM2NativePrime.thresholdSlots
end Integration9_9.TM2NativePrime.thresholdSlots
namespace Integration9_9.TM2NativePrime.upperSlots
end Integration9_9.TM2NativePrime.upperSlots
namespace Integration9_9.TM2PolynomialBudget
end Integration9_9.TM2PolynomialBudget
set_option autoImplicit false
set_option maxHeartbeats 4000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
noncomputable section
namespace InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
open Turing StateTransition QAlgorithms.Complexity Polynomial
open Integration9_9.TM2OutputLength Integration9_9.TM2PlatformSerialization
open Integration9_9.TM2PolynomialBudget
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open CodeGenerator
variable {f : Str → Str} (P : PolyProgram id id f)
local instance _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.instDecidableEqLabelMachineListBool_solutions_1 : DecidableEq P.machine.Label := Classical.decEq _
local instance _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.instDecidableEqStateMachineListBool_solutions_1 : DecidableEq P.machine.State := Classical.decEq _
def capacityPolynomial : Polynomial ℕ := X+C (_root_.Integration9_9.TM2OutputLength.programPushBound P.machine.code)*P.time+1
theorem capacityPolynomial_eval (n : ℕ) : (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.capacityPolynomial P).eval n = _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.capacity P n := by
simp only [_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.capacityPolynomial, eval_add, eval_X, eval_mul, eval_C, eval_one, _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.capacity]
def request (xs : Str) : _root_.InfoLossLAR.WorstCase.TM2Boolean.CodeGenerator.Request :=
let slots := xs.map (fun _ => ())
(slots, List.replicate ((_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.capacityPolynomial P).eval slots.length) (), List.replicate (P.time.eval slots.length) ())
theorem request_unary (n : ℕ) : _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.request P (unary n) =
(List.replicate n (), List.replicate (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.capacity P n) (), List.replicate (P.time.eval n) ()) := by
simp only [_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.request, unary, List.map_replicate, List.length_replicate, _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.capacityPolynomial_eval]
def outputIndex (width : ℕ) : ℕ :=
Fintype.card (Option P.machine.Label)+(Fintype.card P.machine.State+
((Fintype.equivFin (Option Bool) (some true)).val+
(width*Fintype.card (Option Bool))*(Fintype.equivFin P.machine.K P.machine.output).val))
def descriptionGenerator (xs : Str) : Str :=
_root_.InfoLossLAR.WorstCase.TM2Boolean.CodeGenerator.description P.machine.code P.machine.input P.machine.main P.machine.initial
(_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.request P xs) (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.outputIndex P (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.request P xs).2.1.length)
def booleanFamily : _root_.InfoLossLAR.WorstCase.BooleanFamily where
anc n := (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.compiled P n).ops.length
gates n := _root_.InfoLossLAR.WorstCase.TM2Boolean.machineGates (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.capacity_pos P n) P.machine.code P.machine.input P.machine.main P.machine.initial (P.time.eval n) n
out n := _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.outputWire P n ⟨0,_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.capacity_pos P n⟩ (some true)
def renderedDescription (width ticks length : ℕ) : Str :=
if hw : 0 < width then
let m := _root_.InfoLossLAR.WorstCase.TM2Boolean.machineProgram hw P.machine.code P.machine.input P.machine.main P.machine.initial ticks length
encNat m.ops.length ++ encNat (m.output (.inr (.inr (P.machine.output,⟨0,hw⟩,some true)))) ++
encStr ((_root_.InfoLossLAR.WorstCase.TM2Boolean.machineGates hw P.machine.code P.machine.input P.machine.main P.machine.initial ticks length).map _root_.InfoLossLAR.WorstCase.BooleanGate.code)
else []
theorem description_request (x : _root_.InfoLossLAR.WorstCase.TM2Boolean.CodeGenerator.Request) (hw : 0 < x.2.1.length) :
_root_.InfoLossLAR.WorstCase.TM2Boolean.CodeGenerator.description P.machine.code P.machine.input P.machine.main P.machine.initial
x (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.outputIndex P x.2.1.length) = _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.renderedDescription P x.2.1.length x.2.2.length x.1.length := by
let i : _root_.InfoLossLAR.WorstCase.TM2Boolean.Slot P.machine.K P.machine.Label P.machine.State x.2.1.length :=
.inr (.inr (P.machine.output,⟨0,hw⟩,some true))
have hi : (_root_.InfoLossLAR.WorstCase.TM2Boolean.slotEquiv P.machine.K P.machine.Label P.machine.State x.2.1.length i).val = _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.outputIndex P x.2.1.length := by
rw [_root_.InfoLossLAR.WorstCase.TM2Boolean.slot_stack_index]
simp only [_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.outputIndex, Nat.mul_zero, Nat.add_zero, i]
have he := _root_.InfoLossLAR.WorstCase.TM2Boolean.CodeGenerator.description_eq P.machine.code P.machine.input P.machine.main P.machine.initial x hw i
rw [hi] at he
simpa only [_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.renderedDescription, dif_pos hw, i] using he
theorem descriptionGenerator_code (n : ℕ) : _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.descriptionGenerator P (unary n) = (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.booleanFamily P).code n := by
have hw : 0 < (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.request P (unary n)).2.1.length := by
simp only [_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.request_unary, List.length_replicate]
exact _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.capacity_pos P n
unfold _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.descriptionGenerator
rw [_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.description_request P _ hw]
simp only [_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.request_unary, List.length_replicate]
simp only [_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.renderedDescription, dif_pos (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.capacity_pos P n), _root_.InfoLossLAR.WorstCase.BooleanFamily.code, _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.booleanFamily,
_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.compiled, _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.outputWire, _root_.InfoLossLAR.WorstCase.TM2Boolean.machineOutputWire]
end InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
end
end
section
namespace InfoLossLAR
end InfoLossLAR
namespace InfoLossLAR.WorstCase
end InfoLossLAR.WorstCase
namespace InfoLossLAR.WorstCase.TM2Boolean
end InfoLossLAR.WorstCase.TM2Boolean
namespace InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
end InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
namespace Integration9_9
end Integration9_9
namespace Integration9_9.LARCoinLayout
end Integration9_9.LARCoinLayout
set_option autoImplicit false
set_option maxHeartbeats 1000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
noncomputable section
namespace InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
open QAlgorithms.Complexity
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open CodeGenerator
variable {f : Str → Str} (P : PolyProgram id id f)
local instance _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.instDecidableEqLabelMachineListBool_solutions_3 : DecidableEq P.machine.Label := Classical.decEq _
local instance _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.instDecidableEqStateMachineListBool_solutions_3 : DecidableEq P.machine.State := Classical.decEq _
/-- The exact complete-table index of an arbitrary SomeTrue output cell. -/
def outputSlotIndex (width index : ℕ) : ℕ :=
Fintype.card (Option P.machine.Label)+(Fintype.card P.machine.State+
((Fintype.equivFin (Option Bool) (some true)).val+Fintype.card (Option Bool)*index+
(width*Fintype.card (Option Bool))*(Fintype.equivFin P.machine.K P.machine.output).val))
/-- A real native table lookup on the actual generated complete output map. -/
def generatedOutputAddress (x : _root_.InfoLossLAR.WorstCase.TM2Boolean.CodeGenerator.Request) (index : ℕ) : ℕ :=
let generated := _root_.InfoLossLAR.WorstCase.TM2Boolean.CodeGenerator.generate P.machine.code P.machine.input P.machine.main P.machine.initial x
((generated.2.2.1[_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.outputSlotIndex P x.2.1.length index]?).getD 0)
def generatedProgramOutputAddress (word : Str) (index : ℕ) : ℕ :=
_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.generatedOutputAddress P (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.request P word) index
/-- A bounded native request for a consecutive block of actual output addresses. -/
def generatedAddressRange (word : Str) (slots : List Unit) (offset : ℕ) : List ℕ :=
(List.range slots.length).map (fun index => _root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.generatedProgramOutputAddress P word (offset+index))
end InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
end
end
section
set_option autoImplicit false
set_option maxHeartbeats 1000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
namespace InfoLossLAR.WorstCase
open QAlgorithms.Complexity
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2Boolean.RPN
/-- A fresh register position is either zero or a copy of an original source. -/
def registerLoadOp (source : Bool × ℕ) : _root_.InfoLossLAR.WorstCase.BooleanOp :=
if source.1 then .copy source.2 else .constant false
def registerLoadOps (sources : List (Bool × ℕ)) : List _root_.InfoLossLAR.WorstCase.BooleanOp := sources.map _root_.InfoLossLAR.WorstCase.registerLoadOp
def registerLoadValue (source : Bool × ℕ) (state : ℕ → Bool) : Bool :=
if source.1 then state source.2 else false
theorem registerLoadOps_length (sources : List (Bool × ℕ)) :
(_root_.InfoLossLAR.WorstCase.registerLoadOps sources).length=sources.length := by simp [_root_.InfoLossLAR.WorstCase.registerLoadOps]
/-- The emitted records can be consumed directly by the real Boolean serializer. -/
def registerLoadNode (source : Bool × ℕ) : _root_.InfoLossLAR.WorstCase.TM2Boolean.RPN.Node :=
if source.1 then (2,source.2,0) else (0,0,0)
def registerLoadGateWords (slots : List Unit) (start : ℕ) (sources : List (Bool × ℕ)) : List Str :=
_root_.InfoLossLAR.WorstCase.TM2Boolean.RPN.instructionWords slots start (sources.map _root_.InfoLossLAR.WorstCase.registerLoadNode)
end InfoLossLAR.WorstCase
end
section
set_option autoImplicit false
set_option maxHeartbeats 1000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
namespace InfoLossLAR.WorstCase
open QAlgorithms.Complexity
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open QMCNumericRuntime
/-- Input positions copy the padded true query; all D ancilla positions are zero. -/
def dBlockLoadSources (querySources : List ℕ) (request slots : List Unit) : List (Bool × ℕ) :=
(List.range slots.length).map (fun index =>
(decide (index < request.length),(querySources[index]?).getD 0))
theorem dBlockLoadSources_length (querySources : List ℕ) (request slots : List Unit) :
(_root_.InfoLossLAR.WorstCase.dBlockLoadSources querySources request slots).length=slots.length := by simp [_root_.InfoLossLAR.WorstCase.dBlockLoadSources]
/-- Every length gets its own disjoint physical D register. Only public D
metadata and already computed query-wire addresses determine these copies. -/
def dBundleLoadSources (querySources : List ℕ) (descriptions : List (Str × Str)) : List (Bool × ℕ) :=
descriptions.flatMap (fun description => _root_.InfoLossLAR.WorstCase.dBlockLoadSources querySources
(description.1.map (fun _ => ())) ((_root_.InfoLossLAR.WorstCase.readFamilyFrame description).1.map (fun _ => ())))
theorem dBundleLoadSources_physical_length (D : Family) (maximum : ℕ) (query : Str) (querySources : List ℕ) :
(_root_.InfoLossLAR.WorstCase.dBundleLoadSources querySources (_root_.InfoLossLAR.WorstCase.describedQueryBlocks D maximum)).length=
_root_.InfoLossLAR.WorstCase.bundleWidth (_root_.InfoLossLAR.WorstCase.queryBlocks D maximum query) := by
have hlength (descriptions : List (Str × Str)) :
(_root_.InfoLossLAR.WorstCase.dBundleLoadSources querySources descriptions).length=
((descriptions.map _root_.InfoLossLAR.WorstCase.readFamilyFrame).flatMap (fun frame => frame.1)).length := by
induction descriptions with
| nil => rfl
| cons description rest ih =>
simp only [_root_.InfoLossLAR.WorstCase.dBundleLoadSources,List.flatMap_cons,List.length_append,List.map_cons,
_root_.InfoLossLAR.WorstCase.dBlockLoadSources_length,List.length_map] at *
rw [ih]
rw [hlength,_root_.InfoLossLAR.WorstCase.describedQueryBlocks_frames D maximum query]
have hwidth (blocks : List _root_.InfoLossLAR.WorstCase.QuantumBlock) :
((blocks.map _root_.InfoLossLAR.WorstCase.blockFrameWords).flatMap (fun frame => frame.1)).length=_root_.InfoLossLAR.WorstCase.bundleWidth blocks := by
induction blocks with
| nil => rfl
| cons block rest ih =>
simp only [List.map_cons,List.flatMap_cons,List.length_append,_root_.InfoLossLAR.WorstCase.blockFrameWords,
unary,List.length_replicate,_root_.InfoLossLAR.WorstCase.bundleWidth] at *
exact congrArg (fun n => block.wires+n) ih
exact hwidth _
end InfoLossLAR.WorstCase
end
section
set_option autoImplicit false
set_option maxHeartbeats 1000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
noncomputable section
namespace Integration9_9.LARCoinLayout
open InfoLossLAR.WorstCase InfoLossLAR.WorstCase.TM2Boolean
open InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
open QAlgorithms.Complexity Polynomial
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
/-- An actual polynomial unary request for the total coin-first input length. -/
def queryWireRequest (coins : Polynomial ℕ) (word : Str) : Str :=
(List.replicate ((coins+X).eval (word.map (fun _ => ())).length) ()).map (fun _ => true)
def queryWireSlots (outputBudget : Polynomial ℕ) (word : Str) : List Unit :=
List.replicate (outputBudget.eval (word.map (fun _ => ())).length) ()
@[fun_prop] theorem queryWireSlots_poly (outputBudget : Polynomial ℕ) : Poly (_root_.Integration9_9.LARCoinLayout.queryWireSlots outputBudget) := by
unfold _root_.Integration9_9.LARCoinLayout.queryWireSlots
exact Poly.comp (f := fun slots : List Unit => List.replicate (outputBudget.eval slots.length) ())
(g := fun word : Str => word.map (fun _ => ()))
(_root_.Integration9_9.TM2PolynomialBudget.polynomialSlots_poly outputBudget) (by fun_prop)
theorem queryWireSlots_length (outputBudget : Polynomial ℕ) (word : Str) :
(_root_.Integration9_9.LARCoinLayout.queryWireSlots outputBudget word).length=outputBudget.eval word.length := by
simp [_root_.Integration9_9.LARCoinLayout.queryWireSlots]
end Integration9_9.LARCoinLayout
end
end
section
namespace Integration9_9
end Integration9_9
namespace Integration9_9.LARCoinLayout
end Integration9_9.LARCoinLayout
namespace Integration9_9.LARCoinLayout.queryFlagAddresses
end Integration9_9.LARCoinLayout.queryFlagAddresses
set_option autoImplicit false
set_option maxHeartbeats 1000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
noncomputable section
namespace InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
open QAlgorithms.Complexity
open OAI.MetricKMedian.Binary
/-- Physical output values extended by false beyond the actual circuit register. -/
def generatedQueryBits {f : Str → Str} (P : PolyProgram id id f) (word : Str) : ℕ → Bool :=
_root_.InfoLossLAR.WorstCase.selectorBitsExtension (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.result P word)
end InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
namespace Integration9_9.LARCoinLayout
open InfoLossLAR.WorstCase InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
open QAlgorithms.Complexity Polynomial
open OAI.MetricKMedian.Binary
open LARRankOneMachine
end Integration9_9.LARCoinLayout
end
end
section
set_option autoImplicit false
set_option maxHeartbeats 500000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
noncomputable section
namespace Integration9_9.LARCoinLayout
open InfoLossLAR.WorstCase InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
open QAlgorithms.Complexity Polynomial
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open LARRankOneMachine
/-- Padding is governed by the actual body input length, including its coins. -/
def bodyQueryOutput (coins padding : Polynomial ℕ) (fallback : Str) (word : Str) : Str :=
_root_.Integration9_9.LARCoinLayout.encodeQueryOutput (_root_.Integration9_9.LARCoinLayout.queryWireSlots padding word) (_root_.Integration9_9.LARCoinLayout.coinFirstPre coins fallback word)
attribute [local irreducible] coinFirstPre queryWireSlots
@[fun_prop] theorem bodyQueryOutput_poly (coins padding : Polynomial ℕ) (fallback : Str) :
Poly (_root_.Integration9_9.LARCoinLayout.bodyQueryOutput coins padding fallback) := by
have hp : Poly (fun word : Str => (_root_.Integration9_9.LARCoinLayout.queryWireSlots padding word,_root_.Integration9_9.LARCoinLayout.coinFirstPre coins fallback word)) :=
Poly.pair (f := _root_.Integration9_9.LARCoinLayout.queryWireSlots padding) (g := _root_.Integration9_9.LARCoinLayout.coinFirstPre coins fallback)
(_root_.Integration9_9.LARCoinLayout.queryWireSlots_poly padding) (_root_.Integration9_9.LARCoinLayout.coinFirstPre_poly coins fallback)
exact Poly.comp (f := fun x : List Unit × Str => _root_.Integration9_9.LARCoinLayout.encodeQueryOutput x.1 x.2)
(g := fun word : Str => (_root_.Integration9_9.LARCoinLayout.queryWireSlots padding word,_root_.Integration9_9.LARCoinLayout.coinFirstPre coins fallback word))
_root_.Integration9_9.LARCoinLayout.encodeQueryOutput_poly hp
def bodyQueryProgram (coins padding : Polynomial ℕ) (fallback : Str) :
PolyProgram id id (_root_.Integration9_9.LARCoinLayout.bodyQueryOutput coins padding fallback) :=
_root_.Integration9_9.LARCoinLayout.rawPolyProgram (f := _root_.Integration9_9.LARCoinLayout.bodyQueryOutput coins padding fallback) (_root_.Integration9_9.LARCoinLayout.bodyQueryOutput_poly coins padding fallback)
/-- A fixed polynomial bounds every actual raw query, including malformed input. -/
def bodyQueryBudget (coins : Polynomial ℕ) (fallback : Str) : Polynomial ℕ :=
(_root_.Integration9_9.LARCoinLayout.coinFirstPreProgram coins fallback).sizeBound
/-- True native metadata for the body's complete flag prefix. -/
def bodyFlagAddresses (coins padding : Polynomial ℕ) (fallback : Str) (word : Str) : List ℕ :=
_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.generatedAddressRange (_root_.Integration9_9.LARCoinLayout.bodyQueryProgram coins padding fallback) word (_root_.Integration9_9.LARCoinLayout.queryWireSlots padding word++[()]) 0
def bodyPayloadAddresses (coins padding : Polynomial ℕ) (fallback : Str) (word : Str) : List ℕ :=
_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.generatedAddressRange (_root_.Integration9_9.LARCoinLayout.bodyQueryProgram coins padding fallback) word (_root_.Integration9_9.LARCoinLayout.queryWireSlots padding word)
((_root_.Integration9_9.LARCoinLayout.queryWireSlots padding word).length+1)
theorem bodyFlagAddresses_length (coins padding : Polynomial ℕ) (fallback word : Str) :
(_root_.Integration9_9.LARCoinLayout.bodyFlagAddresses coins padding fallback word).length=padding.eval word.length+1 := by
simp only [_root_.Integration9_9.LARCoinLayout.bodyFlagAddresses,_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.generatedAddressRange,List.length_map,List.length_range,
List.length_append,List.length_singleton,_root_.Integration9_9.LARCoinLayout.queryWireSlots_length]
end Integration9_9.LARCoinLayout
end
end
section
set_option autoImplicit false
set_option maxHeartbeats 1000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
namespace InfoLossLAR.WorstCase
open QAlgorithms.Complexity
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open QMCNumericRuntime
/-- Fresh coin slots followed by a work copy of the complete original input. -/
def inputCopySources (coinSlots inputSlots : List Unit) : List (Bool × ℕ) :=
coinSlots.map (fun _ => (false,0))++(List.range inputSlots.length).map (fun i => (true,i))
theorem inputCopySources_length (coinSlots inputSlots : List Unit) :
(_root_.InfoLossLAR.WorstCase.inputCopySources coinSlots inputSlots).length=coinSlots.length+inputSlots.length := by
simp [_root_.InfoLossLAR.WorstCase.inputCopySources]
/-- Actual native code emission for these physical zero/copy instructions. -/
def inputCopyGateWords (slots coinSlots inputSlots : List Unit) : List Str :=
_root_.InfoLossLAR.WorstCase.registerLoadGateWords slots inputSlots.length (_root_.InfoLossLAR.WorstCase.inputCopySources coinSlots inputSlots)
end InfoLossLAR.WorstCase
end
section
set_option autoImplicit false
set_option maxHeartbeats 1000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
namespace InfoLossLAR.WorstCase
open QAlgorithms.Complexity TM2Boolean
namespace BooleanProgram
end BooleanProgram
def inputCopyResult (word : Str) (coins index : ℕ) : Bool :=
if index < word.length then _root_.InfoLossLAR.WorstCase.TM2Boolean.wordExtension word index
else if index < word.length+coins then false
else if index < word.length+coins+word.length then _root_.InfoLossLAR.WorstCase.TM2Boolean.wordExtension word (index-(word.length+coins))
else false
end InfoLossLAR.WorstCase
end
section
set_option autoImplicit false
set_option maxHeartbeats 1000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
noncomputable section
namespace InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
open QAlgorithms.Complexity
open OAI.MetricKMedian.Binary
/-- The actual machine Boolean program, its unused terminal zero wire, and the
complete physical D-register load are one fresh Boolean assignment program. -/
def preparedLoadOps {f : Str → Str} (P : PolyProgram id id f) (length : ℕ) (sources : List (Bool × ℕ)) : List _root_.InfoLossLAR.WorstCase.BooleanOp :=
(_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.compiled P length).ops ++ (.constant false::_root_.InfoLossLAR.WorstCase.registerLoadOps sources)
theorem preparedLoadOps_length {f : Str → Str} (P : PolyProgram id id f)
(length : ℕ) (sources : List (Bool × ℕ)) :
(_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.preparedLoadOps P length sources).length=(_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.compiled P length).ops.length+1+sources.length := by
simp only [_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.preparedLoadOps,List.length_append,List.length_cons,_root_.InfoLossLAR.WorstCase.registerLoadOps_length]
omega
def preparedCoreBits {f : Str → Str} (P : PolyProgram id id f) (word : Str) : ℕ → Bool :=
Function.update (_root_.InfoLossLAR.WorstCase.BooleanProgram.run word.length (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.compiled P word.length).ops (_root_.InfoLossLAR.WorstCase.TM2Boolean.wordExtension word))
(word.length+(_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.compiled P word.length).ops.length) false
end InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
namespace Integration9_9.LARCoinLayout
open InfoLossLAR.WorstCase InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
open QAlgorithms.Complexity Polynomial
end Integration9_9.LARCoinLayout
end
end
section
set_option autoImplicit false
set_option maxHeartbeats 1000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
namespace InfoLossLAR.WorstCase
open QAlgorithms.Complexity
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open QMCNumericRuntime Integration9_9.TM2PlatformSerialization
/-- Capture exactly the consumed self-delimiting Boolean instruction word. -/
def readRawBooleanWord (xs : Str) : Str × Str :=
let remaining := (_root_.InfoLossLAR.WorstCase.readBooleanInstruction xs).1
(remaining,xs.take (xs.length-remaining.length))
def readRawBooleanWords : Str → Str × List Str := _root_.Integration9_9.TM2PlatformSerialization.readList _root_.InfoLossLAR.WorstCase.readRawBooleanWord
def readRawBooleanFamilyWords (xs : Str) : List Str :=
(_root_.InfoLossLAR.WorstCase.readRawBooleanWords ((_root_.Integration9_9.TM2PlatformSerialization.readUnary ((_root_.Integration9_9.TM2PlatformSerialization.readUnary xs).2)).2)).2
namespace BooleanProgram
end BooleanProgram
namespace TM2Boolean.PolyProgramCircuit
end TM2Boolean.PolyProgramCircuit
end InfoLossLAR.WorstCase
end
section
set_option autoImplicit false
set_option maxHeartbeats 1000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
noncomputable section
namespace Integration9_9.LARCoinLayout
open InfoLossLAR.WorstCase InfoLossLAR.WorstCase.TM2Boolean
open InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
open QAlgorithms.Complexity Polynomial
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open QMCNumericRuntime TM2PlatformSerialization
/-- True ancilla slots of the actual native-to-quantum compiled query program. -/
def bodyPreAncSlots (coins padding : Polynomial ℕ) (fallback : Str) (word : Str) : List Unit :=
(_root_.InfoLossLAR.WorstCase.unaryPayload (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.descriptionGenerator (_root_.Integration9_9.LARCoinLayout.bodyQueryProgram coins padding fallback) word)).map (fun _ => ())
theorem bodyPreAncSlots_length (coins padding : Polynomial ℕ) (fallback : Str) (n : ℕ) :
(_root_.Integration9_9.LARCoinLayout.bodyPreAncSlots coins padding fallback (unary n)).length=(_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.compiled (_root_.Integration9_9.LARCoinLayout.bodyQueryProgram coins padding fallback) n).ops.length := by
unfold _root_.Integration9_9.LARCoinLayout.bodyPreAncSlots
rw [_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.descriptionGenerator_code]
simp only [_root_.InfoLossLAR.WorstCase.BooleanFamily.code,_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.booleanFamily,List.append_assoc,_root_.InfoLossLAR.WorstCase.unaryPayload_encNat,
List.length_map,unary,List.length_replicate]
def bodyPreSlots (coins padding : Polynomial ℕ) (fallback : Str) (word : Str) : List Unit :=
word.map (fun _ => ())++_root_.Integration9_9.LARCoinLayout.bodyPreAncSlots coins padding fallback word++[()]
def bodyDBundleSlots (descriptions : List (Str × Str)) : List Unit :=
descriptions.flatMap (fun description => (_root_.InfoLossLAR.WorstCase.readFamilyFrame description).1.map (fun _ => ()))
theorem bodyDBundleSlots_length (D : Family) (maximum : ℕ) (query : Str) :
(_root_.Integration9_9.LARCoinLayout.bodyDBundleSlots (_root_.InfoLossLAR.WorstCase.describedQueryBlocks D maximum)).length=_root_.InfoLossLAR.WorstCase.bundleWidth (_root_.InfoLossLAR.WorstCase.queryBlocks D maximum query) := by
have h (descriptions : List (Str × Str)) :
(_root_.Integration9_9.LARCoinLayout.bodyDBundleSlots descriptions).length=(_root_.InfoLossLAR.WorstCase.dBundleLoadSources [] descriptions).length := by
induction descriptions with
| nil => rfl
| cons description rest ih =>
simp only [_root_.Integration9_9.LARCoinLayout.bodyDBundleSlots,_root_.InfoLossLAR.WorstCase.dBundleLoadSources,List.flatMap_cons,List.length_append,
_root_.InfoLossLAR.WorstCase.dBlockLoadSources_length,List.length_map] at *
rw [ih]
rw [h,_root_.InfoLossLAR.WorstCase.dBundleLoadSources_physical_length D maximum query []]
def bodySelectorChoices (coins padding : Polynomial ℕ) (fallback : Str)
(word : Str) (descriptions : List (Str × Str)) : List (ℕ × ℕ) :=
(_root_.Integration9_9.LARCoinLayout.bodyFlagAddresses coins padding fallback word).zip
((_root_.InfoLossLAR.WorstCase.emitDOutputs descriptions).map (fun token =>
(_root_.Integration9_9.LARCoinLayout.bodyPreSlots coins padding fallback word).length+inputWidth token))
theorem bodySelectorChoices_length (coins padding : Polynomial ℕ) (fallback : Str) (D : Family) (n : ℕ) :
(_root_.Integration9_9.LARCoinLayout.bodySelectorChoices coins padding fallback (unary n) (_root_.InfoLossLAR.WorstCase.describedQueryBlocks D (padding.eval n))).length=
padding.eval n+1 := by
unfold _root_.Integration9_9.LARCoinLayout.bodySelectorChoices
rw [List.length_zip,_root_.Integration9_9.LARCoinLayout.bodyFlagAddresses_length,List.length_map,_root_.InfoLossLAR.WorstCase.emitDOutputs_correct D _ []]
simp only [List.length_ofFn,_root_.InfoLossLAR.WorstCase.queryBlocks,unary,List.length_replicate,Nat.min_self]
/-- The exact global ancillary register, including fresh D loading and selector scratch. -/
def bodyAncSlots (coins padding : Polynomial ℕ) (fallback : Str) (word : Str) (descriptions : List (Str × Str)) : List Unit :=
_root_.Integration9_9.LARCoinLayout.bodyPreAncSlots coins padding fallback word++[()]++_root_.Integration9_9.LARCoinLayout.bodyDBundleSlots descriptions++
_root_.InfoLossLAR.WorstCase.multiSelectorScratch (_root_.Integration9_9.LARCoinLayout.bodySelectorChoices coins padding fallback word descriptions)
def bodyAllSlots (coins padding : Polynomial ℕ) (fallback : Str) (word : Str) (descriptions : List (Str × Str)) : List Unit :=
word.map (fun _ => ())++_root_.Integration9_9.LARCoinLayout.bodyAncSlots coins padding fallback word descriptions++[()]
end Integration9_9.LARCoinLayout
end
end
section
set_option autoImplicit false
set_option maxHeartbeats 1000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
noncomputable section
namespace Integration9_9.LARCoinLayout
open InfoLossLAR.WorstCase InfoLossLAR.WorstCase.TM2Boolean
open InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
open QAlgorithms.Complexity Polynomial
open OAI.MetricKMedian.Binary
/-- The actual complete D-load source list for a body circuit of input length n. -/
def bodySources (coins padding : Polynomial ℕ) (fallback : Str) (D : Family) (n : ℕ) : List (Bool × ℕ) :=
_root_.InfoLossLAR.WorstCase.dBundleLoadSources (_root_.Integration9_9.LARCoinLayout.bodyPayloadAddresses coins padding fallback (unary n))
(_root_.InfoLossLAR.WorstCase.describedQueryBlocks D (padding.eval n))
def bodyChoices (coins padding : Polynomial ℕ) (fallback : Str) (D : Family) (n : ℕ) : List (ℕ × ℕ) :=
_root_.Integration9_9.LARCoinLayout.bodySelectorChoices coins padding fallback (unary n) (_root_.InfoLossLAR.WorstCase.describedQueryBlocks D (padding.eval n))
def bodyAnc (coins padding : Polynomial ℕ) (fallback : Str) (D : Family) (n : ℕ) : ℕ :=
(_root_.Integration9_9.LARCoinLayout.bodyAncSlots coins padding fallback (unary n) (_root_.InfoLossLAR.WorstCase.describedQueryBlocks D (padding.eval n))).length
def bodyWidth (coins padding : Polynomial ℕ) (fallback : Str) (D : Family) (n : ℕ) : ℕ :=
n+(_root_.Integration9_9.LARCoinLayout.bodyAnc coins padding fallback D n+1)
def bodyPreWidth (coins padding : Polynomial ℕ) (fallback : Str) (n : ℕ) : ℕ :=
n+((_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.compiled (_root_.Integration9_9.LARCoinLayout.bodyQueryProgram coins padding fallback) n).ops.length+1)
def bodyDWidth (padding : Polynomial ℕ) (D : Family) (n : ℕ) : ℕ :=
_root_.InfoLossLAR.WorstCase.bundleWidth (_root_.InfoLossLAR.WorstCase.queryBlocks D (padding.eval n) [])
theorem bodyChoices_length (coins padding : Polynomial ℕ) (fallback : Str) (D : Family) (n : ℕ) :
(_root_.Integration9_9.LARCoinLayout.bodyChoices coins padding fallback D n).length=padding.eval n+1 :=
_root_.Integration9_9.LARCoinLayout.bodySelectorChoices_length coins padding fallback D n
theorem bodySources_length (coins padding : Polynomial ℕ) (fallback : Str) (D : Family) (n : ℕ) :
(_root_.Integration9_9.LARCoinLayout.bodySources coins padding fallback D n).length=_root_.Integration9_9.LARCoinLayout.bodyDWidth padding D n :=
_root_.InfoLossLAR.WorstCase.dBundleLoadSources_physical_length D (padding.eval n) [] _
theorem bodyAnc_formula (coins padding : Polynomial ℕ) (fallback : Str) (D : Family) (n : ℕ) :
_root_.Integration9_9.LARCoinLayout.bodyAnc coins padding fallback D n=(_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.compiled (_root_.Integration9_9.LARCoinLayout.bodyQueryProgram coins padding fallback) n).ops.length+1+
_root_.Integration9_9.LARCoinLayout.bodyDWidth padding D n+4*(padding.eval n+1) := by
unfold _root_.Integration9_9.LARCoinLayout.bodyAnc _root_.Integration9_9.LARCoinLayout.bodyAncSlots _root_.Integration9_9.LARCoinLayout.bodyDWidth
simp only [List.length_append,List.length_singleton,_root_.InfoLossLAR.WorstCase.multiSelectorScratch_length,
_root_.Integration9_9.LARCoinLayout.bodyPreAncSlots_length,_root_.Integration9_9.LARCoinLayout.bodyDBundleSlots_length D _ [],_root_.Integration9_9.LARCoinLayout.bodySelectorChoices_length]
theorem bodyWidth_formula (coins padding : Polynomial ℕ) (fallback : Str) (D : Family) (n : ℕ) :
_root_.Integration9_9.LARCoinLayout.bodyWidth coins padding fallback D n=_root_.Integration9_9.LARCoinLayout.bodyPreWidth coins padding fallback n+_root_.Integration9_9.LARCoinLayout.bodyDWidth padding D n+
(4*(padding.eval n+1)+1) := by
rw [_root_.Integration9_9.LARCoinLayout.bodyWidth,_root_.Integration9_9.LARCoinLayout.bodyAnc_formula]
unfold _root_.Integration9_9.LARCoinLayout.bodyPreWidth
omega
theorem bodyPrepared_bound (coins padding : Polynomial ℕ) (fallback : Str) (D : Family) (n : ℕ) :
n+(_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.preparedLoadOps (_root_.Integration9_9.LARCoinLayout.bodyQueryProgram coins padding fallback) n (_root_.Integration9_9.LARCoinLayout.bodySources coins padding fallback D n)).length ≤
_root_.Integration9_9.LARCoinLayout.bodyWidth coins padding fallback D n := by
rw [_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.preparedLoadOps_length,_root_.Integration9_9.LARCoinLayout.bodySources_length,_root_.Integration9_9.LARCoinLayout.bodyWidth_formula]
unfold _root_.Integration9_9.LARCoinLayout.bodyPreWidth
omega
theorem bodySelected_bound (coins padding : Polynomial ℕ) (fallback : Str) (D : Family) (n : ℕ) :
_root_.Integration9_9.LARCoinLayout.bodyPreWidth coins padding fallback n+_root_.Integration9_9.LARCoinLayout.bodyDWidth padding D n+
4*(_root_.Integration9_9.LARCoinLayout.bodyChoices coins padding fallback D n).length ≤ _root_.Integration9_9.LARCoinLayout.bodyWidth coins padding fallback D n := by
rw [_root_.Integration9_9.LARCoinLayout.bodyWidth_formula,_root_.Integration9_9.LARCoinLayout.bodyChoices_length]
omega
def bodyPreparedGates (coins padding : Polynomial ℕ) (fallback : Str) (D : Family) (n : ℕ) :
List (_root_.InfoLossLAR.WorstCase.BooleanGate (_root_.Integration9_9.LARCoinLayout.bodyWidth coins padding fallback D n)) :=
_root_.InfoLossLAR.WorstCase.BooleanProgram.gates n (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.preparedLoadOps (_root_.Integration9_9.LARCoinLayout.bodyQueryProgram coins padding fallback) n
(_root_.Integration9_9.LARCoinLayout.bodySources coins padding fallback D n)) (_root_.Integration9_9.LARCoinLayout.bodyPrepared_bound coins padding fallback D n)
def bodySelectorGates (coins padding : Polynomial ℕ) (fallback : Str) (D : Family) (n : ℕ) :
List (_root_.InfoLossLAR.WorstCase.BooleanGate (_root_.Integration9_9.LARCoinLayout.bodyWidth coins padding fallback D n)) :=
_root_.InfoLossLAR.WorstCase.BooleanProgram.gates (_root_.Integration9_9.LARCoinLayout.bodyPreWidth coins padding fallback n+_root_.Integration9_9.LARCoinLayout.bodyDWidth padding D n)
(_root_.InfoLossLAR.WorstCase.multiSelectorOps (_root_.Integration9_9.LARCoinLayout.bodyPreWidth coins padding fallback n+_root_.Integration9_9.LARCoinLayout.bodyDWidth padding D n) 0
(_root_.Integration9_9.LARCoinLayout.bodyChoices coins padding fallback D n))
(by simpa only [_root_.InfoLossLAR.WorstCase.multiSelectorOps_length] using _root_.Integration9_9.LARCoinLayout.bodySelected_bound coins padding fallback D n)
/-- Pure dimension equality casts do not change any gate or instruction value. -/
def castBodyCircuit {left right : ℕ} (h : left=right) (circuit : Layered left) : Layered right := h ▸ circuit
def bodyDCircuit (coins padding : Polynomial ℕ) (fallback : Str) (D : Family) (n : ℕ) :
Layered (_root_.Integration9_9.LARCoinLayout.bodyWidth coins padding fallback D n) :=
_root_.Integration9_9.LARCoinLayout.castBodyCircuit (by rw [_root_.Integration9_9.LARCoinLayout.bodyWidth_formula]; rfl)
(_root_.InfoLossLAR.WorstCase.leftCircuit (m := 4*(padding.eval n+1)+1)
(_root_.InfoLossLAR.WorstCase.rightCircuit (n := _root_.Integration9_9.LARCoinLayout.bodyPreWidth coins padding fallback n) (_root_.InfoLossLAR.WorstCase.bundleCircuit (_root_.InfoLossLAR.WorstCase.queryBlocks D (padding.eval n) []))))
def bodyCircuit (coins padding : Polynomial ℕ) (fallback : Str) (D : Family) (n : ℕ) :
Layered (_root_.Integration9_9.LARCoinLayout.bodyWidth coins padding fallback D n) :=
_root_.InfoLossLAR.WorstCase.compileReversible (_root_.InfoLossLAR.WorstCase.booleanToReversible (_root_.Integration9_9.LARCoinLayout.bodyPreparedGates coins padding fallback D n)) ++
_root_.Integration9_9.LARCoinLayout.bodyDCircuit coins padding fallback D n ++
_root_.InfoLossLAR.WorstCase.compileReversible (_root_.InfoLossLAR.WorstCase.booleanToReversible (_root_.Integration9_9.LARCoinLayout.bodySelectorGates coins padding fallback D n))
def bodyOutput (coins padding : Polynomial ℕ) (fallback : Str) (D : Family) (n : ℕ) :
Fin (_root_.Integration9_9.LARCoinLayout.bodyWidth coins padding fallback D n) :=
⟨_root_.InfoLossLAR.WorstCase.multiSelectorOutput (_root_.Integration9_9.LARCoinLayout.bodyPreWidth coins padding fallback n+_root_.Integration9_9.LARCoinLayout.bodyDWidth padding D n) 0
(_root_.Integration9_9.LARCoinLayout.bodyChoices coins padding fallback D n),
(_root_.InfoLossLAR.WorstCase.multiSelectorOutput_lt _ 0 _ (by unfold _root_.Integration9_9.LARCoinLayout.bodyPreWidth; omega)).trans_le
(_root_.Integration9_9.LARCoinLayout.bodySelected_bound coins padding fallback D n)⟩
/-- The concrete body runs the actual query compiler/load, all actual D blocks,
and the actual fresh Boolean selector on one physical register. -/
def bodyFamily (coins padding : Polynomial ℕ) (fallback : Str) (D : Family) : Family where
anc := _root_.Integration9_9.LARCoinLayout.bodyAnc coins padding fallback D
circ := _root_.Integration9_9.LARCoinLayout.bodyCircuit coins padding fallback D
out := _root_.Integration9_9.LARCoinLayout.bodyOutput coins padding fallback D
end Integration9_9.LARCoinLayout
end
end
section
namespace InfoLossLAR
end InfoLossLAR
namespace InfoLossLAR.WorstCase
end InfoLossLAR.WorstCase
namespace Integration9_9
end Integration9_9
namespace Integration9_9.LARCoinLayout
end Integration9_9.LARCoinLayout
namespace Integration9_9.LARCoinLayout.bodyAncPolynomial
end Integration9_9.LARCoinLayout.bodyAncPolynomial
namespace Integration9_9.LARCoinLayout.bodyDWidth
end Integration9_9.LARCoinLayout.bodyDWidth
namespace Integration9_9.LARCoinLayout.bodyDWidthPolynomial
end Integration9_9.LARCoinLayout.bodyDWidthPolynomial
namespace Integration9_9.LARCoinLayout.bodyDepthPolynomial
end Integration9_9.LARCoinLayout.bodyDepthPolynomial
set_option autoImplicit false
set_option maxHeartbeats 1000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
noncomputable section
namespace InfoLossLAR.WorstCase.BooleanProgram
open QAlgorithms.Complexity
end InfoLossLAR.WorstCase.BooleanProgram
namespace Integration9_9.LARCoinLayout
open InfoLossLAR.WorstCase InfoLossLAR.WorstCase.TM2Boolean
open InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
open QAlgorithms.Complexity Polynomial
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open QMCNumericRuntime TM2PlatformSerialization TM2Boolean.RPN
/-- The actual terminal zero instruction, captured through its existing unary slots. -/
def bodyZeroWord (coins padding : Polynomial ℕ) (fallback : Str) (word : Str) : Str :=
encNat 0++_root_.Integration9_9.TM2PlatformSerialization.lengthToken (word.map (fun _ => ())++_root_.Integration9_9.LARCoinLayout.bodyPreAncSlots coins padding fallback word)
/-- Genuine native code for the full preprocessing and D-register loading program. -/
def bodyPreparedWords (coins padding : Polynomial ℕ) (fallback : Str) (word : Str)
(descriptions : List (Str × Str)) : List Str :=
_root_.InfoLossLAR.WorstCase.readRawBooleanFamilyWords (_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.descriptionGenerator (_root_.Integration9_9.LARCoinLayout.bodyQueryProgram coins padding fallback) word)++
[_root_.Integration9_9.LARCoinLayout.bodyZeroWord coins padding fallback word]++
_root_.InfoLossLAR.WorstCase.registerLoadGateWords (_root_.Integration9_9.LARCoinLayout.bodyAllSlots coins padding fallback word descriptions)
(_root_.Integration9_9.LARCoinLayout.bodyPreSlots coins padding fallback word).length
(_root_.InfoLossLAR.WorstCase.dBundleLoadSources (_root_.Integration9_9.LARCoinLayout.bodyPayloadAddresses coins padding fallback word) descriptions)
/-- Real native code for the actual final quantum-output selector. -/
def bodySelectorWords (coins padding : Polynomial ℕ) (fallback : Str) (word : Str)
(descriptions : List (Str × Str)) : List Str :=
_root_.InfoLossLAR.WorstCase.multiSelectorGateWords (_root_.Integration9_9.LARCoinLayout.bodyAllSlots coins padding fallback word descriptions)
((_root_.Integration9_9.LARCoinLayout.bodyPreSlots coins padding fallback word).length+(_root_.Integration9_9.LARCoinLayout.bodyDBundleSlots descriptions).length) 0
(_root_.Integration9_9.LARCoinLayout.bodySelectorChoices coins padding fallback word descriptions)
end Integration9_9.LARCoinLayout
end
end
section
namespace InfoLossLAR
end InfoLossLAR
namespace InfoLossLAR.WorstCase
end InfoLossLAR.WorstCase
namespace Integration9_9
end Integration9_9
namespace Integration9_9.LARCoinLayout
end Integration9_9.LARCoinLayout
namespace Integration9_9.LARCoinLayout.bodyAncPolynomial
end Integration9_9.LARCoinLayout.bodyAncPolynomial
namespace Integration9_9.LARCoinLayout.bodyDWidth
end Integration9_9.LARCoinLayout.bodyDWidth
namespace Integration9_9.LARCoinLayout.bodyDWidthPolynomial
end Integration9_9.LARCoinLayout.bodyDWidthPolynomial
namespace Integration9_9.LARCoinLayout.bodyDepthPolynomial
end Integration9_9.LARCoinLayout.bodyDepthPolynomial
set_option autoImplicit false
set_option maxHeartbeats 1000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
noncomputable section
namespace InfoLossLAR.WorstCase
open QAlgorithms.Complexity
end InfoLossLAR.WorstCase
namespace Integration9_9.LARCoinLayout
open InfoLossLAR.WorstCase InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
open QAlgorithms.Complexity Polynomial
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2PlatformSerialization
/-- The actual D bundle instruction words shifted into the body's true physical register. -/
def bodyDWordLayers (coins padding : Polynomial ℕ) (fallback : Str) (word : Str)
(descriptions : List (Str × Str)) : List (List Str) :=
_root_.InfoLossLAR.WorstCase.shiftCircuitWords ((_root_.Integration9_9.LARCoinLayout.bodyPreSlots coins padding fallback word).map (fun _ => true))
(_root_.InfoLossLAR.WorstCase.bundleCircuitWordLayers (descriptions.map _root_.InfoLossLAR.WorstCase.readFamilyFrame))
end Integration9_9.LARCoinLayout
end
end
section
set_option autoImplicit false
set_option maxHeartbeats 500000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
noncomputable section
namespace InfoLossLAR.WorstCase
open QAlgorithms.Complexity
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open Integration9_9.TM2PlatformSerialization
def readFamilyCircuitLayers (word : Str) : List (List Str) :=
(_root_.InfoLossLAR.WorstCase.readCircuitLayers ((_root_.Integration9_9.TM2PlatformSerialization.readUnary ((_root_.Integration9_9.TM2PlatformSerialization.readUnary word).2)).2)).2
end InfoLossLAR.WorstCase
namespace Integration9_9.LARCoinLayout
open InfoLossLAR.WorstCase InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
open QAlgorithms.Complexity Polynomial
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2PlatformSerialization InfoLossLAR.WorstCase.TM2Boolean.RPN
def bodyOutputWord (coins padding : Polynomial ℕ) (fallback : Str) (word : Str)
(descriptions : List (Str × Str)) : Str :=
_root_.InfoLossLAR.WorstCase.TM2Boolean.RPN.boundedNat (_root_.Integration9_9.LARCoinLayout.bodyAllSlots coins padding fallback word descriptions)
(_root_.InfoLossLAR.WorstCase.multiSelectorFinalIndex ((_root_.Integration9_9.LARCoinLayout.bodyPreSlots coins padding fallback word).length+
(_root_.Integration9_9.LARCoinLayout.bodyDBundleSlots descriptions).length) 0 (_root_.Integration9_9.LARCoinLayout.bodySelectorChoices coins padding fallback word descriptions))
def bodyPreparedBooleanDescription (coins padding : Polynomial ℕ) (fallback : Str) (word : Str)
(descriptions : List (Str × Str)) : Str :=
_root_.Integration9_9.TM2PlatformSerialization.lengthToken (_root_.Integration9_9.LARCoinLayout.bodyAncSlots coins padding fallback word descriptions)++
_root_.Integration9_9.LARCoinLayout.bodyOutputWord coins padding fallback word descriptions++
_root_.Integration9_9.TM2PlatformSerialization.serializeWords (_root_.Integration9_9.LARCoinLayout.bodyPreparedWords coins padding fallback word descriptions)
def bodySelectorBooleanDescription (coins padding : Polynomial ℕ) (fallback : Str) (word : Str)
(descriptions : List (Str × Str)) : Str :=
_root_.Integration9_9.TM2PlatformSerialization.lengthToken (_root_.Integration9_9.LARCoinLayout.bodyAncSlots coins padding fallback word descriptions)++
_root_.Integration9_9.LARCoinLayout.bodyOutputWord coins padding fallback word descriptions++
_root_.Integration9_9.TM2PlatformSerialization.serializeWords (_root_.Integration9_9.LARCoinLayout.bodySelectorWords coins padding fallback word descriptions)
def bodyPreparedQuantumDescription (coins padding : Polynomial ℕ) (fallback : Str) (word : Str)
(descriptions : List (Str × Str)) : Str :=
_root_.InfoLossLAR.WorstCase.compileReversibleDescription (_root_.InfoLossLAR.WorstCase.compileBooleanDescription
(_root_.Integration9_9.LARCoinLayout.bodyPreparedBooleanDescription coins padding fallback word descriptions))
def bodySelectorQuantumDescription (coins padding : Polynomial ℕ) (fallback : Str) (word : Str)
(descriptions : List (Str × Str)) : Str :=
_root_.InfoLossLAR.WorstCase.compileReversibleDescription (_root_.InfoLossLAR.WorstCase.compileBooleanDescription
(_root_.Integration9_9.LARCoinLayout.bodySelectorBooleanDescription coins padding fallback word descriptions))
attribute [local irreducible] bodyPreparedQuantumDescription bodySelectorQuantumDescription bodyDWordLayers
end Integration9_9.LARCoinLayout
end
end
section
set_option autoImplicit false
set_option maxHeartbeats 1000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
namespace InfoLossLAR.WorstCase
open QAlgorithms.Complexity
/-- The exact padded input/zero-ancilla basis of one length-specific D circuit. -/
def familyInputBits (D : Family) (query : Str) (length : ℕ) : Bits (length+(D.anc length+1)) :=
fun index => if index.val < length then (query[index.val]?).getD false else false
def indexedQueryBlocks (D : Family) (query : Str) (lengths : List ℕ) : List _root_.InfoLossLAR.WorstCase.QuantumBlock :=
lengths.map (fun length => _root_.InfoLossLAR.WorstCase.familyBlock D length (fun index => (query[index.val]?).getD false))
/-- The true concatenated D input bits, expressed without finite-index casts. -/
def bundleNaturalBits (D : Family) (query : Str) : List ℕ → ℕ → Bool
| [],_ => false
| length::rest,index =>
if index < length+(D.anc length+1) then
if index < length then (query[index]?).getD false else false
else bundleNaturalBits D query rest (index-(length+(D.anc length+1)))
/-- Value read at a D-loader destination, with false outside its finite list. -/
def sourceValueAt (sources : List (Bool × ℕ)) (state : ℕ → Bool) (index : ℕ) : Bool :=
((sources[index]?).map (fun source => _root_.InfoLossLAR.WorstCase.registerLoadValue source state)).getD false
def lengthDescriptions (D : Family) (lengths : List ℕ) : List (Str × Str) :=
lengths.map (fun length => (unary length,encFamilyAt D length))
end InfoLossLAR.WorstCase
end
section
set_option autoImplicit false
set_option maxHeartbeats 1000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
noncomputable section
namespace Integration9_9.LARCoinLayout
open InfoLossLAR.WorstCase InfoLossLAR.WorstCase.TM2Boolean
open InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
open QAlgorithms.Complexity Polynomial
/-- Exact complete classical value vector after the real fresh preparation. -/
def bodyPreparedBits (coins padding : Polynomial ℕ) (fallback : Str) (D : Family)
(word : Str) : ℕ → Bool :=
_root_.InfoLossLAR.WorstCase.BooleanProgram.run word.length
(_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.preparedLoadOps (_root_.Integration9_9.LARCoinLayout.bodyQueryProgram coins padding fallback) word.length
(_root_.Integration9_9.LARCoinLayout.bodySources coins padding fallback D word.length)) (_root_.InfoLossLAR.WorstCase.TM2Boolean.wordExtension word)
/-- Pure register-width transport of a quantum state. -/
def castBodyState {left right : ℕ} (h : left=right) (state : QState left) : QState right := h ▸ state
end Integration9_9.LARCoinLayout
end
end
section
set_option autoImplicit false
set_option maxHeartbeats 1000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
noncomputable section
namespace Integration9_9.GenericBody
open InfoLossLAR.WorstCase InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit
open QAlgorithms.Complexity Polynomial
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open Integration9_9.LARCoinLayout
/-- An actual query-output machine and its fixed polynomial output layout.
The machine certificate is the platform's concrete stock TM2 PolyProgram. -/
structure QueryProgram where
f : Str → Str
program : PolyProgram id id f
padding : Polynomial ℕ
output_length : ∀ word, (f word).length = 2 * padding.eval word.length + 1
def bodyQueryProgram (Q : _root_.Integration9_9.GenericBody.QueryProgram) : PolyProgram id id Q.f := Q.program
def bodyFlagAddresses (Q : _root_.Integration9_9.GenericBody.QueryProgram) (word : Str) : List ℕ :=
_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.generatedAddressRange (_root_.Integration9_9.GenericBody.bodyQueryProgram Q) word (_root_.Integration9_9.LARCoinLayout.queryWireSlots Q.padding word ++ [()]) 0
def bodyPayloadAddresses (Q : _root_.Integration9_9.GenericBody.QueryProgram) (word : Str) : List ℕ :=
_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.generatedAddressRange (_root_.Integration9_9.GenericBody.bodyQueryProgram Q) word (_root_.Integration9_9.LARCoinLayout.queryWireSlots Q.padding word)
((_root_.Integration9_9.LARCoinLayout.queryWireSlots Q.padding word).length + 1)
theorem bodyFlagAddresses_length (Q : _root_.Integration9_9.GenericBody.QueryProgram) (word : Str) :
(_root_.Integration9_9.GenericBody.bodyFlagAddresses Q word).length = Q.padding.eval word.length + 1 := by
simp only [_root_.Integration9_9.GenericBody.bodyFlagAddresses,_root_.InfoLossLAR.WorstCase.TM2Boolean.PolyProgramCircuit.generatedAddressRange,List.length_map,List.length_range,
List.length_append,List.length_singleton,_root_.Integration9_9.LARCoinLayout.queryWireSlots_length]
end Integration9_9.GenericBody
end
end
Source
Companion Lean implementation for InfoLossLAR.WorstCase.fixed_family_gaussian_advantage_transfer. The definitions are extracted from the checked source modules listed in the publication manifest at /private/tmp/p2m_task4/first_bridge_extraction/publication_ready.json. Exact generated-source SHA-256: ed6f5da77bad45facf6288d1269c4050eccf260bf75178f5b3255b84bd05ba26. Source modules: Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeBoundedRankOne, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeCoinMachine, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgePreMachine, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeCoinLayout, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeQueryOutput, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeQuantumCoins, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeCoinPreparation, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_RegevBridgeTM2Quantum, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_RegevBridgeTM2CodeDescription, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_RegevBridgeTM2PolyCircuit, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_RegevBridgeTM2PolyUniform, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeQueryMetadata, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeRegisterLoad, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeDRegisterLoad, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeQueryWiring, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeQueryPointerSemantics, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeBodyQuery, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeInputCopy, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeCopyPreparation, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgePreparedLoad, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeBodyCodeCapture, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeBodyLayout, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeBodyFamily, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeBodyBooleanEmission, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeBodyDEmission, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeBodyUniform, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeBundleBasis, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeBodyPreparedState, Definitions.Def_InfoLossLAR_FirstBridge_Solutions_AdvantageBridgeGenericBodyQuery.