# HG changeset patch # User wenzelm # Date 1527972003 -7200 # Node ID e761afd35baa3f9964aa58e94d6f3ec5f1940ab7 # Parent 6bf71e7762265fa8521c6ccd36d4adf0b93413f0 tuned proofs; diff -r 6bf71e776226 -r e761afd35baa src/HOL/HOLCF/Map_Functions.thy --- a/src/HOL/HOLCF/Map_Functions.thy Sat Jun 02 22:39:45 2018 +0200 +++ b/src/HOL/HOLCF/Map_Functions.thy Sat Jun 02 22:40:03 2018 +0200 @@ -188,14 +188,14 @@ lemma ep_pair_u_map: "ep_pair e p \ ep_pair (u_map\e) (u_map\p)" apply standard - subgoal for x by (cases x, simp, simp add: ep_pair.e_inverse) - subgoal for y by (cases y, simp, simp add: ep_pair.e_p_below) + subgoal for x by (cases x) (simp_all add: ep_pair.e_inverse) + subgoal for y by (cases y) (simp_all add: ep_pair.e_p_below) done lemma deflation_u_map: "deflation d \ deflation (u_map\d)" apply standard - subgoal for x by (cases x, simp, simp add: deflation.idem) - subgoal for x by (cases x, simp, simp add: deflation.below) + subgoal for x by (cases x) (simp_all add: deflation.idem) + subgoal for x by (cases x) (simp_all add: deflation.below) done lemma finite_deflation_u_map: @@ -235,12 +235,17 @@ "\f1\\ = \; g1\\ = \\ \ sprod_map\f1\g1\(sprod_map\f2\g2\p) = sprod_map\(\ x. f1\(f2\x))\(\ x. g1\(g2\x))\p" - apply (induct p) - apply simp - apply (case_tac "f2\x = \", simp) - apply (case_tac "g2\y = \", simp) - apply simp - done +proof (induct p) + case bottom + then show ?case by simp +next + case (spair x y) + then show ?case + apply (cases "f2\x = \", simp) + apply (cases "g2\y = \", simp) + apply simp + done +qed lemma ep_pair_sprod_map: assumes "ep_pair e1 p1" and "ep_pair e2 p2" @@ -251,11 +256,17 @@ show "sprod_map\p1\p2\(sprod_map\e1\e2\x) = x" for x by (induct x) simp_all show "sprod_map\e1\e2\(sprod_map\p1\p2\y) \ y" for y - apply (induct y) - apply simp - apply (case_tac "p1\x = \", simp, case_tac "p2\y = \", simp) - apply (simp add: monofun_cfun e1p1.e_p_below e2p2.e_p_below) - done + proof (induct y) + case bottom + then show ?case by simp + next + case (spair x y) + then show ?case + apply simp + apply (cases "p1\x = \", simp, cases "p2\y = \", simp) + apply (simp add: monofun_cfun e1p1.e_p_below e2p2.e_p_below) + done + qed qed lemma deflation_sprod_map: @@ -266,14 +277,24 @@ interpret d2: deflation d2 by fact fix x show "sprod_map\d1\d2\(sprod_map\d1\d2\x) = sprod_map\d1\d2\x" - apply (induct x, simp) - apply (case_tac "d1\x = \", simp, case_tac "d2\y = \", simp) - apply (simp add: d1.idem d2.idem) - done + proof (induct x) + case bottom + then show ?case by simp + next + case (spair x y) + then show ?case + apply (cases "d1\x = \", simp, cases "d2\y = \", simp) + apply (simp add: d1.idem d2.idem) + done + qed show "sprod_map\d1\d2\x \ x" - apply (induct x, simp) - apply (simp add: monofun_cfun d1.below d2.below) - done + proof (induct x) + case bottom + then show ?case by simp + next + case spair + then show ?case by (simp add: monofun_cfun d1.below d2.below) + qed qed lemma finite_deflation_sprod_map: @@ -319,11 +340,16 @@ "\f1\\ = \; g1\\ = \\ \ ssum_map\f1\g1\(ssum_map\f2\g2\p) = ssum_map\(\ x. f1\(f2\x))\(\ x. g1\(g2\x))\p" - apply (induct p) - apply simp - apply (case_tac "f2\x = \", simp, simp) - apply (case_tac "g2\y = \", simp, simp) - done +proof (induct p) + case bottom + then show ?case by simp +next + case (sinl x) + then show ?case by (cases "f2\x = \") simp_all +next + case (sinr y) + then show ?case by (cases "g2\y = \") simp_all +qed lemma ep_pair_ssum_map: assumes "ep_pair e1 p1" and "ep_pair e2 p2" @@ -334,11 +360,16 @@ show "ssum_map\p1\p2\(ssum_map\e1\e2\x) = x" for x by (induct x) simp_all show "ssum_map\e1\e2\(ssum_map\p1\p2\y) \ y" for y - apply (induct y) - apply simp - apply (case_tac "p1\x = \", simp, simp add: e1p1.e_p_below) - apply (case_tac "p2\y = \", simp, simp add: e2p2.e_p_below) - done + proof (induct y) + case bottom + then show ?case by simp + next + case (sinl x) + then show ?case by (cases "p1\x = \") (simp_all add: e1p1.e_p_below) + next + case (sinr y) + then show ?case by (cases "p2\y = \") (simp_all add: e2p2.e_p_below) + qed qed lemma deflation_ssum_map: @@ -349,15 +380,27 @@ interpret d2: deflation d2 by fact fix x show "ssum_map\d1\d2\(ssum_map\d1\d2\x) = ssum_map\d1\d2\x" - apply (induct x, simp) - apply (case_tac "d1\x = \", simp, simp add: d1.idem) - apply (case_tac "d2\y = \", simp, simp add: d2.idem) - done + proof (induct x) + case bottom + then show ?case by simp + next + case (sinl x) + then show ?case by (cases "d1\x = \") (simp_all add: d1.idem) + next + case (sinr y) + then show ?case by (cases "d2\y = \") (simp_all add: d2.idem) + qed show "ssum_map\d1\d2\x \ x" - apply (induct x, simp) - apply (case_tac "d1\x = \", simp, simp add: d1.below) - apply (case_tac "d2\y = \", simp, simp add: d2.below) - done + proof (induct x) + case bottom + then show ?case by simp + next + case (sinl x) + then show ?case by (cases "d1\x = \") (simp_all add: d1.below) + next + case (sinr y) + then show ?case by (cases "d2\y = \") (simp_all add: d2.below) + qed qed lemma finite_deflation_ssum_map: