Commit 620040fc by Manuel Eberl

 ... ... @@ -10069,7 +10069,7 @@ abstract = [Blue_Eyes] title = Solution to the xkcd Blue Eyes puzzle author = Jakub Kądziołka topic = Logic/General logic/Logics of knowledge and belief topic = Mathematics/Misc date = 2021-01-30 notify = kuba@kadziolka.net abstract = ... ...
 ... ... @@ -9,7 +9,6 @@ theory Skip_List Pi_pmf Misc "Monad_Normalisation.Monad_Normalisation" "HOL-Library.Numeral_Type" begin subsection \Preliminaries\ ... ... @@ -854,44 +853,6 @@ definition R\<^sub>N :: "nat \ nat \ nat \ n lemma R\<^sub>N_alt_def: "R\<^sub>N n u l = map_pmf (\f. steps {..N n)" unfolding SL\<^sub>N_def R\<^sub>N_def R_def by simp lemma foo: "n \ f x \ steps {x} f n u l = l + (f x - n) * u" apply (induction "{x::'a}" f n u l rule: steps.induct; subst steps.simps) apply auto by (metis Suc_diff_Suc mult.commute mult_Suc_right) lemma "measure_pmf.variance (R\<^sub>N 1 u l) real = u^2 * (1 - p) / p ^ 2" proof (cases "u = 0") case [simp]: True have [simp]: "{..N_alt_def foo) next case False have [simp]: "{..N 1 u l = map_pmf (\f. l + f 0 * u) (SL\<^sub>N 1)" by (simp add: R\<^sub>N_alt_def foo) also have "\ = map_pmf (\x. l + x * u) (map_pmf (\f. f 0) (SL\<^sub>N 1))" by (simp add: pmf.map_comp o_def) also have "map_pmf (\f. f 0) (SL\<^sub>N 1) = geometric_pmf p" unfolding SL\<^sub>N_def SL_def by (subst Pi_pmf_component) auto finally have *: "R\<^sub>N 1 u l = map_pmf (\x. l + x * u) (geometric_pmf p)" . have "measure_pmf.variance (R\<^sub>N 1 u l) real = measure_pmf.variance (geometric_pmf p) (\x. real l + real u * real x)" unfolding * by (simp add: mult_ac) also have "\ = of_nat u ^ 2 * measure_pmf.variance (geometric_pmf p) real" using False apply (subst measure_pmf.variance_affine) apply (auto) sorry also have "measure_pmf.variance (geometric_pmf p) real = (1 - p) / p ^ 2" sorry finally show ?thesis by simp qed context includes monad_normalisation begin ... ... @@ -1376,13 +1337,10 @@ proof - by (auto) qed end (* context random_skip_list *) thm random_skip_list.EH\<^sub>N_EL\<^sub>s\<^sub>p[unfolded random_skip_list.q_def] random_skip_list.EH\<^sub>N_bounds'[unfolded random_skip_list.q_def] lemmas [code] = random_skip_list.SL_def end
This diff is collapsed.
 ... ... @@ -543,7 +543,6 @@ LambdaMu   Logics of knowledge and belief: Epistemic_Logic   Blue_Eyes   Temporal logic: Nat-Interval-Logic   LTL   ... ... @@ -898,6 +897,7 @@ FunWithFunctions   FunWithTilings   IMO2019   Blue_Eyes

Tools

... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!