Download data/lean/OAI/Computability/PerfectCompleteness/Foundations/CutTerminalZero.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.36 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/PerfectCompleteness/Foundations/CutTerminalZero.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Computability/PerfectCompleteness/Foundations/CutTerminalZero.lean
-
curl -L -o CutTerminalZero.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/PerfectCompleteness/Foundations/CutTerminalZero.lean
4.36 kB
| import OAI.Computability.PerfectCompleteness.Foundations.CutTerminalSplit | |
| import OAI.Computability.PerfectCompleteness.Sampling.CutSamplerLocality | |
| namespace OAI | |
| section | |
| namespace PerfectCompleteness.CutTerminalZero | |
| open RecursiveSpaces DescendantSpaces RecursiveSampler TerminalCalls | |
| open scoped Classical | |
| noncomputable section | |
| universe u w | |
| variable {branch : Nat β Nat} {n m : Nat} | |
| (π : Type w) [Field π] (repeats : Nat β Nat) | |
| theorem terminalFactorEquiv_refl (A : Slots branch (m + 1) β Type u) | |
| (terminal : TerminalIndex repeats (.refl (m + 1))) | |
| (x : CutSamplerRefinement.RefinedSpace π repeats (.refl (m + 1)) A | |
| (drawIndex repeats (.refl (m + 1)) terminal)) : | |
| CutTerminalSplit.terminalFactorEquiv π repeats (.refl (m + 1)) A terminal x = x := rfl | |
| theorem terminalFactorEquiv_step (i : Fin (branch n)) | |
| (p : Path branch n (m + 1)) (A : Slots branch (n + 1) β Type u) | |
| (call : Fin (repeats (n + 1)) Γ Bool) (terminal : TerminalIndex repeats p) | |
| (x : CutSamplerRefinement.RefinedSpace π repeats p (childFamily A i) | |
| (drawIndex repeats p terminal)) : | |
| CutTerminalSplit.terminalFactorEquiv π repeats (.step i p) A (call, terminal) x = | |
| CutTerminalSplit.terminalFactorEquiv π repeats p (childFamily A i) terminal x := rfl | |
| theorem splitTape_terminal_step (i : Fin (branch n)) | |
| (p : Path branch n (m + 1)) (A : Slots branch (n + 1) β Type u) | |
| (tape : CutSamplerRefinement.Tape π repeats (.step i p) A) | |
| (h : Fin (repeats (n + 1))) (b : Bool) (terminal : TerminalIndex repeats p) : | |
| (CutTerminalSplit.splitTape π repeats (.step i p) A tape).1 ((h, b), terminal) = | |
| (CutTerminalSplit.splitTape π repeats p (childFamily A i) | |
| (CutSamplerLocality.subTape π repeats i p A tape h b)).1 terminal := by | |
| simp only [CutTerminalSplit.splitTape_terminal_apply] | |
| rfl | |
| theorem zeroAtClean_iff (p : Path branch n (m + 1)) : | |
| β (A : Slots branch n β Type u) (clean : Fin (branch m) β Prop) | |
| (tape : CutSamplerRefinement.Tape π repeats p A), | |
| (β terminal i, clean i β | |
| (CutTerminalSplit.splitTape π repeats p A tape).1 terminal i = 0) β | |
| CutSamplerLocality.ZeroAtClean π repeats p A clean tape := by | |
| induction n generalizing m with | |
| | zero => | |
| have h := p.height_le | |
| omega | |
| | succ n ih => | |
| cases p with | |
| | refl => | |
| intro A clean tape | |
| constructor | |
| Β· intro hzero i hi | |
| exact hzero () i hi | |
| Β· intro hzero terminal i hi | |
| cases terminal | |
| exact hzero i hi | |
| | step i p => | |
| intro A clean tape | |
| constructor | |
| Β· intro hzero h b | |
| apply (ih p (childFamily A i) clean | |
| (CutSamplerLocality.subTape π repeats i p A tape h b)).mp | |
| intro terminal j hj | |
| apply Subtype.ext | |
| have hread := congrArg | |
| (fun f : CutTerminalSplit.TerminalFactor π (.step i p) A => (f j).val) | |
| (splitTape_terminal_step π repeats i p A tape h b terminal) | |
| exact hread.symm.trans (congrArg Subtype.val (hzero ((h, b), terminal) j hj)) | |
| Β· intro hzero terminal j hj | |
| rcases terminal with β¨β¨h, bβ©, terminalβ© | |
| have hsub := (ih p (childFamily A i) clean | |
| (CutSamplerLocality.subTape π repeats i p A tape h b)).mpr (hzero h b) | |
| apply Subtype.ext | |
| have hread := congrArg | |
| (fun f : CutTerminalSplit.TerminalFactor π (.step i p) A => (f j).val) | |
| (splitTape_terminal_step π repeats i p A tape h b terminal) | |
| exact hread.trans (congrArg Subtype.val (hsub terminal j hj)) | |
| theorem evaluate_factors_of_split_zero (p : Path branch n (m + 1)) | |
| (A : Slots branch n β Type u) (clean : Fin (branch m) β Prop) | |
| (tape : CutSamplerRefinement.Tape π repeats p A) | |
| (hzero : β terminal i, clean i β | |
| (CutTerminalSplit.splitTape π repeats p A tape).1 terminal i = 0) : | |
| (CutSamplerRefinement.evaluate π repeats p A tape).val β | |
| FactoredFunctions.factoringSpace (CutSamplerLocality.view p A clean) := | |
| CutSamplerLocality.evaluate_factors π repeats p A clean tape | |
| ((zeroAtClean_iff π repeats p A clean tape).mp hzero) | |
| end | |
| end PerfectCompleteness.CutTerminalZero | |
| end | |
| end OAI | |