[STATEMENT]
lemma runit_char:
    assumes "ide f"
    shows "\<guillemotleft>\<r>[f] : src f \<rightarrow>\<^sub>W\<^sub>C trg f\<guillemotright>" and "\<guillemotleft>\<r>[f] : f \<star> src f \<Rightarrow> f\<guillemotright>"
    and "\<r>[f] \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]"
    and "\<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (arr \<r>[f] \<and> src f \<in> sources \<r>[f] \<and> trg f \<in> targets \<r>[f] &&& \<guillemotleft>\<r>[f] : f \<star> src f \<Rightarrow> f\<guillemotright>) &&& \<r>[f] \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f] &&& \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. arr \<r>[f] \<and> src f \<in> sources \<r>[f] \<and> trg f \<in> targets \<r>[f]
 2. \<guillemotleft>\<r>[f] : f \<star> src f \<Rightarrow> f\<guillemotright>
 3. \<r>[f] \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
 4. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
let ?a = "src f" and ?b = "trg f"
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. arr \<r>[f] \<and> src f \<in> sources \<r>[f] \<and> trg f \<in> targets \<r>[f]
 2. \<guillemotleft>\<r>[f] : f \<star> src f \<Rightarrow> f\<guillemotright>
 3. \<r>[f] \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
 4. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
interpret Right: subcategory V \<open>right ?a\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subcategory (\<cdot>) (right (src f))
[PROOF STEP]
using assms right_hom_is_subcategory weak_unit_self_composable
[PROOF STATE]
proof (prove)
using this:
ide f
arr ?\<mu> \<Longrightarrow> subcategory (\<cdot>) (right ?\<mu>)
weak_unit ?a \<Longrightarrow> ide ?a
weak_unit ?a \<Longrightarrow> ide (?a \<star> ?a)
weak_unit ?a \<Longrightarrow> ?a \<star> ?a \<noteq> null

goal (1 subgoal):
 1. subcategory (\<cdot>) (right (src f))
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. arr \<r>[f] \<and> src f \<in> sources \<r>[f] \<and> trg f \<in> targets \<r>[f]
 2. \<guillemotleft>\<r>[f] : f \<star> src f \<rightarrow> f\<guillemotright>
 3. \<r>[f] \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
 4. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
interpret Right: right_hom_with_unit V H \<a> \<open>\<i>[?a]\<close> ?a
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. right_hom_with_unit (\<cdot>) (\<star>) \<a> \<i>[src f] (src f)
[PROOF STEP]
using assms obj_is_weak_unit iso_unit\<^sub>P\<^sub>B\<^sub>U
[PROOF STATE]
proof (prove)
using this:
ide f
obj ?a \<Longrightarrow> weak_unit ?a
weak_unit ?a \<Longrightarrow> local.iso \<i>[?a]

goal (1 subgoal):
 1. right_hom_with_unit (\<cdot>) (\<star>) \<a> \<i>[src f] (src f)
[PROOF STEP]
by (unfold_locales, auto)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. arr \<r>[f] \<and> src f \<in> sources \<r>[f] \<and> trg f \<in> targets \<r>[f]
 2. \<guillemotleft>\<r>[f] : f \<star> src f \<Rightarrow> f\<guillemotright>
 3. \<r>[f] \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
 4. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
have 0: "Right.ide f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Right.ide f
[PROOF STEP]
using assms Right.ide_char\<^sub>S\<^sub>b\<^sub>C Right.arr_char\<^sub>S\<^sub>b\<^sub>C right_def composable_char\<^sub>P\<^sub>B\<^sub>H
[PROOF STATE]
proof (prove)
using this:
ide f
Right.ide ?a = (Right.arr ?a \<and> ide ?a)
Right.arr ?f = right (src f) ?f
right ?\<sigma> \<equiv> \<lambda>\<mu>. \<mu> \<star> ?\<sigma> \<noteq> null
(?\<nu> \<star> ?\<mu> \<noteq> null) = (arr ?\<mu> \<and> arr ?\<nu> \<and> src ?\<nu> = trg ?\<mu>)

goal (1 subgoal):
 1. Right.ide f
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Right.ide f

goal (4 subgoals):
 1. arr \<r>[f] \<and> src f \<in> sources \<r>[f] \<and> trg f \<in> targets \<r>[f]
 2. \<guillemotleft>\<r>[f] : f \<star> src f \<Rightarrow> f\<guillemotright>
 3. \<r>[f] \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
 4. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
show "\<guillemotleft>\<r>[f] : src f \<rightarrow>\<^sub>W\<^sub>C trg f\<guillemotright>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. arr \<r>[f] \<and> src f \<in> sources \<r>[f] \<and> trg f \<in> targets \<r>[f]
[PROOF STEP]
using assms runit_in_hom
[PROOF STATE]
proof (prove)
using this:
ide f
ide ?f \<Longrightarrow> arr \<r>[?f] \<and> src ?f \<in> sources \<r>[?f] \<and> trg ?f \<in> targets \<r>[?f]
ide ?f \<Longrightarrow> \<guillemotleft>\<r>[?f] : ?f \<star> src ?f \<Rightarrow> ?f\<guillemotright>

goal (1 subgoal):
 1. arr \<r>[f] \<and> src f \<in> sources \<r>[f] \<and> trg f \<in> targets \<r>[f]
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
arr \<r>[f] \<and> src f \<in> sources \<r>[f] \<and> trg f \<in> targets \<r>[f]

goal (3 subgoals):
 1. \<guillemotleft>\<r>[f] : f \<star> src f \<Rightarrow> f\<guillemotright>
 2. \<r>[f] \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
 3. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
show A: "\<guillemotleft>\<r>[f] : f \<star> src f \<Rightarrow> f\<guillemotright>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<guillemotleft>\<r>[f] : f \<star> src f \<Rightarrow> f\<guillemotright>
[PROOF STEP]
using assms runit_in_hom
[PROOF STATE]
proof (prove)
using this:
ide f
ide ?f \<Longrightarrow> arr \<r>[?f] \<and> src ?f \<in> sources \<r>[?f] \<and> trg ?f \<in> targets \<r>[?f]
ide ?f \<Longrightarrow> \<guillemotleft>\<r>[?f] : ?f \<star> src ?f \<Rightarrow> ?f\<guillemotright>

goal (1 subgoal):
 1. \<guillemotleft>\<r>[f] : f \<star> src f \<Rightarrow> f\<guillemotright>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<guillemotleft>\<r>[f] : f \<star> src f \<Rightarrow> f\<guillemotright>

goal (2 subgoals):
 1. \<r>[f] \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
 2. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
show B: "\<r>[f] \<star> ?a = (f \<star> \<i>[?a]) \<cdot> \<a>[f, ?a, ?a]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<r>[f] \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
unfolding runit_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Right.runit f \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
using 0 Right.runit_char(2) H\<^sub>R_def
[PROOF STATE]
proof (prove)
using this:
Right.ide f
Right.ide ?f \<Longrightarrow> Right.R (Right.runit ?f) = Right.comp (?f \<star> \<i>[src f]) \<a>[?f, src f, src f]
H\<^sub>R ?f \<equiv> \<lambda>\<mu>. \<mu> \<star> ?f

goal (1 subgoal):
 1. Right.runit f \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
using Right.comp_simp Right.characteristic_iso(4) Right.iso_is_arr
[PROOF STATE]
proof (prove)
using this:
Right.ide f
Right.ide ?f \<Longrightarrow> Right.R (Right.runit ?f) = Right.comp (?f \<star> \<i>[src f]) \<a>[?f, src f, src f]
H\<^sub>R ?f \<equiv> \<lambda>\<mu>. \<mu> \<star> ?f
Right.seq ?g ?f \<Longrightarrow> Right.comp ?g ?f = ?g \<cdot> ?f
Right.ide ?f \<Longrightarrow> Right.iso (Right.comp (?f \<star> \<i>[src f]) \<a>[?f, src f, src f])
Right.iso ?f \<Longrightarrow> Right.arr ?f

goal (1 subgoal):
 1. Right.runit f \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<r>[f] \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]

goal (1 subgoal):
 1. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
show "\<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> ?a = (f \<star> \<i>[?a]) \<cdot> \<a>[f, ?a, ?a]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
have 1: "hom (f \<star> ?a) f = Right.hom (Right.R f) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hom (f \<star> src f) f = Right.hom (Right.R f) f
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. hom (f \<star> src f) f \<subseteq> Right.hom (Right.R f) f
 2. Right.hom (Right.R f) f \<subseteq> hom (f \<star> src f) f
[PROOF STEP]
have 1: "Right.R f = f \<star> ?a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Right.R f = f \<star> src f
[PROOF STEP]
using 0 H\<^sub>R_def
[PROOF STATE]
proof (prove)
using this:
Right.ide f
H\<^sub>R ?f \<equiv> \<lambda>\<mu>. \<mu> \<star> ?f

goal (1 subgoal):
 1. Right.R f = f \<star> src f
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Right.R f = f \<star> src f

goal (2 subgoals):
 1. hom (f \<star> src f) f \<subseteq> Right.hom (Right.R f) f
 2. Right.hom (Right.R f) f \<subseteq> hom (f \<star> src f) f
[PROOF STEP]
show "Right.hom (Right.R f) f \<subseteq> hom (f \<star> ?a) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Right.hom (Right.R f) f \<subseteq> hom (f \<star> src f) f
[PROOF STEP]
using assms Right.hom_char [of "f \<star> ?a" f] H\<^sub>R_def
[PROOF STATE]
proof (prove)
using this:
ide f
Right.hom (f \<star> src f) f = hom (f \<star> src f) f \<inter> Collect (right (src f))
H\<^sub>R ?f \<equiv> \<lambda>\<mu>. \<mu> \<star> ?f

goal (1 subgoal):
 1. Right.hom (Right.R f) f \<subseteq> hom (f \<star> src f) f
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Right.hom (Right.R f) f \<subseteq> hom (f \<star> src f) f

goal (1 subgoal):
 1. hom (f \<star> src f) f \<subseteq> Right.hom (Right.R f) f
[PROOF STEP]
show "hom (f \<star> ?a) f \<subseteq> Right.hom (Right.R f) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hom (f \<star> src f) f \<subseteq> Right.hom (Right.R f) f
[PROOF STEP]
using assms 1 ide_in_hom composable_char\<^sub>P\<^sub>B\<^sub>H hom_connected right_def
                  Right.hom_char
[PROOF STATE]
proof (prove)
using this:
ide f
Right.R f = f \<star> src f
ide ?f \<Longrightarrow> \<guillemotleft>?f : src ?f \<rightarrow> trg ?f\<guillemotright>
ide ?f \<Longrightarrow> \<guillemotleft>?f : ?f \<Rightarrow> ?f\<guillemotright>
(?\<nu> \<star> ?\<mu> \<noteq> null) = (arr ?\<mu> \<and> arr ?\<nu> \<and> src ?\<nu> = trg ?\<mu>)
(?\<nu> \<star> ?\<mu> \<noteq> null) = (local.dom ?\<nu> \<star> ?\<mu> \<noteq> null)
(?\<nu> \<star> ?\<mu> \<noteq> null) = (?\<nu> \<star> local.dom ?\<mu> \<noteq> null)
(?\<nu> \<star> ?\<mu> \<noteq> null) = (cod ?\<nu> \<star> ?\<mu> \<noteq> null)
(?\<nu> \<star> ?\<mu> \<noteq> null) = (?\<nu> \<star> cod ?\<mu> \<noteq> null)
right ?\<sigma> \<equiv> \<lambda>\<mu>. \<mu> \<star> ?\<sigma> \<noteq> null
Right.hom ?a ?b = hom ?a ?b \<inter> Collect (right (src f))

goal (1 subgoal):
 1. hom (f \<star> src f) f \<subseteq> Right.hom (Right.R f) f
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
hom (f \<star> src f) f \<subseteq> Right.hom (Right.R f) f

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
hom (f \<star> src f) f = Right.hom (Right.R f) f

goal (1 subgoal):
 1. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
let ?P = "\<lambda>\<mu>. Right.in_hom \<mu> (Right.R f) f"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
let ?P' = "\<lambda>\<mu>. \<guillemotleft>\<mu> : f \<star> ?a \<Rightarrow> f\<guillemotright>"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
let ?Q = "\<lambda>\<mu>. Right.R \<mu> = (f \<star> \<i>[?a]) \<cdot> \<a>[f, ?a, ?a]"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
let ?R = "\<lambda>\<mu>. \<mu> \<star> ?a = (f \<star> \<i>[?a]) \<cdot> \<a>[f, ?a, ?a]"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
have 2: "?P = ?P'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>\<mu>. Right.in_hom \<mu> (Right.R f) f) = (\<lambda>\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright>)
[PROOF STEP]
using 0 1 H\<^sub>R_def Right.hom_char
[PROOF STATE]
proof (prove)
using this:
Right.ide f
hom (f \<star> src f) f = Right.hom (Right.R f) f
H\<^sub>R ?f \<equiv> \<lambda>\<mu>. \<mu> \<star> ?f
Right.hom ?a ?b = hom ?a ?b \<inter> Collect (right (src f))

goal (1 subgoal):
 1. (\<lambda>\<mu>. Right.in_hom \<mu> (Right.R f) f) = (\<lambda>\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright>)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<lambda>\<mu>. Right.in_hom \<mu> (Right.R f) f) = (\<lambda>\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright>)

goal (1 subgoal):
 1. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<lambda>\<mu>. Right.in_hom \<mu> (Right.R f) f) = (\<lambda>\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright>)

goal (1 subgoal):
 1. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
have "\<forall>\<mu>. ?P \<mu> \<longrightarrow> (?Q \<mu> \<longleftrightarrow> ?R \<mu>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<mu>. Right.in_hom \<mu> (Right.R f) f \<longrightarrow> (Right.R \<mu> = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]) = (\<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f])
[PROOF STEP]
using 2 Right.runit_eqI H\<^sub>R_def
[PROOF STATE]
proof (prove)
using this:
(\<lambda>\<mu>. Right.in_hom \<mu> (Right.R f) f) = (\<lambda>\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright>)
\<lbrakk>Right.in_hom ?f (src f) ?b; Right.in_hom ?\<mu> (Right.R ?f) ?f; Right.R ?\<mu> = Right.comp (?f \<star> \<i>[src f]) \<a>[?f, src f, src f]\<rbrakk> \<Longrightarrow> ?\<mu> = Right.runit ?f
H\<^sub>R ?f \<equiv> \<lambda>\<mu>. \<mu> \<star> ?f

goal (1 subgoal):
 1. \<forall>\<mu>. Right.in_hom \<mu> (Right.R f) f \<longrightarrow> (Right.R \<mu> = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]) = (\<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f])
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
\<forall>\<mu>. Right.in_hom \<mu> (Right.R f) f \<longrightarrow> (Right.R \<mu> = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]) = (\<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f])

goal (1 subgoal):
 1. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>\<mu>. Right.in_hom \<mu> (Right.R f) f \<longrightarrow> (Right.R \<mu> = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]) = (\<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f])

goal (1 subgoal):
 1. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
have "(\<exists>!\<mu>. ?P \<mu> \<and> ?Q \<mu>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>!\<mu>. Right.in_hom \<mu> (Right.R f) f \<and> Right.R \<mu> = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
using 0 2 A B Right.runit_char(3) Right.ide_char Right.arr_char\<^sub>S\<^sub>b\<^sub>C
[PROOF STATE]
proof (prove)
using this:
Right.ide f
(\<lambda>\<mu>. Right.in_hom \<mu> (Right.R f) f) = (\<lambda>\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright>)
\<guillemotleft>\<r>[f] : f \<star> src f \<Rightarrow> f\<guillemotright>
\<r>[f] \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
Right.ide ?f \<Longrightarrow> \<exists>!\<mu>. Right.in_hom \<mu> (Right.R ?f) ?f \<and> Right.R \<mu> = Right.comp (?f \<star> \<i>[src f]) \<a>[?f, src f, src f]
Right.ide ?a = (Right.arr ?a \<and> Right.dom ?a = ?a \<and> Right.cod ?a = ?a)
Right.arr ?f = right (src f) ?f

goal (1 subgoal):
 1. \<exists>!\<mu>. Right.in_hom \<mu> (Right.R f) f \<and> Right.R \<mu> = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
by (metis (no_types, lifting) Right.runit_char(2) calculation(2) runit_def)
[PROOF STATE]
proof (state)
this:
\<exists>!\<mu>. Right.in_hom \<mu> (Right.R f) f \<and> Right.R \<mu> = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]

goal (1 subgoal):
 1. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>\<mu>. Right.in_hom \<mu> (Right.R f) f) = (\<lambda>\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright>)
\<forall>\<mu>. Right.in_hom \<mu> (Right.R f) f \<longrightarrow> (Right.R \<mu> = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]) = (\<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f])
\<exists>!\<mu>. Right.in_hom \<mu> (Right.R f) f \<and> Right.R \<mu> = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>\<mu>. Right.in_hom \<mu> (Right.R f) f) = (\<lambda>\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright>)
\<forall>\<mu>. Right.in_hom \<mu> (Right.R f) f \<longrightarrow> (Right.R \<mu> = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]) = (\<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f])
\<exists>!\<mu>. Right.in_hom \<mu> (Right.R f) f \<and> Right.R \<mu> = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]

goal (1 subgoal):
 1. \<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
\<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>!\<mu>. \<guillemotleft>\<mu> : f \<star> src f \<Rightarrow> f\<guillemotright> \<and> \<mu> \<star> src f = (f \<star> \<i>[src f]) \<cdot> \<a>[f, src f, src f]

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma  NCSaux2[rule_format]:
  "noDenyAll p \<longrightarrow> {a, b} \<in> set l \<longrightarrow> all_in_list p l \<longrightarrow>singleCombinators p \<longrightarrow>
   sorted (DenyAllFromTo a b # p) l \<longrightarrow> {a, b} \<noteq> firstList p \<longrightarrow>
   AllowPortFromTo u v w \<in> set p \<longrightarrow>  {a, b} \<noteq> {u, v}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. noDenyAll p \<longrightarrow> {a, b} \<in> set l \<longrightarrow> all_in_list p l \<longrightarrow> singleCombinators p \<longrightarrow> FWNormalisationCore.sorted (DenyAllFromTo a b # p) l \<longrightarrow> {a, b} \<noteq> firstList p \<longrightarrow> AllowPortFromTo u v w \<in> set p \<longrightarrow> {a, b} \<noteq> {u, v}
[PROOF STEP]
proof (cases p)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. p = [] \<Longrightarrow> noDenyAll p \<longrightarrow> {a, b} \<in> set l \<longrightarrow> all_in_list p l \<longrightarrow> singleCombinators p \<longrightarrow> FWNormalisationCore.sorted (DenyAllFromTo a b # p) l \<longrightarrow> {a, b} \<noteq> firstList p \<longrightarrow> AllowPortFromTo u v w \<in> set p \<longrightarrow> {a, b} \<noteq> {u, v}
 2. \<And>aa list. p = aa # list \<Longrightarrow> noDenyAll p \<longrightarrow> {a, b} \<in> set l \<longrightarrow> all_in_list p l \<longrightarrow> singleCombinators p \<longrightarrow> FWNormalisationCore.sorted (DenyAllFromTo a b # p) l \<longrightarrow> {a, b} \<noteq> firstList p \<longrightarrow> AllowPortFromTo u v w \<in> set p \<longrightarrow> {a, b} \<noteq> {u, v}
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
p = []

goal (2 subgoals):
 1. p = [] \<Longrightarrow> noDenyAll p \<longrightarrow> {a, b} \<in> set l \<longrightarrow> all_in_list p l \<longrightarrow> singleCombinators p \<longrightarrow> FWNormalisationCore.sorted (DenyAllFromTo a b # p) l \<longrightarrow> {a, b} \<noteq> firstList p \<longrightarrow> AllowPortFromTo u v w \<in> set p \<longrightarrow> {a, b} \<noteq> {u, v}
 2. \<And>aa list. p = aa # list \<Longrightarrow> noDenyAll p \<longrightarrow> {a, b} \<in> set l \<longrightarrow> all_in_list p l \<longrightarrow> singleCombinators p \<longrightarrow> FWNormalisationCore.sorted (DenyAllFromTo a b # p) l \<longrightarrow> {a, b} \<noteq> firstList p \<longrightarrow> AllowPortFromTo u v w \<in> set p \<longrightarrow> {a, b} \<noteq> {u, v}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
p = []
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
p = []

goal (1 subgoal):
 1. noDenyAll p \<longrightarrow> {a, b} \<in> set l \<longrightarrow> all_in_list p l \<longrightarrow> singleCombinators p \<longrightarrow> FWNormalisationCore.sorted (DenyAllFromTo a b # p) l \<longrightarrow> {a, b} \<noteq> firstList p \<longrightarrow> AllowPortFromTo u v w \<in> set p \<longrightarrow> {a, b} \<noteq> {u, v}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
noDenyAll p \<longrightarrow> {a, b} \<in> set l \<longrightarrow> all_in_list p l \<longrightarrow> singleCombinators p \<longrightarrow> FWNormalisationCore.sorted (DenyAllFromTo a b # p) l \<longrightarrow> {a, b} \<noteq> firstList p \<longrightarrow> AllowPortFromTo u v w \<in> set p \<longrightarrow> {a, b} \<noteq> {u, v}

goal (1 subgoal):
 1. \<And>aa list. p = aa # list \<Longrightarrow> noDenyAll p \<longrightarrow> {a, b} \<in> set l \<longrightarrow> all_in_list p l \<longrightarrow> singleCombinators p \<longrightarrow> FWNormalisationCore.sorted (DenyAllFromTo a b # p) l \<longrightarrow> {a, b} \<noteq> firstList p \<longrightarrow> AllowPortFromTo u v w \<in> set p \<longrightarrow> {a, b} \<noteq> {u, v}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>aa list. p = aa # list \<Longrightarrow> noDenyAll p \<longrightarrow> {a, b} \<in> set l \<longrightarrow> all_in_list p l \<longrightarrow> singleCombinators p \<longrightarrow> FWNormalisationCore.sorted (DenyAllFromTo a b # p) l \<longrightarrow> {a, b} \<noteq> firstList p \<longrightarrow> AllowPortFromTo u v w \<in> set p \<longrightarrow> {a, b} \<noteq> {u, v}
[PROOF STEP]
case (Cons aa list)
[PROOF STATE]
proof (state)
this:
p = aa # list

goal (1 subgoal):
 1. \<And>aa list. p = aa # list \<Longrightarrow> noDenyAll p \<longrightarrow> {a, b} \<in> set l \<longrightarrow> all_in_list p l \<longrightarrow> singleCombinators p \<longrightarrow> FWNormalisationCore.sorted (DenyAllFromTo a b # p) l \<longrightarrow> {a, b} \<noteq> firstList p \<longrightarrow> AllowPortFromTo u v w \<in> set p \<longrightarrow> {a, b} \<noteq> {u, v}
[PROOF STEP]
have *  : "{a, b} \<in> set l \<Longrightarrow>  in_list aa l \<and> all_in_list list l \<Longrightarrow>
                   singleCombinators (aa # list) \<Longrightarrow>  AllowPortFromTo u v w \<in> set list \<Longrightarrow>
                   smaller (DenyAllFromTo a b) aa l \<and> sorted (aa # list) l \<Longrightarrow>
                   smaller (DenyAllFromTo a b) (AllowPortFromTo u v w) l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>{a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); AllowPortFromTo u v w \<in> set list; smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> smaller (DenyAllFromTo a b) (AllowPortFromTo u v w) l
[PROOF STEP]
apply (rule_tac y = aa in order_trans,simp_all del: smaller.simps)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>{a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); AllowPortFromTo u v w \<in> set list; smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> {u, v} \<in> set l
 2. \<lbrakk>{a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); AllowPortFromTo u v w \<in> set list; smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> smaller aa (AllowPortFromTo u v w) l
[PROOF STEP]
using in_set_in_list
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> set ?p; all_in_list ?p ?l\<rbrakk> \<Longrightarrow> in_list ?a ?l

goal (2 subgoals):
 1. \<lbrakk>{a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); AllowPortFromTo u v w \<in> set list; smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> {u, v} \<in> set l
 2. \<lbrakk>{a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); AllowPortFromTo u v w \<in> set list; smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> smaller aa (AllowPortFromTo u v w) l
[PROOF STEP]
apply fastforce
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>{a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); AllowPortFromTo u v w \<in> set list; smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> smaller aa (AllowPortFromTo u v w) l
[PROOF STEP]
using NormalisationGenericProofs.sorted_Cons all_in_list.simps(2)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>all_in_list (?x # ?xs) ?l; singleCombinators (?x # ?xs)\<rbrakk> \<Longrightarrow> (FWNormalisationCore.sorted ?xs ?l \<and> (\<forall>y\<in>set ?xs. smaller ?x y ?l)) = FWNormalisationCore.sorted (?x # ?xs) ?l
all_in_list (?x # ?xs) ?l = (in_list ?x ?l \<and> all_in_list ?xs ?l)

goal (1 subgoal):
 1. \<lbrakk>{a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); AllowPortFromTo u v w \<in> set list; smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> smaller aa (AllowPortFromTo u v w) l
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<lbrakk>{a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); AllowPortFromTo u v w \<in> set list; smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> smaller (DenyAllFromTo a b) (AllowPortFromTo u v w) l

goal (1 subgoal):
 1. \<And>aa list. p = aa # list \<Longrightarrow> noDenyAll p \<longrightarrow> {a, b} \<in> set l \<longrightarrow> all_in_list p l \<longrightarrow> singleCombinators p \<longrightarrow> FWNormalisationCore.sorted (DenyAllFromTo a b # p) l \<longrightarrow> {a, b} \<noteq> firstList p \<longrightarrow> AllowPortFromTo u v w \<in> set p \<longrightarrow> {a, b} \<noteq> {u, v}
[PROOF STEP]
have **: "AllowPortFromTo u v w \<in> set list \<Longrightarrow>
                    in_list aa l \<Longrightarrow>   all_in_list list l \<Longrightarrow>
                    in_list (AllowPortFromTo u v w) l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>AllowPortFromTo u v w \<in> set list; in_list aa l; all_in_list list l\<rbrakk> \<Longrightarrow> in_list (AllowPortFromTo u v w) l
[PROOF STEP]
apply (rule_tac p = list in in_set_in_list)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>AllowPortFromTo u v w \<in> set list; in_list aa l; all_in_list list l\<rbrakk> \<Longrightarrow> AllowPortFromTo u v w \<in> set list
 2. \<lbrakk>AllowPortFromTo u v w \<in> set list; in_list aa l; all_in_list list l\<rbrakk> \<Longrightarrow> all_in_list list l
[PROOF STEP]
apply simp_all
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
\<lbrakk>AllowPortFromTo u v w \<in> set list; in_list aa l; all_in_list list l\<rbrakk> \<Longrightarrow> in_list (AllowPortFromTo u v w) l

goal (1 subgoal):
 1. \<And>aa list. p = aa # list \<Longrightarrow> noDenyAll p \<longrightarrow> {a, b} \<in> set l \<longrightarrow> all_in_list p l \<longrightarrow> singleCombinators p \<longrightarrow> FWNormalisationCore.sorted (DenyAllFromTo a b # p) l \<longrightarrow> {a, b} \<noteq> firstList p \<longrightarrow> AllowPortFromTo u v w \<in> set p \<longrightarrow> {a, b} \<noteq> {u, v}
[PROOF STEP]
assume  "p = aa # list"
[PROOF STATE]
proof (state)
this:
p = aa # list

goal (1 subgoal):
 1. \<And>aa list. p = aa # list \<Longrightarrow> noDenyAll p \<longrightarrow> {a, b} \<in> set l \<longrightarrow> all_in_list p l \<longrightarrow> singleCombinators p \<longrightarrow> FWNormalisationCore.sorted (DenyAllFromTo a b # p) l \<longrightarrow> {a, b} \<noteq> firstList p \<longrightarrow> AllowPortFromTo u v w \<in> set p \<longrightarrow> {a, b} \<noteq> {u, v}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
p = aa # list
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
p = aa # list

goal (1 subgoal):
 1. noDenyAll p \<longrightarrow> {a, b} \<in> set l \<longrightarrow> all_in_list p l \<longrightarrow> singleCombinators p \<longrightarrow> FWNormalisationCore.sorted (DenyAllFromTo a b # p) l \<longrightarrow> {a, b} \<noteq> firstList p \<longrightarrow> AllowPortFromTo u v w \<in> set p \<longrightarrow> {a, b} \<noteq> {u, v}
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p = aa # list \<Longrightarrow> \<not> member DenyAll aa \<and> noDenyAll list \<longrightarrow> {a, b} \<in> set l \<longrightarrow> in_list aa l \<and> all_in_list list l \<longrightarrow> singleCombinators (aa # list) \<longrightarrow> smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l \<longrightarrow> {a, b} \<noteq> first_bothNet aa \<longrightarrow> (AllowPortFromTo u v w = aa \<longrightarrow> {a, b} \<noteq> {u, v}) \<and> (AllowPortFromTo u v w \<in> set list \<longrightarrow> {a, b} \<noteq> {u, v})
[PROOF STEP]
apply (intro impI conjI,hypsubst, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v}
[PROOF STEP]
apply (subgoal_tac "smaller (DenyAllFromTo a b) (AllowPortFromTo u v w) l")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; smaller (DenyAllFromTo a b) (AllowPortFromTo u v w) l\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v}
 2. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> smaller (DenyAllFromTo a b) (AllowPortFromTo u v w) l
[PROOF STEP]
apply (subgoal_tac "\<not> smaller (AllowPortFromTo u v w) (DenyAllFromTo a b) l")
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; smaller (DenyAllFromTo a b) (AllowPortFromTo u v w) l; \<not> smaller (AllowPortFromTo u v w) (DenyAllFromTo a b) l\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v}
 2. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; smaller (DenyAllFromTo a b) (AllowPortFromTo u v w) l\<rbrakk> \<Longrightarrow> \<not> smaller (AllowPortFromTo u v w) (DenyAllFromTo a b) l
 3. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> smaller (DenyAllFromTo a b) (AllowPortFromTo u v w) l
[PROOF STEP]
apply (rule_tac l = l in posaux)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; smaller (DenyAllFromTo a b) (AllowPortFromTo u v w) l; \<not> smaller (AllowPortFromTo u v w) (DenyAllFromTo a b) l\<rbrakk> \<Longrightarrow> position {a, b} l < position {u, v} l
 2. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; smaller (DenyAllFromTo a b) (AllowPortFromTo u v w) l\<rbrakk> \<Longrightarrow> \<not> smaller (AllowPortFromTo u v w) (DenyAllFromTo a b) l
 3. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> smaller (DenyAllFromTo a b) (AllowPortFromTo u v w) l
[PROOF STEP]
apply (rule_tac y = "position (first_bothNet aa) l" in basic_trans_rules(22))
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; smaller (DenyAllFromTo a b) (AllowPortFromTo u v w) l; \<not> smaller (AllowPortFromTo u v w) (DenyAllFromTo a b) l\<rbrakk> \<Longrightarrow> position {a, b} l < position (first_bothNet aa) l
 2. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; smaller (DenyAllFromTo a b) (AllowPortFromTo u v w) l; \<not> smaller (AllowPortFromTo u v w) (DenyAllFromTo a b) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 3. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; smaller (DenyAllFromTo a b) (AllowPortFromTo u v w) l\<rbrakk> \<Longrightarrow> \<not> smaller (AllowPortFromTo u v w) (DenyAllFromTo a b) l
 4. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> smaller (DenyAllFromTo a b) (AllowPortFromTo u v w) l
[PROOF STEP]
apply (simp_all split: if_splits)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<lbrakk>p = aa # list; {u, v} \<in> set l; singleCombinators (aa # list); {u, v} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position {u, v} l < position (first_bothNet aa) l
 2. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position {a, b} l < position (first_bothNet aa) l
 3. \<lbrakk>p = aa # list; {u, v} \<in> set l; singleCombinators (aa # list); {u, v} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 4. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 5. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 6. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
apply (case_tac aa, simp_all)
[PROOF STATE]
proof (prove)
goal (7 subgoals):
 1. \<And>x21 x22. \<lbrakk>p = DenyAllFromTo x21 x22 # list; {u, v} \<in> set l; singleCombinators list; {u, v} \<noteq> {x21, x22}; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; noDenyAll list; {x21, x22} \<in> set l; all_in_list list l; a = x21 \<and> b = x22 \<or> position {u, v} l \<le> position {x21, x22} l; FWNormalisationCore.sorted (DenyAllFromTo x21 x22 # list) l; aa = DenyAllFromTo x21 x22\<rbrakk> \<Longrightarrow> position {u, v} l < position {x21, x22} l
 2. \<And>x31 x32 x33. \<lbrakk>p = AllowPortFromTo x31 x32 x33 # list; {u, v} \<in> set l; singleCombinators list; {u, v} \<noteq> {x31, x32}; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; noDenyAll list; {x31, x32} \<in> set l; all_in_list list l; position {u, v} l \<le> position {x31, x32} l; FWNormalisationCore.sorted (AllowPortFromTo x31 x32 x33 # list) l; aa = AllowPortFromTo x31 x32 x33\<rbrakk> \<Longrightarrow> position {u, v} l < position {x31, x32} l
 3. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position {a, b} l < position (first_bothNet aa) l
 4. \<lbrakk>p = aa # list; {u, v} \<in> set l; singleCombinators (aa # list); {u, v} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 5. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 6. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 7. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
subgoal for x x'
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>p = DenyAllFromTo x x' # list; {u, v} \<in> set l; singleCombinators list; {u, v} \<noteq> {x, x'}; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; noDenyAll list; {x, x'} \<in> set l; all_in_list list l; a = x \<and> b = x' \<or> position {u, v} l \<le> position {x, x'} l; FWNormalisationCore.sorted (DenyAllFromTo x x' # list) l; aa = DenyAllFromTo x x'\<rbrakk> \<Longrightarrow> position {u, v} l < position {x, x'} l
[PROOF STEP]
apply (case_tac "a = x \<and> b = x'", simp_all)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>p = DenyAllFromTo x x' # list; {u, v} \<in> set l; singleCombinators list; {u, v} \<noteq> {x, x'}; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; noDenyAll list; {x, x'} \<in> set l; all_in_list list l; position {u, v} l \<le> position {x, x'} l; FWNormalisationCore.sorted (DenyAllFromTo x x' # list) l; aa = DenyAllFromTo x x'; a = x \<longrightarrow> b \<noteq> x'\<rbrakk> \<Longrightarrow> position {u, v} l < position {x, x'} l
[PROOF STEP]
apply (case_tac "a = x", simp_all)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>p = DenyAllFromTo x x' # list; {u, v} \<in> set l; singleCombinators list; {u, v} \<noteq> {x, x'}; AllowPortFromTo u v w \<in> set list; {x, b} = {u, v}; noDenyAll list; {x, x'} \<in> set l; all_in_list list l; position {u, v} l \<le> position {x, x'} l; FWNormalisationCore.sorted (DenyAllFromTo x x' # list) l; aa = DenyAllFromTo x x'; b \<noteq> x'; a = x\<rbrakk> \<Longrightarrow> position {u, v} l < position {x, x'} l
 2. \<lbrakk>p = DenyAllFromTo x x' # list; {u, v} \<in> set l; singleCombinators list; {u, v} \<noteq> {x, x'}; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; noDenyAll list; {x, x'} \<in> set l; all_in_list list l; position {u, v} l \<le> position {x, x'} l; FWNormalisationCore.sorted (DenyAllFromTo x x' # list) l; aa = DenyAllFromTo x x'; a \<noteq> x\<rbrakk> \<Longrightarrow> position {u, v} l < position {x, x'} l
[PROOF STEP]
apply (simp add: order.not_eq_order_implies_strict posaux6)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>p = DenyAllFromTo x x' # list; {u, v} \<in> set l; singleCombinators list; {u, v} \<noteq> {x, x'}; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; noDenyAll list; {x, x'} \<in> set l; all_in_list list l; position {u, v} l \<le> position {x, x'} l; FWNormalisationCore.sorted (DenyAllFromTo x x' # list) l; aa = DenyAllFromTo x x'; a \<noteq> x\<rbrakk> \<Longrightarrow> position {u, v} l < position {x, x'} l
[PROOF STEP]
apply (simp add: order.not_eq_order_implies_strict posaux6)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>x31 x32 x33. \<lbrakk>p = AllowPortFromTo x31 x32 x33 # list; {u, v} \<in> set l; singleCombinators list; {u, v} \<noteq> {x31, x32}; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; noDenyAll list; {x31, x32} \<in> set l; all_in_list list l; position {u, v} l \<le> position {x31, x32} l; FWNormalisationCore.sorted (AllowPortFromTo x31 x32 x33 # list) l; aa = AllowPortFromTo x31 x32 x33\<rbrakk> \<Longrightarrow> position {u, v} l < position {x31, x32} l
 2. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position {a, b} l < position (first_bothNet aa) l
 3. \<lbrakk>p = aa # list; {u, v} \<in> set l; singleCombinators (aa # list); {u, v} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 4. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 5. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 6. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
apply (simp add: order.not_eq_order_implies_strict posaux6)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position {a, b} l < position (first_bothNet aa) l
 2. \<lbrakk>p = aa # list; {u, v} \<in> set l; singleCombinators (aa # list); {u, v} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 3. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 4. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 5. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
apply (rule basic_trans_rules(18))
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position {a, b} l \<le> position (first_bothNet aa) l
 2. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position {a, b} l \<noteq> position (first_bothNet aa) l
 3. \<lbrakk>p = aa # list; {u, v} \<in> set l; singleCombinators (aa # list); {u, v} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 4. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 5. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 6. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
apply (rule_tac a = "DenyAllFromTo a b" and b = aa in posaux4, simp_all)
[PROOF STATE]
proof (prove)
goal (7 subgoals):
 1. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> aa \<noteq> DenyAll
 2. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> first_bothNet aa = bothNet aa
 3. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position {a, b} l \<noteq> position (first_bothNet aa) l
 4. \<lbrakk>p = aa # list; {u, v} \<in> set l; singleCombinators (aa # list); {u, v} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 5. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 6. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 7. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
apply (case_tac aa,simp_all)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> first_bothNet aa = bothNet aa
 2. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position {a, b} l \<noteq> position (first_bothNet aa) l
 3. \<lbrakk>p = aa # list; {u, v} \<in> set l; singleCombinators (aa # list); {u, v} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 4. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 5. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 6. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
apply (case_tac aa, simp_all)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position {a, b} l \<noteq> position (first_bothNet aa) l
 2. \<lbrakk>p = aa # list; {u, v} \<in> set l; singleCombinators (aa # list); {u, v} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 3. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 4. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 5. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
apply (rule posaux3, simp_all)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> first_bothNet aa \<in> set l
 2. \<lbrakk>p = aa # list; {u, v} \<in> set l; singleCombinators (aa # list); {u, v} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 3. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 4. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 5. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
apply (case_tac aa, simp_all)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>p = aa # list; {u, v} \<in> set l; singleCombinators (aa # list); {u, v} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 2. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 3. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 4. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
apply (rule_tac a = aa and b = "AllowPortFromTo u v w" in posaux4, simp_all)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<lbrakk>p = aa # list; {u, v} \<in> set l; singleCombinators (aa # list); {u, v} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> aa \<noteq> DenyAll
 2. \<lbrakk>p = aa # list; {u, v} \<in> set l; singleCombinators (aa # list); {u, v} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> smaller aa (AllowPortFromTo u v w) l
 3. \<lbrakk>p = aa # list; {u, v} \<in> set l; singleCombinators (aa # list); {u, v} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> first_bothNet aa = bothNet aa
 4. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 5. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 6. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
apply (case_tac aa,simp_all)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<lbrakk>p = aa # list; {u, v} \<in> set l; singleCombinators (aa # list); {u, v} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> smaller aa (AllowPortFromTo u v w) l
 2. \<lbrakk>p = aa # list; {u, v} \<in> set l; singleCombinators (aa # list); {u, v} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> first_bothNet aa = bothNet aa
 3. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 4. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 5. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
apply (rule_tac p = list in sorted_is_smaller, simp_all)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<lbrakk>p = aa # list; {u, v} \<in> set l; singleCombinators (aa # list); {u, v} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> singleCombinators list
 2. \<lbrakk>p = aa # list; {u, v} \<in> set l; singleCombinators (aa # list); {u, v} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> first_bothNet aa = bothNet aa
 3. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 4. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 5. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
apply (case_tac aa, simp_all)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>p = aa # list; {u, v} \<in> set l; singleCombinators (aa # list); {u, v} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} = {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> first_bothNet aa = bothNet aa
 2. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 3. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 4. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
apply (case_tac aa, simp_all)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> position (first_bothNet aa) l \<le> position {u, v} l
 2. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 3. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
apply (rule_tac a = aa and b = "AllowPortFromTo u v w" in posaux4, simp_all)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> aa \<noteq> DenyAll
 2. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> {u, v} \<in> set l
 3. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> smaller aa (AllowPortFromTo u v w) l
 4. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> first_bothNet aa = bothNet aa
 5. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 6. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
apply (case_tac aa,simp_all)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> {u, v} \<in> set l
 2. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> smaller aa (AllowPortFromTo u v w) l
 3. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> first_bothNet aa = bothNet aa
 4. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 5. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
using **
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>AllowPortFromTo u v w \<in> set list; in_list aa l; all_in_list list l\<rbrakk> \<Longrightarrow> in_list (AllowPortFromTo u v w) l

goal (5 subgoals):
 1. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> {u, v} \<in> set l
 2. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> smaller aa (AllowPortFromTo u v w) l
 3. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> first_bothNet aa = bothNet aa
 4. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 5. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
apply auto[1]
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> smaller aa (AllowPortFromTo u v w) l
 2. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> first_bothNet aa = bothNet aa
 3. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 4. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
apply (metis all_in_list.simps(2) sorted_Cons)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>\<not> position {u, v} l \<le> position {a, b} l; p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> first_bothNet aa = bothNet aa
 2. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 3. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
apply (case_tac aa, simp_all)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>p = aa # list; {a, b} \<in> set l; singleCombinators (aa # list); {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list; {a, b} \<noteq> {u, v}; \<not> member DenyAll aa; noDenyAll list; in_list aa l; all_in_list list l; smaller (DenyAllFromTo a b) aa l; FWNormalisationCore.sorted (aa # list) l; position {a, b} l \<le> position {u, v} l\<rbrakk> \<Longrightarrow> position {u, v} l \<noteq> position {a, b} l
 2. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
apply (metis ** bothNet.simps(3) in_list.simps(3) posaux6)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>{a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); AllowPortFromTo u v w \<in> set list; smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l\<rbrakk> \<Longrightarrow> smaller (DenyAllFromTo a b) (AllowPortFromTo u v w) l

goal (1 subgoal):
 1. \<lbrakk>p = aa # list; \<not> member DenyAll aa \<and> noDenyAll list; {a, b} \<in> set l; in_list aa l \<and> all_in_list list l; singleCombinators (aa # list); smaller (DenyAllFromTo a b) aa l \<and> FWNormalisationCore.sorted (aa # list) l; {a, b} \<noteq> first_bothNet aa; AllowPortFromTo u v w \<in> set list\<rbrakk> \<Longrightarrow> {a, b} \<noteq> {u, v} \<longrightarrow> position {a, b} l \<le> position {u, v} l
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
noDenyAll p \<longrightarrow> {a, b} \<in> set l \<longrightarrow> all_in_list p l \<longrightarrow> singleCombinators p \<longrightarrow> FWNormalisationCore.sorted (DenyAllFromTo a b # p) l \<longrightarrow> {a, b} \<noteq> firstList p \<longrightarrow> AllowPortFromTo u v w \<in> set p \<longrightarrow> {a, b} \<noteq> {u, v}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma "f (g x) = g (f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (g x) = g (f x)
[PROOF STEP]
refute [expect = genuine]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (g x) = g (f x)
[PROOF STEP]
oops


[STATEMENT]
lemma new_keys_not_used [simp]:
    "[|Key K \<notin> used evs; K \<in> symKeys; evs \<in> yahalom|]
     ==> K \<notin> keysFor (parts (spies evs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Key K \<notin> used evs; K \<in> symKeys; evs \<in> yahalom\<rbrakk> \<Longrightarrow> K \<notin> keysFor (parts (knows Spy evs))
[PROOF STEP]
apply (erule rev_mp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>K \<in> symKeys; evs \<in> yahalom\<rbrakk> \<Longrightarrow> Key K \<notin> used evs \<longrightarrow> K \<notin> keysFor (parts (knows Spy evs))
[PROOF STEP]
apply (erule yahalom.induct, force,
       frule_tac [6] YM4_parts_knows_Spy, simp_all)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>evsf X. \<lbrakk>K \<in> symKeys; evsf \<in> yahalom; Key K \<notin> used evsf \<longrightarrow> K \<notin> keysFor (parts (knows Spy evsf)); X \<in> synth (analz (knows Spy evsf))\<rbrakk> \<Longrightarrow> Key K \<notin> parts {X} \<and> Key K \<notin> used evsf \<longrightarrow> K \<notin> keysFor (parts (insert X (knows Spy evsf)))
 2. \<And>evs3 KAB B NB A NA. \<lbrakk>K \<in> symKeys; evs3 \<in> yahalom; Key K \<notin> used evs3 \<longrightarrow> K \<notin> keysFor (parts (knows Spy evs3)); Key KAB \<notin> used evs3; KAB \<in> symKeys; Gets Server \<lbrace>Agent B, Nonce NB, Crypt (shrK B) \<lbrace>Agent A, Nonce NA\<rbrace>\<rbrace> \<in> set evs3\<rbrakk> \<Longrightarrow> K \<noteq> KAB \<and> Key K \<notin> used evs3 \<longrightarrow> K \<noteq> shrK A \<and> K \<noteq> shrK B
 3. \<And>evs4 A Ka B NA NB X. \<lbrakk>K \<in> symKeys; evs4 \<in> yahalom; Key K \<notin> used evs4 \<longrightarrow> K \<notin> keysFor (parts (knows Spy evs4)); A \<noteq> Server; Ka \<in> symKeys; Gets A \<lbrace>Crypt (shrK A) \<lbrace>Agent B, Key Ka, Nonce NA, Nonce NB\<rbrace>, X\<rbrace> \<in> set evs4; Says A B \<lbrace>Agent A, Nonce NA\<rbrace> \<in> set evs4; X \<in> parts (knows Spy evs4)\<rbrakk> \<Longrightarrow> Key K \<notin> parts {X, Crypt Ka (Nonce NB)} \<and> Key K \<notin> used evs4 \<longrightarrow> K \<noteq> Ka
[PROOF STEP]
txt\<open>Fake\<close>
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>evsf X. \<lbrakk>K \<in> symKeys; evsf \<in> yahalom; Key K \<notin> used evsf \<longrightarrow> K \<notin> keysFor (parts (knows Spy evsf)); X \<in> synth (analz (knows Spy evsf))\<rbrakk> \<Longrightarrow> Key K \<notin> parts {X} \<and> Key K \<notin> used evsf \<longrightarrow> K \<notin> keysFor (parts (insert X (knows Spy evsf)))
 2. \<And>evs3 KAB B NB A NA. \<lbrakk>K \<in> symKeys; evs3 \<in> yahalom; Key K \<notin> used evs3 \<longrightarrow> K \<notin> keysFor (parts (knows Spy evs3)); Key KAB \<notin> used evs3; KAB \<in> symKeys; Gets Server \<lbrace>Agent B, Nonce NB, Crypt (shrK B) \<lbrace>Agent A, Nonce NA\<rbrace>\<rbrace> \<in> set evs3\<rbrakk> \<Longrightarrow> K \<noteq> KAB \<and> Key K \<notin> used evs3 \<longrightarrow> K \<noteq> shrK A \<and> K \<noteq> shrK B
 3. \<And>evs4 A Ka B NA NB X. \<lbrakk>K \<in> symKeys; evs4 \<in> yahalom; Key K \<notin> used evs4 \<longrightarrow> K \<notin> keysFor (parts (knows Spy evs4)); A \<noteq> Server; Ka \<in> symKeys; Gets A \<lbrace>Crypt (shrK A) \<lbrace>Agent B, Key Ka, Nonce NA, Nonce NB\<rbrace>, X\<rbrace> \<in> set evs4; Says A B \<lbrace>Agent A, Nonce NA\<rbrace> \<in> set evs4; X \<in> parts (knows Spy evs4)\<rbrakk> \<Longrightarrow> Key K \<notin> parts {X, Crypt Ka (Nonce NB)} \<and> Key K \<notin> used evs4 \<longrightarrow> K \<noteq> Ka
[PROOF STEP]
apply (force dest!: keysFor_parts_insert, auto)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma step_thread_Some_SomeD:
  assumes det: "\<alpha>.deterministic I"
  and step: "step_thread update_state s t' = \<lfloor>(t, \<lfloor>(ta, x', m')\<rfloor>, \<sigma>')\<rfloor>"
  and invar: "state_invar s" "state_\<alpha> s \<in> I"
  shows "\<exists>x. thr_\<alpha> (thr s) t = \<lfloor>(x, no_wait_locks)\<rfloor> \<and> Predicate.eval (r t (x, shr s)) (ta, x', m') \<and> actions_ok s t ta \<and> \<sigma>' = update_state ta"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x. thr_\<alpha> (thr s) t = \<lfloor>(x, no_wait_locks)\<rfloor> \<and> \<alpha>.r_syntax t x (shr s) ta x' m' \<and> actions_ok s t ta \<and> \<sigma>' = update_state ta
[PROOF STEP]
using assms step_thread_correct(1)[OF det _ invar(1), of "\<lambda>_ _. True", of id update_state t']
[PROOF STATE]
proof (prove)
using this:
\<alpha>.deterministic I
step_thread update_state s t' = \<lfloor>(t, \<lfloor>(ta, x', m')\<rfloor>, \<sigma>')\<rfloor>
state_invar s
state_\<alpha> s \<in> I
\<lbrakk>True; state_\<alpha> s \<in> I\<rbrakk> \<Longrightarrow> map_option (apsnd (apsnd id)) (step_thread update_state s t') = \<alpha>.step_thread (id \<circ> update_state) (state_\<alpha> s) t'

goal (1 subgoal):
 1. \<exists>x. thr_\<alpha> (thr s) t = \<lfloor>(x, no_wait_locks)\<rfloor> \<and> \<alpha>.r_syntax t x (shr s) ta x' m' \<and> actions_ok s t ta \<and> \<sigma>' = update_state ta
[PROOF STEP]
by(auto simp add: map_option.id dest: \<alpha>.step_thread_Some_SomeD[OF det sym])


[STATEMENT]
lemma PO_m3_DY_fake_refines_m2_fake:
  "{R23 \<inter> UNIV \<times> (m3_inv4_lkeysec)}
     m2_fake, m3_DY_fake
   {> R23}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {R23 \<inter> UNIV \<times> m3_inv4_lkeysec} m2_fake, m3_DY_fake {> R23}
[PROOF STEP]
apply (auto simp add: PO_rhoare_defs R23_def m3_defs intro!: R23_intros
            del: abs_msg.cases)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>a y x. \<lbrakk>(a, y) \<in> R23_msgs; (a, y) \<in> R23_keys; (a, y) \<in> R23_non; (a, y) \<in> R23_pres; y \<in> m3_inv4_lkeysec; x \<in> abs_msg (parts (IK y))\<rbrakk> \<Longrightarrow> x \<in> fake ik0 (dom (runs a)) (chan a)
 2. \<And>a y x. \<lbrakk>(a, y) \<in> R23_msgs; (a, y) \<in> R23_keys; (a, y) \<in> R23_non; (a, y) \<in> R23_pres; y \<in> m3_inv4_lkeysec; x \<in> abs_msg (synth (analz (IK y)))\<rbrakk> \<Longrightarrow> x \<in> fake ik0 (dom (runs a)) (chan a)
 3. \<And>a y KK K. \<lbrakk>(a, y) \<in> R23_msgs; (a, y) \<in> R23_keys; (a, y) \<in> R23_non; (a, y) \<in> R23_pres; y \<in> m3_inv4_lkeysec; KK \<subseteq> range sesK; Key K \<in> analz (Key ` KK \<union> IK y)\<rbrakk> \<Longrightarrow> aKey K \<in> extr (aKey ` KK \<union> ik0) (chan a)
 4. \<And>a y KK K. \<lbrakk>(a, y) \<in> R23_msgs; (a, y) \<in> R23_keys; (a, y) \<in> R23_non; (a, y) \<in> R23_pres; y \<in> m3_inv4_lkeysec; KK \<subseteq> range sesK; Key K \<in> analz (IK y)\<rbrakk> \<Longrightarrow> aKey K \<in> extr (aKey ` KK \<union> ik0) (chan a)
 5. \<And>a y KK N. \<lbrakk>(a, y) \<in> R23_msgs; (a, y) \<in> R23_keys; (a, y) \<in> R23_non; (a, y) \<in> R23_pres; y \<in> m3_inv4_lkeysec; KK \<subseteq> range sesK; Nonce N \<in> analz (Key ` KK \<union> IK y)\<rbrakk> \<Longrightarrow> aNon N \<in> extr (aKey ` KK \<union> ik0) (chan a)
 6. \<And>a y KK N. \<lbrakk>(a, y) \<in> R23_msgs; (a, y) \<in> R23_keys; (a, y) \<in> R23_non; (a, y) \<in> R23_pres; y \<in> m3_inv4_lkeysec; KK \<subseteq> range sesK; Nonce N \<in> analz (IK y)\<rbrakk> \<Longrightarrow> aNon N \<in> extr (aKey ` KK \<union> ik0) (chan a)
[PROOF STEP]
apply (auto intro: abs_msg_DY_subset_fakeable [THEN subsetD]
            del: abs_msg.cases)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a y KK K. \<lbrakk>(a, y) \<in> R23_msgs; (a, y) \<in> R23_keys; (a, y) \<in> R23_non; (a, y) \<in> R23_pres; y \<in> m3_inv4_lkeysec; KK \<subseteq> range sesK; Key K \<in> analz (IK y)\<rbrakk> \<Longrightarrow> aKey K \<in> extr (aKey ` KK \<union> ik0) (chan a)
 2. \<And>a y KK N. \<lbrakk>(a, y) \<in> R23_msgs; (a, y) \<in> R23_keys; (a, y) \<in> R23_non; (a, y) \<in> R23_pres; y \<in> m3_inv4_lkeysec; KK \<subseteq> range sesK; Nonce N \<in> analz (IK y)\<rbrakk> \<Longrightarrow> aNon N \<in> extr (aKey ` KK \<union> ik0) (chan a)
[PROOF STEP]
apply (auto dest: R23_dests)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done