Download lean/OAI/Probability/InvariantIsing/Fields/CascadeSeedPath.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 2.19 kB
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Probability/InvariantIsing/Fields/CascadeSeedPath.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/Probability/InvariantIsing/Fields/CascadeSeedPath.lean
-
curl -L -o CascadeSeedPath.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Probability/InvariantIsing/Fields/CascadeSeedPath.lean
2.19 kB
| import OAI.Probability.InvariantIsing.Fields.CascadeSeedLeaf | |
| import OAI.Probability.InvariantIsing.Fields.MarkForestRootLaw | |
| namespace OAI | |
| /-! The ancestor-state increment path generated by an independent seed forest. -/ | |
| noncomputable section | |
| open MeasureTheory ProbabilityTheory IsingPerceptron | |
| namespace InvariantIsing | |
| variable {ι : Type} | |
| def cascadeSeedPath : (n : ℕ) → (ℕ → (ι → ℝ) → unitInterval → (ι → ℝ)) → | |
| (ι → ℝ) → MarkForest unitInterval n → LabeledLeaf n → Fin n → (ι → ℝ) | |
| | 0, _, _, _, _ => Fin.elim0 | |
| | n+1, ψ, z, g, α => | |
| Fin.cons (ψ 0 z (g α.1.1 α.1.2).1) | |
| (cascadeSeedPath n (fun j => ψ (j+1)) (z+ψ 0 z (g α.1.1 α.1.2).1) | |
| (g α.1.1 α.1.2).2 α.2) | |
| lemma measurable_cascadeSeedPath (n : ℕ) | |
| (ψ : ℕ → (ι → ℝ) → unitInterval → (ι → ℝ)) | |
| (hψ : ∀ i, Measurable (Function.uncurry (ψ i))) (α : LabeledLeaf n) : | |
| Measurable (fun p : (ι → ℝ) × MarkForest unitInterval n => cascadeSeedPath n ψ p.1 p.2 α) := by | |
| induction n generalizing ψ with | |
| | zero => exact Measurable.of_eval fun i => i.elim0 | |
| | succ n ih => | |
| have hm : Measurable (fun p : (ι → ℝ) × MarkForest unitInterval (n+1) => | |
| ψ 0 p.1 (p.2 α.1.1 α.1.2).1) := | |
| (hψ 0).comp (measurable_fst.prodMk (by fun_prop)) | |
| apply Measurable.of_eval | |
| intro i | |
| refine Fin.cases hm ?_ i | |
| intro j | |
| exact ((measurable_pi_apply j).comp (ih _ (fun i => hψ (i+1)) α.2)).comp | |
| ((measurable_fst.add hm).prodMk (by fun_prop)) | |
| lemma cascadeSeedPath_labeled (n : ℕ) | |
| (ψ : ℕ → (ι → ℝ) → unitInterval → (ι → ℝ)) (z : ι → ℝ) | |
| (T : LabeledTree n) (g : MarkForest unitInterval n) (α : LabeledLeaf n) : | |
| noiseLeafMark n (cascadeSeedLeaf n ψ z (labeledNoiseLeaf unitInterval n (T,g) α)) = | |
| cascadeSeedPath n ψ z g α := by | |
| induction n generalizing ψ z with | |
| | zero => exact funext fun i => i.elim0 | |
| | succ n ih => | |
| funext i | |
| refine Fin.cases rfl (fun j => ?_) i | |
| exact congrFun (ih (fun k => ψ (k+1)) (z+ψ 0 z (g α.1.1 α.1.2).1) | |
| (T.2 α.1.1 α.1.2) (g α.1.1 α.1.2).2 α.2) j | |
| end InvariantIsing | |
| end | |
| end OAI | |