diff --git a/research/k8-commutation-ceiling-seed26/LAMBDA-1007.json b/research/k8-commutation-ceiling-seed26/LAMBDA-1007.json new file mode 100644 index 0000000000..fa9984b6d6 --- /dev/null +++ b/research/k8-commutation-ceiling-seed26/LAMBDA-1007.json @@ -0,0 +1,971 @@ +{ +"a_factor_of_base_hi": "1007/1000", +"denominator_bits": 40, +"lam": { +"1281": 18508687, +"1282": 18508687, +"1283": 18508687, +"1284": 18508687, +"1287": 3298535, +"1289": 18508687, +"1290": 18508687, +"1291": 3298535, +"1293": 18508687, +"1294": 18508687, +"1295": 3298535, +"1297": 3298535, +"1437": 18508687, +"1438": 18508687, +"1443": 18508687, +"1444": 18508687, +"1445": 3298535, +"1447": 18508687, +"1448": 18508687, +"1449": 3298535, +"1451": 3298535, +"1591": 18508687, +"1592": 18508687, +"1597": 18508687, +"1598": 18508687, +"1599": 3298535, +"1601": 18508687, +"1602": 18508687, +"1603": 3298535, +"1605": 3298535, +"1745": 18508687, +"1746": 18508687, +"1751": 18508687, +"1752": 18508687, +"1753": 3298535, +"1755": 18508687, +"1756": 18508687, +"1757": 3298535, +"1759": 3298535, +"1899": 18508687, +"1900": 18508687, +"1905": 18508687, +"1906": 18508687, +"1907": 3298535, +"1909": 18508687, +"1910": 18508687, +"1911": 3298535, +"1913": 3298535, +"2053": 18508687, +"2054": 18508687, +"2059": 18508687, +"2060": 18508687, +"2061": 3298535, +"2063": 18508687, +"2064": 18508687, +"2065": 3298535, +"2067": 3298535, +"2205": 18508687, +"2206": 18508687, +"2207": 18508687, +"2208": 18508687, +"2211": 3298535, +"2213": 18508687, +"2214": 18508687, +"2215": 3298535, +"2217": 18508687, +"2218": 18508687, +"2219": 3298535, +"2221": 3298535, +"2359": 18508687, +"2360": 18508687, +"2361": 18508687, +"2362": 18508687, +"2365": 3298535, +"2367": 18508687, +"2368": 18508687, +"2369": 3298535, +"2371": 18508687, +"2372": 18508687, +"2373": 3298535, +"2375": 3298535, +"2513": 18508687, +"2514": 18508687, +"2515": 18508687, +"2516": 18508687, +"2519": 3298535, +"2521": 18508687, +"2522": 18508687, +"2523": 3298535, +"2525": 18508687, +"2526": 18508687, +"2527": 3298535, +"2529": 3298535, +"2667": 18508687, +"2668": 18508687, +"2669": 18508687, +"2670": 18508687, +"2673": 3298535, +"2675": 18508687, +"2676": 18508687, +"2677": 3298535, +"2679": 18508687, +"2680": 18508687, +"2681": 3298535, +"2683": 3298535, +"2821": 18508687, +"2822": 18508687, +"2823": 18508687, +"2824": 18508687, +"2827": 3298535, +"2829": 18508687, +"2830": 18508687, +"2831": 3298535, +"2833": 18508687, +"2834": 18508687, +"2835": 3298535, +"2837": 3298535, +"2977": 18508687, +"2978": 18508687, +"2981": 3298535, +"2983": 18508687, +"2984": 18508687, +"2985": 3298535, +"2987": 18508687, +"2988": 18508687, +"2989": 3298535, +"2991": 3298535, +"3131": 18508687, +"3132": 18508687, +"3135": 3298535, +"3137": 18508687, +"3138": 18508687, +"3139": 3298535, +"3141": 18508687, +"3142": 18508687, +"3143": 3298535, +"3145": 3298535, +"3283": 18508687, +"3284": 18508687, +"3285": 18508687, +"3286": 18508687, +"3289": 3298535, +"3291": 18508687, +"3292": 18508687, +"3293": 3298535, +"3295": 18508687, +"3296": 18508687, +"3297": 3298535, +"3299": 3298535, +"3468": -203396, +"3472": -203396, +"3476": -203396, +"3480": -203396, +"3489": -193277, +"3494": -193277, +"3495": -118413, +"3501": 35623558, +"3734": 7280219, +"3735": 7280219, +"3736": 7280219, +"3737": 7280219, +"3738": 7280219, +"3739": 8198834, +"3740": 7280219, +"3741": 7280219, +"3742": 8198834, +"3743": 7280219, +"3744": 7280219, +"3745": 8198834, +"3746": 7280219, +"3747": 7280219, +"3748": 7280219, +"3749": 7280219, +"3750": 7280219, +"3751": 8098941, +"3752": 7280219, +"3753": 7280219, +"3754": 8098941, +"3755": 7280219, +"3756": 7280219, +"3757": 8098941, +"3758": 8755368, +"3759": 8755368, +"3760": 8755368, +"3761": 8755368, +"3762": 8755368, +"3763": 8198834, +"3764": 8755368, +"3765": 8755368, +"3766": 8198834, +"3767": 8755368, +"3768": 8755368, +"3769": 8198834, +"3770": 7280219, +"3771": 7280219, +"3772": 7280219, +"3773": 7280219, +"3774": 7280219, +"3775": 8098941, +"3776": 7280219, +"3777": 7280219, +"3778": 8098941, +"3779": 7280219, +"3780": 7280219, +"3781": 8098941, +"3787": 7280219, +"3788": 7280219, +"3789": 7280219, +"3790": 7280219, +"3791": 7280219, +"3792": 8198834, +"3793": 7280219, +"3794": 7280219, +"3795": 8198834, +"3796": 7280219, +"3797": 7280219, +"3798": 8198834, +"3799": 8755368, +"3800": 8755368, +"3801": 8755368, +"3802": 8755368, +"3803": 8755368, +"3804": 8198834, +"3805": 8755368, +"3806": 8755368, +"3807": 8198834, +"3808": 8755368, +"3809": 8755368, +"3810": 8198834, +"3811": 7280219, +"3812": 7280219, +"3813": 7280219, +"3814": 7280219, +"3815": 7280219, +"3816": 8198834, +"3817": 7280219, +"3818": 7280219, +"3819": 8198834, +"3820": 7280219, +"3821": 7280219, +"3822": 8198834, +"3871": 8755368, +"3872": 8755368, +"3873": 8755368, +"3874": 8755368, +"3875": 8755368, +"3876": 8198834, +"3877": 8755368, +"3878": 8755368, +"3879": 8198834, +"3880": 8755368, +"3881": 8755368, +"3882": 8198834, +"3910": 35623558, +"3937": 34353570, +"3955": 35623558, +"3972": 104530, +"3979": 22523805, +"3980": 22523805, +"3982": 22523805, +"3984": 24721395, +"3985": 24721395, +"3986": 24721395, +"3987": 35829997, +"3988": 35829997, +"3989": 35829997, +"3990": 24624222, +"3991": 24624222, +"3992": 24624222, +"3994": 30869353, +"3995": 30869353, +"3997": 30869353, +"4000": 22523805, +"4001": 22523805, +"4003": 22523805, +"4005": 24721395, +"4006": 24721395, +"4007": 24721395, +"4008": 35829997, +"4009": 35829997, +"4010": 35829997, +"4011": 24624222, +"4012": 24624222, +"4013": 24624222, +"4015": 30869353, +"4016": 30869353, +"4018": 30869353, +"4021": 22523805, +"4022": 22523805, +"4024": 22523805, +"4026": 24721395, +"4027": 24721395, +"4028": 24721395, +"4029": 35829997, +"4030": 35829997, +"4031": 35829997, +"4032": 24624222, +"4033": 24624222, +"4034": 24624222, +"4036": 30869353, +"4037": 30869353, +"4039": 30869353, +"4042": 22523805, +"4043": 22523805, +"4045": 22523805, +"4047": 24721395, +"4048": 24721395, +"4049": 24721395, +"4050": 35829997, +"4051": 35829997, +"4052": 35829997, +"4053": 24624222, +"4054": 24624222, +"4055": 24624222, +"4057": 30869353, +"4058": 30869353, +"4060": 30869353, +"4063": 22523805, +"4064": 22523805, +"4066": 22523805, +"4068": 24721395, +"4069": 24721395, +"4070": 24721395, +"4071": 35829997, +"4072": 35829997, +"4073": 35829997, +"4074": 24624222, +"4075": 24624222, +"4076": 24624222, +"4078": 30869353, +"4079": 30869353, +"4081": 30869353, +"4084": 22523805, +"4085": 22523805, +"4087": 22523805, +"4089": 24721395, +"4090": 24721395, +"4091": 24721395, +"4092": 35829997, +"4093": 35829997, +"4094": 35829997, +"4095": 24624222, +"4096": 24624222, +"4097": 24624222, +"4099": 30869353, +"4100": 30869353, +"4102": 30869353, +"4105": 22523805, +"4106": 22523805, +"4108": 22523805, +"4110": 24721395, +"4111": 24721395, +"4112": 24721395, +"4113": 35829997, +"4114": 35829997, +"4115": 35829997, +"4116": 24624222, +"4117": 24624222, +"4118": 24624222, +"4120": 30869353, +"4121": 30869353, +"4123": 30869353, +"4126": 22523805, +"4127": 22523805, +"4129": 22523805, +"4131": 24721395, +"4132": 24721395, +"4133": 24721395, +"4134": 35829997, +"4135": 35829997, +"4136": 35829997, +"4137": 24624222, +"4138": 24624222, +"4139": 24624222, +"4141": 30869353, +"4142": 30869353, +"4144": 30869353, +"4146": 29180567, +"4147": 29122452, +"4148": 29180567, +"4149": 29122452, +"4150": 29180567, +"4151": 29122452, +"4152": 29180567, +"4153": 29122452, +"4175": 35757873, +"4176": 4664833, +"4177": 35788565, +"4178": 15246070, +"4179": 15246070, +"4180": 15519998, +"4181": 15519998, +"4186": 24822910, +"4188": 24823667, +"4193": 35754943, +"4194": 35494787, +"4195": 35734225, +"4196": 35635105, +"4197": 15519998, +"4198": 15519998, +"4199": 15246070, +"4200": 9026575, +"4206": 24822910, +"4208": 24823667, +"4214": 35757873, +"4215": 4664833, +"4216": 35788565, +"4217": 40659235, +"4218": 40659235, +"4219": 40659235, +"4220": 40659235, +"4226": 36185961, +"4228": 24823667, +"4233": 35754943, +"4234": 35494787, +"4235": 35734225, +"4236": 35635105, +"4237": 40659235, +"4238": 40659235, +"4239": 40659235, +"4240": 40659235, +"4246": 36185961, +"4248": 36198197, +"4254": 35757873, +"4255": 4664833, +"4256": 35788565, +"4257": 15519998, +"4258": 15519998, +"4259": 15519998, +"4260": 15519998, +"4261": 15519998, +"4262": 15519998, +"4263": 15519998, +"4264": 15519998, +"4265": 37281786, +"4266": 36354963, +"4271": 35754943, +"4272": 35494787, +"4273": 35734225, +"4274": 35635105, +"4275": 15519998, +"4276": 15519998, +"4277": 15519998, +"4278": 15519998, +"4279": 15519998, +"4280": 15519998, +"4281": 15519998, +"4282": 15519998, +"4283": 37281786, +"4284": 57790485, +"4290": 35757873, +"4291": 4664833, +"4292": 35788565, +"4293": 34336232, +"4294": 34336232, +"4295": 36422408, +"4296": 36422408, +"4297": 15519998, +"4298": 15519998, +"4299": 15519998, +"4300": 15519998, +"4301": 20901181, +"4302": 36354963, +"4307": 35754943, +"4308": 35494787, +"4309": 35734225, +"4310": 35635105, +"4311": 36422408, +"4312": 36422408, +"4313": 34336232, +"4314": 34336232, +"4315": 15519998, +"4316": 15519998, +"4317": 15519998, +"4318": 15519998, +"4319": 20901181, +"4320": 36354963, +"4321": 34336232, +"4322": 34336232, +"4323": 36422408, +"4324": 36422408, +"4325": 40659235, +"4326": 40659235, +"4327": 40659235, +"4328": 40659235, +"4329": 36422408, +"4330": 36422408, +"4331": 34336232, +"4332": 34336232, +"4333": 40659235, +"4334": 40659235, +"4335": 40659235, +"4336": 40659235, +"4337": 31979335, +"4338": 35928596, +"4339": 35935785, +"4340": 31979335, +"4341": 35726333, +"4342": 35935785, +"4343": 29322542, +"4344": 31979335, +"4345": 35726333, +"4346": 35935785, +"4347": 29322542, +"4348": 29322542, +"4349": 31979335, +"4350": 35928596, +"4351": 35935785, +"4352": 31979335, +"4353": 35726333, +"4354": 35935785, +"4355": 35864530, +"4356": 35839531, +"4357": 29760645, +"4358": 35933172, +"4359": 24587431, +"4360": 24624239, +"4361": 29760645, +"4362": 35933172, +"4363": 35864530, +"4364": 35839531, +"4365": 30912658, +"4366": 28106017, +"4367": 35933172, +"4368": 24587431, +"4369": 24624239, +"4370": 30912658, +"4371": 28106017, +"4372": 29586508, +"4373": 29099714, +"4374": 35864530, +"4375": 35839531, +"4376": 24624239, +"4377": 28582868, +"4378": 24624559, +"4379": 24587431, +"4380": 24624239, +"4381": 24624239, +"4382": 28582868, +"4383": 24421232, +"4384": 28582868, +"4385": 35864530, +"4386": 35839531, +"4387": 24624239, +"4388": 24624559, +"4389": 24587431, +"4390": 24624239, +"4391": 24624239, +"4392": 24624559, +"4393": 3298535, +"4394": 2332416, +"4395": 3298535, +"4396": 2332416, +"4397": 3298535, +"4398": 2332416, +"4399": 3298535, +"4400": 2332416, +"4401": 3298535, +"4402": 3298535, +"4403": 3298535, +"4404": 3298535, +"4405": 9184629, +"4406": 9184629, +"4407": 9184629, +"4408": 9184629, +"4409": 3298535, +"4410": 3298535, +"4411": 3298535, +"4412": 3298535, +"4413": 9184629, +"4414": 9184629, +"4415": 9184629, +"4416": 9184629, +"4417": 9026575, +"4418": 9026575, +"4419": 9026575, +"4420": 9026575, +"4421": 9184629, +"4422": 9184629, +"4423": 9184629, +"4424": 9184629, +"4425": 9026575, +"4426": 9026575, +"4427": 9026575, +"4428": 9026575, +"4429": 9184629, +"4430": 9184629, +"4431": 9184629, +"4432": 9184629, +"4433": 35969188, +"4434": 35969188, +"4435": 35969188, +"4436": 40659235, +"4437": 3298535, +"4438": 3298535, +"4439": 3298535, +"4440": 3298535, +"4441": 35709628, +"4442": 35709628, +"4443": 35709628, +"4444": 35709628, +"4445": 3298535, +"4446": 3298535, +"4447": 3298535, +"4448": 3298535, +"4449": 12220314, +"4450": 12220314, +"4451": 12220314, +"4452": 12220314, +"4453": 12220314, +"4454": 12220314, +"4455": 12220314, +"4456": 12220314, +"4457": 11054105, +"4458": 11054105, +"4459": 11169345, +"4460": 11054105, +"4461": 10101900, +"4462": 9922616, +"4463": 9922616, +"4464": 9922616, +"4465": 35709628, +"4466": 35709628, +"4467": 35709628, +"4468": 35709628, +"4469": 7927064, +"4470": 6785301, +"4471": 6785301, +"4472": 6785301, +"4473": 35709628, +"4474": 35709628, +"4475": 35709628, +"4476": 35709628, +"4477": 7927064, +"4478": 6785301, +"4479": 6785301, +"4480": 6785301, +"4481": 35709628, +"4482": 35709628, +"4483": 35709628, +"4484": 35709628, +"4485": 35709628, +"4486": 35709628, +"4487": 35709628, +"4488": 35709628, +"4489": 35709628, +"4490": 35709628, +"4491": 35709628, +"4492": 35709628, +"4493": 35709628, +"4494": 35709628, +"4495": 35709628, +"4496": 35709628, +"4497": 3298535, +"4498": 3298535, +"4499": 5031783, +"4500": 3298535, +"4501": 5031783, +"4503": 3298535, +"4504": 3298535, +"4505": -1904410, +"4506": -1904410, +"4507": -1904410, +"4508": -3298535, +"4509": -3807566, +"4510": -5630951, +"4511": -5630951, +"4512": -5630951, +"4545": 23488114, +"4546": 23488114, +"4547": 23488114, +"4553": 1649267, +"4554": 1649267, +"4555": 1649267, +"4556": 255143, +"4557": -3807566, +"4558": -5630951, +"4559": -5630951, +"4560": -5630951, +"4569": -794625, +"4570": -794625, +"4571": -853441, +"4572": -1089238, +"4573": -1640610, +"4574": -2290165, +"4575": -2290165, +"4576": -2290165, +"4577": 1649267, +"4578": 1649267, +"4579": 1649267, +"4580": 255143, +"4581": -3702600, +"4582": -3389677, +"4583": -3389677, +"4584": -3389677, +"4585": 1649267, +"4586": 1649267, +"4587": 1649267, +"4588": 255143, +"4589": -3702600, +"4590": -3389677, +"4591": -3389677, +"4592": -3389677, +"4593": 1649267, +"4594": 1649267, +"4595": 1649267, +"4596": 255143, +"4597": 2467990, +"4598": 3157434, +"4599": 3157434, +"4600": 3157434, +"4601": 1649267, +"4602": 1649267, +"4603": 1649267, +"4604": 255143, +"4605": 2467990, +"4606": 3157434, +"4607": 3157434, +"4608": 3157434, +"4609": -1904410, +"4610": -1904410, +"4611": -1904410, +"4612": -3298535, +"4613": -3807566, +"4614": -5630951, +"4615": -5630951, +"4616": -5630951, +"4617": 25021324, +"4618": 35723226, +"4619": 24887931, +"4620": 35777656, +"4621": 29341930, +"4622": 25156714, +"4623": 35132043, +"4624": 25156714, +"4625": 36478707, +"4626": 35916808, +"4627": 36050187, +"4628": 36013744, +"4629": 29341930, +"4630": 25156714, +"4631": 35132043, +"4632": 25156714, +"4633": 25021324, +"4634": 35723226, +"4635": 24887931, +"4636": 35777656, +"4637": 30771365, +"4638": 25193643, +"4639": 35132043, +"4640": 25156714, +"4641": 36478707, +"4642": 35916808, +"4643": 36050187, +"4644": 36013744, +"4645": 30771365, +"4646": 25193643, +"4647": 29922347, +"4648": 26834286, +"4649": 25021324, +"4650": 35723226, +"4651": 24887931, +"4652": 35777656, +"4653": 36371868, +"4654": 25193643, +"4655": 36371868, +"4656": 36035625, +"4657": 36478707, +"4658": 35916808, +"4659": 36050187, +"4660": 36013744, +"4661": 36371868, +"4662": 25193643, +"4663": 36371868, +"4664": 25193643, +"4665": 25021324, +"4666": 35723226, +"4667": 24887931, +"4668": 35777656, +"4669": 36371868, +"4670": 36035625, +"4671": 36371868, +"4672": 36035625, +"4673": 36478707, +"4674": 35916808, +"4675": 36050187, +"4676": 36013744, +"4677": 36371868, +"4678": 36035625, +"4679": 36371868, +"4680": 36035625, +"4865": 19245390, +"4866": 17423258, +"4869": 19245390, +"4870": 17423258, +"4873": 19245390, +"4874": 17423258, +"4877": 17070968, +"4878": 19860472, +"4897": 18508687, +"4898": 18508687, +"4901": 18508687, +"4902": 18508687, +"4905": 18508687, +"4906": 18508687, +"4909": 18508687, +"4910": 18508687, +"4929": 18508687, +"4930": 18508687, +"4933": 18508687, +"4934": 18508687, +"4937": 18508687, +"4938": 18508687, +"4941": 18508687, +"4942": 18508687, +"4961": 18508687, +"4962": 18508687, +"4965": 18508687, +"4966": 18508687, +"4969": 18508687, +"4970": 18508687, +"4973": 18508687, +"4974": 18508687, +"4993": 18508687, +"4994": 18508687, +"4997": 18508687, +"4998": 18508687, +"5001": 18508687, +"5002": 18508687, +"5005": 18508687, +"5006": 18508687, +"5017": -1904410, +"5018": 1904410, +"5025": 18508687, +"5026": 18508687, +"5029": 18508687, +"5030": 18508687, +"5033": 18508687, +"5034": 18508687, +"5037": 18508687, +"5038": 18508687, +"5041": -1904410, +"5042": 1904410, +"5045": -1904410, +"5046": 1904410, +"5049": -1904410, +"5050": 1904410, +"5053": -1904410, +"5054": 1904410, +"5057": 17770240, +"5058": 18898408, +"5061": 17770240, +"5062": 18898408, +"5065": 17770240, +"5066": 18898408, +"5069": 17070968, +"5070": 19860472, +"5089": 18508687, +"5090": 18508687, +"5093": 18508687, +"5094": 18508687, +"5097": 18508687, +"5098": 18508687, +"5101": 18508687, +"5102": 18508687, +"5105": 1131490, +"5106": 1077807, +"5109": 1131490, +"5110": 1077807, +"5113": 1067444, +"5114": 1026613, +"5117": 1131490, +"5118": 1077807, +"5121": 18145878, +"5122": 18522770, +"5125": 18145878, +"5126": 18522770, +"5129": 18202301, +"5130": 18466347, +"5133": 18065514, +"5134": 18865926, +"5137": -615340, +"5138": 1567545, +"5141": -615340, +"5142": 1567545, +"5145": -804898, +"5146": 804898, +"5149": -615340, +"5150": 1567545, +"5153": 17770240, +"5154": 18898408, +"5157": 17770240, +"5158": 18898408, +"5161": 17770240, +"5162": 18898408, +"5165": 18065514, +"5166": 18865926, +"5169": -615340, +"5170": 1567545, +"5173": -615340, +"5174": 1567545, +"5177": -804898, +"5178": 804898, +"5181": -615340, +"5182": 1567545, +"5185": 17770240, +"5186": 18898408, +"5189": 17770240, +"5190": 18898408, +"5193": 17770240, +"5194": 18898408, +"5197": 18065514, +"5198": 18865926, +"5217": 17337299, +"5218": 17132326, +"5221": 17337299, +"5222": 17132326, +"5225": 17337299, +"5226": 17132326, +"5229": 17782931, +"5230": 17376138, +"5249": 17337299, +"5250": 17132326, +"5253": 17337299, +"5254": 17132326, +"5257": 17337299, +"5258": 17132326, +"5261": 17782931, +"5262": 17376138, +"5281": 19245390, +"5282": 17423258, +"5285": 19245390, +"5286": 17423258, +"5289": 19245390, +"5290": 17423258, +"5293": 17070968, +"5294": 19860472, +"5297": 384281, +"5298": 203050, +"5299": 177073, +"5300": 177073, +"5301": 245205, +"5302": 177073, +"5303": 384281, +"5304": 245205, +"5305": 203050, +"5306": 245205, +"5307": 203050, +"5308": 245205, +"5309": 203050, +"5310": -2171375, +"5311": -1971590, +"5312": -2171375, +"5313": -1971590, +"5314": -2171375, +"5315": -1971590, +"5316": -2171375, +"5317": -1971590, +"5329": -136445, +"5385": -136445, +"5386": -136445, +"5388": -4441829 +}, +"note": "multiplier k/2^40 on the target copy of free ADD gate g, minus that on its source copy; dimension-linear", +"schema": 1, +"word_sha256": "c2b294300760e1fd6eeab8c22c4d13e4633dca40e52cac8da0d68163a76e3ca8" +} diff --git a/research/k8-commutation-ceiling-seed26/LAMBDA.json b/research/k8-commutation-ceiling-seed26/LAMBDA.json new file mode 100644 index 0000000000..59f2ba2b7f --- /dev/null +++ b/research/k8-commutation-ceiling-seed26/LAMBDA.json @@ -0,0 +1,1017 @@ +{ +"a_factor_of_base_hi": "21/20", +"denominator_bits": 40, +"lam": { +"1281": 19423536, +"1282": 19423536, +"1283": 19423536, +"1284": 19423536, +"1287": 3298535, +"1289": 19423536, +"1290": 19423536, +"1291": 3298535, +"1293": 19423536, +"1294": 19423536, +"1295": 3298535, +"1297": 3298535, +"1437": 19423536, +"1438": 19423536, +"1443": 19423536, +"1444": 19423536, +"1445": 3298535, +"1447": 19423536, +"1448": 19423536, +"1449": 3298535, +"1451": 3298535, +"1591": 19423536, +"1592": 19423536, +"1597": 19423536, +"1598": 19423536, +"1599": 3298535, +"1601": 19423536, +"1602": 19423536, +"1603": 3298535, +"1605": 3298535, +"1745": 19423536, +"1746": 19423536, +"1751": 19423536, +"1752": 19423536, +"1753": 3298535, +"1755": 19423536, +"1756": 19423536, +"1757": 3298535, +"1759": 3298535, +"1899": 19423536, +"1900": 19423536, +"1905": 19423536, +"1906": 19423536, +"1907": 3298535, +"1909": 19423536, +"1910": 19423536, +"1911": 3298535, +"1913": 3298535, +"2053": 19423536, +"2054": 19423536, +"2059": 19423536, +"2060": 19423536, +"2061": 3298535, +"2063": 19423536, +"2064": 19423536, +"2065": 3298535, +"2067": 3298535, +"2205": 19423536, +"2206": 19423536, +"2207": 19423536, +"2208": 19423536, +"2211": 3298535, +"2213": 19423536, +"2214": 19423536, +"2215": 3298535, +"2217": 19423536, +"2218": 19423536, +"2219": 3298535, +"2221": 3298535, +"2359": 19423536, +"2360": 19423536, +"2361": 19423536, +"2362": 19423536, +"2365": 3298535, +"2367": 19423536, +"2368": 19423536, +"2369": 3298535, +"2371": 19423536, +"2372": 19423536, +"2373": 3298535, +"2375": 3298535, +"2513": 19423536, +"2514": 19423536, +"2515": 19423536, +"2516": 19423536, +"2519": 3298535, +"2521": 19423536, +"2522": 19423536, +"2523": 3298535, +"2525": 19423536, +"2526": 19423536, +"2527": 3298535, +"2529": 3298535, +"2667": 19423536, +"2668": 19423536, +"2669": 19423536, +"2670": 19423536, +"2673": 3298535, +"2675": 19423536, +"2676": 19423536, +"2677": 3298535, +"2679": 19423536, +"2680": 19423536, +"2681": 3298535, +"2683": 3298535, +"2821": 19423536, +"2822": 19423536, +"2823": 19423536, +"2824": 19423536, +"2827": 3298535, +"2829": 19423536, +"2830": 19423536, +"2831": 3298535, +"2833": 19423536, +"2834": 19423536, +"2835": 3298535, +"2837": 3298535, +"2977": 19423536, +"2978": 19423536, +"2981": 3298535, +"2983": 19423536, +"2984": 19423536, +"2985": 3298535, +"2987": 19423536, +"2988": 19423536, +"2989": 3298535, +"2991": 3298535, +"3131": 19423536, +"3132": 19423536, +"3135": 3298535, +"3137": 19423536, +"3138": 19423536, +"3139": 3298535, +"3141": 19423536, +"3142": 19423536, +"3143": 3298535, +"3145": 3298535, +"3283": 19423536, +"3284": 19423536, +"3285": 19423536, +"3286": 19423536, +"3289": 3298535, +"3291": 19423536, +"3292": 19423536, +"3293": 3298535, +"3295": 19423536, +"3296": 19423536, +"3297": 3298535, +"3299": 3298535, +"3468": -190756, +"3472": -190756, +"3476": -190756, +"3480": -190756, +"3489": -265196, +"3494": -265196, +"3495": 60095, +"3501": 37221837, +"3734": 7535361, +"3735": 7535361, +"3736": 7535361, +"3737": 7535361, +"3738": 7535361, +"3739": 8198834, +"3740": 7535361, +"3741": 7535361, +"3742": 8198834, +"3743": 7535361, +"3744": 7535361, +"3745": 8198834, +"3746": 7535361, +"3747": 7535361, +"3748": 7535361, +"3749": 7535361, +"3750": 7535361, +"3751": 8098941, +"3752": 7535361, +"3753": 7535361, +"3754": 8098941, +"3755": 7535361, +"3756": 7535361, +"3757": 8098941, +"3758": 8881982, +"3759": 8881982, +"3760": 8881982, +"3761": 8881982, +"3762": 8881982, +"3763": 8198834, +"3764": 8881982, +"3765": 8881982, +"3766": 8198834, +"3767": 8881982, +"3768": 8881982, +"3769": 8198834, +"3770": 7535361, +"3771": 7535361, +"3772": 7535361, +"3773": 7535361, +"3774": 7535361, +"3775": 8098941, +"3776": 7535361, +"3777": 7535361, +"3778": 8098941, +"3779": 7535361, +"3780": 7535361, +"3781": 8098941, +"3787": 7535361, +"3788": 7535361, +"3789": 7535361, +"3790": 7535361, +"3791": 7535361, +"3792": 8198834, +"3793": 7535361, +"3794": 7535361, +"3795": 8198834, +"3796": 7535361, +"3797": 7535361, +"3798": 8198834, +"3799": 8881982, +"3800": 8881982, +"3801": 8881982, +"3802": 8881982, +"3803": 8881982, +"3804": 8198834, +"3805": 8881982, +"3806": 8881982, +"3807": 8198834, +"3808": 8881982, +"3809": 8881982, +"3810": 8198834, +"3811": 7535361, +"3812": 7535361, +"3813": 7535361, +"3814": 7535361, +"3815": 7535361, +"3816": 8198834, +"3817": 7535361, +"3818": 7535361, +"3819": 8198834, +"3820": 7535361, +"3821": 7535361, +"3822": 8198834, +"3871": 8881982, +"3872": 8881982, +"3873": 8881982, +"3874": 8881982, +"3875": 8881982, +"3876": 8198834, +"3877": 8881982, +"3878": 8881982, +"3879": 8198834, +"3880": 8881982, +"3881": 8881982, +"3882": 8198834, +"3910": 37221837, +"3937": 35695959, +"3955": 37221837, +"3972": -555508, +"3979": 22523805, +"3980": 22523805, +"3982": 22523805, +"3984": 25682428, +"3985": 25682428, +"3986": 25682428, +"3987": 37329448, +"3988": 37329448, +"3989": 37329448, +"3990": 25463324, +"3991": 25463324, +"3992": 25463324, +"3994": 31284021, +"3995": 31284021, +"3997": 31284021, +"4000": 22523805, +"4001": 22523805, +"4003": 22523805, +"4005": 25682428, +"4006": 25682428, +"4007": 25682428, +"4008": 37329448, +"4009": 37329448, +"4010": 37329448, +"4011": 25463324, +"4012": 25463324, +"4013": 25463324, +"4015": 31284021, +"4016": 31284021, +"4018": 31284021, +"4021": 22523805, +"4022": 22523805, +"4024": 22523805, +"4026": 25682428, +"4027": 25682428, +"4028": 25682428, +"4029": 37329448, +"4030": 37329448, +"4031": 37329448, +"4032": 25463324, +"4033": 25463324, +"4034": 25463324, +"4036": 31284021, +"4037": 31284021, +"4039": 31284021, +"4042": 22523805, +"4043": 22523805, +"4045": 22523805, +"4047": 25682428, +"4048": 25682428, +"4049": 25682428, +"4050": 37329448, +"4051": 37329448, +"4052": 37329448, +"4053": 25463324, +"4054": 25463324, +"4055": 25463324, +"4057": 31284021, +"4058": 31284021, +"4060": 31284021, +"4063": 22523805, +"4064": 22523805, +"4066": 22523805, +"4068": 25682428, +"4069": 25682428, +"4070": 25682428, +"4071": 37329448, +"4072": 37329448, +"4073": 37329448, +"4074": 25463324, +"4075": 25463324, +"4076": 25463324, +"4078": 31284021, +"4079": 31284021, +"4081": 31284021, +"4084": 22523805, +"4085": 22523805, +"4087": 22523805, +"4089": 25682428, +"4090": 25682428, +"4091": 25682428, +"4092": 37329448, +"4093": 37329448, +"4094": 37329448, +"4095": 25463324, +"4096": 25463324, +"4097": 25463324, +"4099": 31284021, +"4100": 31284021, +"4102": 31284021, +"4105": 22523805, +"4106": 22523805, +"4108": 22523805, +"4110": 25682428, +"4111": 25682428, +"4112": 25682428, +"4113": 37329448, +"4114": 37329448, +"4115": 37329448, +"4116": 25463324, +"4117": 25463324, +"4118": 25463324, +"4120": 31284021, +"4121": 31284021, +"4123": 31284021, +"4126": 22523805, +"4127": 22523805, +"4129": 22523805, +"4131": 25682428, +"4132": 25682428, +"4133": 25682428, +"4134": 37329448, +"4135": 37329448, +"4136": 37329448, +"4137": 25463324, +"4138": 25463324, +"4139": 25463324, +"4141": 31284021, +"4142": 31284021, +"4144": 31284021, +"4146": 32136909, +"4147": 32136909, +"4148": 32136909, +"4149": 32136909, +"4150": 32136909, +"4151": 32136909, +"4152": 32136909, +"4153": 32136909, +"4154": 3298535, +"4155": 3298535, +"4156": 3298535, +"4157": 3298535, +"4158": 3298535, +"4159": 3298535, +"4160": 3298535, +"4161": 3298535, +"4162": 3298535, +"4163": 3298535, +"4164": 3298535, +"4165": 3298535, +"4166": 3298535, +"4167": 3298535, +"4168": 3298535, +"4169": 3298535, +"4175": 37267053, +"4176": 4664833, +"4177": 37267053, +"4178": 15815099, +"4179": 15815099, +"4180": 16336643, +"4181": 16336643, +"4182": 3298535, +"4183": 3298535, +"4184": 3298535, +"4185": 3298535, +"4186": 25742878, +"4188": 25742878, +"4193": 37273917, +"4194": 37250299, +"4195": 37273917, +"4196": 37250299, +"4197": 16336643, +"4198": 16336643, +"4199": 15815099, +"4200": 10021121, +"4201": 3298535, +"4202": 3298535, +"4203": 3298535, +"4204": 3298535, +"4206": 25742878, +"4208": 25742878, +"4214": 37267053, +"4215": 4664833, +"4216": 37267053, +"4217": 42648326, +"4218": 42648326, +"4219": 42648326, +"4220": 42648326, +"4221": 3298535, +"4222": 3298535, +"4223": 3298535, +"4224": 3298535, +"4226": 37830756, +"4228": 25742878, +"4233": 37273917, +"4234": 37250299, +"4235": 37273917, +"4236": 37250299, +"4237": 42648326, +"4238": 42648326, +"4239": 42648326, +"4240": 42648326, +"4241": 3298535, +"4242": 3298535, +"4243": 3298535, +"4244": 3298535, +"4246": 37830756, +"4248": 37830756, +"4254": 37267053, +"4255": 4664833, +"4256": 37267053, +"4257": 16336643, +"4258": 16336643, +"4259": 16336643, +"4260": 16336643, +"4261": 16336643, +"4262": 16336643, +"4263": 16336643, +"4264": 16336643, +"4265": 38987991, +"4266": 37950442, +"4271": 37273917, +"4272": 37250299, +"4273": 37273917, +"4274": 37250299, +"4275": 16336643, +"4276": 16336643, +"4277": 16336643, +"4278": 16336643, +"4279": 16336643, +"4280": 16336643, +"4281": 16336643, +"4282": 16336643, +"4283": 38987991, +"4284": 60375328, +"4290": 37267053, +"4291": 4664833, +"4292": 37267053, +"4293": 36422408, +"4294": 36422408, +"4295": 36422408, +"4296": 36422408, +"4297": 16336643, +"4298": 16336643, +"4299": 16336643, +"4300": 16336643, +"4301": 21736903, +"4302": 37950442, +"4307": 37273917, +"4308": 37250299, +"4309": 37273917, +"4310": 37250299, +"4311": 36422408, +"4312": 36422408, +"4313": 36422408, +"4314": 36422408, +"4315": 16336643, +"4316": 16336643, +"4317": 16336643, +"4318": 16336643, +"4319": 21736903, +"4320": 37950442, +"4321": 36422408, +"4322": 36422408, +"4323": 36422408, +"4324": 38411500, +"4325": 42648326, +"4326": 42648326, +"4327": 42648326, +"4328": 42648326, +"4329": 38326818, +"4330": 38326818, +"4331": 36422408, +"4332": 36422408, +"4333": 42648326, +"4334": 42648326, +"4335": 42648326, +"4336": 42648326, +"4337": 31979335, +"4338": 36953549, +"4339": 37077231, +"4340": 31979335, +"4341": 36953549, +"4342": 37077231, +"4343": 32751484, +"4344": 31979335, +"4345": 36953549, +"4346": 37077231, +"4347": 32751484, +"4348": 32751484, +"4349": 31979335, +"4350": 36953549, +"4351": 37077231, +"4352": 31979335, +"4353": 36953549, +"4354": 37077231, +"4355": 37403978, +"4356": 37403978, +"4357": 31050892, +"4358": 37346882, +"4359": 25682431, +"4360": 25682431, +"4361": 31050892, +"4362": 37346882, +"4363": 37403978, +"4364": 37403978, +"4365": 32118350, +"4366": 30009221, +"4367": 37346882, +"4368": 25682431, +"4369": 25682431, +"4370": 32118350, +"4371": 30009221, +"4372": 31442575, +"4373": 30129378, +"4374": 37403978, +"4375": 37403978, +"4376": 25554510, +"4377": 30162821, +"4378": 25873184, +"4379": 25682431, +"4380": 25682431, +"4381": 25554510, +"4382": 30162821, +"4383": 25554510, +"4384": 30162821, +"4385": 37403978, +"4386": 37403978, +"4387": 25873184, +"4388": 25873184, +"4389": 25682431, +"4390": 25682431, +"4391": 25873184, +"4392": 25873184, +"4393": 3298535, +"4394": 3298535, +"4395": 3298535, +"4396": 3298535, +"4397": 3298535, +"4398": 3298535, +"4399": 3298535, +"4400": 3298535, +"4401": 3298535, +"4402": 3298535, +"4403": 3298535, +"4404": 3298535, +"4405": 9184629, +"4406": 9184629, +"4407": 9184629, +"4408": 9184629, +"4409": 3298535, +"4410": 3298535, +"4411": 3298535, +"4412": 3298535, +"4413": 9184629, +"4414": 9184629, +"4415": 9184629, +"4416": 9184629, +"4417": 10021121, +"4418": 10021121, +"4419": 10021121, +"4420": 10021121, +"4421": 9184629, +"4422": 9184629, +"4423": 9184629, +"4424": 9184629, +"4425": 10021121, +"4426": 10021121, +"4427": 10021121, +"4428": 10021121, +"4429": 9184629, +"4430": 9184629, +"4431": 9184629, +"4432": 9184629, +"4433": 38272956, +"4434": 38272956, +"4435": 38272956, +"4436": 42648326, +"4437": 3298535, +"4438": 3298535, +"4439": 3298535, +"4440": 2332416, +"4441": 37246535, +"4442": 37246535, +"4443": 37246535, +"4444": 37246535, +"4445": 3298535, +"4446": 2332416, +"4447": 3298535, +"4448": 3298535, +"4449": 13263402, +"4450": 13263402, +"4451": 13263402, +"4452": 13263402, +"4453": 13263402, +"4454": 13263402, +"4455": 13263402, +"4456": 13263402, +"4457": 11054105, +"4458": 11054105, +"4459": 11169345, +"4460": 11169345, +"4461": 11169345, +"4462": 10868619, +"4463": 10874821, +"4464": 10874821, +"4465": 37246535, +"4466": 37246535, +"4467": 37246535, +"4468": 37246535, +"4469": 8006761, +"4470": 7902708, +"4471": 7902708, +"4472": 7902708, +"4473": 37246535, +"4474": 37246535, +"4475": 37246535, +"4476": 37246535, +"4477": 8006761, +"4478": 7902708, +"4479": 7902708, +"4480": 7902708, +"4481": 37246535, +"4482": 37246535, +"4483": 37246535, +"4484": 37246535, +"4485": 37246535, +"4486": 37246535, +"4487": 37246535, +"4488": 37246535, +"4489": 37246535, +"4490": 37246535, +"4491": 37246535, +"4492": 37246535, +"4493": 37246535, +"4494": 37246535, +"4495": 37246535, +"4496": 37246535, +"4497": 3298535, +"4498": 3298535, +"4499": 4974847, +"4500": 3298535, +"4501": 4974847, +"4503": 3298535, +"4504": 3298535, +"4505": -3124417, +"4506": -3124417, +"4507": -3124417, +"4508": -3298535, +"4509": -3807566, +"4510": -5630951, +"4511": -5630951, +"4512": -5630951, +"4545": 24760343, +"4546": 24760343, +"4547": 24760343, +"4553": 1904410, +"4554": 1904410, +"4555": 1904410, +"4556": 255143, +"4557": -3807566, +"4558": -5630951, +"4559": -5630951, +"4560": -5630951, +"4569": -915121, +"4570": -915121, +"4571": -1030360, +"4572": -1204478, +"4573": -2665714, +"4574": -2241622, +"4575": -2290165, +"4576": -2290165, +"4577": 1904410, +"4578": 1904410, +"4579": 1904410, +"4580": 255143, +"4581": -2745410, +"4582": -3512538, +"4583": -3512538, +"4584": -3512538, +"4585": 1904410, +"4586": 1904410, +"4587": 1904410, +"4588": 255143, +"4589": -2745410, +"4590": -3512538, +"4591": -3512538, +"4592": -3512538, +"4593": 1904410, +"4594": 1904410, +"4595": 1904410, +"4596": 255143, +"4597": 2467990, +"4598": 1810813, +"4599": 1810813, +"4600": 1810813, +"4601": 1904410, +"4602": 1904410, +"4603": 1904410, +"4604": 255143, +"4605": 2467990, +"4606": 1810813, +"4607": 1810813, +"4608": 1810813, +"4609": -3124417, +"4610": -3124417, +"4611": -3124417, +"4612": -3298535, +"4613": -3807566, +"4614": -5630951, +"4615": -5630951, +"4616": -5630951, +"4617": 26451088, +"4618": 37295194, +"4619": 26451088, +"4620": 37295194, +"4621": 31036229, +"4622": 25702243, +"4623": 36704276, +"4624": 25702243, +"4625": 37886730, +"4626": 37994826, +"4627": 37886730, +"4628": 37994826, +"4629": 31036229, +"4630": 25702243, +"4631": 36704276, +"4632": 25702243, +"4633": 26451088, +"4634": 37295194, +"4635": 26451088, +"4636": 37295194, +"4637": 32492373, +"4638": 30141445, +"4639": 36704276, +"4640": 25702243, +"4641": 37886730, +"4642": 37994826, +"4643": 37886730, +"4644": 37994826, +"4645": 32492373, +"4646": 30141445, +"4647": 31152911, +"4648": 26938304, +"4649": 26451088, +"4650": 37295194, +"4651": 26451088, +"4652": 37295194, +"4653": 37732970, +"4654": 30141445, +"4655": 37732970, +"4656": 37635923, +"4657": 37886730, +"4658": 37994826, +"4659": 37886730, +"4660": 37994826, +"4661": 37732970, +"4662": 30141445, +"4663": 37732970, +"4664": 30141445, +"4665": 26451088, +"4666": 37295194, +"4667": 26451088, +"4668": 37295194, +"4669": 37732970, +"4670": 37635923, +"4671": 37732970, +"4672": 37635923, +"4673": 37886730, +"4674": 37994826, +"4675": 37886730, +"4676": 37994826, +"4677": 37732970, +"4678": 37635923, +"4679": 37732970, +"4680": 37635923, +"4865": 19068471, +"4866": 19686354, +"4869": 19068471, +"4870": 19686354, +"4873": 19068471, +"4874": 19686354, +"4877": 18065514, +"4878": 20855017, +"4897": 19423536, +"4898": 19423536, +"4901": 19423536, +"4902": 19423536, +"4905": 19423536, +"4906": 19423536, +"4909": 19423536, +"4910": 19423536, +"4929": 19423536, +"4930": 19423536, +"4933": 19423536, +"4934": 19423536, +"4937": 19423536, +"4938": 19423536, +"4941": 19423536, +"4942": 19423536, +"4961": 19423536, +"4962": 19423536, +"4965": 19423536, +"4966": 19423536, +"4969": 19423536, +"4970": 19423536, +"4973": 19423536, +"4974": 19423536, +"4993": 19423536, +"4994": 19423536, +"4997": 19423536, +"4998": 19423536, +"5001": 19423536, +"5002": 19423536, +"5005": 19423536, +"5006": 19423536, +"5017": -1904410, +"5018": 1904410, +"5025": 19423536, +"5026": 19423536, +"5029": 19423536, +"5030": 19423536, +"5033": 19423536, +"5034": 19423536, +"5037": 19423536, +"5038": 19423536, +"5041": -1904410, +"5042": 1904410, +"5045": -1904410, +"5046": 1904410, +"5049": -1904410, +"5050": 1904410, +"5053": -1904410, +"5054": 1904410, +"5057": 19068471, +"5058": 19686354, +"5061": 19068471, +"5062": 19686354, +"5065": 19068471, +"5066": 19686354, +"5069": 18065514, +"5070": 20855017, +"5089": 19423536, +"5090": 19423536, +"5093": 19423536, +"5094": 19423536, +"5097": 19423536, +"5098": 19423536, +"5101": 19423536, +"5102": 19423536, +"5105": 1131490, +"5106": 1077807, +"5109": 1131490, +"5110": 1077807, +"5117": -56423, +"5118": 56423, +"5121": 19068471, +"5122": 19686354, +"5125": 19068471, +"5126": 19686354, +"5129": 19068471, +"5130": 19686354, +"5133": 19017719, +"5134": 19902812, +"5137": -700846, +"5138": 1615695, +"5141": -700846, +"5142": 1615695, +"5145": -771620, +"5146": 1653190, +"5149": -700846, +"5150": 1615695, +"5153": 19068471, +"5154": 19686354, +"5157": 19068471, +"5158": 19686354, +"5161": 19068471, +"5162": 19686354, +"5165": 19017719, +"5166": 19902812, +"5169": -700846, +"5170": 1615695, +"5173": -700846, +"5174": 1615695, +"5177": -771620, +"5178": 1653190, +"5181": -700846, +"5182": 1615695, +"5185": 19068471, +"5186": 19686354, +"5189": 19068471, +"5190": 19686354, +"5193": 19068471, +"5194": 19686354, +"5197": 19017719, +"5198": 19902812, +"5201": 372546, +"5202": 621999, +"5205": 372546, +"5206": 621999, +"5209": 372546, +"5210": 621999, +"5213": 372546, +"5214": 621999, +"5217": 17908123, +"5218": 17908123, +"5221": 17908123, +"5222": 17908123, +"5225": 17908123, +"5226": 17908123, +"5229": 17770291, +"5230": 17388778, +"5233": 372546, +"5234": 621999, +"5237": 372546, +"5238": 621999, +"5241": 372546, +"5242": 621999, +"5245": 372546, +"5246": 621999, +"5249": 17908123, +"5250": 17908123, +"5253": 17908123, +"5254": 17908123, +"5257": 17908123, +"5258": 17908123, +"5261": 17770291, +"5262": 17388778, +"5281": 19068471, +"5282": 19686354, +"5285": 19068471, +"5286": 19686354, +"5289": 19068471, +"5290": 19686354, +"5293": 18065514, +"5294": 20855017, +"5297": -191831, +"5298": -190397, +"5299": -191831, +"5300": -191831, +"5301": -190397, +"5302": -191831, +"5303": -191831, +"5304": -190397, +"5305": -190397, +"5306": -190397, +"5307": -190397, +"5308": -190397, +"5309": -190397, +"5310": -1858744, +"5311": -1858744, +"5312": -1858744, +"5313": -1858744, +"5314": -1858744, +"5315": -1858744, +"5316": -1858744, +"5317": -1858744, +"5329": 754907, +"5385": 754907, +"5386": 754907, +"5388": -4389820 +}, +"note": "multiplier k/2^40 on the target copy of free ADD gate g, minus that on its source copy; dimension-linear", +"schema": 1, +"word_sha256": "c2b294300760e1fd6eeab8c22c4d13e4633dca40e52cac8da0d68163a76e3ca8" +} diff --git a/research/k8-commutation-ceiling-seed26/PROOF.md b/research/k8-commutation-ceiling-seed26/PROOF.md new file mode 100644 index 0000000000..1509ff8635 --- /dev/null +++ b/research/k8-commutation-ceiling-seed26/PROOF.md @@ -0,0 +1,82 @@ +# Why the bound is valid + +The argument below is written by hand. Every computational step it relies on is checked by `verify.py`. + +## Class and cost + +**The class.** It is the set of words W′ = A′·B′·T′ obtained as follows: +- each segment of the selected k8 word (A, B and the 116-gate tail T) is replaced by a linear extension of its dependency order; +- in that order, an earlier gate g precedes a later gate h on a shared register whenever g and h do not commute as elementary row operations; +- coefficients are unchanged, and intermediate words need not be legal. + +**Commutation.** For row operations, ADD t ← t + c·s and ADD t′ ← t′ + c′·s′ commute exactly when t ≠ s′ and t′ ≠ s. Two SCALEs commute. Any other pair commutes exactly when it shares no register; no SCALE in this word has factor 1. `verify.py` checks this rule against exact rational composition, in both orders, on all 109,388 same-register pairs. + +**Frames.** For each member, PR1671's contract applies: +- one frame per gate, shared by its operands; +- nesting along every register in the member's order; +- fixed starts and ends; +- pins at the A/B boundary entered by charged climbs; +- the 101 cone caps; +- eight fixed rank-8 centre descents. + +The local cost is the sum of c(Δdim) over consecutive distinct frames on each register. The idle term is constant, because rank mass telescopes per register, so the bill is as in PR1671. + +## Intervals + +The DAG has nodes S_q, G_i, P_q, X_q and E_q. Its edges: +- join gates that are dependent in every member (the non-commuting same-segment pairs and all cross-segment same-register pairs); +- join starts, pins, the end-of-B cap node X_q and ends to the gates on their register. + +Every edge joins two nodes on one register whose relative order is the same in every member. Frames nest along each register, so l(x) ⊆ F(x) ⊆ h(x) for every member and every legal assignment, where: +- lo2 is the join of the fixed frames over ancestors; +- hi2 is the meet of the fixed frames and the caps over descendants. + +Two implementations agree on all 5,413 gates: propagation, and a closed form over ancestor and descendant closures. In chronological mode both reduce to PR1671's intervals. + +## Stage 1: the order-free stabbing bound + +For register q, take items x (its gates, plus its pin) with intervals [l_x, h_x]. Let D_q be the cheapest chain S_q = V_0 ⊊ V_1 ⊊ … ⊊ V_m = E_q, with each V_j a subspace inside some item's interval. The chain may use no arc on which an item is first entered (l_x ⊄ V_{j−1}, l_x ⊆ V_j) outside its upper end (V_j ⊄ h_x). + +**It is a lower bound.** Take any member and any legal assignment. The distinct frames on q, in the member's order, form such a chain: +- every frame lies in its item's interval; +- at an item's first entry, the current frame is ⊆ F_x ⊆ h_x. + +The chain's cost is exactly q's paid climbs. The bound uses the lower enclosures of `child_cost`. These lie on the 2⁻²⁵⁶ grid (`ceiling.py`), so the arithmetic is exact integer arithmetic. + +**Adding precedence does not help.** Constraining the per-register DP by precedence cannot raise this bound. lo2 and hi2 are monotone along every DAG edge, so the first-entry points of any stabbing chain already respect every precedence. + +## Stage 2: dimension-linear Lagrangian coupling + +**Setup.** Each free ADD gate g appears on two registers, t and s. Give its t-copy the multiplier +λ_g and its s-copy −λ_g, priced linearly in the dimension of the frame: +- a copy with κ > 0 is charged κ·dim at its entry point; +- a copy with κ < 0 is charged κ·dim at its exit point (the last chain point inside h_x). + +Define L(λ) = Σ_q D_q(λ). + +**Validity.** Take any member and assignment. +- The operands agree, so Σ_g (λ_g − λ_g)·dim F_g = 0. +- On q's true chain, the entry point of x has the minimum dimension of any chain point inside x's interval, and the exit point has the maximum. +- For κ > 0, charging at entry gives at most κ·dim F_x. For κ < 0, charging at exit gives at most κ·dim F_x. +- So D_q(λ) ≤ chain_q + Σ_x κ_x·dim F_x on every register. +- Summing over q gives L(λ) ≤ the true local cost, for every λ. + +The bound ignores precedence and acyclicity across registers, which only weakens it. + +**Why the charging rule matters.** Charging negative multipliers at the entry point would be invalid. The toy check in `toy.py` catches that mutation. + +**Exactness.** The multipliers are k/2⁴⁰ with integer k. Combined with the 2⁻²⁵⁶ cost grid, the whole DP is exact integer arithmetic. The certificate is the stored k (`LAMBDA.json`), and `verify.py` recomputes L(λ) and the bill exactly. + +## Conclusion + +At a* = (21/20)·a_hi, with the stored multipliers, the exact lower bill is 1 + 2.146289×10⁻⁴ > 1. So no member of the class, under any legal frame assignment, has bill ≤ 1 at a*. The packing ceiling of every member is below a*, so no member lifts it by 5%. + +At (1007/1000)·a_hi a second certificate gives 1 + 4.86×10⁻⁶ > 1, so no member lifts it by 0.7%. By monotonicity of the bill in a, the same holds at every larger exponent. + +A smaller lift, below 0.7%, is neither shown nor excluded. + +## What the class excludes + +- Moves across segment boundaries: across the cut between A and B, or into and out of the tail. +- Coefficient-rescaling rewrites. +- Changes to the cut, precondition, cleanup, compensation, pins or endpoints. +- New child interfaces (fanout or gather children) and other words. diff --git a/research/k8-commutation-ceiling-seed26/README.md b/research/k8-commutation-ceiling-seed26/README.md new file mode 100644 index 0000000000..42d808d580 --- /dev/null +++ b/research/k8-commutation-ceiling-seed26/README.md @@ -0,0 +1,142 @@ +# Commuting reorders plus free frames cannot lift the selected k8 ceiling by 5% + +**Scoped obstruction with an exact certificate. No new κ, and no existing check is changed.** + +- Track: 20–39 (complex supplier), assignment seed 26, drawn with the OS CSPRNG via Python `secrets`. +- Card: `complex-rank-shape-decoder`, with the scope **refined** in [TASK.json](TASK.json). +- Base: `0fdd7d82`. The selected record frontier1094 is unchanged. + +## The question + +Two merged scoped results bound the selected gauge44/k8 complex word (`c2b29430`; 3,451 A + 1,846 B + 116 tail gates): + +- **#1671** (bitplane) frees **every frame** while keeping the **chronology fixed**. No assignment lowers the paid moment. +- **seed27** (woklerx) frees **commuting-ADD order** while keeping **frame slots fixed**. + +Neither covers both at once, and PR1671 lists that combination as open question 1. This package takes the joint class: +- every within-segment reordering of A, B and the tail that keeps the order of non-commuting gates; +- with every legal nested frame assignment under PR1671's rules (starts, ends, charged pins, cone caps, operand-shared frames). + +It asks whether any member lifts the packing ceiling by the card's 5% gate. + +## Answer: no + +At a* = (21/20)·a_hi, with a_hi = 1690054109089/10¹⁵, an exact Lagrangian lower bound on every member's bill is + +**bill_lo − 1 = +2.146289027469049 × 10⁻⁴ > 0.** + +So every member's ceiling is below a*, and none lifts it by 5%. A second certificate at (1007/1000)·a_hi gives +4.86 × 10⁻⁶ > 0, so no member lifts the ceiling by even **0.7%**. + +| Bound at a* | Value | Verdict | +|---|---|---| +| The selected word itself | 1.000245413040 | (member) | +| Stage 1, chronological intervals | 1.000227868002 | rejects (PR1671's case) | +| Stage 1, commutation intervals (decoupled) | 0.999971231189 | **does not reject** | +| Stage 2, Lagrangian coupling (`LAMBDA.json`) | 1 + 2.146289 × 10⁻⁴ | **rejects: class excluded** | +| Stage 2 at 1.007·a_hi (`LAMBDA-1007.json`) | 1 + 4.86 × 10⁻⁶ | rejects | + +Coupling the two operands of each ADD gate is what decides the question. The per-register (decoupled) bound leaves room once the chronology is relaxed. + +## How ([model.py](model.py), [PROOF.md](PROOF.md)) + +1. **Commutation.** Elementary row operations commute when: + - two ADDs t←t+cs and t′←t′+c′s′ have t ≠ s′ and t′ ≠ s; + - they are two SCALEs; + - or they share no register. + + This rule is checked against exact rational composition, in both orders, on all **109,388** same-register gate pairs. Of the 9,092 adjacent within-segment pairs, 4,519 commute. +2. **Intervals.** A dependency DAG joins non-commuting same-segment pairs, all cross-segment same-register pairs, and the starts, pins, cap nodes and ends. It gives every gate an interval [lo2, hi2] that contains its frame in every member under every legal assignment. + - Two implementations agree on all 5,413 gates: propagation, and a closed form over ancestor and descendant closures. + - In chronological mode both reduce to PR1671's intervals exactly. + - Forced gates drop from 3,672 to 2,979, and 1,391 intervals change. + - The word's own frames lie inside. +3. **Stage 1.** For each register, the cheapest chain of subspaces from its start to its end that passes through every item's interval. The order inside the register is free, and an item's first entry must stay inside its upper end. This lower-bounds the register's paid climbs in every member. +4. **Stage 2.** Each free ADD gate has two copies, one on each register. They are coupled by dimension-linear multipliers, +λ on the target copy and −λ on the source copy. The target copy is charged at its entry point and the source copy at its exit point. Operand agreement cancels the multipliers in any real member, so the sum of the per-register optima stays a lower bound for every λ. +5. **Exact arithmetic.** The child costs use `ceiling.child_cost`'s lower enclosures, which lie on the 2⁻²⁵⁶ grid, and the multipliers are k/2⁴⁰. The bound is therefore computed in exact integers, and the bill is compared with 1 exactly. The certificates store the integers k: + - 1,008 nonzero values in `LAMBDA.json`; + - 962 in `LAMBDA-1007.json`. + + [discover.py](discover.py) can regenerate such multipliers by float subgradient ascent. The verifier never imports it. + +## Controls + +- **Commutation rule.** + - The rule agrees with exact composition on every pair. + - A wrong rule (one that ignores t = s′) disagrees. +- **Intervals.** + - The chronological intervals equal PR1671's. + - The two interval implementations agree. + - The word's frames lie in the commutation intervals. +- **Subspace enumerators.** Two enumerators (closure and reduced echelon) agree on every distinct interval. The number of subspaces of F₂^k is 1, 2, 5, 16, 67, 374 and 2,825 for k = 0…6. +- **The given word.** + - It reproduces PR1671's profile {1:2412, 2:418, 3:432, 4:142, 5:82, 8:8}, and the ceiling bracket. + - The Stage-2 bound stays below the given word's own bill, as it must, since that word is a member. +- **Toy exhaustive check** ([toy.py](toy.py)). + - Over 150 random small words, the check enumerates every linear extension and every nested frame assignment. 93 of those words have several orders. + - The intervals contain every legal assignment. + - The Lagrangian bound never exceeds the exact minimum for random multipliers. + - The invalid rule (charging negative multipliers at entry) is caught. +- **Certificate files.** A multiplier on a forced gate, or a certificate for a different word, is refused. +- **Coupling is what rejects.** With λ = 0 the bound does not reject in the commutation class. + +[test_package.py](test_package.py) has 13 tests. + +## Scope + +**Covered.** +- Every within-segment linear extension of the A, B and tail dependency orders, with coefficients unchanged. +- Every frame assignment under PR1671's contract. +- Every exponent ≥ the certified one. + +**Not covered.** +- Moves across segments: across the cut, or into and out of the tail. +- Coefficient-rescaling rewrites. +- Changes to the cut, precondition, cleanup, compensation, pins or endpoints (for example `selected-k8-unrestricted-ends`). +- New child interfaces: fanout (open #1865), C3 gathers (Discussion 2032), and rank-sum children. +- Open #1186's different cost model. +- Other words. +- A lift below 0.7%, which is neither shown nor excluded. + +**No κ.** + +## Reproduce + +```sh +python3 -I -B research/k8-commutation-ceiling-seed26/verify.py # about 30 s; PASS_K8_COMMUTATION_CEILING +python3 -I -B -m unittest discover -s research/k8-commutation-ceiling-seed26 -p test_package.py +python3 scripts/research_package.py --package research/k8-commutation-ceiling-seed26 --check-only +python3.12 scripts/research_package.py --package research/k8-commutation-ceiling-seed26 +``` + +It needs standard-library Python 3.10 or later, and imports merged PR1671 code with its digests pinned. It was run on Python 3.12.15 and 3.14.8 (macOS 26.5, arm64). + +## Open next questions + +1. **Does the 0.7% band contain a real reorder?** + - Why it matters: the certificates exclude 5% and 0.7%, but not smaller lifts. A concrete reorder in that band would be the first gain from commutation. + - First step: run `discover.py` at 1.006·a_hi, take the registers with the most slack, and replay a nominated reorder through PR1671's retained `audit_local.py`. + - Blocked by: none. +2. **Does allowing moves across segments change the answer?** + - Why it matters: the class keeps the cut. 217 adjacent commuting pairs straddle a segment boundary. + - First step: add the cross-segment commuting edges as optional, and recompute lo2/hi2 and the Stage-2 bound. + - Blocked by: the cut's compensation semantics (#1128-style restoration). +3. **Can a new child interface (fanout, gathers) beat the class ceiling?** + - Why it matters: rank-shape gains need non-commuting rewrites or new children, not reorders. + - First step: price #1865's fanout children inside this bound's per-register DP. + - Blocked by: a merged fanout contract. + +## Relation and credit + +- **#1671** (bitplane, Gareth Davidson): the complete frame ceiling with fixed chronology. Its model, code and word are imported here with digests pinned. +- **seed27** (woklerx): commuting frame slots. +- **#1817** (JosieElliston): diagonal batches under register commutation. +- **navinor** (Aaron Wang): the frame method and `frame_model.py` (`complex-x4-frame-bound`). +- **`ceiling.py`:** `complex-local-word-ceiling`. +- **Related open work:** #1186 (mdumitrean), #1865 (1337isnot1337) and Discussion 2032. + +Prepared by Sagar Thakrar (thakrarsagar) with substantial AI assistance from Claude (Anthropic) via Claude Code. +- Parallel read-only scout and judge subagents selected the question; both judges ranked it first. +- Reader subagents and a synthesizer specified the model, and found that operand coupling decides it while the proposed precedence strengthening adds nothing. Their prototype bills replaced the scout's unreproducible figures. +- The package code, the certificates and the controls were then written and checked. + +No claim was posted to Discussions. New material is Apache-2.0. diff --git a/research/k8-commutation-ceiling-seed26/RESULT.json b/research/k8-commutation-ceiling-seed26/RESULT.json new file mode 100644 index 0000000000..b21a09f815 --- /dev/null +++ b/research/k8-commutation-ceiling-seed26/RESULT.json @@ -0,0 +1,66 @@ +{ + "a_star": "35491136290869/20000000000000000 = (21/20) x 1690054109089/1000000000000000", + "binding": { + "research/selected-k8-frame-ceiling/independent.py": "044f64316e94b458b1dc6723df846a4a2fc0104d64cddbdea30fb3ab2c735f60", + "research/selected-k8-frame-ceiling/references/WORD.json.gz": "49596aa4ed4fd36cd4582fd0e8ddeb09fd80370a7d8aea1ede52a135b536d289", + "research/selected-k8-frame-ceiling/references/ceiling.py": "86a1432870b3b21d8454106ec9162fddc0471472d9214c590a1420f2426cedfc" + }, + "given_word": { + "bill_lower_at_a_star": "1.000245413040243", + "profile": { + "1": 2412, + "2": 418, + "3": 432, + "4": 142, + "5": 82, + "8": 8 + } + }, + "model": { + "adjacent_commuting": 4519, + "adjacent_within_segment": 9092, + "changed_intervals": 1391, + "commutation_rule_exact": true, + "cone_registers": 101, + "forced_chronological": 3672, + "forced_trace": 2979, + "gates": 5413, + "quotient_dims_trace": { + "0": 2979, + "1": 955, + "2": 746, + "3": 226, + "4": 408, + "5": 91, + "6": 8 + }, + "registers": 704, + "same_register_pairs": 109388 + }, + "scope": "Within-segment commuting reorders of A, B and the tail with every legal PR1671 frame assignment; no cross-segment moves, rescaling rewrites, changed cut/compensation/pins/endpoints, new child interfaces or other words; no kappa", + "stage1": { + "chronological": "1.000227868002133", + "trace": "0.999971231189154", + "verdict": "decoupled bound rejects only with the chronology fixed" + }, + "stage2": { + "LAMBDA-1007.json": { + "a": "1007/1000 x a_hi", + "bill_lower_exact_sign": "> 1", + "bill_lower_minus_one": "4.864631734263140e-06", + "nonzero_multipliers": 962 + }, + "LAMBDA.json": { + "a": "21/20 x a_hi", + "bill_lower_exact_sign": "> 1", + "bill_lower_minus_one": "2.146289027469049e-04", + "nonzero_multipliers": 1008 + } + }, + "status": "PASS_K8_COMMUTATION_CEILING", + "toy": { + "invalid_charging_caught": true, + "trials": 150, + "with_several_linear_extensions": 93 + } +} diff --git a/research/k8-commutation-ceiling-seed26/SOURCES.json b/research/k8-commutation-ceiling-seed26/SOURCES.json new file mode 100644 index 0000000000..bfbef06c73 --- /dev/null +++ b/research/k8-commutation-ceiling-seed26/SOURCES.json @@ -0,0 +1,72 @@ +{ + "schema_version": 1, + "base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "e8870e5917057d59b730eb14721a778639eca050", + "sha256": "d46eb6d5b3e279428753d770653663fbdf1063e55c255ea073d768f344927ef7" + }, + { + "path": "research/complex-frame-slot-transpositions-seed27/README.md", + "usage": "provenance", + "git_blob": "ae6908d48b6a43a94c74d239add33e75befb02e0", + "sha256": "dd2984b142fe7e91256236b889889fa689b3539c03b7c09faa2887e4e537e21a" + }, + { + "path": "research/selected-k8-frame-ceiling/EXPECTED.json", + "usage": "input", + "git_blob": "8ba1fee58cb17a00e3744ee46f39752c532ab596", + "sha256": "35b654ca2ba6718da47c38fbb04a381feb8eb4a984e786f58a0dbbacb836a26c" + }, + { + "path": "research/selected-k8-frame-ceiling/README.md", + "usage": "provenance", + "git_blob": "cfef0edf0a10033385b48fbeffca6cc53006c053", + "sha256": "58c2f85a83778d5163612e254d39f029bb64440adca11b581e2323241d21eeec" + }, + { + "path": "research/selected-k8-frame-ceiling/common.py", + "usage": "input", + "git_blob": "2386691122d4968122b8263ca45ab37a896c7bb8", + "sha256": "044eddafff2d0ff74860afa3a01fc52eb5802586281c904beecba0b0ce2f9444" + }, + { + "path": "research/selected-k8-frame-ceiling/independent.py", + "usage": "input", + "git_blob": "ab8be2176e53b37e4786afd1e11306b91fe7090c", + "sha256": "044f64316e94b458b1dc6723df846a4a2fc0104d64cddbdea30fb3ab2c735f60" + }, + { + "path": "research/selected-k8-frame-ceiling/references/SLOT-PINS.json", + "usage": "input", + "git_blob": "2702c368f4de0b671577aee9a0e2df41c1b27658", + "sha256": "55dd229684febecb80638eff9c6b3986623e8539c6c956753b350209c3e0efe2" + }, + { + "path": "research/selected-k8-frame-ceiling/references/WORD.json.gz", + "usage": "input", + "git_blob": "723decbca8995e916d6f4b783aa3e1ddd4eb47fe", + "sha256": "49596aa4ed4fd36cd4582fd0e8ddeb09fd80370a7d8aea1ede52a135b536d289" + }, + { + "path": "research/selected-k8-frame-ceiling/references/ceiling.py", + "usage": "input", + "git_blob": "6c0f54527d879396f689523bfde19928a9b6157c", + "sha256": "86a1432870b3b21d8454106ec9162fddc0471472d9214c590a1420f2426cedfc" + }, + { + "path": "research/selected-k8-frame-ceiling/references/frame_model.py", + "usage": "input", + "git_blob": "33cfb4f404be0ed9fabd53a362084ef8dbc1911c", + "sha256": "0fa808a82e12a8928e43de3131958b9018476ee8c25b1ebc841316705e4f0eff" + } + ] +} diff --git a/research/k8-commutation-ceiling-seed26/TASK.json b/research/k8-commutation-ceiling-seed26/TASK.json new file mode 100644 index 0000000000..24ae747260 --- /dev/null +++ b/research/k8-commutation-ceiling-seed26/TASK.json @@ -0,0 +1,82 @@ +{ + "schema_version": 1, + "task_id": "complex-rank-shape-decoder", + "priority_revision": 4, + "base_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2", + "original_card": { + "id": "complex-rank-shape-decoder", + "question": "Can a decoder deliver the local paid mass in fewer, larger-rank children (block frame climbs instead of rank-1 to rank-3 steps)?", + "starting_points": [ + "research/complex-local-word-ceiling/README.md", + "research/complex-decoder-field-extension-seed44/README.md", + "research/complex-frame-pair-decoders/README.md", + "research/selected-k8-unrestricted-ends/README.md", + "research/eisenstein-reduction-copy-floor/README.md" + ], + "methods": [ + "Find one exact small decoding identity whose frame path climbs in blocks, and price its complete per-call profile.", + "Bound the best effective child rank achievable for one fixed support alphabet, including copies, frames and restoration." + ], + "acceptance_gate": "A per-call local profile, with all copied information, frames and restoration counted, whose ceiling exceeds the selected word's by at least 5%; masked or overcomplete supports must change an assumption of the eight-term all-pairs bound.", + "first_step": { + "command": [ + "python3", + "-B", + "research/complex-local-word-ceiling/verify.py" + ], + "expected": "PASS_COMPLEX_LOCAL_WORD_CEILING", + "inspect": "Read the selected word's per-call local profile, its packing ceiling and the lever table; run levers.py for the ideal budget of the lever you target.", + "scope": "Positive control and planning budget only; this is not a new construction or full cold replay." + }, + "first_experiment": "Before any synthesis, write the candidate per-call local profile (and centre charge / unpaid coordinates if changed) and screen it with ceiling.ceiling(); reject it if even the ideal ceiling does not beat the selected word's by your stated margin. Ideal budget: rank-16 delivery is 2.31x (levers.py).", + "bottleneck_link": "Rank-1 children are about half of recursive cost; the selected word's effective child rank is about 3.9. Larger-rank delivery lowers recursive cost per unit of paid mass.", + "allowed_variations": [ + "One masked, overcomplete or block decoder family with exact labels and supports.", + "A scoped lower bound on effective rank for one alphabet.", + "If the coverage law, template or guard changes, derive an applicable fully charged replacement bound instead of applying the incumbent ceiling outside its scope." + ], + "scope_change_triggers": [ + "Repacking idle remainders of an unchanged word (covered by the packing ceiling).", + "Repeating the eight-term all-pairs search inside its proved scope.", + "Only changing helper terminal subspaces and monotone frames within the fixed scalar word, entrances and cleanup contract already covered by #1995/#2013.", + "Searching below C=40 in the #2017 Eisenstein binary scalar-rectangle or fixed-support block-linear additive pairing model; specify a changed premise instead. This bound does not cover every complex decoder." + ], + "overlap_terms": [ + "rank shape", + "block climb", + "masked decoder", + "overcomplete", + "effective rank" + ] + }, + "scope_status": "refined", + "actual_scope": "Method: bound the best achievable rank shape for a fixed alphabet. Class: the commutation trace class of the selected k8 word (within-segment reorders keeping non-commuting order) with every legal PR1671 frame assignment; question: can any member lift the packing ceiling by the card's 5% gate? Answer by exact certificate: no (and not by 0.7%).", + "scope_change_reason": "The card asks for a decoder with fewer, larger-rank children whose ceiling clears 5%. PR1671 (frames free, chronology fixed) and seed27 (order free, slots fixed) each exclude half of the reorder-plus-reframe space; this settles their joint class (PR1671 open question 1) with a certificate, so rank-shape gains must come from non-commuting rewrites or new child interfaces.", + "bottleneck_link": "Scoped obstruction on the binding complex supplier, no kappa change: within-segment commuting reorders plus free frames cannot lift the selected k8 word's packing ceiling by 5% (or 0.7%). It removes a whole class of candidate rank-shape decoders and points the lever at non-commuting rewrites, cross-segment moves or new child interfaces.", + "budget_minutes": 180, + "stop_rule": "Stop once an exact certificate decides the 5% gate (it does: bill lower bound > 1 at a*); optionally certify the tightest bracket the same family reaches (1.007 a_hi); report the remaining band as open.", + "outcome": "completed", + "evidence": "RESULT.json: commutation rule exact on 109,388 same-register pairs (9,092 adjacent within-segment, 4,519 commute); chronological intervals = PR1671's; trace intervals by two implementations, 2,979 forced (from 3,672), 1,391 changed, word's frames inside; given word profile = PR1671's, bill 1.000245413040 at a*; Stage 1 trace 0.999971231189 (does not reject), chronological 1.000227868002 (rejects); Stage 2 certificates: +2.146289027469049e-4 at a* = 1.05 a_hi (1,008 multipliers), +4.86463173426314e-6 at 1.007 a_hi (962); toy exhaustive check 150 trials (93 with several orders) passes and catches invalid charging. 13 tests pass.", + "author": "Sagar Thakrar (thakrarsagar)", + "ai_assistance": "Substantial: Claude (Anthropic) via Claude Code. Parallel read-only scout and judge subagents selected the question (both judges ranked it first); reader subagents and a synthesizer specified the model, found that operand coupling decides it (the proposed precedence strengthening is vacuous) and produced prototype multipliers; the package code, certificates and controls were then written and checked.", + "open_questions": [ + { + "question": "Does the remaining band below a 0.7% lift contain a real reorder?", + "why_it_matters": "The certificates exclude 5% and 0.7% but not smaller lifts.", + "first_step": "Run discover.py at 1.006 a_hi, pick top-slack registers and replay a nominated reorder through PR1671's retained audit_local.py.", + "blocked_by": "None." + }, + { + "question": "Do cross-segment moves change the answer?", + "why_it_matters": "The class keeps the cut; 217 adjacent commuting pairs straddle a segment boundary.", + "first_step": "Add cross-segment commuting edges as optional and recompute lo2/hi2 and the Stage 2 bound.", + "blocked_by": "The cut's compensation semantics." + }, + { + "question": "Can a new child interface (fanout, gathers) beat the class ceiling?", + "why_it_matters": "Rank-shape gains need non-commuting rewrites or new children, not reorders.", + "first_step": "Price #1865's fanout children inside this bound's per-register DP.", + "blocked_by": "A merged fanout contract." + } + ] +} diff --git a/research/k8-commutation-ceiling-seed26/VERIFY.json b/research/k8-commutation-ceiling-seed26/VERIFY.json new file mode 100644 index 0000000000..5d0fd1f22e --- /dev/null +++ b/research/k8-commutation-ceiling-seed26/VERIFY.json @@ -0,0 +1,43 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/selected-k8-frame-ceiling/EXPECTED.json", + "research/selected-k8-frame-ceiling/common.py", + "research/selected-k8-frame-ceiling/independent.py", + "research/selected-k8-frame-ceiling/references/SLOT-PINS.json", + "research/selected-k8-frame-ceiling/references/WORD.json.gz", + "research/selected-k8-frame-ceiling/references/ceiling.py", + "research/selected-k8-frame-ceiling/references/frame_model.py" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 600, + "checks": "PR1671 files pinned; ceiling bracket and the word's own profile; commutation rule = exact composition on all 109,388 same-register pairs; chronological intervals = PR1671's; two trace-interval implementations agree and contain the word's frames; two subspace enumerators agree; Stage 1 (rejects chronologically, not in the trace class); Stage 2 exact Lagrangian certificates LAMBDA.json (a* = 1.05 a_hi) and LAMBDA-1007.json (1.007 a_hi) give bill lower bounds > 1 and stay below the given word's bill; toy exhaustive soundness check and its invalid-charging mutation; RESULT.json byte-identical." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "-m", + "unittest", + "discover", + "-s", + "{package}", + "-p", + "test_package.py" + ], + "timeout_seconds": 300, + "checks": "Commutation rule exact and a wrong rule caught; PR1671 intervals; trace containment and forced count; given profile; subspace counts; certificate > 1 and zero multipliers do not reject; forced-gate multiplier and wrong word digest refused; recorded results; toy soundness and mutation." + } + ] +} diff --git a/research/k8-commutation-ceiling-seed26/discover.py b/research/k8-commutation-ceiling-seed26/discover.py new file mode 100644 index 0000000000..86a4cbffed --- /dev/null +++ b/research/k8-commutation-ceiling-seed26/discover.py @@ -0,0 +1,122 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Optional: rediscover a multiplier certificate by float subgradient ascent (never imported by verify.py, which checks +the stored certificate exactly). + +Usage: python3 -I -B research/k8-commutation-ceiling-seed26/discover.py OUT.json [a_factor=21/20] [iters=300] [step=3e-6] + +L(lam) = sum_q min over stabbing chains of [chain cost + sum_items coef * dim(point)], coef = +lam_g on the target copy and +-lam_g on the source copy of free ADD gate g; a copy with coef > 0 is charged at its entry point, coef < 0 at its exit. +The subgradient for g is dim(target copy) - dim(source copy) at the argmin chains. The best lam is rounded to k/2^40. +""" +import collections +import json +import math +import sys +from fractions import Fraction as Q +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).resolve().parent)) +import model as Mo # noqa: E402 + + +def main(): + out = sys.argv[1] + fac = Q(sys.argv[2]) if len(sys.argv) > 2 else Q(21, 20) + iters = int(sys.argv[3]) if len(sys.argv) > 3 else 300 + step0 = float(sys.argv[4]) if len(sys.argv) > 4 else 3e-6 + I = Mo.load_1671() + W = Mo.Word(I) + lo, hi = W.intervals('trace') + a = float(fac * Mo.BASE_HI) + dim = I.dimension + + def c(d): + return 0.0 if d == 0 else (d / 73) ** (1 - a) + const = 8 * c(8) + (1646 / 51) * c(51) + free = [i for i, e in enumerate(W.ops) if e[0] == 'add' and lo[('G', i)] != hi[('G', i)]] + fidx = {g: k for k, g in enumerate(free)} + regs_data = [] + for q in range(W.n): + items = [] + for i in W.on.get(q, []): + sign = (1 if W.ops[i][1] == q else -1) if i in fidx else 0 + items.append((lo[('G', i)], hi[('G', i)], i if sign else None, sign)) + if q in W.pins: + items.append((W.fixed[('P', q)], W.fixed[('P', q)], None, 0)) + S, E = W.fixed[('S', q)], W.fixed[('E', q)] + cand = {S, E} + for l, h, _, _ in items: + cand.update(Mo.subspaces_closure(I, l, h)) + cand = sorted(cand, key=lambda F: F.bit_count()) + inl = [sum(1 << k for k, it in enumerate(items) if it[0] & ~V == 0) for V in cand] + inh = [sum(1 << k for k, it in enumerate(items) if V & ~it[1] == 0) for V in cand] + dims = [dim(V) for V in cand] + arcs = [[] for _ in cand] + for j in range(len(cand)): + for i2 in range(j): + if cand[i2] & ~cand[j] or dims[i2] == dims[j]: + continue + ent = inl[j] & ~inl[i2] + if ent & ~inh[j]: + continue + arcs[j].append((i2, c(dims[j] - dims[i2]), ent, inh[i2] & ~inh[j])) + regs_data.append((dims, arcs, items, cand.index(S), cand.index(E), inl, inh)) + + def solve(reg, lam): + dims, arcs, items, s0, e0, inl, inh = reg + K = len(items) + coef = [lam[fidx[it[2]]] * it[3] if it[2] is not None else 0.0 for it in items] + f = [math.inf] * len(dims) + back = [None] * len(dims) + f[s0] = sum(coef[k] * dims[s0] for k in range(K) if inl[s0] >> k & 1 and coef[k] > 0) + for j in range(len(dims)): + if j == s0: + continue + for i2, base, ent, ex in arcs[j]: + if f[i2] == math.inf: + continue + v = f[i2] + base + sum(coef[k] * dims[j] for k in range(K) if ent >> k & 1 and coef[k] > 0) \ + + sum(coef[k] * dims[i2] for k in range(K) if ex >> k & 1 and coef[k] < 0) + if v < f[j]: + f[j], back[j] = v, i2 + tot = f[e0] + sum(coef[k] * dims[e0] for k in range(K) if inh[e0] >> k & 1 and coef[k] < 0) + path = [e0] + while path[-1] != s0: + path.append(back[path[-1]]) + path.reverse() + chosen = {} + for k, it in enumerate(items): + if it[2] is None: + continue + ent = next(p for p in path if inl[p] >> k & 1) + last = [p for p in path if inh[p] >> k & 1 and inl[p] >> k & 1][-1] + chosen[k] = dims[last] if coef[k] < 0 else dims[ent] + return tot, chosen + + lam = [0.0] * len(free) + best, best_lam = -math.inf, list(lam) + for it in range(iters): + L, sub = 0.0, [0.0] * len(free) + for reg in regs_data: + tot, chosen = solve(reg, lam) + L += tot + for k, d in chosen.items(): + item = reg[2][k] + sub[fidx[item[2]]] += item[3] * d + if L > best: + best, best_lam = L, list(lam) + print('iter %d bill %.12f best %.12f' % (it, (L + const) * 9 / 896, (best + const) * 9 / 896), flush=True) + if not any(sub): + break + step = step0 / math.sqrt(it + 1) + lam = [x + step * g for x, g in zip(lam, sub)] + k = {str(g): round(x * (1 << Mo.LAMBDA_BITS)) for g, x in zip(free, best_lam) if round(x * (1 << Mo.LAMBDA_BITS))} + Path(out).write_text(json.dumps(dict(schema=1, word_sha256='c2b294300760e1fd6eeab8c22c4d13e4633dca40e52cac8da0d68163a76e3ca8', + a_factor_of_base_hi=str(fac), denominator_bits=Mo.LAMBDA_BITS, + note='discovered by discover.py; check exactly with verify.py', + lam=dict(sorted(k.items(), key=lambda kv: int(kv[0])))), indent=0, sort_keys=True) + '\n') + + +if __name__ == '__main__': + main() diff --git a/research/k8-commutation-ceiling-seed26/model.py b/research/k8-commutation-ceiling-seed26/model.py new file mode 100644 index 0000000000..2e8d67b88a --- /dev/null +++ b/research/k8-commutation-ceiling-seed26/model.py @@ -0,0 +1,375 @@ +# SPDX-License-Identifier: Apache-2.0 +"""The commutation trace class of the selected k8 word: dependency DAG, frame intervals and the exact per-register +bound (standard library; loads merged PR1671 code, research/selected-k8-frame-ceiling, for the word, its bitset +helpers, cone caps and ceiling.py, after checking their digests). + +Class: W' = A' B' T', each segment any linear extension of its dependency order (same-register pairs that do not +commute), coefficients unchanged; frames: one frame per gate shared by its operands, nested along every register, +under PR1671's starts, ends, charged pins, cone caps and fixed centre descents. +""" +import collections +import importlib.util +from fractions import Fraction as Q +from pathlib import Path + +PKG1671 = Path(__file__).resolve().parents[1] / 'selected-k8-frame-ceiling' +BASE_LO = Q(1690054109088, 10 ** 15) +BASE_HI = Q(1690054109089, 10 ** 15) +A_STAR = Q(21, 20) * BASE_HI +PROFILE = {1: 2412, 2: 418, 3: 432, 4: 142, 5: 82, 8: 8} +LAMBDA_BITS = 40 + + +def load_1671(): + spec = importlib.util.spec_from_file_location('k8_independent', PKG1671 / 'independent.py') + I = importlib.util.module_from_spec(spec) + spec.loader.exec_module(I) + return I + + +def regs(e): + return tuple(e[1:3]) if e[0] == 'add' else (e[1],) + + +def commute(e, g): + """matrix commutation of two elementary row operations: ADD row_t += c row_s, SCALE row_t *= c (c != 1).""" + if e[0] == 'add' and g[0] == 'add': + return e[1] != g[2] and g[1] != e[2] + if e[0] == 'scale' and g[0] == 'scale': + return True + return not (set(regs(e)) & set(regs(g))) + + +def apply_exact(e, vec): + """apply one gate to a sparse rational row vector {register: Fraction} (rows are linear forms).""" + out = dict(vec) + if e[0] == 'add': + t, s = e[1], e[2] + out[t] = out.get(t, Q(0)) + Q(e[3], e[4]) * out.get(s, Q(0)) + else: + out[e[1]] = out.get(e[1], Q(0)) * Q(e[2], e[3]) + return {k: v for k, v in out.items() if v} + + +class Word: + def __init__(self, I): + self.I = I + self.U = I.U + w = self.U.word() + self.w = w + self.v, self.n = 112, 704 + nA, nB = len(w['A']), len(w['B']) + tail = [w['cleanup'][i][:-1] + [f] for i, f in w['early_cleanup']] + self.ops = w['A'] + w['B'] + tail + self.seg = ['A'] * nA + ['B'] * nB + ['T'] * len(tail) + self.nA, self.nB = nA, nB + low = {int(q): I.frame(x) for q, x in w['helper_final'].items()} + self.caps = I.cone_caps(w, self.n, self.v, low) + self.pins = {q: I.frame(x) for q, x in zip(w['centers'], w['center_frames'])} + for t in range(self.v): + self.pins[self.v + t] = 1 # target_levels is empty: zero subspace + self.chrono = I.build(w) + self.fixed = {} + for q in range(self.n): + self.fixed[('S', q)] = self.chrono['lo'][('S', q)] + self.fixed[('E', q)] = self.chrono['hi'][('E', q)] + for q, f in self.pins.items(): + self.fixed[('P', q)] = f + self.on = collections.defaultdict(list) + for i, e in enumerate(self.ops): + for q in regs(e): + self.on[q].append(i) + + def depends(self, mode, g, h): + """does the earlier same-register gate g constrain the later gate h?""" + return mode == 'chrono' or self.seg[g] != self.seg[h] or not commute(self.ops[g], self.ops[h]) + + # ---------------------------------------------------------------- implementation I: propagation + def intervals(self, mode): + I, ops, seg = self.I, self.ops, self.seg + pred = collections.defaultdict(set) + for q, gs in self.on.items(): + for x, h in enumerate(gs): + for g in gs[:x]: + if self.depends(mode, g, h): + pred[('G', h)].add(('G', g)) + for q in range(self.n): + gs = self.on.get(q, []) + for i in gs: + pred[('G', i)].add(('S', q)) + pred[('E', q)].add(('G', i)) + pred[('E', q)].add(('S', q)) + if q in self.pins: + pred[('P', q)].add(('S', q)) + pred[('E', q)].add(('P', q)) + for i in gs: + if seg[i] == 'A': + pred[('P', q)].add(('G', i)) + else: + pred[('G', i)].add(('P', q)) + for q in self.caps: + X = ('X', q) + pred[X].add(('S', q)) + if q in self.pins: + pred[X].add(('P', q)) + for i in self.on.get(q, []): + if seg[i] in 'AB': + pred[X].add(('G', i)) + else: + pred[('G', i)].add(X) + pred[('E', q)].add(X) + order = ([('S', q) for q in range(self.n)] + [('G', i) for i in range(self.nA)] + [('P', q) for q in self.pins] + + [('G', i) for i in range(self.nA, self.nA + self.nB)] + [('X', q) for q in self.caps] + + [('G', i) for i in range(self.nA + self.nB, len(ops))] + [('E', q) for q in range(self.n)]) + pos = {x: k for k, x in enumerate(order)} + succ = collections.defaultdict(set) + for b, ps in pred.items(): + for a in ps: + assert pos[a] < pos[b] + succ[a].add(b) + lo, hi = {}, {} + for node in order: + if node in self.fixed: + lo[node] = self.fixed[node] + if any(lo[p] & ~self.fixed[node] for p in pred[node]): + raise ValueError('fixed frame below the join of its predecessors') + else: + f = 1 + for p in pred[node]: + f = I.join(f, lo[p]) + lo[node] = f + for node in reversed(order): + if node in self.fixed: + hi[node] = self.fixed[node] + else: + f = I.FULL + for s in succ[node]: + f &= hi[s] + if node[0] == 'X': + f &= self.caps[node[1]] + hi[node] = f + if lo[node] & ~hi[node]: + raise ValueError('empty interval at %r' % (node,)) + return lo, hi + + # ---------------------------------------------------------------- implementation II: closed form + def intervals_closed(self, mode): + """lo2(g) = join of starts (and B/T-side pins) over ancestors; hi2(g) = meet of ends, A-side pins and caps over + descendants; frame_model reduced-echelon tuples and its Zassenhaus meet.""" + M = self.U.retained('frame_model.py') + I, ops, seg = self.I, self.ops, self.seg + N = len(ops) + + def tup(mask): + return M.basis(list(I.canonical_frame(mask))) + + def mask(t): + vals = {0} + for x in t: + vals |= {y ^ x for y in vals} + return sum(1 << y for y in vals) + pred = [0] * N + for q, gs in self.on.items(): + for x, h in enumerate(gs): + for g in gs[:x]: + if self.depends(mode, g, h): + pred[h] |= 1 << g + anc = [0] * N + for j in range(N): + a, x = pred[j], pred[j] + while x: + b = x & -x + x ^= b + a |= anc[b.bit_length() - 1] + anc[j] = a + desc = [0] * N + for i in range(N): + x = anc[i] + while x: + b = x & -x + x ^= b + desc[b.bit_length() - 1] |= 1 << i + S = {q: tup(self.fixed[('S', q)]) for q in range(self.n)} + E = {q: tup(self.fixed[('E', q)]) for q in range(self.n)} + P = {q: tup(f) for q, f in self.pins.items()} + CAP = {q: tup(f) for q, f in self.caps.items()} + + def bits(x): + while x: + b = x & -x + x ^= b + yield b.bit_length() - 1 + lo, hi = {}, {} + for g in range(N): + A_ = list(bits(anc[g])) + [g] + D_ = list(bits(desc[g])) + [g] + parts = {S[q] for h in A_ for q in regs(ops[h])} + parts |= {P[q] for h in A_ if seg[h] != 'A' for q in regs(ops[h]) if q in P} + hp = set() + for h in D_: + for q in regs(ops[h]): + hp.add(E[q]) + if seg[h] == 'A' and q in P: + hp.add(P[q]) + if seg[h] in 'AB' and q in CAP: + hp.add(CAP[q]) + top = tuple(1 << k for k in range(8, -1, -1)) + for f in sorted(hp): + top = M.meet(top, f) + lo[('G', g)] = mask(M.join(sorted(parts))) + hi[('G', g)] = mask(top) + return lo, hi + + +# -------------------------------------------------------------------- subspaces of an interval (two enumerators) +def subspaces_closure(I, l, h, _memo={}): + if (l, h) not in _memo: + comp, cur = [], l + for x in I.canonical_frame(h): + if not (cur >> x) & 1: + comp.append(x) + cur = I.extend(cur, x) + res = [] + for sub in I.small_spaces(len(comp)): + val = l + for b in I.elements(sub): + x = 0 + for j, c in enumerate(comp): + if b >> j & 1: + x ^= c + val = I.extend(val, x) + res.append(val) + _memo[(l, h)] = res + return _memo[(l, h)] + + +def subspaces_rref(I, l, h): + """every subspace V with l <= V <= h: l plus a reduced-echelon choice of vectors from a complement basis.""" + comp, cur = [], l + for x in I.canonical_frame(h): + if not (cur >> x) & 1: + comp.append(x) + cur = I.extend(cur, x) + k = len(comp) + out = set() + for r in range(k + 1): + for pivots in _combinations(range(k), r): + free = [(i, j) for i, p in enumerate(pivots) for j in range(p + 1, k) if j not in pivots] + for bits in range(1 << len(free)): + rows = [1 << p for p in pivots] + for b, (i, j) in enumerate(free): + if bits >> b & 1: + rows[i] |= 1 << j + val = l + for row in rows: + x = 0 + for j in range(k): + if row >> j & 1: + x ^= comp[j] + val = I.extend(val, x) + out.add(val) + return out + + +def _combinations(items, r): + items = list(items) + if r == 0: + yield () + return + for i in range(len(items)): + for rest in _combinations(items[i + 1:], r - 1): + yield (items[i],) + rest + + +# -------------------------------------------------------------------- the exact per-register bound +def costs(C, a): + SC = 1 << C.PREC + cost = [0] + [int(C.child_cost(d, 73, a)[0] * SC) for d in range(1, 10)] + if not all(Q(cost[d], SC) == C.child_cost(d, 73, a)[0] for d in range(1, 10)): + raise ValueError('child_cost lower ends are not on the 2^-PREC grid') + return cost, SC + + +def bound(W, lo, hi, a, lam=None): + """Lower bound on the local bill at exponent a over every member and every legal frame assignment. + + lam: None (Stage 1) or {free ADD gate: integer k} with multiplier k / 2^LAMBDA_BITS on the target copy and minus + that on the source copy, charged by dimension at the copy's entry point (k > 0) or exit point (k < 0). + Returns (exact bill lower bound as a Fraction, total local cost numerator at scale 2^PREC).""" + I, C = W.I, W.U.retained('ceiling.py') + cost, SC = costs(C, a) + SH = C.PREC - LAMBDA_BITS + dim = I.dimension + lam = lam or {} + total = 0 + for q in range(W.n): + items = [] + for i in W.on.get(q, []): + e = W.ops[i] + co = 0 + if e[0] == 'add' and lo[('G', i)] != hi[('G', i)]: + co = lam.get(i, 0) * (1 if e[1] == q else -1) + items.append((lo[('G', i)], hi[('G', i)], co)) + if q in W.pins: + items.append((W.fixed[('P', q)], W.fixed[('P', q)], 0)) + S, E = W.fixed[('S', q)], W.fixed[('E', q)] + cand = {S, E} + for l, h, _ in items: + cand.update(subspaces_closure(I, l, h)) + cand = sorted(cand, key=lambda F: F.bit_count()) + K = len(items) + inl = [sum(1 << k for k, it in enumerate(items) if it[0] & ~V == 0) for V in cand] + inh = [sum(1 << k for k, it in enumerate(items) if V & ~it[1] == 0) for V in cand] + dims = [dim(V) for V in cand] + s0, e0 = cand.index(S), cand.index(E) + pos = [k for k in range(K) if items[k][2] > 0] + neg = [k for k in range(K) if items[k][2] < 0] + f = [None] * len(cand) + f[s0] = sum(items[k][2] * dims[s0] for k in pos if inl[s0] >> k & 1) << SH + for j in range(len(cand)): + if j == s0: + continue + best = None + for i2 in range(j): + if f[i2] is None or dims[i2] == dims[j] or cand[i2] & ~cand[j]: + continue + ent = inl[j] & ~inl[i2] + if ent & ~inh[j]: + continue # an item's first entry would land outside its upper end + ex = inh[i2] & ~inh[j] + val = f[i2] + cost[dims[j] - dims[i2]] + val += sum(items[k][2] * dims[j] for k in pos if ent >> k & 1) << SH + val += sum(items[k][2] * dims[i2] for k in neg if ex >> k & 1) << SH + if best is None or val < best: + best = val + f[j] = best + if f[e0] is None: + raise ValueError('no stabbing chain for register %d' % q) + total += f[e0] + (sum(items[k][2] * dims[e0] for k in neg if inh[e0] >> k & 1) << SH) + idle = C.child_cost(51, 73, a)[0] + bill = (Q(total + 8 * cost[8], SC) + Q(1646, 51) * idle) / Q(896, 9) + return bill, total + + +def given_word_profile(W): + """the paid profile of the selected word's own frames (pins charged as climbs, centre descents added).""" + I = W.I + prof = collections.Counter() + for q in range(W.n): + seq = [W.fixed[('S', q)]] + pinned = q not in W.pins + for i in W.on.get(q, []): + if not pinned and W.seg[i] != 'A': + seq.append(W.fixed[('P', q)]) + pinned = True + seq.append(I.frame(W.ops[i][-1])) + if not pinned: + seq.append(W.fixed[('P', q)]) + seq.append(W.fixed[('E', q)]) + for x, y in zip(seq, seq[1:]): + if x != y: + if x & ~y: + raise ValueError('given frames are not nested on register %d' % q) + prof[I.dimension(y) - I.dimension(x)] += 1 + prof[8] += 8 + return dict(sorted(prof.items())) diff --git a/research/k8-commutation-ceiling-seed26/test_package.py b/research/k8-commutation-ceiling-seed26/test_package.py new file mode 100644 index 0000000000..21f5861d33 --- /dev/null +++ b/research/k8-commutation-ceiling-seed26/test_package.py @@ -0,0 +1,110 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Controls for the commutation-class ceiling (about 40 s). + +Run: python3 -I -B -m unittest discover -s research/k8-commutation-ceiling-seed26 -p test_package.py -v +""" +import json +import sys +import tempfile +import unittest +from pathlib import Path + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +import model as Mo # noqa: E402 +import toy # noqa: E402 +import verify as V # noqa: E402 + +I = Mo.load_1671() +W = Mo.Word(I) +LO1, HI1 = W.intervals('chrono') +LO2, HI2 = W.intervals('trace') +G = [('G', i) for i in range(len(W.ops))] +RESULT = json.loads((HERE / 'RESULT.json').read_text()) + + +class Model(unittest.TestCase): + def test_commutation_rule_matches_exact_composition(self): + pairs, agree = V.commute_exact(W) + self.assertEqual((pairs, agree), (109388, 109388)) + + def test_a_wrong_rule_disagrees_with_exact_composition(self): + saved = Mo.commute + try: + Mo.commute = lambda e, g: True if e[0] == 'add' and g[0] == 'add' else saved(e, g) # ignores t1 == s2 + pairs, agree = V.commute_exact(W) + self.assertLess(agree, pairs) + finally: + Mo.commute = saved + + def test_chronological_mode_is_pr1671(self): + self.assertTrue(all(LO1[g] == W.chrono['lo'][g] and HI1[g] == W.chrono['hi'][g] for g in G)) + + def test_trace_intervals_contain_chronological_and_the_word(self): + self.assertTrue(all(LO2[g] & ~LO1[g] == 0 and HI1[g] & ~HI2[g] == 0 for g in G)) + self.assertEqual(sum(LO2[g] == HI2[g] for g in G), 2979) + + def test_given_word_profile(self): + self.assertEqual(Mo.given_word_profile(W), Mo.PROFILE) + + def test_subspace_counts(self): + self.assertEqual([len(Mo.subspaces_rref(I, 1, V._span(I, k))) for k in range(5)], [1, 2, 5, 16, 67]) + + +class Bounds(unittest.TestCase): + def test_certificate_excludes_the_class_at_the_gate(self): + lam, fac = V.load_lambda('LAMBDA.json', W, LO2, HI2) + b, _ = Mo.bound(W, LO2, HI2, fac * Mo.BASE_HI, lam) + self.assertGreater(b, 1) + + def test_without_coupling_the_bound_does_not_reject(self): + b, _ = Mo.bound(W, LO2, HI2, Mo.A_STAR) + self.assertLess(b, 1) + + def test_multiplier_on_a_forced_gate_is_refused(self): + forced = next(i for i, e in enumerate(W.ops) if e[0] == 'add' and LO2[('G', i)] == HI2[('G', i)]) + d = json.loads((HERE / 'LAMBDA.json').read_text()) + d['lam'][str(forced)] = 5 + with tempfile.TemporaryDirectory() as t: + p = Path(t) / 'L.json' + p.write_text(json.dumps(d)) + saved = V.HERE + try: + V.HERE = Path(t) + with self.assertRaisesRegex(V.Reject, 'free ADD gates'): + V.load_lambda('L.json', W, LO2, HI2) + finally: + V.HERE = saved + + def test_wrong_word_digest_refused(self): + d = json.loads((HERE / 'LAMBDA.json').read_text()) + d['word_sha256'] = '0' * 64 + with tempfile.TemporaryDirectory() as t: + (Path(t) / 'L.json').write_text(json.dumps(d)) + saved = V.HERE + try: + V.HERE = Path(t) + with self.assertRaisesRegex(V.Reject, 'certificate header'): + V.load_lambda('L.json', W, LO2, HI2) + finally: + V.HERE = saved + + def test_recorded_results(self): + self.assertTrue(all(float(v['bill_lower_minus_one']) > 0 for v in RESULT['stage2'].values())) + self.assertLess(float(RESULT['stage1']['trace']), 1) + self.assertGreater(float(RESULT['stage1']['chronological']), 1) + + +class Toy(unittest.TestCase): + def test_toy_bound_is_sound(self): + done, multi = toy.run(2, 60) + self.assertEqual(done, 60) + self.assertGreater(multi, 0) + + def test_invalid_charging_is_caught(self): + with self.assertRaises(AssertionError): + toy.run(1, 150, mutated=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/research/k8-commutation-ceiling-seed26/toy.py b/research/k8-commutation-ceiling-seed26/toy.py new file mode 100644 index 0000000000..2744486bbd --- /dev/null +++ b/research/k8-commutation-ceiling-seed26/toy.py @@ -0,0 +1,155 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Toy soundness control (standalone, standard library): random small words over F2^3, exhaustive minimum over every +linear extension of the commutation order and every nested frame assignment, against (a) the lo2/hi2 intervals, +(b) the order-free stabbing DP and (c) the dimension-coupled Lagrangian DP with random multipliers. + +run(seed, count, mutated=False) returns the number of trials (and of trials with more than one linear extension); +it raises AssertionError on any violation. mutated=True charges negative multipliers at the entry point instead of +the exit point (an invalid rule) and must be caught. +""" +import itertools +import random + +H = 3 +FULL = (1 << (1 << H)) - 1 + + +def extend(f, v): + return f if f >> v & 1 else f | sum(1 << (x ^ v) for x in range(1 << H) if f >> x & 1) + + +def span(vs): + f = 1 + for v in vs: + f = extend(f, v) + return f + + +def dim(f): + return f.bit_count().bit_length() - 1 + + +SUBS = sorted({span(c) for k in range(H + 1) for c in itertools.combinations(range(1, 1 << H), k)}, key=lambda f: f.bit_count()) + + +def join(a, b): + r = a + for v in range(1 << H): + if b >> v & 1: + r = extend(r, v) + return r + + +def cost(d): + return 0.0 if d == 0 else d ** 0.8 + + +def commute(g, h): + if g[0] == 'add' and h[0] == 'add': + return g[1] != h[2] and h[1] != g[2] + if g[0] == 'scale' and h[0] == 'scale': + return True + return not (set(g[1:]) & set(h[1:])) + + +def trial(rng, mutated): + nreg, ng = rng.randint(2, 4), rng.randint(2, 4) + ops = [] + for _ in range(ng): + if rng.random() < 0.8: + t, s = rng.sample(range(nreg), 2) + ops.append(('add', t, s)) + else: + ops.append(('scale', rng.randrange(nreg))) + S = {q: rng.choice([s for s in SUBS if dim(s) <= 1]) for q in range(nreg)} + E = {q: rng.choice([e for e in SUBS if e & S[q] == S[q] and dim(e) >= 2]) for q in range(nreg)} + on = {q: [i for i, g in enumerate(ops) if q in g[1:]] for q in range(nreg)} + pred = {i: {j for j in range(i) if set(ops[i][1:]) & set(ops[j][1:]) and not commute(ops[i], ops[j])} for i in range(ng)} + lo, hi = {}, {} + for i in range(ng): + f = 1 + for q in ops[i][1:]: + f = join(f, S[q]) + for j in pred[i]: + f = join(f, lo[j]) + lo[i] = f + for i in reversed(range(ng)): + f = FULL + for q in ops[i][1:]: + f &= E[q] + for j in range(i + 1, ng): + if i in pred[j]: + f &= hi[j] + hi[i] = f + if any(lo[i] & ~hi[i] for i in range(ng)): + return None + exts = [p for p in itertools.permutations(range(ng)) if all(p.index(j) < p.index(i) for i in range(ng) for j in pred[i])] + best = None + for p in exts: + for F in itertools.product(SUBS, repeat=ng): + total, ok = 0.0, True + for q in range(nreg): + seq = [S[q]] + [F[i] for i in p if q in ops[i][1:]] + [E[q]] + for a, b in zip(seq, seq[1:]): + if a & ~b: + ok = False + break + total += cost(dim(b) - dim(a)) + if not ok: + break + if not ok: + continue + for i in range(ng): + assert F[i] & lo[i] == lo[i] and F[i] & ~hi[i] == 0, 'lo2/hi2 unsound' + if best is None or total < best: + best = total + if best is None: + return None + for t in range(6): + lam = {i: (0.0 if t == 0 else rng.uniform(-1, 1)) for i, g in enumerate(ops) if g[0] == 'add'} + L = 0.0 + for q in range(nreg): + items = [(lo[i], hi[i], lam.get(i, 0.0) * (1 if ops[i][1] == q else -1) if ops[i][0] == 'add' else 0.0) for i in on[q]] + cand = sorted({S[q], E[q]} | {F for l, h, _ in items for F in SUBS if F & l == l and F & ~h == 0}, key=lambda f: f.bit_count()) + inl = [[it[0] & ~V == 0 for it in items] for V in cand] + inh = [[V & ~it[1] == 0 for it in items] for V in cand] + s0, e0 = cand.index(S[q]), cand.index(E[q]) + f = [None] * len(cand) + f[s0] = 0.0 if mutated else sum(it[2] * dim(S[q]) for k, it in enumerate(items) if inl[s0][k] and it[2] > 0) + for j in range(len(cand)): + if j == s0: + continue + bj = None + for i2 in range(len(cand)): + if f[i2] is None or cand[i2] == cand[j] or cand[i2] & ~cand[j]: + continue + if any(inl[j][k] and not inl[i2][k] and not inh[j][k] for k in range(len(items))): + continue + v = f[i2] + cost(dim(cand[j]) - dim(cand[i2])) + for k, it in enumerate(items): + if mutated: + if it[2] > 0 and inh[i2][k] and not inh[j][k]: + v += it[2] * dim(cand[i2]) + elif it[2] > 0 and inl[j][k] and not inl[i2][k]: + v += it[2] * dim(cand[j]) + if it[2] < 0 and inh[i2][k] and not inh[j][k]: + v += it[2] * dim(cand[i2]) + if bj is None or v < bj: + bj = v + f[j] = bj + tail = (lambda it: it[2] != 0) if mutated else (lambda it: it[2] < 0) + L += f[e0] + sum(it[2] * dim(E[q]) for k, it in enumerate(items) if inh[e0][k] and tail(it)) + assert L <= best + 1e-9, 'Lagrangian bound above the exact minimum' + return best, len(exts) + + +def run(seed, count, mutated=False): + rng = random.Random(seed) + done = multi = 0 + while done < count: + r = trial(rng, mutated) + if r is None: + continue + done += 1 + multi += r[1] > 1 + return done, multi diff --git a/research/k8-commutation-ceiling-seed26/verify.py b/research/k8-commutation-ceiling-seed26/verify.py new file mode 100644 index 0000000000..67f6bac04b --- /dev/null +++ b/research/k8-commutation-ceiling-seed26/verify.py @@ -0,0 +1,195 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Scoped obstruction: commuting reorders plus free frames cannot lift the selected k8 word's ceiling by 5%. + +Usage: python3 -I -B research/k8-commutation-ceiling-seed26/verify.py [--write] + +PR1671 (research/selected-k8-frame-ceiling) frees every frame of the selected k8 complex word with its chronology +fixed; seed27 frees commuting-ADD order with frame slots fixed. This checks the joint class: every within-segment +reordering that keeps the order of non-commuting gates (the commutation trace class), with every legal nested frame +assignment under PR1671's rules. It certifies that no member has bill <= 1 at a* = (21/20) a_hi, i.e. the class cannot +lift the packing ceiling by 5% (and, with a second certificate, not by 0.7%). + + B binding: PR1671's word, retained ceiling.py and frame code (digests pinned in SOURCES.json); + M model: the commutation rule agrees with exact rational products on every same-register pair; the DAG intervals + (two implementations) reduce to PR1671's in chronological mode; the word's own frames lie in them; + S Stage 1: the exact order-free per-register bound (does not reject in the trace class); + L Stage 2: an exact Lagrangian bound with stored integer multipliers (LAMBDA.json, LAMBDA-1007.json) > 1; + C controls: two subspace enumerators agree, the bound stays below the given word's own bill, a toy exhaustive + check (and its invalid-charging mutation) of the bound's soundness. + +Expected last line: PASS_K8_COMMUTATION_CEILING +""" +import argparse +import hashlib +import json +import sys +from collections import Counter +from fractions import Fraction as Q +from pathlib import Path + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +sys.path.insert(0, str(HERE)) +import model as Mo # noqa: E402 +import toy # noqa: E402 + + +class Reject(Exception): + """A check failed; the argument is the label of the check.""" + + +def need(ok, label): + if not ok: + raise Reject(label) + + +def sha(data): + return hashlib.sha256(data).hexdigest() + + +def bind(): + pins = {f['path']: f['sha256'] for f in json.loads((HERE / 'SOURCES.json').read_text())['files']} + base = 'research/selected-k8-frame-ceiling/' + for rel in ('independent.py', 'common.py', 'EXPECTED.json', 'references/WORD.json.gz', 'references/SLOT-PINS.json', + 'references/frame_model.py', 'references/ceiling.py'): + need(sha((ROOT / (base + rel)).read_bytes()) == pins[base + rel], 'B PR1671 file pinned: ' + rel) + return {base + rel: pins[base + rel] for rel in ('independent.py', 'references/WORD.json.gz', 'references/ceiling.py')} + + +def load_lambda(name, W, lo, hi): + d = json.loads((HERE / name).read_text()) + need(d['word_sha256'] == 'c2b294300760e1fd6eeab8c22c4d13e4633dca40e52cac8da0d68163a76e3ca8' and d['denominator_bits'] == Mo.LAMBDA_BITS, + 'L certificate header: ' + name) + lam = {} + for g, k in d['lam'].items(): + g = int(g) + need(type(k) is int and W.ops[g][0] == 'add' and lo[('G', g)] != hi[('G', g)], 'L multipliers only on free ADD gates: ' + name) + lam[g] = k + return lam, Q(d['a_factor_of_base_hi']) + + +def commute_exact(W): + """every same-register gate pair: the rule's verdict equals exact composition in both orders on the rows involved.""" + distinct = {(g, h) for gs in W.on.values() for x, h in enumerate(gs) for g in gs[:x]} + pairs = agree = 0 + for g, h in sorted(distinct): + e, f = W.ops[g], W.ops[h] + regs = set(Mo.regs(e)) | set(Mo.regs(f)) + rows1 = {r: {r: Q(1)} for r in regs} + rows2 = {r: {r: Q(1)} for r in regs} + for gate, rows in ((e, rows1), (f, rows1), (f, rows2), (e, rows2)): + _apply_rows(gate, rows) + pairs += 1 + agree += (rows1 == rows2) == Mo.commute(e, f) + return pairs, agree + + +def _apply_rows(e, rows): + if e[0] == 'add': + t, s = e[1], e[2] + c = Q(e[3], e[4]) + new = dict(rows[t]) + for k, v in rows[s].items(): + new[k] = new.get(k, Q(0)) + c * v + rows[t] = {k: v for k, v in new.items() if v} + else: + c = Q(e[2], e[3]) + rows[e[1]] = {k: v * c for k, v in rows[e[1]].items()} + + +def main(): + ap = argparse.ArgumentParser(description=__doc__.split('\n\n')[0]) + ap.add_argument('--write', action='store_true') + a = ap.parse_args() + binding = bind() + I = Mo.load_1671() + W = Mo.Word(I) + C = W.U.retained('ceiling.py') + need(C.ceiling(Mo.PROFILE, 73, 896, 9, 64) == (Mo.BASE_LO, Mo.BASE_HI), 'B ceiling bracket of the selected profile') + profile = Mo.given_word_profile(W) + need(profile == Mo.PROFILE, 'M the word\'s own frames give the selected profile') + cost, SC = Mo.costs(C, Mo.A_STAR) + given_bill = (sum(Q(cost[r], SC) * n for r, n in profile.items()) + Q(1646, 51) * C.child_cost(51, 73, Mo.A_STAR)[0]) / Q(896, 9) + # model checks + pairs, agree = commute_exact(W) + need(pairs == agree, 'M commutation rule = exact composition on every same-register pair') + adj = [(W.on[q][k], W.on[q][k + 1]) for q in W.on for k in range(len(W.on[q]) - 1) + if W.seg[W.on[q][k]] == W.seg[W.on[q][k + 1]]] + adj_comm = sum(Mo.commute(W.ops[g], W.ops[h]) for g, h in adj) + lo1, hi1 = W.intervals('chrono') + G = [('G', i) for i in range(len(W.ops))] + need(all(lo1[g] == W.chrono['lo'][g] and hi1[g] == W.chrono['hi'][g] for g in G), 'M chronological intervals = PR1671\'s') + lo2, hi2 = W.intervals('trace') + c_lo, c_hi = W.intervals_closed('trace') + need(all(c_lo[g] == lo2[g] and c_hi[g] == hi2[g] for g in G), 'M two interval implementations agree') + need(all(lo2[g] & ~lo1[g] == 0 and hi1[g] & ~hi2[g] == 0 for g in G), 'M trace intervals contain chronological ones') + need(all(lo2[('G', i)] & ~I.frame(W.ops[i][-1]) == 0 and I.frame(W.ops[i][-1]) & ~hi2[('G', i)] == 0 for i in range(len(W.ops))), + 'M the word\'s own frames lie in the trace intervals') + qd = Counter(I.dimension(hi2[g]) - I.dimension(lo2[g]) for g in G) + # enumerators + distinct = sorted({(lo2[g], hi2[g]) for g in G}, key=lambda lh: (lh[1].bit_count(), lh)) + need(all(set(Mo.subspaces_closure(I, l, h)) == Mo.subspaces_rref(I, l, h) for l, h in distinct), 'C subspace enumerators agree') + counts = {k: len(Mo.subspaces_rref(I, 1, _span(I, k))) for k in range(7)} + need(counts == {0: 1, 1: 2, 2: 5, 3: 16, 4: 67, 5: 374, 6: 2825}, 'C subspace counts of F2^k') + # bounds + s1_trace, _ = Mo.bound(W, lo2, hi2, Mo.A_STAR) + s1_chrono, _ = Mo.bound(W, lo1, hi1, Mo.A_STAR) + need(s1_chrono > 1 and s1_trace <= 1, 'S Stage 1 rejects in chronological mode only') + certs = {} + for name in ('LAMBDA.json', 'LAMBDA-1007.json'): + lam, fac = load_lambda(name, W, lo2, hi2) + at = fac * Mo.BASE_HI + b, _ = Mo.bound(W, lo2, hi2, at, lam) + need(b > 1, 'L certificate %s: bill lower bound > 1' % name) + certs[name] = dict(a='%s x a_hi' % fac, nonzero_multipliers=len(lam), bill_lower_minus_one='%.15e' % float(b - 1), + bill_lower_exact_sign='> 1') + if fac == Q(21, 20): + need(b <= given_bill, 'C the bound does not exceed the given word\'s own bill') + # toy soundness control + done, multi = toy.run(1, 150) + caught = False + try: + toy.run(1, 150, mutated=True) + except AssertionError: + caught = True + need(caught, 'C toy check catches the invalid charging rule') + result = dict( + status='PASS_K8_COMMUTATION_CEILING', + binding=binding, + model=dict(registers=W.n, gates=len(W.ops), same_register_pairs=pairs, commutation_rule_exact=True, + adjacent_within_segment=len(adj), adjacent_commuting=adj_comm, + forced_chronological=sum(lo1[g] == hi1[g] for g in G), forced_trace=sum(lo2[g] == hi2[g] for g in G), + changed_intervals=sum((lo1[g], hi1[g]) != (lo2[g], hi2[g]) for g in G), + quotient_dims_trace={str(k): v for k, v in sorted(qd.items())}, cone_registers=len(W.caps)), + given_word=dict(profile={str(k): v for k, v in profile.items()}, bill_lower_at_a_star='%.15f' % float(given_bill)), + stage1=dict(trace='%.15f' % float(s1_trace), chronological='%.15f' % float(s1_chrono), + verdict='decoupled bound rejects only with the chronology fixed'), + stage2=certs, + toy=dict(trials=done, with_several_linear_extensions=multi, invalid_charging_caught=True), + a_star='%s = (21/20) x %s' % (Mo.A_STAR, Mo.BASE_HI), + scope='Within-segment commuting reorders of A, B and the tail with every legal PR1671 frame assignment; no cross-segment ' + 'moves, rescaling rewrites, changed cut/compensation/pins/endpoints, new child interfaces or other words; no kappa') + text = json.dumps(result, indent=1, sort_keys=True) + '\n' + target = HERE / 'RESULT.json' + if a.write: + target.write_text(text) + else: + need(target.read_text() == text, 'RESULT.json reproduced byte for byte') + print('stage1 trace %s chrono %s; stage2 %s' % (result['stage1']['trace'], result['stage1']['chronological'], + {k: v['bill_lower_minus_one'] for k, v in certs.items()})) + print('PASS_K8_COMMUTATION_CEILING') + + +def _span(I, k): + f = 1 + for j in range(k): + f = I.extend(f, 1 << j) + return f + + +if __name__ == '__main__': + try: + main() + except Reject as exc: + raise SystemExit('FAIL ' + str(exc))