[STATEMENT]
lemma singleLiteralClausesEntailItsLiteral:
  fixes clause :: Clause and literal :: Literal
  assumes "length clause = 1" and "literal el clause"
  shows "clauseEntailsLiteral clause literal"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. clauseEntailsLiteral clause literal
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. clauseEntailsLiteral clause literal
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
length clause = 1
literal el clause
[PROOF STEP]
have onlyLiteral: "\<forall> l. l el clause \<longrightarrow> l = literal"
[PROOF STATE]
proof (prove)
using this:
length clause = 1
literal el clause

goal (1 subgoal):
 1. \<forall>l. l el clause \<longrightarrow> l = literal
[PROOF STEP]
using lengthOneImpliesOnlyElement[of "clause" "literal"]
[PROOF STATE]
proof (prove)
using this:
length clause = 1
literal el clause
\<lbrakk>length clause = 1; literal \<in> set clause\<rbrakk> \<Longrightarrow> \<forall>a'. a' \<in> set clause \<longrightarrow> a' = literal

goal (1 subgoal):
 1. \<forall>l. l el clause \<longrightarrow> l = literal
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<forall>l. l el clause \<longrightarrow> l = literal

goal (1 subgoal):
 1. clauseEntailsLiteral clause literal
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
\<forall>l. l el clause \<longrightarrow> l = literal

goal (1 subgoal):
 1. clauseEntailsLiteral clause literal
[PROOF STEP]
fix valuation :: Valuation
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. clauseEntailsLiteral clause literal
[PROOF STEP]
assume "clauseTrue clause valuation"
[PROOF STATE]
proof (state)
this:
clauseTrue clause valuation

goal (1 subgoal):
 1. clauseEntailsLiteral clause literal
[PROOF STEP]
with onlyLiteral
[PROOF STATE]
proof (chain)
picking this:
\<forall>l. l el clause \<longrightarrow> l = literal
clauseTrue clause valuation
[PROOF STEP]
have "literalTrue literal valuation"
[PROOF STATE]
proof (prove)
using this:
\<forall>l. l el clause \<longrightarrow> l = literal
clauseTrue clause valuation

goal (1 subgoal):
 1. literalTrue literal valuation
[PROOF STEP]
by (auto simp add:clauseTrueIffContainsTrueLiteral)
[PROOF STATE]
proof (state)
this:
literalTrue literal valuation

goal (1 subgoal):
 1. clauseEntailsLiteral clause literal
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
clauseTrue clause ?valuation2 \<Longrightarrow> literalTrue literal ?valuation2

goal (1 subgoal):
 1. clauseEntailsLiteral clause literal
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
clauseTrue clause ?valuation2 \<Longrightarrow> literalTrue literal ?valuation2

goal (1 subgoal):
 1. clauseEntailsLiteral clause literal
[PROOF STEP]
by (simp add:clauseEntailsLiteral_def)
[PROOF STATE]
proof (state)
this:
clauseEntailsLiteral clause literal

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma insertion_sum: "insertion f (sum g A) = (\<Sum>x\<in>A. insertion f (g x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. insertion f (sum g A) = (\<Sum>x\<in>A. insertion f (g x))
[PROOF STEP]
by (induction A rule: infinite_finite_induct) (auto simp: insertion_add)


[STATEMENT]
lemma merge_split_supset':
  assumes "r \<in> set (Sorting_Algorithms.merge cmp xs ys)"
  shows "\<exists>as bs as' bs'. as@r#bs = (Sorting_Algorithms.merge cmp xs ys)
          \<and> set bs' \<subseteq> set bs \<and> (as'@r#bs' = xs \<or> as'@r#bs' = ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>as bs as' bs'. as @ r # bs = Sorting_Algorithms.merge cmp xs ys \<and> set bs' \<subseteq> set bs \<and> (as' @ r # bs' = xs \<or> as' @ r # bs' = ys)
[PROOF STEP]
using merge_split_supset split_list[OF assms]
[PROOF STATE]
proof (prove)
using this:
?as @ ?r # ?bs = Sorting_Algorithms.merge ?cmp ?xs ?ys \<Longrightarrow> \<exists>bs' as'. set bs' \<subseteq> set ?bs \<and> (as' @ ?r # bs' = ?xs \<or> as' @ ?r # bs' = ?ys)
\<exists>ysa zs. Sorting_Algorithms.merge cmp xs ys = ysa @ r # zs

goal (1 subgoal):
 1. \<exists>as bs as' bs'. as @ r # bs = Sorting_Algorithms.merge cmp xs ys \<and> set bs' \<subseteq> set bs \<and> (as' @ r # bs' = xs \<or> as' @ r # bs' = ys)
[PROOF STEP]
by metis


[STATEMENT]
lemma cos_ge_zero: "-(pi/2) \<le> x \<Longrightarrow> x \<le> pi/2 \<Longrightarrow> 0 \<le> cos x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>- (pi / 2) \<le> x; x \<le> pi / 2\<rbrakk> \<Longrightarrow> 0 \<le> cos x
[PROOF STEP]
by (auto simp: order_le_less cos_gt_zero_pi)
    (metis cos_pi_half eq_divide_eq eq_numeral_simps(4))


[STATEMENT]
lemma wf_less_multiset: "wf {(M :: 'a multiset, N). M < N}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wf {(M, N). M < N}
[PROOF STEP]
unfolding less_multiset_def multp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wf {(M, N). (M, N) \<in> mult {(x, y). x < y}}
[PROOF STEP]
by (auto intro: wf_mult wf)


[STATEMENT]
lemma map_IInf_func2:
  fixes F :: "'c::complete_lattice_with_dual upset \<Rightarrow> 'b::complete_lattice_with_dual upset"
  and G :: "'a::complete_lattice_with_dual upset \<Rightarrow> 'c upset"
  shows "map_IInf (F \<circ> G) = map_IInf F \<circ> map_IInf G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_IInf (F \<circ> G) = map_IInf F \<circ> map_IInf G
[PROOF STEP]
unfolding map_IInf_def fun_eq_iff comp_def id_def us_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. IInf (F (G (Abs_upset (\<up> x)))) = IInf (F (Abs_upset (\<up> (IInf (G (Abs_upset (\<up> x)))))))
[PROOF STEP]
by (metis comp_apply id_apply us_IInf_inv us_def)


[STATEMENT]
lemma Re_power_real [simp]: "Im x = 0 \<Longrightarrow> Re (x ^ n) = Re x ^ n "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Im x = 0 \<Longrightarrow> Re (x ^ n) = Re x ^ n
[PROOF STEP]
by (induct n) simp_all


[STATEMENT]
lemma inj2_linear:
  fixes K V1 V2
  assumes h1: "vectorspace K V1" and h2: "vectorspace K V2"
  shows "linear_map K V2 (direct_sum V1 V2) (inj2 V1 V2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. linear_map K V2 (direct_sum V1 V2) (inj2 V1 V2)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. linear_map K V2 (direct_sum V1 V2) (inj2 V1 V2)
[PROOF STEP]
from h1 h2
[PROOF STATE]
proof (chain)
picking this:
vectorspace K V1
vectorspace K V2
[PROOF STEP]
have mod: "mod_hom K V2 (direct_sum V1 V2) (inj2 V1 V2)"
[PROOF STATE]
proof (prove)
using this:
vectorspace K V1
vectorspace K V2

goal (1 subgoal):
 1. mod_hom K V2 (direct_sum V1 V2) (inj2 V1 V2)
[PROOF STEP]
by (unfold vectorspace_def, intro inj2_hom, auto)
[PROOF STATE]
proof (state)
this:
mod_hom K V2 (direct_sum V1 V2) (inj2 V1 V2)

goal (1 subgoal):
 1. linear_map K V2 (direct_sum V1 V2) (inj2 V1 V2)
[PROOF STEP]
from mod h1 h2
[PROOF STATE]
proof (chain)
picking this:
mod_hom K V2 (direct_sum V1 V2) (inj2 V1 V2)
vectorspace K V1
vectorspace K V2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
mod_hom K V2 (direct_sum V1 V2) (inj2 V1 V2)
vectorspace K V1
vectorspace K V2

goal (1 subgoal):
 1. linear_map K V2 (direct_sum V1 V2) (inj2 V1 V2)
[PROOF STEP]
by (unfold linear_map_def vectorspace_def , auto, intro direct_sum_is_module, auto)
[PROOF STATE]
proof (state)
this:
linear_map K V2 (direct_sum V1 V2) (inj2 V1 V2)

goal:
No subgoals!
[PROOF STEP]
qed