# HG changeset patch # User nipkow # Date 1541071434 -3600 # Node ID d4cec24a1d87d97fa18de436ad42ba016e9dec7e # Parent 59aefb3b9e95570f3bd37e32ae37c8258f20aaa3 too many clashes with "root" on reals diff -r 59aefb3b9e95 -r d4cec24a1d87 src/HOL/Library/Tree.thy --- a/src/HOL/Library/Tree.thy Thu Nov 01 11:26:38 2018 +0100 +++ b/src/HOL/Library/Tree.thy Thu Nov 01 12:23:54 2018 +0100 @@ -9,7 +9,7 @@ datatype 'a tree = Leaf ("\\") | - Node "'a tree" (root: 'a) "'a tree" ("(1\_,/ _,/ _\)") + Node "'a tree" (root_val: 'a) "'a tree" ("(1\_,/ _,/ _\)") datatype_compat tree primrec left :: "'a tree \ 'a tree" where diff -r 59aefb3b9e95 -r d4cec24a1d87 src/HOL/Probability/Tree_Space.thy --- a/src/HOL/Probability/Tree_Space.thy Thu Nov 01 11:26:38 2018 +0100 +++ b/src/HOL/Probability/Tree_Space.thy Thu Nov 01 12:23:54 2018 +0100 @@ -231,18 +231,18 @@ unfolding * using A by (intro sets.Un Node_in_tree_sigma pair_measureI) auto qed -lemma measurable_root': "root \ restrict_space (tree_sigma M) (-{Leaf}) \\<^sub>M M" +lemma measurable_root_val': "root_val \ restrict_space (tree_sigma M) (-{Leaf}) \\<^sub>M M" proof (rule measurableI) - show "t \ space (restrict_space (tree_sigma M) (- {Leaf})) \ root t \ space M" for t + show "t \ space (restrict_space (tree_sigma M) (- {Leaf})) \ root_val t \ space M" for t by (cases t) (auto simp: space_restrict_space space_tree_sigma) fix A assume A: "A \ sets M" from sets.sets_into_space[OF this] - have "root -` A \ space (restrict_space (tree_sigma M) (- {Leaf})) = + have "root_val -` A \ space (restrict_space (tree_sigma M) (- {Leaf})) = {Node l a r | l a r. (a, l, r) \ A \ space (tree_sigma M) \ space (tree_sigma M)}" by (auto simp: space_tree_sigma space_restrict_space elim: trees.cases) also have "\ \ sets (tree_sigma M)" using A by (intro sets.Un Node_in_tree_sigma pair_measureI) auto - finally show "root -` A \ space (restrict_space (tree_sigma M) (- {Leaf})) \ + finally show "root_val -` A \ space (restrict_space (tree_sigma M) (- {Leaf})) \ sets (restrict_space (tree_sigma M) (- {Leaf}))" by (auto simp: sets_restrict_space_iff space_restrict_space) qed @@ -254,14 +254,14 @@ (insert \B \ A\, auto) -lemma measurable_root[measurable (raw)]: +lemma measurable_root_val[measurable (raw)]: assumes "f \ X \\<^sub>M tree_sigma M" and "\x. x \ space X \ f x \ Leaf" - shows "(\\. root (f \)) \ X \\<^sub>M M" + shows "(\\. root_val (f \)) \ X \\<^sub>M M" proof - from assms have "f \ X \\<^sub>M restrict_space (tree_sigma M) (- {Leaf})" by (intro measurable_restrict_space2) auto - from this and measurable_root' show ?thesis by (rule measurable_compose) + from this and measurable_root_val' show ?thesis by (rule measurable_compose) qed @@ -344,7 +344,7 @@ qed next case (Node ls u rs) - let ?F = "\\. ?N (\, left (t \), root (t \), right (t \), + let ?F = "\\. ?N (\, left (t \), root_val (t \), right (t \), rec_tree (l \) (n \) (left (t \)), rec_tree (l \) (n \) (right (t \)))" show ?case proof (rule measurable_cong[THEN iffD2]) @@ -366,7 +366,7 @@ by (rule measurable_restrict_space1) (rule measurable_compose[OF Node(3) measurable_right]) subgoal - apply (rule measurable_compose[OF _ measurable_root']) + apply (rule measurable_compose[OF _ measurable_root_val']) apply (rule measurable_restrict_space3[OF Node(3)]) by auto subgoal