Public permutation sampling and affine output encoding
DefinitionInfoLossLAR_RuntimeBundle_03affine-transportinfo-loss-lar-runtimestoc-2027
These programs draw finite tickets, arrays, permutations, and public control seeds, then assemble an integer affine map from its loads, roots, offsets, and columns. The resulting matrix and offset are serialized in the platform binary encoding. The package also supplies local coefficient and tensor routines used in the later sampler stages.
Definition code
import Definitions.Def_InfoLossLAR_RuntimeBundle_02
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
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.CurrentProbabilityArrayDraw
end CurrentAFT.CurrentProbabilityArrayDraw
namespace CurrentAFT.CurrentProbabilityArrayDraw.ProbabilityArray
end CurrentAFT.CurrentProbabilityArrayDraw.ProbabilityArray
namespace CurrentAFT.CurrentProbabilityArrayDraw.ProbabilityArray.mk
end CurrentAFT.CurrentProbabilityArrayDraw.ProbabilityArray.mk
namespace CurrentAFT.CurrentProbabilityArrayDraw.draw
end CurrentAFT.CurrentProbabilityArrayDraw.draw
namespace CurrentAFT.CurrentProbabilityArrayDraw.positiveDraw
end CurrentAFT.CurrentProbabilityArrayDraw.positiveDraw
namespace CurrentAFT.CurrentProbabilityArrayDraw.workBound
end CurrentAFT.CurrentProbabilityArrayDraw.workBound
set_option autoImplicit false
set_option maxHeartbeats 2000000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativeTicketDraw
open AFT AFT.RationalNumerics AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeFiniteDraw TM2NativeFiniteSeries
open scoped BigOperators
def floorTable (x : List ℚ × List Unit) : List ℕ := x.1.map (fun q => _root_.Integration9_9.TM2NativeFiniteDraw.dyadicFloor (q,x.2))
def supplement (x : ℕ × List ℕ) : List ℕ := if x.2.isEmpty then [] else (x.2[0]?.getD 0+x.1)::x.2.tail
def ticketTable (x : List ℚ × List Unit) : List ℕ := _root_.Integration9_9.TM2NativeTicketDraw.supplement (_root_.Integration9_9.TM2NativeFiniteDraw.dyadicPower x.2-_root_.Integration9_9.TM2NativeFiniteDraw.natSum (_root_.Integration9_9.TM2NativeTicketDraw.floorTable x),_root_.Integration9_9.TM2NativeTicketDraw.floorTable x)
def current (x : List ℚ × List Bool) : ℕ := _root_.Integration9_9.TM2NativeFiniteDraw.bucket (_root_.Integration9_9.TM2NativeTicketDraw.ticketTable (x.1,_root_.Integration9_9.TM2NativeFiniteDraw.ticks x.2),_root_.Integration9_9.TM2NativeFiniteDraw.tapeValue x.2)
structure Context where
count : ℕ
weights : Vector _root_.AFT.BinaryArithmetic.RationalBits (count+1)
nonneg : ∀ i,0≤(weights.get i).decode
mass : ∑i,(weights.get i).decode=1
bits : ℕ
word : Fin bits → Fin 2
end Integration9_9.TM2NativeTicketDraw
end
section
namespace AFT
end AFT
namespace AFT.BinaryArithmetic
end AFT.BinaryArithmetic
set_option autoImplicit false
set_option maxHeartbeats 2000000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativePositiveDraw
open AFT AFT.RationalNumerics AFT.BinaryArithmetic
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeRootGroupProfiles
open scoped BigOperators
def positive (q : ℚ) : ℚ := if q<0 then 0 else q
def clipped (xs : List ℚ) : List ℚ := xs.map _root_.Integration9_9.TM2NativePositiveDraw.positive
def total (xs : List ℚ) : ℚ := (_root_.Integration9_9.TM2NativePositiveDraw.clipped xs).sum
def normalize (xs : List ℚ) : List ℚ :=
if _root_.Integration9_9.TM2NativePositiveDraw.total xs=0 then (List.range xs.length).map (fun i => if i=0 then 1 else 0)
else (_root_.Integration9_9.TM2NativePositiveDraw.clipped xs).map (fun q => q/_root_.Integration9_9.TM2NativePositiveDraw.total xs)
def current (x : List ℚ × List Bool) : ℕ := _root_.Integration9_9.TM2NativeTicketDraw.current (_root_.Integration9_9.TM2NativePositiveDraw.normalize x.1,x.2)
structure Context where
count : ℕ
raw : Vector _root_.AFT.BinaryArithmetic.RationalBits (count+1)
bits : ℕ
word : Fin (bits+(count+1)+1) → Fin 2
end Integration9_9.TM2NativePositiveDraw
end
section
namespace AFT
end AFT
namespace AFT.BinaryArithmetic
end AFT.BinaryArithmetic
namespace AFT.BinaryArithmetic.binaryUniformDrawPolynomial
end AFT.BinaryArithmetic.binaryUniformDrawPolynomial
namespace AFT.BinaryArithmetic.binaryUniformDrawWork
end AFT.BinaryArithmetic.binaryUniformDrawWork
set_option autoImplicit false
set_option maxHeartbeats 1800000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativeArrayDraw
open AFT AFT.BinaryArithmetic CurrentAFT CurrentProbabilityArrayDraw
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open scoped BigOperators
/-- The input population is a unary array, so its probability vector is
materialized in time polynomial in the actual input length. -/
def uniform (x : List Unit × List Bool) : ℕ :=
_root_.Integration9_9.TM2NativePositiveDraw.current (x.1.map (fun _ => (x.1.length : ℚ)⁻¹),x.2)
end Integration9_9.TM2NativeArrayDraw
end
section
namespace AFT
end AFT
namespace AFT.BinaryArithmetic
end AFT.BinaryArithmetic
namespace AFT.BinaryArithmetic.binaryPermutationRows
end AFT.BinaryArithmetic.binaryPermutationRows
namespace AFT.BinaryArithmetic.binaryPermutationRows.match_1
end AFT.BinaryArithmetic.binaryPermutationRows.match_1
namespace AFT.BinaryArithmetic.insertionImage
end AFT.BinaryArithmetic.insertionImage
set_option autoImplicit false
set_option maxHeartbeats 2000000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativePermutationRows
open AFT AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic Polynomial
open scoped BigOperators
def choice (x : List ℕ × List Bool) : ℕ :=
_root_.Integration9_9.TM2NativeTicketDraw.current (((0::x.1).map (fun _ => ((x.1.length+1 : ℕ) : ℚ)⁻¹)),x.2)
def step (rows : List ℕ) (word : List Bool) : List ℕ :=
let pick := min (_root_.Integration9_9.TM2NativePermutationRows.choice (rows,word)) rows.length
pick::rows.map (fun image => if min image rows.length+1=pick then 0 else min image rows.length+1)
def current (words : List (List Bool)) : List ℕ := words.reverse.foldl _root_.Integration9_9.TM2NativePermutationRows.step []
end Integration9_9.TM2NativePermutationRows
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.CurrentPermutationDraw
end CurrentAFT.CurrentPermutationDraw
namespace CurrentAFT.CurrentPermutationDraw.CachedPermutation
end CurrentAFT.CurrentPermutationDraw.CachedPermutation
namespace CurrentAFT.CurrentPermutationDraw.CachedPermutation.mk
end CurrentAFT.CurrentPermutationDraw.CachedPermutation.mk
namespace CurrentAFT.CurrentPermutationDraw.inverseScan
end CurrentAFT.CurrentPermutationDraw.inverseScan
namespace CurrentAFT.CurrentPermutationDraw.inverseScan.match_1
end CurrentAFT.CurrentPermutationDraw.inverseScan.match_1
namespace CurrentAFT.CurrentPermutationDraw.inverseScanWork
end CurrentAFT.CurrentPermutationDraw.inverseScanWork
set_option autoImplicit false
set_option maxHeartbeats 1800000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativePermutationDraw
open AFT AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
abbrev Request := (List Unit × List Unit) × List Bool
def row (x : _root_.Integration9_9.TM2NativePermutationDraw.Request × ℕ) : List Bool := (x.1.2.drop (x.1.1.2.length*x.2)).take x.1.1.2.length
def grouped (x : _root_.Integration9_9.TM2NativePermutationDraw.Request) : List (List Bool) := (List.range x.1.1.length).map (fun i => _root_.Integration9_9.TM2NativePermutationDraw.row (x,i))
def forward (x : _root_.Integration9_9.TM2NativePermutationDraw.Request) : List ℕ := _root_.Integration9_9.TM2NativePermutationRows.current (_root_.Integration9_9.TM2NativePermutationDraw.grouped x)
def inverseEntry (x : List ℕ × ℕ) : ℕ :=
(List.range x.1.length).findIdx (fun i => decide (x.1[i]?.getD 0=x.2))
def inverse (rows : List ℕ) : List ℕ := (List.range rows.length).map (fun i => _root_.Integration9_9.TM2NativePermutationDraw.inverseEntry (rows,i))
def current (x : _root_.Integration9_9.TM2NativePermutationDraw.Request) : List ℕ × List ℕ := (_root_.Integration9_9.TM2NativePermutationDraw.forward x,_root_.Integration9_9.TM2NativePermutationDraw.inverse (_root_.Integration9_9.TM2NativePermutationDraw.forward x))
def cacheData {count : ℕ} (cache : _root_.CurrentAFT.CurrentPermutationDraw.CachedPermutation count) : List ℕ × List ℕ :=
(List.ofFn (fun i => (cache.forward.get i).val),List.ofFn (fun i => (cache.inverse.get i).val))
end Integration9_9.TM2NativePermutationDraw
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.ActualPublicLegCharge
end CurrentAFT.ActualPublicLegCharge
namespace CurrentAFT.ActualPublicLegCharge.activationLaw
end CurrentAFT.ActualPublicLegCharge.activationLaw
namespace CurrentAFT.CurrentActivationDraw
end CurrentAFT.CurrentActivationDraw
namespace CurrentAFT.CurrentActivationDraw.approximateLaw
end CurrentAFT.CurrentActivationDraw.approximateLaw
namespace CurrentAFT.CurrentActivationDraw.table
end CurrentAFT.CurrentActivationDraw.table
namespace CurrentAFT.CurrentProbabilityArrayDraw
end CurrentAFT.CurrentProbabilityArrayDraw
namespace CurrentAFT.CurrentProbabilityArrayDraw.ProbabilityArray
end CurrentAFT.CurrentProbabilityArrayDraw.ProbabilityArray
namespace CurrentAFT.CurrentProbabilityArrayDraw.ProbabilityArray.mk
end CurrentAFT.CurrentProbabilityArrayDraw.ProbabilityArray.mk
namespace CurrentAFT.CurrentProbabilityArrayDraw.law
end CurrentAFT.CurrentProbabilityArrayDraw.law
namespace CurrentAFT.CurrentProbabilityArrayDraw.positiveDraw
end CurrentAFT.CurrentProbabilityArrayDraw.positiveDraw
namespace CurrentAFT.CurrentReferenceDraw
end CurrentAFT.CurrentReferenceDraw
namespace CurrentAFT.CurrentReferenceDraw.Cache
end CurrentAFT.CurrentReferenceDraw.Cache
namespace CurrentAFT.CurrentReferenceDraw.Cache.mk
end CurrentAFT.CurrentReferenceDraw.Cache.mk
namespace CurrentAFT.CurrentReferenceDraw.Counts
end CurrentAFT.CurrentReferenceDraw.Counts
namespace CurrentAFT.CurrentReferenceDraw.Counts.mk
end CurrentAFT.CurrentReferenceDraw.Counts.mk
namespace CurrentAFT.CurrentReferenceDraw.bodyDraw
end CurrentAFT.CurrentReferenceDraw.bodyDraw
namespace CurrentAFT.CurrentReferenceDraw.bodyDrawLaw
end CurrentAFT.CurrentReferenceDraw.bodyDrawLaw
namespace CurrentAFT.CurrentReferenceDraw.centerData
end CurrentAFT.CurrentReferenceDraw.centerData
namespace CurrentAFT.CurrentReferenceDraw.counts
end CurrentAFT.CurrentReferenceDraw.counts
namespace CurrentAFT.CurrentSafeDraw
end CurrentAFT.CurrentSafeDraw
namespace CurrentAFT.CurrentSafeDraw.draw
end CurrentAFT.CurrentSafeDraw.draw
namespace CurrentAFT.CurrentSafeDraw.law
end CurrentAFT.CurrentSafeDraw.law
namespace CurrentAFT.CurrentSafeDraw.workBound
end CurrentAFT.CurrentSafeDraw.workBound
set_option autoImplicit false
set_option maxHeartbeats 2000000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativeReferenceDraw
open AFT AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeRootGroupProfiles
open scoped BigOperators
abbrev Meta := _root_.Integration9_9.TM2NativeFirstInverse.Meta
attribute [local irreducible] TM2NativePrime.modulus TM2NativePrime.upperSlots
RationalProposalProgram.primary RationalProposalProgram.center LocalPairProgram.activationApprox
def safeCount (xs : List Unit) : ℕ := _root_.Integration9_9.TM2NativePrime.modulus xs-2*_root_.Integration9_9.TM2NativeBody.margin xs
def safeTicks (xs : List Unit) : List Unit := (_root_.Integration9_9.TM2NativeBodyKernel.paletteTicks xs).take (_root_.Integration9_9.TM2NativeReferenceDraw.safeCount xs)
def primaryTable (x : _root_.Integration9_9.TM2NativeReferenceDraw.Meta) : List ℚ := (_root_.Integration9_9.TM2NativeAnchor.indices x).map (fun i => _root_.Integration9_9.TM2NativeRootGroupProfiles.primary (x,i))
def bodyTable (x : _root_.Integration9_9.TM2NativeReferenceDraw.Meta) : List ℚ := (List.range (_root_.Integration9_9.TM2NativeReferenceDraw.safeTicks x.1).length).map
(fun i => _root_.Integration9_9.TM2NativeRootGroupProfiles.center (x,_root_.Integration9_9.TM2NativeBody.margin x.1+i))
def primaryDraw (x : _root_.Integration9_9.TM2NativeReferenceDraw.Meta × List Bool) : ℕ := _root_.Integration9_9.TM2NativeTicketDraw.current (_root_.Integration9_9.TM2NativeReferenceDraw.primaryTable x.1,x.2)
def bodyDraw (x : _root_.Integration9_9.TM2NativeReferenceDraw.Meta × List Bool) : ℕ :=
_root_.Integration9_9.TM2NativeBody.margin x.1.1+_root_.Integration9_9.TM2NativeTicketDraw.current (_root_.Integration9_9.TM2NativeReferenceDraw.bodyTable x.1,x.2)
def safeDraw (x : List Unit × List Bool) : ℕ :=
_root_.Integration9_9.TM2NativeBody.margin x.1+_root_.Integration9_9.TM2NativeArrayDraw.uniform (_root_.Integration9_9.TM2NativeReferenceDraw.safeTicks x.1,x.2)
def activationDraw (x : _root_.Integration9_9.TM2NativeReferenceDraw.Meta × List Bool) : Bool :=
decide (_root_.Integration9_9.TM2NativeTicketDraw.current ([1-_root_.Integration9_9.TM2NativeActivation.current x.1,_root_.Integration9_9.TM2NativeActivation.current x.1],x.2)=1)
end Integration9_9.TM2NativeReferenceDraw
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.CurrentPublicSeedDraw
end CurrentAFT.CurrentPublicSeedDraw
namespace CurrentAFT.CurrentPublicSeedDraw.draw
end CurrentAFT.CurrentPublicSeedDraw.draw
namespace CurrentAFT.CurrentPublicSeedDraw.law
end CurrentAFT.CurrentPublicSeedDraw.law
set_option autoImplicit false
set_option maxHeartbeats 2000000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativePublicSeed
open AFT AFT.RationalNumerics AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeRootGroupGaussian
open scoped BigOperators
abbrev Meta := _root_.Integration9_9.TM2NativeFirstInverse.Meta
def anchorDraw (x : List Unit × List Bool) : ℕ := _root_.Integration9_9.TM2NativeArrayDraw.uniform (_root_.Integration9_9.TM2NativeProfile.widthTicks x.1,x.2)
def edgeDraw (x : _root_.Integration9_9.TM2NativePublicSeed.Meta × List Bool) : ℤ :=
(_root_.Integration9_9.TM2NativeTicketDraw.current (_root_.Integration9_9.TM2NativeRootGroupGaussian.gaussian true (x.1.1,()::x.1.2),x.2) : ℤ)-
((_root_.Integration9_9.TM2NativeProfile.edgeTicks x.1.1).length : ℤ)
abbrev Tape := List Bool × (Bool × (List Bool × (List Bool × List Bool)))
abbrev Seed := Bool × (Bool × (ℕ × (ℤ × ℤ)))
def current (x : (_root_.Integration9_9.TM2NativePublicSeed.Meta × List Unit) × _root_.Integration9_9.TM2NativePublicSeed.Tape) : _root_.Integration9_9.TM2NativePublicSeed.Seed :=
(_root_.Integration9_9.TM2NativeReferenceDraw.activationDraw (x.1.1,x.2.1),(x.2.2.1,
(_root_.Integration9_9.TM2NativePublicSeed.anchorDraw (x.1.1.1,x.2.2.2.1),
(_root_.Integration9_9.TM2NativePublicSeed.edgeDraw ((x.1.1.1,x.1.2),x.2.2.2.2.1),_root_.Integration9_9.TM2NativePublicSeed.edgeDraw ((x.1.1.1,x.1.2),x.2.2.2.2.2)))))
def seedData {security : ℕ} (seed : _root_.CurrentAFT.ActualPublicLegCharge.PublicSeed security) : _root_.Integration9_9.TM2NativePublicSeed.Seed :=
(seed.marked,(seed.coin,(seed.anchorIndex.val,(seed.blur.1.val,seed.blur.2.val))))
def tapeData {security bits : ℕ} (word : _root_.CurrentAFT.CurrentPublicSeedDraw.Tape security bits) : _root_.Integration9_9.TM2NativePublicSeed.Tape :=
(List.ofFn (fun i => _root_.AFT.BinaryArithmetic.digitBoolean (word.1 i)),(word.2.1,
(List.ofFn (fun i => _root_.AFT.BinaryArithmetic.digitBoolean (word.2.2.1 i)),
(List.ofFn (fun i => _root_.AFT.BinaryArithmetic.digitBoolean (word.2.2.2.1 i)),List.ofFn (fun i => _root_.AFT.BinaryArithmetic.digitBoolean (word.2.2.2.2 i))))))
end Integration9_9.TM2NativePublicSeed
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.CurrentPreparedCoreProposal
end CurrentAFT.CurrentPreparedCoreProposal
namespace CurrentAFT.CurrentPreparedCoreProposal.law
end CurrentAFT.CurrentPreparedCoreProposal.law
namespace CurrentAFT.CurrentPreparedCoreProposal.preparePolynomial
end CurrentAFT.CurrentPreparedCoreProposal.preparePolynomial
namespace CurrentAFT.CurrentPreparedCoreProposal.workPolynomial
end CurrentAFT.CurrentPreparedCoreProposal.workPolynomial
namespace CurrentAFT.CurrentReferenceDraw
end CurrentAFT.CurrentReferenceDraw
namespace CurrentAFT.CurrentReferenceDraw.prepare
end CurrentAFT.CurrentReferenceDraw.prepare
set_option autoImplicit false
set_option maxHeartbeats 2500000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativeCoreProposal
open AFT AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
attribute [local irreducible] CurrentProposalDimensions.current BinaryFullResponseCounts.current
CurrentAFT.Parameters.legCount CurrentAFT.Parameters.bodySize CurrentAFT.Parameters.dimension
abbrev Meta := _root_.Integration9_9.TM2NativeFirstInverse.Meta
abbrev Control := ℕ × ℕ
abbrev Leg := _root_.Integration9_9.TM2NativePublicSeed.Seed × ℕ
abbrev Perm := List ℕ × List ℕ
abbrev Core := (List _root_.Integration9_9.TM2NativeCoreProposal.Control × List _root_.Integration9_9.TM2NativeCoreProposal.Leg) × (List ℕ × (_root_.Integration9_9.TM2NativeCoreProposal.Perm × _root_.Integration9_9.TM2NativeCoreProposal.Perm))
abbrev ControlTape := List Bool × List Bool
abbrev LegTape := _root_.Integration9_9.TM2NativePublicSeed.Tape × List Bool
abbrev Tapes := (List _root_.Integration9_9.TM2NativeCoreProposal.ControlTape × List _root_.Integration9_9.TM2NativeCoreProposal.LegTape) × (List (List Bool) × (List Bool × List Bool))
def bodyTicks (xs : List Unit) : List Unit := _root_.Integration9_9.TM2NativeFullResponseCounts.slots .body xs
def legTicks (xs : List Unit) : List Unit := _root_.Integration9_9.TM2NativeFullResponseCounts.slots .leg xs
def dimensionTicks (xs : List Unit) : List Unit := _root_.Integration9_9.TM2NativeCoreProposal.bodyTicks xs++_root_.Integration9_9.TM2NativeCoreProposal.legTicks xs++_root_.Integration9_9.TM2NativeCoreProposal.legTicks xs
attribute [local irreducible] bodyTicks legTicks
def controlDraw (x : _root_.Integration9_9.TM2NativeCoreProposal.Meta × _root_.Integration9_9.TM2NativeCoreProposal.ControlTape) : _root_.Integration9_9.TM2NativeCoreProposal.Control :=
(_root_.Integration9_9.TM2NativeReferenceDraw.primaryDraw (x.1,x.2.1),_root_.Integration9_9.TM2NativeReferenceDraw.bodyDraw (x.1,x.2.2))
def legDraw (x : (_root_.Integration9_9.TM2NativeCoreProposal.Meta × List Unit) × _root_.Integration9_9.TM2NativeCoreProposal.LegTape) : _root_.Integration9_9.TM2NativeCoreProposal.Leg :=
(_root_.Integration9_9.TM2NativePublicSeed.current (x.1,x.2.1),_root_.Integration9_9.TM2NativeReferenceDraw.safeDraw (x.1.1.1,x.2.2))
def current (x : (_root_.Integration9_9.TM2NativeCoreProposal.Meta × List Unit) × _root_.Integration9_9.TM2NativeCoreProposal.Tapes) : _root_.Integration9_9.TM2NativeCoreProposal.Core :=
((x.2.1.1.map (fun word => _root_.Integration9_9.TM2NativeCoreProposal.controlDraw (x.1.1,word)),x.2.1.2.map (fun word => _root_.Integration9_9.TM2NativeCoreProposal.legDraw (x.1,word))),
(x.2.2.1.map (fun word => _root_.Integration9_9.TM2NativeReferenceDraw.safeDraw (x.1.1.1,word)),
(_root_.Integration9_9.TM2NativePermutationDraw.current ((_root_.Integration9_9.TM2NativeCoreProposal.bodyTicks x.1.1.1,x.1.2),x.2.2.2.1),
_root_.Integration9_9.TM2NativePermutationDraw.current ((_root_.Integration9_9.TM2NativeCoreProposal.dimensionTicks x.1.1.1,x.1.2),x.2.2.2.2))))
def controlData {security : ℕ} (group : _root_.CurrentAFT.SafeControlGroups.SafeGroup security) : _root_.Integration9_9.TM2NativeCoreProposal.Control := (group.1.val,group.2.val.val)
def legData {security : ℕ} (leg : _root_.CurrentAFT.ActualPublicCharge.LegCore security) : _root_.Integration9_9.TM2NativeCoreProposal.Leg := (_root_.Integration9_9.TM2NativePublicSeed.seedData leg.1,leg.2.val)
def coreData {security : ℕ} (data : _root_.CurrentAFT.CurrentCoreProposal.MaterializedCore security) : _root_.Integration9_9.TM2NativeCoreProposal.Core :=
((List.ofFn (fun i => _root_.Integration9_9.TM2NativeCoreProposal.controlData (data.controls.get i)),List.ofFn (fun i => _root_.Integration9_9.TM2NativeCoreProposal.legData (data.legs.get i))),
(List.ofFn (fun i => (data.baselines.get i).val),
(_root_.Integration9_9.TM2NativePermutationDraw.cacheData data.body,_root_.Integration9_9.TM2NativePermutationDraw.cacheData data.endpoints)))
def controlTapeData {security bits : ℕ} (word : _root_.CurrentAFT.CurrentCoreProposal.ControlTape security bits) : _root_.Integration9_9.TM2NativeCoreProposal.ControlTape :=
(List.ofFn (fun i => _root_.AFT.BinaryArithmetic.digitBoolean (word.1 i)),List.ofFn (fun i => _root_.AFT.BinaryArithmetic.digitBoolean (word.2 i)))
def legTapeData {security bits : ℕ} (word : _root_.CurrentAFT.CurrentCoreProposal.LegTape security bits) : _root_.Integration9_9.TM2NativeCoreProposal.LegTape :=
(_root_.Integration9_9.TM2NativePublicSeed.tapeData word.1,List.ofFn (fun i => _root_.AFT.BinaryArithmetic.digitBoolean (word.2 i)))
def tapesData {security bits : ℕ} (word : _root_.CurrentAFT.CurrentCoreProposal.Tapes security bits) : _root_.Integration9_9.TM2NativeCoreProposal.Tapes :=
((List.ofFn (fun i => _root_.Integration9_9.TM2NativeCoreProposal.controlTapeData (word.1.1.1.1 (_root_.CurrentAFT.CurrentProposalDimensions.controlsEquiv security i))),
List.ofFn (fun i => _root_.Integration9_9.TM2NativeCoreProposal.legTapeData (word.1.1.1.2 (_root_.CurrentAFT.CurrentProposalDimensions.legEquiv security i)))),
(List.ofFn (fun i => List.ofFn (fun j => _root_.AFT.BinaryArithmetic.digitBoolean (word.1.1.2 (_root_.CurrentAFT.CurrentProposalDimensions.queueEquiv security i) j))),
(List.ofFn (fun i => _root_.AFT.BinaryArithmetic.digitBoolean (word.1.2 i)),List.ofFn (fun i => _root_.AFT.BinaryArithmetic.digitBoolean (word.2 i)))))
end Integration9_9.TM2NativeCoreProposal
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.BinaryCoreCharge
end CurrentAFT.BinaryCoreCharge
namespace CurrentAFT.BinaryCoreCharge.controlTerm
end CurrentAFT.BinaryCoreCharge.controlTerm
namespace CurrentAFT.BinaryCoreCharge.legTerm
end CurrentAFT.BinaryCoreCharge.legTerm
namespace CurrentAFT.BinaryCoreCharge.queueTerm
end CurrentAFT.BinaryCoreCharge.queueTerm
namespace CurrentAFT.BinaryCoreCharge.total
end CurrentAFT.BinaryCoreCharge.total
set_option autoImplicit false
set_option maxHeartbeats 2200000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativeCoreCharge
open AFT AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeCoreProposal
open scoped BigOperators
attribute [local irreducible] CurrentProposalDimensions.current BinaryFullResponseCounts.current
CurrentAFT.Parameters.legCount CurrentAFT.Parameters.bodySize CurrentAFT.Parameters.dimension
TM2NativePrime.modulus TM2NativeProfile.widthTicks
def shift (x : List Unit × (ℕ × _root_.Integration9_9.TM2NativePublicSeed.Seed)) : ℤ :=
let direction := if 2*x.2.1<_root_.Integration9_9.TM2NativePrime.modulus x.1-1 then false
else if _root_.Integration9_9.TM2NativePrime.modulus x.1-1<2*x.2.1 then true else x.2.2.2.1
(if direction then (((_root_.Integration9_9.TM2NativeProfile.widthTicks x.1).length+x.2.2.2.2.1 : ℕ) : ℤ)
else -(((_root_.Integration9_9.TM2NativeProfile.widthTicks x.1).length+x.2.2.2.2.1 : ℕ) : ℤ))+
x.2.2.2.2.2.1-x.2.2.2.2.2.2
def intSum (xs : List ℤ) : ℤ := xs.sum
@[fun_prop] theorem intSum_poly : Poly _root_.Integration9_9.TM2NativeCoreCharge.intSum := by
have hn : Poly (fun q : ℚ => q.num) := ⟨PolyProgram.ratNum⟩
have h : Poly (fun xs : List ℤ => ((xs.map (fun z : ℤ => (z : ℚ))).sum).num) := by fun_prop
refine ⟨h.program.congr _ (fun xs => ?_)⟩
simp only [←Int.cast_list_sum,Rat.num_intCast,_root_.Integration9_9.TM2NativeCoreCharge.intSum]
def legTerm (x : (List Unit × _root_.Integration9_9.TM2NativeCoreProposal.Core) × ℕ) : ℤ :=
((x.1.2.1.2[x.2]?.getD default).2 : ℤ)+
_root_.Integration9_9.TM2NativeCoreCharge.shift (x.1.1,((x.1.2.1.1[x.2]?.getD (0,0)).1,(x.1.2.1.2[x.2]?.getD default).1))
def total (x : List Unit × _root_.Integration9_9.TM2NativeCoreProposal.Core) : ℤ :=
_root_.Integration9_9.TM2NativeCoreCharge.intSum (x.2.1.1.map (fun control => (control.2 : ℤ)))+
_root_.Integration9_9.TM2NativeCoreCharge.intSum ((List.range x.2.1.2.length).map (fun i => _root_.Integration9_9.TM2NativeCoreCharge.legTerm (x,i)))+
_root_.Integration9_9.TM2NativeCoreCharge.intSum (x.2.2.1.map (fun i : ℕ => (i : ℤ)))-(x.2.1.2.length : ℤ)
def current (x : List Unit × _root_.Integration9_9.TM2NativeCoreProposal.Core) : Bool := decide (_root_.Integration9_9.TM2NativeBodyKernel.emodNatural (_root_.Integration9_9.TM2NativeCoreCharge.total x,_root_.Integration9_9.TM2NativePrime.modulus x.1)=0)
end Integration9_9.TM2NativeCoreCharge
end
section
namespace AFT
end AFT
namespace AFT.BinaryArithmetic
end AFT.BinaryArithmetic
namespace AFT.BinaryArithmetic.BinaryCoordinateResult
end AFT.BinaryArithmetic.BinaryCoordinateResult
namespace AFT.BinaryArithmetic.BinaryCoordinateResult.mk
end AFT.BinaryArithmetic.BinaryCoordinateResult.mk
namespace AFT.BinaryArithmetic.binaryRoundingInverse
end AFT.BinaryArithmetic.binaryRoundingInverse
namespace AFT.BinaryArithmetic.binaryShiftedLoad
end AFT.BinaryArithmetic.binaryShiftedLoad
namespace AFT.BinaryArithmetic.shiftedLoadEntry
end AFT.BinaryArithmetic.shiftedLoadEntry
set_option autoImplicit false
set_option maxHeartbeats 700000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
/-! Real integer coordinate inversion for the affine emitter. Integer sums
use actual rational accumulation followed by exact integer extraction;
prefix sums implement the actual integral path inverse. Division truncates
towards zero, preserving the native exactQuotient behavior on signed loads. -/
namespace Integration9_9.TM2NativeEmitterCoordinates
open AFT AFT.RationalNumerics AFT.BinaryArithmetic
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeSliceProbability
open scoped BigOperators
noncomputable def sumProgram : PolyProgram Automatic.enc Signed.encode (List.sum : List ℤ→ℤ) :=
_root_.Integration9_9.TM2NativeCoreCharge.intSum_poly.program
def truncQuot (x : ℤ×ℕ) : ℤ := if x.1<0 then -((x.1.natAbs/x.2 : ℕ) : ℤ) else ((x.1.natAbs/x.2 : ℕ) : ℤ)
def path (xs : List ℤ) : List ℤ := (List.range (xs.length-1)).map (fun i=>(xs.take (i+1)).sum)
def charge (x : ℕ×(List ℤ×List ℤ)) : ℤ := _root_.Integration9_9.TM2NativeEmitterCoordinates.truncQuot (x.2.2.sum,x.1)
def shifted (x : ℕ×(List ℤ×List ℤ)) : List ℤ :=
(List.range x.2.2.length).map (fun i=>x.2.2[i]?.getD 0-_root_.Integration9_9.TM2NativeEmitterCoordinates.charge x*x.2.1[i]?.getD 0)
def current (x : ℕ×(List ℤ×List ℤ)) : List ℤ×ℤ := (_root_.Integration9_9.TM2NativeEmitterCoordinates.path (_root_.Integration9_9.TM2NativeEmitterCoordinates.shifted x),_root_.Integration9_9.TM2NativeEmitterCoordinates.charge x)
end Integration9_9.TM2NativeEmitterCoordinates
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.CurrentBinaryAffineEmitter
end CurrentAFT.CurrentBinaryAffineEmitter
namespace CurrentAFT.CurrentBinaryAffineEmitter.emit
end CurrentAFT.CurrentBinaryAffineEmitter.emit
namespace CurrentAFT.CurrentBinaryAffineEmitter.emit.match_1
end CurrentAFT.CurrentBinaryAffineEmitter.emit.match_1
set_option autoImplicit false
set_option maxHeartbeats 1600000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
/-! The actual integer load entries for the affine emitter. All matrix loops
are indexed by explicit input buffers, and the values use only exact integer
arithmetic and bounded array reads. -/
namespace Integration9_9.TM2NativeEmitterLoads
open AFT AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
attribute [local irreducible] CurrentProposalDimensions.current CurrentEmissionMetadata.current
abbrev Counts := ℕ×(ℕ×ℕ)
abbrev Data := _root_.Integration9_9.TM2NativeEmitterLoads.Counts×((List ℤ×List ℤ)×List ℕ)
abbrev Request := _root_.Integration9_9.TM2NativeEmitterLoads.Data×(ℕ×ℕ)
def path (x : ℕ×(ℕ×ℕ)) : ℤ :=
if x.2.1<x.1 then (if x.2.2=x.2.1 then 1 else 0)-(if x.2.2=x.2.1+1 then 1 else 0) else 0
def first (x : _root_.Integration9_9.TM2NativeEmitterLoads.Data×(ℕ×ℕ)) : ℤ :=
(if x.2.1=x.1.1.1+x.2.2 then x.1.2.1.1[x.2.2]?.getD 0 else 0)+
(if x.2.1=x.1.1.1+x.2.2+x.1.2.1.1.length then x.1.2.1.2[x.2.2]?.getD 0 else 0)
def second (x : _root_.Integration9_9.TM2NativeEmitterLoads.Data×(ℕ×ℕ)) : ℤ :=
if x.2.1=x.1.1.1+x.2.2+x.1.2.1.1.length then 1 else 0
def leg (x : _root_.Integration9_9.TM2NativeEmitterLoads.Data×(ℕ×(ℕ×ℕ))) : ℤ :=
if x.2.2.2=0 then _root_.Integration9_9.TM2NativeEmitterLoads.first (x.1,(x.2.1,x.2.2.1))
else if x.2.2.2=1 then -_root_.Integration9_9.TM2NativeEmitterLoads.first (x.1,(x.2.1,x.2.2.1))-_root_.Integration9_9.TM2NativeEmitterLoads.second (x.1,(x.2.1,x.2.2.1))
else _root_.Integration9_9.TM2NativeEmitterLoads.path (x.1.1.1,(x.2.1,x.1.2.2[x.2.2.1]?.getD 0))+_root_.Integration9_9.TM2NativeEmitterLoads.second (x.1,(x.2.1,x.2.2.1))
def body (x : _root_.Integration9_9.TM2NativeEmitterLoads.Data×(ℕ×ℕ)) : ℤ :=
_root_.Integration9_9.TM2NativeEmitterLoads.path (x.1.1.1,(x.2.1,x.1.2.2[x.1.2.1.1.length+x.2.2]?.getD 0))+
if x.1.1.2.2≤x.2.2 ∧ x.2.1=x.1.1.2.1 then 1 else 0
def entry (x : _root_.Integration9_9.TM2NativeEmitterLoads.Request) : ℤ :=
if x.2.2<x.1.2.1.1.length*3 then _root_.Integration9_9.TM2NativeEmitterLoads.leg (x.1,(x.2.1,(x.2.2/3,x.2.2%3)))
else _root_.Integration9_9.TM2NativeEmitterLoads.body (x.1,(x.2.1,x.2.2-x.1.2.1.1.length*3))
def slots (x : _root_.Integration9_9.TM2NativeEmitterLoads.Data) : List Unit := x.2.2.map (fun _=>())++x.2.1.1.map (fun _=>())++x.2.1.1.map (fun _=>())
def matrix (x : _root_.Integration9_9.TM2NativeEmitterLoads.Data) : List (List ℤ) :=
(List.range (_root_.Integration9_9.TM2NativeEmitterLoads.slots x).length).map (fun column=>
(List.range (_root_.Integration9_9.TM2NativeEmitterLoads.slots x).length).map (fun row=>_root_.Integration9_9.TM2NativeEmitterLoads.entry (x,(column,row))))
def nativeData (security : ℕ) (scale shear : Vector _root_.AFT.BinaryArithmetic.IntegerBits (_root_.CurrentAFT.CurrentProposalDimensions.current security).legs)
(roots : _root_.CurrentAFT.CurrentBinaryLoadColumns.Roots security) : _root_.Integration9_9.TM2NativeEmitterLoads.Data :=
(((_root_.CurrentAFT.CurrentEmissionMetadata.current security).bodyEdges,((_root_.CurrentAFT.CurrentEmissionMetadata.current security).edges,
(_root_.CurrentAFT.CurrentEmissionMetadata.current security).centers)),
((List.ofFn (fun i=>(scale.get i).decode),List.ofFn (fun i=>(shear.get i).decode)),List.ofFn (fun i=>(roots.get i).val)))
end Integration9_9.TM2NativeEmitterLoads
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.CurrentEmissionRootOrder
end CurrentAFT.CurrentEmissionRootOrder
namespace CurrentAFT.CurrentEmissionRootOrder.positions
end CurrentAFT.CurrentEmissionRootOrder.positions
namespace CurrentAFT.CurrentEmissionRootOrder.rootToRole
end CurrentAFT.CurrentEmissionRootOrder.rootToRole
namespace CurrentAFT.CurrentEmissionRootOrder.rotate
end CurrentAFT.CurrentEmissionRootOrder.rotate
set_option autoImplicit false
set_option maxHeartbeats 1200000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativeEmitterRoots
open AFT AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeCoreProposal
attribute [local irreducible] CurrentProposalDimensions.current
def rotate (x : (ℕ×ℕ)×ℕ) : ℕ := if x.2<x.1.2 then x.1.1-x.1.2+x.2 else x.2-x.1.2
def current (x : _root_.Integration9_9.TM2NativeCoreProposal.Core×List ℕ) : List ℕ :=
(List.range x.1.2.2.1.2.length).map (fun i=>
x.1.2.2.1.2[(x.2[_root_.Integration9_9.TM2NativeEmitterRoots.rotate ((x.1.2.2.1.2.length,x.1.1.2.length),i)]?.getD 0)]?.getD 0)
end Integration9_9.TM2NativeEmitterRoots
end
section
set_option autoImplicit false
set_option maxHeartbeats 1800000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativeEmitterOffset
open AFT AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeCoreProposal
attribute [local irreducible] CurrentProposalDimensions.current CurrentEmissionMetadata.current
/-- Modulus/closing scalar, leg shifts/intercepts, roots/baselines. -/
abbrev Data := ((ℤ×ℤ)×(List ℤ×List ℤ))×(List ℕ×List ℤ)
def closure (x : (ℕ×ℕ)×ℤ) : ℤ := (if x.1.2=x.1.1 then x.2 else 0)-(if x.1.2=0 then x.2 else 0)
def leg (x : _root_.Integration9_9.TM2NativeEmitterOffset.Data×(ℕ×ℕ)) : ℤ :=
if x.2.2=0 then x.1.1.2.2[x.2.1]?.getD 0
else if x.2.2=1 then x.1.1.1.1-1+x.1.1.2.1[x.2.1]?.getD 0-x.1.1.2.2[x.2.1]?.getD 0
else x.1.2.2[x.2.1]?.getD 0+_root_.Integration9_9.TM2NativeEmitterOffset.closure ((x.1.2.1.length-1,x.1.2.1[x.2.1]?.getD 0),x.1.1.1.2)
def body (x : _root_.Integration9_9.TM2NativeEmitterOffset.Data×ℕ) : ℤ :=
x.1.2.2[x.1.1.2.2.length+x.2]?.getD 0+
_root_.Integration9_9.TM2NativeEmitterOffset.closure ((x.1.2.1.length-1,x.1.2.1[x.1.1.2.2.length+x.2]?.getD 0),x.1.1.1.2)
def entry (x : _root_.Integration9_9.TM2NativeEmitterOffset.Data×ℕ) : ℤ :=
if x.2<x.1.1.2.2.length*3 then _root_.Integration9_9.TM2NativeEmitterOffset.leg (x.1,(x.2/3,x.2%3))
else _root_.Integration9_9.TM2NativeEmitterOffset.body (x.1,x.2-x.1.1.2.2.length*3)
def slots (x : _root_.Integration9_9.TM2NativeEmitterOffset.Data) : List Unit := x.2.1.map (fun _=>())++x.1.2.2.map (fun _=>())++x.1.2.2.map (fun _=>())
def current (x : _root_.Integration9_9.TM2NativeEmitterOffset.Data) : List ℤ := (List.range (_root_.Integration9_9.TM2NativeEmitterOffset.slots x).length).map (fun i=>_root_.Integration9_9.TM2NativeEmitterOffset.entry (x,i))
def baselines (x : _root_.Integration9_9.TM2NativeCoreProposal.Core) : List ℤ :=
x.1.2.map (fun leg=>(leg.2 : ℤ))++x.1.1.map (fun control=>(control.2 : ℤ))++x.2.1.map (fun color : ℕ=>(color : ℤ))
def nativeData (security : ℕ) (core : _root_.CurrentAFT.CurrentCoreProposal.MaterializedCore security) (modulus : _root_.AFT.BinaryArithmetic.IntegerBits)
(shift intercept : Vector _root_.AFT.BinaryArithmetic.IntegerBits (_root_.CurrentAFT.CurrentBinaryLoadColumns.Legs security))
(roots : _root_.CurrentAFT.CurrentBinaryLoadColumns.Roots security) (scalar : _root_.AFT.BinaryArithmetic.IntegerBits) : _root_.Integration9_9.TM2NativeEmitterOffset.Data :=
(((modulus.decode,scalar.decode),(List.ofFn (fun i=>(shift.get i).decode),List.ofFn (fun i=>(intercept.get i).decode))),
(List.ofFn (fun i=>(roots.get i).val),_root_.Integration9_9.TM2NativeEmitterOffset.baselines (_root_.Integration9_9.TM2NativeCoreProposal.coreData core)))
end Integration9_9.TM2NativeEmitterOffset
end
section
set_option autoImplicit false
set_option maxHeartbeats 1200000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativeEmitterColumns
open AFT AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
abbrev Coordinate := List ℤ×ℤ
abbrev Data := (ℕ×List ℤ)×((List (List ℤ)×List ℤ)×List ℕ)
def pack (x : _root_.Integration9_9.TM2NativeEmitterColumns.Coordinate) : List ℤ := x.1++[x.2]
def permute (x : List ℤ×List ℕ) : List ℤ := x.2.map (fun i=>x.1[i]?.getD 0)
def column (x : (ℕ×List ℤ)×(List ℤ×List ℕ)) : _root_.Integration9_9.TM2NativeEmitterColumns.Coordinate :=
_root_.Integration9_9.TM2NativeEmitterCoordinates.current (x.1.1,(x.1.2,_root_.Integration9_9.TM2NativeEmitterColumns.permute x.2))
def current (x : _root_.Integration9_9.TM2NativeEmitterColumns.Data) : List (List ℤ)×List ℤ :=
(x.2.1.1.map (fun load=>_root_.Integration9_9.TM2NativeEmitterColumns.pack (_root_.Integration9_9.TM2NativeEmitterColumns.column (x.1,(load,x.2.2)))),_root_.Integration9_9.TM2NativeEmitterColumns.pack (_root_.Integration9_9.TM2NativeEmitterColumns.column (x.1,(x.2.1.2,x.2.2))))
def coordinateData {count : ℕ} (x : Vector _root_.AFT.BinaryArithmetic.IntegerBits count×_root_.AFT.BinaryArithmetic.IntegerBits) : _root_.Integration9_9.TM2NativeEmitterColumns.Coordinate :=
(List.ofFn (fun i=>(x.1.get i).decode),x.2.decode)
def integerData {size : ℕ} (x : Vector _root_.AFT.BinaryArithmetic.IntegerBits size) : List ℤ := List.ofFn (fun i=>(x.get i).decode)
def permutationData {size : ℕ} (x : Vector (Fin size) size) : List ℕ := List.ofFn (fun i=>(x.get i).val)
end Integration9_9.TM2NativeEmitterColumns
end
section
set_option autoImplicit false
set_option maxHeartbeats 1800000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativeEmitterData
open AFT AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeCoreProposal
attribute [local irreducible] CurrentProposalDimensions.current CurrentEmissionMetadata.current
TM2NativePrime.modulus TM2NativeProfile.widthTicks dimensionTicks
abbrev Chart := Bool×(ℕ×(ℕ×ℕ))
abbrev Context := (List Unit×_root_.Integration9_9.TM2NativeCoreProposal.Core)×(List ℕ×(List _root_.Integration9_9.TM2NativeEmitterData.Chart×ℤ))
def chartData {security : ℕ} (chart : _root_.CurrentAFT.CurrentAffineLegCarry.PublicChart security) : _root_.Integration9_9.TM2NativeEmitterData.Chart :=
(chart.1,(chart.2.1.val,(chart.2.2.1.val,chart.2.2.2.val)))
def chartsData {security : ℕ} (charts : _root_.CurrentAFT.CurrentBinaryChartData.Charts security) : List _root_.Integration9_9.TM2NativeEmitterData.Chart :=
List.ofFn (fun i=>_root_.Integration9_9.TM2NativeEmitterData.chartData (charts.get i))
def scale (xs : List _root_.Integration9_9.TM2NativeEmitterData.Chart) : List ℤ := xs.map (fun chart=>(chart.2.2.1 : ℤ))
def shear (xs : List _root_.Integration9_9.TM2NativeEmitterData.Chart) : List ℤ := xs.map (fun chart=>(chart.2.2.2 : ℤ))
def intercept (xs : List _root_.Integration9_9.TM2NativeEmitterData.Chart) : List ℤ := xs.map (fun chart=>(chart.2.1 : ℤ))
def shiftAt (x : (List Unit×_root_.Integration9_9.TM2NativeCoreProposal.Core)×ℕ) : ℤ :=
_root_.Integration9_9.TM2NativeCoreCharge.legTerm x-((x.1.2.1.2[x.2]?.getD default).2 : ℤ)
def shifts (x : List Unit×_root_.Integration9_9.TM2NativeCoreProposal.Core) : List ℤ := (List.range x.2.1.2.length).map (fun i=>_root_.Integration9_9.TM2NativeEmitterData.shiftAt (x,i))
def injection (xs : List Unit) : List ℤ :=
(List.range (_root_.Integration9_9.TM2NativeCoreProposal.dimensionTicks xs).length).map (fun row=>if row<_root_.Integration9_9.TM2NativePrime.modulus xs then 1 else 0)
def roots (x : _root_.Integration9_9.TM2NativeEmitterData.Context) : List ℕ := _root_.Integration9_9.TM2NativeEmitterRoots.current (x.1.2,x.2.1)
def loadData (x : _root_.Integration9_9.TM2NativeEmitterData.Context) : _root_.Integration9_9.TM2NativeEmitterLoads.Data :=
(((_root_.Integration9_9.TM2NativeEmitterData.roots x).length-1,(x.1.2.2.2.2.1.length-1,x.1.2.1.1.length)),
((_root_.Integration9_9.TM2NativeEmitterData.scale x.2.2.1,_root_.Integration9_9.TM2NativeEmitterData.shear x.2.2.1),_root_.Integration9_9.TM2NativeEmitterData.roots x))
def offsetData (x : _root_.Integration9_9.TM2NativeEmitterData.Context) : _root_.Integration9_9.TM2NativeEmitterOffset.Data :=
(((((_root_.Integration9_9.TM2NativePrime.modulus x.1.1 : ℕ) : ℤ),x.2.2.2),(_root_.Integration9_9.TM2NativeEmitterData.shifts x.1,_root_.Integration9_9.TM2NativeEmitterData.intercept x.2.2.1)),
(_root_.Integration9_9.TM2NativeEmitterData.roots x,_root_.Integration9_9.TM2NativeEmitterOffset.baselines x.1.2))
def nativeContext (xs : List Unit) (layout : _root_.CurrentAFT.CurrentLayoutDraw.Cache xs.length)
(sample : _root_.CurrentAFT.CurrentMaterializedCompletion.Result xs.length) : _root_.Integration9_9.TM2NativeEmitterData.Context :=
((xs,_root_.Integration9_9.TM2NativeCoreProposal.coreData sample.core),((_root_.Integration9_9.TM2NativePermutationDraw.cacheData layout).1,(_root_.Integration9_9.TM2NativeEmitterData.chartsData sample.charts,sample.edge.val)))
def permutation (core : _root_.Integration9_9.TM2NativeCoreProposal.Core) : List ℕ := core.2.2.2.1
def guard (x : (List Unit×_root_.Integration9_9.TM2NativeCoreProposal.Core)×List _root_.Integration9_9.TM2NativeEmitterData.Chart) : Bool :=
_root_.Integration9_9.TM2NativeCoreCharge.current x.1 && x.2.all (fun chart=>decide (chart.2.2.1≠0))
end Integration9_9.TM2NativeEmitterData
end
section
set_option autoImplicit false
set_option maxHeartbeats 1800000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativeEmitterAssembly
open AFT AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeCoreProposal TM2NativeEmitterData TM2NativeEmitterColumns
attribute [local irreducible] CurrentProposalDimensions.current CurrentEmissionMetadata.current
TM2NativePrime.modulus TM2NativeEmitterData.loadData TM2NativeEmitterData.offsetData
abbrev Output := List (List ℤ)×List ℤ
def fields (x : _root_.Integration9_9.TM2NativeEmitterData.Context) : _root_.Integration9_9.TM2NativeEmitterColumns.Data :=
((_root_.Integration9_9.TM2NativePrime.modulus x.1.1,_root_.Integration9_9.TM2NativeEmitterData.injection x.1.1),
((_root_.Integration9_9.TM2NativeEmitterLoads.matrix (_root_.Integration9_9.TM2NativeEmitterData.loadData x),_root_.Integration9_9.TM2NativeEmitterOffset.current (_root_.Integration9_9.TM2NativeEmitterData.offsetData x)),_root_.Integration9_9.TM2NativeEmitterData.permutation x.1.2))
def current (x : _root_.Integration9_9.TM2NativeEmitterData.Context) : _root_.Integration9_9.TM2NativeEmitterAssembly.Output := _root_.Integration9_9.TM2NativeEmitterColumns.current (_root_.Integration9_9.TM2NativeEmitterAssembly.fields x)
def outputData {count : ℕ} (data : _root_.AFT.BinaryArithmetic.BinaryAffineData count) : _root_.Integration9_9.TM2NativeEmitterAssembly.Output :=
(List.ofFn (fun i=>_root_.Integration9_9.TM2NativeEmitterColumns.pack (_root_.Integration9_9.TM2NativeEmitterColumns.coordinateData (data.columns.get i))),_root_.Integration9_9.TM2NativeEmitterColumns.pack (_root_.Integration9_9.TM2NativeEmitterColumns.coordinateData data.offset))
end Integration9_9.TM2NativeEmitterAssembly
end
section
set_option autoImplicit false
set_option maxHeartbeats 1800000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativeEmitter
open AFT AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeCoreProposal TM2NativeEmitterData TM2NativeEmitterColumns TM2NativeEmitterAssembly
attribute [local irreducible] CurrentProposalDimensions.current CurrentEmissionMetadata.current
dimensionTicks TM2NativeEmitterAssembly.current TM2NativeEmitterData.guard
CurrentBinaryAffineEmitter.emit CurrentBinaryAffineEmitter.assembled CurrentBinaryAffineEmitter.fallback
CurrentBinaryAffineGuard.current
abbrev State := Bool×(_root_.Integration9_9.TM2NativeCoreProposal.Core×(List _root_.Integration9_9.TM2NativeEmitterData.Chart×ℤ))
abbrev Input := (List Unit×List ℕ)×_root_.Integration9_9.TM2NativeEmitter.State
def fallback (xs : List Unit) : _root_.Integration9_9.TM2NativeEmitterAssembly.Output :=
((List.range (_root_.Integration9_9.TM2NativeCoreProposal.dimensionTicks xs).length).map (fun column=>
(List.range (_root_.Integration9_9.TM2NativeCoreProposal.dimensionTicks xs).length).map (fun row=>if row=column then 1 else 0)),
(_root_.Integration9_9.TM2NativeCoreProposal.dimensionTicks xs).map (fun _=>0))
def current (x : _root_.Integration9_9.TM2NativeEmitter.Input) : _root_.Integration9_9.TM2NativeEmitterAssembly.Output :=
if x.2.1 && _root_.Integration9_9.TM2NativeEmitterData.guard ((x.1.1,x.2.2.1),x.2.2.2.1) then
_root_.Integration9_9.TM2NativeEmitterAssembly.current ((x.1.1,x.2.2.1),(x.1.2,x.2.2.2))
else _root_.Integration9_9.TM2NativeEmitter.fallback x.1.1
def resultData {security : ℕ} : Option (_root_.CurrentAFT.CurrentMaterializedCompletion.Result security)→_root_.Integration9_9.TM2NativeEmitter.State
| none=>(false,default)
| some sample=>(true,(_root_.Integration9_9.TM2NativeCoreProposal.coreData sample.core,(_root_.Integration9_9.TM2NativeEmitterData.chartsData sample.charts,sample.edge.val)))
end Integration9_9.TM2NativeEmitter
end
section
set_option autoImplicit false
set_option maxHeartbeats 1800000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativeEmitterOutput
open AFT AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeCoreProposal TM2NativeEmitterData TM2NativeEmitterColumns TM2NativeEmitterAssembly
attribute [local irreducible] CurrentProposalDimensions.current CurrentEmissionMetadata.current
dimensionTicks CurrentAFT.Parameters.dimension CurrentAFT.Parameters.bodySize CurrentAFT.Parameters.legCount
CurrentBinaryAffineEmitter.decodeCoordinate CurrentBinaryAffineEmitter.matrix CurrentBinaryAffineEmitter.offset
def indices (xs : List Unit) : List ℕ := List.range (_root_.Integration9_9.TM2NativeCoreProposal.dimensionTicks xs).length
attribute [local irreducible] indices
def entry (x : (List Unit×_root_.Integration9_9.TM2NativeEmitterAssembly.Output)×(ℕ×ℕ)) : ℤ :=
(x.1.2.1[x.2.2]?.getD [])[x.2.1]?.getD 0
def row (x : (List Unit×_root_.Integration9_9.TM2NativeEmitterAssembly.Output)×ℕ) : List ℤ := (_root_.Integration9_9.TM2NativeEmitterOutput.indices x.1.1).map (fun column=>_root_.Integration9_9.TM2NativeEmitterOutput.entry (x.1,(x.2,column)))
def current (x : List Unit×_root_.Integration9_9.TM2NativeEmitterAssembly.Output) : _root_.Integration9_9.TM2NativeEmitterAssembly.Output :=
((_root_.Integration9_9.TM2NativeEmitterOutput.indices x.1).map (fun i=>_root_.Integration9_9.TM2NativeEmitterOutput.row (x,i)),(_root_.Integration9_9.TM2NativeEmitterOutput.indices x.1).map (fun i=>x.2.2[i]?.getD 0))
end Integration9_9.TM2NativeEmitterOutput
end
section
set_option autoImplicit false
set_option maxHeartbeats 2000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2PlatformSerialization
open OAI.MetricKMedian.Binary
open OAI.MetricKMedian.Binary.Automatic
open OAI.MetricKMedian.Binary.Automatic.Poly
open QMCNumericRuntime
open QAlgorithms.Complexity
open Polynomial
/-- Keep both the unary token and the untouched suffix. -/
def readUnary (xs : Str) : Str × Str :=
(xs.take (inputWidth xs + 1), xs.drop (inputWidth xs + 1))
@[simp] theorem readUnary_append (n : ℕ) (xs : Str) :
_root_.Integration9_9.TM2PlatformSerialization.readUnary (encNat n ++ xs) = (encNat n, xs) := by
have h : inputWidth (encNat n ++ xs) = n := by
simpa only [encNat, List.append_assoc, List.singleton_append] using inputWidth_prefix n xs
simp only [_root_.Integration9_9.TM2PlatformSerialization.readUnary, h]
have hl : (encNat n).length = n + 1 := by simp [encNat]
rw [← hl, List.take_left, List.drop_left]
/-- Slots are read from the unary prefix, so malformed words still give a bounded loop. -/
def unarySlots (xs : Str) : List Unit :=
(xs.take (inputWidth xs)).map (fun _ => ())
@[simp] theorem unarySlots_append (n : ℕ) (xs : Str) :
_root_.Integration9_9.TM2PlatformSerialization.unarySlots (encNat n ++ xs) = List.replicate n () := by
have h : inputWidth (encNat n ++ xs) = n := by
simpa only [encNat, List.append_assoc, List.singleton_append] using inputWidth_prefix n xs
simp only [_root_.Integration9_9.TM2PlatformSerialization.unarySlots, h]
simp [encNat, List.append_assoc]
/-- Serialize the length of a supplied list, never expand a binary integer as unary. -/
def lengthToken {α : Type} (xs : List α) : Str := xs.map (fun _ => true) ++ [false]
@[simp] theorem lengthToken_eq {α : Type} (xs : List α) : _root_.Integration9_9.TM2PlatformSerialization.lengthToken xs = encNat xs.length := by
simp [_root_.Integration9_9.TM2PlatformSerialization.lengthToken, encNat, List.map_const']
/-- Serialize a list of already encoded entries using the platform's unary list format. -/
def serializeWords (xs : List Str) : Str := _root_.Integration9_9.TM2PlatformSerialization.lengthToken xs ++ xs.flatten
@[simp] theorem serializeWords_eq (xs : List Str) : _root_.Integration9_9.TM2PlatformSerialization.serializeWords xs = encStr xs := by
rw [_root_.Integration9_9.TM2PlatformSerialization.serializeWords, _root_.Integration9_9.TM2PlatformSerialization.lengthToken_eq]
rfl
section RepeatedParser
variable {α : Type} [Coding α] [Inhabited α]
variable (read : Str → Str × α)
abbrev ParserState (α : Type) := Str × List α
def parseStep (state : _root_.Integration9_9.TM2PlatformSerialization.ParserState α) (_ : Unit) : _root_.Integration9_9.TM2PlatformSerialization.ParserState α :=
let result := read state.1
(result.1, result.2 :: state.2)
/-- Parse a unary-counted list; reverse only the parser's accumulator. -/
def readList (xs : Str) : Str × List α :=
let state := (_root_.Integration9_9.TM2PlatformSerialization.unarySlots xs).foldl (_root_.Integration9_9.TM2PlatformSerialization.parseStep read) ((_root_.Integration9_9.TM2PlatformSerialization.readUnary xs).2, [])
(state.1, state.2.reverse)
lemma parseStep_fold_append (code : α → Str)
(hread : ∀ a xs, read (code a ++ xs) = (xs,a))
(as : List α) (xs : Str) (acc : List α) :
(List.replicate as.length ()).foldl (_root_.Integration9_9.TM2PlatformSerialization.parseStep read) (as.flatMap code ++ xs, acc) =
(xs, as.reverse ++ acc) := by
induction as generalizing acc with
| nil => rfl
| cons a as ih =>
simp only [List.length_cons, List.replicate_succ, List.foldl_cons, List.flatMap_cons,
List.append_assoc, _root_.Integration9_9.TM2PlatformSerialization.parseStep, hread]
rw [ih]
simp [List.reverse_cons, List.append_assoc]
@[simp] theorem readList_append (code : α → Str)
(hread : ∀ a xs, read (code a ++ xs) = (xs,a)) (as : List α) (xs : Str) :
_root_.Integration9_9.TM2PlatformSerialization.readList read (encStr (as.map code) ++ xs) = (xs, as) := by
have he : encStr (as.map code) ++ xs = encNat as.length ++ (as.flatMap code ++ xs) := by
simp [encStr, List.map_flatten, List.flatMap_def, List.append_assoc]
rw [he, _root_.Integration9_9.TM2PlatformSerialization.readList, _root_.Integration9_9.TM2PlatformSerialization.unarySlots_append, _root_.Integration9_9.TM2PlatformSerialization.readUnary_append,
_root_.Integration9_9.TM2PlatformSerialization.parseStep_fold_append read code hread]
simp
lemma parseStep_fold_mapped {β : Type} (code : β → Str) (value : β → α)
(hread : ∀ a xs, read (code a ++ xs) = (xs,value a))
(as : List β) (xs : Str) (acc : List α) :
(List.replicate as.length ()).foldl (_root_.Integration9_9.TM2PlatformSerialization.parseStep read) (as.flatMap code ++ xs, acc) =
(xs, (as.map value).reverse ++ acc) := by
induction as generalizing acc with
| nil => rfl
| cons a as ih =>
simp only [List.length_cons, List.replicate_succ, List.foldl_cons, List.flatMap_cons,
List.append_assoc, _root_.Integration9_9.TM2PlatformSerialization.parseStep, hread]
rw [ih]
simp [List.reverse_cons, List.append_assoc]
@[simp] theorem readList_append_mapped {β : Type} (code : β → Str) (value : β → α)
(hread : ∀ a xs, read (code a ++ xs) = (xs,value a)) (as : List β) (xs : Str) :
_root_.Integration9_9.TM2PlatformSerialization.readList read (encStr (as.map code) ++ xs) = (xs, as.map value) := by
have he : encStr (as.map code) ++ xs = encNat as.length ++ (as.flatMap code ++ xs) := by
simp [encStr, List.flatMap_def, List.append_assoc]
rw [he, _root_.Integration9_9.TM2PlatformSerialization.readList, _root_.Integration9_9.TM2PlatformSerialization.unarySlots_append, _root_.Integration9_9.TM2PlatformSerialization.readUnary_append,
_root_.Integration9_9.TM2PlatformSerialization.parseStep_fold_mapped read code value hread]
simp
end RepeatedParser
end Integration9_9.TM2PlatformSerialization
end
section
set_option autoImplicit false
set_option maxHeartbeats 2000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.LARPlatformEncoding
open InfoLossLAR.WorstCase QAlgorithms.Complexity
open OAI.MetricKMedian.Binary
open OAI.MetricKMedian.Binary.Automatic
open OAI.MetricKMedian.Binary.Automatic.Poly
open QMCNumericRuntime
open TM2PlatformSerialization
/-- First flags are stopped/expecting payload. The two lists store reversed
payload and suffix. All input bits are processed by a single bounded fold. -/
abbrev MarkedState := (Bool × Bool) × (Str × Str)
def markedStep (state : _root_.Integration9_9.LARPlatformEncoding.MarkedState) (bit : Bool) : _root_.Integration9_9.LARPlatformEncoding.MarkedState :=
if state.1.1 then ((true,state.1.2),(state.2.1,bit::state.2.2))
else if state.1.2 then ((false,false),(bit::state.2.1,state.2.2))
else if bit then ((false,true),state.2)
else ((true,false),state.2)
/-- The parser consumes all supplied input once; it does not expand any decoded integer. -/
def readMarked (xs : Str) : Str × Str :=
let state := xs.foldl _root_.Integration9_9.LARPlatformEncoding.markedStep ((false,false),([],[]))
(state.2.2.reverse,state.2.1.reverse)
theorem _root_.Integration9_9.LARPlatformEncoding.marked_fold_stopped (xs digits rest : Str) :
xs.foldl _root_.Integration9_9.LARPlatformEncoding.markedStep ((true,false),(digits,rest)) =
((true,false),(digits,xs.reverse++rest)) := by
induction xs generalizing rest with
| nil => simp
| cons bit xs ih =>
simp only [List.foldl_cons,_root_.Integration9_9.LARPlatformEncoding.markedStep,ite_true]
rw [ih]
simp only [List.reverse_cons,List.append_assoc,List.singleton_append]
theorem _root_.Integration9_9.LARPlatformEncoding.marked_fold_prefix (digits suffix acc : Str) :
((digits.flatMap (fun bit => [true,bit]))++false::suffix).foldl
_root_.Integration9_9.LARPlatformEncoding.markedStep ((false,false),(acc,[])) =
((true,false),(digits.reverse++acc,suffix.reverse)) := by
induction digits generalizing acc with
| nil => simp [_root_.Integration9_9.LARPlatformEncoding.markedStep,_root_.Integration9_9.LARPlatformEncoding.marked_fold_stopped]
| cons bit digits ih =>
simp only [List.flatMap_cons,List.cons_append,List.nil_append,List.foldl_cons]
change ((digits.flatMap (fun bit => [true,bit]))++false::suffix).foldl
_root_.Integration9_9.LARPlatformEncoding.markedStep ((false,false),(bit::acc,[])) =
((true,false),((bit::digits).reverse++acc,suffix.reverse))
rw [ih]
simp only [List.reverse_cons,List.append_assoc,List.singleton_append]
/-- The exact natural-number parser for the platform's marked encB representation. -/
def readB (xs : Str) : Str × ℕ :=
let result := _root_.Integration9_9.LARPlatformEncoding.readMarked xs
(result.1,bitValue result.2)
@[simp] theorem readB_append (n : ℕ) (suffix : Str) : _root_.Integration9_9.LARPlatformEncoding.readB (encB n++suffix)=(suffix,n) := by
simp only [_root_.Integration9_9.LARPlatformEncoding.readB,_root_.Integration9_9.LARPlatformEncoding.readMarked,encB,List.append_assoc,List.singleton_append,
_root_.Integration9_9.LARPlatformEncoding.marked_fold_prefix,List.append_nil,List.reverse_reverse,bitValue_bits]
/-- Read one binary-length-prefixed string. Taking/dropping from the existing
suffix remains polynomial even on malformed exponentially large lengths. -/
def readS (xs : Str) : Str × Str :=
let head := _root_.Integration9_9.LARPlatformEncoding.readB xs
(head.1.drop head.2,head.1.take head.2)
@[simp] theorem readS_append (value suffix : Str) : _root_.Integration9_9.LARPlatformEncoding.readS (encS value++suffix)=(suffix,value) := by
simp only [encS,List.append_assoc,_root_.Integration9_9.LARPlatformEncoding.readS,_root_.Integration9_9.LARPlatformEncoding.readB_append,List.drop_left,List.take_left]
/-- This serializer uses precisely the platform's binary list-length prefix. -/
def serializeBinaryWords (words : List Str) : Str := encB words.length++words.flatten
@[simp] theorem serializeBinaryWords_eq (words : List Str) : _root_.Integration9_9.LARPlatformEncoding.serializeBinaryWords words=encL id words := by
simp [_root_.Integration9_9.LARPlatformEncoding.serializeBinaryWords,encL,List.flatMap_id]
/-- A decoded binary count only selects slots already present in the input.
No malformed count causes expansion to a list of that decoded length. -/
def binarySlots (xs : Str) : List Unit := (xs.take (_root_.Integration9_9.LARPlatformEncoding.readB xs).2).map (fun _ => ())
section BinaryList
variable {α : Type} [Coding α] [Inhabited α]
variable (read : Str → Str × α)
/-- Generic parser for the platform's encL lists, using bounded existing-input slots. -/
def readBinaryList (xs : Str) : Str × List α :=
let state := (_root_.Integration9_9.LARPlatformEncoding.binarySlots xs).foldl (_root_.Integration9_9.TM2PlatformSerialization.parseStep read) ((_root_.Integration9_9.LARPlatformEncoding.readB xs).1,[])
(state.1,state.2.reverse)
theorem _root_.Integration9_9.LARPlatformEncoding.list_length_le_codes {β : Type} (code : β → Str)
(hcode : ∀ a,0<(code a).length) (values : List β) : values.length ≤ (values.flatMap code).length := by
induction values with
| nil => simp
| cons a values ih =>
have h := hcode a
simp only [List.length_cons,List.flatMap_cons,List.length_append]
omega
@[simp] theorem readBinaryList_append_mapped {β : Type} (code : β → Str) (value : β → α)
(hcode : ∀ a,0<(code a).length)
(hread : ∀ a suffix,read (code a++suffix)=(suffix,value a)) (values : List β) (suffix : Str) :
_root_.Integration9_9.LARPlatformEncoding.readBinaryList read (encL code values++suffix)=(suffix,values.map value) := by
have hl : values.length ≤ (encL code values++suffix).length := by
have h := _root_.Integration9_9.LARPlatformEncoding.list_length_le_codes code hcode values
simp only [encL,List.length_append]
omega
have hslots : _root_.Integration9_9.LARPlatformEncoding.binarySlots (encL code values++suffix)=List.replicate values.length () := by
simp only [_root_.Integration9_9.LARPlatformEncoding.binarySlots,encL,List.append_assoc,_root_.Integration9_9.LARPlatformEncoding.readB_append]
rw [List.map_const']
congr 1
simp only [List.length_take]
exact Nat.min_eq_left (by simpa only [encL,List.append_assoc] using hl)
unfold _root_.Integration9_9.LARPlatformEncoding.readBinaryList
rw [hslots]
simp only [encL,List.append_assoc,_root_.Integration9_9.LARPlatformEncoding.readB_append]
rw [_root_.Integration9_9.TM2PlatformSerialization.parseStep_fold_mapped read code value hread]
simp
end BinaryList
theorem encB_length_pos (n : ℕ) : 0<(encB n).length := by
simp [encB]
theorem encL_length_pos {α : Type} (code : α → Str) (values : List α) :
0<(encL code values).length := by
have h := _root_.Integration9_9.LARPlatformEncoding.encB_length_pos values.length
simpa only [encL,List.length_append] using Nat.lt_add_right _ h
/-- Decode the actual residue vector representation into its canonical natural entries. -/
def readVector : Str → Str × List ℕ := _root_.Integration9_9.LARPlatformEncoding.readBinaryList _root_.Integration9_9.LARPlatformEncoding.readB
@[simp] theorem readVector_append {q n : ℕ} (vector : Fin n → ZMod q) (suffix : Str) :
_root_.Integration9_9.LARPlatformEncoding.readVector (encVec encZM vector++suffix)=(suffix,List.ofFn (fun i => (vector i).val)) := by
unfold _root_.Integration9_9.LARPlatformEncoding.readVector encVec
have h := _root_.Integration9_9.LARPlatformEncoding.readBinaryList_append_mapped _root_.Integration9_9.LARPlatformEncoding.readB (encZM : ZMod q → Str) ZMod.val
(fun a => _root_.Integration9_9.LARPlatformEncoding.encB_length_pos a.val) (fun a rest => _root_.Integration9_9.LARPlatformEncoding.readB_append a.val rest) (List.ofFn vector) suffix
simpa only [List.map_ofFn,Function.comp_def] using h
/-- Decode matrix rows by the same binary-counted vector parser. -/
def readMatrix : Str → Str × List (List ℕ) := _root_.Integration9_9.LARPlatformEncoding.readBinaryList _root_.Integration9_9.LARPlatformEncoding.readVector
@[simp] theorem readMatrix_append {q d N : ℕ} (matrix : Matrix (Fin d) (Fin N) (ZMod q)) (suffix : Str) :
_root_.Integration9_9.LARPlatformEncoding.readMatrix (encMat encZM matrix++suffix)=
(suffix,List.ofFn (fun i => List.ofFn (fun j => (matrix i j).val))) := by
unfold _root_.Integration9_9.LARPlatformEncoding.readMatrix encMat
have h := _root_.Integration9_9.LARPlatformEncoding.readBinaryList_append_mapped _root_.Integration9_9.LARPlatformEncoding.readVector (encVec encZM : (Fin N → ZMod q) → Str)
(fun row => List.ofFn (fun j => (row j).val))
(fun row => _root_.Integration9_9.LARPlatformEncoding.encL_length_pos encZM (List.ofFn row)) _root_.Integration9_9.LARPlatformEncoding.readVector_append (List.ofFn (fun i => matrix i)) suffix
simpa only [List.map_ofFn,Function.comp_def] using h
/-- One sample consists of two actual encS-framed matrix/vector fields. -/
def readSample (xs : Str) : Str × (List (List ℕ) × List ℕ) :=
let matrix := _root_.Integration9_9.LARPlatformEncoding.readS xs
let response := _root_.Integration9_9.LARPlatformEncoding.readS matrix.1
(response.1,((_root_.Integration9_9.LARPlatformEncoding.readMatrix matrix.2).2,(_root_.Integration9_9.LARPlatformEncoding.readVector response.2).2))
@[simp] theorem readSample_append {q d N k : ℕ}
(sample : Matrix (Fin d) (Fin N) (ZMod q) × (Fin k → ZMod q)) (suffix : Str) :
_root_.Integration9_9.LARPlatformEncoding.readSample (encPair (encMat encZM sample.1) (encVec encZM sample.2)++suffix)=
(suffix,(List.ofFn (fun i => List.ofFn (fun j => (sample.1 i j).val)),
List.ofFn (fun i => (sample.2 i).val))) := by
simp only [_root_.Integration9_9.LARPlatformEncoding.readSample,encPair,List.append_assoc,_root_.Integration9_9.LARPlatformEncoding.readS_append]
have hm := _root_.Integration9_9.LARPlatformEncoding.readMatrix_append sample.1 []
have hv := _root_.Integration9_9.LARPlatformEncoding.readVector_append sample.2 []
simp only [List.append_nil] at hm hv
rw [hm,hv]
/-- Actual whole-table decoder, with no knowledge of the hidden secret or errors. -/
def readTable : Str → Str × List (List (List ℕ) × List ℕ) := _root_.Integration9_9.LARPlatformEncoding.readBinaryList _root_.Integration9_9.LARPlatformEncoding.readSample
@[simp] theorem readTable_append {q d N k t : ℕ}
(table : Fin t → Matrix (Fin d) (Fin N) (ZMod q) × (Fin k → ZMod q)) (suffix : Str) :
_root_.Integration9_9.LARPlatformEncoding.readTable (encTable table++suffix)=
(suffix,List.ofFn (fun index =>
(List.ofFn (fun i => List.ofFn (fun j => ((table index).1 i j).val)),
List.ofFn (fun i => ((table index).2 i).val)))) := by
unfold _root_.Integration9_9.LARPlatformEncoding.readTable encTable encVec
have hp (sample : Matrix (Fin d) (Fin N) (ZMod q) × (Fin k → ZMod q)) :
0<(encPair (encMat encZM sample.1) (encVec encZM sample.2)).length := by
have h := _root_.Integration9_9.LARPlatformEncoding.encB_length_pos (encMat encZM sample.1).length
simp only [encPair,encS,List.length_append]
omega
have h := _root_.Integration9_9.LARPlatformEncoding.readBinaryList_append_mapped _root_.Integration9_9.LARPlatformEncoding.readSample
(fun sample : Matrix (Fin d) (Fin N) (ZMod q) × (Fin k → ZMod q) =>
encPair (encMat encZM sample.1) (encVec encZM sample.2))
(fun sample => (List.ofFn (fun i => List.ofFn (fun j => (sample.1 i j).val)),
List.ofFn (fun i => (sample.2 i).val))) hp _root_.Integration9_9.LARPlatformEncoding.readSample_append (List.ofFn table) suffix
simpa only [List.map_ofFn,Function.comp_def,encVec] using h
/-- Read the actual three encS-framed components of a distinguisher input. -/
def readInput (xs : Str) : Str × (Str × (Str × Str)) :=
let security := _root_.Integration9_9.LARPlatformEncoding.readS xs
let parameters := _root_.Integration9_9.LARPlatformEncoding.readS security.1
let table := _root_.Integration9_9.LARPlatformEncoding.readS parameters.1
(table.1,(security.2,(parameters.2,table.2)))
@[simp] theorem readInput_append (lam : ℕ) (pp table suffix : Str) :
_root_.Integration9_9.LARPlatformEncoding.readInput (encInput lam pp table++suffix)=(suffix,(unary lam,(pp,table))) := by
simp only [_root_.Integration9_9.LARPlatformEncoding.readInput,encInput,List.append_assoc,_root_.Integration9_9.LARPlatformEncoding.readS_append]
/-- Decode the entire real input into its public fields and observed table. -/
def readObservedInput (xs : Str) : Str × (Str × (Str × List (List (List ℕ) × List ℕ))) :=
let fields := _root_.Integration9_9.LARPlatformEncoding.readInput xs
(fields.1,(fields.2.1,(fields.2.2.1,(_root_.Integration9_9.LARPlatformEncoding.readTable fields.2.2.2).2)))
@[simp] theorem readObservedInput_append {q d N k t : ℕ} (lam : ℕ) (pp suffix : Str)
(table : Fin t → Matrix (Fin d) (Fin N) (ZMod q) × (Fin k → ZMod q)) :
_root_.Integration9_9.LARPlatformEncoding.readObservedInput (encInput lam pp (encTable table)++suffix)=
(suffix,(unary lam,(pp,List.ofFn (fun index =>
(List.ofFn (fun i => List.ofFn (fun j => ((table index).1 i j).val)),
List.ofFn (fun i => ((table index).2 i).val)))))) := by
simp only [_root_.Integration9_9.LARPlatformEncoding.readObservedInput,_root_.Integration9_9.LARPlatformEncoding.readInput_append]
have h := _root_.Integration9_9.LARPlatformEncoding.readTable_append table []
simp only [List.append_nil] at h
rw [h]
@[simp] theorem serializeBinaryWords_map {α : Type} (code : α → Str) (values : List α) :
_root_.Integration9_9.LARPlatformEncoding.serializeBinaryWords (values.map code)=encL code values := by
simp only [_root_.Integration9_9.LARPlatformEncoding.serializeBinaryWords,encL,List.length_map,List.flatMap_def]
def serializeVector (entries : List ℕ) : Str := encL encB entries
@[simp] theorem serializeVector_ofFn {q n : ℕ} (vector : Fin n → ZMod q) :
_root_.Integration9_9.LARPlatformEncoding.serializeVector (List.ofFn (fun i => (vector i).val))=encVec encZM vector := by
have he : List.ofFn (fun i => (vector i).val)=(List.ofFn vector).map ZMod.val := by
simp only [List.map_ofFn,Function.comp_def]
rw [he]
simp only [_root_.Integration9_9.LARPlatformEncoding.serializeVector,encVec,encL,List.length_map,List.flatMap_map,Function.comp_def]
rfl
def serializeMatrix (rows : List (List ℕ)) : Str := encL _root_.Integration9_9.LARPlatformEncoding.serializeVector rows
@[simp] theorem serializeMatrix_ofFn {q d N : ℕ} (matrix : Matrix (Fin d) (Fin N) (ZMod q)) :
_root_.Integration9_9.LARPlatformEncoding.serializeMatrix (List.ofFn (fun i => List.ofFn (fun j => (matrix i j).val)))=encMat encZM matrix := by
have he : List.ofFn (fun i => List.ofFn (fun j => (matrix i j).val))=
(List.ofFn (fun i => matrix i)).map (fun row => List.ofFn (fun j => (row j).val)) := by
simp only [List.map_ofFn,Function.comp_def]
rw [he]
simp only [_root_.Integration9_9.LARPlatformEncoding.serializeMatrix,encMat,encL,List.length_map,List.flatMap_map,Function.comp_def,
_root_.Integration9_9.LARPlatformEncoding.serializeVector_ofFn]
def serializeSample (sample : List (List ℕ) × List ℕ) : Str :=
encPair (_root_.Integration9_9.LARPlatformEncoding.serializeMatrix sample.1) (_root_.Integration9_9.LARPlatformEncoding.serializeVector sample.2)
@[simp] theorem serializeSample_ofFn {q d N k : ℕ}
(sample : Matrix (Fin d) (Fin N) (ZMod q) × (Fin k → ZMod q)) :
_root_.Integration9_9.LARPlatformEncoding.serializeSample (List.ofFn (fun i => List.ofFn (fun j => (sample.1 i j).val)),
List.ofFn (fun i => (sample.2 i).val))=
encPair (encMat encZM sample.1) (encVec encZM sample.2) := by
simp only [_root_.Integration9_9.LARPlatformEncoding.serializeSample,_root_.Integration9_9.LARPlatformEncoding.serializeMatrix_ofFn,_root_.Integration9_9.LARPlatformEncoding.serializeVector_ofFn]
def serializeTable (samples : List (List (List ℕ) × List ℕ)) : Str := encL _root_.Integration9_9.LARPlatformEncoding.serializeSample samples
@[simp] theorem serializeTable_ofFn {q d N k t : ℕ}
(table : Fin t → Matrix (Fin d) (Fin N) (ZMod q) × (Fin k → ZMod q)) :
_root_.Integration9_9.LARPlatformEncoding.serializeTable (List.ofFn (fun index =>
(List.ofFn (fun i => List.ofFn (fun j => ((table index).1 i j).val)),
List.ofFn (fun i => ((table index).2 i).val))))=encTable table := by
have he : List.ofFn (fun index =>
(List.ofFn (fun i => List.ofFn (fun j => ((table index).1 i j).val)),
List.ofFn (fun i => ((table index).2 i).val)))=
(List.ofFn table).map (fun sample =>
(List.ofFn (fun i => List.ofFn (fun j => (sample.1 i j).val)),
List.ofFn (fun i => (sample.2 i).val))) := by
simp only [List.map_ofFn,Function.comp_def]
rw [he]
simp only [_root_.Integration9_9.LARPlatformEncoding.serializeTable,encTable,encVec,encL,List.length_map,List.flatMap_map,
Function.comp_def,_root_.Integration9_9.LARPlatformEncoding.serializeSample_ofFn]
/-- Reassemble the original platform framing around a transformed observed table. -/
def serializeObservedInput (input : Str × (Str × List (List (List ℕ) × List ℕ))) : Str :=
encS input.1++encS input.2.1++encS (_root_.Integration9_9.LARPlatformEncoding.serializeTable input.2.2)
@[simp] theorem serializeObservedInput_ofFn {q d N k t : ℕ} (lam : ℕ) (pp : Str)
(table : Fin t → Matrix (Fin d) (Fin N) (ZMod q) × (Fin k → ZMod q)) :
_root_.Integration9_9.LARPlatformEncoding.serializeObservedInput (unary lam,(pp,List.ofFn (fun index =>
(List.ofFn (fun i => List.ofFn (fun j => ((table index).1 i j).val)),
List.ofFn (fun i => ((table index).2 i).val)))))=
encInput lam pp (encTable table) := by
simp only [_root_.Integration9_9.LARPlatformEncoding.serializeObservedInput,_root_.Integration9_9.LARPlatformEncoding.serializeTable_ofFn,encInput]
/-- Public fixed-family parameters are read from their four real encB fields. -/
def readParameters (xs : Str) : Str × (ℕ × (ℕ × (ℕ × ℕ))) :=
let modulus := _root_.Integration9_9.LARPlatformEncoding.readB xs
let dimension := _root_.Integration9_9.LARPlatformEncoding.readB modulus.1
let rows := _root_.Integration9_9.LARPlatformEncoding.readB dimension.1
let width := _root_.Integration9_9.LARPlatformEncoding.readB rows.1
(width.1,(modulus.2,(dimension.2,(rows.2,width.2))))
@[simp] theorem readParameters_append (q N d width : ℕ) (suffix : Str) :
_root_.Integration9_9.LARPlatformEncoding.readParameters (encB q++encB N++encB d++encB width++suffix)=
(suffix,(q,(N,(d,width)))) := by
simp only [_root_.Integration9_9.LARPlatformEncoding.readParameters,List.append_assoc,_root_.Integration9_9.LARPlatformEncoding.readB_append]
end Integration9_9.LARPlatformEncoding
end
section
set_option autoImplicit false
set_option maxHeartbeats 1600000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativeAffineEmitter
open AFT AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeCoreProposal TM2NativeEmitterData TM2NativeEmitterAssembly
open InfoLossLAR.WorstCase LARPlatformEncoding QAlgorithms.Complexity
attribute [local irreducible] CurrentProposalDimensions.current CurrentEmissionMetadata.current
CurrentAFT.Parameters.dimension CurrentAFT.Parameters.bodySize CurrentAFT.Parameters.legCount
TM2NativeEmitter.current TM2NativeEmitterOutput.current
def serializeVector (xs : List ℤ) : Str := _root_.Integration9_9.LARPlatformEncoding.serializeBinaryWords (xs.map encI)
def serializeMatrix (xs : List (List ℤ)) : Str := _root_.Integration9_9.LARPlatformEncoding.serializeBinaryWords (xs.map _root_.Integration9_9.TM2NativeAffineEmitter.serializeVector)
def serialize (x : _root_.Integration9_9.TM2NativeEmitterAssembly.Output) : Str := encPair (_root_.Integration9_9.TM2NativeAffineEmitter.serializeMatrix x.1) (_root_.Integration9_9.TM2NativeAffineEmitter.serializeVector x.2)
end Integration9_9.TM2NativeAffineEmitter
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.BinaryDiffuseCurrent
end CurrentAFT.BinaryDiffuseCurrent
namespace CurrentAFT.BinaryDiffuseCurrent.currentHeight
end CurrentAFT.BinaryDiffuseCurrent.currentHeight
namespace CurrentAFT.BinaryDiffuseProgram
end CurrentAFT.BinaryDiffuseProgram
namespace CurrentAFT.BinaryDiffuseProgram.sumHeight
end CurrentAFT.BinaryDiffuseProgram.sumHeight
namespace CurrentAFT.BinaryMarkedCurrent
end CurrentAFT.BinaryMarkedCurrent
namespace CurrentAFT.BinaryMarkedCurrent.currentHeight
end CurrentAFT.BinaryMarkedCurrent.currentHeight
namespace CurrentAFT.BinaryPairProgram
end CurrentAFT.BinaryPairProgram
namespace CurrentAFT.BinaryPairProgram.current
end CurrentAFT.BinaryPairProgram.current
namespace CurrentAFT.BinaryPairProgram.currentHeightPolynomial
end CurrentAFT.BinaryPairProgram.currentHeightPolynomial
namespace CurrentAFT.BinaryPairProgram.currentWorkPolynomial
end CurrentAFT.BinaryPairProgram.currentWorkPolynomial
namespace CurrentAFT.BinaryPairProgram.diffuseHeightPolynomial
end CurrentAFT.BinaryPairProgram.diffuseHeightPolynomial
namespace CurrentAFT.BinaryPairProgram.markedHeightPolynomial
end CurrentAFT.BinaryPairProgram.markedHeightPolynomial
namespace CurrentAFT.LocalPairProgram
end CurrentAFT.LocalPairProgram
namespace CurrentAFT.LocalPairProgram.current
end CurrentAFT.LocalPairProgram.current
set_option autoImplicit false
set_option maxHeartbeats 1800000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
/-! Complete current physical pair entries. Both diffuse and marked branches
use actually generated Gaussian blur tables; marked anchor widths are real
unary buffers, and the current activation mixes the two computed entries. -/
namespace Integration9_9.TM2NativeLocalPair
open AFT AFT.RationalNumerics AFT.BinaryArithmetic
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeFiniteSeries TM2NativeSliceProbability
open scoped BigOperators
attribute [local irreducible] TM2NativePrime.modulus TM2NativePrime.upperSlots
abbrev Base := (ℕ×List Unit)×((ℕ×ℤ)×(ℕ×ℕ))
abbrev Context := _root_.Integration9_9.TM2NativeLocalPair.Base×List ℚ
abbrev contextCode : _root_.Integration9_9.TM2NativeLocalPair.Context→List Bool := Automatic.enc
def withBlur (x : _root_.Integration9_9.TM2NativeLocalPair.Base×ℤ) : _root_.Integration9_9.TM2NativeMarkedKernel.Request := (x.1.1,(x.1.2.1,(x.1.2.2,x.2)))
@[fun_prop] theorem withBlur_poly : Poly _root_.Integration9_9.TM2NativeLocalPair.withBlur := by unfold _root_.Integration9_9.TM2NativeLocalPair.withBlur;fun_prop
def diffuseCoin (x : _root_.Integration9_9.TM2NativeMarkedKernel.CoinRequest) : ℚ :=
_root_.Integration9_9.TM2NativeSliceProbability.pair ((x.1.1.1,(1 : ℤ)),
((((if _root_.Integration9_9.TM2NativeMarkedKernel.direction x then (x.1.1.2.length : ℤ) else -2*(x.1.1.2.length : ℤ)+1)+x.1.2.2.2),x.1.2.1.2),
(x.1.1.2.length,(x.1.2.2.1.1,x.1.2.2.1.2))))
@[fun_prop] theorem diffuseCoin_poly : Poly _root_.Integration9_9.TM2NativeLocalPair.diffuseCoin := by unfold _root_.Integration9_9.TM2NativeLocalPair.diffuseCoin;fun_prop
def diffuseKernel (x : _root_.Integration9_9.TM2NativeMarkedKernel.Request) : ℚ := (_root_.Integration9_9.TM2NativeLocalPair.diffuseCoin (x,true)+_root_.Integration9_9.TM2NativeLocalPair.diffuseCoin (x,false))/2
@[fun_prop] theorem diffuseKernel_poly : Poly _root_.Integration9_9.TM2NativeLocalPair.diffuseKernel := by unfold _root_.Integration9_9.TM2NativeLocalPair.diffuseKernel;fun_prop
theorem diffuseKernel_value (x : _root_.Integration9_9.TM2NativeMarkedKernel.Request) : _root_.Integration9_9.TM2NativeLocalPair.diffuseKernel x=
_root_.CurrentAFT.LocalDiffuseProgram.blurEntry x.1.1 x.1.2.length x.2.1.1 x.2.1.2 x.2.2.1.1 x.2.2.1.2 x.2.2.2 := rfl
def kernel (marked : Bool) (x : _root_.Integration9_9.TM2NativeMarkedKernel.Request) : ℚ :=
if marked then _root_.Integration9_9.TM2NativeMarkedKernel.current x else _root_.Integration9_9.TM2NativeLocalPair.diffuseKernel x
@[fun_prop] theorem kernel_poly (marked : Bool) : Poly (_root_.Integration9_9.TM2NativeLocalPair.kernel marked) := by
unfold _root_.Integration9_9.TM2NativeLocalPair.kernel
cases marked <;> simp only [Bool.false_eq_true,ite_false,ite_true] <;> fun_prop
def indices (x : _root_.Integration9_9.TM2NativeLocalPair.Context) : List ℕ := List.range x.2.length
@[fun_prop] theorem indices_poly : Poly _root_.Integration9_9.TM2NativeLocalPair.indices := by
change Poly (fun x : _root_.Integration9_9.TM2NativeLocalPair.Context => List.range x.2.length)
exact Poly.comp (f := fun xs : List ℚ => List.range xs.length) (g := fun x : _root_.Integration9_9.TM2NativeLocalPair.Context => x.2)
(Poly.list_indices (α := ℚ)) (by fun_prop)
def seeds (x : _root_.Integration9_9.TM2NativeLocalPair.Context) : List (ℕ×ℕ) := (_root_.Integration9_9.TM2NativeLocalPair.indices x).flatMap (fun l => (_root_.Integration9_9.TM2NativeLocalPair.indices x).map (fun r => (l,r)))
@[fun_prop] theorem seeds_poly : Poly _root_.Integration9_9.TM2NativeLocalPair.seeds := by unfold _root_.Integration9_9.TM2NativeLocalPair.seeds;fun_prop
def term (marked : Bool) (x : _root_.Integration9_9.TM2NativeLocalPair.Context×(ℕ×ℕ)) : ℚ :=
x.1.2[x.2.1]?.getD 0*x.1.2[x.2.2]?.getD 0 * _root_.Integration9_9.TM2NativeLocalPair.kernel marked (_root_.Integration9_9.TM2NativeLocalPair.withBlur (x.1.1,(x.2.1 : ℤ)-x.2.2))
@[fun_prop] theorem term_poly (marked : Bool) : Poly (_root_.Integration9_9.TM2NativeLocalPair.term marked) := by unfold _root_.Integration9_9.TM2NativeLocalPair.term;fun_prop
def evaluate (marked : Bool) (x : _root_.Integration9_9.TM2NativeLocalPair.Context) : ℚ := ((_root_.Integration9_9.TM2NativeLocalPair.seeds x).map (fun s => _root_.Integration9_9.TM2NativeLocalPair.term marked (x,s))).sum
noncomputable def evaluateProgram (marked : Bool) : PolyProgram _root_.Integration9_9.TM2NativeLocalPair.contextCode Ratio.encode (_root_.Integration9_9.TM2NativeLocalPair.evaluate marked) :=
((((PolyProgram.identity _root_.Integration9_9.TM2NativeLocalPair.contextCode).fanout _root_.Integration9_9.TM2NativeLocalPair.seeds_poly.program).comp
((_root_.Integration9_9.TM2NativeLocalPair.term_poly marked).program.listMapWith (0,0) (0 : ℚ))).comp PolyProgram.ratSum)
@[fun_prop] theorem evaluate_poly (marked : Bool) : Poly (_root_.Integration9_9.TM2NativeLocalPair.evaluate marked) := ⟨_root_.Integration9_9.TM2NativeLocalPair.evaluateProgram marked⟩
abbrev Request := (List Unit×List Unit)×((ℕ×ℤ)×(ℕ×ℕ))
abbrev requestCode : _root_.Integration9_9.TM2NativeLocalPair.Request→List Bool := Automatic.enc
def gaussianRequest (x : _root_.Integration9_9.TM2NativeLocalPair.Request) : _root_.Integration9_9.TM2NativeGaussianWindow.Request := _root_.Integration9_9.TM2NativeProfile.edgeRequest (x.1,(false,0))
@[fun_prop] theorem gaussianRequest_poly : Poly _root_.Integration9_9.TM2NativeLocalPair.gaussianRequest := by unfold _root_.Integration9_9.TM2NativeLocalPair.gaussianRequest;fun_prop
def context (x : _root_.Integration9_9.TM2NativeLocalPair.Request) : _root_.Integration9_9.TM2NativeLocalPair.Context :=
(((_root_.Integration9_9.TM2NativePrime.modulus x.1.1,_root_.Integration9_9.TM2NativeProfile.widthTicks x.1.1),x.2),_root_.Integration9_9.TM2NativeGaussianWindow.current (_root_.Integration9_9.TM2NativeLocalPair.gaussianRequest x))
@[fun_prop] theorem context_poly : Poly _root_.Integration9_9.TM2NativeLocalPair.context := by unfold _root_.Integration9_9.TM2NativeLocalPair.context;fun_prop
def average (marked : Bool) (x : _root_.Integration9_9.TM2NativeLocalPair.Request) : ℚ := _root_.Integration9_9.TM2NativeLocalPair.evaluate marked (_root_.Integration9_9.TM2NativeLocalPair.context x)
@[fun_prop] theorem average_poly (marked : Bool) : Poly (_root_.Integration9_9.TM2NativeLocalPair.average marked) := by unfold _root_.Integration9_9.TM2NativeLocalPair.average;fun_prop
theorem _root_.Integration9_9.TM2NativeLocalPair.generatedContext (x : _root_.Integration9_9.TM2NativeLocalPair.Request) : _root_.Integration9_9.TM2NativeLocalPair.context x=
(((_root_.Integration9_9.TM2NativePrime.modulus x.1.1,_root_.Integration9_9.TM2NativeProfile.widthTicks x.1.1),x.2),
_root_.Integration9_9.TM2NativeProfile.gaussianList x.1.1.length (((x.1.1.length+2)^2-1)/2) x.1.2.length) := by
simp only [_root_.Integration9_9.TM2NativeLocalPair.context,_root_.Integration9_9.TM2NativeLocalPair.gaussianRequest,_root_.Integration9_9.TM2NativeProfile.window_semantics,_root_.Integration9_9.TM2NativeProfile.edgeCutoff]
rfl
theorem _root_.Integration9_9.TM2NativeLocalPair.evaluate_gaussian (marked : Bool) (security cutoff bits colors : ℕ) (width : List Unit)
(primary : ℕ) (source : ℤ) (first second : ℕ) :
_root_.Integration9_9.TM2NativeLocalPair.evaluate marked (((colors,width),((primary,source),(first,second))),_root_.Integration9_9.TM2NativeProfile.gaussianList security cutoff bits)=
(if marked then _root_.CurrentAFT.LocalMarkedProgram.evaluate else _root_.CurrentAFT.LocalDiffuseProgram.evaluate)
security colors width.length cutoff bits primary source first second := by
unfold _root_.Integration9_9.TM2NativeLocalPair.evaluate _root_.Integration9_9.TM2NativeLocalPair.seeds _root_.Integration9_9.TM2NativeLocalPair.indices
dsimp only [_root_.Integration9_9.TM2NativeProfile.gaussianList]
simp only [List.length_ofFn,List.map_flatMap,_root_.Integration9_9.TM2NativeProfile.sum_flatMap,List.map_map,Function.comp_def]
rw [_root_.Integration9_9.TM2NativeProfile.sum_range]
simp_rw [_root_.Integration9_9.TM2NativeProfile.sum_range]
cases marked <;> simp only [Bool.false_eq_true,ite_false,ite_true]
all_goals
simp only [_root_.CurrentAFT.LocalMarkedProgram.evaluate,_root_.CurrentAFT.LocalDiffuseProgram.evaluate]
apply Finset.sum_congr rfl
intro l _
apply Finset.sum_congr rfl
intro r _
have hl:=l.isLt
have hr:=r.isLt
simp only [_root_.Integration9_9.TM2NativeLocalPair.term,_root_.Integration9_9.TM2NativeLocalPair.kernel,_root_.Integration9_9.TM2NativeLocalPair.withBlur,_root_.Integration9_9.TM2NativeMarkedKernel.current_value,_root_.Integration9_9.TM2NativeLocalPair.diffuseKernel_value,
List.getElem?_ofFn,hl,hr,↓reduceDIte,Option.getD_some,Bool.false_eq_true,ite_false,ite_true,
_root_.AFT.RationalNumerics.windowGaussianWeights,_root_.AFT.FiniteConvolutionProgram.windowIndexEquiv,Equiv.coe_fn_mk]
have hb : ((l.val : ℤ)-(cutoff : ℤ))-((r.val : ℤ)-(cutoff : ℤ))=(l.val : ℤ)-r.val := by ring
rw [hb]
theorem average_value (marked : Bool) (x : _root_.Integration9_9.TM2NativeLocalPair.Request) : _root_.Integration9_9.TM2NativeLocalPair.average marked x=
(if marked then _root_.CurrentAFT.LocalMarkedProgram.current else _root_.CurrentAFT.LocalDiffuseProgram.current)
x.1.1.length x.1.2.length x.2.1.1 x.2.1.2 x.2.2.1 x.2.2.2 := by
rw [_root_.Integration9_9.TM2NativeLocalPair.average,_root_.Integration9_9.TM2NativeLocalPair.generatedContext,_root_.Integration9_9.TM2NativeLocalPair.evaluate_gaussian,_root_.Integration9_9.TM2NativePrime.modulus_native,_root_.Integration9_9.TM2NativeProfile.widthTicks_length]
cases marked <;> rfl
def current (x : _root_.Integration9_9.TM2NativeLocalPair.Request) : ℚ :=
(1-_root_.Integration9_9.TM2NativeActivation.current x.1)*_root_.Integration9_9.TM2NativeLocalPair.average false x+_root_.Integration9_9.TM2NativeActivation.current x.1*_root_.Integration9_9.TM2NativeLocalPair.average true x
@[fun_prop] theorem current_poly : Poly _root_.Integration9_9.TM2NativeLocalPair.current := by unfold _root_.Integration9_9.TM2NativeLocalPair.current;fun_prop
noncomputable def currentProgram : PolyProgram _root_.Integration9_9.TM2NativeLocalPair.requestCode Ratio.encode _root_.Integration9_9.TM2NativeLocalPair.current := _root_.Integration9_9.TM2NativeLocalPair.current_poly.program
theorem current_value (x : _root_.Integration9_9.TM2NativeLocalPair.Request) : _root_.Integration9_9.TM2NativeLocalPair.current x=_root_.CurrentAFT.LocalPairProgram.current
x.1.1.length x.1.2.length x.2.1.1 x.2.1.2 x.2.2.1 x.2.2.2 := by
simp only [_root_.Integration9_9.TM2NativeLocalPair.current,_root_.Integration9_9.TM2NativeLocalPair.average_value,Bool.false_eq_true,ite_false,ite_true,_root_.Integration9_9.TM2NativeActivation.current_value,
_root_.CurrentAFT.BinaryActivationProgram.current_value]
rfl
end Integration9_9.TM2NativeLocalPair
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.RationalPositiveReferenceProgram
end CurrentAFT.RationalPositiveReferenceProgram
set_option autoImplicit false
set_option maxHeartbeats 3000000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativeRootGroupMass
open AFT AFT.RationalNumerics AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeRootGroupProfiles TM2NativeRootGroupGaussian
open scoped BigOperators
attribute [local irreducible] TM2NativePrime.modulus TM2NativePrime.upperSlots
abbrev Meta := _root_.Integration9_9.TM2NativeFirstInverse.Meta
abbrev Roots := ℤ × (ℤ × ℤ)
@[fun_prop] theorem palettePairSum_poly {α : Type} [Coding α] {f : (_root_.Integration9_9.TM2NativeRootGroupMass.Meta × α) × (ℕ × ℕ) → ℚ}
(hf : Poly f) : Poly (fun x : _root_.Integration9_9.TM2NativeRootGroupMass.Meta × α =>
∑p : Fin (_root_.CurrentAFT.PublicParameterProgram.modulus x.1.1.length).count,
∑c : Fin (_root_.CurrentAFT.PublicParameterProgram.modulus x.1.1.length).count, f (x,(p.val,c.val))) := by
have hl : Poly (fun x : (_root_.Integration9_9.TM2NativeRootGroupMass.Meta × (α × ℕ)) × ℕ => f ((x.1.1,x.1.2.1),(x.1.2.2,x.2))) := by fun_prop
have hi := _root_.Integration9_9.TM2NativeRootGroupProfiles.palette_sum_poly hl
have hr : Poly (fun x : (_root_.Integration9_9.TM2NativeRootGroupMass.Meta × α) × ℕ => _root_.Integration9_9.TM2NativeRootGroupProfiles.paletteSum
(fun y : (_root_.Integration9_9.TM2NativeRootGroupMass.Meta × (α × ℕ)) × ℕ => f ((y.1.1,y.1.2.1),(y.1.2.2,y.2))) (x.1.1,(x.1.2,x.2))) := by fun_prop
exact _root_.Integration9_9.TM2NativeRootGroupProfiles.palette_sum_poly hr
def centerDelta (x : (_root_.Integration9_9.TM2NativeRootGroupMass.Meta × ℕ) × ℕ) : ℚ := _root_.CurrentAFT.RationalPrimaryColumnProgram.centerDelta
x.1.1.1.length x.1.1.2.length x.1.2 x.2
@[fun_prop] theorem centerDelta_poly : Poly _root_.Integration9_9.TM2NativeRootGroupMass.centerDelta := by
change Poly (fun x : (_root_.Integration9_9.TM2NativeRootGroupMass.Meta × ℕ) × ℕ => (if x.2=x.1.2 then 1 else 0)-_root_.Integration9_9.TM2NativeRootGroupProfiles.primary x.1)
fun_prop
def anchorScore (x : _root_.Integration9_9.TM2NativeRootGroupMass.Meta × (ℕ × ℕ)) : ℚ := _root_.CurrentAFT.RationalRootMassProgram.anchorScore x.1.1.length x.1.2.length
(_root_.CurrentAFT.RationalPrimaryColumnProgram.centerDelta x.1.1.length x.1.2.length x.2.1) x.2.2
@[fun_prop] theorem anchorScore_poly : Poly _root_.Integration9_9.TM2NativeRootGroupMass.anchorScore := by
have hl : Poly (fun x : (_root_.Integration9_9.TM2NativeRootGroupMass.Meta × (ℕ × ℕ)) × ℕ =>
_root_.Integration9_9.TM2NativeRootGroupProfiles.anchor (x.1.1,(x.2,x.1.2.2))*_root_.Integration9_9.TM2NativeRootGroupProfiles.primary (x.1.1,x.2)*_root_.Integration9_9.TM2NativeRootGroupMass.centerDelta ((x.1.1,x.1.2.1),x.2)) := by fun_prop
exact _root_.Integration9_9.TM2NativeRootGroupProfiles.palette_sum_poly hl
def weightedScore (x : _root_.Integration9_9.TM2NativeRootGroupMass.Meta × (ℕ × (ℕ × ℕ))) : ℚ := _root_.CurrentAFT.RationalRootMassProgram.weightedScore
x.1.1.length x.1.2.length (_root_.CurrentAFT.RationalPrimaryColumnProgram.centerDelta x.1.1.length x.1.2.length x.2.1) x.2.2.1 x.2.2.2
@[fun_prop] theorem weightedScore_poly : Poly _root_.Integration9_9.TM2NativeRootGroupMass.weightedScore := by
have h : Poly (fun x : _root_.Integration9_9.TM2NativeRootGroupMass.Meta × (ℕ × (ℕ × ℕ)) => _root_.Integration9_9.TM2NativeRootGroupProfiles.center (x.1,x.2.2.2)*_root_.Integration9_9.TM2NativeRootGroupMass.centerDelta ((x.1,x.2.1),x.2.2.1)-
_root_.Integration9_9.TM2NativeActivation.current x.1*_root_.Integration9_9.TM2NativeRootGroupMass.anchorScore (x.1,(x.2.1,x.2.2.2))) := by fun_prop
refine ⟨h.program.congr _ (fun x => ?_)⟩
simp only [_root_.Integration9_9.TM2NativeActivation.current_value,_root_.CurrentAFT.BinaryActivationProgram.current_value]
rfl
def residue (x : List Unit × ℤ) : ℤ := (_root_.Integration9_9.TM2NativeBodyKernel.emodNatural (x.2,_root_.Integration9_9.TM2NativePrime.modulus x.1) : ℤ)
@[fun_prop] theorem residue_poly : Poly _root_.Integration9_9.TM2NativeRootGroupMass.residue := by unfold _root_.Integration9_9.TM2NativeRootGroupMass.residue;fun_prop
theorem residue_value (x : List Unit × ℤ) : _root_.Integration9_9.TM2NativeRootGroupMass.residue x=x.2 % (_root_.CurrentAFT.PublicParameterProgram.modulus x.1.length).count := by
rw [_root_.Integration9_9.TM2NativeRootGroupMass.residue,_root_.Integration9_9.TM2NativeBodyKernel.emodNatural_eq,_root_.Integration9_9.TM2NativePrime.modulus_native,Int.toNat_of_nonneg]
rw [_root_.CurrentAFT.PublicParameterProgram.modulus_value]
exact Int.emod_nonneg _ (by exact_mod_cast (_root_.CurrentAFT.Parameters.modulus_spec x.1.length).2.ne_zero)
def pair (x : _root_.Integration9_9.TM2NativeLocalPair.Request) : ℚ := _root_.CurrentAFT.LocalPairProgram.current
x.1.1.length x.1.2.length x.2.1.1 x.2.1.2 x.2.2.1 x.2.2.2
@[fun_prop] theorem pair_poly : Poly _root_.Integration9_9.TM2NativeRootGroupMass.pair :=
⟨_root_.Integration9_9.TM2NativeLocalPair.currentProgram.congr _ _root_.Integration9_9.TM2NativeLocalPair.current_value⟩
def controlRest (x : _root_.Integration9_9.TM2NativeRootGroupMass.Meta × (_root_.Integration9_9.TM2NativeRootGroupMass.Roots × (ℕ × List ℕ))) : ℚ := _root_.CurrentAFT.RationalRootMassProgram.controlRest
x.1.1.length x.2.1.1 x.2.1.2.1 x.2.1.2.2 x.2.2.1 (fun i => x.2.2.2[i.val]?.getD 0)
@[fun_prop] theorem controlRest_poly : Poly _root_.Integration9_9.TM2NativeRootGroupMass.controlRest := by
have h : Poly (fun x : _root_.Integration9_9.TM2NativeRootGroupMass.Meta × (_root_.Integration9_9.TM2NativeRootGroupMass.Roots × (ℕ × List ℕ)) =>
_root_.Integration9_9.TM2NativeRootGroupProfiles.shifted (x.1.1,(x.2.1.2.1+x.2.1.2.2,x.2.2.2[3]?.getD 0))*
(if _root_.Integration9_9.TM2NativeRootGroupMass.residue (x.1.1,(x.2.2.1 : ℤ)+x.2.1.1)=((x.2.2.2[0]?.getD 0 : ℕ) : ℤ) then 1 else 0)) := by fun_prop
refine ⟨h.program.congr _ (fun x => ?_)⟩
simp only [_root_.Integration9_9.TM2NativeRootGroupMass.residue_value,_root_.Integration9_9.TM2NativeRootGroupProfiles.shifted,_root_.CurrentAFT.RationalBackgroundProfiles.shifted,
_root_.CurrentAFT.RationalBackgroundProfiles.colors,_root_.CurrentAFT.RationalBackgroundProfiles.margin,_root_.Integration9_9.TM2NativeRootGroupMass.controlRest,_root_.CurrentAFT.RationalRootMassProgram.controlRest]
rfl
def fixedPositive (x : _root_.Integration9_9.TM2NativeRootGroupMass.Meta × (_root_.Integration9_9.TM2NativeRootGroupMass.Roots × List ℕ)) : ℚ := _root_.CurrentAFT.RationalPositiveReferenceProgram.fixedMass
x.1.1.length x.1.2.length x.2.1.1 x.2.1.2.1 x.2.1.2.2 (fun i => x.2.2[i.val]?.getD 0)
@[fun_prop] theorem fixedPositive_poly : Poly _root_.Integration9_9.TM2NativeRootGroupMass.fixedPositive := by
have hl : Poly (fun x : (_root_.Integration9_9.TM2NativeRootGroupMass.Meta × (_root_.Integration9_9.TM2NativeRootGroupMass.Roots × List ℕ)) × (ℕ × ℕ) =>
_root_.Integration9_9.TM2NativeRootGroupProfiles.primary (x.1.1,x.2.1)*_root_.Integration9_9.TM2NativeRootGroupProfiles.center (x.1.1,x.2.2)*
_root_.Integration9_9.TM2NativeRootGroupMass.pair (x.1.1,((x.2.1,x.1.2.1.2.2),(x.1.2.2[1]?.getD 0,x.1.2.2[2]?.getD 0)))*
_root_.Integration9_9.TM2NativeRootGroupMass.controlRest (x.1.1,(x.1.2.1,(x.2.2,x.1.2.2)))) := by fun_prop
exact _root_.Integration9_9.TM2NativeRootGroupMass.palettePairSum_poly hl
def fixedPrimary (x : _root_.Integration9_9.TM2NativeRootGroupMass.Meta × ((_root_.Integration9_9.TM2NativeRootGroupMass.Roots × ℕ) × List ℕ)) : ℚ := _root_.CurrentAFT.RationalRootMassProgram.fixedMass
x.1.1.length x.1.2.length x.2.1.1.1 x.2.1.1.2.1 x.2.1.1.2.2
(_root_.CurrentAFT.RationalPrimaryColumnProgram.centerDelta x.1.1.length x.1.2.length x.2.1.2) (fun i => x.2.2[i.val]?.getD 0)
@[fun_prop] theorem fixedPrimary_poly : Poly _root_.Integration9_9.TM2NativeRootGroupMass.fixedPrimary := by
have hl : Poly (fun x : (_root_.Integration9_9.TM2NativeRootGroupMass.Meta × ((_root_.Integration9_9.TM2NativeRootGroupMass.Roots × ℕ) × List ℕ)) × (ℕ × ℕ) =>
_root_.Integration9_9.TM2NativeRootGroupProfiles.primary (x.1.1,x.2.1)*_root_.Integration9_9.TM2NativeRootGroupMass.weightedScore (x.1.1,(x.1.2.1.2,x.2))*
_root_.Integration9_9.TM2NativeRootGroupMass.pair (x.1.1,((x.2.1,x.1.2.1.1.2.2),(x.1.2.2[1]?.getD 0,x.1.2.2[2]?.getD 0)))*
_root_.Integration9_9.TM2NativeRootGroupMass.controlRest (x.1.1,(x.1.2.1.1,(x.2.2,x.1.2.2)))) := by fun_prop
exact _root_.Integration9_9.TM2NativeRootGroupMass.palettePairSum_poly hl
abbrev PrimaryData := ((ℤ × ℤ) × ℕ) × List ℕ
def primaryMass (x : _root_.Integration9_9.TM2NativeRootGroupMass.Meta × _root_.Integration9_9.TM2NativeRootGroupMass.PrimaryData) : ℚ := _root_.CurrentAFT.RationalRootMassProgram.primaryMass
x.1.1.length x.1.2.length x.2.1.1.1 x.2.1.1.2
(_root_.CurrentAFT.RationalPrimaryColumnProgram.centerDelta x.1.1.length x.1.2.length x.2.1.2) (fun i => x.2.2[i.val]?.getD 0)
@[fun_prop] theorem primaryMass_poly : Poly _root_.Integration9_9.TM2NativeRootGroupMass.primaryMass := by
have hl : Poly (fun x : (_root_.Integration9_9.TM2NativeRootGroupMass.Meta × _root_.Integration9_9.TM2NativeRootGroupMass.PrimaryData) × ℤ =>
_root_.Integration9_9.TM2NativeRootGroupMass.fixedPrimary (x.1.1,(((x.1.2.1.1.1,(x.1.2.1.1.2,x.2)),x.1.2.1.2),x.1.2.2))) := by fun_prop
refine ⟨(_root_.Integration9_9.TM2NativeRootGroupGaussian.windowAverage_poly false hl).program.congr _ (fun x => ?_)⟩
rw [_root_.Integration9_9.TM2NativeRootGroupGaussian.windowAverage_eq]
rfl
def positiveAttachment (x : (_root_.Integration9_9.TM2NativeRootGroupMass.Meta × ((List ℕ × ℤ) × ℤ)) × _root_.Integration9_9.TM2NativeRootGroupGaussian.Seed) : ℚ :=
_root_.Integration9_9.TM2NativeRootGroupMass.fixedPositive (x.1.1,((x.1.2.2,(x.2.1.1-x.2.1.2,x.1.2.1.2)),x.1.2.1.1))
@[fun_prop] theorem positiveAttachment_poly : Poly _root_.Integration9_9.TM2NativeRootGroupMass.positiveAttachment := by unfold _root_.Integration9_9.TM2NativeRootGroupMass.positiveAttachment;fun_prop
def positiveCompensator (x : (_root_.Integration9_9.TM2NativeRootGroupMass.Meta × (List ℕ × ℤ)) × _root_.Integration9_9.TM2NativeRootGroupGaussian.Seed) : ℚ :=
_root_.Integration9_9.TM2NativeRootGroupGaussian.seedAverage _root_.Integration9_9.TM2NativeRootGroupMass.positiveAttachment (x.1.1,(x.1.2,x.2.1.1-x.2.1.2))
@[fun_prop] theorem positiveCompensator_poly : Poly _root_.Integration9_9.TM2NativeRootGroupMass.positiveCompensator := by unfold _root_.Integration9_9.TM2NativeRootGroupMass.positiveCompensator;fun_prop
def positiveScalar (x : (_root_.Integration9_9.TM2NativeRootGroupMass.Meta × List ℕ) × ℤ) : ℚ := _root_.Integration9_9.TM2NativeRootGroupGaussian.seedAverage _root_.Integration9_9.TM2NativeRootGroupMass.positiveCompensator (x.1.1,(x.1.2,x.2))
@[fun_prop] theorem positiveScalar_poly : Poly _root_.Integration9_9.TM2NativeRootGroupMass.positiveScalar := by unfold _root_.Integration9_9.TM2NativeRootGroupMass.positiveScalar;fun_prop
def positiveMass (x : _root_.Integration9_9.TM2NativeRootGroupMass.Meta × List ℕ) : ℚ := _root_.CurrentAFT.RationalPositiveReferenceProgram.current
x.1.1.length x.1.2.length (fun i => x.2[i.val]?.getD 0)
@[fun_prop] theorem positiveMass_poly : Poly _root_.Integration9_9.TM2NativeRootGroupMass.positiveMass := by
refine ⟨(_root_.Integration9_9.TM2NativeRootGroupGaussian.windowAverage_poly false _root_.Integration9_9.TM2NativeRootGroupMass.positiveScalar_poly).program.congr _ (fun x => ?_)⟩
rw [_root_.Integration9_9.TM2NativeRootGroupGaussian.windowAverage_eq]
simp only [_root_.Integration9_9.TM2NativeRootGroupMass.positiveScalar,_root_.Integration9_9.TM2NativeRootGroupGaussian.seedAverage_eq,_root_.Integration9_9.TM2NativeRootGroupMass.positiveCompensator,_root_.Integration9_9.TM2NativeRootGroupMass.positiveAttachment]
rfl
end Integration9_9.TM2NativeRootGroupMass
end
section
set_option autoImplicit false
set_option maxHeartbeats 250000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
/-! Fixed-degree tensor inversion by actual joint palette enumeration. Every
one-coordinate density inverse is internally generated and exact on all Nat
coordinates. A strict input-entry machine is composed with real source-word
loops and rational products/sums, giving the entire tensor-inverse machine. -/
namespace Integration9_9.TM2NativeTensorInverse
open AFT AFT.RationalNumerics AFT.BinaryArithmetic
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeFiniteSeries
open scoped BigOperators
attribute [local irreducible] TM2NativeBodyKernel.paletteTicks TM2NativePrime.modulus
TM2NativePrime.upperSlots CurrentAFT.RationalTensorInverseProgram.entry
abbrev Meta := _root_.Integration9_9.TM2NativeDensityInverseColumn.Meta
abbrev FactorContext := _root_.Integration9_9.TM2NativeTensorInverse.Meta×(List ℕ×List ℕ)
abbrev factorCode : _root_.Integration9_9.TM2NativeTensorInverse.FactorContext→List Bool := Automatic.enc
@[fun_prop] theorem densityEntry_poly : Poly (fun x : _root_.Integration9_9.TM2NativeDensityInverseColumn.Request =>
_root_.CurrentAFT.RationalTensorInverseProgram.entry x.1.1.length x.1.2.length x.2.1 x.2.2) :=
⟨_root_.Integration9_9.TM2NativeDensityInverseColumn.entryProgram⟩
def factor (x : _root_.Integration9_9.TM2NativeTensorInverse.FactorContext×ℕ) : ℚ := _root_.CurrentAFT.RationalTensorInverseProgram.entry
x.1.1.1.length x.1.1.2.length (x.1.2.1[x.2]?.getD 0) (x.1.2.2[x.2]?.getD 0)
@[fun_prop] theorem factor_poly : Poly _root_.Integration9_9.TM2NativeTensorInverse.factor := by
exact Poly.comp
(f := fun x : _root_.Integration9_9.TM2NativeDensityInverseColumn.Request => _root_.CurrentAFT.RationalTensorInverseProgram.entry
x.1.1.length x.1.2.length x.2.1 x.2.2)
(g := fun x : _root_.Integration9_9.TM2NativeTensorInverse.FactorContext×ℕ => (x.1.1,(x.1.2.1[x.2]?.getD 0,x.1.2.2[x.2]?.getD 0)))
_root_.Integration9_9.TM2NativeTensorInverse.densityEntry_poly (by fun_prop)
def product (degree : ℕ) (x : _root_.Integration9_9.TM2NativeTensorInverse.FactorContext) : ℚ := ((List.range degree).map (fun i => _root_.Integration9_9.TM2NativeTensorInverse.factor (x,i))).prod
noncomputable def productProgram (degree : ℕ) : PolyProgram _root_.Integration9_9.TM2NativeTensorInverse.factorCode Ratio.encode (_root_.Integration9_9.TM2NativeTensorInverse.product degree) := by
let indices := PolyProgram.constant _root_.Integration9_9.TM2NativeTensorInverse.factorCode (encodeList Nat.bits) (List.range degree)
exact ((((PolyProgram.identity _root_.Integration9_9.TM2NativeTensorInverse.factorCode).fanout indices).comp
(_root_.Integration9_9.TM2NativeTensorInverse.factor_poly.program.listMapWith 0 (0 : ℚ))).comp PolyProgram.ratProd)
@[fun_prop] theorem product_poly (degree : ℕ) : Poly (_root_.Integration9_9.TM2NativeTensorInverse.product degree) := ⟨_root_.Integration9_9.TM2NativeTensorInverse.productProgram degree⟩
theorem _root_.Integration9_9.TM2NativeTensorInverse.prod_range (f : ℕ→ℚ) (n : ℕ) : ((List.range n).map f).prod=∏i : Fin n,f i := by
rw [Fin.prod_univ_eq_prod_range]
induction n with
| zero => simp
| succ n ih => simp only [List.range_succ,List.map_append,List.prod_append,ih,List.map_singleton,List.prod_cons,List.prod_nil,mul_one,Finset.prod_range_succ]
theorem _root_.Integration9_9.TM2NativeTensorInverse.getD_ofFn {α : Type} {n : ℕ} (f : Fin n→α) (i : Fin n) (a0 : α) :
(List.ofFn f)[i.val]?.getD a0=f i := by simp
theorem product_value (degree : ℕ) (params : _root_.Integration9_9.TM2NativeTensorInverse.Meta) (source : Fin degree→ℕ) (output : List ℕ) :
_root_.Integration9_9.TM2NativeTensorInverse.product degree (params,(List.ofFn source,output))=
∏i : Fin degree,_root_.CurrentAFT.RationalTensorInverseProgram.entry params.1.length params.2.length
(source i) (output[i.val]?.getD 0) := by
rw [_root_.Integration9_9.TM2NativeTensorInverse.product,_root_.Integration9_9.TM2NativeTensorInverse.prod_range]
apply Finset.prod_congr rfl
intro i _
simp only [_root_.Integration9_9.TM2NativeTensorInverse.factor,_root_.Integration9_9.TM2NativeTensorInverse.getD_ofFn]
attribute [local irreducible] product
abbrev Request (α : Type) := (_root_.Integration9_9.TM2NativeTensorInverse.Meta×α)×List ℕ
abbrev requestCode {α : Type} [Coding α] : _root_.Integration9_9.TM2NativeTensorInverse.Request α→List Bool := Automatic.enc
def term {α : Type} (degree : ℕ) (f : _root_.Integration9_9.TM2NativeTensorInverse.Request α→ℚ) (x : _root_.Integration9_9.TM2NativeTensorInverse.Request α×List ℕ) : ℚ :=
f (x.1.1,x.2)*_root_.Integration9_9.TM2NativeTensorInverse.product degree (x.1.1.1,(x.2,x.1.2))
def current {α : Type} (degree : ℕ) (f : _root_.Integration9_9.TM2NativeTensorInverse.Request α→ℚ) (x : _root_.Integration9_9.TM2NativeTensorInverse.Request α) : ℚ :=
((_root_.Integration9_9.TM2NativeTupleEnumeration.tuples degree (List.range (_root_.Integration9_9.TM2NativeBodyKernel.paletteTicks x.1.1.1).length)).map
(fun word => _root_.Integration9_9.TM2NativeTensorInverse.term degree f (x,word))).sum
attribute [local irreducible] current
/-- Construct the real entire fixed-degree tensor machine from a strict
input-entry subroutine. Its source enumeration is polynomial because degree
is fixed and its palette buffer is actually generated from security. -/
noncomputable def tensorProgram {α : Type} [Coding α] (degree : ℕ) {f : _root_.Integration9_9.TM2NativeTensorInverse.Request α→ℚ}
(leaf : PolyProgram _root_.Integration9_9.TM2NativeTensorInverse.requestCode Ratio.encode f) : PolyProgram _root_.Integration9_9.TM2NativeTensorInverse.requestCode Ratio.encode (_root_.Integration9_9.TM2NativeTensorInverse.current degree f) := by
have hcall : Poly (fun x : _root_.Integration9_9.TM2NativeTensorInverse.Request α×List ℕ => f (x.1.1,x.2)) :=
Poly.comp (f := f) (g := fun x : _root_.Integration9_9.TM2NativeTensorInverse.Request α×List ℕ => (x.1.1,x.2)) ⟨leaf⟩ (by fun_prop)
have hprod : Poly (fun x : _root_.Integration9_9.TM2NativeTensorInverse.Request α×List ℕ => _root_.Integration9_9.TM2NativeTensorInverse.product degree (x.1.1.1,(x.2,x.1.2))) :=
Poly.comp (f := _root_.Integration9_9.TM2NativeTensorInverse.product degree) (g := fun x : _root_.Integration9_9.TM2NativeTensorInverse.Request α×List ℕ => (x.1.1.1,(x.2,x.1.2)))
(_root_.Integration9_9.TM2NativeTensorInverse.product_poly degree) (by fun_prop)
have hterm : Poly (_root_.Integration9_9.TM2NativeTensorInverse.term degree f) := by
change Poly (fun x : _root_.Integration9_9.TM2NativeTensorInverse.Request α×List ℕ => f (x.1.1,x.2)*_root_.Integration9_9.TM2NativeTensorInverse.product degree (x.1.1.1,(x.2,x.1.2)))
exact Poly.comp Poly.rat_mul (Poly.pair hcall hprod)
have hinit : Poly (fun x : _root_.Integration9_9.TM2NativeTensorInverse.Request α => (x,_root_.Integration9_9.TM2NativeBodyKernel.paletteTicks x.1.1.1)) := by fun_prop
have hsum : Poly (fun y : _root_.Integration9_9.TM2NativeTensorInverse.Request α×List Unit =>
((_root_.Integration9_9.TM2NativeTupleEnumeration.tuples degree (List.range y.2.length)).map
(fun word => _root_.Integration9_9.TM2NativeTensorInverse.term degree f (y.1,word))).sum) :=
⟨_root_.Integration9_9.TM2NativeTupleEnumeration.sumProgram (α := _root_.Integration9_9.TM2NativeTensorInverse.Request α) degree hterm.program⟩
have hcurrent : Poly (_root_.Integration9_9.TM2NativeTensorInverse.current degree f) := by
unfold _root_.Integration9_9.TM2NativeTensorInverse.current
exact Poly.comp (f := fun y : _root_.Integration9_9.TM2NativeTensorInverse.Request α×List Unit =>
((_root_.Integration9_9.TM2NativeTupleEnumeration.tuples degree (List.range y.2.length)).map
(fun word => _root_.Integration9_9.TM2NativeTensorInverse.term degree f (y.1,word))).sum)
(g := fun x : _root_.Integration9_9.TM2NativeTensorInverse.Request α => (x,_root_.Integration9_9.TM2NativeBodyKernel.paletteTicks x.1.1.1)) hsum hinit
exact hcurrent.program
theorem current_value {α : Type} (degree : ℕ) (f : _root_.Integration9_9.TM2NativeTensorInverse.Request α→ℚ) (x : _root_.Integration9_9.TM2NativeTensorInverse.Request α) :
_root_.Integration9_9.TM2NativeTensorInverse.current degree f x=_root_.CurrentAFT.RationalTensorInverseProgram.current x.1.1.1.length x.1.1.2.length degree
(fun source => f (x.1,List.ofFn source)) (fun i => x.2[i.val]?.getD 0) := by
have hc : (_root_.Integration9_9.TM2NativeBodyKernel.paletteTicks x.1.1.1).length=(_root_.CurrentAFT.PublicParameterProgram.modulus x.1.1.1.length).count := by
rw [_root_.Integration9_9.TM2NativeBodyKernel.paletteTicks_length,_root_.CurrentAFT.PublicParameterProgram.modulus_value]
rw [_root_.Integration9_9.TM2NativeTensorInverse.current,hc,_root_.Integration9_9.TM2NativeTupleEnumeration.sum_tuples]
unfold _root_.CurrentAFT.RationalTensorInverseProgram.current
apply Finset.sum_congr rfl
intro source _
simp only [_root_.Integration9_9.TM2NativeTensorInverse.term,_root_.Integration9_9.TM2NativeTensorInverse.product_value]
/-- Exact rational tensor-inverse semantics for arbitrary natural output
coordinates, including malformed/short output lists via explicit defaults. -/
noncomputable def rationalProgram {α : Type} [Coding α] (degree : ℕ) {f : _root_.Integration9_9.TM2NativeTensorInverse.Request α→ℚ}
(leaf : PolyProgram _root_.Integration9_9.TM2NativeTensorInverse.requestCode Ratio.encode f) : PolyProgram _root_.Integration9_9.TM2NativeTensorInverse.requestCode Ratio.encode
(fun x : _root_.Integration9_9.TM2NativeTensorInverse.Request α => _root_.CurrentAFT.RationalTensorInverseProgram.current x.1.1.1.length x.1.1.2.length degree
(fun source => f (x.1,List.ofFn source)) (fun i => x.2[i.val]?.getD 0)) :=
(_root_.Integration9_9.TM2NativeTensorInverse.tensorProgram degree leaf).congr _ (_root_.Integration9_9.TM2NativeTensorInverse.current_value degree f)
end Integration9_9.TM2NativeTensorInverse
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.RationalLegCoefficientExtraction
end CurrentAFT.RationalLegCoefficientExtraction
namespace CurrentAFT.RationalLegCoefficientExtraction.orderPermutation
end CurrentAFT.RationalLegCoefficientExtraction.orderPermutation
namespace CurrentAFT.RationalLegCoefficientExtraction.selectedKernel
end CurrentAFT.RationalLegCoefficientExtraction.selectedKernel
set_option autoImplicit false
set_option maxHeartbeats 3000000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativeRootGroupCoefficient
open AFT AFT.RationalNumerics AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeRootGroupProfiles
open scoped BigOperators
attribute [local irreducible] TM2NativePrime.modulus TM2NativePrime.upperSlots
abbrev Meta := _root_.Integration9_9.TM2NativeFirstInverse.Meta
theorem finite_prod_poly {α ι : Type} [Coding α] (s : Finset ι) (f : ι → α → ℚ)
(hf : ∀ i ∈ s, Poly (f i)) : Poly (fun x => ∏i ∈ s,f i x) := by
classical
induction s using Finset.induction_on with
| empty => simpa using (Automatic.Poly.const (α := α) (1:ℚ))
| @insert i s hi ih =>
have hx := hf i (by simp)
have hs := ih (fun j hj => hf j (by simp [hj]))
simp only [Finset.prod_insert hi]
fun_prop
def tupleSum {α : Type} (degree : ℕ) (f : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ → ℚ) (x : _root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) : ℚ :=
∑word : Fin degree → Fin (_root_.CurrentAFT.PublicParameterProgram.modulus x.1.1.length).count,
f (x,List.ofFn (fun i => (word i).val))
@[fun_prop] theorem tupleSum_poly {α : Type} [Coding α] (degree : ℕ)
{f : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ → ℚ} (hf : Poly f) : Poly (_root_.Integration9_9.TM2NativeRootGroupCoefficient.tupleSum degree f) := by
have hi : Poly (fun x : _root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α => (x,_root_.Integration9_9.TM2NativeBodyKernel.paletteTicks x.1.1)) := by fun_prop
let machine := hi.program.comp (_root_.Integration9_9.TM2NativeTupleEnumeration.sumProgram degree hf.program)
refine ⟨machine.congr _ (fun x => ?_)⟩
change ((_root_.Integration9_9.TM2NativeTupleEnumeration.tuples degree (List.range (_root_.Integration9_9.TM2NativeBodyKernel.paletteTicks x.1.1).length)).map
(fun word => f (x,word))).sum=_root_.Integration9_9.TM2NativeRootGroupCoefficient.tupleSum degree f x
rw [_root_.Integration9_9.TM2NativeTupleEnumeration.sum_tuples,_root_.Integration9_9.TM2NativeBodyKernel.paletteTicks_length,← _root_.CurrentAFT.PublicParameterProgram.modulus_value]
rfl
def atom (x : _root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × (ℕ × ℕ)) : ℚ :=
((if x.2.1=x.2.2 then 1 else 0)-1/(_root_.CurrentAFT.PublicParameterProgram.modulus x.1.1.length).count)/
_root_.CurrentAFT.RationalProposalProgram.primary x.1.1.length x.1.2.length x.2.2
@[fun_prop] theorem atom_poly : Poly _root_.Integration9_9.TM2NativeRootGroupCoefficient.atom := by
have h : Poly (fun x : _root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × (ℕ × ℕ) => ((if x.2.1=x.2.2 then 1 else 0)-1/(_root_.Integration9_9.TM2NativePrime.modulus x.1.1 : ℚ))/
_root_.Integration9_9.TM2NativeRootGroupProfiles.primary (x.1,x.2.2)) := by fun_prop
refine ⟨h.program.congr _ (fun x => ?_)⟩
simp only [_root_.Integration9_9.TM2NativePrime.modulus_native,_root_.Integration9_9.TM2NativeRootGroupProfiles.primary,_root_.Integration9_9.TM2NativeRootGroupCoefficient.atom]
def slotNumber {degree : ℕ} (selected : Finset (Fin degree)) : selected → Fin selected.card :=
(Finset.orderIsoOfFin selected rfl).symm
def density {α : Type} (degree : ℕ) (selected : Finset (Fin degree))
(mass : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ → ℚ) (x : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ) : ℚ :=
∑source : Fin degree → Fin (_root_.CurrentAFT.PublicParameterProgram.modulus x.1.1.1.length).count,
mass (x.1,List.ofFn (fun i => (source i).val))*
∏slot : selected,_root_.Integration9_9.TM2NativeRootGroupCoefficient.atom (x.1.1,((source slot.val).val,x.2[(_root_.Integration9_9.TM2NativeRootGroupCoefficient.slotNumber selected slot).val]?.getD 0))
@[fun_prop] theorem density_poly {α : Type} [Coding α] (degree : ℕ) (selected : Finset (Fin degree))
{mass : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ → ℚ} (hm : Poly mass) : Poly (_root_.Integration9_9.TM2NativeRootGroupCoefficient.density degree selected mass) := by
classical
let term := fun x : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × (α × List ℕ)) × List ℕ => mass ((x.1.1,x.1.2.1),x.2)*
∏slot : selected, _root_.Integration9_9.TM2NativeRootGroupCoefficient.atom (x.1.1,(x.2[slot.val.val]?.getD 0,x.1.2.2[(_root_.Integration9_9.TM2NativeRootGroupCoefficient.slotNumber selected slot).val]?.getD 0))
have hp : Poly (fun x : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × (α × List ℕ)) × List ℕ =>
∏slot : selected,_root_.Integration9_9.TM2NativeRootGroupCoefficient.atom (x.1.1,(x.2[slot.val.val]?.getD 0,x.1.2.2[(_root_.Integration9_9.TM2NativeRootGroupCoefficient.slotNumber selected slot).val]?.getD 0))) := by
apply _root_.Integration9_9.TM2NativeRootGroupCoefficient.finite_prod_poly
intro slot _
fun_prop
have ht : Poly term := by unfold term;fun_prop
have hs : Poly (fun x : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ => _root_.Integration9_9.TM2NativeRootGroupCoefficient.tupleSum degree term (x.1.1,(x.1.2,x.2))) := by fun_prop
refine ⟨hs.program.congr _ (fun x => ?_)⟩
simp only [_root_.Integration9_9.TM2NativeRootGroupCoefficient.tupleSum,term,_root_.Integration9_9.TM2NativeRootGroupCoefficient.density]
apply Finset.sum_congr rfl
intro source _
simp only [List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some]
def normalized {α : Type} (degree : ℕ) (selected : Finset (Fin degree))
(mass : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ → ℚ) (x : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ) : ℚ :=
_root_.CurrentAFT.RationalTensorInverseProgram.current x.1.1.1.length x.1.1.2.length selected.card
(fun source => _root_.Integration9_9.TM2NativeRootGroupCoefficient.density degree selected mass (x.1,List.ofFn source))
(fun i => x.2[i.val]?.getD 0)
@[fun_prop] theorem normalized_poly {α : Type} [Coding α] (degree : ℕ) (selected : Finset (Fin degree))
{mass : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ → ℚ} (hm : Poly mass) : Poly (_root_.Integration9_9.TM2NativeRootGroupCoefficient.normalized degree selected mass) :=
⟨_root_.Integration9_9.TM2NativeTensorInverse.rationalProgram selected.card (_root_.Integration9_9.TM2NativeRootGroupCoefficient.density_poly degree selected hm).program⟩
def selectedKernel {α : Type} (degree : ℕ) (selected : Finset (Fin degree))
(mass : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ → ℚ) (x : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ) : ℚ :=
(1/selected.card.factorial : ℚ)*∑p : Equiv.Perm (Fin selected.card),
_root_.Integration9_9.TM2NativeRootGroupCoefficient.normalized degree selected mass (x.1,List.ofFn (fun i => x.2[(p i).val]?.getD 0))
@[fun_prop] theorem selectedKernel_poly {α : Type} [Coding α] (degree : ℕ) (selected : Finset (Fin degree))
{mass : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ → ℚ} (hm : Poly mass) : Poly (_root_.Integration9_9.TM2NativeRootGroupCoefficient.selectedKernel degree selected mass) := by
have hn := _root_.Integration9_9.TM2NativeRootGroupCoefficient.normalized_poly degree selected hm
have hs : Poly (fun x : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ => ∑p : Equiv.Perm (Fin selected.card),
_root_.Integration9_9.TM2NativeRootGroupCoefficient.normalized degree selected mass (x.1,List.ofFn (fun i => x.2[(p i).val]?.getD 0))) := by
apply _root_.Integration9_9.TM2NativeRootGroupAlgebra.finite_sum_poly
intro p _
have hw := _root_.Integration9_9.TM2NativeRootGroupAlgebra.tuple_poly
(fun i (x : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ) => x.2[(p i).val]?.getD 0) (by intro i;fun_prop)
fun_prop
unfold _root_.Integration9_9.TM2NativeRootGroupCoefficient.selectedKernel
fun_prop
theorem density_four {α : Type} (mass : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ → ℚ) (selected : Finset (Fin 4))
(x : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ) : _root_.Integration9_9.TM2NativeRootGroupCoefficient.density 4 selected mass x=
_root_.CurrentAFT.RationalCoefficientExtraction.density x.1.1.1.length x.1.1.2.length
(fun word => mass (x.1,List.ofFn word)) selected (fun i => x.2[i.val]?.getD 0) := rfl
theorem normalized_four {α : Type} (mass : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ → ℚ) (selected : Finset (Fin 4))
(x : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ) : _root_.Integration9_9.TM2NativeRootGroupCoefficient.normalized 4 selected mass x=
_root_.CurrentAFT.RationalCoefficientExtraction.normalized x.1.1.1.length x.1.1.2.length
(fun word => mass (x.1,List.ofFn word)) selected (fun i => x.2[i.val]?.getD 0) := by
unfold _root_.Integration9_9.TM2NativeRootGroupCoefficient.normalized _root_.CurrentAFT.RationalCoefficientExtraction.normalized
apply congrArg (fun f => _root_.CurrentAFT.RationalTensorInverseProgram.current x.1.1.1.length x.1.1.2.length selected.card f _)
funext source
rw [_root_.Integration9_9.TM2NativeRootGroupCoefficient.density_four]
simp only [List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some]
theorem selectedKernel_four {α : Type} (mass : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ → ℚ) (selected : Finset (Fin 4))
(x : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ) : _root_.Integration9_9.TM2NativeRootGroupCoefficient.selectedKernel 4 selected mass x=
_root_.CurrentAFT.RationalCoefficientExtraction.selectedKernel x.1.1.1.length x.1.1.2.length
(fun word => mass (x.1,List.ofFn word)) selected (fun i => x.2[i.val]?.getD 0) := by
simp only [_root_.Integration9_9.TM2NativeRootGroupCoefficient.selectedKernel,_root_.Integration9_9.TM2NativeRootGroupCoefficient.normalized_four,_root_.CurrentAFT.RationalCoefficientExtraction.selectedKernel]
congr 1
apply Finset.sum_congr rfl
intro p _
simp only [List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some,Function.comp_def]
theorem density_three {α : Type} (mass : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ → ℚ) (selected : Finset (Fin 3))
(x : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ) : _root_.Integration9_9.TM2NativeRootGroupCoefficient.density 3 selected mass x=
_root_.CurrentAFT.RationalLegCoefficientExtraction.density x.1.1.1.length x.1.1.2.length
(fun word => mass (x.1,List.ofFn word)) selected (fun i => x.2[i.val]?.getD 0) := rfl
theorem normalized_three {α : Type} (mass : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ → ℚ) (selected : Finset (Fin 3))
(x : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ) : _root_.Integration9_9.TM2NativeRootGroupCoefficient.normalized 3 selected mass x=
_root_.CurrentAFT.RationalLegCoefficientExtraction.normalized x.1.1.1.length x.1.1.2.length
(fun word => mass (x.1,List.ofFn word)) selected (fun i => x.2[i.val]?.getD 0) := by
unfold _root_.Integration9_9.TM2NativeRootGroupCoefficient.normalized _root_.CurrentAFT.RationalLegCoefficientExtraction.normalized
apply congrArg (fun f => _root_.CurrentAFT.RationalTensorInverseProgram.current x.1.1.1.length x.1.1.2.length selected.card f _)
funext source
rw [_root_.Integration9_9.TM2NativeRootGroupCoefficient.density_three]
simp only [List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some]
theorem selectedKernel_three {α : Type} (mass : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ → ℚ) (selected : Finset (Fin 3))
(x : (_root_.Integration9_9.TM2NativeRootGroupCoefficient.Meta × α) × List ℕ) : _root_.Integration9_9.TM2NativeRootGroupCoefficient.selectedKernel 3 selected mass x=
_root_.CurrentAFT.RationalLegCoefficientExtraction.selectedKernel x.1.1.1.length x.1.1.2.length
(fun word => mass (x.1,List.ofFn word)) selected (fun i => x.2[i.val]?.getD 0) := by
simp only [_root_.Integration9_9.TM2NativeRootGroupCoefficient.selectedKernel,_root_.Integration9_9.TM2NativeRootGroupCoefficient.normalized_three,_root_.CurrentAFT.RationalLegCoefficientExtraction.selectedKernel]
congr 1
apply Finset.sum_congr rfl
intro p _
simp only [List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some,Function.comp_def]
end Integration9_9.TM2NativeRootGroupCoefficient
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.RationalDiffuseFamilyProgram
end CurrentAFT.RationalDiffuseFamilyProgram
namespace CurrentAFT.RationalDiffuseFamilyProgram.bodyTable
end CurrentAFT.RationalDiffuseFamilyProgram.bodyTable
namespace CurrentAFT.RationalDiffuseFamilyProgram.primaryTable
end CurrentAFT.RationalDiffuseFamilyProgram.primaryTable
set_option autoImplicit false
set_option maxHeartbeats 3000000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativeBackgroundDiffuse
open AFT AFT.RationalNumerics CurrentAFT GradedControlAlgebra
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeRootGroupAlgebra TM2NativeRootGroupProfiles TM2NativeRootGroupGaussian TM2NativeRootGroupRoles
open TM2NativeRootGroupCoefficient TM2NativeBackgroundProfiles
open scoped BigOperators
abbrev Meta := _root_.Integration9_9.TM2NativeFirstInverse.Meta
abbrev PairQuery := (_root_.Integration9_9.TM2NativeBackgroundDiffuse.Meta × ℤ) × (ℕ × ℕ)
def width (x : List Unit) : ℕ := (x.length+2)^48
@[fun_prop] theorem width_poly : Poly _root_.Integration9_9.TM2NativeBackgroundDiffuse.width := by
have h : Poly (fun x : List Unit => (_root_.Integration9_9.TM2NativeProfile.widthTicks x).length) := by fun_prop
exact ⟨h.program.congr _ _root_.Integration9_9.TM2NativeProfile.widthTicks_length⟩
def fixedPair (sign : Bool) (x : _root_.Integration9_9.TM2NativeBackgroundDiffuse.PairQuery × (ℤ × ℤ)) : ℚ :=
_root_.Integration9_9.TM2NativeSliceProbability.pair ((_root_.Integration9_9.TM2NativeBackgroundProfiles.colors x.1.1.1.1,1),
(((if sign then (_root_.Integration9_9.TM2NativeBackgroundDiffuse.width x.1.1.1.1 : ℤ) else -2*(_root_.Integration9_9.TM2NativeBackgroundDiffuse.width x.1.1.1.1 : ℤ)+1)+(x.2.1-x.2.2),x.1.1.2),
(_root_.Integration9_9.TM2NativeBackgroundDiffuse.width x.1.1.1.1,x.1.2)))
@[fun_prop] theorem fixedPair_poly (sign : Bool) : Poly (_root_.Integration9_9.TM2NativeBackgroundDiffuse.fixedPair sign) := by
unfold _root_.Integration9_9.TM2NativeBackgroundDiffuse.fixedPair
cases sign <;> simp only [Bool.false_eq_true,ite_false,ite_true] <;> fun_prop
def rightAverage (sign : Bool) (x : (_root_.Integration9_9.TM2NativeBackgroundDiffuse.Meta × (ℤ × ((ℕ × ℕ) × ℤ)))) : ℚ :=
_root_.Integration9_9.TM2NativeRootGroupGaussian.windowAverage true (fun y => _root_.Integration9_9.TM2NativeBackgroundDiffuse.fixedPair sign (((y.1.1,y.1.2.1),y.1.2.2.1),(y.1.2.2.2,y.2))) x
@[fun_prop] theorem rightAverage_poly (sign : Bool) : Poly (_root_.Integration9_9.TM2NativeBackgroundDiffuse.rightAverage sign) := by
unfold _root_.Integration9_9.TM2NativeBackgroundDiffuse.rightAverage
apply _root_.Integration9_9.TM2NativeRootGroupGaussian.windowAverage_poly
fun_prop
def coinAverage (sign : Bool) (x : _root_.Integration9_9.TM2NativeBackgroundDiffuse.Meta × (ℤ × (ℕ × ℕ))) : ℚ :=
_root_.Integration9_9.TM2NativeRootGroupGaussian.windowAverage true (fun y => _root_.Integration9_9.TM2NativeBackgroundDiffuse.rightAverage sign (y.1.1,(y.1.2.1,(y.1.2.2,y.2)))) x
@[fun_prop] theorem coinAverage_poly (sign : Bool) : Poly (_root_.Integration9_9.TM2NativeBackgroundDiffuse.coinAverage sign) := by
unfold _root_.Integration9_9.TM2NativeBackgroundDiffuse.coinAverage
apply _root_.Integration9_9.TM2NativeRootGroupGaussian.windowAverage_poly
fun_prop
def pair (x : _root_.Integration9_9.TM2NativeBackgroundDiffuse.PairQuery) : ℚ := _root_.CurrentAFT.RationalDiffuseResidualProgram.pair x.1.1.1.length x.1.1.2.length x.1.2 x.2.1 x.2.2
@[fun_prop] theorem pair_poly : Poly _root_.Integration9_9.TM2NativeBackgroundDiffuse.pair := by
have h : Poly (fun x : _root_.Integration9_9.TM2NativeBackgroundDiffuse.PairQuery => ∑sign : Bool,(1/2 : ℚ)*_root_.Integration9_9.TM2NativeBackgroundDiffuse.coinAverage sign (x.1.1,(x.1.2,x.2))) := by
apply _root_.Integration9_9.TM2NativeRootGroupAlgebra.finite_sum_poly
intro sign _
fun_prop
refine ⟨h.program.congr _ (fun x => ?_)⟩
simp only [_root_.Integration9_9.TM2NativeBackgroundDiffuse.coinAverage,_root_.Integration9_9.TM2NativeRootGroupGaussian.windowAverage_eq,_root_.Integration9_9.TM2NativeBackgroundDiffuse.rightAverage,Finset.mul_sum,← mul_assoc,_root_.Integration9_9.TM2NativeBackgroundDiffuse.pair,
_root_.CurrentAFT.RationalDiffuseResidualProgram.pair,_root_.CurrentAFT.RationalDiffuseResidualProgram.evaluate,_root_.Integration9_9.TM2NativeBackgroundDiffuse.fixedPair,
_root_.Integration9_9.TM2NativeSliceProbability.pair,_root_.Integration9_9.TM2NativeBackgroundProfiles.colors,_root_.Integration9_9.TM2NativeBackgroundDiffuse.width,_root_.Integration9_9.TM2NativeRootGroupGaussian.cutoff,ite_true,_root_.CurrentAFT.DiffuseProfiles.edgeCutoff,
_root_.CurrentAFT.Parameters.sourceCutoff,_root_.CurrentAFT.Parameters.base]
rfl
def canonical {α : Type} (reference : (_root_.Integration9_9.TM2NativeBackgroundDiffuse.Meta × α) × ℕ → ℚ)
(mass : (_root_.Integration9_9.TM2NativeBackgroundDiffuse.Meta × α) × (ℕ × ℕ) → ℚ) (x : (_root_.Integration9_9.TM2NativeBackgroundDiffuse.Meta × α) × (ℕ × ℕ)) : ℚ :=
_root_.AFT.RationalNumerics.rationalCanonicalPairProgram (_root_.Integration9_9.TM2NativeBackgroundProfiles.colors x.1.1.1) (fun i => reference (x.1,i))
(fun i j => mass (x.1,(i,j))) x.2.1 x.2.2
@[fun_prop] theorem canonical_poly {α : Type} [Coding α]
{reference : (_root_.Integration9_9.TM2NativeBackgroundDiffuse.Meta × α) × ℕ → ℚ} {mass : (_root_.Integration9_9.TM2NativeBackgroundDiffuse.Meta × α) × (ℕ × ℕ) → ℚ}
(hr : Poly reference) (hm : Poly mass) : Poly (_root_.Integration9_9.TM2NativeBackgroundDiffuse.canonical reference mass) := by
let left := fun y : (_root_.Integration9_9.TM2NativeBackgroundDiffuse.Meta × (α × ℕ)) × ℕ => mass ((y.1.1,y.1.2.1),(y.2,y.1.2.2))
let right := fun y : (_root_.Integration9_9.TM2NativeBackgroundDiffuse.Meta × (α × ℕ)) × ℕ => mass ((y.1.1,y.1.2.1),(y.1.2.2,y.2))
let both := fun y : (_root_.Integration9_9.TM2NativeBackgroundDiffuse.Meta × α) × ℕ => _root_.Integration9_9.TM2NativeRootGroupProfiles.paletteSum left (y.1.1,(y.1.2,y.2))
have hl : Poly left := by unfold left;fun_prop
have ht : Poly right := by unfold right;fun_prop
have hb : Poly both := by unfold both;fun_prop
have h : Poly (fun x : (_root_.Integration9_9.TM2NativeBackgroundDiffuse.Meta × α) × (ℕ × ℕ) => mass x-
reference (x.1,x.2.1)*_root_.Integration9_9.TM2NativeRootGroupProfiles.paletteSum left (x.1.1,(x.1.2,x.2.2))-
_root_.Integration9_9.TM2NativeRootGroupProfiles.paletteSum right (x.1.1,(x.1.2,x.2.1))*reference (x.1,x.2.2)+
_root_.Integration9_9.TM2NativeRootGroupProfiles.paletteSum both x.1*reference (x.1,x.2.1)*reference (x.1,x.2.2)) := by fun_prop
refine ⟨h.program.congr _ (fun x => ?_)⟩
simp only [_root_.Integration9_9.TM2NativeBackgroundDiffuse.canonical,_root_.AFT.RationalNumerics.rationalCanonicalPairProgram,_root_.Integration9_9.TM2NativeRootGroupProfiles.paletteSum,_root_.Integration9_9.TM2NativeBackgroundProfiles.colors,← Fin.sum_univ_eq_sum_range,left,right,both]
rw [Finset.sum_comm]
def restricted (x : _root_.Integration9_9.TM2NativeBackgroundDiffuse.PairQuery) : ℚ := if _root_.CurrentAFT.RationalBackgroundProfiles.Safe x.1.1.1.length x.2.1 ∧
_root_.CurrentAFT.RationalBackgroundProfiles.Safe x.1.1.1.length x.2.2 then _root_.Integration9_9.TM2NativeBackgroundDiffuse.pair x else 0
@[fun_prop] theorem restricted_poly : Poly _root_.Integration9_9.TM2NativeBackgroundDiffuse.restricted := by
have h : Poly (fun x : _root_.Integration9_9.TM2NativeBackgroundDiffuse.PairQuery => if _root_.Integration9_9.TM2NativeBackgroundProfiles.safeTest (x.1.1.1,x.2.1) && _root_.Integration9_9.TM2NativeBackgroundProfiles.safeTest (x.1.1.1,x.2.2) then _root_.Integration9_9.TM2NativeBackgroundDiffuse.pair x else 0) := by fun_prop
refine ⟨h.program.congr _ (fun x => ?_)⟩
simp only [_root_.Integration9_9.TM2NativeBackgroundDiffuse.restricted,_root_.Integration9_9.TM2NativeBackgroundProfiles.safeTest,Bool.and_eq_true,decide_eq_true_eq]
def seed (x : _root_.Integration9_9.TM2NativeBackgroundDiffuse.PairQuery) : ℚ := _root_.CurrentAFT.RationalDiffuseResidualProgram.seed x.1.1.1.length x.1.1.2.length x.1.2 x.2.1 x.2.2
@[fun_prop] theorem seed_poly : Poly _root_.Integration9_9.TM2NativeBackgroundDiffuse.seed := by
change Poly (_root_.Integration9_9.TM2NativeBackgroundDiffuse.canonical (fun x : (_root_.Integration9_9.TM2NativeBackgroundDiffuse.Meta × ℤ) × ℕ => _root_.Integration9_9.TM2NativeRootGroupProfiles.safe (x.1.1.1,x.2)) _root_.Integration9_9.TM2NativeBackgroundDiffuse.restricted)
fun_prop
def uniformCanonical (x : _root_.Integration9_9.TM2NativeBackgroundDiffuse.PairQuery) : ℚ := _root_.CurrentAFT.RationalDiffuseResidualProgram.uniformCanonical x.1.1.1.length x.1.1.2.length x.1.2 x.2.1 x.2.2
@[fun_prop] theorem uniformCanonical_poly : Poly _root_.Integration9_9.TM2NativeBackgroundDiffuse.uniformCanonical := by
change Poly (_root_.Integration9_9.TM2NativeBackgroundDiffuse.canonical (fun x : (_root_.Integration9_9.TM2NativeBackgroundDiffuse.Meta × ℤ) × ℕ => 1/(_root_.Integration9_9.TM2NativeBackgroundProfiles.colors x.1.1.1 : ℚ)) _root_.Integration9_9.TM2NativeBackgroundDiffuse.pair)
fun_prop
def rightSmooth (x : (_root_.Integration9_9.TM2NativeBackgroundDiffuse.Meta × (ℤ × ℕ)) × ℕ) : ℚ := _root_.Integration9_9.TM2NativeRootGroupRoles.convolution
(fun y : (_root_.Integration9_9.TM2NativeBackgroundDiffuse.Meta × (ℤ × ℕ)) × ℕ => _root_.Integration9_9.TM2NativeBackgroundDiffuse.seed ((y.1.1,y.1.2.1),(y.1.2.2,y.2))) x
@[fun_prop] theorem rightSmooth_poly : Poly _root_.Integration9_9.TM2NativeBackgroundDiffuse.rightSmooth := by
unfold _root_.Integration9_9.TM2NativeBackgroundDiffuse.rightSmooth
apply _root_.Integration9_9.TM2NativeRootGroupRoles.convolution_poly
fun_prop
def smoothedSeed (x : _root_.Integration9_9.TM2NativeBackgroundDiffuse.PairQuery) : ℚ := _root_.CurrentAFT.RationalDiffuseResidualProgram.smoothedSeed x.1.1.1.length x.1.1.2.length x.1.2 x.2.1 x.2.2
@[fun_prop] theorem smoothedSeed_poly : Poly _root_.Integration9_9.TM2NativeBackgroundDiffuse.smoothedSeed := by
have hf : Poly (fun y : (_root_.Integration9_9.TM2NativeBackgroundDiffuse.Meta × (ℤ × ℕ)) × ℕ => _root_.Integration9_9.TM2NativeBackgroundDiffuse.rightSmooth ((y.1.1,(y.1.2.1,y.2)),y.1.2.2)) := by fun_prop
exact Automatic.Poly.comp (g := fun x : _root_.Integration9_9.TM2NativeBackgroundDiffuse.PairQuery => ((x.1.1,(x.1.2,x.2.2)),x.2.1)) (_root_.Integration9_9.TM2NativeRootGroupRoles.convolution_poly hf) (by fun_prop)
def residual (x : _root_.Integration9_9.TM2NativeBackgroundDiffuse.PairQuery) : ℚ := _root_.CurrentAFT.RationalDiffuseResidualProgram.residual x.1.1.1.length x.1.1.2.length x.1.2 x.2.1 x.2.2
@[fun_prop] theorem residual_poly : Poly _root_.Integration9_9.TM2NativeBackgroundDiffuse.residual := by
change Poly (fun x : _root_.Integration9_9.TM2NativeBackgroundDiffuse.PairQuery => _root_.Integration9_9.TM2NativeBackgroundDiffuse.uniformCanonical x-_root_.Integration9_9.TM2NativeBackgroundDiffuse.smoothedSeed x)
fun_prop
def bodyDensity (x : _root_.Integration9_9.TM2NativeBackgroundDiffuse.PairQuery) : ℚ := _root_.CurrentAFT.RationalDiffuseResidualProgram.bodyDensity x.1.1.1.length x.1.1.2.length x.1.2 x.2.1 x.2.2
@[fun_prop] theorem bodyDensity_poly : Poly _root_.Integration9_9.TM2NativeBackgroundDiffuse.bodyDensity := by
change Poly (fun x : _root_.Integration9_9.TM2NativeBackgroundDiffuse.PairQuery => _root_.Integration9_9.TM2NativeBackgroundDiffuse.seed x/(_root_.Integration9_9.TM2NativeRootGroupProfiles.center (x.1.1,x.2.1)*_root_.Integration9_9.TM2NativeRootGroupProfiles.center (x.1.1,x.2.2)))
fun_prop
end Integration9_9.TM2NativeBackgroundDiffuse
end
Source
Companion Lean implementation for the fixed-family Gaussian affine transport theorem. The source modules and their SHA-256 hashes are recorded in the checked extraction manifest. This exact generated file has SHA-256 be89145caff3bead5f62e3fa6be06063537c4277eccd458aef21af15f0e5bd32. Source modules: Integration9_9_TM2NativeTicketDraw, Integration9_9_TM2NativePositiveDraw, Integration9_9_TM2NativeArrayDraw, Integration9_9_TM2NativePermutationRows, Integration9_9_TM2NativePermutationDraw, Integration9_9_TM2NativeReferenceDraw, Integration9_9_TM2NativePublicSeed, Integration9_9_TM2NativeCoreProposal, Integration9_9_TM2NativeCoreCharge, Integration9_9_TM2NativeEmitterCoordinates, Integration9_9_TM2NativeEmitterLoads, Integration9_9_TM2NativeEmitterRoots, Integration9_9_TM2NativeEmitterOffset, Integration9_9_TM2NativeEmitterColumns, Integration9_9_TM2NativeEmitterData, Integration9_9_TM2NativeEmitterAssembly, Integration9_9_TM2NativeEmitter, Integration9_9_TM2NativeEmitterOutput, Integration9_9_TM2PlatformSerialization, Solutions_AdvantageBridgeEncoding, Integration9_9_TM2NativeAffineEmitter, Integration9_9_TM2NativeLocalPair, Integration9_9_TM2NativeRootGroupMass, Integration9_9_TM2NativeTensorInverse, Integration9_9_TM2NativeRootGroupCoefficient, Integration9_9_TM2NativeBackgroundDiffuse. Alternate sparse native dependencies preserve the original non-import body bytes and all public types; this header-only packaging is recorded in sparse_live/manifest.json. Current source SHA256 f4154a4c55f4be87fa1e6486cb7d45acb48fc226506ed56b04f6d31c760c4454. Native10/11 split fallback keeps every original scope-closed data body unchanged and retains the canonical module names as import facades. Current source SHA256 f4154a4c55f4be87fa1e6486cb7d45acb48fc226506ed56b04f6d31c760c4454.