[STATEMENT]
lemma normalize_positive_dst_ports:
    assumes generic: "primitive_matcher_generic \<beta>"
    and n: "normalized_nnf_match m"
    and noneg: "\<not> has_disc_negated is_Dst_Ports False m"
    shows "match_list (\<beta>, \<alpha>) (normalize_positive_dst_ports m) a p \<longleftrightarrow> matches (\<beta>, \<alpha>) m a p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. match_list (\<beta>, \<alpha>) (normalize_positive_dst_ports m) a p = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
apply(simp add: normalize_positive_dst_ports_def normalize_positive_ports_step_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. match_list (\<beta>, \<alpha>) (case primitive_extractor (is_Dst_Ports, dst_ports_sel) m of (spts, rst) \<Rightarrow> case getNeg spts of [] \<Rightarrow> case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
apply(case_tac "primitive_extractor (is_Dst_Ports, dst_ports_sel) m", rename_tac spts rst)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>spts rst. primitive_extractor (is_Dst_Ports, dst_ports_sel) m = (spts, rst) \<Longrightarrow> match_list (\<beta>, \<alpha>) (case primitive_extractor (is_Dst_Ports, dst_ports_sel) m of (spts, rst) \<Rightarrow> case getNeg spts of [] \<Rightarrow> case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>spts rst. primitive_extractor (is_Dst_Ports, dst_ports_sel) m = (spts, rst) \<Longrightarrow> match_list (\<beta>, \<alpha>) (case getNeg spts of [] \<Rightarrow> case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
apply(subgoal_tac "getNeg spts = []")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>spts rst. \<lbrakk>primitive_extractor (is_Dst_Ports, dst_ports_sel) m = (spts, rst); getNeg spts = []\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (case getNeg spts of [] \<Rightarrow> case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
 2. \<And>spts rst. primitive_extractor (is_Dst_Ports, dst_ports_sel) m = (spts, rst) \<Longrightarrow> getNeg spts = []
[PROOF STEP]
(*needs assumption for this step *)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>spts rst. \<lbrakk>primitive_extractor (is_Dst_Ports, dst_ports_sel) m = (spts, rst); getNeg spts = []\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (case getNeg spts of [] \<Rightarrow> case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
 2. \<And>spts rst. primitive_extractor (is_Dst_Ports, dst_ports_sel) m = (spts, rst) \<Longrightarrow> getNeg spts = []
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>spts rst. primitive_extractor (is_Dst_Ports, dst_ports_sel) m = (spts, rst) \<Longrightarrow> getNeg spts = []
 2. \<And>spts rst. \<lbrakk>primitive_extractor (is_Dst_Ports, dst_ports_sel) m = (spts, rst); getNeg spts = []\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (case getNeg spts of [] \<Rightarrow> case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. primitive_extractor (is_Dst_Ports, dst_ports_sel) m = (spts_, rst_) \<Longrightarrow> getNeg spts_ = []
[PROOF STEP]
apply(drule primitive_extractor_correct(8)[OF n wf_disc_sel_common_primitive(2)])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<not> has_disc_negated is_Dst_Ports False m) = (getNeg spts_ = []) \<Longrightarrow> getNeg spts_ = []
[PROOF STEP]
using noneg
[PROOF STATE]
proof (prove)
using this:
\<not> has_disc_negated is_Dst_Ports False m

goal (1 subgoal):
 1. (\<not> has_disc_negated is_Dst_Ports False m) = (getNeg spts_ = []) \<Longrightarrow> getNeg spts_ = []
[PROOF STEP]
by simp+
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>spts rst. \<lbrakk>primitive_extractor (is_Dst_Ports, dst_ports_sel) m = (spts, rst); getNeg spts = []\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (case getNeg spts of [] \<Rightarrow> case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>spts rst. \<lbrakk>primitive_extractor (is_Dst_Ports, dst_ports_sel) m = (spts, rst); getNeg spts = []\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
apply(drule primitive_extractor_correct(1)[OF n wf_disc_sel_common_primitive(2), where \<gamma>="(\<beta>, \<alpha>)" and a=a and p=p])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>spts rst. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
apply(case_tac "l4_ports_compress (getPos spts)")
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>spts rst. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; l4_ports_compress (getPos spts) = CannotMatch\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
 2. \<And>spts rst. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; l4_ports_compress (getPos spts) = MatchesAll\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
 3. \<And>spts rst x3. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; l4_ports_compress (getPos spts) = MatchExpr x3\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>spts rst. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; l4_ports_compress (getPos spts) = CannotMatch\<rbrakk> \<Longrightarrow> \<not> matches (\<beta>, \<alpha>) m a p
 2. \<And>spts rst. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; l4_ports_compress (getPos spts) = MatchesAll\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
 3. \<And>spts rst x3. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; l4_ports_compress (getPos spts) = MatchExpr x3\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
apply(drule raw_ports_compress_dst_CannotMatch[OF generic, where \<alpha>=\<alpha> and a=a and p=p])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>spts rst. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; \<not> matches (\<beta>, \<alpha>) (alist_and (map (Pos \<circ> Dst_Ports) (getPos spts))) a p\<rbrakk> \<Longrightarrow> \<not> matches (\<beta>, \<alpha>) m a p
 2. \<And>spts rst. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; l4_ports_compress (getPos spts) = MatchesAll\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
 3. \<And>spts rst x3. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; l4_ports_compress (getPos spts) = MatchExpr x3\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
apply(simp add: noNeg_mapNegPos_helper; fail)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>spts rst. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; l4_ports_compress (getPos spts) = MatchesAll\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
 2. \<And>spts rst x3. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; l4_ports_compress (getPos spts) = MatchExpr x3\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>spts rst. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; l4_ports_compress (getPos spts) = MatchesAll\<rbrakk> \<Longrightarrow> (matches (\<beta>, \<alpha>) rst a p \<longrightarrow> matches (\<beta>, \<alpha>) m a p) \<and> (\<not> matches (\<beta>, \<alpha>) rst a p \<longrightarrow> \<not> matches (\<beta>, \<alpha>) m a p)
 2. \<And>spts rst x3. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; l4_ports_compress (getPos spts) = MatchExpr x3\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
apply(drule raw_ports_compress_MatchesAll(2)[OF generic, where \<alpha>=\<alpha> and a=a and p=p])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>spts rst. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; matches (\<beta>, \<alpha>) (alist_and (map (Pos \<circ> Dst_Ports) (getPos spts))) a p\<rbrakk> \<Longrightarrow> (matches (\<beta>, \<alpha>) rst a p \<longrightarrow> matches (\<beta>, \<alpha>) m a p) \<and> (\<not> matches (\<beta>, \<alpha>) rst a p \<longrightarrow> \<not> matches (\<beta>, \<alpha>) m a p)
 2. \<And>spts rst x3. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; l4_ports_compress (getPos spts) = MatchExpr x3\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
apply(simp add: noNeg_mapNegPos_helper; fail)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>spts rst x3. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; l4_ports_compress (getPos spts) = MatchExpr x3\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (case l4_ports_compress (getPos spts) of CannotMatch \<Rightarrow> [] | MatchesAll \<Rightarrow> [rst] | MatchExpr m \<Rightarrow> map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports m)) a p = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
apply(simp add: bunch_of_lemmata_about_matches)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>spts rst x3. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; l4_ports_compress (getPos spts) = MatchExpr x3\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports x3)) a p = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
apply(drule raw_ports_compress_dst_MatchExpr[OF generic, where \<alpha>=\<alpha> and a=a and p=p])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>spts rst x3. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; matches (\<beta>, \<alpha>) (Match (Dst_Ports x3)) a p = matches (\<beta>, \<alpha>) (alist_and (map (Pos \<circ> Dst_Ports) (getPos spts))) a p\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports x3)) a p = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
apply(insert singletonize_L4Ports_dst[OF generic, where \<alpha>=\<alpha> and a=a and p=p])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>spts rst x3. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; matches (\<beta>, \<alpha>) (Match (Dst_Ports x3)) a p = matches (\<beta>, \<alpha>) (alist_and (map (Pos \<circ> Dst_Ports) (getPos spts))) a p; \<And>pts. match_list (\<beta>, \<alpha>) (map (Match \<circ> Dst_Ports) (singletonize_L4Ports pts)) a p = matches (\<beta>, \<alpha>) (Match (Dst_Ports pts)) a p\<rbrakk> \<Longrightarrow> match_list (\<beta>, \<alpha>) (map (\<lambda>spt. MatchAnd (Match (Dst_Ports spt)) rst) (singletonize_L4Ports x3)) a p = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
apply(simp add: match_list_matches)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>spts rst x3. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; matches (\<beta>, \<alpha>) (Match (Dst_Ports x3)) a p = matches (\<beta>, \<alpha>) (alist_and (map (Pos \<circ> Dst_Ports) (getPos spts))) a p; \<And>pts. (\<exists>m\<in>set (singletonize_L4Ports pts). matches (\<beta>, \<alpha>) (Match (Dst_Ports m)) a p) = matches (\<beta>, \<alpha>) (Match (Dst_Ports pts)) a p\<rbrakk> \<Longrightarrow> (\<exists>m\<in>set (singletonize_L4Ports x3). matches (\<beta>, \<alpha>) (MatchAnd (Match (Dst_Ports m)) rst) a p) = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
apply(simp add: bunch_of_lemmata_about_matches)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>spts rst x3. \<lbrakk>getNeg spts = []; (matches (\<beta>, \<alpha>) (alist_and (NegPos_map Dst_Ports spts)) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p; matches (\<beta>, \<alpha>) (Match (Dst_Ports x3)) a p = matches (\<beta>, \<alpha>) (alist_and (map (Pos \<circ> Dst_Ports) (getPos spts))) a p; \<And>pts. (\<exists>m\<in>set (singletonize_L4Ports pts). matches (\<beta>, \<alpha>) (Match (Dst_Ports m)) a p) = matches (\<beta>, \<alpha>) (Match (Dst_Ports pts)) a p\<rbrakk> \<Longrightarrow> (matches (\<beta>, \<alpha>) (alist_and (map (Pos \<circ> Dst_Ports) (getPos spts))) a p \<and> matches (\<beta>, \<alpha>) rst a p) = matches (\<beta>, \<alpha>) m a p
[PROOF STEP]
apply(simp add: noNeg_mapNegPos_helper; fail)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done