[STATEMENT]
lemma
  assumes h_mem: "h \<in> carrier \<G>"
    and a_mem: "a \<in> carrier \<G>"
    and a: "\<^bold>g [^] fst z \<otimes> g' [^] snd z = a \<otimes> h [^] e"
    and a': "\<^bold>g [^] fst z' \<otimes> g' [^] snd z' = a \<otimes> h [^] e'"
    and e_e'_mod: "e' mod order \<G> < e mod order \<G>"
  shows "h = \<^bold>g [^] ((int (fst z) - int (fst z')) * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>))
              \<otimes> g' [^] ((int (snd z) - int (snd z')) * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
have gcd: "gcd ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. gcd ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) = 1
[PROOF STEP]
using prime_field
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>prime ?q; ?a < ?q; ?a \<noteq> 0\<rbrakk> \<Longrightarrow> coprime ?a ?q

goal (1 subgoal):
 1. gcd ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) = 1
[PROOF STEP]
by (simp add: assms less_imp_diff_less linorder_not_le prime_order)
[PROOF STATE]
proof (state)
this:
gcd ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) = 1

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
have "\<^bold>g [^] fst z \<otimes> g' [^] snd z \<otimes> inv (h [^] e) = a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<^bold>g [^] fst z \<otimes> g' [^] snd z \<otimes> inv (h [^] e) = a
[PROOF STEP]
using a h_mem a_mem
[PROOF STATE]
proof (prove)
using this:
\<^bold>g [^] fst z \<otimes> g' [^] snd z = a \<otimes> h [^] e
h \<in> carrier \<G>
a \<in> carrier \<G>

goal (1 subgoal):
 1. \<^bold>g [^] fst z \<otimes> g' [^] snd z \<otimes> inv (h [^] e) = a
[PROOF STEP]
by (simp add: inv_solve_right')
[PROOF STATE]
proof (state)
this:
\<^bold>g [^] fst z \<otimes> g' [^] snd z \<otimes> inv (h [^] e) = a

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<^bold>g [^] fst z \<otimes> g' [^] snd z \<otimes> inv (h [^] e) = a

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
have "\<^bold>g [^] fst z' \<otimes> g' [^] snd z' \<otimes> inv (h [^] e') = a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<^bold>g [^] fst z' \<otimes> g' [^] snd z' \<otimes> inv (h [^] e') = a
[PROOF STEP]
using a h_mem a_mem
[PROOF STATE]
proof (prove)
using this:
\<^bold>g [^] fst z \<otimes> g' [^] snd z = a \<otimes> h [^] e
h \<in> carrier \<G>
a \<in> carrier \<G>

goal (1 subgoal):
 1. \<^bold>g [^] fst z' \<otimes> g' [^] snd z' \<otimes> inv (h [^] e') = a
[PROOF STEP]
by (simp add: assms(4) inv_solve_right')
[PROOF STATE]
proof (state)
this:
\<^bold>g [^] fst z' \<otimes> g' [^] snd z' \<otimes> inv (h [^] e') = a

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<^bold>g [^] fst z \<otimes> g' [^] snd z \<otimes> inv (h [^] e) = a
\<^bold>g [^] fst z' \<otimes> g' [^] snd z' \<otimes> inv (h [^] e') = a
[PROOF STEP]
have "\<^bold>g [^] fst z \<otimes> \<^bold>g [^] (x * snd z) \<otimes> inv (h [^] e) = \<^bold>g [^] fst z' \<otimes> \<^bold>g [^] (x * snd z') \<otimes> inv (h [^] e')"
[PROOF STATE]
proof (prove)
using this:
\<^bold>g [^] fst z \<otimes> g' [^] snd z \<otimes> inv (h [^] e) = a
\<^bold>g [^] fst z' \<otimes> g' [^] snd z' \<otimes> inv (h [^] e') = a

goal (1 subgoal):
 1. \<^bold>g [^] fst z \<otimes> \<^bold>g [^] (x * snd z) \<otimes> inv (h [^] e) = \<^bold>g [^] fst z' \<otimes> \<^bold>g [^] (x * snd z') \<otimes> inv (h [^] e')
[PROOF STEP]
using g'_def
[PROOF STATE]
proof (prove)
using this:
\<^bold>g [^] fst z \<otimes> g' [^] snd z \<otimes> inv (h [^] e) = a
\<^bold>g [^] fst z' \<otimes> g' [^] snd z' \<otimes> inv (h [^] e') = a
g' = \<^bold>g [^] x

goal (1 subgoal):
 1. \<^bold>g [^] fst z \<otimes> \<^bold>g [^] (x * snd z) \<otimes> inv (h [^] e) = \<^bold>g [^] fst z' \<otimes> \<^bold>g [^] (x * snd z') \<otimes> inv (h [^] e')
[PROOF STEP]
by (simp add: nat_pow_pow)
[PROOF STATE]
proof (state)
this:
\<^bold>g [^] fst z \<otimes> \<^bold>g [^] (x * snd z) \<otimes> inv (h [^] e) = \<^bold>g [^] fst z' \<otimes> \<^bold>g [^] (x * snd z') \<otimes> inv (h [^] e')

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<^bold>g [^] fst z \<otimes> \<^bold>g [^] (x * snd z) \<otimes> inv (h [^] e) = \<^bold>g [^] fst z' \<otimes> \<^bold>g [^] (x * snd z') \<otimes> inv (h [^] e')

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
obtain t :: nat where t: "h = \<^bold>g [^] t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>t. h = \<^bold>g [^] t \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using h_mem generatorE
[PROOF STATE]
proof (prove)
using this:
h \<in> carrier \<G>
\<lbrakk>?x \<in> carrier \<G>; \<And>n. ?x = \<^bold>g [^] n \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>t. h = \<^bold>g [^] t \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
h = \<^bold>g [^] t

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<^bold>g [^] fst z \<otimes> \<^bold>g [^] (x * snd z) \<otimes> inv (h [^] e) = \<^bold>g [^] fst z' \<otimes> \<^bold>g [^] (x * snd z') \<otimes> inv (h [^] e')
h = \<^bold>g [^] t
[PROOF STEP]
have "\<^bold>g [^] fst z \<otimes> \<^bold>g [^] (x * snd z) \<otimes> \<^bold>g [^] (t * e') = \<^bold>g [^] fst z' \<otimes> \<^bold>g [^] (x * snd z') \<otimes> \<^bold>g [^] (t * e)"
[PROOF STATE]
proof (prove)
using this:
\<^bold>g [^] fst z \<otimes> \<^bold>g [^] (x * snd z) \<otimes> inv (h [^] e) = \<^bold>g [^] fst z' \<otimes> \<^bold>g [^] (x * snd z') \<otimes> inv (h [^] e')
h = \<^bold>g [^] t

goal (1 subgoal):
 1. \<^bold>g [^] fst z \<otimes> \<^bold>g [^] (x * snd z) \<otimes> \<^bold>g [^] (t * e') = \<^bold>g [^] fst z' \<otimes> \<^bold>g [^] (x * snd z') \<otimes> \<^bold>g [^] (t * e)
[PROOF STEP]
using a_mem assms(3) assms(4) cyclic_group_assoc cyclic_group_commute g'_def nat_pow_pow
[PROOF STATE]
proof (prove)
using this:
\<^bold>g [^] fst z \<otimes> \<^bold>g [^] (x * snd z) \<otimes> inv (h [^] e) = \<^bold>g [^] fst z' \<otimes> \<^bold>g [^] (x * snd z') \<otimes> inv (h [^] e')
h = \<^bold>g [^] t
a \<in> carrier \<G>
\<^bold>g [^] fst z \<otimes> g' [^] snd z = a \<otimes> h [^] e
\<^bold>g [^] fst z' \<otimes> g' [^] snd z' = a \<otimes> h [^] e'
\<lbrakk>?a \<in> carrier \<G>; ?b \<in> carrier \<G>; ?c \<in> carrier \<G>\<rbrakk> \<Longrightarrow> ?a \<otimes> ?b \<otimes> ?c = ?a \<otimes> (?b \<otimes> ?c)
\<lbrakk>?a \<in> carrier \<G>; ?b \<in> carrier \<G>\<rbrakk> \<Longrightarrow> ?a \<otimes> ?b = ?b \<otimes> ?a
g' = \<^bold>g [^] x
?x \<in> carrier \<G> \<Longrightarrow> (?x [^] ?n) [^] ?m = ?x [^] (?n * ?m)

goal (1 subgoal):
 1. \<^bold>g [^] fst z \<otimes> \<^bold>g [^] (x * snd z) \<otimes> \<^bold>g [^] (t * e') = \<^bold>g [^] fst z' \<otimes> \<^bold>g [^] (x * snd z') \<otimes> \<^bold>g [^] (t * e)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<^bold>g [^] fst z \<otimes> \<^bold>g [^] (x * snd z) \<otimes> \<^bold>g [^] (t * e') = \<^bold>g [^] fst z' \<otimes> \<^bold>g [^] (x * snd z') \<otimes> \<^bold>g [^] (t * e)

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
hence "\<^bold>g [^] (fst z + x * snd z + t * e') = \<^bold>g [^] (fst z' + x * snd z' + t * e)"
[PROOF STATE]
proof (prove)
using this:
\<^bold>g [^] fst z \<otimes> \<^bold>g [^] (x * snd z) \<otimes> \<^bold>g [^] (t * e') = \<^bold>g [^] fst z' \<otimes> \<^bold>g [^] (x * snd z') \<otimes> \<^bold>g [^] (t * e)

goal (1 subgoal):
 1. \<^bold>g [^] (fst z + x * snd z + t * e') = \<^bold>g [^] (fst z' + x * snd z' + t * e)
[PROOF STEP]
by (simp add: nat_pow_mult)
[PROOF STATE]
proof (state)
this:
\<^bold>g [^] (fst z + x * snd z + t * e') = \<^bold>g [^] (fst z' + x * snd z' + t * e)

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
hence "[fst z + x * snd z + t * e' = fst z' + x * snd z' + t * e] (mod order \<G>)"
[PROOF STATE]
proof (prove)
using this:
\<^bold>g [^] (fst z + x * snd z + t * e') = \<^bold>g [^] (fst z' + x * snd z' + t * e)

goal (1 subgoal):
 1. [fst z + x * snd z + t * e' = fst z' + x * snd z' + t * e] (mod order \<G>)
[PROOF STEP]
using group_eq_pow_eq_mod order_gt_0
[PROOF STATE]
proof (prove)
using this:
\<^bold>g [^] (fst z + x * snd z + t * e') = \<^bold>g [^] (fst z' + x * snd z' + t * e)
\<lbrakk>\<^bold>g [^] ?a = \<^bold>g [^] ?b; 0 < order \<G>\<rbrakk> \<Longrightarrow> [?a = ?b] (mod order \<G>)
0 < order \<G>

goal (1 subgoal):
 1. [fst z + x * snd z + t * e' = fst z' + x * snd z' + t * e] (mod order \<G>)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
[fst z + x * snd z + t * e' = fst z' + x * snd z' + t * e] (mod order \<G>)

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
hence "[int (fst z) + int x * int (snd z) + int t * int e' = int (fst z') + int x * int (snd z') + int t * int e] (mod order \<G>)"
[PROOF STATE]
proof (prove)
using this:
[fst z + x * snd z + t * e' = fst z' + x * snd z' + t * e] (mod order \<G>)

goal (1 subgoal):
 1. [int (fst z) + int x * int (snd z) + int t * int e' = int (fst z') + int x * int (snd z') + int t * int e] (mod int (order \<G>))
[PROOF STEP]
using cong_int_iff
[PROOF STATE]
proof (prove)
using this:
[fst z + x * snd z + t * e' = fst z' + x * snd z' + t * e] (mod order \<G>)
[int ?m = int ?q] (mod int ?n) = [?m = ?q] (mod ?n)

goal (1 subgoal):
 1. [int (fst z) + int x * int (snd z) + int t * int e' = int (fst z') + int x * int (snd z') + int t * int e] (mod int (order \<G>))
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
[int (fst z) + int x * int (snd z) + int t * int e' = int (fst z') + int x * int (snd z') + int t * int e] (mod int (order \<G>))

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
hence "[int (fst z) - int (fst z') + int x * int (snd z) - int x * int (snd z') =  int t * int e - int t  * int e'] (mod order \<G>)"
[PROOF STATE]
proof (prove)
using this:
[int (fst z) + int x * int (snd z) + int t * int e' = int (fst z') + int x * int (snd z') + int t * int e] (mod int (order \<G>))

goal (1 subgoal):
 1. [int (fst z) - int (fst z') + int x * int (snd z) - int x * int (snd z') = int t * int e - int t * int e'] (mod int (order \<G>))
[PROOF STEP]
by (smt cong_diff_iff_cong_0)
[PROOF STATE]
proof (state)
this:
[int (fst z) - int (fst z') + int x * int (snd z) - int x * int (snd z') = int t * int e - int t * int e'] (mod int (order \<G>))

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
hence "[int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) =  int t * (int e -  int e')] (mod order \<G>)"
[PROOF STATE]
proof (prove)
using this:
[int (fst z) - int (fst z') + int x * int (snd z) - int x * int (snd z') = int t * int e - int t * int e'] (mod int (order \<G>))

goal (1 subgoal):
 1. [int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) = int t * (int e - int e')] (mod int (order \<G>))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. [int (fst z) - int (fst z') + int x * int (snd z) - int x * int (snd z') = int t * int e - int t * int e'] (mod int (order \<G>)) \<Longrightarrow> [int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) = int t * (int e - int e')] (mod int (order \<G>))
[PROOF STEP]
have "[int (fst z) + (int (x * snd z) - (int (fst z') + int (x * snd z'))) = int t * (int e - int e')] (mod int (order \<G>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [int (fst z) + (int (x * snd z) - (int (fst z') + int (x * snd z'))) = int t * (int e - int e')] (mod int (order \<G>))
[PROOF STEP]
by (simp add: Rings.ring_distribs(4) \<open>[int (fst z) - int (fst z') + int x * int (snd z) - int x * int (snd z') = int t * int e - int t * int e'] (mod int (order \<G>))\<close> add_diff_add add_diff_eq)
[PROOF STATE]
proof (state)
this:
[int (fst z) + (int (x * snd z) - (int (fst z') + int (x * snd z'))) = int t * (int e - int e')] (mod int (order \<G>))

goal (1 subgoal):
 1. [int (fst z) - int (fst z') + int x * int (snd z) - int x * int (snd z') = int t * int e - int t * int e'] (mod int (order \<G>)) \<Longrightarrow> [int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) = int t * (int e - int e')] (mod int (order \<G>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[int (fst z) + (int (x * snd z) - (int (fst z') + int (x * snd z'))) = int t * (int e - int e')] (mod int (order \<G>))
[PROOF STEP]
have "\<exists>i. [int (fst z) + (int x * int (snd z) - (int (fst z') + i * int (snd z'))) = int t * (int e - int e') + int (snd z') * (int x - i)] (mod int (order \<G>))"
[PROOF STATE]
proof (prove)
using this:
[int (fst z) + (int (x * snd z) - (int (fst z') + int (x * snd z'))) = int t * (int e - int e')] (mod int (order \<G>))

goal (1 subgoal):
 1. \<exists>i. [int (fst z) + (int x * int (snd z) - (int (fst z') + i * int (snd z'))) = int t * (int e - int e') + int (snd z') * (int x - i)] (mod int (order \<G>))
[PROOF STEP]
by (metis (no_types) add.commute arith_simps(49) cancel_comm_monoid_add_class.diff_cancel int_ops(7) mult_eq_0_iff)
[PROOF STATE]
proof (state)
this:
\<exists>i. [int (fst z) + (int x * int (snd z) - (int (fst z') + i * int (snd z'))) = int t * (int e - int e') + int (snd z') * (int x - i)] (mod int (order \<G>))

goal (1 subgoal):
 1. [int (fst z) - int (fst z') + int x * int (snd z) - int x * int (snd z') = int t * int e - int t * int e'] (mod int (order \<G>)) \<Longrightarrow> [int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) = int t * (int e - int e')] (mod int (order \<G>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>i. [int (fst z) + (int x * int (snd z) - (int (fst z') + i * int (snd z'))) = int t * (int e - int e') + int (snd z') * (int x - i)] (mod int (order \<G>))
[PROOF STEP]
have "\<exists>i. [int (fst z) - int (fst z') + (int x * (int (snd z) - int (snd z')) + i) = int t * (int e - int e') + i] (mod int (order \<G>))"
[PROOF STATE]
proof (prove)
using this:
\<exists>i. [int (fst z) + (int x * int (snd z) - (int (fst z') + i * int (snd z'))) = int t * (int e - int e') + int (snd z') * (int x - i)] (mod int (order \<G>))

goal (1 subgoal):
 1. \<exists>i. [int (fst z) - int (fst z') + (int x * (int (snd z) - int (snd z')) + i) = int t * (int e - int e') + i] (mod int (order \<G>))
[PROOF STEP]
by (metis (no_types) add_diff_add add_diff_eq mult_diff_mult mult_of_nat_commute)
[PROOF STATE]
proof (state)
this:
\<exists>i. [int (fst z) - int (fst z') + (int x * (int (snd z) - int (snd z')) + i) = int t * (int e - int e') + i] (mod int (order \<G>))

goal (1 subgoal):
 1. [int (fst z) - int (fst z') + int x * int (snd z) - int x * int (snd z') = int t * int e - int t * int e'] (mod int (order \<G>)) \<Longrightarrow> [int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) = int t * (int e - int e')] (mod int (order \<G>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>i. [int (fst z) - int (fst z') + (int x * (int (snd z) - int (snd z')) + i) = int t * (int e - int e') + i] (mod int (order \<G>))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<exists>i. [int (fst z) - int (fst z') + (int x * (int (snd z) - int (snd z')) + i) = int t * (int e - int e') + i] (mod int (order \<G>))

goal (1 subgoal):
 1. [int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) = int t * (int e - int e')] (mod int (order \<G>))
[PROOF STEP]
by (metis (no_types) add.assoc cong_add_rcancel)
[PROOF STATE]
proof (state)
this:
[int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) = int t * (int e - int e')] (mod int (order \<G>))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
[int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) = int t * (int e - int e')] (mod int (order \<G>))

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
hence "[int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) =  int t * (int e mod order \<G> - int e' mod order \<G>) mod order \<G>] (mod order \<G>)"
[PROOF STATE]
proof (prove)
using this:
[int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) = int t * (int e - int e')] (mod int (order \<G>))

goal (1 subgoal):
 1. [int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) = int t * (int e mod int (order \<G>) - int e' mod int (order \<G>)) mod int (order \<G>)] (mod int (order \<G>))
[PROOF STEP]
by (metis (mono_tags, lifting) cong_def mod_diff_eq mod_mod_trivial mod_mult_right_eq)
[PROOF STATE]
proof (state)
this:
[int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) = int t * (int e mod int (order \<G>) - int e' mod int (order \<G>)) mod int (order \<G>)] (mod int (order \<G>))

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
hence "[int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) =  int t * (e mod order \<G> - e' mod order \<G>) mod order \<G>] (mod order \<G>)"
[PROOF STATE]
proof (prove)
using this:
[int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) = int t * (int e mod int (order \<G>) - int e' mod int (order \<G>)) mod int (order \<G>)] (mod int (order \<G>))

goal (1 subgoal):
 1. [int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) = int t * int (e mod order \<G> - e' mod order \<G>) mod int (order \<G>)] (mod int (order \<G>))
[PROOF STEP]
using e_e'_mod
[PROOF STATE]
proof (prove)
using this:
[int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) = int t * (int e mod int (order \<G>) - int e' mod int (order \<G>)) mod int (order \<G>)] (mod int (order \<G>))
e' mod order \<G> < e mod order \<G>

goal (1 subgoal):
 1. [int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) = int t * int (e mod order \<G> - e' mod order \<G>) mod int (order \<G>)] (mod int (order \<G>))
[PROOF STEP]
by (simp add: int_ops(9) of_nat_diff)
[PROOF STATE]
proof (state)
this:
[int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) = int t * int (e mod order \<G> - e' mod order \<G>) mod int (order \<G>)] (mod int (order \<G>))

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
hence "[(int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')))
            * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G>
               =  int t * (e mod order \<G> - e' mod order \<G>) mod order \<G>
                  * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G>] (mod order \<G>)"
[PROOF STATE]
proof (prove)
using this:
[int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) = int t * int (e mod order \<G> - e' mod order \<G>) mod int (order \<G>)] (mod int (order \<G>))

goal (1 subgoal):
 1. [(int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z'))) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t * int (e mod order \<G> - e' mod order \<G>) mod int (order \<G>) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)] (mod int (order \<G>))
[PROOF STEP]
using cong_cong_mod_int cong_scalar_right
[PROOF STATE]
proof (prove)
using this:
[int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')) = int t * int (e mod order \<G> - e' mod order \<G>) mod int (order \<G>)] (mod int (order \<G>))
[?a = ?b] (mod ?m) = [?a mod ?m = ?b mod ?m] (mod ?m)
[?b = ?c] (mod ?a) \<Longrightarrow> [?b * ?d = ?c * ?d] (mod ?a)

goal (1 subgoal):
 1. [(int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z'))) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t * int (e mod order \<G> - e' mod order \<G>) mod int (order \<G>) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)] (mod int (order \<G>))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
[(int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z'))) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t * int (e mod order \<G> - e' mod order \<G>) mod int (order \<G>) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)] (mod int (order \<G>))

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
hence "[(int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')))
            * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G>
               =  int t * ((e mod order \<G> - e' mod order \<G>) mod order \<G>
                  * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G>)] (mod order \<G>)"
[PROOF STATE]
proof (prove)
using this:
[(int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z'))) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t * int (e mod order \<G> - e' mod order \<G>) mod int (order \<G>) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)] (mod int (order \<G>))

goal (1 subgoal):
 1. [(int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z'))) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t * (int ((e mod order \<G> - e' mod order \<G>) mod order \<G>) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))] (mod int (order \<G>))
[PROOF STEP]
by (metis (no_types, lifting) Groups.mult_ac(1) cong_mod_right less_imp_diff_less mod_less mod_mult_left_eq mod_mult_right_eq order_gt_0 unique_euclidean_semiring_numeral_class.pos_mod_bound)
[PROOF STATE]
proof (state)
this:
[(int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z'))) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t * (int ((e mod order \<G> - e' mod order \<G>) mod order \<G>) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))] (mod int (order \<G>))

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
hence "[(int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z')))
            * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G>
               =  int t * 1] (mod order \<G>)"
[PROOF STATE]
proof (prove)
using this:
[(int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z'))) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t * (int ((e mod order \<G> - e' mod order \<G>) mod order \<G>) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))] (mod int (order \<G>))

goal (1 subgoal):
 1. [(int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z'))) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t * 1] (mod int (order \<G>))
[PROOF STEP]
using inverse gcd
[PROOF STATE]
proof (prove)
using this:
[(int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z'))) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t * (int ((e mod order \<G> - e' mod order \<G>) mod order \<G>) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))] (mod int (order \<G>))
gcd ?x ?q = 1 \<Longrightarrow> [int ?x * Number_Theory_Aux.inverse ?x ?q = 1] (mod int ?q)
gcd ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) = 1

goal (1 subgoal):
 1. [(int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z'))) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t * 1] (mod int (order \<G>))
[PROOF STEP]
by (smt Num.of_nat_simps(5) Number_Theory_Aux.inverse cong_def mod_mult_right_eq more_arith_simps(6) of_nat_1)
[PROOF STATE]
proof (state)
this:
[(int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z'))) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t * 1] (mod int (order \<G>))

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
hence "[((int (fst z) - int (fst z')) + (int x * (int (snd z) - int (snd z'))))
            * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G>
               = int t] (mod order \<G>)"
[PROOF STATE]
proof (prove)
using this:
[(int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z'))) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t * 1] (mod int (order \<G>))

goal (1 subgoal):
 1. [(int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z'))) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t] (mod int (order \<G>))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
[(int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z'))) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t] (mod int (order \<G>))

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
hence "[(int (fst z) - int (fst z')) * (fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G>) + (int x * (int (snd z) - int (snd z')))
            * (fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G>)
               = int t] (mod order \<G>)"
[PROOF STATE]
proof (prove)
using this:
[(int (fst z) - int (fst z') + int x * (int (snd z) - int (snd z'))) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t] (mod int (order \<G>))

goal (1 subgoal):
 1. [(int (fst z) - int (fst z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = int t] (mod int (order \<G>))
[PROOF STEP]
by (metis (no_types, opaque_lifting) cong_mod_left distrib_right mod_mult_right_eq)
[PROOF STATE]
proof (state)
this:
[(int (fst z) - int (fst z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = int t] (mod int (order \<G>))

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
hence "[(int (fst z) - int (fst z')) * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G> + (int x * (int (snd z) - int (snd z')))
            * (fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G>)
               = t] (mod order \<G>)"
[PROOF STATE]
proof (prove)
using this:
[(int (fst z) - int (fst z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = int t] (mod int (order \<G>))

goal (1 subgoal):
 1. [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = int t] (mod int (order \<G>))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. [(int (fst z) - int (fst z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = int t] (mod int (order \<G>)) \<Longrightarrow> [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = int t] (mod int (order \<G>))
[PROOF STEP]
have "[(int (fst z) - int (fst z')) * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) = (int (fst z) - int (fst z')) * (fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>))] (mod int (order \<G>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) = (int (fst z) - int (fst z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))] (mod int (order \<G>))
[PROOF STEP]
by (metis (no_types) cong_def mod_mult_right_eq)
[PROOF STATE]
proof (state)
this:
[(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) = (int (fst z) - int (fst z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))] (mod int (order \<G>))

goal (1 subgoal):
 1. [(int (fst z) - int (fst z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = int t] (mod int (order \<G>)) \<Longrightarrow> [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = int t] (mod int (order \<G>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) = (int (fst z) - int (fst z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))] (mod int (order \<G>))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
[(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) = (int (fst z) - int (fst z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))] (mod int (order \<G>))

goal (1 subgoal):
 1. [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = int t] (mod int (order \<G>))
[PROOF STEP]
by (meson \<open>[(int (fst z) - int (fst z')) * (fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>)) + int x * (int (snd z) - int (snd z')) * (fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>)) = int t] (mod int (order \<G>))\<close> cong_add_rcancel cong_mod_left cong_trans)
[PROOF STATE]
proof (state)
this:
[(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = int t] (mod int (order \<G>))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
[(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = int t] (mod int (order \<G>))

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
hence "[(int (fst z) - int (fst z')) * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G> + (int x * (int (snd z) - int (snd z')))
            * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G>
               = t] (mod order \<G>)"
[PROOF STATE]
proof (prove)
using this:
[(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = int t] (mod int (order \<G>))

goal (1 subgoal):
 1. [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t] (mod int (order \<G>))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = int t] (mod int (order \<G>)) \<Longrightarrow> [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t] (mod int (order \<G>))
[PROOF STEP]
have "int x * ((int (snd z) - int (snd z')) * (fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>))) mod int (order \<G>) = int x * ((int (snd z) - int (snd z')) * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>))) mod int (order \<G>) mod int (order \<G>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int x * ((int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))) mod int (order \<G>) = int x * ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) mod int (order \<G>)
[PROOF STEP]
by (metis (no_types) mod_mod_trivial mod_mult_right_eq)
[PROOF STATE]
proof (state)
this:
int x * ((int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))) mod int (order \<G>) = int x * ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) mod int (order \<G>)

goal (1 subgoal):
 1. [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = int t] (mod int (order \<G>)) \<Longrightarrow> [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t] (mod int (order \<G>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
int x * ((int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))) mod int (order \<G>) = int x * ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) mod int (order \<G>)
[PROOF STEP]
have "[int x * ((int (snd z) - int (snd z')) * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>))) mod int (order \<G>) = int x * ((int (snd z) - int (snd z')) * (fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>)))] (mod int (order \<G>))"
[PROOF STATE]
proof (prove)
using this:
int x * ((int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))) mod int (order \<G>) = int x * ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) mod int (order \<G>)

goal (1 subgoal):
 1. [int x * ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) = int x * ((int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)))] (mod int (order \<G>))
[PROOF STEP]
by (metis (no_types) cong_def)
[PROOF STATE]
proof (state)
this:
[int x * ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) = int x * ((int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)))] (mod int (order \<G>))

goal (1 subgoal):
 1. [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = int t] (mod int (order \<G>)) \<Longrightarrow> [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t] (mod int (order \<G>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[int x * ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) = int x * ((int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)))] (mod int (order \<G>))
[PROOF STEP]
have "[(int (fst z) - int (fst z')) * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) + int x * ((int (snd z) - int (snd z')) * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>))) mod int (order \<G>) = (int (fst z) - int (fst z')) * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>))] (mod int (order \<G>))"
[PROOF STATE]
proof (prove)
using this:
[int x * ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) = int x * ((int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)))] (mod int (order \<G>))

goal (1 subgoal):
 1. [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) = (int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))] (mod int (order \<G>))
[PROOF STEP]
by (metis (no_types) Groups.mult_ac(1) cong_add cong_refl)
[PROOF STATE]
proof (state)
this:
[(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) = (int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))] (mod int (order \<G>))

goal (1 subgoal):
 1. [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = int t] (mod int (order \<G>)) \<Longrightarrow> [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t] (mod int (order \<G>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) = (int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))] (mod int (order \<G>))
[PROOF STEP]
have "[(int (fst z) - int (fst z')) * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) + int x * ((int (snd z) - int (snd z')) * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>))) mod int (order \<G>) = int t] (mod int (order \<G>))"
[PROOF STATE]
proof (prove)
using this:
[(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) = (int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))] (mod int (order \<G>))

goal (1 subgoal):
 1. [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) = int t] (mod int (order \<G>))
[PROOF STEP]
using \<open>[(int (fst z) - int (fst z')) * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>)) = int t] (mod int (order \<G>))\<close> cong_trans
[PROOF STATE]
proof (prove)
using this:
[(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) = (int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))] (mod int (order \<G>))
[(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = int t] (mod int (order \<G>))
\<lbrakk>[?b = ?c] (mod ?a); [?c = ?d] (mod ?a)\<rbrakk> \<Longrightarrow> [?b = ?d] (mod ?a)

goal (1 subgoal):
 1. [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) = int t] (mod int (order \<G>))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
[(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) = int t] (mod int (order \<G>))

goal (1 subgoal):
 1. [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * (Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = int t] (mod int (order \<G>)) \<Longrightarrow> [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t] (mod int (order \<G>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) = int t] (mod int (order \<G>))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
[(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod int (order \<G>) = int t] (mod int (order \<G>))

goal (1 subgoal):
 1. [(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t] (mod int (order \<G>))
[PROOF STEP]
by (metis (no_types) Groups.mult_ac(1))
[PROOF STATE]
proof (state)
this:
[(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t] (mod int (order \<G>))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
[(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t] (mod int (order \<G>))

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
hence "\<^bold>g [^] ((int (fst z) - int (fst z')) * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G> + (int x * (int (snd z) - int (snd z')))
            * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G>)
               = \<^bold>g [^] t"
[PROOF STATE]
proof (prove)
using this:
[(int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) = int t] (mod int (order \<G>))

goal (1 subgoal):
 1. \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = \<^bold>g [^] t
[PROOF STEP]
by (metis cong_def int_pow_int pow_generator_mod_int)
[PROOF STATE]
proof (state)
this:
\<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = \<^bold>g [^] t

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
hence "\<^bold>g [^] ((int (fst z) - int (fst z')) * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G>) \<otimes> \<^bold>g [^] ((int x * (int (snd z) - int (snd z')))
            * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G>)
               = \<^bold>g [^] t"
[PROOF STATE]
proof (prove)
using this:
\<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = \<^bold>g [^] t

goal (1 subgoal):
 1. \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> \<^bold>g [^] (int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = \<^bold>g [^] t
[PROOF STEP]
using int_pow_mult
[PROOF STATE]
proof (prove)
using this:
\<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>) + int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = \<^bold>g [^] t
?x \<in> carrier \<G> \<Longrightarrow> ?x [^] (?i + ?j) = ?x [^] ?i \<otimes> ?x [^] ?j

goal (1 subgoal):
 1. \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> \<^bold>g [^] (int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = \<^bold>g [^] t
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> \<^bold>g [^] (int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = \<^bold>g [^] t

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
hence "\<^bold>g [^] ((int (fst z) - int (fst z')) * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G>) \<otimes> \<^bold>g [^] ((int x * ((int (snd z) - int (snd z')))
            * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G>))
               = \<^bold>g [^] t"
[PROOF STATE]
proof (prove)
using this:
\<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> \<^bold>g [^] (int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = \<^bold>g [^] t

goal (1 subgoal):
 1. \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> \<^bold>g [^] (int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = \<^bold>g [^] t
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> \<^bold>g [^] (int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = \<^bold>g [^] t

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
hence "\<^bold>g [^] ((int (fst z) - int (fst z')) * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G>) \<otimes> g' [^] ((((int (snd z) - int (snd z')))
            * fst (bezw ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>)) mod order \<G>))
               = \<^bold>g [^] t"
[PROOF STATE]
proof (prove)
using this:
\<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> \<^bold>g [^] (int x * (int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = \<^bold>g [^] t

goal (1 subgoal):
 1. \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = \<^bold>g [^] t
[PROOF STEP]
by (smt g'_def cyclic_group.generator_closed int_pow_int int_pow_pow mod_mult_right_eq more_arith_simps(11) okamoto_axioms okamoto_def pow_generator_mod_int)
[PROOF STATE]
proof (state)
this:
\<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = \<^bold>g [^] t

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = \<^bold>g [^] t

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
using t
[PROOF STATE]
proof (prove)
using this:
\<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) = \<^bold>g [^] t
h = \<^bold>g [^] t

goal (1 subgoal):
 1. h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
h = \<^bold>g [^] ((int (fst z) - int (fst z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>)) \<otimes> g' [^] ((int (snd z) - int (snd z')) * Number_Theory_Aux.inverse ((e mod order \<G> - e' mod order \<G>) mod order \<G>) (order \<G>) mod int (order \<G>))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma mcont_lprefix_case_lfp [cont_intro, simp]:
  fixes f :: "_ => _ :: complete_lattice"
  assumes "\<And>x. mcont lSup (\<sqsubseteq>) Sup (\<le>) (\<lambda>xs. f x xs (LCons x xs))"
  shows "mcont lSup (\<sqsubseteq>) Sup (\<le>) (\<lambda>xs. case xs of LNil \<Rightarrow> \<bottom> | LCons x xs \<Rightarrow> f x xs (LCons x xs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mcont lSup (\<sqsubseteq>) Sup (\<le>) (\<lambda>xs. case xs of LNil \<Rightarrow> \<bottom> | LCons x xs \<Rightarrow> f x xs (LCons x xs))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
mcont lSup (\<sqsubseteq>) Sup (\<le>) (\<lambda>xs. f ?x xs (LCons ?x xs))

goal (1 subgoal):
 1. mcont lSup (\<sqsubseteq>) Sup (\<le>) (\<lambda>xs. case xs of LNil \<Rightarrow> \<bottom> | LCons x xs \<Rightarrow> f x xs (LCons x xs))
[PROOF STEP]
by(rule mcont_lprefix_case_aux)(rule complete_lattice_ccpo', simp)


[STATEMENT]
lemma finite_LB: "finite(LB f xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (LB f xs)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite (LB f xs)
[PROOF STEP]
have "LB f xs = (\<lambda>k. xs!k) ` set(lbounds(DLO.atoms\<^sub>0 f))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LB f xs = (!) xs ` set (lbounds (DLO.atoms\<^sub>0 f))
[PROOF STEP]
by (auto simp:set_lbounds image_def)
[PROOF STATE]
proof (state)
this:
LB f xs = (!) xs ` set (lbounds (DLO.atoms\<^sub>0 f))

goal (1 subgoal):
 1. finite (LB f xs)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
LB f xs = (!) xs ` set (lbounds (DLO.atoms\<^sub>0 f))

goal (1 subgoal):
 1. finite (LB f xs)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
finite (LB f xs)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma powreal_Log_cancel [simp]:
   "\<lbrakk> a > 0; a \<noteq> 1; x > 0 \<rbrakk> \<Longrightarrow> a pow\<^sub>\<real> (Log a x) = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < a; a \<noteq> 1; 0 < x\<rbrakk> \<Longrightarrow> a pow\<^sub>\<real> Log a x = x
[PROOF STEP]
by (auto intro: the1I2 [OF powreal_ex1_eq] simp add: Log_def)


[STATEMENT]
lemma WN_onE: "WN_on r A \<Longrightarrow> a \<in> A \<Longrightarrow> (\<And>b. (a, b) \<in> r\<^sup>! \<Longrightarrow> P) \<Longrightarrow> P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>WN_on r A; a \<in> A; \<And>b. (a, b) \<in> r\<^sup>! \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P
[PROOF STEP]
unfolding WN_defs
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>a\<in>A. \<exists>b. (a, b) \<in> r\<^sup>!; a \<in> A; \<And>b. (a, b) \<in> r\<^sup>! \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P
[PROOF STEP]
by blast


[STATEMENT]
lemma mod_plus_minus_rangeE:
  assumes "y \<in> {-\<lfloor>real_of_int b/2\<rfloor>..<\<lfloor>real_of_int b/2\<rfloor>}"
          "odd b"
  shows "y = y mod+- b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y = y mod+- b
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. y = y mod+- b
[PROOF STEP]
have "(y + \<lfloor> real_of_int b / 2 \<rfloor>) \<in> {0..<b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y + \<lfloor>real_of_int b / 2\<rfloor> \<in> {0..<b}
[PROOF STEP]
using assms(1) odd_smaller_b[OF assms(2)]
[PROOF STATE]
proof (prove)
using this:
y \<in> {- \<lfloor>real_of_int b / 2\<rfloor>..<\<lfloor>real_of_int b / 2\<rfloor>}
\<lfloor>real_of_int b / 2\<rfloor> + \<lfloor>real_of_int b / 2\<rfloor> < b

goal (1 subgoal):
 1. y + \<lfloor>real_of_int b / 2\<rfloor> \<in> {0..<b}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
y + \<lfloor>real_of_int b / 2\<rfloor> \<in> {0..<b}

goal (1 subgoal):
 1. y = y mod+- b
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y + \<lfloor>real_of_int b / 2\<rfloor> \<in> {0..<b}
[PROOF STEP]
have "(y + \<lfloor> real_of_int b / 2 \<rfloor>) mod b =
    (y + \<lfloor> real_of_int b / 2 \<rfloor>)"
[PROOF STATE]
proof (prove)
using this:
y + \<lfloor>real_of_int b / 2\<rfloor> \<in> {0..<b}

goal (1 subgoal):
 1. (y + \<lfloor>real_of_int b / 2\<rfloor>) mod b = y + \<lfloor>real_of_int b / 2\<rfloor>
[PROOF STEP]
using mod_rangeE
[PROOF STATE]
proof (prove)
using this:
y + \<lfloor>real_of_int b / 2\<rfloor> \<in> {0..<b}
?a \<in> {0..<?b} \<Longrightarrow> ?a = ?a mod ?b

goal (1 subgoal):
 1. (y + \<lfloor>real_of_int b / 2\<rfloor>) mod b = y + \<lfloor>real_of_int b / 2\<rfloor>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(y + \<lfloor>real_of_int b / 2\<rfloor>) mod b = y + \<lfloor>real_of_int b / 2\<rfloor>

goal (1 subgoal):
 1. y = y mod+- b
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(y + \<lfloor>real_of_int b / 2\<rfloor>) mod b = y + \<lfloor>real_of_int b / 2\<rfloor>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(y + \<lfloor>real_of_int b / 2\<rfloor>) mod b = y + \<lfloor>real_of_int b / 2\<rfloor>

goal (1 subgoal):
 1. y = y mod+- b
[PROOF STEP]
unfolding mod_plus_minus_def
[PROOF STATE]
proof (prove)
using this:
(y + \<lfloor>real_of_int b / 2\<rfloor>) mod b = y + \<lfloor>real_of_int b / 2\<rfloor>

goal (1 subgoal):
 1. y = (y + \<lfloor>real_of_int b / 2\<rfloor>) mod b - \<lfloor>real_of_int b / 2\<rfloor>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
y = y mod+- b

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Or\<^sub>n_And\<^sub>n_image_semantics:
  assumes "finite \" and "\<And>\<Phi>. \<Phi> \<in> \ \<Longrightarrow> finite \<Phi>"
  shows "w \<Turnstile>\<^sub>n Or\<^sub>n (And\<^sub>n ` \) \<longleftrightarrow> (\<exists>\<Phi> \<in> \. \<forall>\<phi> \<in> \<Phi>. w \<Turnstile>\<^sub>n \<phi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. w \<Turnstile>\<^sub>n Or\<^sub>n (And\<^sub>n ` \) = (\<exists>\<Phi>\<in>\. \<forall>\<phi>\<in>\<Phi>. w \<Turnstile>\<^sub>n \<phi>)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. w \<Turnstile>\<^sub>n Or\<^sub>n (And\<^sub>n ` \) = (\<exists>\<Phi>\<in>\. \<forall>\<phi>\<in>\<Phi>. w \<Turnstile>\<^sub>n \<phi>)
[PROOF STEP]
have "w \<Turnstile>\<^sub>n Or\<^sub>n (And\<^sub>n ` \) \<longleftrightarrow> (\<exists>\<Phi> \<in> \. w \<Turnstile>\<^sub>n And\<^sub>n \<Phi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. w \<Turnstile>\<^sub>n Or\<^sub>n (And\<^sub>n ` \) = (\<exists>\<Phi>\<in>\. w \<Turnstile>\<^sub>n And\<^sub>n \<Phi>)
[PROOF STEP]
using Or\<^sub>n_semantics assms
[PROOF STATE]
proof (prove)
using this:
finite ?\<Phi> \<Longrightarrow> ?w \<Turnstile>\<^sub>n Or\<^sub>n ?\<Phi> = (\<exists>\<phi>\<in>?\<Phi>. ?w \<Turnstile>\<^sub>n \<phi>)
finite \
?\<Phi> \<in> \ \<Longrightarrow> finite ?\<Phi>

goal (1 subgoal):
 1. w \<Turnstile>\<^sub>n Or\<^sub>n (And\<^sub>n ` \) = (\<exists>\<Phi>\<in>\. w \<Turnstile>\<^sub>n And\<^sub>n \<Phi>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
w \<Turnstile>\<^sub>n Or\<^sub>n (And\<^sub>n ` \) = (\<exists>\<Phi>\<in>\. w \<Turnstile>\<^sub>n And\<^sub>n \<Phi>)

goal (1 subgoal):
 1. w \<Turnstile>\<^sub>n Or\<^sub>n (And\<^sub>n ` \) = (\<exists>\<Phi>\<in>\. \<forall>\<phi>\<in>\<Phi>. w \<Turnstile>\<^sub>n \<phi>)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
w \<Turnstile>\<^sub>n Or\<^sub>n (And\<^sub>n ` \) = (\<exists>\<Phi>\<in>\. w \<Turnstile>\<^sub>n And\<^sub>n \<Phi>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
w \<Turnstile>\<^sub>n Or\<^sub>n (And\<^sub>n ` \) = (\<exists>\<Phi>\<in>\. w \<Turnstile>\<^sub>n And\<^sub>n \<Phi>)

goal (1 subgoal):
 1. w \<Turnstile>\<^sub>n Or\<^sub>n (And\<^sub>n ` \) = (\<exists>\<Phi>\<in>\. \<forall>\<phi>\<in>\<Phi>. w \<Turnstile>\<^sub>n \<phi>)
[PROOF STEP]
using And\<^sub>n_semantics assms
[PROOF STATE]
proof (prove)
using this:
w \<Turnstile>\<^sub>n Or\<^sub>n (And\<^sub>n ` \) = (\<exists>\<Phi>\<in>\. w \<Turnstile>\<^sub>n And\<^sub>n \<Phi>)
finite ?\<Phi> \<Longrightarrow> ?w \<Turnstile>\<^sub>n And\<^sub>n ?\<Phi> = (\<forall>\<phi>\<in>?\<Phi>. ?w \<Turnstile>\<^sub>n \<phi>)
finite \
?\<Phi> \<in> \ \<Longrightarrow> finite ?\<Phi>

goal (1 subgoal):
 1. w \<Turnstile>\<^sub>n Or\<^sub>n (And\<^sub>n ` \) = (\<exists>\<Phi>\<in>\. \<forall>\<phi>\<in>\<Phi>. w \<Turnstile>\<^sub>n \<phi>)
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
w \<Turnstile>\<^sub>n Or\<^sub>n (And\<^sub>n ` \) = (\<exists>\<Phi>\<in>\. \<forall>\<phi>\<in>\<Phi>. w \<Turnstile>\<^sub>n \<phi>)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma confluentD:
  "\<lbrakk> confluent R; R^** a b; R^** a c  \<rbrakk> \<Longrightarrow> \<exists>d. R^** b d \<and> R^** c d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>confluent R; R\<^sup>*\<^sup>* a b; R\<^sup>*\<^sup>* a c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
by(auto simp add: commute_def diamond_def square_def)


[STATEMENT]
lemma fps_delta_to_fls:
  "fps_to_fls (Abs_fps (\<lambda>n. if n=a then b else 0)) = Abs_fls (\<lambda>n. if n=int a then b else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fps_to_fls (Abs_fps (\<lambda>n. if n = a then b else (0::'a))) = Abs_fls (\<lambda>n. if n = int a then b else (0::'a))
[PROOF STEP]
using fls_eqI[of _ "Abs_fls (\<lambda>n. if n=int a then b else 0)"]
[PROOF STATE]
proof (prove)
using this:
(\<And>x. ?x $$ x = Abs_fls (\<lambda>n. if n = int a then b else (0::'a)) $$ x) \<Longrightarrow> ?x = Abs_fls (\<lambda>n. if n = int a then b else (0::'a))

goal (1 subgoal):
 1. fps_to_fls (Abs_fps (\<lambda>n. if n = a then b else (0::'a))) = Abs_fls (\<lambda>n. if n = int a then b else (0::'a))
[PROOF STEP]
by force


[STATEMENT]
lemma signed_take_bit_int_less_eq_self_iff:
  \<open>signed_take_bit n k \<le> k \<longleftrightarrow> - (2 ^ n) \<le> k\<close>
  for k :: int
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (signed_take_bit n k \<le> k) = (- (2 ^ n) \<le> k)
[PROOF STEP]
by (simp add: signed_take_bit_eq_take_bit_shift take_bit_int_less_eq_self_iff algebra_simps)
    linarith


[STATEMENT]
lemma power_zero_id:
  "f^0 = id"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ^ 0 = id
[PROOF STEP]
by (simp add: one_fun_def)


[STATEMENT]
lemma InfinitesimalI: "(\<And>r. r \<in> \<real> \<Longrightarrow> 0 < r \<Longrightarrow> hnorm x < r) \<Longrightarrow> x \<in> Infinitesimal"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>r. \<lbrakk>r \<in> \<real>; 0 < r\<rbrakk> \<Longrightarrow> hnorm x < r) \<Longrightarrow> x \<in> Infinitesimal
[PROOF STEP]
by (simp add: Infinitesimal_def)


[STATEMENT]
lemma convex_powr':
  assumes "p > 0" "p \<le> 1"
  shows "convex_on {0..} (\<lambda>x::real. - (x powr p))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convex_on {0..} (\<lambda>x. - (x powr p))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. convex_on {0..} (\<lambda>x. - (x powr p))
[PROOF STEP]
have "convex_on {0<..} (\<lambda>x::real. - (x powr p))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convex_on {0<..} (\<lambda>x. - (x powr p))
[PROOF STEP]
apply (rule convex_on_realI[of _ _ "\<lambda>x. -p * x powr (p-1)"])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. connected {0<..}
 2. \<And>x. x \<in> {0<..} \<Longrightarrow> ((\<lambda>x. - (x powr p)) has_real_derivative - p * x powr (p - 1)) (at x)
 3. \<And>x y. \<lbrakk>x \<in> {0<..}; y \<in> {0<..}; x \<le> y\<rbrakk> \<Longrightarrow> - p * x powr (p - 1) \<le> - p * y powr (p - 1)
[PROOF STEP]
apply (auto intro!:derivative_intros simp add: has_real_derivative_powr)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>0 < x; x \<le> y\<rbrakk> \<Longrightarrow> p * y powr (p - 1) \<le> p * x powr (p - 1)
[PROOF STEP]
using \<open>p > 0\<close> \<open>p \<le> 1\<close>
[PROOF STATE]
proof (prove)
using this:
0 < p
p \<le> 1

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>0 < x; x \<le> y\<rbrakk> \<Longrightarrow> p * y powr (p - 1) \<le> p * x powr (p - 1)
[PROOF STEP]
by (auto simp add: algebra_simps divide_simps powr_mono2')
[PROOF STATE]
proof (state)
this:
convex_on {0<..} (\<lambda>x. - (x powr p))

goal (1 subgoal):
 1. convex_on {0..} (\<lambda>x. - (x powr p))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
convex_on {0<..} (\<lambda>x. - (x powr p))

goal (1 subgoal):
 1. convex_on {0..} (\<lambda>x. - (x powr p))
[PROOF STEP]
have "continuous_on {0..} (\<lambda>x::real. - (x powr p))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on {0..} (\<lambda>x. - (x powr p))
[PROOF STEP]
by (rule continuous_on_minus, rule continuous_on_powr', auto simp add: \<open>p > 0\<close> intro!: continuous_intros)
[PROOF STATE]
proof (state)
this:
continuous_on {0..} (\<lambda>x. - (x powr p))

goal (1 subgoal):
 1. convex_on {0..} (\<lambda>x. - (x powr p))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
continuous_on {0..} (\<lambda>x. - (x powr p))

goal (1 subgoal):
 1. convex_on {0..} (\<lambda>x. - (x powr p))
[PROOF STEP]
have "{(0::real)..} = closure {0<..}" "convex {(0::real)<..}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {0..} = closure {0<..} &&& convex {0<..}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{0..} = closure {0<..}
convex {0<..}

goal (1 subgoal):
 1. convex_on {0..} (\<lambda>x. - (x powr p))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
convex_on {0<..} (\<lambda>x. - (x powr p))
continuous_on {0..} (\<lambda>x. - (x powr p))
{0..} = closure {0<..}
convex {0<..}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
convex_on {0<..} (\<lambda>x. - (x powr p))
continuous_on {0..} (\<lambda>x. - (x powr p))
{0..} = closure {0<..}
convex {0<..}

goal (1 subgoal):
 1. convex_on {0..} (\<lambda>x. - (x powr p))
[PROOF STEP]
using convex_on_closure
[PROOF STATE]
proof (prove)
using this:
convex_on {0<..} (\<lambda>x. - (x powr p))
continuous_on {0..} (\<lambda>x. - (x powr p))
{0..} = closure {0<..}
convex {0<..}
\<lbrakk>convex ?C; convex_on ?C ?f; continuous_on (closure ?C) ?f\<rbrakk> \<Longrightarrow> convex_on (closure ?C) ?f

goal (1 subgoal):
 1. convex_on {0..} (\<lambda>x. - (x powr p))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
convex_on {0..} (\<lambda>x. - (x powr p))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem LT2: assumes h: "\<turnstile> F \<longrightarrow> G" shows "\<turnstile> F \<longrightarrow> \<diamond>G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> F \<longrightarrow> \<diamond>G
[PROOF STEP]
by (rule lift_imp_trans[OF h E3])


[STATEMENT]
lemma (in prob_space) erlang_distributed_iff:
  assumes [arith]: "0<l"
  shows "distributed M lborel X (erlang_density k l) \<longleftrightarrow>
    (X \<in> borel_measurable M \<and> 0 < l \<and>  (\<forall>a\<ge>0. \<P>(x in M. X x \<le> a) = erlang_CDF k l a ))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distributed M lborel X (\<lambda>x. ennreal (erlang_density k l x)) = (random_variable borel X \<and> 0 < l \<and> (\<forall>a\<ge>0. prob {x \<in> space M. X x \<le> a} = erlang_CDF k l a))
[PROOF STEP]
using
    distributed_measurable[of M lborel X "erlang_density k l"]
    emeasure_erlang_density[of l]
    erlang_distributed_le[of X k l]
[PROOF STATE]
proof (prove)
using this:
distributed M lborel X (\<lambda>x. ennreal (erlang_density k l x)) \<Longrightarrow> random_variable lborel X
0 < l \<Longrightarrow> emeasure (density lborel (\<lambda>x. ennreal (erlang_density ?k l x))) {..?a} = ennreal (erlang_CDF ?k l ?a)
\<lbrakk>distributed M lborel X (\<lambda>x. ennreal (erlang_density k l x)); 0 < l; 0 \<le> ?a\<rbrakk> \<Longrightarrow> prob {x \<in> space M. X x \<le> ?a} = erlang_CDF k l ?a

goal (1 subgoal):
 1. distributed M lborel X (\<lambda>x. ennreal (erlang_density k l x)) = (random_variable borel X \<and> 0 < l \<and> (\<forall>a\<ge>0. prob {x \<in> space M. X x \<le> a} = erlang_CDF k l a))
[PROOF STEP]
by (auto intro!: erlang_distributedI simp: one_ennreal_def emeasure_eq_measure)


[STATEMENT]
lemma communicating_iff: "(x, y) \<in> communicating \<longleftrightarrow> (\<exists>n. 0 < p x y n) \<and> (\<exists>n. 0 < p y x n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((x, y) \<in> communicating) = ((\<exists>n. 0 < p x y n) \<and> (\<exists>n. 0 < p y x n))
[PROOF STEP]
by (auto simp add: acc_iff communicating_def)


[STATEMENT]
lemma oSuc_plus_omega [simp]: "oSuc x + \<omega> = x + \<omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. oSuc x + \<omega> = x + \<omega>
[PROOF STEP]
apply (simp add: omega_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. oLimit (\<lambda>n. oSuc x + ordinal_of_nat n) = oLimit (\<lambda>n. x + ordinal_of_nat n)
[PROOF STEP]
apply (rule oLimit_eqI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>n. \<exists>m. oSuc x + ordinal_of_nat n \<le> x + ordinal_of_nat m
 2. \<And>n. \<exists>m. x + ordinal_of_nat n \<le> oSuc x + ordinal_of_nat m
[PROOF STEP]
apply (rule_tac x="Suc n" in exI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>n. oSuc x + ordinal_of_nat n \<le> x + ordinal_of_nat (Suc n)
 2. \<And>n. \<exists>m. x + ordinal_of_nat n \<le> oSuc x + ordinal_of_nat m
[PROOF STEP]
apply (simp add: oSuc_plus_ordinal_of_nat)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. \<exists>m. x + ordinal_of_nat n \<le> oSuc x + ordinal_of_nat m
[PROOF STEP]
apply (rule_tac x=n in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. x + ordinal_of_nat n \<le> oSuc x + ordinal_of_nat n
[PROOF STEP]
apply (simp add: oSuc_plus_ordinal_of_nat order_less_imp_le)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma NSLIMSEQ_inverse: "X \<longlonglongrightarrow>\<^sub>N\<^sub>S a \<Longrightarrow> a \<noteq> 0 \<Longrightarrow> (\<lambda>n. inverse (X n)) \<longlonglongrightarrow>\<^sub>N\<^sub>S inverse a"
  for a :: "'a::real_normed_div_algebra"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>X \<longlonglongrightarrow>\<^sub>N\<^sub>S a; a \<noteq> (0::'a)\<rbrakk> \<Longrightarrow> (\<lambda>n. inverse (X n)) \<longlonglongrightarrow>\<^sub>N\<^sub>S inverse a
[PROOF STEP]
by (simp add: NSLIMSEQ_def star_of_approx_inverse)


[STATEMENT]
lemma notin_segment_midpoint:
  fixes a :: "'a :: euclidean_space"
  shows "a \<noteq> b \<Longrightarrow> a \<notin> closed_segment (midpoint a b) b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<noteq> b \<Longrightarrow> a \<notin> closed_segment (midpoint a b) b
[PROOF STEP]
by (auto simp: dist_midpoint dest!: dist_in_closed_segment)


[STATEMENT]
lemma equivalence_and_prime_implicates:
  assumes "equivalent S1 S2"
  shows "prime_implicates S1 = prime_implicates S2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prime_implicates S1 = prime_implicates S2
[PROOF STEP]
using assms equivalence_and_implicates prime_implicates_def
[PROOF STATE]
proof (prove)
using this:
equivalent S1 S2
equivalent ?S1.0 ?S2.0 \<Longrightarrow> implicates ?S1.0 = implicates ?S2.0
prime_implicates ?S = simplify (implicates ?S)

goal (1 subgoal):
 1. prime_implicates S1 = prime_implicates S2
[PROOF STEP]
by auto


[STATEMENT]
lemma indifferent_imp_weak_pref:
  assumes "x \<approx> y"
  shows" x \<succeq> y" "y \<succeq> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<succeq> y &&& y \<succeq> x
[PROOF STEP]
by (simp add: assms)+


[STATEMENT]
lemma "Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))
[PROOF STEP]
nitpick [expect = none]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Suc n = Abs_Nat (Suc_Rep (Rep_Nat n))
[PROOF STEP]
by (rule Nat.Suc_def)


[STATEMENT]
lemma left_minus:
  assumes [simp]: "a \<in> R" "b \<in> R" shows "(- a) \<cdot> b = - a \<cdot> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- a) \<cdot> b = - a \<cdot> b
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (- a) \<cdot> b = - a \<cdot> b
[PROOF STEP]
have "\<zero> = \<zero> \<cdot> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<zero> = \<zero> \<cdot> b
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<zero> = \<zero> \<cdot> b

goal (1 subgoal):
 1. (- a) \<cdot> b = - a \<cdot> b
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<zero> = \<zero> \<cdot> b

goal (1 subgoal):
 1. (- a) \<cdot> b = - a \<cdot> b
[PROOF STEP]
have "\<dots> = (a - a) \<cdot> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<zero> \<cdot> b = (a - a) \<cdot> b
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<zero> \<cdot> b = (a - a) \<cdot> b

goal (1 subgoal):
 1. (- a) \<cdot> b = - a \<cdot> b
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<zero> \<cdot> b = (a - a) \<cdot> b

goal (1 subgoal):
 1. (- a) \<cdot> b = - a \<cdot> b
[PROOF STEP]
have "\<dots> = a \<cdot> b + (- a) \<cdot> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a - a) \<cdot> b = a \<cdot> b + (- a) \<cdot> b
[PROOF STEP]
by (simp add: distributive del: additive.invertible_right_inverse)
[PROOF STATE]
proof (state)
this:
(a - a) \<cdot> b = a \<cdot> b + (- a) \<cdot> b

goal (1 subgoal):
 1. (- a) \<cdot> b = - a \<cdot> b
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<zero> = a \<cdot> b + (- a) \<cdot> b
[PROOF STEP]
have "- a \<cdot> b + \<zero> = - a \<cdot> b + a \<cdot> b + (- a) \<cdot> b"
[PROOF STATE]
proof (prove)
using this:
\<zero> = a \<cdot> b + (- a) \<cdot> b

goal (1 subgoal):
 1. - a \<cdot> b + \<zero> = - a \<cdot> b + a \<cdot> b + (- a) \<cdot> b
[PROOF STEP]
by (simp add: additive.associative del: additive.invertible_left_inverse)
[PROOF STATE]
proof (state)
this:
- a \<cdot> b + \<zero> = - a \<cdot> b + a \<cdot> b + (- a) \<cdot> b

goal (1 subgoal):
 1. (- a) \<cdot> b = - a \<cdot> b
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
- a \<cdot> b + \<zero> = - a \<cdot> b + a \<cdot> b + (- a) \<cdot> b
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
- a \<cdot> b + \<zero> = - a \<cdot> b + a \<cdot> b + (- a) \<cdot> b

goal (1 subgoal):
 1. (- a) \<cdot> b = - a \<cdot> b
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(- a) \<cdot> b = - a \<cdot> b

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Max_mono_on2: "
  \<lbrakk> mono_on f A; A \<noteq> {}; finite A \<rbrakk> \<Longrightarrow> Max (f ` A) = f (Max A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>SetInterval2.mono_on f A; A \<noteq> {}; finite A\<rbrakk> \<Longrightarrow> Max (f ` A) = f (Max A)
[PROOF STEP]
by (rule Max_mono_on, blast+)


[STATEMENT]
lemma maybe_not_invalid: "(\<not>? x = invalid) = (x = invalid)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<not>? x = invalid) = (x = invalid)
[PROOF STEP]
by (metis maybe_double_negation maybe_not.simps(3))


[STATEMENT]
lemma induced_vector_additive :
  "v \<in> V \<Longrightarrow> v' \<in> V
        \<Longrightarrow> induced_vector (v+v') = induced_vector v + induced_vector v'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>v \<in> V; v' \<in> V\<rbrakk> \<Longrightarrow> induced_vector (v + v') = induced_vector v + induced_vector v'
[PROOF STEP]
using add_closed induced_vector_def FG_proj_in_FG smult_distrib_left
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?g \<in> V; ?h \<in> V\<rbrakk> \<Longrightarrow> ?g + ?h \<in> V
induced_vector ?v \<equiv> if ?v \<in> V then \<lambda>y. if y \<in> FH then FG_proj y \<cdot> ?v else (0::'v) else 0
FG_proj ?x \<in> FG
\<lbrakk>?r \<in> FG; ?m \<in> V; ?n \<in> V\<rbrakk> \<Longrightarrow> ?r \<cdot> (?m + ?n) = ?r \<cdot> ?m + ?r \<cdot> ?n

goal (1 subgoal):
 1. \<lbrakk>v \<in> V; v' \<in> V\<rbrakk> \<Longrightarrow> induced_vector (v + v') = induced_vector v + induced_vector v'
[PROOF STEP]
by auto


[STATEMENT]
lemma jump_ok_append [simp]:
  "jump_ok (xs @ xs') n n' \<longleftrightarrow> jump_ok xs n (n' + length xs') \<and> jump_ok xs' (n + length xs) n'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jump_ok (xs @ xs') n n' = (jump_ok xs n (n' + length xs') \<and> jump_ok xs' (n + length xs) n')
[PROOF STEP]
apply(induct xs arbitrary: n)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>n. jump_ok ([] @ xs') n n' = (jump_ok [] n (n' + length xs') \<and> jump_ok xs' (n + length []) n')
 2. \<And>a xs n. (\<And>n. jump_ok (xs @ xs') n n' = (jump_ok xs n (n' + length xs') \<and> jump_ok xs' (n + length xs) n')) \<Longrightarrow> jump_ok ((a # xs) @ xs') n n' = (jump_ok (a # xs) n (n' + length xs') \<and> jump_ok xs' (n + length (a # xs)) n')
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a xs n. (\<And>n. jump_ok (xs @ xs') n n' = (jump_ok xs n (n' + length xs') \<and> jump_ok xs' (n + length xs) n')) \<Longrightarrow> jump_ok ((a # xs) @ xs') n n' = (jump_ok (a # xs) n (n' + length xs') \<and> jump_ok xs' (n + length (a # xs)) n')
[PROOF STEP]
apply(auto split: instr.split)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma ordinal_oLog_monoR: "x \<le> y \<Longrightarrow> oLog b x \<le> oLog b y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<le> y \<Longrightarrow> oLog b x \<le> oLog b y
[PROOF STEP]
by (erule monoD[OF ordinal_mono_oLog])


[STATEMENT]
lemma spmf_bind_leI:
  assumes "\<And>y. y \<in> set_spmf p \<Longrightarrow> spmf (f y) x \<le> r"
  and "0 \<le> r"
  shows "spmf (bind_spmf p f) x \<le> r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. spmf (p \<bind> f) x \<le> r
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. spmf (p \<bind> f) x \<le> r
[PROOF STEP]
have "ennreal (spmf (bind_spmf p f) x) = \<integral>\<^sup>+ y. spmf (f y) x \<partial>measure_spmf p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ennreal (spmf (p \<bind> f) x) = \<integral>\<^sup>+ xa. ennreal (spmf (f xa) x) \<partial>measure_spmf p
[PROOF STEP]
by(rule ennreal_spmf_bind)
[PROOF STATE]
proof (state)
this:
ennreal (spmf (p \<bind> f) x) = \<integral>\<^sup>+ xa. ennreal (spmf (f xa) x) \<partial>measure_spmf p

goal (1 subgoal):
 1. spmf (p \<bind> f) x \<le> r
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
ennreal (spmf (p \<bind> f) x) = \<integral>\<^sup>+ xa. ennreal (spmf (f xa) x) \<partial>measure_spmf p

goal (1 subgoal):
 1. spmf (p \<bind> f) x \<le> r
[PROOF STEP]
have "\<dots> \<le> \<integral>\<^sup>+ y. r \<partial>measure_spmf p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ xa. ennreal (spmf (f xa) x) \<partial>measure_spmf p \<le> \<integral>\<^sup>+ x. ennreal r \<partial>measure_spmf p
[PROOF STEP]
by(rule nn_integral_mono_AE)(simp add: assms)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ xa. ennreal (spmf (f xa) x) \<partial>measure_spmf p \<le> \<integral>\<^sup>+ x. ennreal r \<partial>measure_spmf p

goal (1 subgoal):
 1. spmf (p \<bind> f) x \<le> r
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ xa. ennreal (spmf (f xa) x) \<partial>measure_spmf p \<le> \<integral>\<^sup>+ x. ennreal r \<partial>measure_spmf p

goal (1 subgoal):
 1. spmf (p \<bind> f) x \<le> r
[PROOF STEP]
have "\<dots> \<le> r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal r \<partial>measure_spmf p \<le> ennreal r
[PROOF STEP]
using assms measure_spmf.emeasure_space_le_1
[PROOF STATE]
proof (prove)
using this:
?y \<in> set_spmf p \<Longrightarrow> spmf (f ?y) x \<le> r
0 \<le> r
emeasure (measure_spmf ?p) (space (measure_spmf ?p)) \<le> 1

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal r \<partial>measure_spmf p \<le> ennreal r
[PROOF STEP]
by(auto simp add: measure_spmf.emeasure_eq_measure intro!: mult_left_le)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. ennreal r \<partial>measure_spmf p \<le> ennreal r

goal (1 subgoal):
 1. spmf (p \<bind> f) x \<le> r
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
ennreal (spmf (p \<bind> f) x) \<le> ennreal r
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
ennreal (spmf (p \<bind> f) x) \<le> ennreal r

goal (1 subgoal):
 1. spmf (p \<bind> f) x \<le> r
[PROOF STEP]
using assms(2)
[PROOF STATE]
proof (prove)
using this:
ennreal (spmf (p \<bind> f) x) \<le> ennreal r
0 \<le> r

goal (1 subgoal):
 1. spmf (p \<bind> f) x \<le> r
[PROOF STEP]
by(simp)
[PROOF STATE]
proof (state)
this:
spmf (p \<bind> f) x \<le> r

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma convex_imp_Borsukian:
  fixes S :: "'a::real_normed_vector set"
  shows "convex S \<Longrightarrow> Borsukian S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convex S \<Longrightarrow> Borsukian S
[PROOF STEP]
by (meson Borsukian_def convex_imp_contractible nullhomotopic_from_contractible)


[STATEMENT]
lemma cnj_of_real [simp]: "cnj(octo_of_real x) = octo_of_real x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Octonions.cnj (octo_of_real x) = octo_of_real x
[PROOF STEP]
using  octo_eq_iff
[PROOF STATE]
proof (prove)
using this:
(?x = ?y) = (Ree ?x = Ree ?y \<and> Im1 ?x = Im1 ?y \<and> Im2 ?x = Im2 ?y \<and> Im3 ?x = Im3 ?y \<and> Im4 ?x = Im4 ?y \<and> Im5 ?x = Im5 ?y \<and> Im6 ?x = Im6 ?y \<and> Im7 ?x = Im7 ?y)

goal (1 subgoal):
 1. Octonions.cnj (octo_of_real x) = octo_of_real x
[PROOF STEP]
by (simp add: octo_of_real_eq_Octo)


[STATEMENT]
lemma model_to_dimacs_model_sound_max_var:
  "(\<forall>v\<in>atoms f. 0 < v) \<Longrightarrow> is_cnf f \<Longrightarrow> M \<Turnstile> f \<Longrightarrow>
     dimacs_model (model_to_dimacs_model M [(1::nat)..<(find_max (formula_vars f) + 2)])
                  (cnf_to_dimacs f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>v\<in>atoms f. 0 < v; is_cnf f; M \<Turnstile> f\<rbrakk> \<Longrightarrow> dimacs_model (model_to_dimacs_model M [1..<find_max (formula_vars f) + 2]) (cnf_to_dimacs f)
[PROOF STEP]
using le_imp_less_Suc[unfolded Suc_eq_plus1, OF max_var]
[PROOF STATE]
proof (prove)
using this:
?m \<in> atoms ?f1 \<Longrightarrow> ?m < find_max (formula_vars ?f1) + 1

goal (1 subgoal):
 1. \<lbrakk>\<forall>v\<in>atoms f. 0 < v; is_cnf f; M \<Turnstile> f\<rbrakk> \<Longrightarrow> dimacs_model (model_to_dimacs_model M [1..<find_max (formula_vars f) + 2]) (cnf_to_dimacs f)
[PROOF STEP]
by (fastforce intro!: model_to_dimacs_model_sound)


[STATEMENT]
lemma Image_empty_trancl_Image_empty:
  "R `` {v} = {} \<Longrightarrow> R\<^sup>+ `` {v} = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R `` {v} = {} \<Longrightarrow> R\<^sup>+ `` {v} = {}
[PROOF STEP]
unfolding Image_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {y. \<exists>x\<in>{v}. (x, y) \<in> R} = {} \<Longrightarrow> {y. \<exists>x\<in>{v}. (x, y) \<in> R\<^sup>+} = {}
[PROOF STEP]
by (auto elim: converse_tranclE)