[STATEMENT]
lemma fact_dvd_pochhammer: "fact k dvd pochhammer (a::int) k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fact k dvd pochhammer a k
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. fact k dvd pochhammer a k
[PROOF STEP]
have dvd: "y \<noteq> 0 \<Longrightarrow> ((of_int (x div y))::'a::field_char_0) = of_int x / of_int y \<Longrightarrow> y dvd x"
    for x y :: int
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>y \<noteq> 0; of_int (x div y) = of_int x / of_int y\<rbrakk> \<Longrightarrow> y dvd x
[PROOF STEP]
by (smt dvd_triv_left mult.commute nonzero_eq_divide_eq of_int_eq_0_iff of_int_eq_iff of_int_mult)
[PROOF STATE]
proof (state)
this:
\<lbrakk>?y \<noteq> 0; of_int (?x div ?y) = of_int ?x / of_int ?y\<rbrakk> \<Longrightarrow> ?y dvd ?x

goal (1 subgoal):
 1. fact k dvd pochhammer a k
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fact k dvd pochhammer a k
[PROOF STEP]
proof (cases "0 < a")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. 0 < a \<Longrightarrow> fact k dvd pochhammer a k
 2. \<not> 0 < a \<Longrightarrow> fact k dvd pochhammer a k
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
0 < a

goal (2 subgoals):
 1. 0 < a \<Longrightarrow> fact k dvd pochhammer a k
 2. \<not> 0 < a \<Longrightarrow> fact k dvd pochhammer a k
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
0 < a

goal (2 subgoals):
 1. 0 < a \<Longrightarrow> fact k dvd pochhammer a k
 2. \<not> 0 < a \<Longrightarrow> fact k dvd pochhammer a k
[PROOF STEP]
define n where "n = nat (a - 1) + k"
[PROOF STATE]
proof (state)
this:
n = nat (a - 1) + k

goal (2 subgoals):
 1. 0 < a \<Longrightarrow> fact k dvd pochhammer a k
 2. \<not> 0 < a \<Longrightarrow> fact k dvd pochhammer a k
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
0 < a
n = nat (a - 1) + k
[PROOF STEP]
have a: "a = int n - int k + 1"
[PROOF STATE]
proof (prove)
using this:
0 < a
n = nat (a - 1) + k

goal (1 subgoal):
 1. a = int n - int k + 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
a = int n - int k + 1

goal (2 subgoals):
 1. 0 < a \<Longrightarrow> fact k dvd pochhammer a k
 2. \<not> 0 < a \<Longrightarrow> fact k dvd pochhammer a k
[PROOF STEP]
from fact_nonzero
[PROOF STATE]
proof (chain)
picking this:
fact ?n \<noteq> (0::?'a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
fact ?n \<noteq> (0::?'a)

goal (1 subgoal):
 1. fact k dvd pochhammer a k
[PROOF STEP]
unfolding a
[PROOF STATE]
proof (prove)
using this:
fact ?n \<noteq> (0::?'a)

goal (1 subgoal):
 1. fact k dvd pochhammer (int n - int k + 1) k
[PROOF STEP]
proof (rule dvd)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. of_int (pochhammer (int n - int k + 1) k div fact k) = of_int (pochhammer (int n - int k + 1) k) / of_int (fact k)
[PROOF STEP]
have "of_int (pochhammer (int n - int k + 1) k div fact k) = (of_int (int n gchoose k)::rat)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rat_of_int (pochhammer (int n - int k + 1) k div fact k) = rat_of_int (int n gchoose k)
[PROOF STEP]
by (simp only: gbinomial_int_pochhammer')
[PROOF STATE]
proof (state)
this:
rat_of_int (pochhammer (int n - int k + 1) k div fact k) = rat_of_int (int n gchoose k)

goal (1 subgoal):
 1. of_int (pochhammer (int n - int k + 1) k div fact k) = of_int (pochhammer (int n - int k + 1) k) / of_int (fact k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rat_of_int (pochhammer (int n - int k + 1) k div fact k) = rat_of_int (int n gchoose k)

goal (1 subgoal):
 1. of_int (pochhammer (int n - int k + 1) k div fact k) = of_int (pochhammer (int n - int k + 1) k) / of_int (fact k)
[PROOF STEP]
have "\<dots> = of_int (int (n choose k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rat_of_int (int n gchoose k) = rat_of_int (int (n choose k))
[PROOF STEP]
by (simp only: int_binomial)
[PROOF STATE]
proof (state)
this:
rat_of_int (int n gchoose k) = rat_of_int (int (n choose k))

goal (1 subgoal):
 1. of_int (pochhammer (int n - int k + 1) k div fact k) = of_int (pochhammer (int n - int k + 1) k) / of_int (fact k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rat_of_int (int n gchoose k) = rat_of_int (int (n choose k))

goal (1 subgoal):
 1. of_int (pochhammer (int n - int k + 1) k div fact k) = of_int (pochhammer (int n - int k + 1) k) / of_int (fact k)
[PROOF STEP]
have "\<dots> = of_nat (n choose k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rat_of_int (int (n choose k)) = rat_of_nat (n choose k)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
rat_of_int (int (n choose k)) = rat_of_nat (n choose k)

goal (1 subgoal):
 1. of_int (pochhammer (int n - int k + 1) k div fact k) = of_int (pochhammer (int n - int k + 1) k) / of_int (fact k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rat_of_int (int (n choose k)) = rat_of_nat (n choose k)

goal (1 subgoal):
 1. of_int (pochhammer (int n - int k + 1) k div fact k) = of_int (pochhammer (int n - int k + 1) k) / of_int (fact k)
[PROOF STEP]
have "\<dots> = (of_nat n) gchoose k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rat_of_nat (n choose k) = rat_of_nat n gchoose k
[PROOF STEP]
by (fact binomial_gbinomial)
[PROOF STATE]
proof (state)
this:
rat_of_nat (n choose k) = rat_of_nat n gchoose k

goal (1 subgoal):
 1. of_int (pochhammer (int n - int k + 1) k div fact k) = of_int (pochhammer (int n - int k + 1) k) / of_int (fact k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rat_of_nat (n choose k) = rat_of_nat n gchoose k

goal (1 subgoal):
 1. of_int (pochhammer (int n - int k + 1) k div fact k) = of_int (pochhammer (int n - int k + 1) k) / of_int (fact k)
[PROOF STEP]
have "\<dots> = pochhammer (of_nat n - of_nat k + 1) k / fact k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rat_of_nat n gchoose k = pochhammer (rat_of_nat n - rat_of_nat k + 1) k / fact k
[PROOF STEP]
by (fact gbinomial_pochhammer')
[PROOF STATE]
proof (state)
this:
rat_of_nat n gchoose k = pochhammer (rat_of_nat n - rat_of_nat k + 1) k / fact k

goal (1 subgoal):
 1. of_int (pochhammer (int n - int k + 1) k div fact k) = of_int (pochhammer (int n - int k + 1) k) / of_int (fact k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rat_of_nat n gchoose k = pochhammer (rat_of_nat n - rat_of_nat k + 1) k / fact k

goal (1 subgoal):
 1. of_int (pochhammer (int n - int k + 1) k div fact k) = of_int (pochhammer (int n - int k + 1) k) / of_int (fact k)
[PROOF STEP]
have "\<dots> = pochhammer (of_int (int n - int k + 1)) k / fact k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pochhammer (rat_of_nat n - rat_of_nat k + 1) k / fact k = pochhammer (rat_of_int (int n - int k + 1)) k / fact k
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
pochhammer (rat_of_nat n - rat_of_nat k + 1) k / fact k = pochhammer (rat_of_int (int n - int k + 1)) k / fact k

goal (1 subgoal):
 1. of_int (pochhammer (int n - int k + 1) k div fact k) = of_int (pochhammer (int n - int k + 1) k) / of_int (fact k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
pochhammer (rat_of_nat n - rat_of_nat k + 1) k / fact k = pochhammer (rat_of_int (int n - int k + 1)) k / fact k

goal (1 subgoal):
 1. of_int (pochhammer (int n - int k + 1) k div fact k) = of_int (pochhammer (int n - int k + 1) k) / of_int (fact k)
[PROOF STEP]
have "\<dots> = (of_int (pochhammer (int n - int k + 1) k)) / (of_int (fact k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pochhammer (rat_of_int (int n - int k + 1)) k / fact k = rat_of_int (pochhammer (int n - int k + 1) k) / rat_of_int (fact k)
[PROOF STEP]
by (simp only: of_int_fact pochhammer_of_int)
[PROOF STATE]
proof (state)
this:
pochhammer (rat_of_int (int n - int k + 1)) k / fact k = rat_of_int (pochhammer (int n - int k + 1) k) / rat_of_int (fact k)

goal (1 subgoal):
 1. of_int (pochhammer (int n - int k + 1) k div fact k) = of_int (pochhammer (int n - int k + 1) k) / of_int (fact k)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
rat_of_int (pochhammer (int n - int k + 1) k div fact k) = rat_of_int (pochhammer (int n - int k + 1) k) / rat_of_int (fact k)
[PROOF STEP]
show "of_int (pochhammer (int n - int k + 1) k div fact k) =
                      of_int (pochhammer (int n - int k + 1) k) / rat_of_int (fact k)"
[PROOF STATE]
proof (prove)
using this:
rat_of_int (pochhammer (int n - int k + 1) k div fact k) = rat_of_int (pochhammer (int n - int k + 1) k) / rat_of_int (fact k)

goal (1 subgoal):
 1. rat_of_int (pochhammer (int n - int k + 1) k div fact k) = rat_of_int (pochhammer (int n - int k + 1) k) / rat_of_int (fact k)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
rat_of_int (pochhammer (int n - int k + 1) k div fact k) = rat_of_int (pochhammer (int n - int k + 1) k) / rat_of_int (fact k)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
fact k dvd pochhammer a k

goal (1 subgoal):
 1. \<not> 0 < a \<Longrightarrow> fact k dvd pochhammer a k
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> 0 < a \<Longrightarrow> fact k dvd pochhammer a k
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> 0 < a

goal (1 subgoal):
 1. \<not> 0 < a \<Longrightarrow> fact k dvd pochhammer a k
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<not> 0 < a

goal (1 subgoal):
 1. \<not> 0 < a \<Longrightarrow> fact k dvd pochhammer a k
[PROOF STEP]
define n where "n = nat (- a)"
[PROOF STATE]
proof (state)
this:
n = nat (- a)

goal (1 subgoal):
 1. \<not> 0 < a \<Longrightarrow> fact k dvd pochhammer a k
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<not> 0 < a
n = nat (- a)
[PROOF STEP]
have a: "a = - int n"
[PROOF STATE]
proof (prove)
using this:
\<not> 0 < a
n = nat (- a)

goal (1 subgoal):
 1. a = - int n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
a = - int n

goal (1 subgoal):
 1. \<not> 0 < a \<Longrightarrow> fact k dvd pochhammer a k
[PROOF STEP]
from fact_nonzero
[PROOF STATE]
proof (chain)
picking this:
fact ?n \<noteq> (0::?'a)
[PROOF STEP]
have "fact k dvd (-1)^k * pochhammer (- int n) k"
[PROOF STATE]
proof (prove)
using this:
fact ?n \<noteq> (0::?'a)

goal (1 subgoal):
 1. fact k dvd (- 1) ^ k * pochhammer (- int n) k
[PROOF STEP]
proof (rule dvd)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = of_int ((- 1) ^ k * pochhammer (- int n) k) / of_int (fact k)
[PROOF STEP]
have "of_int ((-1)^k * pochhammer (- int n) k div fact k) = (of_int (int n gchoose k)::rat)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rat_of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = rat_of_int (int n gchoose k)
[PROOF STEP]
by (simp only: gbinomial_int_pochhammer)
[PROOF STATE]
proof (state)
this:
rat_of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = rat_of_int (int n gchoose k)

goal (1 subgoal):
 1. of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = of_int ((- 1) ^ k * pochhammer (- int n) k) / of_int (fact k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rat_of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = rat_of_int (int n gchoose k)

goal (1 subgoal):
 1. of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = of_int ((- 1) ^ k * pochhammer (- int n) k) / of_int (fact k)
[PROOF STEP]
have "\<dots> = of_int (int (n choose k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rat_of_int (int n gchoose k) = rat_of_int (int (n choose k))
[PROOF STEP]
by (simp only: int_binomial)
[PROOF STATE]
proof (state)
this:
rat_of_int (int n gchoose k) = rat_of_int (int (n choose k))

goal (1 subgoal):
 1. of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = of_int ((- 1) ^ k * pochhammer (- int n) k) / of_int (fact k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rat_of_int (int n gchoose k) = rat_of_int (int (n choose k))

goal (1 subgoal):
 1. of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = of_int ((- 1) ^ k * pochhammer (- int n) k) / of_int (fact k)
[PROOF STEP]
have "\<dots> = of_nat (n choose k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rat_of_int (int (n choose k)) = rat_of_nat (n choose k)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
rat_of_int (int (n choose k)) = rat_of_nat (n choose k)

goal (1 subgoal):
 1. of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = of_int ((- 1) ^ k * pochhammer (- int n) k) / of_int (fact k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rat_of_int (int (n choose k)) = rat_of_nat (n choose k)

goal (1 subgoal):
 1. of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = of_int ((- 1) ^ k * pochhammer (- int n) k) / of_int (fact k)
[PROOF STEP]
have "\<dots> = (of_nat n) gchoose k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rat_of_nat (n choose k) = rat_of_nat n gchoose k
[PROOF STEP]
by (fact binomial_gbinomial)
[PROOF STATE]
proof (state)
this:
rat_of_nat (n choose k) = rat_of_nat n gchoose k

goal (1 subgoal):
 1. of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = of_int ((- 1) ^ k * pochhammer (- int n) k) / of_int (fact k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rat_of_nat (n choose k) = rat_of_nat n gchoose k

goal (1 subgoal):
 1. of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = of_int ((- 1) ^ k * pochhammer (- int n) k) / of_int (fact k)
[PROOF STEP]
have "\<dots> = (-1)^k * pochhammer (- of_nat n) k / fact k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rat_of_nat n gchoose k = (- 1) ^ k * pochhammer (- rat_of_nat n) k / fact k
[PROOF STEP]
by (fact gbinomial_pochhammer)
[PROOF STATE]
proof (state)
this:
rat_of_nat n gchoose k = (- 1) ^ k * pochhammer (- rat_of_nat n) k / fact k

goal (1 subgoal):
 1. of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = of_int ((- 1) ^ k * pochhammer (- int n) k) / of_int (fact k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
rat_of_nat n gchoose k = (- 1) ^ k * pochhammer (- rat_of_nat n) k / fact k

goal (1 subgoal):
 1. of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = of_int ((- 1) ^ k * pochhammer (- int n) k) / of_int (fact k)
[PROOF STEP]
have "\<dots> = (-1)^k * pochhammer (of_int (- int n)) k / fact k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- 1) ^ k * pochhammer (- rat_of_nat n) k / fact k = (- 1) ^ k * pochhammer (rat_of_int (- int n)) k / fact k
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(- 1) ^ k * pochhammer (- rat_of_nat n) k / fact k = (- 1) ^ k * pochhammer (rat_of_int (- int n)) k / fact k

goal (1 subgoal):
 1. of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = of_int ((- 1) ^ k * pochhammer (- int n) k) / of_int (fact k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(- 1) ^ k * pochhammer (- rat_of_nat n) k / fact k = (- 1) ^ k * pochhammer (rat_of_int (- int n)) k / fact k

goal (1 subgoal):
 1. of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = of_int ((- 1) ^ k * pochhammer (- int n) k) / of_int (fact k)
[PROOF STEP]
have "\<dots> = (-1)^k * (of_int (pochhammer (- int n) k)) / (of_int (fact k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- 1) ^ k * pochhammer (rat_of_int (- int n)) k / fact k = (- 1) ^ k * rat_of_int (pochhammer (- int n) k) / rat_of_int (fact k)
[PROOF STEP]
by (simp only: of_int_fact pochhammer_of_int)
[PROOF STATE]
proof (state)
this:
(- 1) ^ k * pochhammer (rat_of_int (- int n)) k / fact k = (- 1) ^ k * rat_of_int (pochhammer (- int n) k) / rat_of_int (fact k)

goal (1 subgoal):
 1. of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = of_int ((- 1) ^ k * pochhammer (- int n) k) / of_int (fact k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(- 1) ^ k * pochhammer (rat_of_int (- int n)) k / fact k = (- 1) ^ k * rat_of_int (pochhammer (- int n) k) / rat_of_int (fact k)

goal (1 subgoal):
 1. of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = of_int ((- 1) ^ k * pochhammer (- int n) k) / of_int (fact k)
[PROOF STEP]
have "\<dots> = (of_int ((-1)^k * pochhammer (- int n) k)) / (of_int (fact k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- 1) ^ k * rat_of_int (pochhammer (- int n) k) / rat_of_int (fact k) = rat_of_int ((- 1) ^ k * pochhammer (- int n) k) / rat_of_int (fact k)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(- 1) ^ k * rat_of_int (pochhammer (- int n) k) / rat_of_int (fact k) = rat_of_int ((- 1) ^ k * pochhammer (- int n) k) / rat_of_int (fact k)

goal (1 subgoal):
 1. of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = of_int ((- 1) ^ k * pochhammer (- int n) k) / of_int (fact k)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
rat_of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = rat_of_int ((- 1) ^ k * pochhammer (- int n) k) / rat_of_int (fact k)
[PROOF STEP]
show "of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) =
                    of_int ((- 1) ^ k * pochhammer (- int n) k) / rat_of_int (fact k)"
[PROOF STATE]
proof (prove)
using this:
rat_of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = rat_of_int ((- 1) ^ k * pochhammer (- int n) k) / rat_of_int (fact k)

goal (1 subgoal):
 1. rat_of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = rat_of_int ((- 1) ^ k * pochhammer (- int n) k) / rat_of_int (fact k)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
rat_of_int ((- 1) ^ k * pochhammer (- int n) k div fact k) = rat_of_int ((- 1) ^ k * pochhammer (- int n) k) / rat_of_int (fact k)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
fact k dvd (- 1) ^ k * pochhammer (- int n) k

goal (1 subgoal):
 1. \<not> 0 < a \<Longrightarrow> fact k dvd pochhammer a k
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
fact k dvd (- 1) ^ k * pochhammer (- int n) k

goal (1 subgoal):
 1. fact k dvd pochhammer a k
[PROOF STEP]
unfolding a
[PROOF STATE]
proof (prove)
using this:
fact k dvd (- 1) ^ k * pochhammer (- int n) k

goal (1 subgoal):
 1. fact k dvd pochhammer (- int n) k
[PROOF STEP]
by (metis dvdI dvd_mult_unit_iff' minus_one_mult_self)
[PROOF STATE]
proof (state)
this:
fact k dvd pochhammer a k

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
fact k dvd pochhammer a k

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem E3: "\<turnstile> F \<longrightarrow> \<diamond>F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> F \<longrightarrow> \<diamond>F
[PROOF STEP]
unfolding eventually_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> F \<longrightarrow> \<not> \<box>\<not> F
[PROOF STEP]
by (force dest: ax1[unlift_rule])


[STATEMENT]
lemma obs_consistent_behaviours:
  "\<lbrakk> obs_consistent R pi Sa Sc; bc \<in> beh Sc; ba \<in> beh Sa; (ba, bc) \<in> seq_lift R\<rbrakk>
  \<Longrightarrow> map pi (map (obs Sc) bc) = map (obs Sa) ba"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>obs_consistent R pi Sa Sc; bc \<in> beh Sc; ba \<in> beh Sa; (ba, bc) \<in> seq_lift R\<rbrakk> \<Longrightarrow> map pi (map (obs Sc) bc) = map (obs Sa) ba
[PROOF STEP]
by (erule seq_lift.induct) (auto simp add: obs_consistent_def)


[STATEMENT]
lemma connected_imp_connected_closure: "connected S \<Longrightarrow> connected (closure S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connected S \<Longrightarrow> connected (closure S)
[PROOF STEP]
by (rule connectedI) (meson closure_subset open_Int open_Int_closure_eq_empty subset_trans connectedD)


[STATEMENT]
lemma ttree_restr_is_empty: "carrier t \<inter> S = {} \<Longrightarrow> ttree_restr S t = empty"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. carrier t \<inter> S = {} \<Longrightarrow> ttree_restr S t = TTree.empty
[PROOF STEP]
apply transfer
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>t S. \<lbrakk>[] \<in> t \<and> downset t; \<Union> (set ` t) \<inter> S = {}\<rbrakk> \<Longrightarrow> filter (\<lambda>x'. x' \<in> S) ` t = {[]}
[PROOF STEP]
apply (auto del: iffI )
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>t S xa. \<lbrakk>\<Union> (set ` t) \<inter> S = {}; [] \<in> t; downset t; xa \<in> t\<rbrakk> \<Longrightarrow> filter (\<lambda>x'. x' \<in> S) xa = []
 2. \<And>t S. \<lbrakk>\<Union> (set ` t) \<inter> S = {}; [] \<in> t; downset t\<rbrakk> \<Longrightarrow> [] \<in> filter (\<lambda>x'. x' \<in> S) ` t
[PROOF STEP]
apply (metis SUP_bot_conv(2) SUP_inf inf_commute inter_set_filter set_empty)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>t S. \<lbrakk>\<Union> (set ` t) \<inter> S = {}; [] \<in> t; downset t\<rbrakk> \<Longrightarrow> [] \<in> filter (\<lambda>x'. x' \<in> S) ` t
[PROOF STEP]
apply force
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma countable_vimage: "B \<subseteq> range f \<Longrightarrow> countable (f -` B) \<Longrightarrow> countable B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>B \<subseteq> range f; countable (f -` B)\<rbrakk> \<Longrightarrow> countable B
[PROOF STEP]
by (metis Int_absorb2 countable_image image_vimage_eq)


[STATEMENT]
lemma remove_key_single':
  "remove_key v (Poly_Mapping.single w n) = (if v = w then 0 else Poly_Mapping.single w n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. remove_key v (monomial n w) = (if v = w then 0 else monomial n w)
[PROOF STEP]
by (metis add.right_neutral lookup_single_not_eq remove_key_single remove_key_sum single_zero)


[STATEMENT]
lemma l7_22:
  assumes "Bet A1 C A2" and
    "Bet B1 C B2" and
    "Cong C A1 C B1" and
    "Cong C A2 C B2" and
    "M1 Midpoint A1 B1" and
    "M2 Midpoint A2 B2"
  shows "Bet M1 C M2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Bet M1 C M2
[PROOF STEP]
by (meson assms(1) assms(2) assms(3) assms(4) assms(5) assms(6) between_symmetry l7_22_aux local.le_cases)


[STATEMENT]
lemma rev_path_append[simp]: "rev_path (p @ q) = rev_path q @ rev_path p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rev_path (p @ q) = rev_path q @ rev_path p
[PROOF STEP]
by (induct p) auto


[STATEMENT]
lemma atLeastPlusOneAtMost_greaterThanAtMost_integer: "{l+1..u} = {l<..(u::integer)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {l + 1..u} = {l<..u}
[PROOF STEP]
including integer.lifting
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {l + 1..u} = {l<..u}
[PROOF STEP]
by (auto simp add: atLeastAtMost_def greaterThanAtMost_def, transfer, simp)


[STATEMENT]
lemma bounded_clinear_mult_right: "bounded_clinear (\<lambda>y::'a::complex_normed_algebra. x * y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded_clinear ((*) x)
[PROOF STEP]
using bounded_cbilinear_mult
[PROOF STATE]
proof (prove)
using this:
bounded_cbilinear (*)

goal (1 subgoal):
 1. bounded_clinear ((*) x)
[PROOF STEP]
by (rule bounded_cbilinear.bounded_clinear_right)


[STATEMENT]
lemma discrim_FnCall [simp]: "discrim (FnCall F Xs) = 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. discrim (FnCall F Xs) = 2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. discrim (FnCall F Xs) = 2
[PROOF STEP]
have "discrim (FnCall F (Abs_ExpList Us)) = 2" for Us
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. discrim (FnCall F (Abs_ExpList Us)) = 2
[PROOF STEP]
by (simp add: discrim_def FnCall UN_equiv_class [OF equiv_exprel discrim_respects])
[PROOF STATE]
proof (state)
this:
discrim (FnCall F (Abs_ExpList ?Us)) = 2

goal (1 subgoal):
 1. discrim (FnCall F Xs) = 2
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
discrim (FnCall F (Abs_ExpList ?Us)) = 2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
discrim (FnCall F (Abs_ExpList ?Us)) = 2

goal (1 subgoal):
 1. discrim (FnCall F Xs) = 2
[PROOF STEP]
by (metis ExpList_rep)
[PROOF STATE]
proof (state)
this:
discrim (FnCall F Xs) = 2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in cpx_sq_mat) trace_sum_mat_proj_pos_real:
  fixes f::"'a \<Rightarrow> real"
  assumes "finite I"
  and "\<forall> i\<in> I. projector (P i)"
  and "Complex_Matrix.positive R"
  and "\<forall>i\<in> I. P i \<in> fc_mats"
  and "R \<in> fc_mats"
shows "Complex_Matrix.trace (R * (sum_mat (\<lambda>i. f i \<cdot>\<^sub>m (P i)) I)) =
  Re (Complex_Matrix.trace (R * (sum_mat (\<lambda>i. f i \<cdot>\<^sub>m (P i)) I)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
have sm:  "\<And>x. x \<in> I \<Longrightarrow> Complex_Matrix.trace (f x \<cdot>\<^sub>m (R * P x)) =
    f x * Complex_Matrix.trace (R * P x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> I \<Longrightarrow> Complex_Matrix.trace (complex_of_real (f x) \<cdot>\<^sub>m (R * P x)) = complex_of_real (f x) * Complex_Matrix.trace (R * P x)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> I \<Longrightarrow> Complex_Matrix.trace (complex_of_real (f x) \<cdot>\<^sub>m (R * P x)) = complex_of_real (f x) * Complex_Matrix.trace (R * P x)
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> I \<Longrightarrow> Complex_Matrix.trace (complex_of_real (f x) \<cdot>\<^sub>m (R * P x)) = complex_of_real (f x) * Complex_Matrix.trace (R * P x)
[PROOF STEP]
assume "i\<in> I"
[PROOF STATE]
proof (state)
this:
i \<in> I

goal (1 subgoal):
 1. \<And>x. x \<in> I \<Longrightarrow> Complex_Matrix.trace (complex_of_real (f x) \<cdot>\<^sub>m (R * P x)) = complex_of_real (f x) * Complex_Matrix.trace (R * P x)
[PROOF STEP]
show "Complex_Matrix.trace (f i \<cdot>\<^sub>m (R * P i)) = f i * Complex_Matrix.trace (R * P i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i)) = complex_of_real (f i) * Complex_Matrix.trace (R * P i)
[PROOF STEP]
proof (rule trace_smult)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. R * P i \<in> carrier_mat ?n ?n
[PROOF STEP]
show "R * P i \<in> carrier_mat dimR dimR"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R * P i \<in> carrier_mat dimR dimR
[PROOF STEP]
using assms cpx_sq_mat_mult fc_mats_carrier \<open>i\<in> I\<close>
          dim_eq
[PROOF STATE]
proof (prove)
using this:
finite I
\<forall>i\<in>I. projector (P i)
Complex_Matrix.positive R
\<forall>i\<in>I. P i \<in> fc_mats
R \<in> fc_mats
\<lbrakk>?A \<in> fc_mats; ?B \<in> fc_mats\<rbrakk> \<Longrightarrow> ?A * ?B \<in> fc_mats
fc_mats = carrier_mat dimR dimC
i \<in> I
dimR = dimC

goal (1 subgoal):
 1. R * P i \<in> carrier_mat dimR dimR
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
R * P i \<in> carrier_mat dimR dimR

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i)) = complex_of_real (f i) * Complex_Matrix.trace (R * P i)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?x2 \<in> I \<Longrightarrow> Complex_Matrix.trace (complex_of_real (f ?x2) \<cdot>\<^sub>m (R * P ?x2)) = complex_of_real (f ?x2) * Complex_Matrix.trace (R * P ?x2)

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
have sw: "\<And>x. x \<in> I \<Longrightarrow> R * (f x \<cdot>\<^sub>m P x) = f x \<cdot>\<^sub>m (R * P x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> I \<Longrightarrow> R * (complex_of_real (f x) \<cdot>\<^sub>m P x) = complex_of_real (f x) \<cdot>\<^sub>m (R * P x)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> I \<Longrightarrow> R * (complex_of_real (f x) \<cdot>\<^sub>m P x) = complex_of_real (f x) \<cdot>\<^sub>m (R * P x)
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> I \<Longrightarrow> R * (complex_of_real (f x) \<cdot>\<^sub>m P x) = complex_of_real (f x) \<cdot>\<^sub>m (R * P x)
[PROOF STEP]
assume "i \<in> I"
[PROOF STATE]
proof (state)
this:
i \<in> I

goal (1 subgoal):
 1. \<And>x. x \<in> I \<Longrightarrow> R * (complex_of_real (f x) \<cdot>\<^sub>m P x) = complex_of_real (f x) \<cdot>\<^sub>m (R * P x)
[PROOF STEP]
show "R * (f i \<cdot>\<^sub>m P i) = f i \<cdot>\<^sub>m (R * P i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R * (complex_of_real (f i) \<cdot>\<^sub>m P i) = complex_of_real (f i) \<cdot>\<^sub>m (R * P i)
[PROOF STEP]
proof (rule mult_smult_distrib)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. R \<in> carrier_mat ?nr ?n
 2. P i \<in> carrier_mat ?n ?nc
[PROOF STEP]
show "R\<in> carrier_mat dimR dimR"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R \<in> carrier_mat dimR dimR
[PROOF STEP]
using assms fc_mats_carrier dim_eq
[PROOF STATE]
proof (prove)
using this:
finite I
\<forall>i\<in>I. projector (P i)
Complex_Matrix.positive R
\<forall>i\<in>I. P i \<in> fc_mats
R \<in> fc_mats
fc_mats = carrier_mat dimR dimC
dimR = dimC

goal (1 subgoal):
 1. R \<in> carrier_mat dimR dimR
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
R \<in> carrier_mat dimR dimR

goal (1 subgoal):
 1. P i \<in> carrier_mat dimR ?nc
[PROOF STEP]
show "P i \<in> carrier_mat dimR dimR"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P i \<in> carrier_mat dimR dimR
[PROOF STEP]
using assms \<open>i\<in> I\<close> fc_mats_carrier dim_eq
[PROOF STATE]
proof (prove)
using this:
finite I
\<forall>i\<in>I. projector (P i)
Complex_Matrix.positive R
\<forall>i\<in>I. P i \<in> fc_mats
R \<in> fc_mats
i \<in> I
fc_mats = carrier_mat dimR dimC
dimR = dimC

goal (1 subgoal):
 1. P i \<in> carrier_mat dimR dimR
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P i \<in> carrier_mat dimR dimR

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
R * (complex_of_real (f i) \<cdot>\<^sub>m P i) = complex_of_real (f i) \<cdot>\<^sub>m (R * P i)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?x2 \<in> I \<Longrightarrow> R * (complex_of_real (f ?x2) \<cdot>\<^sub>m P ?x2) = complex_of_real (f ?x2) \<cdot>\<^sub>m (R * P ?x2)

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
have dr: "Complex_Matrix.trace (R * (sum_mat (\<lambda>i. f i \<cdot>\<^sub>m (P i)) I)) =
    Complex_Matrix.trace (sum_mat (\<lambda>i. (R * (f i \<cdot>\<^sub>m (P i)))) I)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = Complex_Matrix.trace (local.sum_mat (\<lambda>i. R * (complex_of_real (f i) \<cdot>\<^sub>m P i)) I)
[PROOF STEP]
using sum_mat_distrib_left[of I] assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite I; ?R \<in> fc_mats; \<And>i. i \<in> I \<Longrightarrow> ?A i \<in> fc_mats\<rbrakk> \<Longrightarrow> local.sum_mat (\<lambda>i. ?R * ?A i) I = ?R * local.sum_mat ?A I
finite I
\<forall>i\<in>I. projector (P i)
Complex_Matrix.positive R
\<forall>i\<in>I. P i \<in> fc_mats
R \<in> fc_mats

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = Complex_Matrix.trace (local.sum_mat (\<lambda>i. R * (complex_of_real (f i) \<cdot>\<^sub>m P i)) I)
[PROOF STEP]
by (simp add: cpx_sq_mat_smult)
[PROOF STATE]
proof (state)
this:
Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = Complex_Matrix.trace (local.sum_mat (\<lambda>i. R * (complex_of_real (f i) \<cdot>\<^sub>m P i)) I)

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = Complex_Matrix.trace (local.sum_mat (\<lambda>i. R * (complex_of_real (f i) \<cdot>\<^sub>m P i)) I)

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
have trs: "... = (\<Sum> i\<in> I. Complex_Matrix.trace (R * (f i \<cdot>\<^sub>m (P i))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Complex_Matrix.trace (local.sum_mat (\<lambda>i. R * (complex_of_real (f i) \<cdot>\<^sub>m P i)) I) = (\<Sum>i\<in>I. Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i)))
[PROOF STEP]
proof (rule trace_sum_mat, (simp add: assms))
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> R * (complex_of_real (f i) \<cdot>\<^sub>m P i) \<in> fc_mats
[PROOF STEP]
show "\<And>i. i \<in> I \<Longrightarrow> R * (f i \<cdot>\<^sub>m P i) \<in> fc_mats"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> R * (complex_of_real (f i) \<cdot>\<^sub>m P i) \<in> fc_mats
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite I
\<forall>i\<in>I. projector (P i)
Complex_Matrix.positive R
\<forall>i\<in>I. P i \<in> fc_mats
R \<in> fc_mats

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> R * (complex_of_real (f i) \<cdot>\<^sub>m P i) \<in> fc_mats
[PROOF STEP]
by (simp add: cpx_sq_mat_smult cpx_sq_mat_mult)
[PROOF STATE]
proof (state)
this:
?i2 \<in> I \<Longrightarrow> R * (complex_of_real (f ?i2) \<cdot>\<^sub>m P ?i2) \<in> fc_mats

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Complex_Matrix.trace (local.sum_mat (\<lambda>i. R * (complex_of_real (f i) \<cdot>\<^sub>m P i)) I) = (\<Sum>i\<in>I. Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i)))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Complex_Matrix.trace (local.sum_mat (\<lambda>i. R * (complex_of_real (f i) \<cdot>\<^sub>m P i)) I) = (\<Sum>i\<in>I. Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i)))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
have "... = (\<Sum> i\<in> I. Complex_Matrix.trace (f i \<cdot>\<^sub>m (R * (P i))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i\<in>I. Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i))) = (\<Sum>i\<in>I. Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i)))
[PROOF STEP]
by (rule sum.cong, (simp add: sw)+)
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>I. Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i))) = (\<Sum>i\<in>I. Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i)))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>I. Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i))) = (\<Sum>i\<in>I. Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i)))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
have "... = (\<Sum> i\<in> I. f i * Complex_Matrix.trace (R * (P i)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i\<in>I. Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i))) = (\<Sum>i\<in>I. complex_of_real (f i) * Complex_Matrix.trace (R * P i))
[PROOF STEP]
by (rule sum.cong, (simp add: sm)+)
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>I. Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i))) = (\<Sum>i\<in>I. complex_of_real (f i) * Complex_Matrix.trace (R * P i))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>I. Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i))) = (\<Sum>i\<in>I. complex_of_real (f i) * Complex_Matrix.trace (R * P i))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
have "... = (\<Sum> i\<in> I. complex_of_real (f i * Re (Complex_Matrix.trace (R * (P i)))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i\<in>I. complex_of_real (f i) * Complex_Matrix.trace (R * P i)) = (\<Sum>i\<in>I. complex_of_real (f i * Re (Complex_Matrix.trace (R * P i))))
[PROOF STEP]
proof (rule sum.cong, simp)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> I \<Longrightarrow> complex_of_real (f x) * Complex_Matrix.trace (R * P x) = complex_of_real (f x * Re (Complex_Matrix.trace (R * P x)))
[PROOF STEP]
show "\<And>x. x \<in> I \<Longrightarrow>
         complex_of_real (f x) * Complex_Matrix.trace (R * P x) =
         complex_of_real (f x * Re (Complex_Matrix.trace (R * P x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> I \<Longrightarrow> complex_of_real (f x) * Complex_Matrix.trace (R * P x) = complex_of_real (f x * Re (Complex_Matrix.trace (R * P x)))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> I \<Longrightarrow> complex_of_real (f x) * Complex_Matrix.trace (R * P x) = complex_of_real (f x * Re (Complex_Matrix.trace (R * P x)))
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> I \<Longrightarrow> complex_of_real (f x) * Complex_Matrix.trace (R * P x) = complex_of_real (f x * Re (Complex_Matrix.trace (R * P x)))
[PROOF STEP]
assume "x\<in> I"
[PROOF STATE]
proof (state)
this:
x \<in> I

goal (1 subgoal):
 1. \<And>x. x \<in> I \<Longrightarrow> complex_of_real (f x) * Complex_Matrix.trace (R * P x) = complex_of_real (f x * Re (Complex_Matrix.trace (R * P x)))
[PROOF STEP]
have "complex_of_real (f x) * Complex_Matrix.trace (R * P x) =
        complex_of_real (f x) * complex_of_real (Re (Complex_Matrix.trace (R * P x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (f x) * Complex_Matrix.trace (R * P x) = complex_of_real (f x) * complex_of_real (Re (Complex_Matrix.trace (R * P x)))
[PROOF STEP]
using assms sum.cong[of I I] fc_mats_carrier trace_proj_pos_real \<open>x \<in> I\<close> dim_eq
[PROOF STATE]
proof (prove)
using this:
finite I
\<forall>i\<in>I. projector (P i)
Complex_Matrix.positive R
\<forall>i\<in>I. P i \<in> fc_mats
R \<in> fc_mats
\<lbrakk>I = I; \<And>x. x \<in> I \<Longrightarrow> ?g x = ?h x\<rbrakk> \<Longrightarrow> sum ?g I = sum ?h I
fc_mats = carrier_mat dimR dimC
\<lbrakk>projector ?P; Complex_Matrix.positive ?R; ?P \<in> carrier_mat ?n ?n; ?R \<in> carrier_mat ?n ?n\<rbrakk> \<Longrightarrow> complex_of_real (Re (Complex_Matrix.trace (?R * ?P))) = Complex_Matrix.trace (?R * ?P)
x \<in> I
dimR = dimC

goal (1 subgoal):
 1. complex_of_real (f x) * Complex_Matrix.trace (R * P x) = complex_of_real (f x) * complex_of_real (Re (Complex_Matrix.trace (R * P x)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
complex_of_real (f x) * Complex_Matrix.trace (R * P x) = complex_of_real (f x) * complex_of_real (Re (Complex_Matrix.trace (R * P x)))

goal (1 subgoal):
 1. \<And>x. x \<in> I \<Longrightarrow> complex_of_real (f x) * Complex_Matrix.trace (R * P x) = complex_of_real (f x * Re (Complex_Matrix.trace (R * P x)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
complex_of_real (f x) * Complex_Matrix.trace (R * P x) = complex_of_real (f x) * complex_of_real (Re (Complex_Matrix.trace (R * P x)))

goal (1 subgoal):
 1. \<And>x. x \<in> I \<Longrightarrow> complex_of_real (f x) * Complex_Matrix.trace (R * P x) = complex_of_real (f x * Re (Complex_Matrix.trace (R * P x)))
[PROOF STEP]
have "... = complex_of_real (f x * Re (Complex_Matrix.trace (R * P x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (f x) * complex_of_real (Re (Complex_Matrix.trace (R * P x))) = complex_of_real (f x * Re (Complex_Matrix.trace (R * P x)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
complex_of_real (f x) * complex_of_real (Re (Complex_Matrix.trace (R * P x))) = complex_of_real (f x * Re (Complex_Matrix.trace (R * P x)))

goal (1 subgoal):
 1. \<And>x. x \<in> I \<Longrightarrow> complex_of_real (f x) * Complex_Matrix.trace (R * P x) = complex_of_real (f x * Re (Complex_Matrix.trace (R * P x)))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
complex_of_real (f x) * Complex_Matrix.trace (R * P x) = complex_of_real (f x * Re (Complex_Matrix.trace (R * P x)))
[PROOF STEP]
show "complex_of_real (f x) * Complex_Matrix.trace (R * P x) =
         complex_of_real (f x * Re (Complex_Matrix.trace (R * P x)))"
[PROOF STATE]
proof (prove)
using this:
complex_of_real (f x) * Complex_Matrix.trace (R * P x) = complex_of_real (f x * Re (Complex_Matrix.trace (R * P x)))

goal (1 subgoal):
 1. complex_of_real (f x) * Complex_Matrix.trace (R * P x) = complex_of_real (f x * Re (Complex_Matrix.trace (R * P x)))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
complex_of_real (f x) * Complex_Matrix.trace (R * P x) = complex_of_real (f x * Re (Complex_Matrix.trace (R * P x)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?x2 \<in> I \<Longrightarrow> complex_of_real (f ?x2) * Complex_Matrix.trace (R * P ?x2) = complex_of_real (f ?x2 * Re (Complex_Matrix.trace (R * P ?x2)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>I. complex_of_real (f i) * Complex_Matrix.trace (R * P i)) = (\<Sum>i\<in>I. complex_of_real (f i * Re (Complex_Matrix.trace (R * P i))))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>I. complex_of_real (f i) * Complex_Matrix.trace (R * P i)) = (\<Sum>i\<in>I. complex_of_real (f i * Re (Complex_Matrix.trace (R * P i))))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
have "... = (\<Sum> i\<in> I. f i * Re (Complex_Matrix.trace (R * (P i))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i\<in>I. complex_of_real (f i * Re (Complex_Matrix.trace (R * P i)))) = complex_of_real (\<Sum>i\<in>I. f i * Re (Complex_Matrix.trace (R * P i)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>I. complex_of_real (f i * Re (Complex_Matrix.trace (R * P i)))) = complex_of_real (\<Sum>i\<in>I. f i * Re (Complex_Matrix.trace (R * P i)))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>I. complex_of_real (f i * Re (Complex_Matrix.trace (R * P i)))) = complex_of_real (\<Sum>i\<in>I. f i * Re (Complex_Matrix.trace (R * P i)))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
have "... = (\<Sum> i\<in> I. Re (Complex_Matrix.trace (f i \<cdot>\<^sub>m (R * (P i)))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (\<Sum>i\<in>I. f i * Re (Complex_Matrix.trace (R * P i))) = complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i))))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. complex_of_real (\<Sum>i\<in>I. f i * Re (Complex_Matrix.trace (R * P i))) = complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i))))
[PROOF STEP]
have "(\<Sum> i\<in> I. f i * Re (Complex_Matrix.trace (R * (P i)))) =
      (\<Sum> i\<in> I. Re (Complex_Matrix.trace (f i \<cdot>\<^sub>m (R * (P i)))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i\<in>I. f i * Re (Complex_Matrix.trace (R * P i))) = (\<Sum>i\<in>I. Re (Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i))))
[PROOF STEP]
by (rule sum.cong, (simp add: sm)+)
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>I. f i * Re (Complex_Matrix.trace (R * P i))) = (\<Sum>i\<in>I. Re (Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i))))

goal (1 subgoal):
 1. complex_of_real (\<Sum>i\<in>I. f i * Re (Complex_Matrix.trace (R * P i))) = complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i))))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>i\<in>I. f i * Re (Complex_Matrix.trace (R * P i))) = (\<Sum>i\<in>I. Re (Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i))))

goal (1 subgoal):
 1. complex_of_real (\<Sum>i\<in>I. f i * Re (Complex_Matrix.trace (R * P i))) = complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
complex_of_real (\<Sum>i\<in>I. f i * Re (Complex_Matrix.trace (R * P i))) = complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i))))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
complex_of_real (\<Sum>i\<in>I. f i * Re (Complex_Matrix.trace (R * P i))) = complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i))))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
complex_of_real (\<Sum>i\<in>I. f i * Re (Complex_Matrix.trace (R * P i))) = complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i))))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
have "... = (\<Sum> i\<in> I. Re (Complex_Matrix.trace (R * (f i \<cdot>\<^sub>m (P i)))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i)))) = complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i))))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i)))) = complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i))))
[PROOF STEP]
have "\<And>i. i \<in> I \<Longrightarrow> f i \<cdot>\<^sub>m (R * (P i)) = R * (f i \<cdot>\<^sub>m (P i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> complex_of_real (f i) \<cdot>\<^sub>m (R * P i) = R * (complex_of_real (f i) \<cdot>\<^sub>m P i)
[PROOF STEP]
using sw
[PROOF STATE]
proof (prove)
using this:
?x2 \<in> I \<Longrightarrow> R * (complex_of_real (f ?x2) \<cdot>\<^sub>m P ?x2) = complex_of_real (f ?x2) \<cdot>\<^sub>m (R * P ?x2)

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> complex_of_real (f i) \<cdot>\<^sub>m (R * P i) = R * (complex_of_real (f i) \<cdot>\<^sub>m P i)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
?i2 \<in> I \<Longrightarrow> complex_of_real (f ?i2) \<cdot>\<^sub>m (R * P ?i2) = R * (complex_of_real (f ?i2) \<cdot>\<^sub>m P ?i2)

goal (1 subgoal):
 1. complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i)))) = complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i))))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
?i2 \<in> I \<Longrightarrow> complex_of_real (f ?i2) \<cdot>\<^sub>m (R * P ?i2) = R * (complex_of_real (f ?i2) \<cdot>\<^sub>m P ?i2)

goal (1 subgoal):
 1. complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i)))) = complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i)))) = complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i))))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i)))) = complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i))))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (complex_of_real (f i) \<cdot>\<^sub>m (R * P i)))) = complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i))))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
have "... = Re (\<Sum> i\<in> I. (Complex_Matrix.trace (R * (f i \<cdot>\<^sub>m (P i)))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i)))) = complex_of_real (Re (\<Sum>i\<in>I. Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i)))) = complex_of_real (Re (\<Sum>i\<in>I. Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i))))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
complex_of_real (\<Sum>i\<in>I. Re (Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i)))) = complex_of_real (Re (\<Sum>i\<in>I. Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i))))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
have "... = Re (Complex_Matrix.trace (sum_mat (\<lambda>i. R * (f i \<cdot>\<^sub>m (P i))) I))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (Re (\<Sum>i\<in>I. Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i)))) = complex_of_real (Re (Complex_Matrix.trace (local.sum_mat (\<lambda>i. R * (complex_of_real (f i) \<cdot>\<^sub>m P i)) I)))
[PROOF STEP]
using trs
[PROOF STATE]
proof (prove)
using this:
Complex_Matrix.trace (local.sum_mat (\<lambda>i. R * (complex_of_real (f i) \<cdot>\<^sub>m P i)) I) = (\<Sum>i\<in>I. Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i)))

goal (1 subgoal):
 1. complex_of_real (Re (\<Sum>i\<in>I. Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i)))) = complex_of_real (Re (Complex_Matrix.trace (local.sum_mat (\<lambda>i. R * (complex_of_real (f i) \<cdot>\<^sub>m P i)) I)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
complex_of_real (Re (\<Sum>i\<in>I. Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i)))) = complex_of_real (Re (Complex_Matrix.trace (local.sum_mat (\<lambda>i. R * (complex_of_real (f i) \<cdot>\<^sub>m P i)) I)))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
complex_of_real (Re (\<Sum>i\<in>I. Complex_Matrix.trace (R * (complex_of_real (f i) \<cdot>\<^sub>m P i)))) = complex_of_real (Re (Complex_Matrix.trace (local.sum_mat (\<lambda>i. R * (complex_of_real (f i) \<cdot>\<^sub>m P i)) I)))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
have "... = Re (Complex_Matrix.trace (R * (sum_mat (\<lambda>i. f i \<cdot>\<^sub>m (P i))) I))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (Re (Complex_Matrix.trace (local.sum_mat (\<lambda>i. R * (complex_of_real (f i) \<cdot>\<^sub>m P i)) I))) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
using dr
[PROOF STATE]
proof (prove)
using this:
Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = Complex_Matrix.trace (local.sum_mat (\<lambda>i. R * (complex_of_real (f i) \<cdot>\<^sub>m P i)) I)

goal (1 subgoal):
 1. complex_of_real (Re (Complex_Matrix.trace (local.sum_mat (\<lambda>i. R * (complex_of_real (f i) \<cdot>\<^sub>m P i)) I))) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
complex_of_real (Re (Complex_Matrix.trace (local.sum_mat (\<lambda>i. R * (complex_of_real (f i) \<cdot>\<^sub>m P i)) I))) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))

goal (1 subgoal):
 1. Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I) = complex_of_real (Re (Complex_Matrix.trace (R * local.sum_mat (\<lambda>i. complex_of_real (f i) \<cdot>\<^sub>m P i) I)))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma rank_array1_iff_pref:  "\<lbrakk> set P = {<length P}; i < length P; j < length P \<rbrakk>
 \<Longrightarrow> rank_array1 P !! i < rank_array1 P !! j \<longleftrightarrow> P \<turnstile> i < j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>set P = {<length P}; i < length P; j < length P\<rbrakk> \<Longrightarrow> (rank_array1 P !! i < rank_array1 P !! j) = (P \<turnstile> i < j)
[PROOF STEP]
by(simp add: rank_array1_def prefers_def nth_rk_of_pref card_distinct)


[STATEMENT]
lemma setdist_singletons [simp]: "setdist {x} {y} = dist x y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. setdist {x} {y} = dist x y
[PROOF STEP]
by (simp add: setdist_def)


[STATEMENT]
lemma cGDERIV_add:
  "\<lbrakk>cGDERIV f x :> df; cGDERIV g x :> dg\<rbrakk>
     \<Longrightarrow> cGDERIV (\<lambda>x. f x + g x) x :> df + dg"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>cGDERIV f x :> df; cGDERIV g x :> dg\<rbrakk> \<Longrightarrow> cGDERIV (\<lambda>x. f x + g x) x :> df + dg
[PROOF STEP]
unfolding cgderiv_def cinner_add_left[THEN ext]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(f has_derivative cinner df) (at x); (g has_derivative cinner dg) (at x)\<rbrakk> \<Longrightarrow> ((\<lambda>x. f x + g x) has_derivative (\<lambda>x. cinner df x + cinner dg x)) (at x)
[PROOF STEP]
by (rule has_derivative_add)


[STATEMENT]
lemma hom_graph_insert_elim:
  assumes "hom_graph f (insert i S) x a" and "i \<notin> S"
  obtains y z b c
  where "x = ifte (var i) y z"
    and "a = ifte (f i) b c"
    and "hom_graph f S y b"
    and "hom_graph f S z c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>y z b c. \<lbrakk>x = ifte (var i) y z; a = ifte (f i) b c; hom_graph f S y b; hom_graph f S z c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using hom_graph_dest [OF assms(1) insertI1]
[PROOF STATE]
proof (prove)
using this:
\<exists>y z b c. x = ifte (var i) y z \<and> a = ifte (f i) b c \<and> hom_graph f (insert i S - {i}) y b \<and> hom_graph f (insert i S - {i}) z c

goal (1 subgoal):
 1. (\<And>y z b c. \<lbrakk>x = ifte (var i) y z; a = ifte (f i) b c; hom_graph f S y b; hom_graph f S z c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (clarify, simp add: assms(2))


[STATEMENT]
lemma (in Ring) ideal_condition:"\<lbrakk>I \<subseteq> carrier R; I \<noteq> {};
       \<forall>x\<in>I. \<forall>y\<in>I. x \<plusminus> (-\<^sub>a y) \<in> I; \<forall>r\<in>carrier R. \<forall>x\<in>I. r \<cdot>\<^sub>r x \<in> I \<rbrakk> \<Longrightarrow>
                                   ideal R I"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>I \<subseteq> carrier R; I \<noteq> {}; \<forall>x\<in>I. \<forall>y\<in>I. x \<plusminus> -\<^sub>a y \<in> I; \<forall>r\<in>carrier R. \<forall>x\<in>I. r \<cdot>\<^sub>r x \<in> I\<rbrakk> \<Longrightarrow> ideal R I
[PROOF STEP]
apply (simp add:ideal_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>I \<subseteq> carrier R; I \<noteq> {}; \<forall>x\<in>I. \<forall>y\<in>I. x \<plusminus> -\<^sub>a y \<in> I; \<forall>r\<in>carrier R. \<forall>x\<in>I. r \<cdot>\<^sub>r x \<in> I\<rbrakk> \<Longrightarrow> R +> I
[PROOF STEP]
apply (cut_tac ring_is_ag)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>I \<subseteq> carrier R; I \<noteq> {}; \<forall>x\<in>I. \<forall>y\<in>I. x \<plusminus> -\<^sub>a y \<in> I; \<forall>r\<in>carrier R. \<forall>x\<in>I. r \<cdot>\<^sub>r x \<in> I; aGroup R\<rbrakk> \<Longrightarrow> R +> I
[PROOF STEP]
apply (rule aGroup.asubg_test[of "R" "I"], assumption+)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma inv_num_wtn_shift_summable:
  assumes "E \<in> sets M"
    and "\<bar>\<mu> E\<bar> < \<infinity>"
  shows "summable (\<lambda>n. 1/(num_wtn E n - 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. summable (\<lambda>n. 1 / real (num_wtn E n - 1))
[PROOF STEP]
proof (rule sum_shift_denum)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. summable (\<lambda>n. 1 / real (num_wtn E n))
[PROOF STEP]
show "summable (\<lambda>n. 1 / real (num_wtn E n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. summable (\<lambda>n. 1 / real (num_wtn E n))
[PROOF STEP]
using assms inv_num_wtn_summable
[PROOF STATE]
proof (prove)
using this:
E \<in> sets M
\<bar>\<mu> E\<bar> < \<infinity>
\<lbrakk>?E \<in> sets M; \<bar>\<mu> ?E\<bar> < \<infinity>\<rbrakk> \<Longrightarrow> summable (\<lambda>n. 1 / real (num_wtn ?E n))

goal (1 subgoal):
 1. summable (\<lambda>n. 1 / real (num_wtn E n))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
summable (\<lambda>n. 1 / real (num_wtn E n))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in infinite_cts_filtration) stream_space_singleI:
  assumes "\<exists>U. U\<in> sets (stream_space borel) \<and> U\<inter> (range X) = {r}"
  shows "stream_space_single X r \<in> sets (stream_space borel) \<and> stream_space_single X r \<inter> (range X) = {r}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. stream_space_single X r \<in> sets (stream_space borel) \<and> stream_space_single X r \<inter> range X = {r}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. stream_space_single X r \<in> sets (stream_space borel) \<and> stream_space_single X r \<inter> range X = {r}
[PROOF STEP]
let ?V = "SOME U. U\<in> sets (stream_space borel) \<and> U\<inter> (range X) = {r}"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. stream_space_single X r \<in> sets (stream_space borel) \<and> stream_space_single X r \<inter> range X = {r}
[PROOF STEP]
have vprop: "?V\<in> sets (stream_space borel) \<and> ?V \<inter> (range X) = {r}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (SOME U. U \<in> sets (stream_space borel) \<and> U \<inter> range X = {r}) \<in> sets (stream_space borel) \<and> (SOME U. U \<in> sets (stream_space borel) \<and> U \<inter> range X = {r}) \<inter> range X = {r}
[PROOF STEP]
using someI_ex[of "\<lambda>U. U\<in> sets (stream_space borel) \<and> U\<inter> (range X) = {r}"]
    assms
[PROOF STATE]
proof (prove)
using this:
\<exists>x. x \<in> sets (stream_space borel) \<and> x \<inter> range X = {r} \<Longrightarrow> (SOME x. x \<in> sets (stream_space borel) \<and> x \<inter> range X = {r}) \<in> sets (stream_space borel) \<and> (SOME x. x \<in> sets (stream_space borel) \<and> x \<inter> range X = {r}) \<inter> range X = {r}
\<exists>U. U \<in> sets (stream_space borel) \<and> U \<inter> range X = {r}

goal (1 subgoal):
 1. (SOME U. U \<in> sets (stream_space borel) \<and> U \<inter> range X = {r}) \<in> sets (stream_space borel) \<and> (SOME U. U \<in> sets (stream_space borel) \<and> U \<inter> range X = {r}) \<inter> range X = {r}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(SOME U. U \<in> sets (stream_space borel) \<and> U \<inter> range X = {r}) \<in> sets (stream_space borel) \<and> (SOME U. U \<in> sets (stream_space borel) \<and> U \<inter> range X = {r}) \<inter> range X = {r}

goal (1 subgoal):
 1. stream_space_single X r \<in> sets (stream_space borel) \<and> stream_space_single X r \<inter> range X = {r}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. stream_space_single X r \<in> sets (stream_space borel) \<and> stream_space_single X r \<inter> range X = {r}
[PROOF STEP]
by (simp add:stream_space_single_def vprop assms)
[PROOF STATE]
proof (state)
this:
stream_space_single X r \<in> sets (stream_space borel) \<and> stream_space_single X r \<inter> range X = {r}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma distinct_all_bool_lists : "distinct (all_bool_lists x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct (all_bool_lists x)
[PROOF STEP]
by (induct x) (auto simp add: distinct_concat_aux)


[STATEMENT]
lemma UINF_conj_UINF [simp]:
  "((\<Sqinter> i\<in>I \<bullet> P(i)) \<or> (\<Sqinter> i\<in>I \<bullet> Q(i))) = (\<Sqinter> i\<in>I \<bullet> P(i) \<or> Q(i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<Sqinter> i \<in> I \<bullet> P i) \<or> (\<Sqinter> i \<in> I \<bullet> Q i)) = (\<Sqinter> i \<in> I \<bullet> P i \<or> Q i)
[PROOF STEP]
by (rel_auto)


[STATEMENT]
lemma eq_join[simp]: "eq (a \<squnion> a') v1 v2 \<longleftrightarrow> eq a v1 v2 \<and> eq a' v1 v2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eq (a \<squnion> a') v1 v2 = (eq a v1 v2 \<and> eq a' v1 v2)
[PROOF STEP]
using Arity_total[of a a']
[PROOF STATE]
proof (prove)
using this:
a \<sqsubseteq> a' \<or> a' \<sqsubseteq> a

goal (1 subgoal):
 1. eq (a \<squnion> a') v1 v2 = (eq a v1 v2 \<and> eq a' v1 v2)
[PROOF STEP]
apply (auto elim!: eq_mono[OF join_above1] eq_mono[OF join_above2])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>a \<sqsubseteq> a'; eq a v1 v2; eq a' v1 v2\<rbrakk> \<Longrightarrow> eq (a \<squnion> a') v1 v2
 2. \<lbrakk>a' \<sqsubseteq> a; eq a v1 v2; eq a' v1 v2\<rbrakk> \<Longrightarrow> eq (a \<squnion> a') v1 v2
[PROOF STEP]
apply (metis join_self_below(2))
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a' \<sqsubseteq> a; eq a v1 v2; eq a' v1 v2\<rbrakk> \<Longrightarrow> eq (a \<squnion> a') v1 v2
[PROOF STEP]
apply (metis join_self_below(1))
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma gcd_integer_code[code]:
"gcd_integer l k = \<bar>if l = (0::integer) then k else gcd_integer l (\<bar>k\<bar> mod \<bar>l\<bar>)\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. gcd_integer l k = \<bar>if l = 0 then k else gcd_integer l (\<bar>k\<bar> mod \<bar>l\<bar>)\<bar>
[PROOF STEP]
apply (transfer)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l k. gcd l k = \<bar>if l = 0 then k else gcd l (\<bar>k\<bar> mod \<bar>l\<bar>)\<bar>
[PROOF STEP]
using gcd_code_int
[PROOF STATE]
proof (prove)
using this:
gcd ?k ?l = \<bar>if ?l = 0 then ?k else gcd ?l (\<bar>?k\<bar> mod \<bar>?l\<bar>)\<bar>

goal (1 subgoal):
 1. \<And>l k. gcd l k = \<bar>if l = 0 then k else gcd l (\<bar>k\<bar> mod \<bar>l\<bar>)\<bar>
[PROOF STEP]
by (metis gcd.commute)


[STATEMENT]
lemma basis_expansion: "sum (\<lambda>i. (x$i) *s axis i 1) UNIV = (x::('a::ring_1) ^'n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i\<in>UNIV. x $ i *s axis i (1::'a)) = x
[PROOF STEP]
by (auto simp add: axis_def vec_eq_iff if_distrib sum.If_cases cong del: if_weak_cong)


[STATEMENT]
lemma expands_to_power_0:
  assumes "eventually (\<lambda>x. f x = 0) at_top" "basis_wf basis"
          "length basis = expansion_level TYPE('a :: multiseries)" "n \<equiv> n"
  shows   "((\<lambda>x. f x ^ n) expands_to (const_expansion (0 ^ n) :: 'a)) basis"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. f x ^ n) expands_to const_expansion (0 ^ n)) basis
[PROOF STEP]
by (rule expands_to_cong[OF expands_to_const]) (insert assms, auto elim: eventually_mono)


[STATEMENT]
lemma le_step_down_nat:"\<lbrakk>(i::nat) \<le> n; i = n \<longrightarrow> P; i \<le> n - 1 \<longrightarrow> P\<rbrakk> \<Longrightarrow> P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i \<le> n; i = n \<longrightarrow> P; i \<le> n - 1 \<longrightarrow> P\<rbrakk> \<Longrightarrow> P
[PROOF STEP]
by arith


[STATEMENT]
lemma sub_mod_div_eq_div: "((n::nat) - n mod m) div m = n div m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (n - n mod m) div m = n div m
[PROOF STEP]
apply (case_tac "m = 0", simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m \<noteq> 0 \<Longrightarrow> (n - n mod m) div m = n div m
[PROOF STEP]
apply (simp add: minus_mod_eq_mult_div)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma poly_eval_one [simp]: "poly_eval a 1 = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly_eval a 1 = (1::'a)
[PROOF STEP]
by (simp add: poly_eval_def lookup_one)


[STATEMENT]
lemma listrel_sym: "sym r \<Longrightarrow> sym (listrel r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sym r \<Longrightarrow> sym (listrel r)
[PROOF STEP]
by (simp add: listrel_iff_nth sym_def)


[STATEMENT]
lemma symevalb_and: assumes "symevalb P e1 v1" "symevalb P e2 v2"
  shows "symevalb P (And e1 e2) (v1 \<and> v2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. symevalb P (And e1 e2) (v1 \<and> v2)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
symevalb P e1 v1
symevalb P e2 v2

goal (1 subgoal):
 1. symevalb P (And e1 e2) (v1 \<and> v2)
[PROOF STEP]
unfolding symevalb_def
[PROOF STATE]
proof (prove)
using this:
\<forall>s n. P (s, n) \<longrightarrow> pbval' e1 s = Some v1
\<forall>s n. P (s, n) \<longrightarrow> pbval' e2 s = Some v2

goal (1 subgoal):
 1. \<forall>s n. P (s, n) \<longrightarrow> pbval' (And e1 e2) s = Some (v1 \<and> v2)
[PROOF STEP]
by auto


[STATEMENT]
lemma icard_infinite_conv: "(icard A = \<infinity>) = infinite A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (icard A = \<infinity>) = infinite A
[PROOF STEP]
by (case_tac "finite A", simp_all add: icard_def)


[STATEMENT]
lemma powr_numeral [simp]: "0 \<le> x \<Longrightarrow> x powr (numeral n :: real) = x ^ (numeral n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> x \<Longrightarrow> x powr numeral n = x ^ numeral n
[PROOF STEP]
by (metis less_le power_zero_numeral powr_0 of_nat_numeral powr_realpow)


[STATEMENT]
lemma gfp_trans_upperbound:
  "\<lbrakk> le_utrans t (T t); \<And>P. unitary P \<Longrightarrow> unitary (t P) \<rbrakk> \<Longrightarrow> le_utrans t (gfp_trans T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>le_utrans t (T t); \<And>P. unitary P \<Longrightarrow> unitary (t P)\<rbrakk> \<Longrightarrow> le_utrans t (gfp_trans T)
[PROOF STEP]
unfolding gfp_trans_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>le_utrans t (T t); \<And>P. unitary P \<Longrightarrow> unitary (t P)\<rbrakk> \<Longrightarrow> le_utrans t (Sup_trans {t. (\<forall>P. unitary P \<longrightarrow> unitary (t P)) \<and> le_utrans t (T t)})
[PROOF STEP]
by(auto intro:Sup_trans_upper)


[STATEMENT]
lemma apply_cltn2_preserve_set_Col:
  assumes "proj2_set_Col S"
  shows "proj2_set_Col {apply_cltn2 p C | p. p \<in> S}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. proj2_set_Col {apply_cltn2 p C |p. p \<in> S}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. proj2_set_Col {apply_cltn2 p C |p. p \<in> S}
[PROOF STEP]
from \<open>proj2_set_Col S\<close>
[PROOF STATE]
proof (chain)
picking this:
proj2_set_Col S
[PROOF STEP]
obtain l where "\<forall> p\<in>S. proj2_incident p l"
[PROOF STATE]
proof (prove)
using this:
proj2_set_Col S

goal (1 subgoal):
 1. (\<And>l. \<forall>p\<in>S. proj2_incident p l \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding proj2_set_Col_def
[PROOF STATE]
proof (prove)
using this:
\<exists>l. \<forall>p\<in>S. proj2_incident p l

goal (1 subgoal):
 1. (\<And>l. \<forall>p\<in>S. proj2_incident p l \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<forall>p\<in>S. proj2_incident p l

goal (1 subgoal):
 1. proj2_set_Col {apply_cltn2 p C |p. p \<in> S}
[PROOF STEP]
hence "\<forall> q \<in> {apply_cltn2 p C | p. p \<in> S}.
    proj2_incident q (apply_cltn2_line l C)"
[PROOF STATE]
proof (prove)
using this:
\<forall>p\<in>S. proj2_incident p l

goal (1 subgoal):
 1. \<forall>q\<in>{apply_cltn2 p C |p. p \<in> S}. proj2_incident q (apply_cltn2_line l C)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>q\<in>{apply_cltn2 p C |p. p \<in> S}. proj2_incident q (apply_cltn2_line l C)

goal (1 subgoal):
 1. proj2_set_Col {apply_cltn2 p C |p. p \<in> S}
[PROOF STEP]
thus "proj2_set_Col {apply_cltn2 p C | p. p \<in> S}"
[PROOF STATE]
proof (prove)
using this:
\<forall>q\<in>{apply_cltn2 p C |p. p \<in> S}. proj2_incident q (apply_cltn2_line l C)

goal (1 subgoal):
 1. proj2_set_Col {apply_cltn2 p C |p. p \<in> S}
[PROOF STEP]
unfolding proj2_set_Col_def
[PROOF STATE]
proof (prove)
using this:
\<forall>q\<in>{apply_cltn2 p C |p. p \<in> S}. proj2_incident q (apply_cltn2_line l C)

goal (1 subgoal):
 1. \<exists>l. \<forall>p\<in>{apply_cltn2 p C |p. p \<in> S}. proj2_incident p l
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
proj2_set_Col {apply_cltn2 p C |p. p \<in> S}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma norm_Proj_apply: \<open>norm (Proj T *\<^sub>V \<psi>) = norm \<psi> \<longleftrightarrow> \<psi> \<in> space_as_set T\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (norm (Proj T *\<^sub>V \<psi>) = norm \<psi>) = (\<psi> \<in> space_as_set T)
[PROOF STEP]
proof (rule iffI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. norm (Proj T *\<^sub>V \<psi>) = norm \<psi> \<Longrightarrow> \<psi> \<in> space_as_set T
 2. \<psi> \<in> space_as_set T \<Longrightarrow> norm (Proj T *\<^sub>V \<psi>) = norm \<psi>
[PROOF STEP]
show \<open>norm (Proj T *\<^sub>V \<psi>) = norm \<psi>\<close> if \<open>\<psi> \<in> space_as_set T\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (Proj T *\<^sub>V \<psi>) = norm \<psi>
[PROOF STEP]
by (simp add: Proj_fixes_image that)
[PROOF STATE]
proof (state)
this:
\<psi> \<in> space_as_set T \<Longrightarrow> norm (Proj T *\<^sub>V \<psi>) = norm \<psi>

goal (1 subgoal):
 1. norm (Proj T *\<^sub>V \<psi>) = norm \<psi> \<Longrightarrow> \<psi> \<in> space_as_set T
[PROOF STEP]
assume assm: \<open>norm (Proj T *\<^sub>V \<psi>) = norm \<psi>\<close>
[PROOF STATE]
proof (state)
this:
norm (Proj T *\<^sub>V \<psi>) = norm \<psi>

goal (1 subgoal):
 1. norm (Proj T *\<^sub>V \<psi>) = norm \<psi> \<Longrightarrow> \<psi> \<in> space_as_set T
[PROOF STEP]
have \<psi>_decomp: \<open>\<psi> = Proj T \<psi> + Proj (-T) \<psi>\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<psi> = Proj T *\<^sub>V \<psi> + Proj (- T) *\<^sub>V \<psi>
[PROOF STEP]
by (simp add: Proj_ortho_compl cblinfun.real.diff_left)
[PROOF STATE]
proof (state)
this:
\<psi> = Proj T *\<^sub>V \<psi> + Proj (- T) *\<^sub>V \<psi>

goal (1 subgoal):
 1. norm (Proj T *\<^sub>V \<psi>) = norm \<psi> \<Longrightarrow> \<psi> \<in> space_as_set T
[PROOF STEP]
have \<open>(norm (Proj (-T) \<psi>))\<^sup>2 = (norm (Proj T \<psi>))\<^sup>2 + (norm (Proj (-T) \<psi>))\<^sup>2 - (norm (Proj T \<psi>))\<^sup>2\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (norm (Proj (- T) *\<^sub>V \<psi>))\<^sup>2 = (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 + (norm (Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(norm (Proj (- T) *\<^sub>V \<psi>))\<^sup>2 = (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 + (norm (Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2

goal (1 subgoal):
 1. norm (Proj T *\<^sub>V \<psi>) = norm \<psi> \<Longrightarrow> \<psi> \<in> space_as_set T
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(norm (Proj (- T) *\<^sub>V \<psi>))\<^sup>2 = (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 + (norm (Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2

goal (1 subgoal):
 1. norm (Proj T *\<^sub>V \<psi>) = norm \<psi> \<Longrightarrow> \<psi> \<in> space_as_set T
[PROOF STEP]
have \<open>\<dots> = (norm (Proj T \<psi> + Proj (-T) \<psi>))\<^sup>2 - (norm (Proj T \<psi>))\<^sup>2\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 + (norm (Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 = (norm (Proj T *\<^sub>V \<psi> + Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2
[PROOF STEP]
apply (subst pythagorean_theorem)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. is_orthogonal (Proj T *\<^sub>V \<psi>) (Proj (- T) *\<^sub>V \<psi>)
 2. (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 + (norm (Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 = (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 + (norm (Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2
[PROOF STEP]
apply (metis (no_types, lifting) Proj_idempotent \<psi>_decomp add_cancel_right_left adj_Proj cblinfun.real.add_right cblinfun_apply_cblinfun_compose cinner_adj_left cinner_zero_left)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 + (norm (Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 = (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 + (norm (Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(norm (Proj T *\<^sub>V \<psi>))\<^sup>2 + (norm (Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 = (norm (Proj T *\<^sub>V \<psi> + Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2

goal (1 subgoal):
 1. norm (Proj T *\<^sub>V \<psi>) = norm \<psi> \<Longrightarrow> \<psi> \<in> space_as_set T
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(norm (Proj T *\<^sub>V \<psi>))\<^sup>2 + (norm (Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 = (norm (Proj T *\<^sub>V \<psi> + Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2

goal (1 subgoal):
 1. norm (Proj T *\<^sub>V \<psi>) = norm \<psi> \<Longrightarrow> \<psi> \<in> space_as_set T
[PROOF STEP]
with \<psi>_decomp
[PROOF STATE]
proof (chain)
picking this:
\<psi> = Proj T *\<^sub>V \<psi> + Proj (- T) *\<^sub>V \<psi>
(norm (Proj T *\<^sub>V \<psi>))\<^sup>2 + (norm (Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 = (norm (Proj T *\<^sub>V \<psi> + Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2
[PROOF STEP]
have \<open>\<dots> = (norm \<psi>)\<^sup>2 - (norm (Proj T \<psi>))\<^sup>2\<close>
[PROOF STATE]
proof (prove)
using this:
\<psi> = Proj T *\<^sub>V \<psi> + Proj (- T) *\<^sub>V \<psi>
(norm (Proj T *\<^sub>V \<psi>))\<^sup>2 + (norm (Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 = (norm (Proj T *\<^sub>V \<psi> + Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2

goal (1 subgoal):
 1. (norm (Proj T *\<^sub>V \<psi> + Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 = (norm \<psi>)\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
(norm (Proj T *\<^sub>V \<psi> + Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 = (norm \<psi>)\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2

goal (1 subgoal):
 1. norm (Proj T *\<^sub>V \<psi>) = norm \<psi> \<Longrightarrow> \<psi> \<in> space_as_set T
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(norm (Proj T *\<^sub>V \<psi> + Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 = (norm \<psi>)\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2

goal (1 subgoal):
 1. norm (Proj T *\<^sub>V \<psi>) = norm \<psi> \<Longrightarrow> \<psi> \<in> space_as_set T
[PROOF STEP]
with assm
[PROOF STATE]
proof (chain)
picking this:
norm (Proj T *\<^sub>V \<psi>) = norm \<psi>
(norm (Proj T *\<^sub>V \<psi> + Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 = (norm \<psi>)\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2
[PROOF STEP]
have \<open>\<dots> = 0\<close>
[PROOF STATE]
proof (prove)
using this:
norm (Proj T *\<^sub>V \<psi>) = norm \<psi>
(norm (Proj T *\<^sub>V \<psi> + Proj (- T) *\<^sub>V \<psi>))\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 = (norm \<psi>)\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2

goal (1 subgoal):
 1. (norm \<psi>)\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 = 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(norm \<psi>)\<^sup>2 - (norm (Proj T *\<^sub>V \<psi>))\<^sup>2 = 0

goal (1 subgoal):
 1. norm (Proj T *\<^sub>V \<psi>) = norm \<psi> \<Longrightarrow> \<psi> \<in> space_as_set T
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(norm (Proj (- T) *\<^sub>V \<psi>))\<^sup>2 = 0
[PROOF STEP]
have \<open>norm (Proj (-T) \<psi>) = 0\<close>
[PROOF STATE]
proof (prove)
using this:
(norm (Proj (- T) *\<^sub>V \<psi>))\<^sup>2 = 0

goal (1 subgoal):
 1. norm (Proj (- T) *\<^sub>V \<psi>) = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
norm (Proj (- T) *\<^sub>V \<psi>) = 0

goal (1 subgoal):
 1. norm (Proj T *\<^sub>V \<psi>) = norm \<psi> \<Longrightarrow> \<psi> \<in> space_as_set T
[PROOF STEP]
with \<psi>_decomp
[PROOF STATE]
proof (chain)
picking this:
\<psi> = Proj T *\<^sub>V \<psi> + Proj (- T) *\<^sub>V \<psi>
norm (Proj (- T) *\<^sub>V \<psi>) = 0
[PROOF STEP]
have \<open>\<psi> = Proj T \<psi>\<close>
[PROOF STATE]
proof (prove)
using this:
\<psi> = Proj T *\<^sub>V \<psi> + Proj (- T) *\<^sub>V \<psi>
norm (Proj (- T) *\<^sub>V \<psi>) = 0

goal (1 subgoal):
 1. \<psi> = Proj T *\<^sub>V \<psi>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<psi> = Proj T *\<^sub>V \<psi>

goal (1 subgoal):
 1. norm (Proj T *\<^sub>V \<psi>) = norm \<psi> \<Longrightarrow> \<psi> \<in> space_as_set T
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<psi> = Proj T *\<^sub>V \<psi>
[PROOF STEP]
show \<open>\<psi> \<in> space_as_set T\<close>
[PROOF STATE]
proof (prove)
using this:
\<psi> = Proj T *\<^sub>V \<psi>

goal (1 subgoal):
 1. \<psi> \<in> space_as_set T
[PROOF STEP]
by (metis Proj_range cblinfun_apply_in_image)
[PROOF STATE]
proof (state)
this:
\<psi> \<in> space_as_set T

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma uncurry_preserves_morphisms:
  assumes "f \<in> X \<rightarrow>\<^sub>Q exp_qbs Y Z"
  shows "case_prod f \<in> X \<Otimes>\<^sub>Q Y \<rightarrow>\<^sub>Q Z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>(x, y). f x y) \<in> X \<Otimes>\<^sub>Q Y \<rightarrow>\<^sub>Q Z
[PROOF STEP]
by(rule qbs_morphismE(2)[OF uncurry_morphism,simplified,OF assms])


[STATEMENT]
lemma numbers_of_marks_replicate_True [simp]:
  "numbers_of_marks n (replicate m True) = {n..<n+m}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. numbers_of_marks n (replicate m True) = {n..<n + m}
[PROOF STEP]
by (auto simp add: numbers_of_marks_def enumerate_replicate_eq image_def)


[STATEMENT]
lemma t_star_contr: "t_prod (t_star X) Y = (\<Union>n. t_prod (trace_dioid.power X n) Y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t_prod (t_star X) Y = (\<Union>n. t_prod (trace_dioid.power X n) Y)
[PROOF STEP]
by (auto simp add: t_star_elim t_prod_def)


[STATEMENT]
lemma inter_comm_line_line_comm:
  assumes "C \<noteq> D" and "line A B \<noteq> line C D"
  shows "inter (line A B) (line C D) = inter (line D C) (line A B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.inter (line A B) (line C D) = local.inter (line D C) (line A B)
[PROOF STEP]
by (metis inter_comm line_comm)


[STATEMENT]
lemma sb_inc_lem': "a < - (2^k) \<Longrightarrow> a + 2^k + 2^(Suc k) \<le> (a + 2^k) mod 2^(Suc k)"
  for a :: int
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a < - (2 ^ k) \<Longrightarrow> a + 2 ^ k + 2 ^ Suc k \<le> (a + 2 ^ k) mod 2 ^ Suc k
[PROOF STEP]
by (rule sb_inc_lem) simp


[STATEMENT]
lemma edom_empty_iff_bot: "edom m = {} \<longleftrightarrow> m = \<bottom>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (edom m = {}) = (m = \<bottom>)
[PROOF STEP]
by (metis below_bottom_iff bot_edom edomIff empty_iff fun_belowI)


[STATEMENT]
lemma list_incr_nth_diff: "i < length x \<Longrightarrow> list_incr j x!i - x!i = (if i = j then 1 else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i < length x \<Longrightarrow> list_incr j x ! i - x ! i = (if i = j then 1 else 0)
[PROOF STEP]
by (simp add: list_incr_def)


[STATEMENT]
lemma ivt_decreasing_component_1:
  fixes f :: "real \<Rightarrow> 'a::euclidean_space"
  shows "a \<le> b \<Longrightarrow> \<forall>x\<in>{a..b}. continuous (at x) f \<Longrightarrow>
    f b\<bullet>k \<le> y \<Longrightarrow> y \<le> f a\<bullet>k \<Longrightarrow> \<exists>x\<in>{a..b}. (f x)\<bullet>k = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<le> b; \<forall>x\<in>{a..b}. isCont f x; f b \<bullet> k \<le> y; y \<le> f a \<bullet> k\<rbrakk> \<Longrightarrow> \<exists>x\<in>{a..b}. f x \<bullet> k = y
[PROOF STEP]
by (rule ivt_decreasing_component_on_1) (auto simp: continuous_at_imp_continuous_on)


[STATEMENT]
lemma UP_l_distr:
  assumes R: "p \<in> carrier P" "q \<in> carrier P" "r \<in> carrier P"
  shows "(p \<oplus>\<^bsub>P\<^esub> q) \<otimes>\<^bsub>P\<^esub> r = (p \<otimes>\<^bsub>P\<^esub> r) \<oplus>\<^bsub>P\<^esub> (q \<otimes>\<^bsub>P\<^esub> r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (p \<oplus>\<^bsub>P\<^esub> q) \<otimes>\<^bsub>P\<^esub> r = p \<otimes>\<^bsub>P\<^esub> r \<oplus>\<^bsub>P\<^esub> q \<otimes>\<^bsub>P\<^esub> r
[PROOF STEP]
by (rule up_eqI) (simp add: l_distr R Pi_def, simp_all add: R)


[STATEMENT]
lemma inj_on_powreal:
   "0 < a \<Longrightarrow> a \<noteq> 1 \<Longrightarrow> inj_on (\<lambda>x. a pow\<^sub>\<real> x) UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < a; a \<noteq> 1\<rbrakk> \<Longrightarrow> inj ((pow\<^sub>\<real>) a)
[PROOF STEP]
by (auto simp add: inj_on_def)