Root-group and cycle-response evaluation programs
DefinitionInfoLossLAR_RuntimeBundle_05affine-transportinfo-loss-lar-runtimestoc-2027
These programs evaluate ordinary and primary root-group contributions, cycle-touch information, cycle ranks and averages, signed masses, packed roots, and root metadata. They compute the selected finite response used to assemble the full calibration matrix while retaining the exact decoded mathematical interpretation.
Definition code
import Definitions.Def_InfoLossLAR_RuntimeBundle_04
open _root_.InfoLossLARNativeSupplements.h7fd26e43562bbe30.AFT.BinaryArithmetic.RationalBits renaming exists_code → AFT.BinaryArithmetic.RationalBits.exists_code
open _root_.InfoLossLARNativeSupplements.h7fd26e43562bbe30.AFT.BinaryArithmetic.RationalBits renaming exists_code → _p2mNativeSupplement0
open _root_.InfoLossLARNativeSupplements.hbc5d2d237f3bc4c8.AFT.BinaryArithmetic renaming bits_value → AFT.BinaryArithmetic.bits_value
open _root_.InfoLossLARNativeSupplements.hbc5d2d237f3bc4c8.AFT.BinaryArithmetic renaming bits_value → _p2mNativeSupplement1
open _root_.InfoLossLARNativeSupplements.h5a8ca90c605f85fc.AFT.CanonicalMoments renaming independent_embedding_expectation_general → AFT.CanonicalMoments.independent_embedding_expectation_general
open _root_.InfoLossLARNativeSupplements.h5a8ca90c605f85fc.AFT.CanonicalMoments renaming independent_embedding_expectation_general → _p2mNativeSupplement2
open _root_.InfoLossLARNativeSupplements.hf808c8dbbd952db7.AFT.CanonicalMoments renaming independent_equiv_expectation_general → AFT.CanonicalMoments.independent_equiv_expectation_general
open _root_.InfoLossLARNativeSupplements.hf808c8dbbd952db7.AFT.CanonicalMoments renaming independent_equiv_expectation_general → _p2mNativeSupplement3
open _root_.InfoLossLARNativeSupplements.h854528c9e123c6f3.AFT.RationalNumerics.HeightBound renaming div → AFT.RationalNumerics.HeightBound.div
open _root_.InfoLossLARNativeSupplements.h854528c9e123c6f3.AFT.RationalNumerics.HeightBound renaming div → _p2mNativeSupplement4
open _root_.InfoLossLARNativeSupplements.ha562531658b7642e.AFT.RationalNumerics.HeightBound renaming inv → AFT.RationalNumerics.HeightBound.inv
open _root_.InfoLossLARNativeSupplements.ha562531658b7642e.AFT.RationalNumerics.HeightBound renaming inv → _p2mNativeSupplement5
open _root_.InfoLossLARNativeSupplements.h4f5add37bf40c2da.AFT.RationalNumerics.HeightBound renaming mono → AFT.RationalNumerics.HeightBound.mono
open _root_.InfoLossLARNativeSupplements.h4f5add37bf40c2da.AFT.RationalNumerics.HeightBound renaming mono → _p2mNativeSupplement6
open _root_.InfoLossLARNativeSupplements.hec331a1b1191da2d.AFT.RationalNumerics.HeightBound renaming mul → AFT.RationalNumerics.HeightBound.mul
open _root_.InfoLossLARNativeSupplements.hec331a1b1191da2d.AFT.RationalNumerics.HeightBound renaming mul → _p2mNativeSupplement7
open _root_.InfoLossLARNativeSupplements.hca9f3ecea512145f.AFT.RationalNumerics.HeightBound renaming of_int → AFT.RationalNumerics.HeightBound.of_int
open _root_.InfoLossLARNativeSupplements.hca9f3ecea512145f.AFT.RationalNumerics.HeightBound renaming of_int → _p2mNativeSupplement8
open _root_.InfoLossLARNativeSupplements.h5b3dd70c728d6348.AFT.RationalNumerics.HeightBound renaming of_nat → AFT.RationalNumerics.HeightBound.of_nat
open _root_.InfoLossLARNativeSupplements.h5b3dd70c728d6348.AFT.RationalNumerics.HeightBound renaming of_nat → _p2mNativeSupplement9
open _root_.InfoLossLARNativeSupplements.h8fac5110874b5cd9.AFT.RationalNumerics.HeightBound renaming one → AFT.RationalNumerics.HeightBound.one
open _root_.InfoLossLARNativeSupplements.h8fac5110874b5cd9.AFT.RationalNumerics.HeightBound renaming one → _p2mNativeSupplement10
open _root_.InfoLossLARNativeSupplements.h90032182500c2e77.AFT.RationalNumerics.HeightBound renaming pow → AFT.RationalNumerics.HeightBound.pow
open _root_.InfoLossLARNativeSupplements.h90032182500c2e77.AFT.RationalNumerics.HeightBound renaming pow → _p2mNativeSupplement11
open _root_.InfoLossLARNativeSupplements.h6381918e2bfc67e4.AFT.RationalNumerics renaming arctanSum_error → AFT.RationalNumerics.arctanSum_error
open _root_.InfoLossLARNativeSupplements.h6381918e2bfc67e4.AFT.RationalNumerics renaming arctanSum_error → _p2mNativeSupplement12
open _root_.InfoLossLARNativeSupplements.h3497cf28d345cc71.AFT.RationalNumerics renaming arctan_term_bound → AFT.RationalNumerics.arctan_term_bound
open _root_.InfoLossLARNativeSupplements.h3497cf28d345cc71.AFT.RationalNumerics renaming arctan_term_bound → _p2mNativeSupplement13
open _root_.InfoLossLARNativeSupplements.had468f01f375d910.AFT.RationalNumerics renaming boundedRootList_nodup → AFT.RationalNumerics.boundedRootList_nodup
open _root_.InfoLossLARNativeSupplements.had468f01f375d910.AFT.RationalNumerics renaming boundedRootList_nodup → _p2mNativeSupplement14
open _root_.InfoLossLARNativeSupplements.h41ae6c8d47a51d34.AFT.RationalNumerics renaming commonDenominator_le → AFT.RationalNumerics.commonDenominator_le
open _root_.InfoLossLARNativeSupplements.h41ae6c8d47a51d34.AFT.RationalNumerics renaming commonDenominator_le → _p2mNativeSupplement15
open _root_.InfoLossLARNativeSupplements.h5f0d1be1226eed7f.AFT.RationalNumerics renaming commonDenominator_pos → AFT.RationalNumerics.commonDenominator_pos
open _root_.InfoLossLARNativeSupplements.h5f0d1be1226eed7f.AFT.RationalNumerics renaming commonDenominator_pos → _p2mNativeSupplement16
open _root_.InfoLossLARNativeSupplements.h1076ff82614707e5.AFT.RationalNumerics renaming commonNumerator_abs_le → AFT.RationalNumerics.commonNumerator_abs_le
open _root_.InfoLossLARNativeSupplements.h1076ff82614707e5.AFT.RationalNumerics renaming commonNumerator_abs_le → _p2mNativeSupplement17
open _root_.InfoLossLARNativeSupplements.h3827d5d7d51242c6.AFT.RationalNumerics renaming commonNumerator_cast → AFT.RationalNumerics.commonNumerator_cast
open _root_.InfoLossLARNativeSupplements.h3827d5d7d51242c6.AFT.RationalNumerics renaming commonNumerator_cast → _p2mNativeSupplement18
open _root_.InfoLossLARNativeSupplements.h4b0b2c49d14fd209.AFT.RationalNumerics renaming commonNumerator_div → AFT.RationalNumerics.commonNumerator_div
open _root_.InfoLossLARNativeSupplements.h4b0b2c49d14fd209.AFT.RationalNumerics renaming commonNumerator_div → _p2mNativeSupplement19
open _root_.InfoLossLARNativeSupplements.h2882c93186ab7cf8.AFT.RationalNumerics renaming denominator_dvd_common → AFT.RationalNumerics.denominator_dvd_common
open _root_.InfoLossLARNativeSupplements.h2882c93186ab7cf8.AFT.RationalNumerics renaming denominator_dvd_common → _p2mNativeSupplement20
open _root_.InfoLossLARNativeSupplements.h05d99dd2bef78a64.AFT.RationalNumerics renaming integerLinearIteration_abs_le → AFT.RationalNumerics.integerLinearIteration_abs_le
open _root_.InfoLossLARNativeSupplements.h05d99dd2bef78a64.AFT.RationalNumerics renaming integerLinearIteration_abs_le → _p2mNativeSupplement21
open _root_.InfoLossLARNativeSupplements.hc6ad092b2f522781.AFT.RationalNumerics renaming integerLinearIteration_exact → AFT.RationalNumerics.integerLinearIteration_exact
open _root_.InfoLossLARNativeSupplements.hc6ad092b2f522781.AFT.RationalNumerics renaming integerLinearIteration_exact → _p2mNativeSupplement22
open _root_.InfoLossLARNativeSupplements.hdcd54a4fdf95f258.AFT.RationalNumerics renaming integerLinearIteration_height → AFT.RationalNumerics.integerLinearIteration_height
open _root_.InfoLossLARNativeSupplements.hdcd54a4fdf95f258.AFT.RationalNumerics renaming integerLinearIteration_height → _p2mNativeSupplement23
open _root_.InfoLossLARNativeSupplements.he7db6c4ee6224eee.AFT.RationalNumerics renaming linearIteration_height → AFT.RationalNumerics.linearIteration_height
open _root_.InfoLossLARNativeSupplements.he7db6c4ee6224eee.AFT.RationalNumerics renaming linearIteration_height → _p2mNativeSupplement24
open _root_.InfoLossLARNativeSupplements.h18af7218e3ae5082.AFT.RationalNumerics renaming mem_boundedRootList → AFT.RationalNumerics.mem_boundedRootList
open _root_.InfoLossLARNativeSupplements.h18af7218e3ae5082.AFT.RationalNumerics renaming mem_boundedRootList → _p2mNativeSupplement25
open _root_.InfoLossLARNativeSupplements.h878260dd8e6c9a6e.AFT.RationalNumerics renaming piApprox_error → AFT.RationalNumerics.piApprox_error
open _root_.InfoLossLARNativeSupplements.h878260dd8e6c9a6e.AFT.RationalNumerics renaming piApprox_error → _p2mNativeSupplement26
open _root_.InfoLossLARNativeSupplements.h91d71a61f0497f7b.AFT.RationalNumerics renaming piApprox_le_five → AFT.RationalNumerics.piApprox_le_five
open _root_.InfoLossLARNativeSupplements.h91d71a61f0497f7b.AFT.RationalNumerics renaming piApprox_le_five → _p2mNativeSupplement27
open _root_.InfoLossLARNativeSupplements.hb0db73987b7b1eff.AFT.V7Calibration renaming actualPublicBodyChoice_nonempty → AFT.V7Calibration.actualPublicBodyChoice_nonempty
open _root_.InfoLossLARNativeSupplements.hb0db73987b7b1eff.AFT.V7Calibration renaming actualPublicBodyChoice_nonempty → _p2mNativeSupplement28
open _root_.InfoLossLARNativeSupplements.hb6587a05bd2df660.AFT.V7Calibration renaming actualPublicPrimaryChoice_nonempty → AFT.V7Calibration.actualPublicPrimaryChoice_nonempty
open _root_.InfoLossLARNativeSupplements.hb6587a05bd2df660.AFT.V7Calibration renaming actualPublicPrimaryChoice_nonempty → _p2mNativeSupplement29
open _root_.InfoLossLARNativeSupplements.he83cfe7a7db39d44.CurrentAFT.BinaryFiniteProduct renaming current_value → CurrentAFT.BinaryFiniteProduct.current_value
open _root_.InfoLossLARNativeSupplements.he83cfe7a7db39d44.CurrentAFT.BinaryFiniteProduct renaming current_value → _p2mNativeSupplement30
open _root_.InfoLossLARNativeSupplements.hf109288ce2bff41a.CurrentAFT.BinaryFullResponseCounts renaming current_sizes → CurrentAFT.BinaryFullResponseCounts.current_sizes
open _root_.InfoLossLARNativeSupplements.hf109288ce2bff41a.CurrentAFT.BinaryFullResponseCounts renaming current_sizes → _p2mNativeSupplement31
open _root_.InfoLossLARNativeSupplements.hab90893a8a9293a2.CurrentAFT.BinaryListSum renaming current_value → CurrentAFT.BinaryListSum.current_value
open _root_.InfoLossLARNativeSupplements.hab90893a8a9293a2.CurrentAFT.BinaryListSum renaming current_value → _p2mNativeSupplement32
open _root_.InfoLossLARNativeSupplements.hb7b15c9a79e648be.CurrentAFT.BinaryRootMetadataSerializer renaming actualChoice_ordinary → CurrentAFT.BinaryRootMetadataSerializer.actualChoice_ordinary
open _root_.InfoLossLARNativeSupplements.hb7b15c9a79e648be.CurrentAFT.BinaryRootMetadataSerializer renaming actualChoice_ordinary → _p2mNativeSupplement33
open _root_.InfoLossLARNativeSupplements.h9bd8eaff2c880c78.CurrentAFT.BinaryRootMetadataSerializer renaming actualChoice_primary → CurrentAFT.BinaryRootMetadataSerializer.actualChoice_primary
open _root_.InfoLossLARNativeSupplements.h9bd8eaff2c880c78.CurrentAFT.BinaryRootMetadataSerializer renaming actualChoice_primary → _p2mNativeSupplement34
open _root_.InfoLossLARNativeSupplements.ha802267fba3ae37a.CurrentAFT.BinaryRootMetadataSerializer renaming candidate_input → CurrentAFT.BinaryRootMetadataSerializer.candidate_input
open _root_.InfoLossLARNativeSupplements.ha802267fba3ae37a.CurrentAFT.BinaryRootMetadataSerializer renaming candidate_input → _p2mNativeSupplement35
open _root_.InfoLossLARNativeSupplements.h1ccc0b12a2e9b2e7.CurrentAFT.BinaryRootMetadataSerializer renaming candidate_kept → CurrentAFT.BinaryRootMetadataSerializer.candidate_kept
open _root_.InfoLossLARNativeSupplements.h1ccc0b12a2e9b2e7.CurrentAFT.BinaryRootMetadataSerializer renaming candidate_kept → _p2mNativeSupplement36
open _root_.InfoLossLARNativeSupplements.hf63ab620f3c57a9b.CurrentAFT.BinaryRootMetadataSerializer renaming candidate_ordinary → CurrentAFT.BinaryRootMetadataSerializer.candidate_ordinary
open _root_.InfoLossLARNativeSupplements.hf63ab620f3c57a9b.CurrentAFT.BinaryRootMetadataSerializer renaming candidate_ordinary → _p2mNativeSupplement37
open _root_.InfoLossLARNativeSupplements.h8b1af35cb5128d1e.CurrentAFT.BinaryRootMetadataSerializer renaming candidate_primary → CurrentAFT.BinaryRootMetadataSerializer.candidate_primary
open _root_.InfoLossLARNativeSupplements.h8b1af35cb5128d1e.CurrentAFT.BinaryRootMetadataSerializer renaming candidate_primary → _p2mNativeSupplement38
open _root_.InfoLossLARNativeSupplements.hc002c1f58373bc9e.CurrentAFT.BinaryRootMetadataSerializer renaming classify_numbering → CurrentAFT.BinaryRootMetadataSerializer.classify_numbering
open _root_.InfoLossLARNativeSupplements.hc002c1f58373bc9e.CurrentAFT.BinaryRootMetadataSerializer renaming classify_numbering → _p2mNativeSupplement39
open _root_.InfoLossLARNativeSupplements.h0654708b8f7abd41.CurrentAFT.BinaryRootMetadataSerializer renaming current_castMetadata → CurrentAFT.BinaryRootMetadataSerializer.current_castMetadata
open _root_.InfoLossLARNativeSupplements.h0654708b8f7abd41.CurrentAFT.BinaryRootMetadataSerializer renaming current_castMetadata → _p2mNativeSupplement40
open _root_.InfoLossLARNativeSupplements.h62365cd168bf9746.CurrentAFT.BinaryRootMetadataSerializer renaming current_cast_tags → CurrentAFT.BinaryRootMetadataSerializer.current_cast_tags
open _root_.InfoLossLARNativeSupplements.h62365cd168bf9746.CurrentAFT.BinaryRootMetadataSerializer renaming current_cast_tags → _p2mNativeSupplement41
open _root_.InfoLossLARNativeSupplements.hd04a074a03468451.CurrentAFT.BinaryRootMetadataSerializer renaming current_congr_counts → CurrentAFT.BinaryRootMetadataSerializer.current_congr_counts
open _root_.InfoLossLARNativeSupplements.hd04a074a03468451.CurrentAFT.BinaryRootMetadataSerializer renaming current_congr_counts → _p2mNativeSupplement42
open _root_.InfoLossLARNativeSupplements.h92779a9b15e1ad74.CurrentAFT.BinaryRootMetadataSerializer renaming current_kept_le → CurrentAFT.BinaryRootMetadataSerializer.current_kept_le
open _root_.InfoLossLARNativeSupplements.h92779a9b15e1ad74.CurrentAFT.BinaryRootMetadataSerializer renaming current_kept_le → _p2mNativeSupplement43
open _root_.InfoLossLARNativeSupplements.h5d3e6518d488d268.CurrentAFT.BinaryRootMetadataSerializer renaming current_metadata_actual → CurrentAFT.BinaryRootMetadataSerializer.current_metadata_actual
open _root_.InfoLossLARNativeSupplements.h5d3e6518d488d268.CurrentAFT.BinaryRootMetadataSerializer renaming current_metadata_actual → _p2mNativeSupplement44
open _root_.InfoLossLARNativeSupplements.h6da04ab1cb4f0ae9.CurrentAFT.BinaryRootMetadataSerializer renaming current_native_counts → CurrentAFT.BinaryRootMetadataSerializer.current_native_counts
open _root_.InfoLossLARNativeSupplements.h6da04ab1cb4f0ae9.CurrentAFT.BinaryRootMetadataSerializer renaming current_native_counts → _p2mNativeSupplement45
open _root_.InfoLossLARNativeSupplements.h0034013fd46e34b6.CurrentAFT.BinaryRootMetadataSerializer renaming current_rational_actual → CurrentAFT.BinaryRootMetadataSerializer.current_rational_actual
open _root_.InfoLossLARNativeSupplements.h0034013fd46e34b6.CurrentAFT.BinaryRootMetadataSerializer renaming current_rational_actual → _p2mNativeSupplement46
open _root_.InfoLossLARNativeSupplements.he41810aeef644de7.CurrentAFT.BinaryRootMetadataSerializer renaming current_rational_native → CurrentAFT.BinaryRootMetadataSerializer.current_rational_native
open _root_.InfoLossLARNativeSupplements.he41810aeef644de7.CurrentAFT.BinaryRootMetadataSerializer renaming current_rational_native → _p2mNativeSupplement47
open _root_.InfoLossLARNativeSupplements.hdf21f91932116c35.CurrentAFT.BinaryRootMetadataSerializer renaming current_role → CurrentAFT.BinaryRootMetadataSerializer.current_role
open _root_.InfoLossLARNativeSupplements.hdf21f91932116c35.CurrentAFT.BinaryRootMetadataSerializer renaming current_role → _p2mNativeSupplement48
open _root_.InfoLossLARNativeSupplements.h2f02b0da80d0da15.CurrentAFT.BinaryRootMetadataSerializer renaming current_role_actual → CurrentAFT.BinaryRootMetadataSerializer.current_role_actual
open _root_.InfoLossLARNativeSupplements.h2f02b0da80d0da15.CurrentAFT.BinaryRootMetadataSerializer renaming current_role_actual → _p2mNativeSupplement49
open _root_.InfoLossLARNativeSupplements.hf05bd272bb1b56e1.CurrentAFT.BinaryRootMetadataSerializer renaming current_tagSlot → CurrentAFT.BinaryRootMetadataSerializer.current_tagSlot
open _root_.InfoLossLARNativeSupplements.hf05bd272bb1b56e1.CurrentAFT.BinaryRootMetadataSerializer renaming current_tagSlot → _p2mNativeSupplement50
open _root_.InfoLossLARNativeSupplements.h99dea6e0b2cb92cd.CurrentAFT.BinaryRootMetadataSerializer renaming current_tagSlot_actual → CurrentAFT.BinaryRootMetadataSerializer.current_tagSlot_actual
open _root_.InfoLossLARNativeSupplements.h99dea6e0b2cb92cd.CurrentAFT.BinaryRootMetadataSerializer renaming current_tagSlot_actual → _p2mNativeSupplement51
open _root_.InfoLossLARNativeSupplements.h5aa51497de94248a.CurrentAFT.BinaryRootMetadataSerializer renaming find_value → CurrentAFT.BinaryRootMetadataSerializer.find_value
open _root_.InfoLossLARNativeSupplements.h5aa51497de94248a.CurrentAFT.BinaryRootMetadataSerializer renaming find_value → _p2mNativeSupplement52
open _root_.InfoLossLARNativeSupplements.he1ba053a04ebe416.CurrentAFT.BinaryRootMetadataSerializer renaming inputOrdering_symm_kept → CurrentAFT.BinaryRootMetadataSerializer.inputOrdering_symm_kept
open _root_.InfoLossLARNativeSupplements.he1ba053a04ebe416.CurrentAFT.BinaryRootMetadataSerializer renaming inputOrdering_symm_kept → _p2mNativeSupplement53
open _root_.InfoLossLARNativeSupplements.hb19b481a4ab916e9.CurrentAFT.BinaryRootMetadataSerializer renaming inputOrdering_symm_ordinary → CurrentAFT.BinaryRootMetadataSerializer.inputOrdering_symm_ordinary
open _root_.InfoLossLARNativeSupplements.hb19b481a4ab916e9.CurrentAFT.BinaryRootMetadataSerializer renaming inputOrdering_symm_ordinary → _p2mNativeSupplement54
open _root_.InfoLossLARNativeSupplements.h925bf1f311c5581d.CurrentAFT.BinaryRootMetadataSerializer renaming inputOrdering_symm_primary → CurrentAFT.BinaryRootMetadataSerializer.inputOrdering_symm_primary
open _root_.InfoLossLARNativeSupplements.h925bf1f311c5581d.CurrentAFT.BinaryRootMetadataSerializer renaming inputOrdering_symm_primary → _p2mNativeSupplement55
open _root_.InfoLossLARNativeSupplements.h28bdeb915df6f31b.CurrentAFT.BinaryRootMetadataSerializer renaming keptOrdering_number → CurrentAFT.BinaryRootMetadataSerializer.keptOrdering_number
open _root_.InfoLossLARNativeSupplements.h28bdeb915df6f31b.CurrentAFT.BinaryRootMetadataSerializer renaming keptOrdering_number → _p2mNativeSupplement56
open _root_.InfoLossLARNativeSupplements.hd98ece77ce245c62.CurrentAFT.BinaryRootMetadataSerializer renaming kept_length_le → CurrentAFT.BinaryRootMetadataSerializer.kept_length_le
open _root_.InfoLossLARNativeSupplements.hd98ece77ce245c62.CurrentAFT.BinaryRootMetadataSerializer renaming kept_length_le → _p2mNativeSupplement57
open _root_.InfoLossLARNativeSupplements.h0c3b1f75a36dc0a1.CurrentAFT.BinaryRootMetadataSerializer renaming matchesBlock_input → CurrentAFT.BinaryRootMetadataSerializer.matchesBlock_input
open _root_.InfoLossLARNativeSupplements.h0c3b1f75a36dc0a1.CurrentAFT.BinaryRootMetadataSerializer renaming matchesBlock_input → _p2mNativeSupplement58
open _root_.InfoLossLARNativeSupplements.h3614eab28d16c434.CurrentAFT.BinaryRootMetadataSerializer renaming matchesBlock_value → CurrentAFT.BinaryRootMetadataSerializer.matchesBlock_value
open _root_.InfoLossLARNativeSupplements.h3614eab28d16c434.CurrentAFT.BinaryRootMetadataSerializer renaming matchesBlock_value → _p2mNativeSupplement59
open _root_.InfoLossLARNativeSupplements.h7211ad64e277ecd6.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_get → CurrentAFT.BinaryRootMetadataSerializer.nativeTag_get
open _root_.InfoLossLARNativeSupplements.h7211ad64e277ecd6.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_get → _p2mNativeSupplement60
open _root_.InfoLossLARNativeSupplements.h5bfd14958fa45ca1.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_increasing → CurrentAFT.BinaryRootMetadataSerializer.nativeTag_increasing
open _root_.InfoLossLARNativeSupplements.h5bfd14958fa45ca1.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_increasing → _p2mNativeSupplement61
open _root_.InfoLossLARNativeSupplements.h830e34787bfcc36e.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_membership → CurrentAFT.BinaryRootMetadataSerializer.nativeTag_membership
open _root_.InfoLossLARNativeSupplements.h830e34787bfcc36e.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_membership → _p2mNativeSupplement62
open _root_.InfoLossLARNativeSupplements.hdf4e90e4faeda9bb.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_tagsInput → CurrentAFT.BinaryRootMetadataSerializer.nativeTag_tagsInput
open _root_.InfoLossLARNativeSupplements.hdf4e90e4faeda9bb.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_tagsInput → _p2mNativeSupplement63
open _root_.InfoLossLARNativeSupplements.h0eb6479555712d22.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_tagsInput_vector → CurrentAFT.BinaryRootMetadataSerializer.nativeTag_tagsInput_vector
open _root_.InfoLossLARNativeSupplements.h0eb6479555712d22.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_tagsInput_vector → _p2mNativeSupplement64
open _root_.InfoLossLARNativeSupplements.he3484ce79e618bef.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_value → CurrentAFT.BinaryRootMetadataSerializer.nativeTag_value
open _root_.InfoLossLARNativeSupplements.he3484ce79e618bef.CurrentAFT.BinaryRootMetadataSerializer renaming nativeTag_value → _p2mNativeSupplement65
open _root_.InfoLossLARNativeSupplements.hb10c61056b84e123.CurrentAFT.BinaryRootMetadataSerializer renaming position_input → CurrentAFT.BinaryRootMetadataSerializer.position_input
open _root_.InfoLossLARNativeSupplements.hb10c61056b84e123.CurrentAFT.BinaryRootMetadataSerializer renaming position_input → _p2mNativeSupplement66
open _root_.InfoLossLARNativeSupplements.h717398dca61c08fb.CurrentAFT.BinaryRootMetadataSerializer renaming rational_current_cast_tags → CurrentAFT.BinaryRootMetadataSerializer.rational_current_cast_tags
open _root_.InfoLossLARNativeSupplements.h717398dca61c08fb.CurrentAFT.BinaryRootMetadataSerializer renaming rational_current_cast_tags → _p2mNativeSupplement67
open _root_.InfoLossLARNativeSupplements.h5c1679d60747a3c8.CurrentAFT.BinaryRootMetadataSerializer renaming retainedInput_at_group → CurrentAFT.BinaryRootMetadataSerializer.retainedInput_at_group
open _root_.InfoLossLARNativeSupplements.h5c1679d60747a3c8.CurrentAFT.BinaryRootMetadataSerializer renaming retainedInput_at_group → _p2mNativeSupplement68
open _root_.InfoLossLARNativeSupplements.hd10b40ce4e5fb3ce.CurrentAFT.BinaryRootMetadataSerializer renaming retainedInput_get → CurrentAFT.BinaryRootMetadataSerializer.retainedInput_get
open _root_.InfoLossLARNativeSupplements.hd10b40ce4e5fb3ce.CurrentAFT.BinaryRootMetadataSerializer renaming retainedInput_get → _p2mNativeSupplement69
open _root_.InfoLossLARNativeSupplements.h790debae9bc7d744.CurrentAFT.BinaryRootMetadataSerializer renaming role_input → CurrentAFT.BinaryRootMetadataSerializer.role_input
open _root_.InfoLossLARNativeSupplements.h790debae9bc7d744.CurrentAFT.BinaryRootMetadataSerializer renaming role_input → _p2mNativeSupplement70
open _root_.InfoLossLARNativeSupplements.h36433fb6e771176d.CurrentAFT.BinaryRootMetadataSerializer renaming role_kept → CurrentAFT.BinaryRootMetadataSerializer.role_kept
open _root_.InfoLossLARNativeSupplements.h36433fb6e771176d.CurrentAFT.BinaryRootMetadataSerializer renaming role_kept → _p2mNativeSupplement71
open _root_.InfoLossLARNativeSupplements.h1c0aacbfbcab259c.CurrentAFT.BinaryRootMetadataSerializer renaming role_ordinary → CurrentAFT.BinaryRootMetadataSerializer.role_ordinary
open _root_.InfoLossLARNativeSupplements.h1c0aacbfbcab259c.CurrentAFT.BinaryRootMetadataSerializer renaming role_ordinary → _p2mNativeSupplement72
open _root_.InfoLossLARNativeSupplements.had28d56c66c172c2.CurrentAFT.BinaryRootMetadataSerializer renaming role_primary → CurrentAFT.BinaryRootMetadataSerializer.role_primary
open _root_.InfoLossLARNativeSupplements.had28d56c66c172c2.CurrentAFT.BinaryRootMetadataSerializer renaming role_primary → _p2mNativeSupplement73
open _root_.InfoLossLARNativeSupplements.hf7b606d7b6c71037.CurrentAFT.BinaryRootMetadataSerializer renaming splitIndex_value → CurrentAFT.BinaryRootMetadataSerializer.splitIndex_value
open _root_.InfoLossLARNativeSupplements.hf7b606d7b6c71037.CurrentAFT.BinaryRootMetadataSerializer renaming splitIndex_value → _p2mNativeSupplement74
open _root_.InfoLossLARNativeSupplements.hc171b658125977dd.CurrentAFT.BinaryRootMetadataSerializer renaming tagBlocks_card → CurrentAFT.BinaryRootMetadataSerializer.tagBlocks_card
open _root_.InfoLossLARNativeSupplements.hc171b658125977dd.CurrentAFT.BinaryRootMetadataSerializer renaming tagBlocks_card → _p2mNativeSupplement75
open _root_.InfoLossLARNativeSupplements.h864990220cd05a68.CurrentAFT.BinaryRootMetadataSerializer renaming tagSlot_input → CurrentAFT.BinaryRootMetadataSerializer.tagSlot_input
open _root_.InfoLossLARNativeSupplements.h864990220cd05a68.CurrentAFT.BinaryRootMetadataSerializer renaming tagSlot_input → _p2mNativeSupplement76
open _root_.InfoLossLARNativeSupplements.he99bee3d04267632.CurrentAFT.BinaryRootMetadataSerializer renaming tagsInput_get → CurrentAFT.BinaryRootMetadataSerializer.tagsInput_get
open _root_.InfoLossLARNativeSupplements.he99bee3d04267632.CurrentAFT.BinaryRootMetadataSerializer renaming tagsInput_get → _p2mNativeSupplement77
open _root_.InfoLossLARNativeSupplements.h15d8c2848429780a.CurrentAFT.BinaryRootMetadataSerializer renaming vector_count_cast_get → CurrentAFT.BinaryRootMetadataSerializer.vector_count_cast_get
open _root_.InfoLossLARNativeSupplements.h15d8c2848429780a.CurrentAFT.BinaryRootMetadataSerializer renaming vector_count_cast_get → _p2mNativeSupplement78
open _root_.InfoLossLARNativeSupplements.h6033ffbe1c08cc96.CurrentAFT.BinaryRootMetadataSerializer renaming vector_length_cast_get → CurrentAFT.BinaryRootMetadataSerializer.vector_length_cast_get
open _root_.InfoLossLARNativeSupplements.h6033ffbe1c08cc96.CurrentAFT.BinaryRootMetadataSerializer renaming vector_length_cast_get → _p2mNativeSupplement79
open _root_.InfoLossLARNativeSupplements.he438d921f6936ff8.CurrentAFT.BinaryRootMetadataSerializer renaming vector_mem_toList → CurrentAFT.BinaryRootMetadataSerializer.vector_mem_toList
open _root_.InfoLossLARNativeSupplements.he438d921f6936ff8.CurrentAFT.BinaryRootMetadataSerializer renaming vector_mem_toList → _p2mNativeSupplement80
open _root_.InfoLossLARNativeSupplements.he37fcb2fedaaad11.CurrentAFT.BinarySparseCycleEvaluation renaming current_tuple_value → CurrentAFT.BinarySparseCycleEvaluation.current_tuple_value
open _root_.InfoLossLARNativeSupplements.he37fcb2fedaaad11.CurrentAFT.BinarySparseCycleEvaluation renaming current_tuple_value → _p2mNativeSupplement81
open _root_.InfoLossLARNativeSupplements.h42f327202f6ffc34.CurrentAFT.BinarySparseCycleEvaluation renaming rootEntry_value → CurrentAFT.BinarySparseCycleEvaluation.rootEntry_value
open _root_.InfoLossLARNativeSupplements.h42f327202f6ffc34.CurrentAFT.BinarySparseCycleEvaluation renaming rootEntry_value → _p2mNativeSupplement82
open _root_.InfoLossLARNativeSupplements.h046841627a1cee9b.CurrentAFT.BinarySparseCycleEvaluation renaming roots_value → CurrentAFT.BinarySparseCycleEvaluation.roots_value
open _root_.InfoLossLARNativeSupplements.h046841627a1cee9b.CurrentAFT.BinarySparseCycleEvaluation renaming roots_value → _p2mNativeSupplement83
open _root_.InfoLossLARNativeSupplements.hd0df78f75d4d893f.CurrentAFT.BinarySparseCycleEvaluation renaming term_value → CurrentAFT.BinarySparseCycleEvaluation.term_value
open _root_.InfoLossLARNativeSupplements.hd0df78f75d4d893f.CurrentAFT.BinarySparseCycleEvaluation renaming term_value → _p2mNativeSupplement84
open _root_.InfoLossLARNativeSupplements.hf4f5fd4dcb0d678c.CurrentAFT.BinarySparseCycleEvaluation renaming weightEntry_value → CurrentAFT.BinarySparseCycleEvaluation.weightEntry_value
open _root_.InfoLossLARNativeSupplements.hf4f5fd4dcb0d678c.CurrentAFT.BinarySparseCycleEvaluation renaming weightEntry_value → _p2mNativeSupplement85
open _root_.InfoLossLARNativeSupplements.haf9b5363dbfc3f4c.CurrentAFT.BinarySparseCycleSemantic renaming coordinates_apply → CurrentAFT.BinarySparseCycleSemantic.coordinates_apply
open _root_.InfoLossLARNativeSupplements.haf9b5363dbfc3f4c.CurrentAFT.BinarySparseCycleSemantic renaming coordinates_apply → _p2mNativeSupplement86
open _root_.InfoLossLARNativeSupplements.hb39aff037bdc4326.CurrentAFT.BinarySparseCycleSemantic renaming current_value → CurrentAFT.BinarySparseCycleSemantic.current_value
open _root_.InfoLossLARNativeSupplements.hb39aff037bdc4326.CurrentAFT.BinarySparseCycleSemantic renaming current_value → _p2mNativeSupplement87
open _root_.InfoLossLARNativeSupplements.h0cda298b0874d5b6.CurrentAFT.BinarySparseCycleSemantic renaming product_coordinates → CurrentAFT.BinarySparseCycleSemantic.product_coordinates
open _root_.InfoLossLARNativeSupplements.h0cda298b0874d5b6.CurrentAFT.BinarySparseCycleSemantic renaming product_coordinates → _p2mNativeSupplement88
open _root_.InfoLossLARNativeSupplements.h10d530ee15bdc77f.CurrentAFT.BinarySparseCycleSemantic renaming roots_coordinates → CurrentAFT.BinarySparseCycleSemantic.roots_coordinates
open _root_.InfoLossLARNativeSupplements.h10d530ee15bdc77f.CurrentAFT.BinarySparseCycleSemantic renaming roots_coordinates → _p2mNativeSupplement89
open _root_.InfoLossLARNativeSupplements.h5cfbe96a887c7fbe.CurrentAFT.BinaryTouchedCycle renaming candidates_length → CurrentAFT.BinaryTouchedCycle.candidates_length
open _root_.InfoLossLARNativeSupplements.h5cfbe96a887c7fbe.CurrentAFT.BinaryTouchedCycle renaming candidates_length → _p2mNativeSupplement90
open _root_.InfoLossLARNativeSupplements.hbcb1352f59b47e7a.CurrentAFT.BinaryTouchedCycle renaming prepare_length → CurrentAFT.BinaryTouchedCycle.prepare_length
open _root_.InfoLossLARNativeSupplements.hbcb1352f59b47e7a.CurrentAFT.BinaryTouchedCycle renaming prepare_length → _p2mNativeSupplement91
open _root_.InfoLossLARNativeSupplements.h7b66ba8c3614b749.CurrentAFT.BinaryTouchedCycle renaming unique_length → CurrentAFT.BinaryTouchedCycle.unique_length
open _root_.InfoLossLARNativeSupplements.h7b66ba8c3614b749.CurrentAFT.BinaryTouchedCycle renaming unique_length → _p2mNativeSupplement92
open _root_.InfoLossLARNativeSupplements.h8bc15ae79e4624be.CurrentAFT.BinaryTouchedCycleBuffer renaming lookup_value → CurrentAFT.BinaryTouchedCycleBuffer.lookup_value
open _root_.InfoLossLARNativeSupplements.h8bc15ae79e4624be.CurrentAFT.BinaryTouchedCycleBuffer renaming lookup_value → _p2mNativeSupplement93
open _root_.InfoLossLARNativeSupplements.hf362d6b0d865f5c6.CurrentAFT.BinaryTouchedCycleRanks renaming positions_value → CurrentAFT.BinaryTouchedCycleRanks.positions_value
open _root_.InfoLossLARNativeSupplements.hf362d6b0d865f5c6.CurrentAFT.BinaryTouchedCycleRanks renaming positions_value → _p2mNativeSupplement94
open _root_.InfoLossLARNativeSupplements.h4cdf4f6ad2d19d90.CurrentAFT.BinaryTupleSum renaming current_value → CurrentAFT.BinaryTupleSum.current_value
open _root_.InfoLossLARNativeSupplements.h4cdf4f6ad2d19d90.CurrentAFT.BinaryTupleSum renaming current_value → _p2mNativeSupplement95
open _root_.InfoLossLARNativeSupplements.ha8fcea89e723dc23.CurrentAFT.BinaryTupleSum renaming get_ofFn_fun → CurrentAFT.BinaryTupleSum.get_ofFn_fun
open _root_.InfoLossLARNativeSupplements.ha8fcea89e723dc23.CurrentAFT.BinaryTupleSum renaming get_ofFn_fun → _p2mNativeSupplement96
open _root_.InfoLossLARNativeSupplements.ha84cbfc4268e8d40.CurrentAFT.BinaryTupleSum renaming prepend_get → CurrentAFT.BinaryTupleSum.prepend_get
open _root_.InfoLossLARNativeSupplements.ha84cbfc4268e8d40.CurrentAFT.BinaryTupleSum renaming prepend_get → _p2mNativeSupplement97
open _root_.InfoLossLARNativeSupplements.hcca3d782e3229b7c.CurrentAFT.BinaryTupleSum renaming prepend_value → CurrentAFT.BinaryTupleSum.prepend_value
open _root_.InfoLossLARNativeSupplements.hcca3d782e3229b7c.CurrentAFT.BinaryTupleSum renaming prepend_value → _p2mNativeSupplement98
open _root_.InfoLossLARNativeSupplements.h78d75bb492074482.CurrentAFT.CountedBoundedRootTags.Tag renaming card → CurrentAFT.CountedBoundedRootTags.Tag.card
open _root_.InfoLossLARNativeSupplements.h78d75bb492074482.CurrentAFT.CountedBoundedRootTags.Tag renaming card → _p2mNativeSupplement99
open _root_.InfoLossLARNativeSupplements.h9568a61082f27bb9.CurrentAFT.CountedBoundedRootTags.Tag renaming nodup → CurrentAFT.CountedBoundedRootTags.Tag.nodup
open _root_.InfoLossLARNativeSupplements.h9568a61082f27bb9.CurrentAFT.CountedBoundedRootTags.Tag renaming nodup → _p2mNativeSupplement100
open _root_.InfoLossLARNativeSupplements.hf6e7f4bd634f80a9.CurrentAFT.CountedBoundedRootTags.Tag renaming read_value → CurrentAFT.CountedBoundedRootTags.Tag.read_value
open _root_.InfoLossLARNativeSupplements.hf6e7f4bd634f80a9.CurrentAFT.CountedBoundedRootTags.Tag renaming read_value → _p2mNativeSupplement101
open _root_.InfoLossLARNativeSupplements.hd05ef333dfb7baf7.CurrentAFT.CountedBoundedRootTags.Tag renaming store_value → CurrentAFT.CountedBoundedRootTags.Tag.store_value
open _root_.InfoLossLARNativeSupplements.hd05ef333dfb7baf7.CurrentAFT.CountedBoundedRootTags.Tag renaming store_value → _p2mNativeSupplement102
open _root_.InfoLossLARNativeSupplements.h8bf8720ebb55498f.CurrentAFT.CountedBoundedRootTags.Tag renaming vector_increasing → CurrentAFT.CountedBoundedRootTags.Tag.vector_increasing
open _root_.InfoLossLARNativeSupplements.h8bf8720ebb55498f.CurrentAFT.CountedBoundedRootTags.Tag renaming vector_increasing → _p2mNativeSupplement103
open _root_.InfoLossLARNativeSupplements.h5fde173c8469afa6.CurrentAFT.CountedBoundedRootTags renaming current_sets → CurrentAFT.CountedBoundedRootTags.current_sets
open _root_.InfoLossLARNativeSupplements.h5fde173c8469afa6.CurrentAFT.CountedBoundedRootTags renaming current_sets → _p2mNativeSupplement104
open _root_.InfoLossLARNativeSupplements.he8f344a3055fc54a.CurrentAFT.CountedBoundedRootTags renaming entry_sets → CurrentAFT.CountedBoundedRootTags.entry_sets
open _root_.InfoLossLARNativeSupplements.he8f344a3055fc54a.CurrentAFT.CountedBoundedRootTags renaming entry_sets → _p2mNativeSupplement105
open _root_.InfoLossLARNativeSupplements.h2c50018e32584610.CurrentAFT.CountedBoundedRootTags renaming guarded_value → CurrentAFT.CountedBoundedRootTags.guarded_value
open _root_.InfoLossLARNativeSupplements.h2c50018e32584610.CurrentAFT.CountedBoundedRootTags renaming guarded_value → _p2mNativeSupplement106
open _root_.InfoLossLARNativeSupplements.h4aa23a1b871c5bc6.CurrentAFT.CountedBoundedRootTags renaming sum_value → CurrentAFT.CountedBoundedRootTags.sum_value
open _root_.InfoLossLARNativeSupplements.h4aa23a1b871c5bc6.CurrentAFT.CountedBoundedRootTags renaming sum_value → _p2mNativeSupplement107
open _root_.InfoLossLARNativeSupplements.h5a83c4211de0d052.CurrentAFT.CountedBoundedRootTags renaming sum_value_equiv → CurrentAFT.CountedBoundedRootTags.sum_value_equiv
open _root_.InfoLossLARNativeSupplements.h5a83c4211de0d052.CurrentAFT.CountedBoundedRootTags renaming sum_value_equiv → _p2mNativeSupplement108
open _root_.InfoLossLARNativeSupplements.h857ff8dbe55756b8.CurrentAFT.CurrentCycleEntryProgram renaming bodyCount_eq → CurrentAFT.CurrentCycleEntryProgram.bodyCount_eq
open _root_.InfoLossLARNativeSupplements.h857ff8dbe55756b8.CurrentAFT.CurrentCycleEntryProgram renaming bodyCount_eq → _p2mNativeSupplement109
open _root_.InfoLossLARNativeSupplements.h4b24203afd73c049.CurrentAFT.CurrentCycleEntryProgram renaming roots_mod_iff → CurrentAFT.CurrentCycleEntryProgram.roots_mod_iff
open _root_.InfoLossLARNativeSupplements.h4b24203afd73c049.CurrentAFT.CurrentCycleEntryProgram renaming roots_mod_iff → _p2mNativeSupplement110
open _root_.InfoLossLARNativeSupplements.h187f69822989eb63.CurrentAFT.CurrentCycleEntryProgram renaming selectedEntry_cast → CurrentAFT.CurrentCycleEntryProgram.selectedEntry_cast
open _root_.InfoLossLARNativeSupplements.h187f69822989eb63.CurrentAFT.CurrentCycleEntryProgram renaming selectedEntry_cast → _p2mNativeSupplement111
open _root_.InfoLossLARNativeSupplements.h9180bab9fc132623.CurrentAFT.CurrentCycleEntryProgram renaming selected_probability_source → CurrentAFT.CurrentCycleEntryProgram.selected_probability_source
open _root_.InfoLossLARNativeSupplements.h9180bab9fc132623.CurrentAFT.CurrentCycleEntryProgram renaming selected_probability_source → _p2mNativeSupplement112
open _root_.InfoLossLARNativeSupplements.hf7c0550335227b9c.CurrentAFT.CurrentGaussianBits renaming ratio_bounds → CurrentAFT.CurrentGaussianBits.ratio_bounds
open _root_.InfoLossLARNativeSupplements.hf7c0550335227b9c.CurrentAFT.CurrentGaussianBits renaming ratio_bounds → _p2mNativeSupplement113
open _root_.InfoLossLARNativeSupplements.ha029c925a85a9044.CurrentAFT.CurrentPublicShiftProgram renaming encode_value → CurrentAFT.CurrentPublicShiftProgram.encode_value
open _root_.InfoLossLARNativeSupplements.ha029c925a85a9044.CurrentAFT.CurrentPublicShiftProgram renaming encode_value → _p2mNativeSupplement114
open _root_.InfoLossLARNativeSupplements.h4ae04e3f1cb5b359.CurrentAFT.CurrentRootSlotIndex renaming tagPosition_eq → CurrentAFT.CurrentRootSlotIndex.tagPosition_eq
open _root_.InfoLossLARNativeSupplements.h4ae04e3f1cb5b359.CurrentAFT.CurrentRootSlotIndex renaming tagPosition_eq → _p2mNativeSupplement115
open _root_.InfoLossLARNativeSupplements.h20ee486b3d1dffd8.CurrentAFT.CyclePatternProgram renaming averagedEvaluate_cast → CurrentAFT.CyclePatternProgram.averagedEvaluate_cast
open _root_.InfoLossLARNativeSupplements.h20ee486b3d1dffd8.CurrentAFT.CyclePatternProgram renaming averagedEvaluate_cast → _p2mNativeSupplement116
open _root_.InfoLossLARNativeSupplements.hb37dd6f3dcea3b7d.CurrentAFT.CyclePatternProgram renaming evaluate_local → CurrentAFT.CyclePatternProgram.evaluate_local
open _root_.InfoLossLARNativeSupplements.hb37dd6f3dcea3b7d.CurrentAFT.CyclePatternProgram renaming evaluate_local → _p2mNativeSupplement117
open _root_.InfoLossLARNativeSupplements.h689ba464633d8cff.CurrentAFT.CyclePatternProgram renaming evaluate_semantics → CurrentAFT.CyclePatternProgram.evaluate_semantics
open _root_.InfoLossLARNativeSupplements.h689ba464633d8cff.CurrentAFT.CyclePatternProgram renaming evaluate_semantics → _p2mNativeSupplement118
open _root_.InfoLossLARNativeSupplements.hd02155c30f7ca58d.CurrentAFT.CyclePatternProgram renaming gaussianEvaluate_eq_windowEvaluate → CurrentAFT.CyclePatternProgram.gaussianEvaluate_eq_windowEvaluate
open _root_.InfoLossLARNativeSupplements.hd02155c30f7ca58d.CurrentAFT.CyclePatternProgram renaming gaussianEvaluate_eq_windowEvaluate → _p2mNativeSupplement119
open _root_.InfoLossLARNativeSupplements.hc532f8ed89f571a1.CurrentAFT.CyclePatternProgram renaming gaussianEvaluate_semantics → CurrentAFT.CyclePatternProgram.gaussianEvaluate_semantics
open _root_.InfoLossLARNativeSupplements.hc532f8ed89f571a1.CurrentAFT.CyclePatternProgram renaming gaussianEvaluate_semantics → _p2mNativeSupplement120
open _root_.InfoLossLARNativeSupplements.h3e1ece29cbe1b4d4.CurrentAFT.CyclePatternProgram renaming restricted_expectation → CurrentAFT.CyclePatternProgram.restricted_expectation
open _root_.InfoLossLARNativeSupplements.h3e1ece29cbe1b4d4.CurrentAFT.CyclePatternProgram renaming restricted_expectation → _p2mNativeSupplement121
open _root_.InfoLossLARNativeSupplements.h33993643e1712ab8.CurrentAFT.CycleRootExpansion renaming current_body_two_le → CurrentAFT.CycleRootExpansion.current_body_two_le
open _root_.InfoLossLARNativeSupplements.h33993643e1712ab8.CurrentAFT.CycleRootExpansion renaming current_body_two_le → _p2mNativeSupplement122
open _root_.InfoLossLARNativeSupplements.hd99e5f9e75bbb7e1.CurrentAFT.CycleSelections renaming averagedSelectedLaw_coordinate → CurrentAFT.CycleSelections.averagedSelectedLaw_coordinate
open _root_.InfoLossLARNativeSupplements.hd99e5f9e75bbb7e1.CurrentAFT.CycleSelections renaming averagedSelectedLaw_coordinate → _p2mNativeSupplement123
open _root_.InfoLossLARNativeSupplements.h788b7dba49e3cc6b.CurrentAFT.CycleSelections renaming selectedLaw_coordinate → CurrentAFT.CycleSelections.selectedLaw_coordinate
open _root_.InfoLossLARNativeSupplements.h788b7dba49e3cc6b.CurrentAFT.CycleSelections renaming selectedLaw_coordinate → _p2mNativeSupplement124
open _root_.InfoLossLARNativeSupplements.h8eafa7c1234de921.CurrentAFT.FullResponseEnumeration renaming mem_boundedSubsets → CurrentAFT.FullResponseEnumeration.mem_boundedSubsets
open _root_.InfoLossLARNativeSupplements.h8eafa7c1234de921.CurrentAFT.FullResponseEnumeration renaming mem_boundedSubsets → _p2mNativeSupplement125
open _root_.InfoLossLARNativeSupplements.h4d94229af05aca84.CurrentAFT.Parameters renaming modulus_eq_find → CurrentAFT.Parameters.modulus_eq_find
open _root_.InfoLossLARNativeSupplements.h4d94229af05aca84.CurrentAFT.Parameters renaming modulus_eq_find → _p2mNativeSupplement126
open _root_.InfoLossLARNativeSupplements.h7c8d9f04458b8eff.CurrentAFT.ProtectedCycle renaming cycleLaw_marginal → CurrentAFT.ProtectedCycle.cycleLaw_marginal
open _root_.InfoLossLARNativeSupplements.h7c8d9f04458b8eff.CurrentAFT.ProtectedCycle renaming cycleLaw_marginal → _p2mNativeSupplement127
open _root_.InfoLossLARNativeSupplements.ha0baf4dfdfb7707f.CurrentAFT.ProtectedCycle renaming cycleLaw_marginal_of_two_le → CurrentAFT.ProtectedCycle.cycleLaw_marginal_of_two_le
open _root_.InfoLossLARNativeSupplements.ha0baf4dfdfb7707f.CurrentAFT.ProtectedCycle renaming cycleLaw_marginal_of_two_le → _p2mNativeSupplement128
open _root_.InfoLossLARNativeSupplements.h94f62847a0770621.CurrentAFT.ProtectedCycle renaming independent_pair_law → CurrentAFT.ProtectedCycle.independent_pair_law
open _root_.InfoLossLARNativeSupplements.h94f62847a0770621.CurrentAFT.ProtectedCycle renaming independent_pair_law → _p2mNativeSupplement129
open _root_.InfoLossLARNativeSupplements.h2021c53cebcb97f7.CurrentAFT.RationalScalarFamilyAverage renaming current_eq_window_sum → CurrentAFT.RationalScalarFamilyAverage.current_eq_window_sum
open _root_.InfoLossLARNativeSupplements.h2021c53cebcb97f7.CurrentAFT.RationalScalarFamilyAverage renaming current_eq_window_sum → _p2mNativeSupplement130
open _root_.InfoLossLARNativeSupplements.h6473fbae786c301e.CurrentAFT.RootSignedMassProgram renaming referenceEntry_cast → CurrentAFT.RootSignedMassProgram.referenceEntry_cast
open _root_.InfoLossLARNativeSupplements.h6473fbae786c301e.CurrentAFT.RootSignedMassProgram renaming referenceEntry_cast → _p2mNativeSupplement131
open _root_.InfoLossLARNativeSupplements.h4c23fa31c2a53a0c.CurrentAFT.RootSignedMassProgram renaming singleton_probability → CurrentAFT.RootSignedMassProgram.singleton_probability
open _root_.InfoLossLARNativeSupplements.h4c23fa31c2a53a0c.CurrentAFT.RootSignedMassProgram renaming singleton_probability → _p2mNativeSupplement132
open _root_.InfoLossLARNativeSupplements.hb738544899c1bf50.CurrentAFT.TensorPublicProjection renaming independent_decision_expectation → CurrentAFT.TensorPublicProjection.independent_decision_expectation
open _root_.InfoLossLARNativeSupplements.hb738544899c1bf50.CurrentAFT.TensorPublicProjection renaming independent_decision_expectation → _p2mNativeSupplement133
open _root_.InfoLossLARNativeSupplements.hf2382f7ddc8e222e.AFT.RationalNumerics renaming natAbs_finset_sum_le → AFT.RationalNumerics.natAbs_finset_sum_le
open _root_.InfoLossLARNativeSupplements.hf2382f7ddc8e222e.AFT.RationalNumerics renaming natAbs_finset_sum_le → _p2mNativeSupplement134
open _root_.InfoLossLARNativeSupplements.h707562ec4bd11ae8.AFT.RationalNumerics.HeightBound renaming reduced_le → AFT.RationalNumerics.HeightBound.reduced_le
open _root_.InfoLossLARNativeSupplements.h707562ec4bd11ae8.AFT.RationalNumerics.HeightBound renaming reduced_le → _p2mNativeSupplement135
open _root_.InfoLossLARNativeSupplements.hd70d55bab6f2346d.CurrentAFT.CountedBoundedRootTags renaming bounded_sum → CurrentAFT.CountedBoundedRootTags.bounded_sum
open _root_.InfoLossLARNativeSupplements.hd70d55bab6f2346d.CurrentAFT.CountedBoundedRootTags renaming bounded_sum → _p2mNativeSupplement136
open _root_.InfoLossLARNativeSupplements.hb84db39a2a2ae627.CurrentAFT.CountedBoundedRootTags renaming flatMap_attach → CurrentAFT.CountedBoundedRootTags.flatMap_attach
open _root_.InfoLossLARNativeSupplements.hb84db39a2a2ae627.CurrentAFT.CountedBoundedRootTags renaming flatMap_attach → _p2mNativeSupplement137
open _root_.InfoLossLARNativeSupplements.he91e90e23380c2d0.CurrentAFT.JointTaggedPhysicalFock renaming law_nonempty → CurrentAFT.JointTaggedPhysicalFock.law_nonempty
open _root_.InfoLossLARNativeSupplements.he91e90e23380c2d0.CurrentAFT.JointTaggedPhysicalFock renaming law_nonempty → _p2mNativeSupplement138
section
set_option autoImplicit false
set_option maxHeartbeats 3000000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
namespace Integration9_9.TM2NativeRootGroupOrdinary
open AFT CurrentAFT CurrentAFT.ControlCoordinates GradedControlAlgebra
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeRootGroupAlgebra TM2NativeRootGroupSingleton
open scoped BigOperators
abbrev Meta := _root_.Integration9_9.TM2NativeFirstInverse.Meta
def referencePoint (x : _root_.Integration9_9.TM2NativeRootGroupOrdinary.Meta × ℕ) : ℚ := _root_.CurrentAFT.RootSignedMassProgram.referenceEntry x.1.1.length x.1.2.length x.2
@[fun_prop] theorem referencePoint_poly : Poly _root_.Integration9_9.TM2NativeRootGroupOrdinary.referencePoint := ⟨_root_.Integration9_9.TM2NativeRootGroupReference.currentProgram⟩
theorem mean_poly (order : ℕ) : _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order
(fun x : _root_.Integration9_9.TM2NativeRootGroupOrdinary.Meta × ℕ => _root_.CurrentAFT.RationalOrdinaryFamilyProgram.mean x.1.1.length x.1.2.length order x.2) := by
intro arity
let family := fun x : _root_.Integration9_9.TM2NativeRootGroupOrdinary.Meta × (ℕ × ℤ) => _root_.CurrentAFT.RationalOrdinaryFamilyProgram.atRoot x.1.1.length x.1.2.length order x.2.1 x.2.2
have hv : Poly (_root_.Integration9_9.TM2NativeRootGroupAlgebra.evaluate family arity) := _root_.Integration9_9.TM2NativeRootGroupSingleton.ordinary_atRoot_poly order arity
let term := fun x : (_root_.Integration9_9.TM2NativeRootGroupOrdinary.Meta × (ℕ × (List ℕ × List ℕ))) × ℕ => _root_.Integration9_9.TM2NativeRootGroupOrdinary.referencePoint (x.1.1,x.2)*
_root_.Integration9_9.TM2NativeRootGroupAlgebra.evaluate family arity ((x.1.1,(x.1.2.1,(x.2 : ℤ))),x.1.2.2)
have ht : Poly term := by unfold term; fun_prop
have hs := _root_.Integration9_9.TM2NativeRootGroupProfiles.palette_sum_poly ht
have hw : Poly (fun x : _root_.Integration9_9.TM2NativeRootGroupAlgebra.Query (_root_.Integration9_9.TM2NativeRootGroupOrdinary.Meta × ℕ) => _root_.Integration9_9.TM2NativeRootGroupProfiles.paletteSum term (x.1.1,(x.1.2,x.2))) := by fun_prop
exact hw
theorem current_poly (order : ℕ) : _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order
(fun x : _root_.Integration9_9.TM2NativeRootGroupOrdinary.Meta × (ℕ × ℤ) => _root_.CurrentAFT.RationalOrdinaryFamilyProgram.current x.1.1.length x.1.2.length order x.2.1 x.2.2) := by
have hi := (_root_.Integration9_9.TM2NativeRootGroupSingleton.ordinary_independent_poly order).comp (g := fun x : _root_.Integration9_9.TM2NativeRootGroupOrdinary.Meta × (ℕ × ℤ) => (x.1,x.2.1)) (by fun_prop)
have hm := (_root_.Integration9_9.TM2NativeRootGroupOrdinary.mean_poly order).comp (g := fun x : _root_.Integration9_9.TM2NativeRootGroupOrdinary.Meta × (ℕ × ℤ) => (x.1,x.2.1)) (by fun_prop)
exact (hi.add (_root_.Integration9_9.TM2NativeRootGroupSingleton.ordinary_atRoot_poly order)).sub hm
end Integration9_9.TM2NativeRootGroupOrdinary
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.RationalLegMassProgram
end CurrentAFT.RationalLegMassProgram
namespace CurrentAFT.RationalLegMassProgram.difference
end CurrentAFT.RationalLegMassProgram.difference
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.TM2NativeRootGroupLegMass
open AFT AFT.RationalNumerics AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeRootGroupProfiles TM2NativeRootGroupGaussian TM2NativeRootGroupMass
open TM2NativeRootGroupOrdinary
open scoped BigOperators
abbrev Meta := _root_.Integration9_9.TM2NativeFirstInverse.Meta
def fixed (x : _root_.Integration9_9.TM2NativeRootGroupLegMass.Meta × ((ℤ × ℤ) × List ℕ)) : ℚ := _root_.CurrentAFT.RationalLegMassProgram.fixed
x.1.1.length x.1.2.length x.2.1.1 x.2.1.2 (fun i => x.2.2[i.val]?.getD 0)
@[fun_prop] theorem fixed_poly : Poly _root_.Integration9_9.TM2NativeRootGroupLegMass.fixed := by
have hl : Poly (fun x : (_root_.Integration9_9.TM2NativeRootGroupLegMass.Meta × ((ℤ × ℤ) × List ℕ)) × ℕ =>
_root_.Integration9_9.TM2NativeRootGroupMass.fixedPositive (x.1.1,((0,(x.1.2.1.1,x.1.2.1.2)),x.2::x.1.2.2))) := by fun_prop
refine ⟨(_root_.Integration9_9.TM2NativeRootGroupProfiles.palette_sum_poly hl).program.congr _ (fun x => ?_)⟩
unfold _root_.Integration9_9.TM2NativeRootGroupProfiles.paletteSum _root_.Integration9_9.TM2NativeRootGroupLegMass.fixed _root_.CurrentAFT.RationalLegMassProgram.fixed
apply Finset.sum_congr rfl
intro comp _
unfold _root_.Integration9_9.TM2NativeRootGroupMass.fixedPositive
apply congrArg (_root_.CurrentAFT.RationalPositiveReferenceProgram.fixedMass x.1.1.length x.1.2.length 0 x.2.1.1 x.2.1.2)
funext i
fin_cases i <;> rfl
def atRoot (x : _root_.Integration9_9.TM2NativeRootGroupLegMass.Meta × (ℤ × List ℕ)) : ℚ := _root_.CurrentAFT.RationalLegMassProgram.atRoot
x.1.1.length x.1.2.length x.2.1 (fun i => x.2.2[i.val]?.getD 0)
@[fun_prop] theorem atRoot_poly : Poly _root_.Integration9_9.TM2NativeRootGroupLegMass.atRoot := by
have hl : Poly (fun x : (_root_.Integration9_9.TM2NativeRootGroupLegMass.Meta × (ℤ × List ℕ)) × ℤ => _root_.Integration9_9.TM2NativeRootGroupLegMass.fixed (x.1.1,((x.1.2.1,x.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 mean (x : _root_.Integration9_9.TM2NativeRootGroupLegMass.Meta × List ℕ) : ℚ := _root_.CurrentAFT.RationalLegMassProgram.mean
x.1.1.length x.1.2.length (fun i => x.2[i.val]?.getD 0)
@[fun_prop] theorem mean_poly : Poly _root_.Integration9_9.TM2NativeRootGroupLegMass.mean := by
have hl : Poly (fun x : (_root_.Integration9_9.TM2NativeRootGroupLegMass.Meta × List ℕ) × ℕ => _root_.Integration9_9.TM2NativeRootGroupOrdinary.referencePoint (x.1.1,x.2)*_root_.Integration9_9.TM2NativeRootGroupLegMass.atRoot (x.1.1,((x.2 : ℤ),x.1.2))) := by fun_prop
exact _root_.Integration9_9.TM2NativeRootGroupProfiles.palette_sum_poly hl
def difference (x : _root_.Integration9_9.TM2NativeRootGroupLegMass.Meta × (ℤ × List ℕ)) : ℚ := _root_.CurrentAFT.RationalLegMassProgram.difference
x.1.1.length x.1.2.length x.2.1 (fun i => x.2.2[i.val]?.getD 0)
@[fun_prop] theorem difference_poly : Poly _root_.Integration9_9.TM2NativeRootGroupLegMass.difference := by
change Poly (fun x : _root_.Integration9_9.TM2NativeRootGroupLegMass.Meta × (ℤ × List ℕ) => _root_.Integration9_9.TM2NativeRootGroupLegMass.atRoot x - _root_.Integration9_9.TM2NativeRootGroupLegMass.mean (x.1,x.2.2))
fun_prop
end Integration9_9.TM2NativeRootGroupLegMass
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.RationalPositiveFamilyProgram
end CurrentAFT.RationalPositiveFamilyProgram
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.TM2NativeRootGroupPrimary
open AFT AFT.RationalNumerics AFT.BinaryArithmetic CurrentAFT
open CurrentAFT.ControlCoordinates GradedControlAlgebra
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeRootGroupAlgebra TM2NativeRootGroupCoefficient
open scoped BigOperators
abbrev Meta := _root_.Integration9_9.TM2NativeFirstInverse.Meta
def coefficient (selected : Finset (Fin 4)) (x : _root_.Integration9_9.TM2NativeRootGroupPrimary.Meta × List ℕ) : ℚ :=
_root_.CurrentAFT.RationalPositiveFamilyProgram.coefficient x.1.1.length x.1.2.length selected (fun i => x.2[i.val]?.getD 0)
@[fun_prop] theorem coefficient_poly (selected : Finset (Fin 4)) : Poly (_root_.Integration9_9.TM2NativeRootGroupPrimary.coefficient selected) := by
let mass := fun x : (_root_.Integration9_9.TM2NativeRootGroupPrimary.Meta × Unit) × List ℕ => _root_.Integration9_9.TM2NativeRootGroupMass.positiveMass (x.1.1,x.2)
have hm : Poly mass := by unfold mass; fun_prop
have h : Poly (fun x : _root_.Integration9_9.TM2NativeRootGroupPrimary.Meta × List ℕ => _root_.Integration9_9.TM2NativeRootGroupCoefficient.selectedKernel 4 selected mass ((x.1,()),x.2)) := by fun_prop
refine ⟨h.program.congr _ (fun x => ?_)⟩
rw [_root_.Integration9_9.TM2NativeRootGroupCoefficient.selectedKernel_four]
simp only [mass,_root_.Integration9_9.TM2NativeRootGroupMass.positiveMass,List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some]
rfl
abbrev PrimaryData := (ℤ × ℤ) × ℕ
def primaryColumn (selected : Finset (Fin 4)) (x : (_root_.Integration9_9.TM2NativeRootGroupPrimary.Meta × _root_.Integration9_9.TM2NativeRootGroupPrimary.PrimaryData) × List ℕ) : ℚ :=
_root_.CurrentAFT.RationalPrimaryColumnProgram.current x.1.1.1.length x.1.1.2.length x.1.2.1.1 x.1.2.1.2 x.1.2.2
selected (fun i => x.2[i.val]?.getD 0)
@[fun_prop] theorem primaryColumn_poly (selected : Finset (Fin 4)) : Poly (_root_.Integration9_9.TM2NativeRootGroupPrimary.primaryColumn selected) := by
let mass := fun x : (_root_.Integration9_9.TM2NativeRootGroupPrimary.Meta × _root_.Integration9_9.TM2NativeRootGroupPrimary.PrimaryData) × List ℕ => _root_.Integration9_9.TM2NativeRootGroupMass.primaryMass (x.1.1,(x.1.2,x.2))
have hm : Poly mass := by unfold mass;fun_prop
refine ⟨(_root_.Integration9_9.TM2NativeRootGroupCoefficient.selectedKernel_poly 4 selected hm).program.congr _ (fun x => ?_)⟩
rw [_root_.Integration9_9.TM2NativeRootGroupCoefficient.selectedKernel_four]
simp only [mass,_root_.Integration9_9.TM2NativeRootGroupMass.primaryMass,List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some]
rfl
theorem insert_poly {α : Type} [Coding α] (order : ℕ) (selected : Finset (Fin 4))
(f : α → (Fin selected.card → ℕ) → ℚ)
(hf : Poly (fun x : α × List ℕ => f x.1 (fun i => x.2[i.val]?.getD 0))) :
_root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order (fun x => _root_.CurrentAFT.RationalLocalFamilyProgram.insertSelected order selected (f x)) := by
intro arity
unfold _root_.Integration9_9.TM2NativeRootGroupAlgebra.evaluate _root_.CurrentAFT.RationalLocalFamilyProgram.insertSelected
by_cases h : selected.card=arity.val.1.val ∧ 0=arity.val.2.val
· simp only [dif_pos h]
have hw := _root_.Integration9_9.TM2NativeRootGroupAlgebra.tuple_poly (fun i (x : _root_.Integration9_9.TM2NativeRootGroupAlgebra.Query α) => x.2.1[(finCongr h.1 i).val]?.getD 0) (by intro i;fun_prop)
have hh := Automatic.Poly.comp (f := fun x : α × List ℕ => f x.1 (fun i => x.2[i.val]?.getD 0))
(g := fun x : _root_.Integration9_9.TM2NativeRootGroupAlgebra.Query α => (x.1,List.ofFn (fun i => x.2.1[(finCongr h.1 i).val]?.getD 0))) hf (by fun_prop)
simpa only [List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some,Function.comp_def] using hh
· simp only [dif_neg h]
exact Automatic.Poly.const 0
theorem positive_poly (order : ℕ) : _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order
(fun x : _root_.Integration9_9.TM2NativeRootGroupPrimary.Meta => _root_.CurrentAFT.RationalPositiveFamilyProgram.positive x.1.length x.2.length order) := by
have hs := _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly.sum (α := _root_.Integration9_9.TM2NativeRootGroupPrimary.Meta) (order := order) ((Finset.univ : Finset (Finset (Fin 4))).erase ∅)
(fun selected (x : _root_.Integration9_9.TM2NativeRootGroupPrimary.Meta) => _root_.CurrentAFT.RationalLocalFamilyProgram.insertSelected order selected
(_root_.CurrentAFT.RationalPositiveFamilyProgram.coefficient x.1.length x.2.length selected))
(fun selected _ => by
apply _root_.Integration9_9.TM2NativeRootGroupPrimary.insert_poly (α := _root_.Integration9_9.TM2NativeRootGroupPrimary.Meta) order selected
change Poly (_root_.Integration9_9.TM2NativeRootGroupPrimary.coefficient selected)
exact _root_.Integration9_9.TM2NativeRootGroupPrimary.coefficient_poly selected)
exact _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly.unit.add hs
theorem inverse_poly (order : ℕ) : _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order
(fun x : _root_.Integration9_9.TM2NativeRootGroupPrimary.Meta => _root_.CurrentAFT.RationalPositiveFamilyProgram.inverse x.1.length x.2.length order) :=
(_root_.Integration9_9.TM2NativeRootGroupPrimary.positive_poly order).reciprocal
theorem numerator_poly (order : ℕ) : _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order
(fun x : _root_.Integration9_9.TM2NativeRootGroupPrimary.Meta × _root_.Integration9_9.TM2NativeRootGroupPrimary.PrimaryData => _root_.CurrentAFT.RationalLocalFamilyProgram.numerator
x.1.1.length x.1.2.length order x.2.1.1 x.2.1.2 x.2.2) := by
apply _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly.sum
intro selected _
apply _root_.Integration9_9.TM2NativeRootGroupPrimary.insert_poly (α := _root_.Integration9_9.TM2NativeRootGroupPrimary.Meta × _root_.Integration9_9.TM2NativeRootGroupPrimary.PrimaryData) order selected
change Poly (_root_.Integration9_9.TM2NativeRootGroupPrimary.primaryColumn selected)
exact _root_.Integration9_9.TM2NativeRootGroupPrimary.primaryColumn_poly selected
theorem primaryChannel_poly (order : ℕ) : _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order
(fun x : _root_.Integration9_9.TM2NativeRootGroupPrimary.Meta × _root_.Integration9_9.TM2NativeRootGroupPrimary.PrimaryData => _root_.CurrentAFT.RationalPositiveFamilyProgram.primaryChannel
x.1.1.length x.1.2.length order x.2.1.1 x.2.1.2 x.2.2) :=
(_root_.Integration9_9.TM2NativeRootGroupPrimary.numerator_poly order).product ((_root_.Integration9_9.TM2NativeRootGroupPrimary.inverse_poly order).comp (g := fun x : _root_.Integration9_9.TM2NativeRootGroupPrimary.Meta × _root_.Integration9_9.TM2NativeRootGroupPrimary.PrimaryData => x.1) (by fun_prop))
end Integration9_9.TM2NativeRootGroupPrimary
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.RationalUnselectedLegProgram
end CurrentAFT.RationalUnselectedLegProgram
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.TM2NativeRootGroupLeg
open AFT AFT.RationalNumerics AFT.BinaryArithmetic CurrentAFT
open CurrentAFT.ControlCoordinates GradedControlAlgebra
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeRootGroupAlgebra TM2NativeRootGroupCoefficient
open scoped BigOperators
abbrev Meta := _root_.Integration9_9.TM2NativeFirstInverse.Meta
def coefficient (selected : Finset (Fin 3)) (x : _root_.Integration9_9.TM2NativeRootGroupLeg.Meta × List ℕ) : ℚ :=
_root_.CurrentAFT.RationalLegCoefficientExtraction.selectedKernel x.1.1.length x.1.2.length
(_root_.CurrentAFT.RationalLegMassProgram.mean x.1.1.length x.1.2.length) selected (fun i => x.2[i.val]?.getD 0)
@[fun_prop] theorem coefficient_poly (selected : Finset (Fin 3)) : Poly (_root_.Integration9_9.TM2NativeRootGroupLeg.coefficient selected) := by
let mass := fun x : (_root_.Integration9_9.TM2NativeRootGroupLeg.Meta × Unit) × List ℕ => _root_.Integration9_9.TM2NativeRootGroupLegMass.mean (x.1.1,x.2)
have hm : Poly mass := by unfold mass;fun_prop
have h : Poly (fun x : _root_.Integration9_9.TM2NativeRootGroupLeg.Meta × List ℕ => _root_.Integration9_9.TM2NativeRootGroupCoefficient.selectedKernel 3 selected mass ((x.1,()),x.2)) := by fun_prop
refine ⟨h.program.congr _ (fun x => ?_)⟩
rw [_root_.Integration9_9.TM2NativeRootGroupCoefficient.selectedKernel_three]
simp only [mass,_root_.Integration9_9.TM2NativeRootGroupLegMass.mean,List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some]
rfl
def differenceCoefficient (selected : Finset (Fin 3)) (x : (_root_.Integration9_9.TM2NativeRootGroupLeg.Meta × ℤ) × List ℕ) : ℚ :=
_root_.CurrentAFT.RationalLegCoefficientExtraction.selectedKernel x.1.1.1.length x.1.1.2.length
(_root_.CurrentAFT.RationalLegMassProgram.difference x.1.1.1.length x.1.1.2.length x.1.2) selected (fun i => x.2[i.val]?.getD 0)
@[fun_prop] theorem differenceCoefficient_poly (selected : Finset (Fin 3)) : Poly (_root_.Integration9_9.TM2NativeRootGroupLeg.differenceCoefficient selected) := by
let mass := fun x : (_root_.Integration9_9.TM2NativeRootGroupLeg.Meta × ℤ) × List ℕ => _root_.Integration9_9.TM2NativeRootGroupLegMass.difference (x.1.1,(x.1.2,x.2))
have hm : Poly mass := by unfold mass;fun_prop
refine ⟨(_root_.Integration9_9.TM2NativeRootGroupCoefficient.selectedKernel_poly 3 selected hm).program.congr _ (fun x => ?_)⟩
rw [_root_.Integration9_9.TM2NativeRootGroupCoefficient.selectedKernel_three]
simp only [mass,_root_.Integration9_9.TM2NativeRootGroupLegMass.difference,List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some]
rfl
theorem insert_poly {α : Type} [Coding α] (order : ℕ) (selected : Finset (Fin 3))
(f : α → (Fin selected.card → ℕ) → ℚ)
(hf : Poly (fun x : α × List ℕ => f x.1 (fun i => x.2[i.val]?.getD 0))) :
_root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order (fun x => _root_.CurrentAFT.RationalLegFamilyTable.insertSelected order selected (f x)) := by
intro arity
unfold _root_.Integration9_9.TM2NativeRootGroupAlgebra.evaluate _root_.CurrentAFT.RationalLegFamilyTable.insertSelected
by_cases h : selected.card=arity.val.1.val ∧ 0=arity.val.2.val
· simp only [dif_pos h]
have hw := _root_.Integration9_9.TM2NativeRootGroupAlgebra.tuple_poly (fun i (x : _root_.Integration9_9.TM2NativeRootGroupAlgebra.Query α) => x.2.1[(finCongr h.1 i).val]?.getD 0) (by intro i;fun_prop)
have hh := Automatic.Poly.comp (f := fun x : α × List ℕ => f x.1 (fun i => x.2[i.val]?.getD 0))
(g := fun x : _root_.Integration9_9.TM2NativeRootGroupAlgebra.Query α => (x.1,List.ofFn (fun i => x.2.1[(finCongr h.1 i).val]?.getD 0))) hf (by fun_prop)
simpa only [List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some,Function.comp_def] using hh
· simp only [dif_neg h]
exact Automatic.Poly.const 0
theorem positive_poly (order : ℕ) : _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order
(fun x : _root_.Integration9_9.TM2NativeRootGroupLeg.Meta => _root_.CurrentAFT.RationalUnselectedLegProgram.positive x.1.length x.2.length order) := by
have hs := _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly.sum (α := _root_.Integration9_9.TM2NativeRootGroupLeg.Meta) (order := order) ((Finset.univ : Finset (Finset (Fin 3))).erase ∅)
(fun selected (x : _root_.Integration9_9.TM2NativeRootGroupLeg.Meta) => _root_.CurrentAFT.RationalLegFamilyTable.insertSelected order selected
(_root_.CurrentAFT.RationalLegCoefficientExtraction.selectedKernel x.1.length x.2.length
(_root_.CurrentAFT.RationalLegMassProgram.mean x.1.length x.2.length) selected))
(fun selected _ => by
apply _root_.Integration9_9.TM2NativeRootGroupLeg.insert_poly (α := _root_.Integration9_9.TM2NativeRootGroupLeg.Meta) order selected
change Poly (_root_.Integration9_9.TM2NativeRootGroupLeg.coefficient selected)
exact _root_.Integration9_9.TM2NativeRootGroupLeg.coefficient_poly selected)
exact _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly.unit.add hs
theorem inverse_poly (order : ℕ) : _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order
(fun x : _root_.Integration9_9.TM2NativeRootGroupLeg.Meta => _root_.CurrentAFT.RationalUnselectedLegProgram.inverse x.1.length x.2.length order) :=
(_root_.Integration9_9.TM2NativeRootGroupLeg.positive_poly order).reciprocal
theorem higher_poly (order : ℕ) : _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order
(fun x : _root_.Integration9_9.TM2NativeRootGroupLeg.Meta × ℤ => _root_.CurrentAFT.RationalUnselectedLegProgram.higher x.1.1.length x.1.2.length order x.2) := by
unfold _root_.CurrentAFT.RationalUnselectedLegProgram.higher _root_.CurrentAFT.RationalLegFamilyTable.higher
apply _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly.sum
intro selected _
apply _root_.Integration9_9.TM2NativeRootGroupLeg.insert_poly (α := _root_.Integration9_9.TM2NativeRootGroupLeg.Meta × ℤ) order selected
change Poly (_root_.Integration9_9.TM2NativeRootGroupLeg.differenceCoefficient selected)
exact _root_.Integration9_9.TM2NativeRootGroupLeg.differenceCoefficient_poly selected
theorem numerator_poly (order : ℕ) : _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order
(fun x : _root_.Integration9_9.TM2NativeRootGroupLeg.Meta × ℤ => _root_.CurrentAFT.RationalUnselectedLegProgram.numerator x.1.1.length x.1.2.length order x.2) := by
have hf := (_root_.Integration9_9.TM2NativeRootGroupSingleton.first_poly order .attachment).comp
(g := fun x : _root_.Integration9_9.TM2NativeRootGroupLeg.Meta × ℤ => (x.1,((0 : ℤ),x.2))) (by fun_prop)
exact hf.add (_root_.Integration9_9.TM2NativeRootGroupLeg.higher_poly order)
theorem current_poly (order : ℕ) : _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order
(fun x : _root_.Integration9_9.TM2NativeRootGroupLeg.Meta × ℤ => _root_.CurrentAFT.RationalUnselectedLegProgram.current x.1.1.length x.1.2.length order x.2) :=
(_root_.Integration9_9.TM2NativeRootGroupLeg.numerator_poly order).product ((_root_.Integration9_9.TM2NativeRootGroupLeg.inverse_poly order).comp (g := fun x : _root_.Integration9_9.TM2NativeRootGroupLeg.Meta × ℤ => x.1) (by fun_prop))
end Integration9_9.TM2NativeRootGroupLeg
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.BinaryRootGroupProgram
end CurrentAFT.BinaryRootGroupProgram
namespace CurrentAFT.BinaryRootGroupProgram.Data
end CurrentAFT.BinaryRootGroupProgram.Data
namespace CurrentAFT.BinaryRootGroupProgram.Data.mk
end CurrentAFT.BinaryRootGroupProgram.Data.mk
namespace CurrentAFT.BinaryRootGroupProgram.heightPolynomial
end CurrentAFT.BinaryRootGroupProgram.heightPolynomial
namespace CurrentAFT.BinaryRootGroupProgram.localTable
end CurrentAFT.BinaryRootGroupProgram.localTable
namespace CurrentAFT.BinaryRootGroupProgram.primary
end CurrentAFT.BinaryRootGroupProgram.primary
namespace CurrentAFT.BinaryRootGroupProgram.workPolynomial
end CurrentAFT.BinaryRootGroupProgram.workPolynomial
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.TM2NativeRootGroup
open AFT AFT.RationalNumerics AFT.BinaryArithmetic CurrentAFT
open CurrentAFT.ControlCoordinates GradedControlAlgebra
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeRootGroupAlgebra TM2NativeFiniteSeries
open RationalRootGroupProgram (LocalRole)
attribute [local irreducible] RationalPositiveFamilyProgram.primaryChannel RationalOrdinaryFamilyProgram.current RationalUnselectedLegProgram.current RationalSingletonProgram.current
abbrev Meta := _root_.Integration9_9.TM2NativeFirstInverse.Meta
abbrev Data := _root_.Integration9_9.TM2NativeRootGroup.Meta × (ℤ × List ℕ)
def localTable (order : ℕ) (role : _root_.CurrentAFT.RationalRootGroupProgram.LocalRole) (x : _root_.Integration9_9.TM2NativeRootGroup.Data) : _root_.CurrentAFT.RationalFamilyProductProgram.Table ℚ ℕ ℕ order :=
_root_.CurrentAFT.RationalRootGroupProgram.localTable x.1.1.length x.1.2.length order x.2.1 role (fun i => x.2.2[i.val]?.getD 0)
theorem localTable_poly (order : ℕ) (role : _root_.CurrentAFT.RationalRootGroupProgram.LocalRole) : _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order (_root_.Integration9_9.TM2NativeRootGroup.localTable order role) := by
change _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order (fun x : _root_.Integration9_9.TM2NativeRootGroup.Data => _root_.CurrentAFT.RationalRootGroupProgram.localTable x.1.1.length x.1.2.length order x.2.1 role (fun i => x.2.2[i.val]?.getD 0))
cases role with
| primary =>
change _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order (fun x : _root_.Integration9_9.TM2NativeRootGroup.Data => _root_.CurrentAFT.RationalPositiveFamilyProgram.primaryChannel x.1.1.length x.1.2.length order ((x.2.2[0]?.getD 0 : ℕ) : ℤ) ((x.2.2[1]?.getD 0 : ℕ) : ℤ) (x.2.2[2]?.getD 0))
exact (_root_.Integration9_9.TM2NativeRootGroupPrimary.primaryChannel_poly order).comp
(g := fun x : _root_.Integration9_9.TM2NativeRootGroup.Data => (x.1,(((x.2.2[0]?.getD 0 : ℕ) : ℤ),((x.2.2[1]?.getD 0 : ℕ) : ℤ)),x.2.2[2]?.getD 0)) (by fun_prop)
| ordinary =>
change _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order (fun x : _root_.Integration9_9.TM2NativeRootGroup.Data => _root_.CurrentAFT.RationalOrdinaryFamilyProgram.current x.1.1.length x.1.2.length order (x.2.2[1]?.getD 0) ((x.2.2[0]?.getD 0 : ℕ) : ℤ))
exact (_root_.Integration9_9.TM2NativeRootGroupOrdinary.current_poly order).comp
(g := fun x : _root_.Integration9_9.TM2NativeRootGroup.Data => (x.1,(x.2.2[1]?.getD 0,((x.2.2[0]?.getD 0 : ℕ) : ℤ)))) (by fun_prop)
| leg =>
change _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order (fun x : _root_.Integration9_9.TM2NativeRootGroup.Data => _root_.CurrentAFT.RationalUnselectedLegProgram.current x.1.1.length x.1.2.length order ((x.2.2[0]?.getD 0 : ℕ) : ℤ))
exact (_root_.Integration9_9.TM2NativeRootGroupLeg.current_poly order).comp
(g := fun x : _root_.Integration9_9.TM2NativeRootGroup.Data => (x.1,((x.2.2[0]?.getD 0 : ℕ) : ℤ))) (by fun_prop)
| center =>
change _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order (fun x : _root_.Integration9_9.TM2NativeRootGroup.Data => _root_.CurrentAFT.RationalSingletonProgram.current x.1.1.length x.1.2.length order .free x.2.1 ((x.2.2[0]?.getD 0 : ℕ) : ℤ))
exact (_root_.Integration9_9.TM2NativeRootGroupSingleton.current_poly order .free).comp
(g := fun x : _root_.Integration9_9.TM2NativeRootGroup.Data => (x.1,(x.2.1,((x.2.2[0]?.getD 0 : ℕ) : ℤ)))) (by fun_prop)
| queue =>
change _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order (fun x : _root_.Integration9_9.TM2NativeRootGroup.Data => _root_.CurrentAFT.RationalSingletonProgram.current x.1.1.length x.1.2.length order .queue x.2.1 ((x.2.2[0]?.getD 0 : ℕ) : ℤ))
exact (_root_.Integration9_9.TM2NativeRootGroupSingleton.current_poly order .queue).comp
(g := fun x : _root_.Integration9_9.TM2NativeRootGroup.Data => (x.1,(x.2.1,((x.2.2[0]?.getD 0 : ℕ) : ℤ)))) (by fun_prop)
structure Context (order : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) where
security : List Unit
precision : List Unit
queue : _root_.AFT.BinaryArithmetic.IntegerBits
source : Vector (Fin (_root_.CurrentAFT.BinaryRootGroupProgram.colors security.length)) 3
inputs : Vector ℕ arity.val.1.val
centers : Vector ℕ arity.val.2.val
input_bound : ∀ i,inputs.get i<_root_.CurrentAFT.BinaryRootGroupProgram.colors security.length
center_bound : ∀ i,centers.get i<_root_.CurrentAFT.BinaryRootGroupProgram.colors security.length
end Integration9_9.TM2NativeRootGroup
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.BinaryTouchedCycleBuffer
end CurrentAFT.BinaryTouchedCycleBuffer
namespace CurrentAFT.BinaryTouchedCycleBuffer.lookup
end CurrentAFT.BinaryTouchedCycleBuffer.lookup
namespace CurrentAFT.BinaryTouchedCycleRanks
end CurrentAFT.BinaryTouchedCycleRanks
namespace CurrentAFT.BinaryTouchedCycleRanks.positions
end CurrentAFT.BinaryTouchedCycleRanks.positions
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.TM2NativeCycleTouched
open AFT CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeRootGroupAlgebra
def contains (x : ℕ × List ℕ) : Bool := decide (x.2.findIdx (fun n => decide (n=x.1))<x.2.length)
@[fun_prop] theorem contains_poly : Poly _root_.Integration9_9.TM2NativeCycleTouched.contains := by unfold _root_.Integration9_9.TM2NativeCycleTouched.contains;fun_prop
theorem contains_iff (n : ℕ) (xs : List ℕ) : _root_.Integration9_9.TM2NativeCycleTouched.contains (n,xs)=true ↔ n∈xs := by
simp only [_root_.Integration9_9.TM2NativeCycleTouched.contains,decide_eq_true_eq,List.findIdx_lt_length,decide_eq_true_eq]
exact ⟨fun ⟨x,hx,h⟩ => h ▸ hx,fun h => ⟨n,h,rfl⟩⟩
def unique : ℕ → List ℕ → List ℕ
| 0,_ => []
| k+1,xs => if xs.isEmpty then [] else
let rest := unique k xs.tail
let head := xs[0]?.getD 0
if _root_.Integration9_9.TM2NativeCycleTouched.contains (head,rest) then rest else head::rest
@[fun_prop] theorem unique_poly (k : ℕ) : Poly (_root_.Integration9_9.TM2NativeCycleTouched.unique k) := by
induction k with
| zero => exact Automatic.Poly.const []
| succ k ih =>
change Poly (fun xs : List ℕ => if xs.isEmpty then [] else
let rest := _root_.Integration9_9.TM2NativeCycleTouched.unique k xs.tail
let head := xs[0]?.getD 0
if _root_.Integration9_9.TM2NativeCycleTouched.contains (head,rest) then rest else head::rest)
fun_prop
theorem contains_native {body : ℕ} (p : Fin body) (xs : List (Fin body)) :
_root_.Integration9_9.TM2NativeCycleTouched.contains (p.val,xs.map Fin.val)=(_root_.CurrentAFT.BinaryTouchedCycle.contains p xs).value := by
apply Bool.eq_iff_iff.mpr
rw [_root_.Integration9_9.TM2NativeCycleTouched.contains_iff,_root_.CurrentAFT.BinaryTouchedCycle.contains_value,List.mem_map]
constructor
· rintro ⟨q,hq,he⟩
exact (Fin.ext he) ▸ hq
· intro hp
exact ⟨p,hp,rfl⟩
theorem unique_native {body : ℕ} (k : ℕ) (xs : List (Fin body)) (hk : xs.length≤k) :
_root_.Integration9_9.TM2NativeCycleTouched.unique k (xs.map Fin.val)=(_root_.CurrentAFT.BinaryTouchedCycle.unique xs).value.map Fin.val := by
induction k generalizing xs with
| zero => have hx : xs=[] := List.eq_nil_of_length_eq_zero (by omega);subst xs;rfl
| succ k ih =>
cases xs with
| nil => rfl
| cons p xs =>
have ht : xs.length≤k := by simp only [List.length_cons] at hk;omega
simp only [List.map_cons,_root_.Integration9_9.TM2NativeCycleTouched.unique,List.isEmpty_cons,Bool.false_eq_true,ite_false,List.tail_cons,List.getElem?_cons_zero,Option.getD_some,
ih xs ht,_root_.Integration9_9.TM2NativeCycleTouched.contains_native,_root_.CurrentAFT.BinaryTouchedCycle.unique]
split_ifs <;> rfl
def previous (x : ℕ × ℕ) : ℕ := if x.2=0 then x.1-1 else x.2-1
@[fun_prop] theorem previous_poly : Poly _root_.Integration9_9.TM2NativeCycleTouched.previous := by unfold _root_.Integration9_9.TM2NativeCycleTouched.previous;fun_prop
theorem previous_value {body : ℕ} (hb : 0<body) (p : Fin body) :
_root_.Integration9_9.TM2NativeCycleTouched.previous (body,p.val)=((finRotate body).symm p).val := by
rw [← _root_.CurrentAFT.BinaryTouchedCycle.previous_value body hb p]
unfold _root_.Integration9_9.TM2NativeCycleTouched.previous _root_.CurrentAFT.BinaryTouchedCycle.previous
simp only [_root_.AFT.BinaryArithmetic.equalCounter_value,_root_.AFT.BinaryArithmetic.subtractCounter_value]
split_ifs <;> rfl
def candidates (count : ℕ) (x : ℕ × List ℕ) : List ℕ :=
(List.ofFn (fun i : Fin count => [x.2[i.val]?.getD 0,_root_.Integration9_9.TM2NativeCycleTouched.previous (x.1,x.2[i.val]?.getD 0)])).flatten
@[fun_prop] theorem candidates_poly (count : ℕ) : Poly (_root_.Integration9_9.TM2NativeCycleTouched.candidates count) := by
have ht := _root_.Integration9_9.TM2NativeRootGroupAlgebra.tuple_poly (fun i : Fin count => fun (x : ℕ × List ℕ) => [x.2[i.val]?.getD 0,_root_.Integration9_9.TM2NativeCycleTouched.previous (x.1,x.2[i.val]?.getD 0)])
(by intro i;fun_prop)
have h : Poly (fun x : ℕ × List ℕ => (List.ofFn (fun i : Fin count =>
[x.2[i.val]?.getD 0,_root_.Integration9_9.TM2NativeCycleTouched.previous (x.1,x.2[i.val]?.getD 0)])).flatMap id) := by fun_prop
refine ⟨h.program.congr _ (fun x => ?_)⟩
simp only [List.flatMap_def,List.map_id,_root_.Integration9_9.TM2NativeCycleTouched.candidates]
theorem candidates_native {body count : ℕ} (hb : 0<body) (sites : Vector (Fin body) count) :
_root_.Integration9_9.TM2NativeCycleTouched.candidates count (body,List.ofFn (fun i => (sites.get i).val))=(_root_.CurrentAFT.BinaryTouchedCycle.candidates hb sites).value.map Fin.val := by
rw [_root_.CurrentAFT.BinaryTouchedCycle.candidates_value]
simp only [_root_.Integration9_9.TM2NativeCycleTouched.candidates]
simp only [List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some,_root_.Integration9_9.TM2NativeCycleTouched.previous_value]
simp only [List.ofFn_eq_map,List.flatMap_def,List.map_flatten,List.map_map,Function.comp_def,List.map_cons,List.map_nil]
apply congrArg List.flatten
apply congrArg (fun f => List.map f (List.finRange count))
funext i
change [(sites.get i).val,_root_.Integration9_9.TM2NativeCycleTouched.previous (body,(sites.get i).val)]=[(sites.get i).val,((finRotate body).symm (sites.get i)).val]
rw [_root_.Integration9_9.TM2NativeCycleTouched.previous_value hb]
def prepare (count : ℕ) (x : ℕ × List ℕ) : List ℕ := _root_.Integration9_9.TM2NativeCycleTouched.unique (2*count) (_root_.Integration9_9.TM2NativeCycleTouched.candidates count x)
@[fun_prop] theorem prepare_poly (count : ℕ) : Poly (_root_.Integration9_9.TM2NativeCycleTouched.prepare count) := by unfold _root_.Integration9_9.TM2NativeCycleTouched.prepare;fun_prop
theorem prepare_native {body count : ℕ} (hb : 0<body) (sites : Vector (Fin body) count) :
_root_.Integration9_9.TM2NativeCycleTouched.prepare count (body,List.ofFn (fun i => (sites.get i).val))=(_root_.CurrentAFT.BinaryTouchedCycle.prepare hb sites).value.map Fin.val := by
rw [_root_.Integration9_9.TM2NativeCycleTouched.prepare,_root_.Integration9_9.TM2NativeCycleTouched.candidates_native hb sites,_root_.Integration9_9.TM2NativeCycleTouched.unique_native _ _ (le_of_eq (_root_.InfoLossLARNativeSupplements.h5cfbe96a887c7fbe.CurrentAFT.BinaryTouchedCycle.candidates_length hb sites))]
rfl
end Integration9_9.TM2NativeCycleTouched
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.TM2NativeCycleRanks
open AFT CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeRootGroupAlgebra TM2NativeCycleTouched
def rank (x : List ℕ × ℕ) : ℕ := x.1.findIdx (fun n => decide (n=x.2))
@[fun_prop] theorem rank_poly : Poly _root_.Integration9_9.TM2NativeCycleRanks.rank := by unfold _root_.Integration9_9.TM2NativeCycleRanks.rank;fun_prop
theorem rank_value (xs : List ℕ) (hx : xs.Nodup) (i : Fin xs.length) : _root_.Integration9_9.TM2NativeCycleRanks.rank (xs,xs.get i)=i.val := by
apply (List.findIdx_eq i.isLt).mpr
constructor
· simp
· intro j hj
apply decide_eq_false
intro he
have hij : (⟨j,lt_trans hj i.isLt⟩ : Fin xs.length)=i := hx.get_inj_iff.mp he
have hv := congrArg Fin.val hij
change j=i.val at hv
omega
theorem rank_native {body : ℕ} (xs : List (Fin body)) (hx : xs.Nodup) (target : Fin body)
(i : Fin xs.length) (hi : xs.get i=target) : _root_.Integration9_9.TM2NativeCycleRanks.rank (xs.map Fin.val,target.val)=i.val := by
let j : Fin (xs.map Fin.val).length := ⟨i.val,by simpa only [List.length_map] using i.isLt⟩
have hm : (xs.map Fin.val).Nodup := hx.map Fin.val_injective
have h := _root_.Integration9_9.TM2NativeCycleRanks.rank_value (xs.map Fin.val) hm j
have he : (xs.map Fin.val).get j=target.val := by
simp only [List.get_eq_getElem,List.getElem_map,j]
exact congrArg Fin.val hi
rw [he] at h
exact h
def positions (count : ℕ) (x : ℕ × List ℕ) : List (ℕ × ℕ) :=
List.ofFn (fun i : Fin count =>
(_root_.Integration9_9.TM2NativeCycleRanks.rank (_root_.Integration9_9.TM2NativeCycleTouched.prepare count x,x.2[i.val]?.getD 0),_root_.Integration9_9.TM2NativeCycleRanks.rank (_root_.Integration9_9.TM2NativeCycleTouched.prepare count x,_root_.Integration9_9.TM2NativeCycleTouched.previous (x.1,x.2[i.val]?.getD 0))))
@[fun_prop] theorem positions_poly (count : ℕ) : Poly (_root_.Integration9_9.TM2NativeCycleRanks.positions count) := by
exact _root_.Integration9_9.TM2NativeRootGroupAlgebra.tuple_poly (fun i : Fin count => fun x : ℕ × List ℕ =>
(_root_.Integration9_9.TM2NativeCycleRanks.rank (_root_.Integration9_9.TM2NativeCycleTouched.prepare count x,x.2[i.val]?.getD 0),_root_.Integration9_9.TM2NativeCycleRanks.rank (_root_.Integration9_9.TM2NativeCycleTouched.prepare count x,_root_.Integration9_9.TM2NativeCycleTouched.previous (x.1,x.2[i.val]?.getD 0))))
(by intro i;fun_prop)
theorem positions_native {body count : ℕ} (hb : 0<body) (sites : Vector (Fin body) count) :
_root_.Integration9_9.TM2NativeCycleRanks.positions count (body,List.ofFn (fun i => (sites.get i).val))=
List.ofFn (fun i => (((_root_.CurrentAFT.BinaryTouchedCycleRanks.positions hb sites).value.get i).1.val,
((_root_.CurrentAFT.BinaryTouchedCycleRanks.positions hb sites).value.get i).2.val)) := by
apply congrArg List.ofFn
funext i
dsimp only
have hp := _root_.InfoLossLARNativeSupplements.hf362d6b0d865f5c6.CurrentAFT.BinaryTouchedCycleRanks.positions_value hb sites i
rw [_root_.CurrentAFT.BinaryTouchedCycleBuffer.buffer_get,_root_.CurrentAFT.BinaryTouchedCycleBuffer.buffer_get] at hp
have hn := _root_.CurrentAFT.BinaryTouchedCycle.prepare_nodup hb sites
simp only [_root_.Integration9_9.TM2NativeCycleTouched.prepare_native hb sites,List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some]
apply Prod.ext
· exact _root_.Integration9_9.TM2NativeCycleRanks.rank_native _ hn _ _ hp.1
· rw [_root_.Integration9_9.TM2NativeCycleTouched.previous_value hb]
exact _root_.Integration9_9.TM2NativeCycleRanks.rank_native _ hn _ _ hp.2
end Integration9_9.TM2NativeCycleRanks
end
section
namespace AFT
end AFT
namespace AFT.BinaryArithmetic
end AFT.BinaryArithmetic
namespace AFT.BinaryArithmetic.RationalBits
end AFT.BinaryArithmetic.RationalBits
namespace AFT.BinaryArithmetic.RationalBits.copy
end AFT.BinaryArithmetic.RationalBits.copy
namespace AFT.BinaryArithmetic.copy
end AFT.BinaryArithmetic.copy
namespace AFT.BinaryArithmetic.copy.match_1
end AFT.BinaryArithmetic.copy.match_1
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.BinarySparseCycleSemantic
end CurrentAFT.BinarySparseCycleSemantic
namespace CurrentAFT.BinarySparseCycleSemantic.coordinates
end CurrentAFT.BinarySparseCycleSemantic.coordinates
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.TM2NativeCycleEvaluation
open AFT AFT.RationalNumerics AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeRootGroupAlgebra TM2NativeRootGroupProfiles TM2NativeRootGroupCoefficient
open TM2NativeRootGroupGaussian
open scoped BigOperators
abbrev Meta := _root_.Integration9_9.TM2NativeFirstInverse.Meta
abbrev Context (α : Type) := (_root_.Integration9_9.TM2NativeCycleEvaluation.Meta × α) × (ℕ × List ℕ)
abbrev TestInput (α : Type) := (_root_.Integration9_9.TM2NativeCycleEvaluation.Meta × α) × List ℤ
def roots (count : ℕ) (x : List (ℕ × ℕ) × List ℕ) : List ℤ :=
List.ofFn (fun i : Fin count =>
((x.2[(x.1[i.val]?.getD (0,0)).1]?.getD 0 : ℕ) : ℤ) -
((x.2[(x.1[i.val]?.getD (0,0)).2]?.getD 0 : ℕ) : ℤ))
@[fun_prop] theorem roots_poly (count : ℕ) : Poly (_root_.Integration9_9.TM2NativeCycleEvaluation.roots count) := by
exact _root_.Integration9_9.TM2NativeRootGroupAlgebra.tuple_poly (fun i : Fin count => fun x : List (ℕ × ℕ) × List ℕ =>
((x.2[(x.1[i.val]?.getD (0,0)).1]?.getD 0 : ℕ) : ℤ)-
((x.2[(x.1[i.val]?.getD (0,0)).2]?.getD 0 : ℕ) : ℤ)) (by intro i;fun_prop)
def term {α : Type} (count edges : ℕ) (f : _root_.Integration9_9.TM2NativeCycleEvaluation.TestInput α → ℚ) (x : _root_.Integration9_9.TM2NativeCycleEvaluation.Context α × List ℕ) : ℚ :=
(∏i : Fin edges,(_root_.Integration9_9.TM2NativeRootGroupGaussian.gaussian true x.1.1.1)[x.2[i.val]?.getD 0]?.getD 0)*
f (x.1.1,_root_.Integration9_9.TM2NativeCycleEvaluation.roots count (_root_.Integration9_9.TM2NativeCycleRanks.positions count x.1.2,x.2))
@[fun_prop] theorem term_poly {α : Type} [Coding α] (count edges : ℕ) {f : _root_.Integration9_9.TM2NativeCycleEvaluation.TestInput α → ℚ}
(hf : Poly f) : Poly (_root_.Integration9_9.TM2NativeCycleEvaluation.term count edges f) := by
have hp : Poly (fun x : _root_.Integration9_9.TM2NativeCycleEvaluation.Context α × List ℕ => ∏i : Fin edges,
(_root_.Integration9_9.TM2NativeRootGroupGaussian.gaussian true x.1.1.1)[x.2[i.val]?.getD 0]?.getD 0) := by
apply _root_.Integration9_9.TM2NativeRootGroupCoefficient.finite_prod_poly
intro i _
fun_prop
unfold _root_.Integration9_9.TM2NativeCycleEvaluation.term
fun_prop
def fixedEdges {α : Type} (count edges : ℕ) (f : _root_.Integration9_9.TM2NativeCycleEvaluation.TestInput α → ℚ) (x : _root_.Integration9_9.TM2NativeCycleEvaluation.Context α) : ℚ :=
((_root_.Integration9_9.TM2NativeTupleEnumeration.tuples edges (List.range (_root_.Integration9_9.TM2NativeRootGroupGaussian.gaussian true x.1.1).length)).map
(fun word => _root_.Integration9_9.TM2NativeCycleEvaluation.term count edges f (x,word))).sum
@[fun_prop] theorem fixedEdges_poly {α : Type} [Coding α] (count edges : ℕ) {f : _root_.Integration9_9.TM2NativeCycleEvaluation.TestInput α → ℚ}
(hf : Poly f) : Poly (_root_.Integration9_9.TM2NativeCycleEvaluation.fixedEdges count edges f) := by
have hi : Poly (fun x : _root_.Integration9_9.TM2NativeCycleEvaluation.Context α => List.range (_root_.Integration9_9.TM2NativeRootGroupGaussian.gaussian true x.1.1).length) :=
Poly.comp (f := fun xs : List ℚ => List.range xs.length) (Poly.list_indices (α := ℚ)) (by fun_prop)
have ht := _root_.Integration9_9.TM2NativeCycleEvaluation.term_poly count edges hf
unfold _root_.Integration9_9.TM2NativeCycleEvaluation.fixedEdges
apply _root_.Integration9_9.TM2NativeRootGroupProfiles.list_sum_poly
fun_prop
/-- The sparse native semantics expressed in its executed touched-edge order.
The rational-code witness is used only to specialize a semantic theorem. -/
theorem gaussianEvaluate_tuple {body count : ℕ} (security bits : ℕ) (hb : 0<body)
(sites : Vector (Fin body) count) (ideal : (Fin count → ℤ) → ℚ) :
_root_.CurrentAFT.CyclePatternProgram.gaussianEvaluate security (_root_.CurrentAFT.DiffuseProfiles.edgeCutoff security) bits sites.get ideal=
∑word : Fin (_root_.CurrentAFT.BinaryTouchedCycle.prepare hb sites).value.length → Fin (2*_root_.CurrentAFT.DiffuseProfiles.edgeCutoff security+1),
(∏edge,_root_.AFT.RationalNumerics.windowGaussianWeights (_root_.CurrentAFT.WindowGaussianSampler.squaredWidth security) (_root_.CurrentAFT.DiffuseProfiles.edgeCutoff security) bits (word edge))*
ideal (fun slot => ((word (((_root_.CurrentAFT.BinaryTouchedCycleRanks.positions hb sites).value.get slot).1)).val : ℤ)-
(word (((_root_.CurrentAFT.BinaryTouchedCycleRanks.positions hb sites).value.get slot).2)).val) := by
classical
let test := fun rootWord : Vector _root_.AFT.BinaryArithmetic.IntegerBits count =>
(⟨Classical.choose (_root_.InfoLossLARNativeSupplements.h7fd26e43562bbe30.AFT.BinaryArithmetic.RationalBits.exists_code (ideal (fun i => (rootWord.get i).decode))),0⟩ : _root_.AFT.BinaryArithmetic.RationalResult)
have ht (rootWord : Vector _root_.AFT.BinaryArithmetic.IntegerBits count) : (test rootWord).data.decode=ideal (fun i => (rootWord.get i).decode) :=
Classical.choose_spec (_root_.InfoLossLARNativeSupplements.h7fd26e43562bbe30.AFT.BinaryArithmetic.RationalBits.exists_code _)
exact (_root_.InfoLossLARNativeSupplements.hb39aff037bdc4326.CurrentAFT.BinarySparseCycleSemantic.current_value security (_root_.CurrentAFT.DiffuseProfiles.edgeCutoff security) bits hb sites test ideal ht).symm.trans
(_root_.InfoLossLARNativeSupplements.he37fcb2fedaaad11.CurrentAFT.BinarySparseCycleEvaluation.current_tuple_value security (_root_.CurrentAFT.DiffuseProfiles.edgeCutoff security) bits hb sites test ideal ht)
theorem fixedEdges_value {α : Type} (count edges : ℕ) (f : _root_.Integration9_9.TM2NativeCycleEvaluation.TestInput α → ℚ) (x : _root_.Integration9_9.TM2NativeCycleEvaluation.Meta × α)
{body : ℕ} (hb : 0<body) (sites : Vector (Fin body) count)
(he : edges=(_root_.CurrentAFT.BinaryTouchedCycle.prepare hb sites).value.length) :
_root_.Integration9_9.TM2NativeCycleEvaluation.fixedEdges count edges f (x,(body,List.ofFn (fun i => (sites.get i).val)))=
_root_.CurrentAFT.CyclePatternProgram.gaussianEvaluate x.1.1.length (_root_.CurrentAFT.DiffuseProfiles.edgeCutoff x.1.1.length) x.1.2.length
sites.get (fun rootWord => f (x,List.ofFn rootWord)) := by
rw [he,_root_.Integration9_9.TM2NativeCycleEvaluation.gaussianEvaluate_tuple _ _ hb sites]
unfold _root_.Integration9_9.TM2NativeCycleEvaluation.fixedEdges
simp only [_root_.Integration9_9.TM2NativeRootGroupGaussian.gaussian_eq,_root_.Integration9_9.TM2NativeProfile.gaussianList,List.length_ofFn,_root_.Integration9_9.TM2NativeTupleEnumeration.sum_tuples]
apply Finset.sum_congr rfl
intro word _
simp only [_root_.Integration9_9.TM2NativeCycleEvaluation.term,_root_.Integration9_9.TM2NativeRootGroupGaussian.gaussian_eq,_root_.Integration9_9.TM2NativeProfile.gaussianList,_root_.Integration9_9.TM2NativeCycleRanks.positions_native hb sites,_root_.Integration9_9.TM2NativeCycleEvaluation.roots,
List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some]
rfl
def current {α : Type} (count : ℕ) (f : _root_.Integration9_9.TM2NativeCycleEvaluation.TestInput α → ℚ) (x : _root_.Integration9_9.TM2NativeCycleEvaluation.Context α) : ℚ :=
∑edges ∈ Finset.range (2*count+1),
if (_root_.Integration9_9.TM2NativeCycleTouched.prepare count x.2).length=edges then _root_.Integration9_9.TM2NativeCycleEvaluation.fixedEdges count edges f x else 0
@[fun_prop] theorem current_poly {α : Type} [Coding α] (count : ℕ) {f : _root_.Integration9_9.TM2NativeCycleEvaluation.TestInput α → ℚ} (hf : Poly f) :
Poly (_root_.Integration9_9.TM2NativeCycleEvaluation.current count f) := by
unfold _root_.Integration9_9.TM2NativeCycleEvaluation.current
apply _root_.Integration9_9.TM2NativeRootGroupAlgebra.finite_sum_poly
intro edges _
have he := _root_.Integration9_9.TM2NativeCycleEvaluation.fixedEdges_poly count edges hf
fun_prop
theorem current_value {α : Type} (count : ℕ) (f : _root_.Integration9_9.TM2NativeCycleEvaluation.TestInput α → ℚ) (x : _root_.Integration9_9.TM2NativeCycleEvaluation.Meta × α)
{body : ℕ} (hb : 0<body) (sites : Vector (Fin body) count) :
_root_.Integration9_9.TM2NativeCycleEvaluation.current count f (x,(body,List.ofFn (fun i => (sites.get i).val)))=
_root_.CurrentAFT.CyclePatternProgram.gaussianEvaluate x.1.1.length (_root_.CurrentAFT.DiffuseProfiles.edgeCutoff x.1.1.length) x.1.2.length
sites.get (fun rootWord => f (x,List.ofFn rootWord)) := by
have he := _root_.InfoLossLARNativeSupplements.hbcb1352f59b47e7a.CurrentAFT.BinaryTouchedCycle.prepare_length hb sites
unfold _root_.Integration9_9.TM2NativeCycleEvaluation.current
simp only [_root_.Integration9_9.TM2NativeCycleTouched.prepare_native hb sites,List.length_map]
rw [Finset.sum_eq_single (_root_.CurrentAFT.BinaryTouchedCycle.prepare hb sites).value.length]
· rw [if_pos rfl]
exact _root_.Integration9_9.TM2NativeCycleEvaluation.fixedEdges_value count _ f x hb sites rfl
· intro edges _ hn
rw [if_neg (Ne.symm hn)]
· intro hn
exact False.elim (hn (Finset.mem_range.mpr (by omega)))
end Integration9_9.TM2NativeCycleEvaluation
end
section
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.TM2NativeCycleAverage
open AFT AFT.RationalNumerics AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeCycleEvaluation TM2NativeRootGroupProfiles
open scoped BigOperators
abbrev Meta := _root_.Integration9_9.TM2NativeFirstInverse.Meta
attribute [local irreducible] TM2NativePrime.modulus TM2NativePrime.upperSlots
def body (xs : List Unit) : ℕ := _root_.Integration9_9.TM2NativeFullResponseCounts.body xs
@[fun_prop] theorem body_poly : Poly _root_.Integration9_9.TM2NativeCycleAverage.body := by unfold _root_.Integration9_9.TM2NativeCycleAverage.body;fun_prop
theorem body_value (xs : List Unit) : _root_.Integration9_9.TM2NativeCycleAverage.body xs=_root_.CurrentAFT.CurrentCycleEntryProgram.bodyCount xs.length := by
simp only [_root_.Integration9_9.TM2NativeCycleAverage.body,_root_.Integration9_9.TM2NativeFullResponseCounts.body,_root_.Integration9_9.TM2NativePrimary.population,_root_.Integration9_9.TM2NativePrimary.colors,
_root_.Integration9_9.TM2NativePrime.modulus_native,_root_.CurrentAFT.CurrentCycleEntryProgram.bodyCount]
def bodySlots (xs : List Unit) : List Unit := _root_.Integration9_9.TM2NativeFullResponseCounts.slots .body xs
@[fun_prop] theorem bodySlots_poly : Poly _root_.Integration9_9.TM2NativeCycleAverage.bodySlots := by unfold _root_.Integration9_9.TM2NativeCycleAverage.bodySlots;fun_prop
theorem bodySlots_length (xs : List Unit) : (_root_.Integration9_9.TM2NativeCycleAverage.bodySlots xs).length=_root_.CurrentAFT.CurrentCycleEntryProgram.bodyCount xs.length := by
rw [_root_.Integration9_9.TM2NativeCycleAverage.bodySlots,_root_.Integration9_9.TM2NativeFullResponseCounts.slots_length]
exact _root_.Integration9_9.TM2NativeCycleAverage.body_value xs
theorem body_positive (xs : List Unit) : 0<_root_.CurrentAFT.CurrentCycleEntryProgram.bodyCount xs.length := by
rw [_root_.CurrentAFT.CurrentCycleEntryProgram.bodyCount,_root_.CurrentAFT.PublicParameterProgram.modulus_value]
exact Nat.mul_pos (_root_.CurrentAFT.Parameters.modulus_spec xs.length).2.pos (pow_pos (by omega) _)
def leaf {α : Type} (count : ℕ) (f : _root_.Integration9_9.TM2NativeCycleEvaluation.TestInput α → ℚ) (x : (_root_.Integration9_9.TM2NativeCycleAverage.Meta × α) × List ℕ) : ℚ :=
_root_.Integration9_9.TM2NativeCycleEvaluation.current count f (x.1,(_root_.Integration9_9.TM2NativeCycleAverage.body x.1.1.1,x.2))
@[fun_prop] theorem leaf_poly {α : Type} [Coding α] (count : ℕ) {f : _root_.Integration9_9.TM2NativeCycleEvaluation.TestInput α → ℚ} (hf : Poly f) : Poly (_root_.Integration9_9.TM2NativeCycleAverage.leaf count f) := by
have h := _root_.Integration9_9.TM2NativeCycleEvaluation.current_poly count hf
unfold _root_.Integration9_9.TM2NativeCycleAverage.leaf
fun_prop
def numerator {α : Type} (count : ℕ) (f : _root_.Integration9_9.TM2NativeCycleEvaluation.TestInput α → ℚ) (x : _root_.Integration9_9.TM2NativeCycleAverage.Meta × α) : ℚ :=
_root_.Integration9_9.TM2NativeDistinctTuples.sum count (_root_.Integration9_9.TM2NativeCycleAverage.leaf count f) (x,_root_.Integration9_9.TM2NativeCycleAverage.bodySlots x.1.1)
@[fun_prop] theorem numerator_poly {α : Type} [Coding α] (count : ℕ) {f : _root_.Integration9_9.TM2NativeCycleEvaluation.TestInput α → ℚ} (hf : Poly f) :
Poly (_root_.Integration9_9.TM2NativeCycleAverage.numerator count f) := by
have h := _root_.Integration9_9.TM2NativeTwoPoolAverage.distinctSum_poly count (_root_.Integration9_9.TM2NativeCycleAverage.leaf_poly count hf)
unfold _root_.Integration9_9.TM2NativeCycleAverage.numerator
fun_prop
def current {α : Type} (count : ℕ) (f : _root_.Integration9_9.TM2NativeCycleEvaluation.TestInput α → ℚ) (x : _root_.Integration9_9.TM2NativeCycleAverage.Meta × α) : ℚ :=
_root_.Integration9_9.TM2NativeCycleAverage.numerator count f x/_root_.Integration9_9.TM2NativeTwoPoolAverage.normalizer count (_root_.Integration9_9.TM2NativeCycleAverage.bodySlots x.1.1)
@[fun_prop] theorem current_poly {α : Type} [Coding α] (count : ℕ) {f : _root_.Integration9_9.TM2NativeCycleEvaluation.TestInput α → ℚ} (hf : Poly f) :
Poly (_root_.Integration9_9.TM2NativeCycleAverage.current count f) := by
have h := _root_.Integration9_9.TM2NativeCycleAverage.numerator_poly count hf
unfold _root_.Integration9_9.TM2NativeCycleAverage.current
fun_prop
attribute [local irreducible] CyclePatternProgram.gaussianEvaluate CurrentCycleEntryProgram.bodyCount
theorem current_value {α : Type} (count : ℕ) (f : _root_.Integration9_9.TM2NativeCycleEvaluation.TestInput α → ℚ) (x : _root_.Integration9_9.TM2NativeCycleAverage.Meta × α) :
_root_.Integration9_9.TM2NativeCycleAverage.current count f x=_root_.CurrentAFT.CyclePatternProgram.averagedEvaluate x.1.1.length (_root_.CurrentAFT.DiffuseProfiles.edgeCutoff x.1.1.length)
x.1.2.length (_root_.CurrentAFT.CurrentCycleEntryProgram.bodyCount x.1.1.length) count
(fun _ roots => f (x,List.ofFn roots)) := by
classical
have hn : _root_.Integration9_9.TM2NativeCycleAverage.numerator count f x=∑sites : Fin count ↪ Fin (_root_.CurrentAFT.CurrentCycleEntryProgram.bodyCount x.1.1.length),
_root_.CurrentAFT.CyclePatternProgram.gaussianEvaluate x.1.1.length (_root_.CurrentAFT.DiffuseProfiles.edgeCutoff x.1.1.length) x.1.2.length
sites (fun roots => f (x,List.ofFn roots)) := by
rw [_root_.Integration9_9.TM2NativeCycleAverage.numerator,_root_.Integration9_9.TM2NativeDistinctTuples.sum_value count _ _ x _ (_root_.Integration9_9.TM2NativeCycleAverage.bodySlots_length x.1.1)]
apply Finset.sum_congr rfl
intro sites _
unfold _root_.Integration9_9.TM2NativeCycleAverage.leaf
rw [_root_.Integration9_9.TM2NativeCycleAverage.body_value]
have h := _root_.Integration9_9.TM2NativeCycleEvaluation.current_value count f x
(_root_.Integration9_9.TM2NativeCycleAverage.body_positive x.1.1) (Vector.ofFn sites)
have hv : (Vector.ofFn sites).get = fun i => sites i := by funext i; exact Vector.get_ofFn _ _
rw [hv] at h
exact h
rw [_root_.Integration9_9.TM2NativeCycleAverage.current,hn,_root_.Integration9_9.TM2NativeTwoPoolAverage.normalizer_value,_root_.Integration9_9.TM2NativeCycleAverage.bodySlots_length]
unfold _root_.CurrentAFT.CyclePatternProgram.averagedEvaluate
simp only [Fintype.card_embedding_eq,Fintype.card_fin]
rw [div_eq_mul_inv,mul_comm]
congr 1
apply Finset.sum_congr (by ext sites;simp)
intro sites _
rfl
end Integration9_9.TM2NativeCycleAverage
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.BinaryRootSignedMass
end CurrentAFT.BinaryRootSignedMass
namespace CurrentAFT.BinaryRootSignedMass.bodyProgram
end CurrentAFT.BinaryRootSignedMass.bodyProgram
namespace CurrentAFT.BinaryRootSignedMass.references
end CurrentAFT.BinaryRootSignedMass.references
namespace CurrentAFT.CurrentCycleEntryProgram
end CurrentAFT.CurrentCycleEntryProgram
namespace CurrentAFT.CurrentCycleEntryProgram.selectedEntry
end CurrentAFT.CurrentCycleEntryProgram.selectedEntry
namespace CurrentAFT.RootSignedMassProgram
end CurrentAFT.RootSignedMassProgram
namespace CurrentAFT.RootSignedMassProgram.weightedEntry
end CurrentAFT.RootSignedMassProgram.weightedEntry
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.TM2NativeRootSignedMass
open AFT AFT.RationalNumerics AFT.BinaryArithmetic CurrentAFT
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeRootGroupCoefficient TM2NativeRootGroupOrdinary TM2NativeRootGroupMass
open scoped BigOperators
abbrev Meta := _root_.Integration9_9.TM2NativeFirstInverse.Meta
def test (count : ℕ) (x : (_root_.Integration9_9.TM2NativeRootSignedMass.Meta × List ℕ) × List ℤ) : ℚ :=
∏i : Fin count, ((if _root_.Integration9_9.TM2NativeRootGroupMass.residue (x.1.1.1,x.2[i.val]?.getD 0)=((x.1.2[i.val]?.getD 0 : ℕ) : ℤ)
then (1 : ℚ) else 0)-_root_.Integration9_9.TM2NativeRootGroupOrdinary.referencePoint (x.1.1,x.1.2[i.val]?.getD 0))
@[fun_prop] theorem test_poly (count : ℕ) : Poly (_root_.Integration9_9.TM2NativeRootSignedMass.test count) := by
unfold _root_.Integration9_9.TM2NativeRootSignedMass.test
apply _root_.Integration9_9.TM2NativeRootGroupCoefficient.finite_prod_poly
intro i _
fun_prop
theorem test_value (count : ℕ) (x : _root_.Integration9_9.TM2NativeRootSignedMass.Meta × List ℕ) (roots : Fin count → ℤ) :
_root_.Integration9_9.TM2NativeRootSignedMass.test count (x,List.ofFn roots)=_root_.CurrentAFT.RootSignedMassProgram.signedTest x.1.1.length x.1.2.length count
(fun i => x.2[i.val]?.getD 0) roots := by
simp only [_root_.Integration9_9.TM2NativeRootSignedMass.test,_root_.CurrentAFT.RootSignedMassProgram.signedTest,List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some,
_root_.Integration9_9.TM2NativeRootGroupMass.residue_value,_root_.Integration9_9.TM2NativeRootGroupOrdinary.referencePoint]
def current (count : ℕ) : _root_.Integration9_9.TM2NativeRootSignedMass.Meta × List ℕ → ℚ := _root_.Integration9_9.TM2NativeCycleAverage.current count (_root_.Integration9_9.TM2NativeRootSignedMass.test count)
@[fun_prop] theorem current_poly (count : ℕ) : Poly (_root_.Integration9_9.TM2NativeRootSignedMass.current count) := _root_.Integration9_9.TM2NativeCycleAverage.current_poly count (_root_.Integration9_9.TM2NativeRootSignedMass.test_poly count)
theorem current_value (count : ℕ) (x : _root_.Integration9_9.TM2NativeRootSignedMass.Meta × List ℕ) : _root_.Integration9_9.TM2NativeRootSignedMass.current count x=
_root_.CurrentAFT.RootSignedMassProgram.weightedEntry x.1.1.length x.1.2.length count (fun i => x.2[i.val]?.getD 0) := by
rw [_root_.Integration9_9.TM2NativeRootSignedMass.current,_root_.Integration9_9.TM2NativeCycleAverage.current_value]
simp only [_root_.Integration9_9.TM2NativeRootSignedMass.test_value,_root_.CurrentAFT.RootSignedMassProgram.weightedEntry]
noncomputable def currentProgram (count : ℕ) : PolyProgram Automatic.enc Ratio.encode
(fun x : _root_.Integration9_9.TM2NativeRootSignedMass.Meta × List ℕ => _root_.CurrentAFT.RootSignedMassProgram.weightedEntry x.1.1.length x.1.2.length count (fun i => x.2[i.val]?.getD 0)) :=
(_root_.Integration9_9.TM2NativeRootSignedMass.current_poly count).program.congr _ (_root_.Integration9_9.TM2NativeRootSignedMass.current_value count)
end Integration9_9.TM2NativeRootSignedMass
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.WeightedPointKernelProgram
end CurrentAFT.WeightedPointKernelProgram
namespace CurrentAFT.WeightedPointKernelProgram.current
end CurrentAFT.WeightedPointKernelProgram.current
namespace CurrentAFT.WeightedPointKernelProgram.weightedTensor
end CurrentAFT.WeightedPointKernelProgram.weightedTensor
set_option autoImplicit false
set_option maxHeartbeats 700000
set_option maxRecDepth 10000
set_option backward.isDefEq.respectTransparency false
/-! Entire rational weighted point kernels on arbitrary natural source and
output coordinates. All reference profiles are internally computed; this
also supplies the point-basis part of the actual full-response defect. -/
namespace Integration9_9.TM2NativeWeightedPoint
open AFT CurrentAFT CurrentAFT.GradedControlAlgebra
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeRootGroupAlgebra
open scoped BigOperators
abbrev Meta := _root_.Integration9_9.TM2NativeRootGroupProfiles.Meta
abbrev Input := _root_.Integration9_9.TM2NativeWeightedPoint.Meta×((List ℕ×List ℕ)×(List ℕ×List ℕ))
theorem finite_product_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
@[fun_prop] theorem primaryDelta_poly : Poly (fun x : _root_.Integration9_9.TM2NativeWeightedPoint.Meta×(ℕ×ℕ) =>
_root_.CurrentAFT.RationalPrimaryColumnProgram.centerDelta x.1.1.length x.1.2.length x.2.1 x.2.2) := by
change Poly (fun x : _root_.Integration9_9.TM2NativeWeightedPoint.Meta×(ℕ×ℕ) =>
(if x.2.2=x.2.1 then (1 : ℚ) else 0)-_root_.Integration9_9.TM2NativeRootGroupProfiles.primary (x.1,x.2.1))
fun_prop
@[fun_prop] theorem bodyDelta_poly : Poly (fun x : _root_.Integration9_9.TM2NativeWeightedPoint.Meta×(ℕ×ℕ) =>
_root_.CurrentAFT.WeightedPointKernelProgram.bodyDelta x.1.1.length x.1.2.length x.2.1 x.2.2) := by
change Poly (fun x : _root_.Integration9_9.TM2NativeWeightedPoint.Meta×(ℕ×ℕ) =>
(if x.2.2=x.2.1 then (1 : ℚ) else 0)-_root_.Integration9_9.TM2NativeRootGroupProfiles.center (x.1,x.2.1))
fun_prop
def current (r s : ℕ) (x : _root_.Integration9_9.TM2NativeWeightedPoint.Input) : ℚ := _root_.CurrentAFT.WeightedPointKernelProgram.current
x.1.1.length x.1.2.length r s
(fun i=>x.2.1.1[i.val]?.getD 0) (fun i=>x.2.2.1[i.val]?.getD 0)
(fun i=>x.2.1.2[i.val]?.getD 0) (fun i=>x.2.2.2[i.val]?.getD 0)
@[fun_prop] theorem current_poly (r s : ℕ) : Poly (_root_.Integration9_9.TM2NativeWeightedPoint.current r s) := by
classical
unfold _root_.Integration9_9.TM2NativeWeightedPoint.current _root_.CurrentAFT.WeightedPointKernelProgram.current _root_.CurrentAFT.RationalFamilyProductProgram.average
have hp : Poly (fun x : _root_.Integration9_9.TM2NativeWeightedPoint.Input => ∑p : Equiv.Perm (Fin r),∑b : Equiv.Perm (Fin s),
(∏i : Fin r,_root_.CurrentAFT.RationalPrimaryColumnProgram.centerDelta x.1.1.length x.1.2.length
(x.2.1.1[i.val]?.getD 0) (x.2.1.2[(p i).val]?.getD 0))*
∏i : Fin s,_root_.CurrentAFT.WeightedPointKernelProgram.bodyDelta x.1.1.length x.1.2.length
(x.2.2.1[i.val]?.getD 0) (x.2.2.2[(b i).val]?.getD 0)) := by
apply _root_.Integration9_9.TM2NativeRootGroupAlgebra.finite_sum_poly
intro p _
apply _root_.Integration9_9.TM2NativeRootGroupAlgebra.finite_sum_poly
intro b _
have ha : Poly (fun x : _root_.Integration9_9.TM2NativeWeightedPoint.Input => ∏i : Fin r,_root_.CurrentAFT.RationalPrimaryColumnProgram.centerDelta x.1.1.length x.1.2.length
(x.2.1.1[i.val]?.getD 0) (x.2.1.2[(p i).val]?.getD 0)) := by
apply _root_.Integration9_9.TM2NativeWeightedPoint.finite_product_poly
intro i _
exact Poly.comp (f := fun y : _root_.Integration9_9.TM2NativeWeightedPoint.Meta×(ℕ×ℕ) =>
_root_.CurrentAFT.RationalPrimaryColumnProgram.centerDelta y.1.1.length y.1.2.length y.2.1 y.2.2)
(g := fun x : _root_.Integration9_9.TM2NativeWeightedPoint.Input => (x.1,(x.2.1.1[i.val]?.getD 0,x.2.1.2[(p i).val]?.getD 0)))
_root_.Integration9_9.TM2NativeWeightedPoint.primaryDelta_poly (by fun_prop)
have hb : Poly (fun x : _root_.Integration9_9.TM2NativeWeightedPoint.Input => ∏i : Fin s,_root_.CurrentAFT.WeightedPointKernelProgram.bodyDelta x.1.1.length x.1.2.length
(x.2.2.1[i.val]?.getD 0) (x.2.2.2[(b i).val]?.getD 0)) := by
apply _root_.Integration9_9.TM2NativeWeightedPoint.finite_product_poly
intro i _
exact Poly.comp (f := fun y : _root_.Integration9_9.TM2NativeWeightedPoint.Meta×(ℕ×ℕ) =>
_root_.CurrentAFT.WeightedPointKernelProgram.bodyDelta y.1.1.length y.1.2.length y.2.1 y.2.2)
(g := fun x : _root_.Integration9_9.TM2NativeWeightedPoint.Input => (x.1,(x.2.2.1[i.val]?.getD 0,x.2.2.2[(b i).val]?.getD 0)))
_root_.Integration9_9.TM2NativeWeightedPoint.bodyDelta_poly (by fun_prop)
fun_prop
fun_prop
end Integration9_9.TM2NativeWeightedPoint
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.CurrentGroupSourcePadding
end CurrentAFT.CurrentGroupSourcePadding
namespace CurrentAFT.CurrentGroupSourcePadding.groupKind
end CurrentAFT.CurrentGroupSourcePadding.groupKind
namespace CurrentAFT.CurrentGroupSourcePadding.groupKind.match_1
end CurrentAFT.CurrentGroupSourcePadding.groupKind.match_1
namespace CurrentAFT.GroupSourcePadding
end CurrentAFT.GroupSourcePadding
namespace CurrentAFT.GroupSourcePadding.indexEquiv
end CurrentAFT.GroupSourcePadding.indexEquiv
namespace CurrentAFT.GroupSourcePadding.sourceDecode
end CurrentAFT.GroupSourcePadding.sourceDecode
namespace CurrentAFT.RationalPackedRootProgram
end CurrentAFT.RationalPackedRootProgram
namespace CurrentAFT.RationalPackedRootProgram.actualMetadata
end CurrentAFT.RationalPackedRootProgram.actualMetadata
namespace CurrentAFT.RationalPackedRootProgram.nativeKind
end CurrentAFT.RationalPackedRootProgram.nativeKind
namespace CurrentAFT.RationalPackedRootProgram.nativeKind.match_1
end CurrentAFT.RationalPackedRootProgram.nativeKind.match_1
namespace CurrentAFT.RationalPackedRootProgram.nativeRole
end CurrentAFT.RationalPackedRootProgram.nativeRole
namespace CurrentAFT.RationalPackedRootProgram.nativeRole.match_3
end CurrentAFT.RationalPackedRootProgram.nativeRole.match_3
namespace CurrentAFT.RationalPackedRootProgram.sourceIndex
end CurrentAFT.RationalPackedRootProgram.sourceIndex
set_option autoImplicit false
set_option maxHeartbeats 1200000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
/-! Entire joint root/control summands for fixed metadata. The local family
product, validity predicates, untagged reference masses, weighted point
kernel, and one joint source-word enumeration are actual machine programs.
The signed-mass subroutine also runs the full sparse-cycle Gaussian machine. -/
namespace Integration9_9.TM2NativePackedRoot
open AFT CurrentAFT GradedControlAlgebra
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeRootGroupAlgebra TM2NativeFiniteSeries TM2NativeSliceProbability
open scoped BigOperators
attribute [local irreducible] TM2NativePrime.modulus TM2NativePrime.upperSlots
RationalPackedRootProgram.localProduct RootSignedMassProgram.referenceEntry
RationalBackgroundProfiles.Safe TM2NativeBody.margin
abbrev Meta := _root_.Integration9_9.TM2NativeFirstInverse.Meta
abbrev Data := _root_.Integration9_9.TM2NativePackedRoot.Meta×(ℤ×(List ℕ×List ℕ))
abbrev WordData := _root_.Integration9_9.TM2NativePackedRoot.Data×List ℕ
abbrev Request := _root_.Integration9_9.TM2NativeRootGroupAlgebra.Query _root_.Integration9_9.TM2NativePackedRoot.Data
abbrev WordRequest := _root_.Integration9_9.TM2NativeRootGroupAlgebra.Query _root_.Integration9_9.TM2NativePackedRoot.WordData
def word (x : _root_.Integration9_9.TM2NativePackedRoot.WordData) (group slot : ℕ) : ℕ := x.2[group*3+slot]?.getD 0
@[fun_prop] theorem word_poly (group slot : ℕ) : Poly (fun x : _root_.Integration9_9.TM2NativePackedRoot.WordData=>_root_.Integration9_9.TM2NativePackedRoot.word x group slot) := by unfold _root_.Integration9_9.TM2NativePackedRoot.word;fun_prop
theorem wordProduct_poly {α : Type} [Coding α] (order count : ℕ)
(tables : Fin count→α→_root_.CurrentAFT.RationalFamilyProductProgram.Table ℚ ℕ ℕ order)
(ht : ∀i,_root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order (tables i)) : _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order (fun x=>_root_.CurrentAFT.RationalFamilyWordProduct.current order count (fun i=>tables i x)) := by
induction count with
| zero => exact _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly.unit
| succ count ih => exact (ih (fun i=>tables i.succ) (fun i=>ht i.succ)).product (ht 0)
def localProduct {r s kept tags : ℕ} (order : ℕ) (metadata : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags)
(x : _root_.Integration9_9.TM2NativePackedRoot.WordData) : _root_.CurrentAFT.RationalFamilyProductProgram.Table ℚ ℕ ℕ order :=
_root_.CurrentAFT.RationalPackedRootProgram.localProduct x.1.1.1.length x.1.1.2.length order x.1.2.1 metadata (fun g j=>_root_.Integration9_9.TM2NativePackedRoot.word x g.val j.val)
theorem localProduct_poly {r s kept tags : ℕ} (order : ℕ)
(metadata : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags) : _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order (_root_.Integration9_9.TM2NativePackedRoot.localProduct order metadata) := by
unfold _root_.Integration9_9.TM2NativePackedRoot.localProduct _root_.CurrentAFT.RationalPackedRootProgram.localProduct
change _root_.Integration9_9.TM2NativeRootGroupAlgebra.IsPoly order (fun x : _root_.Integration9_9.TM2NativePackedRoot.WordData=>_root_.CurrentAFT.RationalFamilyWordProduct.current order ((r+s)+kept)
(fun group=>_root_.CurrentAFT.RationalRootGroupProgram.localTable x.1.1.1.length x.1.1.2.length order x.1.2.1
(metadata.roles group) (fun j=>_root_.Integration9_9.TM2NativePackedRoot.word x group.val j.val)))
apply _root_.Integration9_9.TM2NativePackedRoot.wordProduct_poly
intro group
have hw := _root_.Integration9_9.TM2NativeRootGroupAlgebra.tuple_poly (fun j : Fin 3 => fun x : _root_.Integration9_9.TM2NativePackedRoot.WordData=>_root_.Integration9_9.TM2NativePackedRoot.word x group.val j.val) (by intro j;fun_prop)
have h := (_root_.Integration9_9.TM2NativeRootGroup.localTable_poly order (metadata.roles group)).comp
(g := fun x : _root_.Integration9_9.TM2NativePackedRoot.WordData=>(x.1.1,(x.1.2.1,List.ofFn (fun j : Fin 3=>_root_.Integration9_9.TM2NativePackedRoot.word x group.val j.val)))) (by fun_prop)
simpa only [_root_.Integration9_9.TM2NativeRootGroup.localTable,List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some] using h
theorem finite_all_poly {α ι : Type} [Coding α] (s : Finset ι) (p : ι→α→Prop)
[∀i,DecidablePred (p i)] (hp : ∀i∈s,Poly (fun x=>decide (p i x))) :
Poly (fun x=>decide (∀i∈s,p i x)) := by
classical
induction s using Finset.induction_on with
| empty => simpa using (Automatic.Poly.const (α := α) true)
| @insert i s hi ih =>
have hx:=hp i (by simp)
have hs:=ih (fun j hj=>hp j (by simp [hj]))
simp only [Finset.forall_mem_insert]
exact _root_.Integration9_9.TM2NativeSliceProbability.decide_and_poly hx hs
@[fun_prop] theorem safe_poly : Poly (fun x : List Unit×ℕ=>decide (_root_.CurrentAFT.RationalBackgroundProfiles.Safe x.1.length x.2)) := by
have h : Poly (fun x : List Unit×ℕ => decide ((_root_.Integration9_9.TM2NativeBody.margin x.1 : ℤ)≤(x.2 : ℤ) ∧
(x.2 : ℤ)<(_root_.Integration9_9.TM2NativePrime.modulus x.1 : ℤ)-(_root_.Integration9_9.TM2NativeBody.margin x.1 : ℤ))) := by fun_prop
simpa only [_root_.Integration9_9.TM2NativeBody.margin_value,_root_.Integration9_9.TM2NativePrime.modulus_native,_root_.CurrentAFT.RationalBackgroundProfiles.Safe,
_root_.CurrentAFT.RationalBackgroundProfiles.margin,_root_.CurrentAFT.RationalBackgroundProfiles.colors] using h
theorem validGroup_poly (role : _root_.CurrentAFT.RationalRootGroupProgram.LocalRole) (group : ℕ) :
Poly (fun x : _root_.Integration9_9.TM2NativePackedRoot.WordData=>decide (_root_.CurrentAFT.RationalPackedRootProgram.validGroup x.1.1.1.length role (fun j=>_root_.Integration9_9.TM2NativePackedRoot.word x group j.val))) := by
cases role <;> simp only [_root_.CurrentAFT.RationalPackedRootProgram.validGroup]
· exact Automatic.Poly.const true
· have hp : Poly (fun x : _root_.Integration9_9.TM2NativePackedRoot.WordData=>decide (_root_.CurrentAFT.RationalBackgroundProfiles.Safe x.1.1.1.length (_root_.Integration9_9.TM2NativePackedRoot.word x group 1))) :=
Poly.comp (f := fun y : List Unit×ℕ=>decide (_root_.CurrentAFT.RationalBackgroundProfiles.Safe y.1.length y.2))
(g := fun x : _root_.Integration9_9.TM2NativePackedRoot.WordData=>(x.1.1.1,_root_.Integration9_9.TM2NativePackedRoot.word x group 1)) _root_.Integration9_9.TM2NativePackedRoot.safe_poly (by fun_prop)
fun_prop
all_goals fun_prop
theorem valid_poly {r s kept tags : ℕ} (metadata : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags) :
Poly (fun x : _root_.Integration9_9.TM2NativePackedRoot.WordData=>decide (_root_.CurrentAFT.RationalPackedRootProgram.Valid x.1.1.1.length metadata (fun g j=>_root_.Integration9_9.TM2NativePackedRoot.word x g.val j.val))) := by
have h:=_root_.Integration9_9.TM2NativePackedRoot.finite_all_poly (Finset.univ : Finset (Fin ((r+s)+kept)))
(fun group (x : _root_.Integration9_9.TM2NativePackedRoot.WordData)=>_root_.CurrentAFT.RationalPackedRootProgram.validGroup x.1.1.1.length (metadata.roles group) (fun j=>_root_.Integration9_9.TM2NativePackedRoot.word x group.val j.val))
(fun group _=>_root_.Integration9_9.TM2NativePackedRoot.validGroup_poly (metadata.roles group) group.val)
simpa only [Finset.mem_univ,forall_const,_root_.CurrentAFT.RationalPackedRootProgram.Valid] using h
@[fun_prop] theorem reference_poly : Poly (fun x : _root_.Integration9_9.TM2NativePackedRoot.Meta×ℕ=>_root_.CurrentAFT.RootSignedMassProgram.referenceEntry x.1.1.length x.1.2.length x.2) :=
⟨_root_.Integration9_9.TM2NativeRootGroupReference.currentProgram⟩
def untagged {r s kept tags : ℕ} (metadata : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags) (x : _root_.Integration9_9.TM2NativePackedRoot.WordData) : ℚ :=
_root_.CurrentAFT.RationalPackedRootProgram.untagged x.1.1.1.length x.1.1.2.length metadata (fun g j=>_root_.Integration9_9.TM2NativePackedRoot.word x g.val j.val)
theorem untagged_poly {r s kept tags : ℕ} (metadata : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags) : Poly (_root_.Integration9_9.TM2NativePackedRoot.untagged metadata) := by
classical
unfold _root_.Integration9_9.TM2NativePackedRoot.untagged _root_.CurrentAFT.RationalPackedRootProgram.untagged
apply _root_.Integration9_9.TM2NativeWeightedPoint.finite_product_poly
intro group _
apply _root_.Integration9_9.TM2NativeWeightedPoint.finite_product_poly
intro slot _
by_cases h : _root_.CurrentAFT.RationalPackedRootProgram.rootActive (metadata.roles group) slot ∧ ¬∃tag,metadata.taggedSlots tag=(group,slot)
· simp only [if_pos h]
exact Poly.comp (f := fun y : _root_.Integration9_9.TM2NativePackedRoot.Meta×ℕ=>_root_.CurrentAFT.RootSignedMassProgram.referenceEntry y.1.1.length y.1.2.length y.2)
(g := fun x : _root_.Integration9_9.TM2NativePackedRoot.WordData=>(x.1.1,_root_.Integration9_9.TM2NativePackedRoot.word x group.val slot.castSucc.val)) _root_.Integration9_9.TM2NativePackedRoot.reference_poly (by fun_prop)
· simp only [if_neg h]
exact Automatic.Poly.const 1
def control {r s kept tags : ℕ} (metadata : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags) (x : _root_.Integration9_9.TM2NativePackedRoot.WordData) : ℚ :=
_root_.CurrentAFT.RationalPackedRootProgram.control x.1.1.1.length x.1.1.2.length metadata
(fun i=>x.1.2.2.1[i.val]?.getD 0) (fun i=>x.1.2.2.2[i.val]?.getD 0) (fun g j=>_root_.Integration9_9.TM2NativePackedRoot.word x g.val j.val)
theorem control_poly {r s kept tags : ℕ} (metadata : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags) : Poly (_root_.Integration9_9.TM2NativePackedRoot.control metadata) := by
have hp:=_root_.Integration9_9.TM2NativeRootGroupAlgebra.tuple_poly (fun i : Fin r=>fun x : _root_.Integration9_9.TM2NativePackedRoot.WordData=>_root_.Integration9_9.TM2NativePackedRoot.word x (_root_.CurrentAFT.RationalPackedRootProgram.primaryGroup r s kept i).val 2)
(by intro i;fun_prop)
have hb:=_root_.Integration9_9.TM2NativeRootGroupAlgebra.tuple_poly (fun i : Fin s=>fun x : _root_.Integration9_9.TM2NativePackedRoot.WordData=>_root_.Integration9_9.TM2NativePackedRoot.word x (_root_.CurrentAFT.RationalPackedRootProgram.ordinaryGroup r s kept i).val 1)
(by intro i;fun_prop)
have h:=Poly.comp (f := _root_.Integration9_9.TM2NativeWeightedPoint.current r s)
(g := fun x : _root_.Integration9_9.TM2NativePackedRoot.WordData=>(x.1.1,
((x.1.2.2.1,List.ofFn (fun i : Fin r=>_root_.Integration9_9.TM2NativePackedRoot.word x (_root_.CurrentAFT.RationalPackedRootProgram.primaryGroup r s kept i).val 2)),
(x.1.2.2.2,List.ofFn (fun i : Fin s=>_root_.Integration9_9.TM2NativePackedRoot.word x (_root_.CurrentAFT.RationalPackedRootProgram.ordinaryGroup r s kept i).val 1)))))
(_root_.Integration9_9.TM2NativeWeightedPoint.current_poly r s) (by fun_prop)
refine ⟨h.program.congr _ (fun x=>?_)⟩
simp only [Function.comp_apply,_root_.Integration9_9.TM2NativeWeightedPoint.current,_root_.Integration9_9.TM2NativePackedRoot.control,_root_.CurrentAFT.RationalPackedRootProgram.control,
List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some]
rfl
abbrev SignedInput := _root_.Integration9_9.TM2NativePackedRoot.Meta×List ℕ
def signedMass (tags : ℕ) (x : _root_.Integration9_9.TM2NativePackedRoot.SignedInput) : ℚ :=
_root_.CurrentAFT.RootSignedMassProgram.weightedEntry x.1.1.length x.1.2.length tags (fun i=>x.2[i.val]?.getD 0)
def signed {r s kept tags : ℕ} (metadata : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags) (x : _root_.Integration9_9.TM2NativePackedRoot.WordData) : ℚ :=
_root_.CurrentAFT.RationalPackedRootProgram.signed x.1.1.1.length x.1.1.2.length metadata (fun g j=>_root_.Integration9_9.TM2NativePackedRoot.word x g.val j.val)
theorem signed_poly {r s kept tags : ℕ} (metadata : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags)
(machine : PolyProgram Automatic.enc Ratio.encode (_root_.Integration9_9.TM2NativePackedRoot.signedMass tags)) : Poly (_root_.Integration9_9.TM2NativePackedRoot.signed metadata) := by
have hw:=_root_.Integration9_9.TM2NativeRootGroupAlgebra.tuple_poly (fun i : Fin tags=>fun x : _root_.Integration9_9.TM2NativePackedRoot.WordData=>
_root_.Integration9_9.TM2NativePackedRoot.word x (metadata.taggedSlots i).1.val (metadata.taggedSlots i).2.castSucc.val) (by intro i;fun_prop)
have h:=Poly.comp (f := _root_.Integration9_9.TM2NativePackedRoot.signedMass tags) (g := fun x : _root_.Integration9_9.TM2NativePackedRoot.WordData=>(x.1.1,List.ofFn
(fun i : Fin tags=>_root_.Integration9_9.TM2NativePackedRoot.word x (metadata.taggedSlots i).1.val (metadata.taggedSlots i).2.castSucc.val)))
(show Poly (_root_.Integration9_9.TM2NativePackedRoot.signedMass tags) from ⟨machine⟩) (by fun_prop)
refine ⟨h.program.congr _ (fun x=>?_)⟩
simp only [Function.comp_apply,_root_.Integration9_9.TM2NativePackedRoot.signedMass,_root_.Integration9_9.TM2NativePackedRoot.signed,_root_.CurrentAFT.RationalPackedRootProgram.signed,
List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some]
def summand {r s kept tags : ℕ} (order : ℕ) (metadata : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags)
(arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) (x : _root_.Integration9_9.TM2NativePackedRoot.WordRequest) : ℚ :=
_root_.CurrentAFT.RationalPackedRootProgram.summand x.1.1.1.1.length x.1.1.1.2.length order x.1.1.2.1 metadata
(fun i=>x.1.1.2.2.1[i.val]?.getD 0) (fun i=>x.1.1.2.2.2[i.val]?.getD 0)
(fun g j=>_root_.Integration9_9.TM2NativePackedRoot.word x.1 g.val j.val) arity (fun i=>x.2.1[i.val]?.getD 0) (fun i=>x.2.2[i.val]?.getD 0)
theorem summand_poly {r s kept tags : ℕ} (order : ℕ) (metadata : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags)
(arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) (machine : PolyProgram Automatic.enc Ratio.encode (_root_.Integration9_9.TM2NativePackedRoot.signedMass tags)) :
Poly (_root_.Integration9_9.TM2NativePackedRoot.summand order metadata arity) := by
have hv:=_root_.Integration9_9.TM2NativePackedRoot.valid_poly metadata
have hc:=_root_.Integration9_9.TM2NativePackedRoot.control_poly metadata
have hu:=_root_.Integration9_9.TM2NativePackedRoot.untagged_poly metadata
have hs:=_root_.Integration9_9.TM2NativePackedRoot.signed_poly metadata machine
have hl:=_root_.Integration9_9.TM2NativePackedRoot.localProduct_poly order metadata arity
change Poly (fun x : _root_.Integration9_9.TM2NativePackedRoot.WordRequest=>if _root_.CurrentAFT.RationalPackedRootProgram.Valid x.1.1.1.1.length metadata
(fun g j=>_root_.Integration9_9.TM2NativePackedRoot.word x.1 g.val j.val) then _root_.Integration9_9.TM2NativePackedRoot.control metadata x.1*_root_.Integration9_9.TM2NativePackedRoot.untagged metadata x.1*_root_.Integration9_9.TM2NativePackedRoot.signed metadata x.1*
_root_.Integration9_9.TM2NativeRootGroupAlgebra.evaluate (_root_.Integration9_9.TM2NativePackedRoot.localProduct order metadata) arity x else 0)
have hvc : Poly (fun x : _root_.Integration9_9.TM2NativePackedRoot.WordRequest=>decide (_root_.CurrentAFT.RationalPackedRootProgram.Valid x.1.1.1.1.length metadata
(fun g j=>_root_.Integration9_9.TM2NativePackedRoot.word x.1 g.val j.val))) :=
Poly.comp (f := fun x : _root_.Integration9_9.TM2NativePackedRoot.WordData=>decide (_root_.CurrentAFT.RationalPackedRootProgram.Valid x.1.1.1.length metadata
(fun g j=>_root_.Integration9_9.TM2NativePackedRoot.word x g.val j.val))) (g := fun x : _root_.Integration9_9.TM2NativePackedRoot.WordRequest=>x.1) hv Poly.fst
have hb : Poly (fun x : _root_.Integration9_9.TM2NativePackedRoot.WordRequest=>_root_.Integration9_9.TM2NativePackedRoot.control metadata x.1*_root_.Integration9_9.TM2NativePackedRoot.untagged metadata x.1*_root_.Integration9_9.TM2NativePackedRoot.signed metadata x.1*
_root_.Integration9_9.TM2NativeRootGroupAlgebra.evaluate (_root_.Integration9_9.TM2NativePackedRoot.localProduct order metadata) arity x) := by fun_prop
exact Poly.ite_prop hvc hb (Automatic.Poly.const 0)
def current {r s kept tags : ℕ} (order : ℕ) (metadata : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags)
(arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) (x : _root_.Integration9_9.TM2NativePackedRoot.Request) : ℚ :=
((_root_.Integration9_9.TM2NativeTupleEnumeration.tuples (((r+s)+kept)*3) (List.range (_root_.Integration9_9.TM2NativeBodyKernel.paletteTicks x.1.1.1).length)).map
(fun source=>_root_.Integration9_9.TM2NativePackedRoot.summand order metadata arity ((x.1,source),x.2))).sum
noncomputable def currentFactory {r s kept tags : ℕ} (order : ℕ)
(metadata : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order)
(machine : PolyProgram Automatic.enc Ratio.encode (_root_.Integration9_9.TM2NativePackedRoot.signedMass tags)) :
PolyProgram Automatic.enc Ratio.encode (_root_.Integration9_9.TM2NativePackedRoot.current order metadata arity) := by
have ht : Poly (fun x : _root_.Integration9_9.TM2NativePackedRoot.Request×List ℕ=>_root_.Integration9_9.TM2NativePackedRoot.summand order metadata arity ((x.1.1,x.2),x.1.2)) :=
Poly.comp (f := _root_.Integration9_9.TM2NativePackedRoot.summand order metadata arity) (g := fun x : _root_.Integration9_9.TM2NativePackedRoot.Request×List ℕ=>((x.1.1,x.2),x.1.2))
(_root_.Integration9_9.TM2NativePackedRoot.summand_poly order metadata arity machine) (by fun_prop)
have hi : Poly (fun x : _root_.Integration9_9.TM2NativePackedRoot.Request=>(x,_root_.Integration9_9.TM2NativeBodyKernel.paletteTicks x.1.1.1)) := by fun_prop
have hs : Poly (fun x : _root_.Integration9_9.TM2NativePackedRoot.Request×List Unit=>((_root_.Integration9_9.TM2NativeTupleEnumeration.tuples (((r+s)+kept)*3)
(List.range x.2.length)).map (fun source=>_root_.Integration9_9.TM2NativePackedRoot.summand order metadata arity ((x.1.1,source),x.1.2))).sum) :=
⟨_root_.Integration9_9.TM2NativeTupleEnumeration.sumProgram (((r+s)+kept)*3) ht.program⟩
have hp : Poly (_root_.Integration9_9.TM2NativePackedRoot.current order metadata arity) := by
unfold _root_.Integration9_9.TM2NativePackedRoot.current
exact Poly.comp (f := fun x : _root_.Integration9_9.TM2NativePackedRoot.Request×List Unit=>((_root_.Integration9_9.TM2NativeTupleEnumeration.tuples (((r+s)+kept)*3)
(List.range x.2.length)).map (fun source=>_root_.Integration9_9.TM2NativePackedRoot.summand order metadata arity ((x.1.1,source),x.1.2))).sum)
(g := fun x : _root_.Integration9_9.TM2NativePackedRoot.Request=>(x,_root_.Integration9_9.TM2NativeBodyKernel.paletteTicks x.1.1.1)) hs hi
exact hp.program
theorem word_ofFn {groups q : ℕ} (data : _root_.Integration9_9.TM2NativePackedRoot.Data) (source : Fin (groups*3)→Fin q)
(group : Fin groups) (slot : Fin 3) :
_root_.Integration9_9.TM2NativePackedRoot.word (data,List.ofFn (fun i=>(source i).val)) group.val slot.val=(source (finProdFinEquiv (group,slot))).val := by
have hi : group.val*3+slot.val=(finProdFinEquiv (group,slot)).val := by
simp only [finProdFinEquiv_apply_val]
omega
unfold _root_.Integration9_9.TM2NativePackedRoot.word
rw [hi]
simp only [List.getElem?_ofFn,dif_pos (finProdFinEquiv (group,slot)).isLt,Option.getD_some]
theorem current_value {r s kept tags : ℕ} (order : ℕ) (metadata : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags)
(arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) (x : _root_.Integration9_9.TM2NativePackedRoot.Request) : _root_.Integration9_9.TM2NativePackedRoot.current order metadata arity x=
_root_.CurrentAFT.RationalPackedRootProgram.current x.1.1.1.length x.1.1.2.length order x.1.2.1 metadata
(fun i=>x.1.2.2.1[i.val]?.getD 0) (fun i=>x.1.2.2.2[i.val]?.getD 0) arity
(fun i=>x.2.1[i.val]?.getD 0) (fun i=>x.2.2[i.val]?.getD 0) := by
rw [_root_.Integration9_9.TM2NativePackedRoot.current,_root_.Integration9_9.TM2NativeBodyKernel.paletteTicks_length,←_root_.CurrentAFT.CurrentRectangleIndex.colors_eq,
_root_.Integration9_9.TM2NativeTupleEnumeration.sum_tuples]
unfold _root_.CurrentAFT.RationalPackedRootProgram.current
let f := fun source : Fin (((r+s)+kept)*3)→Fin (_root_.CurrentAFT.CurrentRectangleIndex.colors x.1.1.1.length)=>
_root_.CurrentAFT.RationalPackedRootProgram.summand x.1.1.1.length x.1.1.2.length order x.1.2.1 metadata
(fun i=>x.1.2.2.1[i.val]?.getD 0) (fun i=>x.1.2.2.2[i.val]?.getD 0)
(fun g j=>(source (finProdFinEquiv (g,j))).val) arity
(fun i=>x.2.1[i.val]?.getD 0) (fun i=>x.2.2[i.val]?.getD 0)
have h:=((_root_.CurrentAFT.GroupSourcePadding.tupleEquiv (_root_.CurrentAFT.CurrentRectangleIndex.colors x.1.1.1.length)
(((r+s)+kept)*3) (_root_.CurrentAFT.CurrentRectangleIndex.colors_pos x.1.1.1.length)).symm.sum_comp f).symm
convert h using 1
· apply Finset.sum_congr rfl
intro source _
have hw : (fun g j=>_root_.Integration9_9.TM2NativePackedRoot.word (x.1,List.ofFn (fun i=>(source i).val)) g.val j.val)=
(fun (g : Fin ((r+s)+kept)) (j : Fin 3)=>(source (finProdFinEquiv (g,j))).val) := by
funext g j
exact _root_.Integration9_9.TM2NativePackedRoot.word_ofFn x.1 source g j
simp only [_root_.Integration9_9.TM2NativePackedRoot.summand,hw,f]
· rfl
/-- Entire grounded packed-root machine: local groups, inverse tensors,
control kernel, sparse signed cycle average, and one joint source-word sum. -/
noncomputable def currentProgram {r s kept tags : ℕ} (order : ℕ)
(metadata : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) :
PolyProgram Automatic.enc Ratio.encode (_root_.Integration9_9.TM2NativePackedRoot.current order metadata arity) :=
_root_.Integration9_9.TM2NativePackedRoot.currentFactory order metadata arity (_root_.Integration9_9.TM2NativeRootSignedMass.currentProgram tags)
end Integration9_9.TM2NativePackedRoot
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.BinaryRootMetadataSerializer
end CurrentAFT.BinaryRootMetadataSerializer
namespace CurrentAFT.BinaryRootMetadataSerializer.Result
end CurrentAFT.BinaryRootMetadataSerializer.Result
namespace CurrentAFT.BinaryRootMetadataSerializer.Result.mk
end CurrentAFT.BinaryRootMetadataSerializer.Result.mk
namespace CurrentAFT.BinaryRootMetadataSerializer.candidate
end CurrentAFT.BinaryRootMetadataSerializer.candidate
namespace CurrentAFT.BinaryRootMetadataSerializer.filter
end CurrentAFT.BinaryRootMetadataSerializer.filter
namespace CurrentAFT.BinaryRootMetadataSerializer.filter.match_1
end CurrentAFT.BinaryRootMetadataSerializer.filter.match_1
namespace CurrentAFT.BinaryRootMetadataSerializer.find
end CurrentAFT.BinaryRootMetadataSerializer.find
namespace CurrentAFT.BinaryRootMetadataSerializer.groupCount
end CurrentAFT.BinaryRootMetadataSerializer.groupCount
namespace CurrentAFT.BinaryRootMetadataSerializer.isKept
end CurrentAFT.BinaryRootMetadataSerializer.isKept
namespace CurrentAFT.BinaryRootMetadataSerializer.matchesBlock
end CurrentAFT.BinaryRootMetadataSerializer.matchesBlock
namespace CurrentAFT.BinaryRootMetadataSerializer.matchesBlock.match_1
end CurrentAFT.BinaryRootMetadataSerializer.matchesBlock.match_1
namespace CurrentAFT.BinaryRootMetadataSerializer.ordinaryMissing
end CurrentAFT.BinaryRootMetadataSerializer.ordinaryMissing
namespace CurrentAFT.BinaryRootMetadataSerializer.position
end CurrentAFT.BinaryRootMetadataSerializer.position
namespace CurrentAFT.BinaryRootMetadataSerializer.primaryMissing
end CurrentAFT.BinaryRootMetadataSerializer.primaryMissing
namespace CurrentAFT.BinaryRootMetadataSerializer.role
end CurrentAFT.BinaryRootMetadataSerializer.role
set_option autoImplicit false
set_option maxHeartbeats 1200000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
/-! Executed bounded root metadata serialization: retained roots, dynamic
roles, and first matching group/slot positions are computed from the actual
control and tag lists. All list loops are over materialized input lists. -/
namespace Integration9_9.TM2NativeRootMetadata
open AFT AFT.RationalNumerics AFT.BinaryArithmetic
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeFiniteSeries
open CurrentAFT.RationalRootGroupProgram (LocalRole)
attribute [local irreducible] CurrentAFT.BinaryFullResponseCounts.current
TM2NativeFullResponseCounts.leg TM2NativeFullResponseCounts.ordinary
abbrev Input := List Unit×((List ℕ×List ℕ)×List ℕ)
abbrev Result := List ℕ×List (ℕ×ℕ)
def legs (x : _root_.Integration9_9.TM2NativeRootMetadata.Input) : ℕ := _root_.Integration9_9.TM2NativeFullResponseCounts.leg x.1
def ordinary (x : _root_.Integration9_9.TM2NativeRootMetadata.Input) : ℕ := _root_.Integration9_9.TM2NativeFullResponseCounts.ordinary x.1
@[fun_prop] theorem legs_poly : Poly _root_.Integration9_9.TM2NativeRootMetadata.legs := by unfold _root_.Integration9_9.TM2NativeRootMetadata.legs;fun_prop
@[fun_prop] theorem ordinary_poly : Poly _root_.Integration9_9.TM2NativeRootMetadata.ordinary := by unfold _root_.Integration9_9.TM2NativeRootMetadata.ordinary;fun_prop
attribute [local irreducible] legs ordinary
def isKept (x : _root_.Integration9_9.TM2NativeRootMetadata.Input×ℕ) : Bool :=
((x.1.2.1.1.filter (fun p=>decide (x.2=p) || decide (x.2=_root_.Integration9_9.TM2NativeRootMetadata.legs x.1+p))).isEmpty) &&
((x.1.2.1.2.filter (fun b=>decide (x.2=_root_.Integration9_9.TM2NativeRootMetadata.legs x.1+_root_.Integration9_9.TM2NativeRootMetadata.legs x.1+b))).isEmpty)
@[fun_prop] theorem isKept_poly : Poly _root_.Integration9_9.TM2NativeRootMetadata.isKept := by unfold _root_.Integration9_9.TM2NativeRootMetadata.isKept;fun_prop
def kept (x : _root_.Integration9_9.TM2NativeRootMetadata.Input) : List ℕ := x.2.2.filter (fun block=>_root_.Integration9_9.TM2NativeRootMetadata.isKept (x,block))
@[fun_prop] theorem kept_poly : Poly _root_.Integration9_9.TM2NativeRootMetadata.kept := by unfold _root_.Integration9_9.TM2NativeRootMetadata.kept;fun_prop
attribute [local irreducible] isKept kept
def roleCode : _root_.CurrentAFT.RationalRootGroupProgram.LocalRole→ℕ
| .primary=>0 | .ordinary=>1 | .leg=>2 | .center=>3 | .queue=>4
def keptRole (x : _root_.Integration9_9.TM2NativeRootMetadata.Input×ℕ) : ℕ :=
if x.2<_root_.Integration9_9.TM2NativeRootMetadata.legs x.1 then 2 else if x.2<_root_.Integration9_9.TM2NativeRootMetadata.legs x.1+(_root_.Integration9_9.TM2NativeRootMetadata.legs x.1+_root_.Integration9_9.TM2NativeRootMetadata.ordinary x.1) then 3 else 4
@[fun_prop] theorem keptRole_poly : Poly _root_.Integration9_9.TM2NativeRootMetadata.keptRole := by unfold _root_.Integration9_9.TM2NativeRootMetadata.keptRole;fun_prop
attribute [local irreducible] keptRole
def roles (x : _root_.Integration9_9.TM2NativeRootMetadata.Input) : List ℕ :=
x.2.1.1.map (fun _=>0)++x.2.1.2.map (fun _=>1)++(_root_.Integration9_9.TM2NativeRootMetadata.kept x).map (fun block=>_root_.Integration9_9.TM2NativeRootMetadata.keptRole (x,block))
@[fun_prop] theorem roles_poly : Poly _root_.Integration9_9.TM2NativeRootMetadata.roles := by unfold _root_.Integration9_9.TM2NativeRootMetadata.roles;fun_prop
attribute [local irreducible] roles
def candidate (x : _root_.Integration9_9.TM2NativeRootMetadata.Input×(ℕ×ℕ)) : Bool×ℕ :=
if x.2.1<x.1.2.1.1.length then
(true,if x.2.2=0 then _root_.Integration9_9.TM2NativeRootMetadata.legs x.1+x.1.2.1.1[x.2.1]?.getD 0 else x.1.2.1.1[x.2.1]?.getD 0)
else if x.2.1<x.1.2.1.1.length+x.1.2.1.2.length then
(decide (x.2.2=0),_root_.Integration9_9.TM2NativeRootMetadata.legs x.1+_root_.Integration9_9.TM2NativeRootMetadata.legs x.1+x.1.2.1.2[x.2.1-x.1.2.1.1.length]?.getD 0)
else (decide (x.2.2=0),(_root_.Integration9_9.TM2NativeRootMetadata.kept x.1)[x.2.1-(x.1.2.1.1.length+x.1.2.1.2.length)]?.getD 0)
@[fun_prop] theorem candidate_poly : Poly _root_.Integration9_9.TM2NativeRootMetadata.candidate := by unfold _root_.Integration9_9.TM2NativeRootMetadata.candidate;fun_prop
attribute [local irreducible] candidate
def positionIndices (x : _root_.Integration9_9.TM2NativeRootMetadata.Input) : List ℕ := List.range (_root_.Integration9_9.TM2NativeRootMetadata.roles x++_root_.Integration9_9.TM2NativeRootMetadata.roles x).length
@[fun_prop] theorem positionIndices_poly : Poly _root_.Integration9_9.TM2NativeRootMetadata.positionIndices := by
unfold _root_.Integration9_9.TM2NativeRootMetadata.positionIndices
exact Poly.comp (f := fun xs : List ℕ=>List.range xs.length)
(g := fun x : _root_.Integration9_9.TM2NativeRootMetadata.Input=>_root_.Integration9_9.TM2NativeRootMetadata.roles x++_root_.Integration9_9.TM2NativeRootMetadata.roles x) (Poly.list_indices (α := ℕ)) (by fun_prop)
def matchesBlock (x : (_root_.Integration9_9.TM2NativeRootMetadata.Input×ℕ)×ℕ) : Bool :=
(_root_.Integration9_9.TM2NativeRootMetadata.candidate (x.1.1,(x.2/2,x.2%2))).1 && decide ((_root_.Integration9_9.TM2NativeRootMetadata.candidate (x.1.1,(x.2/2,x.2%2))).2=x.1.2)
@[fun_prop] theorem matchesBlock_poly : Poly _root_.Integration9_9.TM2NativeRootMetadata.matchesBlock := by unfold _root_.Integration9_9.TM2NativeRootMetadata.matchesBlock;fun_prop
def position (x : _root_.Integration9_9.TM2NativeRootMetadata.Input×ℕ) : ℕ :=
((_root_.Integration9_9.TM2NativeRootMetadata.positionIndices x.1).filter (fun i=>_root_.Integration9_9.TM2NativeRootMetadata.matchesBlock (x,i))).head?.getD 0
@[fun_prop] theorem position_poly : Poly _root_.Integration9_9.TM2NativeRootMetadata.position := by unfold _root_.Integration9_9.TM2NativeRootMetadata.position;fun_prop
def current (x : _root_.Integration9_9.TM2NativeRootMetadata.Input) : _root_.Integration9_9.TM2NativeRootMetadata.Result :=
(_root_.Integration9_9.TM2NativeRootMetadata.roles x,x.2.2.map (fun block=>let i:=_root_.Integration9_9.TM2NativeRootMetadata.position (x,block);(i/2,i%2)))
@[fun_prop] theorem current_poly : Poly _root_.Integration9_9.TM2NativeRootMetadata.current := by unfold _root_.Integration9_9.TM2NativeRootMetadata.current;fun_prop
theorem isKept_value (x : _root_.Integration9_9.TM2NativeRootMetadata.Input) (block : ℕ) : _root_.Integration9_9.TM2NativeRootMetadata.isKept (x,block)=true ↔
(∀p∈x.2.1.1,block≠p ∧ block≠_root_.Integration9_9.TM2NativeRootMetadata.legs x+p) ∧ ∀b∈x.2.1.2,block≠_root_.Integration9_9.TM2NativeRootMetadata.legs x+_root_.Integration9_9.TM2NativeRootMetadata.legs x+b := by
simp [_root_.Integration9_9.TM2NativeRootMetadata.isKept,List.filter_eq_nil_iff]
theorem roles_length (x : _root_.Integration9_9.TM2NativeRootMetadata.Input) : (_root_.Integration9_9.TM2NativeRootMetadata.roles x).length=(x.2.1.1.length+x.2.1.2.length)+(_root_.Integration9_9.TM2NativeRootMetadata.kept x).length := by
simp [_root_.Integration9_9.TM2NativeRootMetadata.roles,Nat.add_assoc]
abbrev nativeLegs (xs : List Unit) := (_root_.CurrentAFT.BinaryFullResponseCounts.current xs.length).leg
abbrev nativeOrdinary (xs : List Unit) := (_root_.CurrentAFT.BinaryFullResponseCounts.current xs.length).ordinary
abbrev nativeQueues (xs : List Unit) := (_root_.CurrentAFT.BinaryFullResponseCounts.current xs.length).queue
structure Context (r s tags : ℕ) where
security : List Unit
primary : Vector (Fin (_root_.Integration9_9.TM2NativeRootMetadata.nativeLegs security)) r
body : Vector (Fin (_root_.Integration9_9.TM2NativeRootMetadata.nativeOrdinary security)) s
tagged : Vector (Fin (_root_.CurrentAFT.BinaryRootMetadataSerializer.population
(_root_.Integration9_9.TM2NativeRootMetadata.nativeLegs security) (_root_.Integration9_9.TM2NativeRootMetadata.nativeOrdinary security) (_root_.Integration9_9.TM2NativeRootMetadata.nativeQueues security))) tags
def input {r s tags : ℕ} (x : _root_.Integration9_9.TM2NativeRootMetadata.Context r s tags) : _root_.Integration9_9.TM2NativeRootMetadata.Input :=
(x.security,((List.ofFn (fun i=>(x.primary.get i).val),List.ofFn (fun i=>(x.body.get i).val)),
List.ofFn (fun i=>(x.tagged.get i).val)))
theorem legs_input {r s tags : ℕ} (x : _root_.Integration9_9.TM2NativeRootMetadata.Context r s tags) : _root_.Integration9_9.TM2NativeRootMetadata.legs (_root_.Integration9_9.TM2NativeRootMetadata.input x)=_root_.Integration9_9.TM2NativeRootMetadata.nativeLegs x.security := by
simpa only [_root_.Integration9_9.TM2NativeRootMetadata.legs,_root_.Integration9_9.TM2NativeRootMetadata.input,_root_.Integration9_9.TM2NativeFullResponseCounts.value,_root_.Integration9_9.TM2NativeFullResponseCounts.nativeValue] using
_root_.Integration9_9.TM2NativeFullResponseCounts.value_native .leg x.security
theorem ordinary_input {r s tags : ℕ} (x : _root_.Integration9_9.TM2NativeRootMetadata.Context r s tags) : _root_.Integration9_9.TM2NativeRootMetadata.ordinary (_root_.Integration9_9.TM2NativeRootMetadata.input x)=_root_.Integration9_9.TM2NativeRootMetadata.nativeOrdinary x.security := by
simpa only [_root_.Integration9_9.TM2NativeRootMetadata.ordinary,_root_.Integration9_9.TM2NativeRootMetadata.input,_root_.Integration9_9.TM2NativeFullResponseCounts.value,_root_.Integration9_9.TM2NativeFullResponseCounts.nativeValue] using
_root_.Integration9_9.TM2NativeFullResponseCounts.value_native .ordinary x.security
theorem isKept_input {r s tags : ℕ} (x : _root_.Integration9_9.TM2NativeRootMetadata.Context r s tags)
(block : Fin (_root_.CurrentAFT.BinaryRootMetadataSerializer.population
(_root_.Integration9_9.TM2NativeRootMetadata.nativeLegs x.security) (_root_.Integration9_9.TM2NativeRootMetadata.nativeOrdinary x.security) (_root_.Integration9_9.TM2NativeRootMetadata.nativeQueues x.security))) :
_root_.Integration9_9.TM2NativeRootMetadata.isKept (_root_.Integration9_9.TM2NativeRootMetadata.input x,block.val)=
(_root_.CurrentAFT.BinaryRootMetadataSerializer.isKept x.primary x.body block).value := by
apply Bool.eq_iff_iff.mpr
rw [_root_.Integration9_9.TM2NativeRootMetadata.isKept_value,_root_.CurrentAFT.BinaryRootMetadataSerializer.isKept_value,_root_.Integration9_9.TM2NativeRootMetadata.legs_input]
simp only [_root_.Integration9_9.TM2NativeRootMetadata.input,List.mem_ofFn,forall_exists_index]
aesop
def retained {r s tags : ℕ} (x : _root_.Integration9_9.TM2NativeRootMetadata.Context r s tags) :=
(_root_.CurrentAFT.BinaryRootMetadataSerializer.kept x.primary x.body x.tagged).value
theorem kept_input {r s tags : ℕ} (x : _root_.Integration9_9.TM2NativeRootMetadata.Context r s tags) :
_root_.Integration9_9.TM2NativeRootMetadata.kept (_root_.Integration9_9.TM2NativeRootMetadata.input x)=(_root_.Integration9_9.TM2NativeRootMetadata.retained x).map Fin.val := by
rw [_root_.Integration9_9.TM2NativeRootMetadata.kept,_root_.Integration9_9.TM2NativeRootMetadata.retained,_root_.CurrentAFT.BinaryRootMetadataSerializer.kept_value]
change (List.ofFn (fun i=>(x.tagged.get i).val)).filter (fun block=>_root_.Integration9_9.TM2NativeRootMetadata.isKept (_root_.Integration9_9.TM2NativeRootMetadata.input x,block))=
(x.tagged.toList.filter (fun block =>
(_root_.CurrentAFT.BinaryRootMetadataSerializer.isKept x.primary x.body block).value)).map Fin.val
have hf : (List.ofFn (fun i=>(x.tagged.get i).val))=x.tagged.toList.map Fin.val := by
apply List.ext_getElem <;> simp
intro i hi
rfl
rw [hf,List.filter_map]
simp only [Function.comp_def,_root_.Integration9_9.TM2NativeRootMetadata.isKept_input]
theorem _root_.Integration9_9.TM2NativeRootMetadata.getD_ofFn {α : Type} {n : ℕ} (f : Fin n→α) (i : Fin n) (a0 : α) :
(List.ofFn f)[i.val]?.getD a0=f i := by simp
theorem matchesPair_input {r s tags : ℕ} (x : _root_.Integration9_9.TM2NativeRootMetadata.Context r s tags)
(group : Fin ((r+s)+(_root_.Integration9_9.TM2NativeRootMetadata.retained x).length)) (slot : Fin 2)
(block : ℕ) :
((_root_.Integration9_9.TM2NativeRootMetadata.candidate (_root_.Integration9_9.TM2NativeRootMetadata.input x,(group.val,slot.val))).1 && decide ((_root_.Integration9_9.TM2NativeRootMetadata.candidate (_root_.Integration9_9.TM2NativeRootMetadata.input x,(group.val,slot.val))).2=block))=
((_root_.CurrentAFT.BinaryRootMetadataSerializer.candidate x.primary x.body (_root_.Integration9_9.TM2NativeRootMetadata.retained x) group slot).value).any
(fun number=>decide (number=block)) := by
by_cases hp : group.val<r
· rw [_root_.InfoLossLARNativeSupplements.h8b1af35cb5128d1e.CurrentAFT.BinaryRootMetadataSerializer.candidate_primary x.primary x.body (_root_.Integration9_9.TM2NativeRootMetadata.retained x) group slot hp]
simp only [_root_.Integration9_9.TM2NativeRootMetadata.candidate]
rw [_root_.Integration9_9.TM2NativeRootMetadata.legs_input]
simp only [_root_.Integration9_9.TM2NativeRootMetadata.input,List.length_ofFn,if_pos hp]
have hv : (List.ofFn (fun i=>(x.primary.get i).val))[group.val]?.getD 0=(x.primary.get ⟨group.val,hp⟩).val := _root_.Integration9_9.TM2NativeRootMetadata.getD_ofFn _ ⟨_,hp⟩ _
rw [hv]
simp only [Option.any_some,Bool.true_and]
· by_cases hb : group.val<r+s
· rw [_root_.InfoLossLARNativeSupplements.hf63ab620f3c57a9b.CurrentAFT.BinaryRootMetadataSerializer.candidate_ordinary x.primary x.body (_root_.Integration9_9.TM2NativeRootMetadata.retained x) group slot hp hb]
simp only [_root_.Integration9_9.TM2NativeRootMetadata.candidate]
rw [_root_.Integration9_9.TM2NativeRootMetadata.legs_input]
simp only [_root_.Integration9_9.TM2NativeRootMetadata.input,List.length_ofFn,if_neg hp,if_pos hb]
have hi : group.val-r<s := by omega
have hv : (List.ofFn (fun i=>(x.body.get i).val))[group.val-r]?.getD 0=(x.body.get ⟨group.val-r,hi⟩).val := _root_.Integration9_9.TM2NativeRootMetadata.getD_ofFn _ ⟨_,hi⟩ _
rw [hv]
by_cases hs : slot.val=0 <;> simp [hs]
· rw [_root_.InfoLossLARNativeSupplements.h1ccc0b12a2e9b2e7.CurrentAFT.BinaryRootMetadataSerializer.candidate_kept x.primary x.body (_root_.Integration9_9.TM2NativeRootMetadata.retained x) group slot hb]
have hi : group.val-(r+s)<(_root_.Integration9_9.TM2NativeRootMetadata.retained x).length := by have := group.isLt;omega
have hv : ((_root_.Integration9_9.TM2NativeRootMetadata.retained x).map Fin.val)[group.val-(r+s)]?.getD 0=((_root_.Integration9_9.TM2NativeRootMetadata.retained x).get ⟨group.val-(r+s),hi⟩).val := by simp [List.getElem?_eq_getElem hi]
have hl1 : (_root_.Integration9_9.TM2NativeRootMetadata.input x).2.1.1.length=r := by simp [_root_.Integration9_9.TM2NativeRootMetadata.input]
have hl2 : (_root_.Integration9_9.TM2NativeRootMetadata.input x).2.1.2.length=s := by simp [_root_.Integration9_9.TM2NativeRootMetadata.input]
simp only [_root_.Integration9_9.TM2NativeRootMetadata.candidate,hl1,hl2,if_neg hp,if_neg hb]
rw [_root_.Integration9_9.TM2NativeRootMetadata.kept_input,hv]
by_cases hs : slot.val=0 <;> simp [hs]
theorem roles_length_input {r s tags : ℕ} (x : _root_.Integration9_9.TM2NativeRootMetadata.Context r s tags) :
(_root_.Integration9_9.TM2NativeRootMetadata.roles (_root_.Integration9_9.TM2NativeRootMetadata.input x)).length=(r+s)+(_root_.Integration9_9.TM2NativeRootMetadata.retained x).length := by
rw [_root_.Integration9_9.TM2NativeRootMetadata.roles_length,_root_.Integration9_9.TM2NativeRootMetadata.kept_input]
simp only [_root_.Integration9_9.TM2NativeRootMetadata.input,List.length_ofFn,List.length_map]
theorem matchesBlock_input {r s tags : ℕ} (x : _root_.Integration9_9.TM2NativeRootMetadata.Context r s tags)
(block : Fin (_root_.CurrentAFT.BinaryRootMetadataSerializer.population
(_root_.Integration9_9.TM2NativeRootMetadata.nativeLegs x.security) (_root_.Integration9_9.TM2NativeRootMetadata.nativeOrdinary x.security) (_root_.Integration9_9.TM2NativeRootMetadata.nativeQueues x.security)))
(index : Fin (((r+s)+(_root_.Integration9_9.TM2NativeRootMetadata.retained x).length)*2)) :
_root_.Integration9_9.TM2NativeRootMetadata.matchesBlock ((_root_.Integration9_9.TM2NativeRootMetadata.input x,block.val),index.val)=
(_root_.CurrentAFT.BinaryRootMetadataSerializer.matchesBlock x.primary x.body (_root_.Integration9_9.TM2NativeRootMetadata.retained x) block index).value := by
rw [_root_.InfoLossLARNativeSupplements.h3614eab28d16c434.CurrentAFT.BinaryRootMetadataSerializer.matchesBlock_value]
exact _root_.Integration9_9.TM2NativeRootMetadata.matchesPair_input x (finProdFinEquiv.symm index).1 (finProdFinEquiv.symm index).2 block.val
theorem position_input {r s tags : ℕ} (x : _root_.Integration9_9.TM2NativeRootMetadata.Context r s tags)
(block : Fin (_root_.CurrentAFT.BinaryRootMetadataSerializer.population
(_root_.Integration9_9.TM2NativeRootMetadata.nativeLegs x.security) (_root_.Integration9_9.TM2NativeRootMetadata.nativeOrdinary x.security) (_root_.Integration9_9.TM2NativeRootMetadata.nativeQueues x.security))) :
_root_.Integration9_9.TM2NativeRootMetadata.position (_root_.Integration9_9.TM2NativeRootMetadata.input x,block.val)=
((_root_.CurrentAFT.BinaryRootMetadataSerializer.position x.primary x.body (_root_.Integration9_9.TM2NativeRootMetadata.retained x) block).value.map Fin.val).getD 0 := by
have hr : _root_.Integration9_9.TM2NativeRootMetadata.positionIndices (_root_.Integration9_9.TM2NativeRootMetadata.input x)=List.range (((r+s)+(_root_.Integration9_9.TM2NativeRootMetadata.retained x).length)*2) := by
simp only [_root_.Integration9_9.TM2NativeRootMetadata.positionIndices,List.length_append,_root_.Integration9_9.TM2NativeRootMetadata.roles_length_input,Nat.mul_two]
have hm : List.range (((r+s)+(_root_.Integration9_9.TM2NativeRootMetadata.retained x).length)*2)=
(List.ofFn (id : Fin (((r+s)+(_root_.Integration9_9.TM2NativeRootMetadata.retained x).length)*2)→Fin (((r+s)+(_root_.Integration9_9.TM2NativeRootMetadata.retained x).length)*2))).map Fin.val := by
apply List.ext_getElem <;> simp
simp only [_root_.Integration9_9.TM2NativeRootMetadata.position,List.head?_filter,hr,hm,List.find?_map]
have hf : (List.ofFn (id : Fin (((r+s)+(_root_.Integration9_9.TM2NativeRootMetadata.retained x).length)*2)→Fin (((r+s)+(_root_.Integration9_9.TM2NativeRootMetadata.retained x).length)*2))).find?
(fun i=>_root_.Integration9_9.TM2NativeRootMetadata.matchesBlock ((_root_.Integration9_9.TM2NativeRootMetadata.input x,block.val),i.val))=
(_root_.CurrentAFT.BinaryRootMetadataSerializer.position x.primary x.body (_root_.Integration9_9.TM2NativeRootMetadata.retained x) block).value := by
simp only [_root_.CurrentAFT.BinaryRootMetadataSerializer.position,_root_.InfoLossLARNativeSupplements.h5aa51497de94248a.CurrentAFT.BinaryRootMetadataSerializer.find_value,
_root_.Integration9_9.TM2NativeRootMetadata.matchesBlock_input]
simpa only [Function.comp_def,hf]
theorem roles_input {r s tags : ℕ} (x : _root_.Integration9_9.TM2NativeRootMetadata.Context r s tags) :
_root_.Integration9_9.TM2NativeRootMetadata.roles (_root_.Integration9_9.TM2NativeRootMetadata.input x)=List.ofFn (fun group : Fin ((r+s)+(_root_.Integration9_9.TM2NativeRootMetadata.retained x).length)=>_root_.Integration9_9.TM2NativeRootMetadata.roleCode
((_root_.CurrentAFT.BinaryRootMetadataSerializer.role x.primary x.body (_root_.Integration9_9.TM2NativeRootMetadata.retained x) group).value)) := by
rw [_root_.Integration9_9.TM2NativeRootMetadata.roles,_root_.Integration9_9.TM2NativeRootMetadata.kept_input]
simp only [_root_.Integration9_9.TM2NativeRootMetadata.input,List.map_ofFn,List.map_map,Function.comp_def]
rw [List.ofFn_add (n := r+s) (m := (_root_.Integration9_9.TM2NativeRootMetadata.retained x).length),List.ofFn_add (n := r) (m := s)]
apply congrArg₂ List.append
· apply congrArg₂ List.append
· apply congrArg List.ofFn
funext i
rw [_root_.InfoLossLARNativeSupplements.had28d56c66c172c2.CurrentAFT.BinaryRootMetadataSerializer.role_primary x.primary x.body (_root_.Integration9_9.TM2NativeRootMetadata.retained x) _ (by exact i.isLt)]
rfl
· apply congrArg List.ofFn
funext i
rw [_root_.InfoLossLARNativeSupplements.h1c0aacbfbcab259c.CurrentAFT.BinaryRootMetadataSerializer.role_ordinary x.primary x.body (_root_.Integration9_9.TM2NativeRootMetadata.retained x) _ (by simp) (by simp)]
rfl
· change (_root_.Integration9_9.TM2NativeRootMetadata.retained x).map (fun block=>_root_.Integration9_9.TM2NativeRootMetadata.keptRole (_root_.Integration9_9.TM2NativeRootMetadata.input x,block.val))=
List.ofFn (fun i=>_root_.Integration9_9.TM2NativeRootMetadata.roleCode ((_root_.CurrentAFT.BinaryRootMetadataSerializer.role x.primary x.body (_root_.Integration9_9.TM2NativeRootMetadata.retained x) (Fin.natAdd (r+s) i)).value))
have hm : (_root_.Integration9_9.TM2NativeRootMetadata.retained x).map (fun block=>_root_.Integration9_9.TM2NativeRootMetadata.keptRole (_root_.Integration9_9.TM2NativeRootMetadata.input x,block.val))=
List.ofFn (fun i=>_root_.Integration9_9.TM2NativeRootMetadata.keptRole (_root_.Integration9_9.TM2NativeRootMetadata.input x,((_root_.Integration9_9.TM2NativeRootMetadata.retained x).get i).val)) := by
symm
simpa only [List.map_ofFn,Function.comp_def] using
congrArg (List.map (fun block=>_root_.Integration9_9.TM2NativeRootMetadata.keptRole (_root_.Integration9_9.TM2NativeRootMetadata.input x,block.val))) (List.ofFn_get (_root_.Integration9_9.TM2NativeRootMetadata.retained x))
rw [hm]
apply congrArg List.ofFn
funext i
rw [_root_.InfoLossLARNativeSupplements.h36433fb6e771176d.CurrentAFT.BinaryRootMetadataSerializer.role_kept x.primary x.body (_root_.Integration9_9.TM2NativeRootMetadata.retained x) _ (by simp)]
simp only [_root_.Integration9_9.TM2NativeRootMetadata.keptRole,_root_.Integration9_9.TM2NativeRootMetadata.legs_input,_root_.Integration9_9.TM2NativeRootMetadata.ordinary_input,Fin.natAdd,Nat.add_sub_cancel_left]
split_ifs <;> rfl
theorem _root_.Integration9_9.TM2NativeRootMetadata.option_fin_getD_val {n : ℕ} (h : 0<n) (value : Option (Fin n)) :
(value.map Fin.val).getD 0=(value.getD ⟨0,h⟩).val := by cases value <;> rfl
theorem tagSlot_input {r s tags : ℕ} (x : _root_.Integration9_9.TM2NativeRootMetadata.Context r s tags) (i : Fin tags) :
(_root_.Integration9_9.TM2NativeRootMetadata.position (_root_.Integration9_9.TM2NativeRootMetadata.input x,(x.tagged.get i).val)/2,_root_.Integration9_9.TM2NativeRootMetadata.position (_root_.Integration9_9.TM2NativeRootMetadata.input x,(x.tagged.get i).val)%2)=
(((_root_.CurrentAFT.BinaryRootMetadataSerializer.tagSlot x.primary x.body x.tagged i).value.1).val,
((_root_.CurrentAFT.BinaryRootMetadataSerializer.tagSlot x.primary x.body x.tagged i).value.2).val) := by
rw [_root_.Integration9_9.TM2NativeRootMetadata.position_input]
unfold _root_.CurrentAFT.BinaryRootMetadataSerializer.tagSlot
simp only [_root_.AFT.BinaryArithmetic.readVector_value,_root_.InfoLossLARNativeSupplements.hf7b606d7b6c71037.CurrentAFT.BinaryRootMetadataSerializer.splitIndex_value]
have hg : 0<((r+s)+(_root_.Integration9_9.TM2NativeRootMetadata.retained x).length)*2 := by
have h:=_root_.CurrentAFT.BinaryRootMetadataSerializer.groupCount_pos x.primary x.body x.tagged i
change 0<(r+s)+(_root_.Integration9_9.TM2NativeRootMetadata.retained x).length at h
omega
rw [_root_.Integration9_9.TM2NativeRootMetadata.option_fin_getD_val hg]
rfl
def nativeValue {r s tags : ℕ} (x : _root_.Integration9_9.TM2NativeRootMetadata.Context r s tags) : _root_.Integration9_9.TM2NativeRootMetadata.Result :=
let result:=_root_.CurrentAFT.BinaryRootMetadataSerializer.current x.primary x.body x.tagged
(List.ofFn (fun group=>_root_.Integration9_9.TM2NativeRootMetadata.roleCode (result.data.roles.get group)),
List.ofFn (fun i=>((result.data.tagged.get i).1.val,(result.data.tagged.get i).2.val)))
theorem current_value {r s tags : ℕ} (x : _root_.Integration9_9.TM2NativeRootMetadata.Context r s tags) : _root_.Integration9_9.TM2NativeRootMetadata.current (_root_.Integration9_9.TM2NativeRootMetadata.input x)=_root_.Integration9_9.TM2NativeRootMetadata.nativeValue x := by
apply Prod.ext
· change _root_.Integration9_9.TM2NativeRootMetadata.roles (_root_.Integration9_9.TM2NativeRootMetadata.input x)=_
simp only [_root_.Integration9_9.TM2NativeRootMetadata.nativeValue,_root_.InfoLossLARNativeSupplements.hdf21f91932116c35.CurrentAFT.BinaryRootMetadataSerializer.current_role]
exact _root_.Integration9_9.TM2NativeRootMetadata.roles_input x
· change (List.ofFn (fun i=>(x.tagged.get i).val)).map
(fun block=>(_root_.Integration9_9.TM2NativeRootMetadata.position (_root_.Integration9_9.TM2NativeRootMetadata.input x,block)/2,_root_.Integration9_9.TM2NativeRootMetadata.position (_root_.Integration9_9.TM2NativeRootMetadata.input x,block)%2))=_
simp only [List.map_ofFn,Function.comp_def,_root_.Integration9_9.TM2NativeRootMetadata.nativeValue,_root_.InfoLossLARNativeSupplements.hf05bd272bb1b56e1.CurrentAFT.BinaryRootMetadataSerializer.current_tagSlot]
apply congrArg List.ofFn
funext i
exact _root_.Integration9_9.TM2NativeRootMetadata.tagSlot_input x i
end Integration9_9.TM2NativeRootMetadata
end
section
set_option autoImplicit false
set_option maxHeartbeats 1000000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
/-! Finite exact dispatch on the bounded root metadata. Roles and group-slot
arrays have lengths bounded by the fixed calibration order. Each branch has
its own actual grounded packed-root machine; runtime metadata select exactly
one branch using implemented comparisons of the full input lists. -/
namespace Integration9_9.TM2NativeMetadataDispatch
open AFT CurrentAFT GradedControlAlgebra
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeRootGroupAlgebra TM2NativePackedRoot TM2NativeFiniteSeries TM2NativeSliceProbability
open scoped BigOperators
open RationalRootGroupProgram (LocalRole)
theorem _root_.Integration9_9.TM2NativeMetadataDispatch.constant_list_poly {β : Type} [Coding β] [DecidableEq β] [Inhabited β]
(he : Poly (fun x : β×β=>decide (x.1=x.2))) (target : List β) :
Poly (fun xs : List β=>decide (xs=target)) := by
have hall : Poly (fun xs : List β=>decide (∀i : Fin target.length,xs[i.val]?.getD default=target.get i)) := by
have h:=_root_.Integration9_9.TM2NativePackedRoot.finite_all_poly (Finset.univ : Finset (Fin target.length))
(fun i (xs : List β)=>xs[i.val]?.getD default=target.get i) (fun i _=>by
exact Poly.comp (f := fun x : β×β=>decide (x.1=x.2))
(g := fun xs : List β=>(xs[i.val]?.getD default,target.get i)) he (by fun_prop))
simpa only [Finset.mem_univ,forall_const] using h
have hlen : Poly (fun xs : List β=>decide (xs.length=target.length)) := by fun_prop
have h:=_root_.Integration9_9.TM2NativeSliceProbability.decide_and_poly hlen hall
refine ⟨h.program.congr _ (fun xs=>?_)⟩
apply Bool.eq_iff_iff.mpr
simp only [decide_eq_true_eq]
constructor
· rintro ⟨hlen,hv⟩
apply List.ext_getElem hlen
intro i hi ht
have h:=hv ⟨i,ht⟩
simpa only [List.getElem?_eq_getElem hi,Option.getD_some,List.get_eq_getElem] using h
· intro h
subst xs
exact ⟨rfl,by intro i;simp⟩
theorem nat_list_eq_poly (target : List ℕ) : Poly (fun xs : List ℕ=>decide (xs=target)) :=
_root_.Integration9_9.TM2NativeMetadataDispatch.constant_list_poly Poly.nat_eq target
theorem pair_list_eq_poly (target : List (ℕ×ℕ)) : Poly (fun xs : List (ℕ×ℕ)=>decide (xs=target)) := by
have h : Poly (fun x : (ℕ×ℕ)×(ℕ×ℕ)=>decide (x.1=x.2)) := by
have hp : Poly (fun x : (ℕ×ℕ)×(ℕ×ℕ)=>decide (x.1.1=x.2.1 ∧ x.1.2=x.2.2)) := by fun_prop
simpa only [Prod.ext_iff] using hp
exact _root_.Integration9_9.TM2NativeMetadataDispatch.constant_list_poly h target
instance _root_.Integration9_9.TM2NativeMetadataDispatch.roleFintype : Fintype _root_.CurrentAFT.RationalRootGroupProgram.LocalRole :=
Fintype.ofList [.primary,.ordinary,.leg,.center,.queue] (by intro x;cases x <;> simp)
def metadataEquiv (r s kept tags : ℕ) : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags ≃
((Fin ((r+s)+kept)→_root_.CurrentAFT.RationalRootGroupProgram.LocalRole)×(Fin tags→Fin ((r+s)+kept)×Fin 2)) where
toFun m := (m.roles,m.taggedSlots)
invFun p := ⟨p.1,p.2⟩
left_inv m := by cases m;rfl
right_inv p := by cases p;rfl
instance _root_.Integration9_9.TM2NativeMetadataDispatch.metadataFintype (r s kept tags : ℕ) : Fintype (_root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags) :=
Fintype.ofEquiv _ (_root_.Integration9_9.TM2NativeMetadataDispatch.metadataEquiv r s kept tags).symm
def metadataCode {r s kept tags : ℕ} (m : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags) : _root_.Integration9_9.TM2NativeRootMetadata.Result :=
(List.ofFn (fun i=>_root_.Integration9_9.TM2NativeRootMetadata.roleCode (m.roles i)),
List.ofFn (fun i=>((m.taggedSlots i).1.val,(m.taggedSlots i).2.val)))
theorem _root_.Integration9_9.TM2NativeMetadataDispatch.roleCode_injective : Function.Injective _root_.Integration9_9.TM2NativeRootMetadata.roleCode := by
intro a b h
cases a <;> cases b <;> simp [_root_.Integration9_9.TM2NativeRootMetadata.roleCode] at h ⊢
theorem metadataCode_injective (r s kept tags : ℕ) : Function.Injective (@_root_.Integration9_9.TM2NativeMetadataDispatch.metadataCode r s kept tags) := by
intro a b h
have hr:=congrArg Prod.fst h
have ht:=congrArg Prod.snd h
have hroles : a.roles=b.roles := by
funext i
apply _root_.Integration9_9.TM2NativeMetadataDispatch.roleCode_injective
have hh:=congrArg (fun xs : List ℕ=>xs[i.val]?.getD 0) hr
simpa only [_root_.Integration9_9.TM2NativeMetadataDispatch.metadataCode,List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some] using hh
have htagged : a.taggedSlots=b.taggedSlots := by
funext i
have hh:=congrArg (fun xs : List (ℕ×ℕ)=>xs[i.val]?.getD (0,0)) ht
simp only [_root_.Integration9_9.TM2NativeMetadataDispatch.metadataCode,List.getElem?_ofFn,Fin.isLt,dif_pos,Option.getD_some] at hh
exact Prod.ext (Fin.ext (congrArg Prod.fst hh)) (Fin.ext (congrArg Prod.snd hh))
cases a
cases b
congr
@[fun_prop] theorem matches_poly {r s kept tags : ℕ} (m : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags) :
Poly (fun raw : _root_.Integration9_9.TM2NativeRootMetadata.Result=>decide (raw=_root_.Integration9_9.TM2NativeMetadataDispatch.metadataCode m)) := by
have hr : Poly (fun raw : _root_.Integration9_9.TM2NativeRootMetadata.Result=>decide (raw.1=(_root_.Integration9_9.TM2NativeMetadataDispatch.metadataCode m).1)) :=
Poly.comp (f := fun xs : List ℕ=>decide (xs=(_root_.Integration9_9.TM2NativeMetadataDispatch.metadataCode m).1)) (g := Prod.fst) (_root_.Integration9_9.TM2NativeMetadataDispatch.nat_list_eq_poly _) Poly.fst
have ht : Poly (fun raw : _root_.Integration9_9.TM2NativeRootMetadata.Result=>decide (raw.2=(_root_.Integration9_9.TM2NativeMetadataDispatch.metadataCode m).2)) :=
Poly.comp (f := fun xs : List (ℕ×ℕ)=>decide (xs=(_root_.Integration9_9.TM2NativeMetadataDispatch.metadataCode m).2)) (g := Prod.snd) (_root_.Integration9_9.TM2NativeMetadataDispatch.pair_list_eq_poly _) Poly.snd
have h:=_root_.Integration9_9.TM2NativeSliceProbability.decide_and_poly hr ht
simpa only [←Prod.ext_iff] using h
abbrev Input := _root_.Integration9_9.TM2NativePackedRoot.Request×_root_.Integration9_9.TM2NativeRootMetadata.Result
def current (order r s kept tags : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) (x : _root_.Integration9_9.TM2NativeMetadataDispatch.Input) : ℚ :=
∑m : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags,
if x.2=_root_.Integration9_9.TM2NativeMetadataDispatch.metadataCode m then _root_.Integration9_9.TM2NativePackedRoot.current order m arity x.1 else 0
@[fun_prop] theorem current_poly (order r s kept tags : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) :
Poly (_root_.Integration9_9.TM2NativeMetadataDispatch.current order r s kept tags arity) := by
classical
unfold _root_.Integration9_9.TM2NativeMetadataDispatch.current
apply _root_.Integration9_9.TM2NativeRootGroupAlgebra.finite_sum_poly
intro m _
have ht : Poly (fun x : _root_.Integration9_9.TM2NativeMetadataDispatch.Input=>decide (x.2=_root_.Integration9_9.TM2NativeMetadataDispatch.metadataCode m)) := Poly.comp (_root_.Integration9_9.TM2NativeMetadataDispatch.matches_poly m) Poly.snd
have hv : Poly (fun x : _root_.Integration9_9.TM2NativeMetadataDispatch.Input=>_root_.Integration9_9.TM2NativePackedRoot.current order m arity x.1) :=
Poly.comp (f := _root_.Integration9_9.TM2NativePackedRoot.current order m arity) (g := Prod.fst)
(show Automatic.Poly (_root_.Integration9_9.TM2NativePackedRoot.current order m arity) from ⟨_root_.Integration9_9.TM2NativePackedRoot.currentProgram order m arity⟩) Poly.fst
exact Poly.ite_prop ht hv (Automatic.Poly.const 0)
theorem current_value (order r s kept tags : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order)
(m : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags) (x : _root_.Integration9_9.TM2NativePackedRoot.Request) :
_root_.Integration9_9.TM2NativeMetadataDispatch.current order r s kept tags arity (x,_root_.Integration9_9.TM2NativeMetadataDispatch.metadataCode m)=_root_.Integration9_9.TM2NativePackedRoot.current order m arity x := by
classical
unfold _root_.Integration9_9.TM2NativeMetadataDispatch.current
simp only [(_root_.Integration9_9.TM2NativeMetadataDispatch.metadataCode_injective r s kept tags).eq_iff]
simp
def bounded (order r s tags : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) (x : _root_.Integration9_9.TM2NativeMetadataDispatch.Input) : ℚ :=
∑kept : Fin (tags+1),_root_.Integration9_9.TM2NativeMetadataDispatch.current order r s kept.val tags arity x
@[fun_prop] theorem bounded_poly (order r s tags : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) :
Poly (_root_.Integration9_9.TM2NativeMetadataDispatch.bounded order r s tags arity) := by
unfold _root_.Integration9_9.TM2NativeMetadataDispatch.bounded
exact _root_.Integration9_9.TM2NativeRootGroupAlgebra.finite_sum_poly _ _ (fun kept _=>_root_.Integration9_9.TM2NativeMetadataDispatch.current_poly order r s kept.val tags arity)
theorem bounded_value (order r s kept tags : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order)
(hk : kept≤tags) (m : _root_.CurrentAFT.RationalPackedRootProgram.Metadata r s kept tags) (x : _root_.Integration9_9.TM2NativePackedRoot.Request) :
_root_.Integration9_9.TM2NativeMetadataDispatch.bounded order r s tags arity (x,_root_.Integration9_9.TM2NativeMetadataDispatch.metadataCode m)=_root_.Integration9_9.TM2NativePackedRoot.current order m arity x := by
classical
let chosen : Fin (tags+1):=⟨kept,by omega⟩
unfold _root_.Integration9_9.TM2NativeMetadataDispatch.bounded
rw [Finset.sum_eq_single chosen]
· exact _root_.Integration9_9.TM2NativeMetadataDispatch.current_value order r s kept tags arity m x
· intro other _ hother
unfold _root_.Integration9_9.TM2NativeMetadataDispatch.current
apply Finset.sum_eq_zero
intro n _
have hn : _root_.Integration9_9.TM2NativeMetadataDispatch.metadataCode m≠_root_.Integration9_9.TM2NativeMetadataDispatch.metadataCode n := by
intro h
have hl:=congrArg (fun raw : _root_.Integration9_9.TM2NativeRootMetadata.Result=>raw.1.length) h
simp only [_root_.Integration9_9.TM2NativeMetadataDispatch.metadataCode,List.length_ofFn] at hl
have he : other=chosen := Fin.ext (by dsimp only [chosen];omega)
exact hother he
simp only [if_neg hn]
· simp
abbrev TaggedInput := _root_.Integration9_9.TM2NativePackedRoot.Request×_root_.Integration9_9.TM2NativeRootMetadata.Input
def tagged (order r s tags : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) (x : _root_.Integration9_9.TM2NativeMetadataDispatch.TaggedInput) : ℚ :=
_root_.Integration9_9.TM2NativeMetadataDispatch.bounded order r s tags arity (x.1,_root_.Integration9_9.TM2NativeRootMetadata.current x.2)
@[fun_prop] theorem tagged_poly (order r s tags : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) :
Poly (_root_.Integration9_9.TM2NativeMetadataDispatch.tagged order r s tags arity) := by
unfold _root_.Integration9_9.TM2NativeMetadataDispatch.tagged
exact Poly.comp (f := _root_.Integration9_9.TM2NativeMetadataDispatch.bounded order r s tags arity)
(g := fun x : _root_.Integration9_9.TM2NativeMetadataDispatch.TaggedInput=>(x.1,_root_.Integration9_9.TM2NativeRootMetadata.current x.2)) (_root_.Integration9_9.TM2NativeMetadataDispatch.bounded_poly order r s tags arity) (by fun_prop)
theorem tagged_value (order r s tags : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order)
(data : _root_.Integration9_9.TM2NativeRootMetadata.Context r s tags) (x : _root_.Integration9_9.TM2NativePackedRoot.Request) :
_root_.Integration9_9.TM2NativeMetadataDispatch.tagged order r s tags arity (x,_root_.Integration9_9.TM2NativeRootMetadata.input data)=
_root_.Integration9_9.TM2NativePackedRoot.current order
(_root_.CurrentAFT.BinaryRootMetadataSerializer.current data.primary data.body data.tagged).data.metadata arity x := by
rw [_root_.Integration9_9.TM2NativeMetadataDispatch.tagged,_root_.Integration9_9.TM2NativeRootMetadata.current_value]
change _root_.Integration9_9.TM2NativeMetadataDispatch.bounded order r s tags arity
(x,_root_.Integration9_9.TM2NativeMetadataDispatch.metadataCode (_root_.CurrentAFT.BinaryRootMetadataSerializer.current data.primary data.body data.tagged).data.metadata)=_
exact _root_.Integration9_9.TM2NativeMetadataDispatch.bounded_value order r s _ tags arity
(_root_.InfoLossLARNativeSupplements.h92779a9b15e1ad74.CurrentAFT.BinaryRootMetadataSerializer.current_kept_le data.primary data.body data.tagged) _ x
def taggedBounded (order r s limit : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) (x : _root_.Integration9_9.TM2NativeMetadataDispatch.TaggedInput) : ℚ :=
∑tags : Fin (limit+1),if x.2.2.2.length=tags.val then _root_.Integration9_9.TM2NativeMetadataDispatch.tagged order r s tags.val arity x else 0
@[fun_prop] theorem taggedBounded_poly (order r s limit : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) :
Poly (_root_.Integration9_9.TM2NativeMetadataDispatch.taggedBounded order r s limit arity) := by
unfold _root_.Integration9_9.TM2NativeMetadataDispatch.taggedBounded
apply _root_.Integration9_9.TM2NativeRootGroupAlgebra.finite_sum_poly
intro tags _
have hv:=_root_.Integration9_9.TM2NativeMetadataDispatch.tagged_poly order r s tags.val arity
fun_prop
theorem taggedBounded_value (order r s limit tags : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order)
(ht : tags≤limit) (data : _root_.Integration9_9.TM2NativeRootMetadata.Context r s tags) (x : _root_.Integration9_9.TM2NativePackedRoot.Request) :
_root_.Integration9_9.TM2NativeMetadataDispatch.taggedBounded order r s limit arity (x,_root_.Integration9_9.TM2NativeRootMetadata.input data)=
_root_.Integration9_9.TM2NativePackedRoot.current order
(_root_.CurrentAFT.BinaryRootMetadataSerializer.current data.primary data.body data.tagged).data.metadata arity x := by
classical
have hl : (_root_.Integration9_9.TM2NativeRootMetadata.input data).2.2.length=tags := by simp [_root_.Integration9_9.TM2NativeRootMetadata.input]
unfold _root_.Integration9_9.TM2NativeMetadataDispatch.taggedBounded
simp only [hl]
rw [Finset.sum_eq_single (⟨tags,by omega⟩ : Fin (limit+1))]
· simp only [if_pos rfl]
exact _root_.Integration9_9.TM2NativeMetadataDispatch.tagged_value order r s tags arity data x
· intro other _ hother
have hn : tags≠other.val := by intro h;apply hother;exact Fin.ext h.symm
exact if_neg hn
· simp
end Integration9_9.TM2NativeMetadataDispatch
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.CountedBoundedRootTags
end CurrentAFT.CountedBoundedRootTags
namespace CurrentAFT.CountedBoundedRootTags.Tag
end CurrentAFT.CountedBoundedRootTags.Tag
namespace CurrentAFT.CountedBoundedRootTags.Tag.mk
end CurrentAFT.CountedBoundedRootTags.Tag.mk
namespace CurrentAFT.CountedBoundedRootTags.Tag.read
end CurrentAFT.CountedBoundedRootTags.Tag.read
namespace CurrentAFT.CountedBoundedRootTags.Tag.set
end CurrentAFT.CountedBoundedRootTags.Tag.set
namespace CurrentAFT.CountedBoundedRootTags.Tag.vector
end CurrentAFT.CountedBoundedRootTags.Tag.vector
namespace CurrentAFT.CountedBoundedRootTags.bounded_sum
end CurrentAFT.CountedBoundedRootTags.bounded_sum
namespace CurrentAFT.CountedBoundedRootTags.countPolynomial
end CurrentAFT.CountedBoundedRootTags.countPolynomial
namespace CurrentAFT.CountedBoundedRootTags.current
end CurrentAFT.CountedBoundedRootTags.current
namespace CurrentAFT.CountedBoundedRootTags.entry
end CurrentAFT.CountedBoundedRootTags.entry
namespace CurrentAFT.CountedBoundedRootTags.entryWorkBound
end CurrentAFT.CountedBoundedRootTags.entryWorkBound
namespace CurrentAFT.CountedBoundedRootTags.generationWorkPolynomial
end CurrentAFT.CountedBoundedRootTags.generationWorkPolynomial
namespace CurrentAFT.CountedBoundedRootTags.heightPolynomial
end CurrentAFT.CountedBoundedRootTags.heightPolynomial
namespace CurrentAFT.CountedBoundedRootTags.lengthBound
end CurrentAFT.CountedBoundedRootTags.lengthBound
namespace CurrentAFT.CountedBoundedRootTags.source
end CurrentAFT.CountedBoundedRootTags.source
namespace CurrentAFT.CountedBoundedRootTags.sum
end CurrentAFT.CountedBoundedRootTags.sum
namespace CurrentAFT.CountedBoundedRootTags.workBound
end CurrentAFT.CountedBoundedRootTags.workBound
namespace CurrentAFT.CountedBoundedRootTags.workPolynomial
end CurrentAFT.CountedBoundedRootTags.workPolynomial
set_option autoImplicit false
set_option maxHeartbeats 800000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
/-! Actual fixed-order strictly increasing root-tag enumeration. The machine
uses polynomially many tuples and the implemented increasing-word predicate;
its outputs are reindexed to the native bounded-subsequence algorithm. -/
namespace Integration9_9.TM2NativeRootTags
open AFT AFT.RationalNumerics AFT.BinaryArithmetic
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeFiniteSeries
open scoped BigOperators
open TM2NativeTupleEnumeration (tuples)
theorem mem_tuples (count : ℕ) (xs word : List ℕ) :
word∈_root_.Integration9_9.TM2NativeTupleEnumeration.tuples count xs ↔ word.length=count ∧ ∀a∈word,a∈xs := by
induction count generalizing word with
| zero => cases word <;> simp [_root_.Integration9_9.TM2NativeTupleEnumeration.tuples]
| succ count ih =>
cases word with
| nil => simp [_root_.Integration9_9.TM2NativeTupleEnumeration.tuples]
| cons head tail =>
constructor
· intro h
rcases List.mem_flatMap.mp h with ⟨a,ha,ht⟩
rcases List.mem_map.mp ht with ⟨t,hmember,he⟩
rcases List.cons.inj he with ⟨rfl,rfl⟩
rcases (ih t).mp hmember with ⟨hlen,hmem⟩
exact ⟨by simp [hlen],by simpa only [List.forall_mem_cons] using And.intro ha hmem⟩
· rintro ⟨hlen,hmem⟩
apply List.mem_flatMap.mpr
refine ⟨head,hmem head (by simp),List.mem_map.mpr ?_⟩
refine ⟨tail,(ih tail).mpr ⟨by simpa using Nat.succ.inj hlen,fun a ha=>hmem a (by simp [ha])⟩,rfl⟩
theorem tuples_nodup (count : ℕ) (xs : List ℕ) (hx : xs.Nodup) : (_root_.Integration9_9.TM2NativeTupleEnumeration.tuples count xs).Nodup := by
induction count with
| zero => simp [_root_.Integration9_9.TM2NativeTupleEnumeration.tuples]
| succ count ih =>
rw [_root_.Integration9_9.TM2NativeTupleEnumeration.tuples,List.nodup_flatMap]
constructor
· intro a _
exact List.Nodup.map (fun _ _ h => List.cons.inj h |>.2) ih
· exact hx.imp (fun {a b} hab word ha hb => by
rcases List.mem_map.mp ha with ⟨ta,_,rfl⟩
rcases List.mem_map.mp hb with ⟨tb,_,he⟩
exact hab (List.cons.inj he).1.symm)
def entry (count : ℕ) (xs : List Unit) : List (List ℕ) :=
(_root_.Integration9_9.TM2NativeTupleEnumeration.tuples count (List.range xs.length)).filter (_root_.Integration9_9.TM2NativeDistinctTuples.ordered true)
@[fun_prop] theorem entry_poly (count : ℕ) : Poly (_root_.Integration9_9.TM2NativeRootTags.entry count) := by unfold _root_.Integration9_9.TM2NativeRootTags.entry;fun_prop
theorem entry_perm (count : ℕ) (xs : List Unit) :
List.Perm (_root_.Integration9_9.TM2NativeRootTags.entry count xs) ((List.range xs.length).sublistsLen count) := by
apply (List.perm_ext_iff_of_nodup
((_root_.Integration9_9.TM2NativeRootTags.tuples_nodup count _ List.nodup_range).filter _)
(List.nodup_sublistsLen count List.nodup_range)).mpr
intro word
simp only [_root_.Integration9_9.TM2NativeRootTags.entry,List.mem_filter,_root_.Integration9_9.TM2NativeRootTags.mem_tuples,_root_.Integration9_9.TM2NativeDistinctTuples.increasing_value,List.mem_sublistsLen]
constructor
· rintro ⟨⟨hlen,hmem⟩,hincr⟩
exact ⟨List.sublist_of_subperm_of_pairwise (List.subperm_of_subset (hincr.imp (fun h=>ne_of_lt h)) hmem)
(hincr.imp (fun h=>le_of_lt h)) ((List.sortedLT_range _).pairwise.imp (fun h=>le_of_lt h)),hlen⟩
· rintro ⟨hsub,hlen⟩
exact ⟨⟨hlen,hsub.subset⟩,(List.sortedLT_range _).pairwise.sublist hsub⟩
def current (order : ℕ) (xs : List Unit) : List (List ℕ) :=
(List.range (order+1)).flatMap (fun count=>_root_.Integration9_9.TM2NativeRootTags.entry count xs)
@[fun_prop] theorem current_poly (order : ℕ) : Poly (_root_.Integration9_9.TM2NativeRootTags.current order) := by
induction order with
| zero =>
have hc : _root_.Integration9_9.TM2NativeRootTags.current 0=_root_.Integration9_9.TM2NativeRootTags.entry 0 := by funext xs;simp [_root_.Integration9_9.TM2NativeRootTags.current]
rw [hc]
exact _root_.Integration9_9.TM2NativeRootTags.entry_poly 0
| succ order ih =>
have he:=_root_.Integration9_9.TM2NativeRootTags.entry_poly (order+1)
have hc : _root_.Integration9_9.TM2NativeRootTags.current (order+1)=(fun xs=>_root_.Integration9_9.TM2NativeRootTags.current order xs++_root_.Integration9_9.TM2NativeRootTags.entry (order+1) xs) := by
funext xs
simp only [_root_.Integration9_9.TM2NativeRootTags.current,List.range_succ,List.flatMap_append,List.flatMap_singleton]
rw [hc]
fun_prop
theorem sublistsLen_map {α β : Type} (f : α→β) (count : ℕ) (xs : List α) :
(xs.map f).sublistsLen count=(xs.sublistsLen count).map (List.map f) := by
induction xs generalizing count with
| nil => cases count <;> simp
| cons a xs ih =>
cases count with
| zero => simp
| succ count => simp only [List.map_cons,List.sublistsLen_succ_cons,ih,List.map_append,List.map_map,Function.comp_def]
theorem _root_.Integration9_9.TM2NativeRootTags.range_of_finRange (pool : ℕ) : (List.finRange pool).map Fin.val=List.range pool := by
ext i
by_cases hi : i<pool <;> simp [hi,List.getElem?_eq_getElem]
abbrev tagWord {pool order : ℕ} (tag : _root_.CurrentAFT.CountedBoundedRootTags.Tag pool order) : List ℕ := tag.values.map Fin.val
theorem native_entry (pool order : ℕ) (size : Fin (order+1)) :
((_root_.CurrentAFT.CountedBoundedRootTags.entry pool order size).value.map _root_.Integration9_9.TM2NativeRootTags.tagWord)=
(List.range pool).sublistsLen size.val := by
unfold _root_.CurrentAFT.CountedBoundedRootTags.entry
simp only [List.map_map,_root_.Integration9_9.TM2NativeRootTags.tagWord,Function.comp_def]
rw [_root_.CurrentAFT.CountedBoundedRootTags.source_value]
have ha:=congrArg (List.map (List.map (Fin.val : Fin pool→ℕ)))
(List.attach_map_subtype_val (_root_.AFT.RationalNumerics.countedSubsequences size.val (List.finRange pool)).value)
simp only [List.map_map,Function.comp_def] at ha
rw [ha,_root_.AFT.RationalNumerics.countedSubsequences_value,←_root_.Integration9_9.TM2NativeRootTags.sublistsLen_map,_root_.Integration9_9.TM2NativeRootTags.range_of_finRange]
theorem _root_.Integration9_9.TM2NativeRootTags.flatMap_attach {α β : Type} (xs : List α) (f : α→List β) :
xs.attach.flatMap (fun x=>f x.val)=xs.flatMap f := by
have h:=congrArg (fun values : List α=>values.flatMap f) (List.attach_map_subtype_val xs)
simpa only [List.flatMap_map,Function.comp_def] using h
theorem native_current (pool order : ℕ) :
((_root_.CurrentAFT.CountedBoundedRootTags.current pool order).value.map _root_.Integration9_9.TM2NativeRootTags.tagWord)=
(List.range (order+1)).flatMap (fun size=>(List.range pool).sublistsLen size) := by
simp only [_root_.CurrentAFT.CountedBoundedRootTags.current,List.map_flatMap,List.flatMap_map,Function.comp_def,_root_.Integration9_9.TM2NativeRootTags.native_entry]
exact _root_.Integration9_9.TM2NativeRootTags.flatMap_attach (List.range (order+1)) (fun size => (List.range pool).sublistsLen size)
theorem current_perm (order : ℕ) (xs : List Unit) :
List.Perm (_root_.Integration9_9.TM2NativeRootTags.current order xs)
((_root_.CurrentAFT.CountedBoundedRootTags.current xs.length order).value.map _root_.Integration9_9.TM2NativeRootTags.tagWord) := by
rw [_root_.Integration9_9.TM2NativeRootTags.native_current,_root_.Integration9_9.TM2NativeRootTags.current]
exact List.Perm.flatMap (List.Perm.refl (List.range (order+1))) (fun count _=>_root_.Integration9_9.TM2NativeRootTags.entry_perm count xs)
def guarded {α : Type} (f : α×List ℕ→ℚ) (x : α×List ℕ) : ℚ := if 1<x.2.length then f x else 0
noncomputable def sumProgram {α : Type} [Coding α] (order : ℕ) {f : α×List ℕ→ℚ}
(leaf : PolyProgram Automatic.enc Ratio.encode f) : PolyProgram Automatic.enc Ratio.encode
(fun x : α×List Unit => ((_root_.Integration9_9.TM2NativeRootTags.current order x.2).map (fun word=>_root_.Integration9_9.TM2NativeRootTags.guarded f (x.1,word))).sum) := by
have hf : Poly f := ⟨leaf⟩
have hg : Poly (_root_.Integration9_9.TM2NativeRootTags.guarded f) := by unfold _root_.Integration9_9.TM2NativeRootTags.guarded;fun_prop
have hp : Poly (fun x : α×List Unit => ((_root_.Integration9_9.TM2NativeRootTags.current order x.2).map (fun word=>_root_.Integration9_9.TM2NativeRootTags.guarded f (x.1,word))).sum) := by fun_prop
exact hp.program
theorem sum_value {α : Type} (order : ℕ) (f : α×List ℕ→ℚ) (x : α×List Unit) :
((_root_.Integration9_9.TM2NativeRootTags.current order x.2).map (fun word=>_root_.Integration9_9.TM2NativeRootTags.guarded f (x.1,word))).sum=
(((_root_.CurrentAFT.CountedBoundedRootTags.current x.2.length order).value).map
(fun tag=>if 2≤tag.set.card then f (x.1,_root_.Integration9_9.TM2NativeRootTags.tagWord tag) else 0)).sum := by
have h:=List.Perm.sum_eq ((_root_.Integration9_9.TM2NativeRootTags.current_perm order x.2).map (fun word=>_root_.Integration9_9.TM2NativeRootTags.guarded f (x.1,word)))
rw [List.map_map] at h
convert h using 1
apply congrArg List.sum
apply List.map_congr_left
intro tag _
simp only [Function.comp_def,_root_.Integration9_9.TM2NativeRootTags.guarded,_root_.Integration9_9.TM2NativeRootTags.tagWord,List.length_map,_root_.InfoLossLARNativeSupplements.h78d75bb492074482.CurrentAFT.CountedBoundedRootTags.Tag.card]
congr 1
end Integration9_9.TM2NativeRootTags
end
section
namespace CurrentAFT
end CurrentAFT
namespace CurrentAFT.BinaryRootMetadataSerializer
end CurrentAFT.BinaryRootMetadataSerializer
namespace CurrentAFT.BinaryRootMetadataSerializer.countEquiv
end CurrentAFT.BinaryRootMetadataSerializer.countEquiv
namespace CurrentAFT.BinaryRootMetadataSerializer.tagBlockEquiv
end CurrentAFT.BinaryRootMetadataSerializer.tagBlockEquiv
set_option autoImplicit false
set_option maxHeartbeats 1200000
set_option maxRecDepth 10000
set_option synthInstance.maxSize 1024
set_option backward.isDefEq.respectTransparency false
/-! Complete selection/tag response before averaging control choices. Every
bounded tag is generated by the actual increasing-word machine, its metadata
are actually serialized, and the whole joint packed-root machine is run. -/
namespace Integration9_9.TM2NativeSelectedResponse
open AFT AFT.RationalNumerics AFT.BinaryArithmetic CurrentAFT GradedControlAlgebra
open OAI.MetricKMedian.Binary OAI.MetricKMedian.Binary.Automatic
open TM2NativeRootGroupAlgebra TM2NativeFiniteSeries
open scoped BigOperators
attribute [local irreducible] BinaryFullResponseCounts.current TM2NativeFullResponseCounts.slots
RationalPackedRootProgram.current
abbrev Meta := _root_.Integration9_9.TM2NativePackedRoot.Meta
abbrev Input := _root_.Integration9_9.TM2NativePackedRoot.Request×(List ℕ×List ℕ)
def tagInput (x : _root_.Integration9_9.TM2NativeSelectedResponse.Input×List ℕ) : _root_.Integration9_9.TM2NativeMetadataDispatch.TaggedInput :=
(x.1.1,(x.1.1.1.1.1,(x.1.2,x.2)))
@[fun_prop] theorem tagInput_poly : Poly _root_.Integration9_9.TM2NativeSelectedResponse.tagInput := by unfold _root_.Integration9_9.TM2NativeSelectedResponse.tagInput;fun_prop
def tagged (order r s : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) (x : _root_.Integration9_9.TM2NativeSelectedResponse.Input×List ℕ) : ℚ :=
_root_.Integration9_9.TM2NativeMetadataDispatch.taggedBounded order r s order arity (_root_.Integration9_9.TM2NativeSelectedResponse.tagInput x)
@[fun_prop] theorem tagged_poly (order r s : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) : Poly (_root_.Integration9_9.TM2NativeSelectedResponse.tagged order r s arity) := by
unfold _root_.Integration9_9.TM2NativeSelectedResponse.tagged
exact Poly.comp (f := _root_.Integration9_9.TM2NativeMetadataDispatch.taggedBounded order r s order arity) (g := _root_.Integration9_9.TM2NativeSelectedResponse.tagInput)
(_root_.Integration9_9.TM2NativeMetadataDispatch.taggedBounded_poly order r s order arity) _root_.Integration9_9.TM2NativeSelectedResponse.tagInput_poly
def tagSum (order r s : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) (x : _root_.Integration9_9.TM2NativeSelectedResponse.Input) : ℚ :=
((_root_.Integration9_9.TM2NativeRootTags.current order (_root_.Integration9_9.TM2NativeFullResponseCounts.slots .body x.1.1.1.1)).map
(fun word=>_root_.Integration9_9.TM2NativeRootTags.guarded (_root_.Integration9_9.TM2NativeSelectedResponse.tagged order r s arity) (x,word))).sum
@[fun_prop] theorem tagSum_poly (order r s : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) : Poly (_root_.Integration9_9.TM2NativeSelectedResponse.tagSum order r s arity) := by
have hs : Poly (fun x : _root_.Integration9_9.TM2NativeSelectedResponse.Input×List Unit=>((_root_.Integration9_9.TM2NativeRootTags.current order x.2).map
(fun word=>_root_.Integration9_9.TM2NativeRootTags.guarded (_root_.Integration9_9.TM2NativeSelectedResponse.tagged order r s arity) (x.1,word))).sum) :=
⟨_root_.Integration9_9.TM2NativeRootTags.sumProgram order (_root_.Integration9_9.TM2NativeSelectedResponse.tagged_poly order r s arity).program⟩
unfold _root_.Integration9_9.TM2NativeSelectedResponse.tagSum
exact Poly.comp (f := fun x : _root_.Integration9_9.TM2NativeSelectedResponse.Input×List Unit=>((_root_.Integration9_9.TM2NativeRootTags.current order x.2).map
(fun word=>_root_.Integration9_9.TM2NativeRootTags.guarded (_root_.Integration9_9.TM2NativeSelectedResponse.tagged order r s arity) (x.1,word))).sum)
(g := fun x : _root_.Integration9_9.TM2NativeSelectedResponse.Input=>(x,_root_.Integration9_9.TM2NativeFullResponseCounts.slots .body x.1.1.1.1)) hs (by fun_prop)
def current (order r s : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) (x : _root_.Integration9_9.TM2NativeSelectedResponse.Input) : ℚ :=
_root_.Integration9_9.TM2NativeSelectedResponse.tagged order r s arity (x,[])+_root_.Integration9_9.TM2NativeSelectedResponse.tagSum order r s arity x
@[fun_prop] theorem current_poly (order r s : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) : Poly (_root_.Integration9_9.TM2NativeSelectedResponse.current order r s arity) := by
unfold _root_.Integration9_9.TM2NativeSelectedResponse.current
have ht:=_root_.Integration9_9.TM2NativeSelectedResponse.tagged_poly order r s arity
have hs:=_root_.Integration9_9.TM2NativeSelectedResponse.tagSum_poly order r s arity
fun_prop
noncomputable def currentProgram (order r s : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) :
PolyProgram Automatic.enc Ratio.encode (_root_.Integration9_9.TM2NativeSelectedResponse.current order r s arity) := (_root_.Integration9_9.TM2NativeSelectedResponse.current_poly order r s arity).program
def input {r s : ℕ} (params : _root_.Integration9_9.TM2NativeSelectedResponse.Meta) (queue : ℤ) (sources outputs : List ℕ×List ℕ)
(primary : Vector (Fin (_root_.CurrentAFT.BinaryFullResponseCounts.current params.1.length).leg) r)
(body : Vector (Fin (_root_.CurrentAFT.BinaryFullResponseCounts.current params.1.length).ordinary) s) : _root_.Integration9_9.TM2NativeSelectedResponse.Input :=
(((params,(queue,sources)),outputs),
(List.ofFn (fun i=>(primary.get i).val),List.ofFn (fun i=>(body.get i).val)))
def metadataContext {r s order : ℕ} (xs : List Unit)
(primary : Vector (Fin (_root_.CurrentAFT.BinaryFullResponseCounts.current xs.length).leg) r)
(body : Vector (Fin (_root_.CurrentAFT.BinaryFullResponseCounts.current xs.length).ordinary) s)
(tag : _root_.CurrentAFT.CountedBoundedRootTags.Tag (_root_.CurrentAFT.BinaryFullResponseCounts.current xs.length).body order) :
_root_.Integration9_9.TM2NativeRootMetadata.Context r s tag.values.length :=
⟨xs,primary,body,_root_.CurrentAFT.BinaryRootMetadataSerializer.nativeTag tag⟩
theorem metadataContext_input {r s order : ℕ} (xs : List Unit)
(primary : Vector (Fin (_root_.CurrentAFT.BinaryFullResponseCounts.current xs.length).leg) r)
(body : Vector (Fin (_root_.CurrentAFT.BinaryFullResponseCounts.current xs.length).ordinary) s)
(tag : _root_.CurrentAFT.CountedBoundedRootTags.Tag (_root_.CurrentAFT.BinaryFullResponseCounts.current xs.length).body order) :
_root_.Integration9_9.TM2NativeRootMetadata.input (_root_.Integration9_9.TM2NativeSelectedResponse.metadataContext xs primary body tag)=
(xs,((List.ofFn (fun i=>(primary.get i).val),List.ofFn (fun i=>(body.get i).val)),_root_.Integration9_9.TM2NativeRootTags.tagWord tag)) := by
unfold _root_.Integration9_9.TM2NativeRootMetadata.input _root_.Integration9_9.TM2NativeSelectedResponse.metadataContext
simp only [_root_.InfoLossLARNativeSupplements.h7211ad64e277ecd6.CurrentAFT.BinaryRootMetadataSerializer.nativeTag_get,Fin.val_cast,_root_.CurrentAFT.CountedBoundedRootTags.Tag.vector,Vector.get_ofFn]
congr 2
simpa only [List.map_ofFn,Function.comp_def] using
congrArg (List.map (Fin.val : Fin (_root_.CurrentAFT.BinaryFullResponseCounts.current xs.length).body→ℕ)) (List.ofFn_get tag.values)
theorem tagged_value {r s : ℕ} (order : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) (params : _root_.Integration9_9.TM2NativeSelectedResponse.Meta) (queue : ℤ)
(sources outputs : List ℕ×List ℕ)
(primary : Vector (Fin (_root_.CurrentAFT.BinaryFullResponseCounts.current params.1.length).leg) r)
(body : Vector (Fin (_root_.CurrentAFT.BinaryFullResponseCounts.current params.1.length).ordinary) s)
(tag : _root_.CurrentAFT.CountedBoundedRootTags.Tag (_root_.CurrentAFT.BinaryFullResponseCounts.current params.1.length).body order) :
_root_.Integration9_9.TM2NativeSelectedResponse.tagged order r s arity (_root_.Integration9_9.TM2NativeSelectedResponse.input params queue sources outputs primary body,_root_.Integration9_9.TM2NativeRootTags.tagWord tag)=
_root_.CurrentAFT.RationalPackedRootProgram.current params.1.length params.2.length order queue
(_root_.CurrentAFT.BinaryRootMetadataSerializer.current primary body (_root_.CurrentAFT.BinaryRootMetadataSerializer.nativeTag tag)).data.metadata
(fun i=>sources.1[i.val]?.getD 0) (fun i=>sources.2[i.val]?.getD 0) arity
(fun i=>outputs.1[i.val]?.getD 0) (fun i=>outputs.2[i.val]?.getD 0) := by
have h:=_root_.Integration9_9.TM2NativeMetadataDispatch.taggedBounded_value order r s order tag.values.length arity tag.bounded
(_root_.Integration9_9.TM2NativeSelectedResponse.metadataContext params.1 primary body tag) ((params,(queue,sources)),outputs)
rw [_root_.Integration9_9.TM2NativeSelectedResponse.metadataContext_input] at h
rw [_root_.Integration9_9.TM2NativePackedRoot.current_value] at h
exact h
/-- This is a finite-sum reindexing lemma only. The auxiliary literals are
used to invoke the native enumeration identity; the executable producer is
already compiled independently above and never evaluates this proof witness. -/
theorem _root_.Integration9_9.TM2NativeSelectedResponse.tag_sum_reindex {Index : Type} [Fintype Index] [DecidableEq Index]
(population order : ℕ) (e : Fin population≃Index)
(f : _root_.CurrentAFT.CountedBoundedRootTags.Tag population order→ℚ) (value : Finset Index→ℚ)
(hf : ∀tag,f tag=value (e.finsetCongr tag.set)) :
(((_root_.CurrentAFT.CountedBoundedRootTags.current population order).value).map
(fun tag=>if 2≤tag.set.card then f tag else 0)).sum=
∑selected∈(_root_.CurrentAFT.FullResponseEnumeration.boundedSubsets Index order).filter (fun selected=>2 ≤ selected.card),value selected := by
classical
let code := fun tag=>Classical.choose (_root_.InfoLossLARNativeSupplements.h7fd26e43562bbe30.AFT.BinaryArithmetic.RationalBits.exists_code (f tag))
have hc : ∀tag,(code tag).decode=f tag := fun tag=>Classical.choose_spec (_root_.InfoLossLARNativeSupplements.h7fd26e43562bbe30.AFT.BinaryArithmetic.RationalBits.exists_code (f tag))
let kernel := fun tag=>(⟨code tag,0⟩ : _root_.AFT.BinaryArithmetic.RationalResult)
have h:=_root_.InfoLossLARNativeSupplements.h5a83c4211de0d052.CurrentAFT.CountedBoundedRootTags.sum_value_equiv population order e kernel value (fun tag=>(hc tag).trans (hf tag))
simpa only [_root_.CurrentAFT.CountedBoundedRootTags.sum,_root_.InfoLossLARNativeSupplements.hab90893a8a9293a2.CurrentAFT.BinaryListSum.current_value,_root_.InfoLossLARNativeSupplements.h2c50018e32584610.CurrentAFT.CountedBoundedRootTags.guarded_value,kernel,hc] using h
theorem tagSum_value {r s : ℕ} (order : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) (params : _root_.Integration9_9.TM2NativeSelectedResponse.Meta) (queue : ℤ)
(sources outputs : List ℕ×List ℕ)
(primary : Vector (Fin (_root_.CurrentAFT.BinaryFullResponseCounts.current params.1.length).leg) r)
(body : Vector (Fin (_root_.CurrentAFT.BinaryFullResponseCounts.current params.1.length).ordinary) s)
(hp : Function.Injective primary.get) (hb : Function.Injective body.get) :
_root_.Integration9_9.TM2NativeSelectedResponse.tagSum order r s arity (_root_.Integration9_9.TM2NativeSelectedResponse.input params queue sources outputs primary body)=
∑tagged∈_root_.CurrentAFT.RationalFullResponseProgram.tags params.1.length order,
_root_.CurrentAFT.RationalPackedRootProgram.current params.1.length params.2.length order queue
(_root_.CurrentAFT.RationalPackedRootProgram.actualMetadata
(_root_.CurrentAFT.RationalFullResponseProgram.selection params.1.length r s (_root_.CurrentAFT.BinaryRootMetadataSerializer.actualChoice primary body hp hb)) tagged)
(fun i=>sources.1[i.val]?.getD 0) (fun i=>sources.2[i.val]?.getD 0) arity
(fun i=>outputs.1[i.val]?.getD 0) (fun i=>outputs.2[i.val]?.getD 0) := by
classical
let x:=_root_.Integration9_9.TM2NativeSelectedResponse.input params queue sources outputs primary body
have hs:=_root_.Integration9_9.TM2NativeRootTags.sum_value order (_root_.Integration9_9.TM2NativeSelectedResponse.tagged order r s arity)
(x,_root_.Integration9_9.TM2NativeFullResponseCounts.slots .body params.1)
rw [_root_.Integration9_9.TM2NativeFullResponseCounts.slots_native_length] at hs
change _root_.Integration9_9.TM2NativeSelectedResponse.tagSum order r s arity x=_
rw [show _root_.Integration9_9.TM2NativeSelectedResponse.tagSum order r s arity x=
((_root_.Integration9_9.TM2NativeRootTags.current order (_root_.Integration9_9.TM2NativeFullResponseCounts.slots .body params.1)).map
(fun word=>_root_.Integration9_9.TM2NativeRootTags.guarded (_root_.Integration9_9.TM2NativeSelectedResponse.tagged order r s arity) (x,word))).sum from rfl,hs]
apply _root_.Integration9_9.TM2NativeSelectedResponse.tag_sum_reindex _ order (_root_.CurrentAFT.BinaryRootMetadataSerializer.tagBlockEquiv params.1.length)
intro tag
rw [_root_.Integration9_9.TM2NativeSelectedResponse.tagged_value]
rw [_root_.InfoLossLARNativeSupplements.he41810aeef644de7.CurrentAFT.BinaryRootMetadataSerializer.current_rational_native params.2.length order queue primary body hp hb tag]
rfl
theorem current_value {r s : ℕ} (order : ℕ) (arity : _root_.CurrentAFT.GradedControlAlgebra.TruncatedArity order) (params : _root_.Integration9_9.TM2NativeSelectedResponse.Meta) (queue : ℤ)
(sources outputs : List ℕ×List ℕ)
(primary : Vector (Fin (_root_.CurrentAFT.BinaryFullResponseCounts.current params.1.length).leg) r)
(body : Vector (Fin (_root_.CurrentAFT.BinaryFullResponseCounts.current params.1.length).ordinary) s)
(hp : Function.Injective primary.get) (hb : Function.Injective body.get) :
_root_.Integration9_9.TM2NativeSelectedResponse.current order r s arity (_root_.Integration9_9.TM2NativeSelectedResponse.input params queue sources outputs primary body)=
_root_.CurrentAFT.RationalFullResponseProgram.selected params.2.length order queue
(_root_.CurrentAFT.RationalFullResponseProgram.selection params.1.length r s (_root_.CurrentAFT.BinaryRootMetadataSerializer.actualChoice primary body hp hb))
(fun i=>sources.1[i.val]?.getD 0) (fun i=>sources.2[i.val]?.getD 0) arity
(fun i=>outputs.1[i.val]?.getD 0) (fun i=>outputs.2[i.val]?.getD 0) := by
classical
let empty : _root_.CurrentAFT.CountedBoundedRootTags.Tag (_root_.CurrentAFT.BinaryFullResponseCounts.current params.1.length).body order :=
⟨[],by simp,Nat.zero_le _⟩
have he:=_root_.Integration9_9.TM2NativeSelectedResponse.tagged_value order arity params queue sources outputs primary body empty
rw [_root_.InfoLossLARNativeSupplements.he41810aeef644de7.CurrentAFT.BinaryRootMetadataSerializer.current_rational_native params.2.length order queue primary body hp hb empty] at he
simpa only [_root_.Integration9_9.TM2NativeSelectedResponse.current,_root_.Integration9_9.TM2NativeSelectedResponse.tagSum_value order arity params queue sources outputs primary body hp hb,
_root_.Integration9_9.TM2NativeRootTags.tagWord,empty,List.map_nil,_root_.CurrentAFT.BinaryRootMetadataSerializer.tagBlocks,
_root_.CurrentAFT.CountedBoundedRootTags.Tag.set,List.toFinset_nil,Finset.map_empty,_root_.CurrentAFT.RationalFullResponseProgram.selected] using
congrArg (fun z=>z+_root_.Integration9_9.TM2NativeSelectedResponse.tagSum order r s arity (_root_.Integration9_9.TM2NativeSelectedResponse.input params queue sources outputs primary body)) he
end Integration9_9.TM2NativeSelectedResponse
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 da04c8cb873ec84908ec95e74925d831214a9d4d5f9aa41e4cb1610851241e43. Source modules: Integration9_9_TM2NativeRootGroupOrdinary, Integration9_9_TM2NativeRootGroupLegMass, Integration9_9_TM2NativeRootGroupPrimary, Integration9_9_TM2NativeRootGroupLeg, Integration9_9_TM2NativeRootGroup, Integration9_9_TM2NativeCycleTouched, Integration9_9_TM2NativeCycleRanks, Integration9_9_TM2NativeCycleEvaluation, Integration9_9_TM2NativeCycleAverage, Integration9_9_TM2NativeRootSignedMass, Integration9_9_TM2NativeWeightedPoint, Integration9_9_TM2NativePackedRoot, Integration9_9_TM2NativeRootMetadata, Integration9_9_TM2NativeMetadataDispatch, Integration9_9_TM2NativeRootTags, Integration9_9_TM2NativeSelectedResponse. 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 28b4dfecc5ef2f1661618f301f8bc4d2b3822982a9be70e0bc486ede3b2fcff9. Native10/11 split fallback keeps every original scope-closed data body unchanged and retains the canonical module names as import facades. Current source SHA256 28b4dfecc5ef2f1661618f301f8bc4d2b3822982a9be70e0bc486ede3b2fcff9.