[STATEMENT]
lemma four_block_diag_similar:
  assumes "unitarily_equiv A1 B1 U1"
  and "unitarily_equiv A2 B2 U2"
  and "dim_row A1 = dim_col A1"
  and "dim_row A2 = dim_col A2"
shows "similar_mat_wit
  (four_block_diag A1 A2)
  (four_block_diag B1 B2)
  (four_block_diag U1 U2)
  (Complex_Matrix.adjoint (four_block_diag U1 U2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. similar_mat_wit (four_block_diag A1 A2) (four_block_diag B1 B2) (four_block_diag U1 U2) (Complex_Matrix.adjoint (four_block_diag U1 U2))
[PROOF STEP]
unfolding similar_mat_wit_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. let n = dim_row (four_block_diag A1 A2) in {four_block_diag A1 A2, four_block_diag B1 B2, four_block_diag U1 U2, Complex_Matrix.adjoint (four_block_diag U1 U2)} \<subseteq> carrier_mat n n \<and> four_block_diag U1 U2 * Complex_Matrix.adjoint (four_block_diag U1 U2) = 1\<^sub>m n \<and> Complex_Matrix.adjoint (four_block_diag U1 U2) * four_block_diag U1 U2 = 1\<^sub>m n \<and> four_block_diag A1 A2 = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
proof (simp add: Let_def, intro conjI)
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. four_block_diag A1 A2 \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
 2. four_block_diag B1 B2 \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
 3. four_block_diag U1 U2 \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
 4. Complex_Matrix.adjoint (four_block_diag U1 U2) \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
 5. four_block_diag U1 U2 * Complex_Matrix.adjoint (four_block_diag U1 U2) = 1\<^sub>m (dim_row A1 + dim_row A2)
 6. Complex_Matrix.adjoint (four_block_diag U1 U2) * four_block_diag U1 U2 = 1\<^sub>m (dim_row A1 + dim_row A2)
 7. four_block_diag A1 A2 = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
define n where "n = dim_row A1 + dim_row A2"
[PROOF STATE]
proof (state)
this:
n = dim_row A1 + dim_row A2

goal (7 subgoals):
 1. four_block_diag A1 A2 \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
 2. four_block_diag B1 B2 \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
 3. four_block_diag U1 U2 \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
 4. Complex_Matrix.adjoint (four_block_diag U1 U2) \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
 5. four_block_diag U1 U2 * Complex_Matrix.adjoint (four_block_diag U1 U2) = 1\<^sub>m (dim_row A1 + dim_row A2)
 6. Complex_Matrix.adjoint (four_block_diag U1 U2) * four_block_diag U1 U2 = 1\<^sub>m (dim_row A1 + dim_row A2)
 7. four_block_diag A1 A2 = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
show "four_block_diag A1 A2 \<in> carrier_mat n n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_diag A1 A2 \<in> carrier_mat n n
[PROOF STEP]
unfolding n_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_diag A1 A2 \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
unitarily_equiv A1 B1 U1
unitarily_equiv A2 B2 U2
dim_row A1 = dim_col A1
dim_row A2 = dim_col A2

goal (1 subgoal):
 1. four_block_diag A1 A2 \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
four_block_diag A1 A2 \<in> carrier_mat n n

goal (6 subgoals):
 1. four_block_diag B1 B2 \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
 2. four_block_diag U1 U2 \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
 3. Complex_Matrix.adjoint (four_block_diag U1 U2) \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
 4. four_block_diag U1 U2 * Complex_Matrix.adjoint (four_block_diag U1 U2) = 1\<^sub>m (dim_row A1 + dim_row A2)
 5. Complex_Matrix.adjoint (four_block_diag U1 U2) * four_block_diag U1 U2 = 1\<^sub>m (dim_row A1 + dim_row A2)
 6. four_block_diag A1 A2 = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
show "four_block_diag B1 B2 \<in> carrier_mat n n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_diag B1 B2 \<in> carrier_mat n n
[PROOF STEP]
unfolding n_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_diag B1 B2 \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
unitarily_equiv A1 B1 U1
unitarily_equiv A2 B2 U2
dim_row A1 = dim_col A1
dim_row A2 = dim_col A2

goal (1 subgoal):
 1. four_block_diag B1 B2 \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
[PROOF STEP]
by (metis carrier_matI four_block_carrier_mat unitarily_equiv_carrier(1))
[PROOF STATE]
proof (state)
this:
four_block_diag B1 B2 \<in> carrier_mat n n

goal (5 subgoals):
 1. four_block_diag U1 U2 \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
 2. Complex_Matrix.adjoint (four_block_diag U1 U2) \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
 3. four_block_diag U1 U2 * Complex_Matrix.adjoint (four_block_diag U1 U2) = 1\<^sub>m (dim_row A1 + dim_row A2)
 4. Complex_Matrix.adjoint (four_block_diag U1 U2) * four_block_diag U1 U2 = 1\<^sub>m (dim_row A1 + dim_row A2)
 5. four_block_diag A1 A2 = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
show u: "four_block_diag U1 U2 \<in> carrier_mat n n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_diag U1 U2 \<in> carrier_mat n n
[PROOF STEP]
unfolding n_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_diag U1 U2 \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
unitarily_equiv A1 B1 U1
unitarily_equiv A2 B2 U2
dim_row A1 = dim_col A1
dim_row A2 = dim_col A2

goal (1 subgoal):
 1. four_block_diag U1 U2 \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
[PROOF STEP]
by (metis carrier_matI four_block_carrier_mat unitarily_equiv_carrier(2))
[PROOF STATE]
proof (state)
this:
four_block_diag U1 U2 \<in> carrier_mat n n

goal (4 subgoals):
 1. Complex_Matrix.adjoint (four_block_diag U1 U2) \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
 2. four_block_diag U1 U2 * Complex_Matrix.adjoint (four_block_diag U1 U2) = 1\<^sub>m (dim_row A1 + dim_row A2)
 3. Complex_Matrix.adjoint (four_block_diag U1 U2) * four_block_diag U1 U2 = 1\<^sub>m (dim_row A1 + dim_row A2)
 4. four_block_diag A1 A2 = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
thus cu: "Complex_Matrix.adjoint (four_block_diag U1 U2) \<in> carrier_mat n n"
[PROOF STATE]
proof (prove)
using this:
four_block_diag U1 U2 \<in> carrier_mat n n

goal (1 subgoal):
 1. Complex_Matrix.adjoint (four_block_diag U1 U2) \<in> carrier_mat n n
[PROOF STEP]
unfolding n_def
[PROOF STATE]
proof (prove)
using this:
four_block_diag U1 U2 \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)

goal (1 subgoal):
 1. Complex_Matrix.adjoint (four_block_diag U1 U2) \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
[PROOF STEP]
using adjoint_dim'
[PROOF STATE]
proof (prove)
using this:
four_block_diag U1 U2 \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
?A \<in> carrier_mat ?n ?m \<Longrightarrow> Complex_Matrix.adjoint ?A \<in> carrier_mat ?m ?n

goal (1 subgoal):
 1. Complex_Matrix.adjoint (four_block_diag U1 U2) \<in> carrier_mat (dim_row A1 + dim_row A2) (dim_row A1 + dim_row A2)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Complex_Matrix.adjoint (four_block_diag U1 U2) \<in> carrier_mat n n

goal (3 subgoals):
 1. four_block_diag U1 U2 * Complex_Matrix.adjoint (four_block_diag U1 U2) = 1\<^sub>m (dim_row A1 + dim_row A2)
 2. Complex_Matrix.adjoint (four_block_diag U1 U2) * four_block_diag U1 U2 = 1\<^sub>m (dim_row A1 + dim_row A2)
 3. four_block_diag A1 A2 = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
show "four_block_diag U1 U2*Complex_Matrix.adjoint (four_block_diag U1 U2) =
    1\<^sub>m n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_diag U1 U2 * Complex_Matrix.adjoint (four_block_diag U1 U2) = 1\<^sub>m n
[PROOF STEP]
unfolding n_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_diag U1 U2 * Complex_Matrix.adjoint (four_block_diag U1 U2) = 1\<^sub>m (dim_row A1 + dim_row A2)
[PROOF STEP]
using u assms four_block_diag_unitary n_def
      unitarily_equiv_def unitary_simps(2)
[PROOF STATE]
proof (prove)
using this:
four_block_diag U1 U2 \<in> carrier_mat n n
unitarily_equiv A1 B1 U1
unitarily_equiv A2 B2 U2
dim_row A1 = dim_col A1
dim_row A2 = dim_col A2
\<lbrakk>Complex_Matrix.unitary ?U1.0; Complex_Matrix.unitary ?U2.0\<rbrakk> \<Longrightarrow> Complex_Matrix.unitary (four_block_diag ?U1.0 ?U2.0)
n = dim_row A1 + dim_row A2
unitarily_equiv ?A ?B ?U \<equiv> Complex_Matrix.unitary ?U \<and> similar_mat_wit ?A ?B ?U (Complex_Matrix.adjoint ?U)
\<lbrakk>?A \<in> carrier_mat ?n ?n; Complex_Matrix.unitary ?A\<rbrakk> \<Longrightarrow> ?A * Complex_Matrix.adjoint ?A = 1\<^sub>m ?n

goal (1 subgoal):
 1. four_block_diag U1 U2 * Complex_Matrix.adjoint (four_block_diag U1 U2) = 1\<^sub>m (dim_row A1 + dim_row A2)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
four_block_diag U1 U2 * Complex_Matrix.adjoint (four_block_diag U1 U2) = 1\<^sub>m n

goal (2 subgoals):
 1. Complex_Matrix.adjoint (four_block_diag U1 U2) * four_block_diag U1 U2 = 1\<^sub>m (dim_row A1 + dim_row A2)
 2. four_block_diag A1 A2 = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
thus "Complex_Matrix.adjoint (four_block_diag U1 U2)*four_block_diag U1 U2 =
    1\<^sub>m n"
[PROOF STATE]
proof (prove)
using this:
four_block_diag U1 U2 * Complex_Matrix.adjoint (four_block_diag U1 U2) = 1\<^sub>m n

goal (1 subgoal):
 1. Complex_Matrix.adjoint (four_block_diag U1 U2) * four_block_diag U1 U2 = 1\<^sub>m n
[PROOF STEP]
using cu mat_mult_left_right_inverse u
[PROOF STATE]
proof (prove)
using this:
four_block_diag U1 U2 * Complex_Matrix.adjoint (four_block_diag U1 U2) = 1\<^sub>m n
Complex_Matrix.adjoint (four_block_diag U1 U2) \<in> carrier_mat n n
\<lbrakk>?A \<in> carrier_mat ?n ?n; ?B \<in> carrier_mat ?n ?n; ?A * ?B = 1\<^sub>m ?n\<rbrakk> \<Longrightarrow> ?B * ?A = 1\<^sub>m ?n
four_block_diag U1 U2 \<in> carrier_mat n n

goal (1 subgoal):
 1. Complex_Matrix.adjoint (four_block_diag U1 U2) * four_block_diag U1 U2 = 1\<^sub>m n
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Complex_Matrix.adjoint (four_block_diag U1 U2) * four_block_diag U1 U2 = 1\<^sub>m n

goal (1 subgoal):
 1. four_block_diag A1 A2 = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
have "four_block_diag A1 A2 =
    four_block_diag (U1 * B1 * (Complex_Matrix.adjoint U1))
    (U2 * B2 * (Complex_Matrix.adjoint U2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_diag A1 A2 = four_block_diag (U1 * B1 * Complex_Matrix.adjoint U1) (U2 * B2 * Complex_Matrix.adjoint U2)
[PROOF STEP]
using assms unitarily_equiv_eq
[PROOF STATE]
proof (prove)
using this:
unitarily_equiv A1 B1 U1
unitarily_equiv A2 B2 U2
dim_row A1 = dim_col A1
dim_row A2 = dim_col A2
unitarily_equiv ?A ?B ?U \<Longrightarrow> ?A = ?U * ?B * Complex_Matrix.adjoint ?U

goal (1 subgoal):
 1. four_block_diag A1 A2 = four_block_diag (U1 * B1 * Complex_Matrix.adjoint U1) (U2 * B2 * Complex_Matrix.adjoint U2)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
four_block_diag A1 A2 = four_block_diag (U1 * B1 * Complex_Matrix.adjoint U1) (U2 * B2 * Complex_Matrix.adjoint U2)

goal (1 subgoal):
 1. four_block_diag A1 A2 = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
four_block_diag A1 A2 = four_block_diag (U1 * B1 * Complex_Matrix.adjoint U1) (U2 * B2 * Complex_Matrix.adjoint U2)

goal (1 subgoal):
 1. four_block_diag A1 A2 = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
have "... = (four_block_diag (U1*B1) (U2*B2)) *
    (four_block_diag (Complex_Matrix.adjoint U1)
    (Complex_Matrix.adjoint U2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_diag (U1 * B1 * Complex_Matrix.adjoint U1) (U2 * B2 * Complex_Matrix.adjoint U2) = four_block_diag (U1 * B1) (U2 * B2) * four_block_diag (Complex_Matrix.adjoint U1) (Complex_Matrix.adjoint U2)
[PROOF STEP]
proof (rule mult_four_block_diag[symmetric])
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. U1 * B1 \<in> carrier_mat ?nr1.0 ?n1.0
 2. U2 * B2 \<in> carrier_mat ?nr2.0 ?n2.0
 3. Complex_Matrix.adjoint U1 \<in> carrier_mat ?n1.0 ?nc1.0
 4. Complex_Matrix.adjoint U2 \<in> carrier_mat ?n2.0 ?nc2.0
[PROOF STEP]
show "U1 * B1 \<in> carrier_mat (dim_row A1) (dim_row A1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. U1 * B1 \<in> carrier_mat (dim_row A1) (dim_row A1)
[PROOF STEP]
by (metis assms(1) assms(3) carrier_mat_triv mult_carrier_mat
          unitarily_equiv_carrier(1) unitarily_equiv_carrier(2))
[PROOF STATE]
proof (state)
this:
U1 * B1 \<in> carrier_mat (dim_row A1) (dim_row A1)

goal (3 subgoals):
 1. U2 * B2 \<in> carrier_mat ?nr2.0 ?n2.0
 2. Complex_Matrix.adjoint U1 \<in> carrier_mat (dim_row A1) ?nc1.0
 3. Complex_Matrix.adjoint U2 \<in> carrier_mat ?n2.0 ?nc2.0
[PROOF STEP]
show "U2 * B2 \<in> carrier_mat (dim_row A2) (dim_row A2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. U2 * B2 \<in> carrier_mat (dim_row A2) (dim_row A2)
[PROOF STEP]
by (metis assms(2) assms(4) carrier_mat_triv mult_carrier_mat
          unitarily_equiv_carrier(1) unitarily_equiv_carrier(2))
[PROOF STATE]
proof (state)
this:
U2 * B2 \<in> carrier_mat (dim_row A2) (dim_row A2)

goal (2 subgoals):
 1. Complex_Matrix.adjoint U1 \<in> carrier_mat (dim_row A1) ?nc1.0
 2. Complex_Matrix.adjoint U2 \<in> carrier_mat (dim_row A2) ?nc2.0
[PROOF STEP]
show "Complex_Matrix.adjoint U1 \<in> carrier_mat (dim_row A1) (dim_row A1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Complex_Matrix.adjoint U1 \<in> carrier_mat (dim_row A1) (dim_row A1)
[PROOF STEP]
by (metis Complex_Matrix.unitary_def adjoint_dim assms(1)
          index_mult_mat(2) unitarily_equivD(1) unitarily_equiv_eq)
[PROOF STATE]
proof (state)
this:
Complex_Matrix.adjoint U1 \<in> carrier_mat (dim_row A1) (dim_row A1)

goal (1 subgoal):
 1. Complex_Matrix.adjoint U2 \<in> carrier_mat (dim_row A2) ?nc2.0
[PROOF STEP]
show "Complex_Matrix.adjoint U2 \<in> carrier_mat (dim_row A2) (dim_row A2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Complex_Matrix.adjoint U2 \<in> carrier_mat (dim_row A2) (dim_row A2)
[PROOF STEP]
by (meson assms(2) carrier_mat_triv similar_mat_witD2(7)
          unitarily_equiv_def)
[PROOF STATE]
proof (state)
this:
Complex_Matrix.adjoint U2 \<in> carrier_mat (dim_row A2) (dim_row A2)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
four_block_diag (U1 * B1 * Complex_Matrix.adjoint U1) (U2 * B2 * Complex_Matrix.adjoint U2) = four_block_diag (U1 * B1) (U2 * B2) * four_block_diag (Complex_Matrix.adjoint U1) (Complex_Matrix.adjoint U2)

goal (1 subgoal):
 1. four_block_diag A1 A2 = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
four_block_diag (U1 * B1 * Complex_Matrix.adjoint U1) (U2 * B2 * Complex_Matrix.adjoint U2) = four_block_diag (U1 * B1) (U2 * B2) * four_block_diag (Complex_Matrix.adjoint U1) (Complex_Matrix.adjoint U2)

goal (1 subgoal):
 1. four_block_diag A1 A2 = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
have "... = four_block_diag U1 U2 * four_block_diag B1 B2 *
    Complex_Matrix.adjoint (four_block_diag U1 U2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_diag (U1 * B1) (U2 * B2) * four_block_diag (Complex_Matrix.adjoint U1) (Complex_Matrix.adjoint U2) = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. four_block_diag (U1 * B1) (U2 * B2) * four_block_diag (Complex_Matrix.adjoint U1) (Complex_Matrix.adjoint U2) = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
have "four_block_diag (U1*B1) (U2*B2) =
      four_block_diag U1 U2 * four_block_diag B1 B2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_diag (U1 * B1) (U2 * B2) = four_block_diag U1 U2 * four_block_diag B1 B2
[PROOF STEP]
proof (rule mult_four_block_diag[symmetric])
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. U1 \<in> carrier_mat ?nr1.0 ?n1.0
 2. U2 \<in> carrier_mat ?nr2.0 ?n2.0
 3. B1 \<in> carrier_mat ?n1.0 ?nc1.0
 4. B2 \<in> carrier_mat ?n2.0 ?nc2.0
[PROOF STEP]
show "U1 \<in> carrier_mat (dim_row A1) (dim_row A1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. U1 \<in> carrier_mat (dim_row A1) (dim_row A1)
[PROOF STEP]
by (metis assms(1) assms(3) carrier_mat_triv
            unitarily_equiv_carrier(2))
[PROOF STATE]
proof (state)
this:
U1 \<in> carrier_mat (dim_row A1) (dim_row A1)

goal (3 subgoals):
 1. U2 \<in> carrier_mat ?nr2.0 ?n2.0
 2. B1 \<in> carrier_mat (dim_row A1) ?nc1.0
 3. B2 \<in> carrier_mat ?n2.0 ?nc2.0
[PROOF STEP]
show "B1 \<in> carrier_mat (dim_row A1) (dim_row A1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B1 \<in> carrier_mat (dim_row A1) (dim_row A1)
[PROOF STEP]
by (metis assms(1) assms(3) carrier_mat_triv
            unitarily_equiv_carrier(1))
[PROOF STATE]
proof (state)
this:
B1 \<in> carrier_mat (dim_row A1) (dim_row A1)

goal (2 subgoals):
 1. U2 \<in> carrier_mat ?nr2.0 ?n2.0
 2. B2 \<in> carrier_mat ?n2.0 ?nc2.0
[PROOF STEP]
show "U2 \<in> carrier_mat (dim_row A2) (dim_row A2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. U2 \<in> carrier_mat (dim_row A2) (dim_row A2)
[PROOF STEP]
by (metis assms(2) assms(4) carrier_mat_triv
            unitarily_equiv_carrier(2))
[PROOF STATE]
proof (state)
this:
U2 \<in> carrier_mat (dim_row A2) (dim_row A2)

goal (1 subgoal):
 1. B2 \<in> carrier_mat (dim_row A2) ?nc2.0
[PROOF STEP]
show "B2 \<in> carrier_mat (dim_row A2) (dim_row A2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B2 \<in> carrier_mat (dim_row A2) (dim_row A2)
[PROOF STEP]
by (metis assms(2) assms(4) carrier_mat_triv
            unitarily_equiv_carrier(1))
[PROOF STATE]
proof (state)
this:
B2 \<in> carrier_mat (dim_row A2) (dim_row A2)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
four_block_diag (U1 * B1) (U2 * B2) = four_block_diag U1 U2 * four_block_diag B1 B2

goal (1 subgoal):
 1. four_block_diag (U1 * B1) (U2 * B2) * four_block_diag (Complex_Matrix.adjoint U1) (Complex_Matrix.adjoint U2) = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
four_block_diag (U1 * B1) (U2 * B2) = four_block_diag U1 U2 * four_block_diag B1 B2

goal (1 subgoal):
 1. four_block_diag (U1 * B1) (U2 * B2) * four_block_diag (Complex_Matrix.adjoint U1) (Complex_Matrix.adjoint U2) = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
have "four_block_diag (Complex_Matrix.adjoint U1)
     (Complex_Matrix.adjoint U2) =
      Complex_Matrix.adjoint (four_block_diag U1 U2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_diag (Complex_Matrix.adjoint U1) (Complex_Matrix.adjoint U2) = Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
by (rule four_block_diag_adjoint[symmetric])
[PROOF STATE]
proof (state)
this:
four_block_diag (Complex_Matrix.adjoint U1) (Complex_Matrix.adjoint U2) = Complex_Matrix.adjoint (four_block_diag U1 U2)

goal (1 subgoal):
 1. four_block_diag (U1 * B1) (U2 * B2) * four_block_diag (Complex_Matrix.adjoint U1) (Complex_Matrix.adjoint U2) = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
four_block_diag (U1 * B1) (U2 * B2) = four_block_diag U1 U2 * four_block_diag B1 B2
four_block_diag (Complex_Matrix.adjoint U1) (Complex_Matrix.adjoint U2) = Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
four_block_diag (U1 * B1) (U2 * B2) = four_block_diag U1 U2 * four_block_diag B1 B2
four_block_diag (Complex_Matrix.adjoint U1) (Complex_Matrix.adjoint U2) = Complex_Matrix.adjoint (four_block_diag U1 U2)

goal (1 subgoal):
 1. four_block_diag (U1 * B1) (U2 * B2) * four_block_diag (Complex_Matrix.adjoint U1) (Complex_Matrix.adjoint U2) = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
four_block_diag (U1 * B1) (U2 * B2) * four_block_diag (Complex_Matrix.adjoint U1) (Complex_Matrix.adjoint U2) = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
four_block_diag (U1 * B1) (U2 * B2) * four_block_diag (Complex_Matrix.adjoint U1) (Complex_Matrix.adjoint U2) = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)

goal (1 subgoal):
 1. four_block_diag A1 A2 = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
four_block_diag A1 A2 = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
show "four_block_diag A1 A2 =
    four_block_diag U1 U2 * four_block_diag B1 B2 *
    Complex_Matrix.adjoint (four_block_diag U1 U2)"
[PROOF STATE]
proof (prove)
using this:
four_block_diag A1 A2 = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)

goal (1 subgoal):
 1. four_block_diag A1 A2 = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
four_block_diag A1 A2 = four_block_diag U1 U2 * four_block_diag B1 B2 * Complex_Matrix.adjoint (four_block_diag U1 U2)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in Ring) sop_assoc:"\<lbrakk>ipp_cond1 (s_set R s A) i;
    ipp_cond2 z (s_set R s A) i f; ipp_cond3 z i;
     inv_ipp z i f (s_set R s A); zeroA z i f (s_set R s A) z;
      sop_distr2 R s f i (s_set R s A) z;
       sop_assoc R s (aug_pm_set z i (s_set R s A));
        sop_inv R s i (s_set R s A); sop_z R s z;
         sop_one R s (aug_pm_set z i (s_set R s A))\<rbrakk> \<Longrightarrow>
   \<forall>a\<in>carrier R. \<forall>b\<in>carrier R.
      \<forall>x\<in>addition_set f (aug_pm_set z i (s_set R s A)).
                           a \<^sub>s\<cdot> (b \<^sub>s\<cdot> x) = ( a \<cdot>\<^sub>r b) \<^sub>s\<cdot> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>ipp_cond1 (s_set R s A) i; ipp_cond2 z (s_set R s A) i f; ipp_cond3 z i; inv_ipp z i f (s_set R s A); zeroA z i f (s_set R s A) z; sop_distr2 R s f i (s_set R s A) z; sop_assoc R s (aug_pm_set z i (s_set R s A)); sop_inv R s i (s_set R s A); sop_z R s z; sop_one R s (aug_pm_set z i (s_set R s A))\<rbrakk> \<Longrightarrow> \<forall>a\<in>carrier R. \<forall>b\<in>carrier R. \<forall>x\<in>addition_set f (aug_pm_set z i (s_set R s A)). a \<^sub>s\<cdot> (b \<^sub>s\<cdot> x) = a \<cdot>\<^sub>r b \<^sub>s\<cdot> x
[PROOF STEP]
apply (rule ballI)+
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b x. \<lbrakk>ipp_cond1 (s_set R s A) i; ipp_cond2 z (s_set R s A) i f; ipp_cond3 z i; inv_ipp z i f (s_set R s A); zeroA z i f (s_set R s A) z; sop_distr2 R s f i (s_set R s A) z; sop_assoc R s (aug_pm_set z i (s_set R s A)); sop_inv R s i (s_set R s A); sop_z R s z; sop_one R s (aug_pm_set z i (s_set R s A)); a \<in> carrier R; b \<in> carrier R; x \<in> addition_set f (aug_pm_set z i (s_set R s A))\<rbrakk> \<Longrightarrow> a \<^sub>s\<cdot> (b \<^sub>s\<cdot> x) = a \<cdot>\<^sub>r b \<^sub>s\<cdot> x
[PROOF STEP]
apply (simp add:addition_set_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b x. \<lbrakk>ipp_cond1 (s_set R s A) i; ipp_cond2 z (s_set R s A) i f; ipp_cond3 z i; inv_ipp z i f (s_set R s A); zeroA z i f (s_set R s A) z; sop_distr2 R s f i (s_set R s A) z; sop_assoc R s (aug_pm_set z i (s_set R s A)); sop_inv R s i (s_set R s A); sop_z R s z; sop_one R s (aug_pm_set z i (s_set R s A)); a \<in> carrier R; b \<in> carrier R; \<exists>xa. (\<exists>n. xa = add_set f (aug_pm_set z i (s_set R s A)) n) \<and> x \<in> xa\<rbrakk> \<Longrightarrow> a \<^sub>s\<cdot> (b \<^sub>s\<cdot> x) = a \<cdot>\<^sub>r b \<^sub>s\<cdot> x
[PROOF STEP]
apply (erule exE, erule conjE, erule exE, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b x xa n. \<lbrakk>ipp_cond1 (s_set R s A) i; ipp_cond2 z (s_set R s A) i f; ipp_cond3 z i; inv_ipp z i f (s_set R s A); zeroA z i f (s_set R s A) z; sop_distr2 R s f i (s_set R s A) z; sop_assoc R s (aug_pm_set z i (s_set R s A)); sop_inv R s i (s_set R s A); sop_z R s z; sop_one R s (aug_pm_set z i (s_set R s A)); a \<in> carrier R; b \<in> carrier R; x \<in> add_set f (aug_pm_set z i (s_set R s A)) n; xa = add_set f (aug_pm_set z i (s_set R s A)) n\<rbrakk> \<Longrightarrow> a \<^sub>s\<cdot> (b \<^sub>s\<cdot> x) = a \<cdot>\<^sub>r b \<^sub>s\<cdot> x
[PROOF STEP]
apply (simp add:sop_assocTr)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma row_mat1: assumes i: "i < nr"
  shows "row (mat1I ze on nr) i = vec1I ze on nr i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. row (mat1I ze on nr) i = vec1I ze on nr i
[PROOF STEP]
by (simp only: col_transpose_is_row[OF mat1 i, symmetric],
  simp only: transpose_mat1,
  simp only: col_mat1[OF i])


[STATEMENT]
lemma join_meet_distrib2: "(y \<sqinter> z) \<squnion> x = (y \<squnion> x) \<sqinter> (z \<squnion> x)"
  if "x \<in> carrier L" "y \<in> carrier L" "z \<in> carrier L"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<sqinter> z \<squnion> x = (y \<squnion> x) \<sqinter> (z \<squnion> x)
[PROOF STEP]
by (simp add: join_comm join_meet_distrib1 that)


[STATEMENT]
lemma Sup_eq_PInfty:
  fixes S :: "ereal set"
  shows "\<infinity> \<in> S \<Longrightarrow> Sup S = \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<infinity> \<in> S \<Longrightarrow> Sup S = \<infinity>
[PROOF STEP]
unfolding top_ereal_def[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. top \<in> S \<Longrightarrow> Sup S = top
[PROOF STEP]
by auto


[STATEMENT]
lemma bij_betw_mset_set:
  shows "bij_betw mset_set {A. finite A} {M. \<forall>x. count M x \<le> 1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij_betw mset_set {A. finite A} {M. \<forall>x. count M x \<le> 1}
[PROOF STEP]
proof (rule bij_betw_byWitness[where f'="set_mset"])
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<forall>a\<in>{A. finite A}. set_mset (mset_set a) = a
 2. \<forall>a'\<in>{M. \<forall>x. count M x \<le> 1}. mset_set (set_mset a') = a'
 3. mset_set ` {A. finite A} \<subseteq> {M. \<forall>x. count M x \<le> 1}
 4. set_mset ` {M. \<forall>x. count M x \<le> 1} \<subseteq> {A. finite A}
[PROOF STEP]
show "\<forall>A\<in>{A. finite A}. set_mset (mset_set A) = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>A\<in>{A. finite A}. set_mset (mset_set A) = A
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>A\<in>{A. finite A}. set_mset (mset_set A) = A

goal (3 subgoals):
 1. \<forall>a'\<in>{M. \<forall>x. count M x \<le> 1}. mset_set (set_mset a') = a'
 2. mset_set ` {A. finite A} \<subseteq> {M. \<forall>x. count M x \<le> 1}
 3. set_mset ` {M. \<forall>x. count M x \<le> 1} \<subseteq> {A. finite A}
[PROOF STEP]
show "\<forall>M\<in>{M. \<forall>x. count M x \<le> 1}. mset_set (set_mset M) = M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>M\<in>{M. \<forall>x. count M x \<le> 1}. mset_set (set_mset M) = M
[PROOF STEP]
by (auto simp add: mset_set_set_mset')
[PROOF STATE]
proof (state)
this:
\<forall>M\<in>{M. \<forall>x. count M x \<le> 1}. mset_set (set_mset M) = M

goal (2 subgoals):
 1. mset_set ` {A. finite A} \<subseteq> {M. \<forall>x. count M x \<le> 1}
 2. set_mset ` {M. \<forall>x. count M x \<le> 1} \<subseteq> {A. finite A}
[PROOF STEP]
show "mset_set ` {A. finite A} \<subseteq> {M. \<forall>x. count M x \<le> 1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mset_set ` {A. finite A} \<subseteq> {M. \<forall>x. count M x \<le> 1}
[PROOF STEP]
using nat_le_linear
[PROOF STATE]
proof (prove)
using this:
?m \<le> ?n \<or> ?n \<le> ?m

goal (1 subgoal):
 1. mset_set ` {A. finite A} \<subseteq> {M. \<forall>x. count M x \<le> 1}
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
mset_set ` {A. finite A} \<subseteq> {M. \<forall>x. count M x \<le> 1}

goal (1 subgoal):
 1. set_mset ` {M. \<forall>x. count M x \<le> 1} \<subseteq> {A. finite A}
[PROOF STEP]
show "set_mset ` {M. \<forall>x. count M x \<le> 1} \<subseteq> {A. finite A}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set_mset ` {M. \<forall>x. count M x \<le> 1} \<subseteq> {A. finite A}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
set_mset ` {M. \<forall>x. count M x \<le> 1} \<subseteq> {A. finite A}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma step_friends12:
assumes "step s a = (ou, s')"
and "a \<noteq> Cact (cFriend UID1 (pass s UID1) UID2) \<and> a \<noteq> Cact (cFriend UID2 (pass s UID2) UID1) \<and>
     a \<noteq> Dact (dFriend UID1 (pass s UID1) UID2) \<and> a \<noteq> Dact (dFriend UID2 (pass s UID2) UID1)"
shows "friends12 s' \<longleftrightarrow> friends12 s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. friends12 s' = friends12 s
[PROOF STEP]
using step_friendIDs[OF assms]
[PROOF STATE]
proof (prove)
using this:
(UID1 \<in>\<in> friendIDs s' UID2) = (UID1 \<in>\<in> friendIDs s UID2)
(UID2 \<in>\<in> friendIDs s' UID1) = (UID2 \<in>\<in> friendIDs s UID1)

goal (1 subgoal):
 1. friends12 s' = friends12 s
[PROOF STEP]
unfolding friends12_def
[PROOF STATE]
proof (prove)
using this:
(UID1 \<in>\<in> friendIDs s' UID2) = (UID1 \<in>\<in> friendIDs s UID2)
(UID2 \<in>\<in> friendIDs s' UID1) = (UID2 \<in>\<in> friendIDs s UID1)

goal (1 subgoal):
 1. (UID1 \<in>\<in> friendIDs s' UID2 \<and> UID2 \<in>\<in> friendIDs s' UID1) = (UID1 \<in>\<in> friendIDs s UID2 \<and> UID2 \<in>\<in> friendIDs s UID1)
[PROOF STEP]
by auto


[STATEMENT]
lemma truncate_up_shift_nat: "truncate_up p (x * 2 powr real k) = truncate_up p x * 2 powr k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. truncate_up p (x * 2 powr real k) = truncate_up p x * 2 powr real k
[PROOF STEP]
by (metis of_int_of_nat_eq truncate_up_shift_int)


[STATEMENT]
lemma support_impl_in: "G e \<longrightarrow> support (\<lambda>l s.  H e l s) \<subseteq> T
  \<Longrightarrow> support (\<lambda>l s. G e \<longrightarrow>  H e l s) \<subseteq> T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G e \<longrightarrow> support (H e) \<subseteq> T \<Longrightarrow> support (\<lambda>l s. G e \<longrightarrow> H e l s) \<subseteq> T
[PROOF STEP]
unfolding support_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G e \<longrightarrow> {x. \<exists>l1 l2 s. (\<forall>y. y \<noteq> x \<longrightarrow> l1 y = l2 y) \<and> H e l1 s \<noteq> H e l2 s} \<subseteq> T \<Longrightarrow> {x. \<exists>l1 l2 s. (\<forall>y. y \<noteq> x \<longrightarrow> l1 y = l2 y) \<and> (G e \<longrightarrow> H e l1 s) \<noteq> (G e \<longrightarrow> H e l2 s)} \<subseteq> T
[PROOF STEP]
apply(auto)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x l1 l2 s. \<lbrakk>\<forall>y. y \<noteq> x \<longrightarrow> l1 y = l2 y; {x. \<exists>l1 l2. (\<forall>y. y \<noteq> x \<longrightarrow> l1 y = l2 y) \<and> (\<exists>s. H e l1 s = (\<not> H e l2 s))} \<subseteq> T; G e; \<not> H e l2 s; H e l1 s\<rbrakk> \<Longrightarrow> x \<in> T
 2. \<And>x l1 l2 s. \<lbrakk>\<forall>y. y \<noteq> x \<longrightarrow> l1 y = l2 y; {x. \<exists>l1 l2. (\<forall>y. y \<noteq> x \<longrightarrow> l1 y = l2 y) \<and> (\<exists>s. H e l1 s = (\<not> H e l2 s))} \<subseteq> T; x \<notin> T; G e; \<not> H e l1 s; H e l2 s\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply blast+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma gen_qe_eval_augment : "amount \<le> var+1 \<Longrightarrow>
      (\<exists>xs. (length xs = var + 1) \<and> eval (list_conj (map fm.Atom L @ F)) (xs @ \<Gamma>)) =
      (\<exists>xs. (length xs = var + 1) \<and> eval (step_augment gen_qe IdentityHeuristic amount var L F) (xs @ \<Gamma>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. amount \<le> var + 1 \<Longrightarrow> (\<exists>xs. length xs = var + 1 \<and> eval (list_conj (map fm.Atom L @ F)) (xs @ \<Gamma>)) = (\<exists>xs. length xs = var + 1 \<and> eval (step_augment gen_qe IdentityHeuristic amount var L F) (xs @ \<Gamma>))
[PROOF STEP]
apply(rule step_augmenter_eval[of gen_qe IdentityHeuristic amount var L F \<Gamma>])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>xs vara L F \<Gamma>. \<lbrakk>amount \<le> var + 1; length xs = vara\<rbrakk> \<Longrightarrow> (\<exists>x. eval (list_conj (map fm.Atom L @ F)) (xs @ x # \<Gamma>)) = (\<exists>x. eval (gen_qe vara L F) (xs @ x # \<Gamma>))
 2. \<And>n vara L F. \<lbrakk>amount \<le> var + 1; IdentityHeuristic n L F = vara\<rbrakk> \<Longrightarrow> vara \<le> n
 3. amount \<le> var + 1 \<Longrightarrow> amount \<le> var + 1
[PROOF STEP]
using gen_qe_eval
[PROOF STATE]
proof (prove)
using this:
length ?xs = ?var \<Longrightarrow> (\<exists>x. eval (list_conj (map fm.Atom ?L @ ?F)) (?xs @ x # ?\<Gamma>)) = (\<exists>x. eval (gen_qe ?var ?L ?F) (?xs @ x # ?\<Gamma>))

goal (3 subgoals):
 1. \<And>xs vara L F \<Gamma>. \<lbrakk>amount \<le> var + 1; length xs = vara\<rbrakk> \<Longrightarrow> (\<exists>x. eval (list_conj (map fm.Atom L @ F)) (xs @ x # \<Gamma>)) = (\<exists>x. eval (gen_qe vara L F) (xs @ x # \<Gamma>))
 2. \<And>n vara L F. \<lbrakk>amount \<le> var + 1; IdentityHeuristic n L F = vara\<rbrakk> \<Longrightarrow> vara \<le> n
 3. amount \<le> var + 1 \<Longrightarrow> amount \<le> var + 1
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>n vara L F. \<lbrakk>amount \<le> var + 1; IdentityHeuristic n L F = vara\<rbrakk> \<Longrightarrow> vara \<le> n
 2. amount \<le> var + 1 \<Longrightarrow> amount \<le> var + 1
[PROOF STEP]
by auto


[STATEMENT]
theorem general_order_extension_iff_consistent:
  assumes "\<And>x y. \<lbrakk> x \<in> S; y \<in> S; x \<noteq> y \<rbrakk> \<Longrightarrow> (x, y) \<notin> Q\<^sup>+"
  assumes "total_preorder_on S Ord"
  shows "(\<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord)
     \<longleftrightarrow> consistent Q" (is "?ExExt \<longleftrightarrow> _")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord) = consistent Q
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord \<Longrightarrow> consistent Q
 2. consistent Q \<Longrightarrow> \<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord
[PROOF STEP]
assume "?ExExt"
[PROOF STATE]
proof (state)
this:
\<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord

goal (2 subgoals):
 1. \<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord \<Longrightarrow> consistent Q
 2. consistent Q \<Longrightarrow> \<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord
[PROOF STEP]
obtain Ext where
    "extends Ext Q"
    "refl Ext" "trans Ext" "total Ext"
    "Restr Ext S = Restr Ord S"
[PROOF STATE]
proof (prove)
using this:
\<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord

goal (1 subgoal):
 1. (\<And>Ext. \<lbrakk>extends Ext Q; refl Ext; trans Ext; total Ext; Restr Ext S = Restr Ord S\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using total_preorder_onD
[PROOF STATE]
proof (prove)
using this:
\<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord
total_preorder_on ?A ?r \<Longrightarrow> refl_on ?A ?r
total_preorder_on ?A ?r \<Longrightarrow> trans ?r
total_preorder_on ?A ?r \<Longrightarrow> total_on ?A ?r

goal (1 subgoal):
 1. (\<And>Ext. \<lbrakk>extends Ext Q; refl Ext; trans Ext; total Ext; Restr Ext S = Restr Ord S\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
extends Ext Q
refl Ext
trans Ext
total Ext
Restr Ext S = Restr Ord S

goal (2 subgoals):
 1. \<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord \<Longrightarrow> consistent Q
 2. consistent Q \<Longrightarrow> \<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord
[PROOF STEP]
show "consistent Q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. consistent Q
[PROOF STEP]
proof(rule consistentI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. (x, y) \<in> Q\<^sup>+ \<Longrightarrow> (y, x) \<notin> asym_factor Q
[PROOF STEP]
fix x y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. (x, y) \<in> Q\<^sup>+ \<Longrightarrow> (y, x) \<notin> asym_factor Q
[PROOF STEP]
assume "(x, y) \<in> Q\<^sup>+"
[PROOF STATE]
proof (state)
this:
(x, y) \<in> Q\<^sup>+

goal (1 subgoal):
 1. \<And>x y. (x, y) \<in> Q\<^sup>+ \<Longrightarrow> (y, x) \<notin> asym_factor Q
[PROOF STEP]
with \<open>extends Ext Q\<close> \<open>trans Ext\<close>
[PROOF STATE]
proof (chain)
picking this:
extends Ext Q
trans Ext
(x, y) \<in> Q\<^sup>+
[PROOF STEP]
have "(x, y) \<in> Ext"
[PROOF STATE]
proof (prove)
using this:
extends Ext Q
trans Ext
(x, y) \<in> Q\<^sup>+

goal (1 subgoal):
 1. (x, y) \<in> Ext
[PROOF STEP]
unfolding extends_def
[PROOF STATE]
proof (prove)
using this:
Q \<subseteq> Ext \<and> asym_factor Q \<subseteq> asym_factor Ext
trans Ext
(x, y) \<in> Q\<^sup>+

goal (1 subgoal):
 1. (x, y) \<in> Ext
[PROOF STEP]
by (metis trancl_id trancl_mono)
[PROOF STATE]
proof (state)
this:
(x, y) \<in> Ext

goal (1 subgoal):
 1. \<And>x y. (x, y) \<in> Q\<^sup>+ \<Longrightarrow> (y, x) \<notin> asym_factor Q
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(x, y) \<in> Ext
[PROOF STEP]
have "(y, x) \<notin> asym_factor Ext"
[PROOF STATE]
proof (prove)
using this:
(x, y) \<in> Ext

goal (1 subgoal):
 1. (y, x) \<notin> asym_factor Ext
[PROOF STEP]
unfolding asym_factor_def
[PROOF STATE]
proof (prove)
using this:
(x, y) \<in> Ext

goal (1 subgoal):
 1. (y, x) \<notin> {(x, y). (x, y) \<in> Ext \<and> (y, x) \<notin> Ext}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(y, x) \<notin> asym_factor Ext

goal (1 subgoal):
 1. \<And>x y. (x, y) \<in> Q\<^sup>+ \<Longrightarrow> (y, x) \<notin> asym_factor Q
[PROOF STEP]
with \<open>extends Ext Q\<close>
[PROOF STATE]
proof (chain)
picking this:
extends Ext Q
(y, x) \<notin> asym_factor Ext
[PROOF STEP]
show "(y, x) \<notin> asym_factor Q"
[PROOF STATE]
proof (prove)
using this:
extends Ext Q
(y, x) \<notin> asym_factor Ext

goal (1 subgoal):
 1. (y, x) \<notin> asym_factor Q
[PROOF STEP]
unfolding extends_def asym_factor_def
[PROOF STATE]
proof (prove)
using this:
Q \<subseteq> Ext \<and> {(x, y). (x, y) \<in> Q \<and> (y, x) \<notin> Q} \<subseteq> {(x, y). (x, y) \<in> Ext \<and> (y, x) \<notin> Ext}
(y, x) \<notin> {(x, y). (x, y) \<in> Ext \<and> (y, x) \<notin> Ext}

goal (1 subgoal):
 1. (y, x) \<notin> {(x, y). (x, y) \<in> Q \<and> (y, x) \<notin> Q}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(y, x) \<notin> asym_factor Q

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
consistent Q

goal (1 subgoal):
 1. consistent Q \<Longrightarrow> \<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. consistent Q \<Longrightarrow> \<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord
[PROOF STEP]
assume "consistent Q"
[PROOF STATE]
proof (state)
this:
consistent Q

goal (1 subgoal):
 1. consistent Q \<Longrightarrow> \<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord
[PROOF STEP]
define Q' where "Q' \<equiv> Q\<^sup>* \<union> Ord \<union> Ord O Q\<^sup>* \<union> Q\<^sup>* O Ord \<union> (Q\<^sup>* O Ord) O Q\<^sup>*"
[PROOF STATE]
proof (state)
this:
Q' \<equiv> Q\<^sup>* \<union> Ord \<union> Ord O Q\<^sup>* \<union> Q\<^sup>* O Ord \<union> (Q\<^sup>* O Ord) O Q\<^sup>*

goal (1 subgoal):
 1. consistent Q \<Longrightarrow> \<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord
[PROOF STEP]
have "refl (Q\<^sup>*)" "trans (Q\<^sup>*)" "refl_on S Ord" "trans Ord" "total_on S Ord"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (refl (Q\<^sup>*) &&& trans (Q\<^sup>*)) &&& refl_on S Ord &&& trans Ord &&& total_on S Ord
[PROOF STEP]
using refl_rtrancl trans_rtrancl total_preorder_onD[OF \<open>total_preorder_on S Ord\<close>]
[PROOF STATE]
proof (prove)
using this:
refl (?r\<^sup>*)
trans (?r\<^sup>*)
refl_on S Ord
trans Ord
total_on S Ord

goal (1 subgoal):
 1. (refl (Q\<^sup>*) &&& trans (Q\<^sup>*)) &&& refl_on S Ord &&& trans Ord &&& total_on S Ord
[PROOF STEP]
by - assumption
[PROOF STATE]
proof (state)
this:
refl (Q\<^sup>*)
trans (Q\<^sup>*)
refl_on S Ord
trans Ord
total_on S Ord

goal (1 subgoal):
 1. consistent Q \<Longrightarrow> \<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord
[PROOF STEP]
have preorder_Q': "preorder Q'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. preorder Q'
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. refl Q'
 2. trans Q'
[PROOF STEP]
show "refl Q'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. refl Q'
[PROOF STEP]
unfolding Q'_def refl_on_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Q\<^sup>* \<union> Ord \<union> Ord O Q\<^sup>* \<union> Q\<^sup>* O Ord \<union> (Q\<^sup>* O Ord) O Q\<^sup>* \<subseteq> UNIV \<times> UNIV \<and> (\<forall>x\<in>UNIV. (x, x) \<in> Q\<^sup>* \<union> Ord \<union> Ord O Q\<^sup>* \<union> Q\<^sup>* O Ord \<union> (Q\<^sup>* O Ord) O Q\<^sup>*)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
refl Q'

goal (1 subgoal):
 1. trans Q'
[PROOF STEP]
from \<open>trans (Q\<^sup>*)\<close> \<open>refl_on S Ord\<close> \<open>trans Ord\<close>
[PROOF STATE]
proof (chain)
picking this:
trans (Q\<^sup>*)
refl_on S Ord
trans Ord
[PROOF STEP]
show "trans Q'"
[PROOF STATE]
proof (prove)
using this:
trans (Q\<^sup>*)
refl_on S Ord
trans Ord

goal (1 subgoal):
 1. trans Q'
[PROOF STEP]
unfolding Q'_def[simplified]
[PROOF STATE]
proof (prove)
using this:
trans (Q\<^sup>*)
refl_on S Ord
trans Ord

goal (1 subgoal):
 1. trans (Q\<^sup>* \<union> Ord \<union> Ord O Q\<^sup>* \<union> Q\<^sup>* O Ord \<union> (Q\<^sup>* O Ord) O Q\<^sup>*)
[PROOF STEP]
apply(safe intro!: transI)
[PROOF STATE]
proof (prove)
goal (25 subgoals):
 1. \<And>x y z. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; (x, z) \<notin> (Q\<^sup>* O Ord) O Q\<^sup>*; (x, z) \<notin> Q\<^sup>* O Ord; (x, z) \<notin> Ord O Q\<^sup>*; (x, z) \<notin> Ord; (x, y) \<in> Q\<^sup>*; (y, z) \<in> Q\<^sup>*\<rbrakk> \<Longrightarrow> (x, z) \<in> Q\<^sup>*
 2. \<And>x y z. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; (x, z) \<notin> (Q\<^sup>* O Ord) O Q\<^sup>*; (x, z) \<notin> Q\<^sup>* O Ord; (x, z) \<notin> Ord O Q\<^sup>*; (x, z) \<notin> Ord; (x, y) \<in> Q\<^sup>*; (y, z) \<in> Ord\<rbrakk> \<Longrightarrow> (x, z) \<in> Q\<^sup>*
 3. \<And>x y z. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; (x, z) \<notin> (Q\<^sup>* O Ord) O Q\<^sup>*; (x, z) \<notin> Q\<^sup>* O Ord; (x, z) \<notin> Ord O Q\<^sup>*; (x, z) \<notin> Ord; (x, y) \<in> Ord; (y, z) \<in> Q\<^sup>*\<rbrakk> \<Longrightarrow> (x, z) \<in> Q\<^sup>*
 4. \<And>x y z. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; (x, z) \<notin> (Q\<^sup>* O Ord) O Q\<^sup>*; (x, z) \<notin> Q\<^sup>* O Ord; (x, z) \<notin> Ord O Q\<^sup>*; (x, z) \<notin> Ord; (x, y) \<in> Ord; (y, z) \<in> Ord\<rbrakk> \<Longrightarrow> (x, z) \<in> Q\<^sup>*
 5. \<And>x y z xa ya za. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; (x, za) \<notin> (Q\<^sup>* O Ord) O Q\<^sup>*; (x, za) \<notin> Q\<^sup>* O Ord; (x, za) \<notin> Ord O Q\<^sup>*; (x, za) \<notin> Ord; (xa, ya) \<in> Ord; (ya, za) \<in> Q\<^sup>*; (x, xa) \<in> Q\<^sup>*\<rbrakk> \<Longrightarrow> (x, za) \<in> Q\<^sup>*
 6. \<And>x y z xa ya za. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; (x, za) \<notin> (Q\<^sup>* O Ord) O Q\<^sup>*; (x, za) \<notin> Q\<^sup>* O Ord; (x, za) \<notin> Ord O Q\<^sup>*; (x, za) \<notin> Ord; (xa, ya) \<in> Ord; (ya, za) \<in> Q\<^sup>*; (x, xa) \<in> Ord\<rbrakk> \<Longrightarrow> (x, za) \<in> Q\<^sup>*
 7. \<And>x y z xa ya za. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; (xa, z) \<notin> (Q\<^sup>* O Ord) O Q\<^sup>*; (xa, z) \<notin> Q\<^sup>* O Ord; (xa, z) \<notin> Ord O Q\<^sup>*; (xa, z) \<notin> Ord; (xa, ya) \<in> Ord; (ya, za) \<in> Q\<^sup>*; (za, z) \<in> Q\<^sup>*\<rbrakk> \<Longrightarrow> (xa, z) \<in> Q\<^sup>*
 8. \<And>x y z xa ya za. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; (xa, z) \<notin> (Q\<^sup>* O Ord) O Q\<^sup>*; (xa, z) \<notin> Q\<^sup>* O Ord; (xa, z) \<notin> Ord O Q\<^sup>*; (xa, z) \<notin> Ord; (xa, ya) \<in> Ord; (ya, za) \<in> Q\<^sup>*; (za, z) \<in> Ord\<rbrakk> \<Longrightarrow> (xa, z) \<in> Q\<^sup>*
 9. \<And>x y z xa ya za xb yb zb. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; (xa, zb) \<notin> (Q\<^sup>* O Ord) O Q\<^sup>*; (xa, zb) \<notin> Q\<^sup>* O Ord; (xa, zb) \<notin> Ord O Q\<^sup>*; (xa, zb) \<notin> Ord; (xa, ya) \<in> Ord; (ya, xb) \<in> Q\<^sup>*; (xb, yb) \<in> Ord; (yb, zb) \<in> Q\<^sup>*\<rbrakk> \<Longrightarrow> (xa, zb) \<in> Q\<^sup>*
 10. \<And>x y z xa ya za. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; (x, za) \<notin> (Q\<^sup>* O Ord) O Q\<^sup>*; (x, za) \<notin> Q\<^sup>* O Ord; (x, za) \<notin> Ord O Q\<^sup>*; (x, za) \<notin> Ord; (xa, ya) \<in> Q\<^sup>*; (ya, za) \<in> Ord; (x, xa) \<in> Q\<^sup>*\<rbrakk> \<Longrightarrow> (x, za) \<in> Q\<^sup>*
A total of 25 subgoals...
[PROOF STEP]
unfolding relcomp.simps
[PROOF STATE]
proof (prove)
goal (25 subgoals):
 1. \<And>x y z. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; \<nexists>a b c. x = a \<and> z = c \<and> (\<exists>aa ba c. a = aa \<and> b = c \<and> (aa, ba) \<in> Q\<^sup>* \<and> (ba, c) \<in> Ord) \<and> (b, c) \<in> Q\<^sup>*; \<nexists>a b c. x = a \<and> z = c \<and> (a, b) \<in> Q\<^sup>* \<and> (b, c) \<in> Ord; \<nexists>a b c. x = a \<and> z = c \<and> (a, b) \<in> Ord \<and> (b, c) \<in> Q\<^sup>*; (x, z) \<notin> Ord; (x, y) \<in> Q\<^sup>*; (y, z) \<in> Q\<^sup>*\<rbrakk> \<Longrightarrow> (x, z) \<in> Q\<^sup>*
 2. \<And>x y z. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; \<nexists>a b c. x = a \<and> z = c \<and> (\<exists>aa ba c. a = aa \<and> b = c \<and> (aa, ba) \<in> Q\<^sup>* \<and> (ba, c) \<in> Ord) \<and> (b, c) \<in> Q\<^sup>*; \<nexists>a b c. x = a \<and> z = c \<and> (a, b) \<in> Q\<^sup>* \<and> (b, c) \<in> Ord; \<nexists>a b c. x = a \<and> z = c \<and> (a, b) \<in> Ord \<and> (b, c) \<in> Q\<^sup>*; (x, z) \<notin> Ord; (x, y) \<in> Q\<^sup>*; (y, z) \<in> Ord\<rbrakk> \<Longrightarrow> (x, z) \<in> Q\<^sup>*
 3. \<And>x y z. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; \<nexists>a b c. x = a \<and> z = c \<and> (\<exists>aa ba c. a = aa \<and> b = c \<and> (aa, ba) \<in> Q\<^sup>* \<and> (ba, c) \<in> Ord) \<and> (b, c) \<in> Q\<^sup>*; \<nexists>a b c. x = a \<and> z = c \<and> (a, b) \<in> Q\<^sup>* \<and> (b, c) \<in> Ord; \<nexists>a b c. x = a \<and> z = c \<and> (a, b) \<in> Ord \<and> (b, c) \<in> Q\<^sup>*; (x, z) \<notin> Ord; (x, y) \<in> Ord; (y, z) \<in> Q\<^sup>*\<rbrakk> \<Longrightarrow> (x, z) \<in> Q\<^sup>*
 4. \<And>x y z. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; \<nexists>a b c. x = a \<and> z = c \<and> (\<exists>aa ba c. a = aa \<and> b = c \<and> (aa, ba) \<in> Q\<^sup>* \<and> (ba, c) \<in> Ord) \<and> (b, c) \<in> Q\<^sup>*; \<nexists>a b c. x = a \<and> z = c \<and> (a, b) \<in> Q\<^sup>* \<and> (b, c) \<in> Ord; \<nexists>a b c. x = a \<and> z = c \<and> (a, b) \<in> Ord \<and> (b, c) \<in> Q\<^sup>*; (x, z) \<notin> Ord; (x, y) \<in> Ord; (y, z) \<in> Ord\<rbrakk> \<Longrightarrow> (x, z) \<in> Q\<^sup>*
 5. \<And>x y z xa ya za. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; \<nexists>a b c. x = a \<and> za = c \<and> (\<exists>aa ba c. a = aa \<and> b = c \<and> (aa, ba) \<in> Q\<^sup>* \<and> (ba, c) \<in> Ord) \<and> (b, c) \<in> Q\<^sup>*; \<nexists>a b c. x = a \<and> za = c \<and> (a, b) \<in> Q\<^sup>* \<and> (b, c) \<in> Ord; \<nexists>a b c. x = a \<and> za = c \<and> (a, b) \<in> Ord \<and> (b, c) \<in> Q\<^sup>*; (x, za) \<notin> Ord; (xa, ya) \<in> Ord; (ya, za) \<in> Q\<^sup>*; (x, xa) \<in> Q\<^sup>*\<rbrakk> \<Longrightarrow> (x, za) \<in> Q\<^sup>*
 6. \<And>x y z xa ya za. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; \<nexists>a b c. x = a \<and> za = c \<and> (\<exists>aa ba c. a = aa \<and> b = c \<and> (aa, ba) \<in> Q\<^sup>* \<and> (ba, c) \<in> Ord) \<and> (b, c) \<in> Q\<^sup>*; \<nexists>a b c. x = a \<and> za = c \<and> (a, b) \<in> Q\<^sup>* \<and> (b, c) \<in> Ord; \<nexists>a b c. x = a \<and> za = c \<and> (a, b) \<in> Ord \<and> (b, c) \<in> Q\<^sup>*; (x, za) \<notin> Ord; (xa, ya) \<in> Ord; (ya, za) \<in> Q\<^sup>*; (x, xa) \<in> Ord\<rbrakk> \<Longrightarrow> (x, za) \<in> Q\<^sup>*
 7. \<And>x y z xa ya za. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; \<nexists>a b c. xa = a \<and> z = c \<and> (\<exists>aa ba c. a = aa \<and> b = c \<and> (aa, ba) \<in> Q\<^sup>* \<and> (ba, c) \<in> Ord) \<and> (b, c) \<in> Q\<^sup>*; \<nexists>a b c. xa = a \<and> z = c \<and> (a, b) \<in> Q\<^sup>* \<and> (b, c) \<in> Ord; \<nexists>a b c. xa = a \<and> z = c \<and> (a, b) \<in> Ord \<and> (b, c) \<in> Q\<^sup>*; (xa, z) \<notin> Ord; (xa, ya) \<in> Ord; (ya, za) \<in> Q\<^sup>*; (za, z) \<in> Q\<^sup>*\<rbrakk> \<Longrightarrow> (xa, z) \<in> Q\<^sup>*
 8. \<And>x y z xa ya za. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; \<nexists>a b c. xa = a \<and> z = c \<and> (\<exists>aa ba c. a = aa \<and> b = c \<and> (aa, ba) \<in> Q\<^sup>* \<and> (ba, c) \<in> Ord) \<and> (b, c) \<in> Q\<^sup>*; \<nexists>a b c. xa = a \<and> z = c \<and> (a, b) \<in> Q\<^sup>* \<and> (b, c) \<in> Ord; \<nexists>a b c. xa = a \<and> z = c \<and> (a, b) \<in> Ord \<and> (b, c) \<in> Q\<^sup>*; (xa, z) \<notin> Ord; (xa, ya) \<in> Ord; (ya, za) \<in> Q\<^sup>*; (za, z) \<in> Ord\<rbrakk> \<Longrightarrow> (xa, z) \<in> Q\<^sup>*
 9. \<And>x y z xa ya za xb yb zb. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; \<nexists>a b c. xa = a \<and> zb = c \<and> (\<exists>aa ba c. a = aa \<and> b = c \<and> (aa, ba) \<in> Q\<^sup>* \<and> (ba, c) \<in> Ord) \<and> (b, c) \<in> Q\<^sup>*; \<nexists>a b c. xa = a \<and> zb = c \<and> (a, b) \<in> Q\<^sup>* \<and> (b, c) \<in> Ord; \<nexists>a b c. xa = a \<and> zb = c \<and> (a, b) \<in> Ord \<and> (b, c) \<in> Q\<^sup>*; (xa, zb) \<notin> Ord; (xa, ya) \<in> Ord; (ya, xb) \<in> Q\<^sup>*; (xb, yb) \<in> Ord; (yb, zb) \<in> Q\<^sup>*\<rbrakk> \<Longrightarrow> (xa, zb) \<in> Q\<^sup>*
 10. \<And>x y z xa ya za. \<lbrakk>trans (Q\<^sup>*); refl_on S Ord; trans Ord; \<nexists>a b c. x = a \<and> za = c \<and> (\<exists>aa ba c. a = aa \<and> b = c \<and> (aa, ba) \<in> Q\<^sup>* \<and> (ba, c) \<in> Ord) \<and> (b, c) \<in> Q\<^sup>*; \<nexists>a b c. x = a \<and> za = c \<and> (a, b) \<in> Q\<^sup>* \<and> (b, c) \<in> Ord; \<nexists>a b c. x = a \<and> za = c \<and> (a, b) \<in> Ord \<and> (b, c) \<in> Q\<^sup>*; (x, za) \<notin> Ord; (xa, ya) \<in> Q\<^sup>*; (ya, za) \<in> Ord; (x, xa) \<in> Q\<^sup>*\<rbrakk> \<Longrightarrow> (x, za) \<in> Q\<^sup>*
A total of 25 subgoals...
[PROOF STEP]
by (metis assms(1) refl_on_domain rtranclD transD)+
[PROOF STATE]
proof (state)
this:
trans Q'

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
preorder Q'

goal (1 subgoal):
 1. consistent Q \<Longrightarrow> \<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord
[PROOF STEP]
have "consistent Q'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. consistent Q'
[PROOF STEP]
using consistent_if_preorder_on preorder_Q'
[PROOF STATE]
proof (prove)
using this:
preorder_on ?A ?r \<Longrightarrow> consistent ?r
preorder Q'

goal (1 subgoal):
 1. consistent Q'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
consistent Q'

goal (1 subgoal):
 1. consistent Q \<Longrightarrow> \<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord
[PROOF STEP]
have "extends Q' Q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. extends Q' Q
[PROOF STEP]
proof(rule extendsI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Q \<subseteq> Q'
 2. asym_factor Q \<subseteq> asym_factor Q'
[PROOF STEP]
have "Q \<subseteq> Restr (Q\<^sup>*) (Field Q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Q \<subseteq> Restr (Q\<^sup>*) (Field Q)
[PROOF STEP]
by (auto intro: FieldI1 FieldI2)
[PROOF STATE]
proof (state)
this:
Q \<subseteq> Restr (Q\<^sup>*) (Field Q)

goal (2 subgoals):
 1. Q \<subseteq> Q'
 2. asym_factor Q \<subseteq> asym_factor Q'
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Q \<subseteq> Restr (Q\<^sup>*) (Field Q)
[PROOF STEP]
show "Q \<subseteq> Q'"
[PROOF STATE]
proof (prove)
using this:
Q \<subseteq> Restr (Q\<^sup>*) (Field Q)

goal (1 subgoal):
 1. Q \<subseteq> Q'
[PROOF STEP]
unfolding Q'_def
[PROOF STATE]
proof (prove)
using this:
Q \<subseteq> Restr (Q\<^sup>*) (Field Q)

goal (1 subgoal):
 1. Q \<subseteq> Q\<^sup>* \<union> Ord \<union> Ord O Q\<^sup>* \<union> Q\<^sup>* O Ord \<union> (Q\<^sup>* O Ord) O Q\<^sup>*
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Q \<subseteq> Q'

goal (1 subgoal):
 1. asym_factor Q \<subseteq> asym_factor Q'
[PROOF STEP]
from \<open>consistent Q\<close>
[PROOF STATE]
proof (chain)
picking this:
consistent Q
[PROOF STEP]
have consistentD: "(x, y) \<in> Q\<^sup>+ \<Longrightarrow> (y, x) \<in> Q \<Longrightarrow> (x, y) \<in> Q" for x y
[PROOF STATE]
proof (prove)
using this:
consistent Q

goal (1 subgoal):
 1. \<lbrakk>(x, y) \<in> Q\<^sup>+; (y, x) \<in> Q\<rbrakk> \<Longrightarrow> (x, y) \<in> Q
[PROOF STEP]
unfolding consistent_def asym_factor_def
[PROOF STATE]
proof (prove)
using this:
\<forall>(x, y)\<in>Q\<^sup>+. (y, x) \<notin> {(x, y). (x, y) \<in> Q \<and> (y, x) \<notin> Q}

goal (1 subgoal):
 1. \<lbrakk>(x, y) \<in> Q\<^sup>+; (y, x) \<in> Q\<rbrakk> \<Longrightarrow> (x, y) \<in> Q
[PROOF STEP]
using rtranclD
[PROOF STATE]
proof (prove)
using this:
\<forall>(x, y)\<in>Q\<^sup>+. (y, x) \<notin> {(x, y). (x, y) \<in> Q \<and> (y, x) \<notin> Q}
(?a, ?b) \<in> ?R\<^sup>* \<Longrightarrow> ?a = ?b \<or> ?a \<noteq> ?b \<and> (?a, ?b) \<in> ?R\<^sup>+

goal (1 subgoal):
 1. \<lbrakk>(x, y) \<in> Q\<^sup>+; (y, x) \<in> Q\<rbrakk> \<Longrightarrow> (x, y) \<in> Q
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<lbrakk>(?x, ?y) \<in> Q\<^sup>+; (?y, ?x) \<in> Q\<rbrakk> \<Longrightarrow> (?x, ?y) \<in> Q

goal (1 subgoal):
 1. asym_factor Q \<subseteq> asym_factor Q'
[PROOF STEP]
have refl_on_domainE: "\<lbrakk> (x, y) \<in> Ord; x \<in> S \<Longrightarrow> y \<in> S \<Longrightarrow> P \<rbrakk> \<Longrightarrow> P" for x y P
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(x, y) \<in> Ord; \<lbrakk>x \<in> S; y \<in> S\<rbrakk> \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P
[PROOF STEP]
using refl_on_domain[OF \<open>refl_on S Ord\<close>]
[PROOF STATE]
proof (prove)
using this:
(?a, ?b) \<in> Ord \<Longrightarrow> ?a \<in> S \<and> ?b \<in> S

goal (1 subgoal):
 1. \<lbrakk>(x, y) \<in> Ord; \<lbrakk>x \<in> S; y \<in> S\<rbrakk> \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<lbrakk>(?x, ?y) \<in> Ord; \<lbrakk>?x \<in> S; ?y \<in> S\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P

goal (1 subgoal):
 1. asym_factor Q \<subseteq> asym_factor Q'
[PROOF STEP]
show "asym_factor Q \<subseteq> asym_factor Q'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. asym_factor Q \<subseteq> asym_factor Q'
[PROOF STEP]
unfolding Q'_def asym_factor_def Field_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {(x, y). (x, y) \<in> Q \<and> (y, x) \<notin> Q} \<subseteq> {(x, y). (x, y) \<in> Q\<^sup>* \<union> Ord \<union> Ord O Q\<^sup>* \<union> Q\<^sup>* O Ord \<union> (Q\<^sup>* O Ord) O Q\<^sup>* \<and> (y, x) \<notin> Q\<^sup>* \<union> Ord \<union> Ord O Q\<^sup>* \<union> Q\<^sup>* O Ord \<union> (Q\<^sup>* O Ord) O Q\<^sup>*}
[PROOF STEP]
apply(safe)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>a b. \<lbrakk>(a, b) \<in> Q; (b, a) \<notin> Q; (a, b) \<notin> (Q\<^sup>* O Ord) O Q\<^sup>*; (a, b) \<notin> Q\<^sup>* O Ord; (a, b) \<notin> Ord O Q\<^sup>*; (a, b) \<notin> Ord\<rbrakk> \<Longrightarrow> (a, b) \<in> Q\<^sup>*
 2. \<And>a b. \<lbrakk>(a, b) \<in> Q; (b, a) \<notin> Q; (b, a) \<in> Q\<^sup>*\<rbrakk> \<Longrightarrow> False
 3. \<And>a b. \<lbrakk>(a, b) \<in> Q; (b, a) \<notin> Q; (b, a) \<in> Ord\<rbrakk> \<Longrightarrow> False
 4. \<And>a b x y z. \<lbrakk>(z, x) \<in> Q; (x, z) \<notin> Q; (x, y) \<in> Ord; (y, z) \<in> Q\<^sup>*\<rbrakk> \<Longrightarrow> False
 5. \<And>a b x y z. \<lbrakk>(z, x) \<in> Q; (x, z) \<notin> Q; (x, y) \<in> Q\<^sup>*; (y, z) \<in> Ord\<rbrakk> \<Longrightarrow> False
 6. \<And>a b x y z xa ya za. \<lbrakk>(z, xa) \<in> Q; (xa, z) \<notin> Q; (za, z) \<in> Q\<^sup>*; (xa, ya) \<in> Q\<^sup>*; (ya, za) \<in> Ord\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
using assms(1) consistentD refl_on_domainE
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> S; ?y \<in> S; ?x \<noteq> ?y\<rbrakk> \<Longrightarrow> (?x, ?y) \<notin> Q\<^sup>+
\<lbrakk>(?x, ?y) \<in> Q\<^sup>+; (?y, ?x) \<in> Q\<rbrakk> \<Longrightarrow> (?x, ?y) \<in> Q
\<lbrakk>(?x, ?y) \<in> Ord; \<lbrakk>?x \<in> S; ?y \<in> S\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P

goal (6 subgoals):
 1. \<And>a b. \<lbrakk>(a, b) \<in> Q; (b, a) \<notin> Q; (a, b) \<notin> (Q\<^sup>* O Ord) O Q\<^sup>*; (a, b) \<notin> Q\<^sup>* O Ord; (a, b) \<notin> Ord O Q\<^sup>*; (a, b) \<notin> Ord\<rbrakk> \<Longrightarrow> (a, b) \<in> Q\<^sup>*
 2. \<And>a b. \<lbrakk>(a, b) \<in> Q; (b, a) \<notin> Q; (b, a) \<in> Q\<^sup>*\<rbrakk> \<Longrightarrow> False
 3. \<And>a b. \<lbrakk>(a, b) \<in> Q; (b, a) \<notin> Q; (b, a) \<in> Ord\<rbrakk> \<Longrightarrow> False
 4. \<And>a b x y z. \<lbrakk>(z, x) \<in> Q; (x, z) \<notin> Q; (x, y) \<in> Ord; (y, z) \<in> Q\<^sup>*\<rbrakk> \<Longrightarrow> False
 5. \<And>a b x y z. \<lbrakk>(z, x) \<in> Q; (x, z) \<notin> Q; (x, y) \<in> Q\<^sup>*; (y, z) \<in> Ord\<rbrakk> \<Longrightarrow> False
 6. \<And>a b x y z xa ya za. \<lbrakk>(z, xa) \<in> Q; (xa, z) \<notin> Q; (za, z) \<in> Q\<^sup>*; (xa, ya) \<in> Q\<^sup>*; (ya, za) \<in> Ord\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
by (metis r_into_rtrancl rtranclD rtrancl_trancl_trancl)+
[PROOF STATE]
proof (state)
this:
asym_factor Q \<subseteq> asym_factor Q'

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
extends Q' Q

goal (1 subgoal):
 1. consistent Q \<Longrightarrow> \<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord
[PROOF STEP]
with strict_extends_preorder_on[OF \<open>preorder Q'\<close>]
[PROOF STATE]
proof (chain)
picking this:
\<exists>r. total_preorder r \<and> strict_extends r Q'
extends Q' Q
[PROOF STEP]
obtain Ext where Ext: "extends Ext Q'" "extends Ext Q" "total_preorder Ext"
[PROOF STATE]
proof (prove)
using this:
\<exists>r. total_preorder r \<and> strict_extends r Q'
extends Q' Q

goal (1 subgoal):
 1. (\<And>Ext. \<lbrakk>extends Ext Q'; extends Ext Q; total_preorder Ext\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding strict_extends_def
[PROOF STATE]
proof (prove)
using this:
\<exists>r. total_preorder r \<and> extends r Q' \<and> sym_factor r \<subseteq> (sym_factor Q')\<^sup>=
extends Q' Q

goal (1 subgoal):
 1. (\<And>Ext. \<lbrakk>extends Ext Q'; extends Ext Q; total_preorder Ext\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis transpE transp_extends)
[PROOF STATE]
proof (state)
this:
extends Ext Q'
extends Ext Q
total_preorder Ext

goal (1 subgoal):
 1. consistent Q \<Longrightarrow> \<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord
[PROOF STEP]
have not_in_Q': "x \<in> S \<Longrightarrow> y \<in> S \<Longrightarrow> (x, y) \<notin> Ord \<Longrightarrow> (x, y) \<notin> Q'" for x y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> S; y \<in> S; (x, y) \<notin> Ord\<rbrakk> \<Longrightarrow> (x, y) \<notin> Q'
[PROOF STEP]
using assms(1)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> S; ?y \<in> S; ?x \<noteq> ?y\<rbrakk> \<Longrightarrow> (?x, ?y) \<notin> Q\<^sup>+

goal (1 subgoal):
 1. \<lbrakk>x \<in> S; y \<in> S; (x, y) \<notin> Ord\<rbrakk> \<Longrightarrow> (x, y) \<notin> Q'
[PROOF STEP]
unfolding Q'_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> S; ?y \<in> S; ?x \<noteq> ?y\<rbrakk> \<Longrightarrow> (?x, ?y) \<notin> Q\<^sup>+

goal (1 subgoal):
 1. \<lbrakk>x \<in> S; y \<in> S; (x, y) \<notin> Ord\<rbrakk> \<Longrightarrow> (x, y) \<notin> Q\<^sup>* \<union> Ord \<union> Ord O Q\<^sup>* \<union> Q\<^sup>* O Ord \<union> (Q\<^sup>* O Ord) O Q\<^sup>*
[PROOF STEP]
apply(safe)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>x \<in> S; y \<in> S; (x, y) \<notin> Ord; \<And>x y. \<lbrakk>x \<in> S; y \<in> S; x \<noteq> y\<rbrakk> \<Longrightarrow> (x, y) \<notin> Q\<^sup>+; (x, y) \<in> Q\<^sup>*\<rbrakk> \<Longrightarrow> False
 2. \<And>xa ya z. \<lbrakk>x \<in> S; y \<in> S; (x, y) \<notin> Ord; \<And>x y. \<lbrakk>x \<in> S; y \<in> S; x \<noteq> y\<rbrakk> \<Longrightarrow> (x, y) \<notin> Q\<^sup>+; (x, ya) \<in> Ord; (ya, y) \<in> Q\<^sup>*\<rbrakk> \<Longrightarrow> False
 3. \<And>xa ya z. \<lbrakk>x \<in> S; y \<in> S; (x, y) \<notin> Ord; \<And>x y. \<lbrakk>x \<in> S; y \<in> S; x \<noteq> y\<rbrakk> \<Longrightarrow> (x, y) \<notin> Q\<^sup>+; (x, ya) \<in> Q\<^sup>*; (ya, y) \<in> Ord\<rbrakk> \<Longrightarrow> False
 4. \<And>xa ya z xaa yaa za. \<lbrakk>x \<in> S; y \<in> S; (x, y) \<notin> Ord; \<And>x y. \<lbrakk>x \<in> S; y \<in> S; x \<noteq> y\<rbrakk> \<Longrightarrow> (x, y) \<notin> Q\<^sup>+; (za, y) \<in> Q\<^sup>*; (x, yaa) \<in> Q\<^sup>*; (yaa, za) \<in> Ord\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
by (metis \<open>refl_on S Ord\<close> refl_on_def refl_on_domain rtranclD)+
[PROOF STATE]
proof (state)
this:
\<lbrakk>?x \<in> S; ?y \<in> S; (?x, ?y) \<notin> Ord\<rbrakk> \<Longrightarrow> (?x, ?y) \<notin> Q'

goal (1 subgoal):
 1. consistent Q \<Longrightarrow> \<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord
[PROOF STEP]
have "Restr Ext S = Ord"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Restr Ext S = Ord
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Restr Ext S \<subseteq> Ord
 2. Ord \<subseteq> Restr Ext S
[PROOF STEP]
from \<open>extends Ext Q'\<close>
[PROOF STATE]
proof (chain)
picking this:
extends Ext Q'
[PROOF STEP]
have "Ord \<subseteq> Ext"
[PROOF STATE]
proof (prove)
using this:
extends Ext Q'

goal (1 subgoal):
 1. Ord \<subseteq> Ext
[PROOF STEP]
unfolding Q'_def extends_def
[PROOF STATE]
proof (prove)
using this:
Q\<^sup>* \<union> Ord \<union> Ord O Q\<^sup>* \<union> Q\<^sup>* O Ord \<union> (Q\<^sup>* O Ord) O Q\<^sup>* \<subseteq> Ext \<and> asym_factor (Q\<^sup>* \<union> Ord \<union> Ord O Q\<^sup>* \<union> Q\<^sup>* O Ord \<union> (Q\<^sup>* O Ord) O Q\<^sup>*) \<subseteq> asym_factor Ext

goal (1 subgoal):
 1. Ord \<subseteq> Ext
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Ord \<subseteq> Ext

goal (2 subgoals):
 1. Restr Ext S \<subseteq> Ord
 2. Ord \<subseteq> Restr Ext S
[PROOF STEP]
with \<open>refl_on S Ord\<close>
[PROOF STATE]
proof (chain)
picking this:
refl_on S Ord
Ord \<subseteq> Ext
[PROOF STEP]
show "Ord \<subseteq> Restr Ext S"
[PROOF STATE]
proof (prove)
using this:
refl_on S Ord
Ord \<subseteq> Ext

goal (1 subgoal):
 1. Ord \<subseteq> Restr Ext S
[PROOF STEP]
using refl_on_domain
[PROOF STATE]
proof (prove)
using this:
refl_on S Ord
Ord \<subseteq> Ext
\<lbrakk>refl_on ?A ?r; (?a, ?b) \<in> ?r\<rbrakk> \<Longrightarrow> ?a \<in> ?A \<and> ?b \<in> ?A

goal (1 subgoal):
 1. Ord \<subseteq> Restr Ext S
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
Ord \<subseteq> Restr Ext S

goal (1 subgoal):
 1. Restr Ext S \<subseteq> Ord
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Restr Ext S \<subseteq> Ord
[PROOF STEP]
have "(x, y) \<in> Ord" if "x \<in> S" and "y \<in> S" and "(x, y) \<in> Ext" for x y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x, y) \<in> Ord
[PROOF STEP]
proof(rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (x, y) \<notin> Ord \<Longrightarrow> False
[PROOF STEP]
assume "(x, y) \<notin> Ord"
[PROOF STATE]
proof (state)
this:
(x, y) \<notin> Ord

goal (1 subgoal):
 1. (x, y) \<notin> Ord \<Longrightarrow> False
[PROOF STEP]
with that not_in_Q'
[PROOF STATE]
proof (chain)
picking this:
x \<in> S
y \<in> S
(x, y) \<in> Ext
\<lbrakk>?x \<in> S; ?y \<in> S; (?x, ?y) \<notin> Ord\<rbrakk> \<Longrightarrow> (?x, ?y) \<notin> Q'
(x, y) \<notin> Ord
[PROOF STEP]
have "(x, y) \<notin> Q'"
[PROOF STATE]
proof (prove)
using this:
x \<in> S
y \<in> S
(x, y) \<in> Ext
\<lbrakk>?x \<in> S; ?y \<in> S; (?x, ?y) \<notin> Ord\<rbrakk> \<Longrightarrow> (?x, ?y) \<notin> Q'
(x, y) \<notin> Ord

goal (1 subgoal):
 1. (x, y) \<notin> Q'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(x, y) \<notin> Q'

goal (1 subgoal):
 1. (x, y) \<notin> Ord \<Longrightarrow> False
[PROOF STEP]
with \<open>refl_on S Ord\<close> \<open>total_on S Ord\<close> \<open>x \<in> S\<close> \<open>y \<in> S\<close> \<open>(x, y) \<notin> Ord\<close>
[PROOF STATE]
proof (chain)
picking this:
refl_on S Ord
total_on S Ord
x \<in> S
y \<in> S
(x, y) \<notin> Ord
(x, y) \<notin> Q'
[PROOF STEP]
have "(y, x) \<in> Ord"
[PROOF STATE]
proof (prove)
using this:
refl_on S Ord
total_on S Ord
x \<in> S
y \<in> S
(x, y) \<notin> Ord
(x, y) \<notin> Q'

goal (1 subgoal):
 1. (y, x) \<in> Ord
[PROOF STEP]
unfolding refl_on_def total_on_def
[PROOF STATE]
proof (prove)
using this:
Ord \<subseteq> S \<times> S \<and> (\<forall>x\<in>S. (x, x) \<in> Ord)
\<forall>x\<in>S. \<forall>y\<in>S. x \<noteq> y \<longrightarrow> (x, y) \<in> Ord \<or> (y, x) \<in> Ord
x \<in> S
y \<in> S
(x, y) \<notin> Ord
(x, y) \<notin> Q'

goal (1 subgoal):
 1. (y, x) \<in> Ord
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
(y, x) \<in> Ord

goal (1 subgoal):
 1. (x, y) \<notin> Ord \<Longrightarrow> False
[PROOF STEP]
hence "(y, x) \<in> Q'"
[PROOF STATE]
proof (prove)
using this:
(y, x) \<in> Ord

goal (1 subgoal):
 1. (y, x) \<in> Q'
[PROOF STEP]
unfolding Q'_def
[PROOF STATE]
proof (prove)
using this:
(y, x) \<in> Ord

goal (1 subgoal):
 1. (y, x) \<in> Q\<^sup>* \<union> Ord \<union> Ord O Q\<^sup>* \<union> Q\<^sup>* O Ord \<union> (Q\<^sup>* O Ord) O Q\<^sup>*
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(y, x) \<in> Q'

goal (1 subgoal):
 1. (x, y) \<notin> Ord \<Longrightarrow> False
[PROOF STEP]
with \<open>(x, y) \<notin> Q'\<close> \<open>(y, x) \<in> Q'\<close> \<open>extends Ext Q'\<close>
[PROOF STATE]
proof (chain)
picking this:
(x, y) \<notin> Q'
(y, x) \<in> Q'
extends Ext Q'
(y, x) \<in> Q'
[PROOF STEP]
have "(x, y) \<notin> Ext"
[PROOF STATE]
proof (prove)
using this:
(x, y) \<notin> Q'
(y, x) \<in> Q'
extends Ext Q'
(y, x) \<in> Q'

goal (1 subgoal):
 1. (x, y) \<notin> Ext
[PROOF STEP]
unfolding extends_def asym_factor_def
[PROOF STATE]
proof (prove)
using this:
(x, y) \<notin> Q'
(y, x) \<in> Q'
Q' \<subseteq> Ext \<and> {(x, y). (x, y) \<in> Q' \<and> (y, x) \<notin> Q'} \<subseteq> {(x, y). (x, y) \<in> Ext \<and> (y, x) \<notin> Ext}
(y, x) \<in> Q'

goal (1 subgoal):
 1. (x, y) \<notin> Ext
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(x, y) \<notin> Ext

goal (1 subgoal):
 1. (x, y) \<notin> Ord \<Longrightarrow> False
[PROOF STEP]
with \<open>(x, y) \<in> Ext\<close>
[PROOF STATE]
proof (chain)
picking this:
(x, y) \<in> Ext
(x, y) \<notin> Ext
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
(x, y) \<in> Ext
(x, y) \<notin> Ext

goal (1 subgoal):
 1. False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?x \<in> S; ?y \<in> S; (?x, ?y) \<in> Ext\<rbrakk> \<Longrightarrow> (?x, ?y) \<in> Ord

goal (1 subgoal):
 1. Restr Ext S \<subseteq> Ord
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?x \<in> S; ?y \<in> S; (?x, ?y) \<in> Ext\<rbrakk> \<Longrightarrow> (?x, ?y) \<in> Ord
[PROOF STEP]
show "Restr Ext S \<subseteq> Ord"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> S; ?y \<in> S; (?x, ?y) \<in> Ext\<rbrakk> \<Longrightarrow> (?x, ?y) \<in> Ord

goal (1 subgoal):
 1. Restr Ext S \<subseteq> Ord
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Restr Ext S \<subseteq> Ord

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Restr Ext S = Ord

goal (1 subgoal):
 1. consistent Q \<Longrightarrow> \<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord
[PROOF STEP]
with Ext
[PROOF STATE]
proof (chain)
picking this:
extends Ext Q'
extends Ext Q
total_preorder Ext
Restr Ext S = Ord
[PROOF STEP]
show "?ExExt"
[PROOF STATE]
proof (prove)
using this:
extends Ext Q'
extends Ext Q
total_preorder Ext
Restr Ext S = Ord

goal (1 subgoal):
 1. \<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>Ext. extends Ext Q \<and> total_preorder Ext \<and> Restr Ext S = Ord

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma L_While_set: "L (WHILE b DO c) (set xs) =
  (let f = (\<lambda>Y. vars b \<union> set xs \<union> L c Y)
   in while (\<lambda>Y. f Y \<noteq> Y) f {})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. L (WHILE b DO c) (set xs) = (let f = \<lambda>Y. vars b \<union> set xs \<union> L c Y in while (\<lambda>Y. f Y \<noteq> Y) f {})
[PROOF STEP]
by(rule L_While_let, simp)


[STATEMENT]
lemma Infty_neq_0[simp]:
  "(\<infinity>::ereal) \<noteq> 0" "0 \<noteq> (\<infinity>::ereal)"
  "-(\<infinity>::ereal) \<noteq> 0" "0 \<noteq> -(\<infinity>::ereal)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<infinity> \<noteq> 0 &&& 0 \<noteq> \<infinity>) &&& - \<infinity> \<noteq> 0 &&& 0 \<noteq> - \<infinity>
[PROOF STEP]
by (simp_all add: zero_ereal_def)


[STATEMENT]
lemma nonempty_subseteq_mset_eq_singleton: "M \<noteq> {#} \<Longrightarrow> M \<subseteq># {#x#} \<Longrightarrow> M = {#x#}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>M \<noteq> {#}; M \<subseteq># {#x#}\<rbrakk> \<Longrightarrow> M = {#x#}
[PROOF STEP]
by (cases M) (auto dest: subset_mset.diff_add)


[STATEMENT]
lemma Cinfinite_ctwo_cexp:
  "Cinfinite r \<Longrightarrow> Cinfinite (ctwo ^c r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Cinfinite r \<Longrightarrow> Cinfinite (ctwo ^c r)
[PROOF STEP]
unfolding ctwo_def cexp_def cinfinite_def Field_card_of
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infinite (Field r) \<and> Card_order r \<Longrightarrow> infinite (Func (Field r) UNIV) \<and> card_order_on (Func (Field r) UNIV) |Func (Field r) UNIV|
[PROOF STEP]
by (rule conjI, rule infinite_Func, auto)


[STATEMENT]
lemma ccw_scaleR2:
  "det3 0 xr P \<noteq> 0 \<Longrightarrow> 0 < e \<Longrightarrow> ccw 0 xr P \<Longrightarrow> ccw 0 xr (e*\<^sub>RP)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>det3 0 xr P \<noteq> 0; 0 < e; ccw 0 xr P\<rbrakk> \<Longrightarrow> ccw 0 xr (e *\<^sub>R P)
[PROOF STEP]
by (simp add: ccw_def)


[STATEMENT]
theorem Var_inj[simp]:
"(((Var xs x)::('index,'bindex,'varSort,'var,'opSym)term) = Var ys y) =
 (xs = ys \<and> x = y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Var xs x = Var ys y) = (xs = ys \<and> x = y)
[PROOF STEP]
by (metis alpha_qVar_iff pick_Var_qVar qTerm.inject)


[STATEMENT]
lemma nemp_emp_pow: assumes "u \<noteq> \<epsilon>" shows "u\<^sup>@m = \<epsilon> \<longleftrightarrow> m = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (u \<^sup>@ m = \<epsilon>) = (m = 0)
[PROOF STEP]
using  eq_pow_exp[OF assms, of m 0, unfolded pow_zero]
[PROOF STATE]
proof (prove)
using this:
(u \<^sup>@ m = \<epsilon>) = (m = 0)

goal (1 subgoal):
 1. (u \<^sup>@ m = \<epsilon>) = (m = 0)
[PROOF STEP]
.


[STATEMENT]
lemma Liminf_const_add:
  fixes c :: "'a::{complete_linorder, linorder_topology, topological_monoid_add, ordered_ab_semigroup_add}"
  shows "F \<noteq> bot \<Longrightarrow> Liminf F (\<lambda>x. c + f x) = c + Liminf F f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F \<noteq> bot \<Longrightarrow> Liminf F (\<lambda>x. c + f x) = c + Liminf F f
[PROOF STEP]
by (rule Liminf_compose_continuous_mono)
     (auto intro!: monoI add_mono continuous_on_add continuous_on_id continuous_on_const)


[STATEMENT]
lemma special_coset_eq_imp_eq_gensets:
  "\<lbrakk> T1\<in>Pow S; T2\<in>Pow S; w1 +o \<langle>T1\<rangle> = w2 +o \<langle>T2\<rangle> \<rbrakk> \<Longrightarrow> T1=T2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>T1 \<in> Pow S; T2 \<in> Pow S; w1 +o \<langle>T1\<rangle> = w2 +o \<langle>T2\<rangle>\<rbrakk> \<Longrightarrow> T1 = T2
[PROOF STEP]
using set_plus_rearrange2[of "-w1" w1 "\<langle>T1\<rangle>"]
        set_plus_rearrange2[of "-w1" w2 "\<langle>T2\<rangle>"]
        genby_lcoset_subgroup_imp_eq_reps[of 0 T1 "-w1+w2" T2]
        inj_onD[OF special_subgroup_inj]
[PROOF STATE]
proof (prove)
using this:
- w1 +o (w1 +o \<langle>T1\<rangle>) = (- w1 + w1) +o \<langle>T1\<rangle>
- w1 +o (w2 +o \<langle>T2\<rangle>) = (- w1 + w2) +o \<langle>T2\<rangle>
(0::'w) +o \<langle>T1\<rangle> \<subseteq> (- w1 + w2) +o \<langle>T2\<rangle> \<Longrightarrow> (- w1 + w2) +o \<langle>T2\<rangle> = (0::'w) +o \<langle>T2\<rangle>
\<lbrakk>\<langle>?x\<rangle> = \<langle>?y\<rangle>; ?x \<in> Pow S; ?y \<in> Pow S\<rbrakk> \<Longrightarrow> ?x = ?y

goal (1 subgoal):
 1. \<lbrakk>T1 \<in> Pow S; T2 \<in> Pow S; w1 +o \<langle>T1\<rangle> = w2 +o \<langle>T2\<rangle>\<rbrakk> \<Longrightarrow> T1 = T2
[PROOF STEP]
by    force


[STATEMENT]
lemma coeff_lift_add : "MPoly_Type.coeff (liftPoly x y (a + b)) m = MPoly_Type.coeff (liftPoly x y a) m + MPoly_Type.coeff (liftPoly x y b) m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MPoly_Type.coeff (liftPoly x y (a + b)) m = MPoly_Type.coeff (liftPoly x y a) m + MPoly_Type.coeff (liftPoly x y b) m
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. MPoly_Type.coeff (liftPoly x y (a + b)) m = MPoly_Type.coeff (liftPoly x y a) m + MPoly_Type.coeff (liftPoly x y b) m
[PROOF STEP]
have "MPoly_Type.coeff (liftPoly x y (a + b)) m = MPoly_Type.coeff (liftPoly x y a + liftPoly x y b) m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MPoly_Type.coeff (liftPoly x y (a + b)) m = MPoly_Type.coeff (liftPoly x y a + liftPoly x y b) m
[PROOF STEP]
apply( simp add : mapping_of_lift_add coeff_def  )
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lookup (mapping_of (liftPoly x y a) + mapping_of (liftPoly x y b)) m = lookup (mapping_of (liftPoly x y a + liftPoly x y b)) m
[PROOF STEP]
using lookup_add
[PROOF STATE]
proof (prove)
using this:
lookup (?f + ?g) ?k = lookup ?f ?k + lookup ?g ?k

goal (1 subgoal):
 1. lookup (mapping_of (liftPoly x y a) + mapping_of (liftPoly x y b)) m = lookup (mapping_of (liftPoly x y a + liftPoly x y b)) m
[PROOF STEP]
by (simp add: plus_mpoly.rep_eq)
[PROOF STATE]
proof (state)
this:
MPoly_Type.coeff (liftPoly x y (a + b)) m = MPoly_Type.coeff (liftPoly x y a + liftPoly x y b) m

goal (1 subgoal):
 1. MPoly_Type.coeff (liftPoly x y (a + b)) m = MPoly_Type.coeff (liftPoly x y a) m + MPoly_Type.coeff (liftPoly x y b) m
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
MPoly_Type.coeff (liftPoly x y (a + b)) m = MPoly_Type.coeff (liftPoly x y a + liftPoly x y b) m

goal (1 subgoal):
 1. MPoly_Type.coeff (liftPoly x y (a + b)) m = MPoly_Type.coeff (liftPoly x y a) m + MPoly_Type.coeff (liftPoly x y b) m
[PROOF STEP]
have "... = MPoly_Type.coeff (liftPoly x y a) m + MPoly_Type.coeff (liftPoly x y b) m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MPoly_Type.coeff (liftPoly x y a + liftPoly x y b) m = MPoly_Type.coeff (liftPoly x y a) m + MPoly_Type.coeff (liftPoly x y b) m
[PROOF STEP]
using MPolyExtension.coeff_add[of "liftPoly x y a" "liftPoly x y b" m]
[PROOF STATE]
proof (prove)
using this:
MPoly_Type.coeff (liftPoly x y a + liftPoly x y b) m = MPoly_Type.coeff (liftPoly x y a) m + MPoly_Type.coeff (liftPoly x y b) m

goal (1 subgoal):
 1. MPoly_Type.coeff (liftPoly x y a + liftPoly x y b) m = MPoly_Type.coeff (liftPoly x y a) m + MPoly_Type.coeff (liftPoly x y b) m
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
MPoly_Type.coeff (liftPoly x y a + liftPoly x y b) m = MPoly_Type.coeff (liftPoly x y a) m + MPoly_Type.coeff (liftPoly x y b) m

goal (1 subgoal):
 1. MPoly_Type.coeff (liftPoly x y (a + b)) m = MPoly_Type.coeff (liftPoly x y a) m + MPoly_Type.coeff (liftPoly x y b) m
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
MPoly_Type.coeff (liftPoly x y (a + b)) m = MPoly_Type.coeff (liftPoly x y a) m + MPoly_Type.coeff (liftPoly x y b) m
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
MPoly_Type.coeff (liftPoly x y (a + b)) m = MPoly_Type.coeff (liftPoly x y a) m + MPoly_Type.coeff (liftPoly x y b) m

goal (1 subgoal):
 1. MPoly_Type.coeff (liftPoly x y (a + b)) m = MPoly_Type.coeff (liftPoly x y a) m + MPoly_Type.coeff (liftPoly x y b) m
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
MPoly_Type.coeff (liftPoly x y (a + b)) m = MPoly_Type.coeff (liftPoly x y a) m + MPoly_Type.coeff (liftPoly x y b) m

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma homotopic_with_imp_continuous:
    assumes "homotopic_with_canon P X Y f g"
    shows "continuous_on X f \<and> continuous_on X g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on X f \<and> continuous_on X g
[PROOF STEP]
by (meson assms continuous_map_subtopology_eu homotopic_with_imp_continuous_maps)


[STATEMENT]
lemma indep_implies_non_increasing:
  assumes "indep_interp A"
  shows "non_increasing (applies_eq A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. non_increasing (applies_eq A)
[PROOF STEP]
by (metis (no_types, lifting) applies_eq.simps assms indep_interp_def smaller_interp_def mem_Collect_eq non_increasingI subsetI)


[STATEMENT]
lemma pair_qbs_morphismI:
  assumes "\<And>\<alpha> \<beta>. \<alpha> \<in> qbs_Mx X \<Longrightarrow> \<beta> \<in> qbs_Mx Y
           \<Longrightarrow> f \<circ> (\<lambda>r. (\<alpha> r, \<beta> r)) \<in> qbs_Mx Z"
    shows "f \<in> (X \<Otimes>\<^sub>Q Y) \<rightarrow>\<^sub>Q Z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in> X \<Otimes>\<^sub>Q Y \<rightarrow>\<^sub>Q Z
[PROOF STEP]
proof(rule qbs_morphismI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>\<alpha>. \<alpha> \<in> qbs_Mx (X \<Otimes>\<^sub>Q Y) \<Longrightarrow> f \<circ> \<alpha> \<in> qbs_Mx Z
[PROOF STEP]
fix \<alpha>
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>\<alpha>. \<alpha> \<in> qbs_Mx (X \<Otimes>\<^sub>Q Y) \<Longrightarrow> f \<circ> \<alpha> \<in> qbs_Mx Z
[PROOF STEP]
assume 1:"\<alpha> \<in> qbs_Mx (X \<Otimes>\<^sub>Q Y)"
[PROOF STATE]
proof (state)
this:
\<alpha> \<in> qbs_Mx (X \<Otimes>\<^sub>Q Y)

goal (1 subgoal):
 1. \<And>\<alpha>. \<alpha> \<in> qbs_Mx (X \<Otimes>\<^sub>Q Y) \<Longrightarrow> f \<circ> \<alpha> \<in> qbs_Mx Z
[PROOF STEP]
have "f \<circ> \<alpha> = f \<circ> (\<lambda>r. ((fst \<circ> \<alpha>) r, (snd \<circ> \<alpha>) r))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<circ> \<alpha> = f \<circ> (\<lambda>r. ((fst \<circ> \<alpha>) r, (snd \<circ> \<alpha>) r))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f \<circ> \<alpha> = f \<circ> (\<lambda>r. ((fst \<circ> \<alpha>) r, (snd \<circ> \<alpha>) r))

goal (1 subgoal):
 1. \<And>\<alpha>. \<alpha> \<in> qbs_Mx (X \<Otimes>\<^sub>Q Y) \<Longrightarrow> f \<circ> \<alpha> \<in> qbs_Mx Z
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
f \<circ> \<alpha> = f \<circ> (\<lambda>r. ((fst \<circ> \<alpha>) r, (snd \<circ> \<alpha>) r))

goal (1 subgoal):
 1. \<And>\<alpha>. \<alpha> \<in> qbs_Mx (X \<Otimes>\<^sub>Q Y) \<Longrightarrow> f \<circ> \<alpha> \<in> qbs_Mx Z
[PROOF STEP]
have "... \<in> qbs_Mx Z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<circ> (\<lambda>r. ((fst \<circ> \<alpha>) r, (snd \<circ> \<alpha>) r)) \<in> qbs_Mx Z
[PROOF STEP]
using 1 assms[of "fst \<circ> \<alpha>" "snd \<circ> \<alpha>"]
[PROOF STATE]
proof (prove)
using this:
\<alpha> \<in> qbs_Mx (X \<Otimes>\<^sub>Q Y)
\<lbrakk>fst \<circ> \<alpha> \<in> qbs_Mx X; snd \<circ> \<alpha> \<in> qbs_Mx Y\<rbrakk> \<Longrightarrow> f \<circ> (\<lambda>r. ((fst \<circ> \<alpha>) r, (snd \<circ> \<alpha>) r)) \<in> qbs_Mx Z

goal (1 subgoal):
 1. f \<circ> (\<lambda>r. ((fst \<circ> \<alpha>) r, (snd \<circ> \<alpha>) r)) \<in> qbs_Mx Z
[PROOF STEP]
by(simp add: pair_qbs_Mx_def)
[PROOF STATE]
proof (state)
this:
f \<circ> (\<lambda>r. ((fst \<circ> \<alpha>) r, (snd \<circ> \<alpha>) r)) \<in> qbs_Mx Z

goal (1 subgoal):
 1. \<And>\<alpha>. \<alpha> \<in> qbs_Mx (X \<Otimes>\<^sub>Q Y) \<Longrightarrow> f \<circ> \<alpha> \<in> qbs_Mx Z
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
f \<circ> \<alpha> \<in> qbs_Mx Z
[PROOF STEP]
show "f \<circ> \<alpha> \<in> qbs_Mx Z"
[PROOF STATE]
proof (prove)
using this:
f \<circ> \<alpha> \<in> qbs_Mx Z

goal (1 subgoal):
 1. f \<circ> \<alpha> \<in> qbs_Mx Z
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
f \<circ> \<alpha> \<in> qbs_Mx Z

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma degree_monom0[simp]: "degree (monom a 0) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. degree (monom a 0) = 0
[PROOF STEP]
using degree_monom_le
[PROOF STATE]
proof (prove)
using this:
degree (monom ?a ?n) \<le> ?n

goal (1 subgoal):
 1. degree (monom a 0) = 0
[PROOF STEP]
by auto


[STATEMENT]
lemma fiter_seq_choice: "c\<^sup>\<star> = (\<Sqinter>i::nat. c \<^sup>;^ i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c\<^sup>\<star> = \<Sqinter> range ((\<^sup>;^) c)
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
proof (rule antisym)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. c\<^sup>\<star> \<sqsubseteq> \<Sqinter> range ((\<^sup>;^) c)
 2. \<Sqinter> range ((\<^sup>;^) c) \<sqsubseteq> c\<^sup>\<star>
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
show "c\<^sup>\<star> \<sqsubseteq> (\<Sqinter>i. c \<^sup>;^ i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c\<^sup>\<star> \<sqsubseteq> \<Sqinter> range ((\<^sup>;^) c)
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
proof (rule INF_greatest)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i::nat. i \<in> UNIV \<Longrightarrow> c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ i
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i::nat. i \<in> UNIV \<Longrightarrow> c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ i
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
show "c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ i
variables:
i :: nat
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
proof (induct i type: nat)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ (0::nat)
 2. \<And>n::nat. c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ n \<Longrightarrow> c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ Suc n
variables:
i :: nat
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ (0::nat)
 2. \<And>n::nat. c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ n \<Longrightarrow> c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ Suc n
variables:
i :: nat
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
show "c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ (0::nat)
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
by (simp add: fiter0)
[PROOF STATE]
proof (state)
this:
(c::'a::refinement_lattice)\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ 0

goal (1 subgoal):
 1. \<And>n::nat. c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ n \<Longrightarrow> c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ Suc n
variables:
i :: nat
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n::nat. c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ n \<Longrightarrow> c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ Suc n
variables:
i :: nat
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
case (Suc n)
[PROOF STATE]
proof (state)
this:
(c::'a::refinement_lattice)\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ (n::nat)

goal (1 subgoal):
 1. \<And>n::nat. c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ n \<Longrightarrow> c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ Suc n
variables:
i :: nat
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
have "c\<^sup>\<star> \<sqsubseteq> c ; c\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c\<^sup>\<star> \<sqsubseteq> c ; c\<^sup>\<star>
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
by (metis fiter_unfold inf_le2)
[PROOF STATE]
proof (state)
this:
(c::'a::refinement_lattice)\<^sup>\<star> \<sqsubseteq> c ; c\<^sup>\<star>

goal (1 subgoal):
 1. \<And>n::nat. c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ n \<Longrightarrow> c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ Suc n
variables:
i :: nat
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(c::'a::refinement_lattice)\<^sup>\<star> \<sqsubseteq> c ; c\<^sup>\<star>

goal (1 subgoal):
 1. \<And>n::nat. c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ n \<Longrightarrow> c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ Suc n
variables:
i :: nat
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
have "... \<sqsubseteq> c ; (c \<^sup>;^ n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c ; c\<^sup>\<star> \<sqsubseteq> c ; (c \<^sup>;^ n)
variables:
n :: nat
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
using Suc.hyps
[PROOF STATE]
proof (prove)
using this:
(c::'a::refinement_lattice)\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ (n::nat)

goal (1 subgoal):
 1. c ; c\<^sup>\<star> \<sqsubseteq> c ; (c \<^sup>;^ n)
variables:
n :: nat
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
by (simp only: seq_mono_right)
[PROOF STATE]
proof (state)
this:
(c::'a::refinement_lattice) ; c\<^sup>\<star> \<sqsubseteq> c ; (c \<^sup>;^ (n::nat))

goal (1 subgoal):
 1. \<And>n::nat. c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ n \<Longrightarrow> c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ Suc n
variables:
i :: nat
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(c::'a::refinement_lattice) ; c\<^sup>\<star> \<sqsubseteq> c ; (c \<^sup>;^ (n::nat))

goal (1 subgoal):
 1. \<And>n::nat. c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ n \<Longrightarrow> c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ Suc n
variables:
i :: nat
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
have "... = c \<^sup>;^ Suc n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c ; (c \<^sup>;^ n) = c \<^sup>;^ Suc n
variables:
n :: nat
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(c::'a::refinement_lattice) ; (c \<^sup>;^ (n::nat)) = c \<^sup>;^ Suc n

goal (1 subgoal):
 1. \<And>n::nat. c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ n \<Longrightarrow> c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ Suc n
variables:
i :: nat
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(c::'a::refinement_lattice)\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ Suc (n::nat)
[PROOF STEP]
show "c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ Suc n"
[PROOF STATE]
proof (prove)
using this:
(c::'a::refinement_lattice)\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ Suc (n::nat)

goal (1 subgoal):
 1. c\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ Suc n
variables:
n :: nat
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(c::'a::refinement_lattice)\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ Suc (n::nat)

goal:
No subgoals!
variables:
i :: nat
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(c::'a::refinement_lattice)\<^sup>\<star> \<sqsubseteq> c \<^sup>;^ (i::nat)

goal:
No subgoals!
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(c::'a::refinement_lattice)\<^sup>\<star> \<sqsubseteq> \<Sqinter> range ((\<^sup>;^) c)

goal (1 subgoal):
 1. \<Sqinter> range ((\<^sup>;^) c) \<sqsubseteq> c\<^sup>\<star>
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<Sqinter> range ((\<^sup>;^) c) \<sqsubseteq> c\<^sup>\<star>
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
have "(\<Sqinter>i. c \<^sup>;^ i) \<sqsubseteq> (c \<^sup>;^ 0) \<sqinter> (\<Sqinter>i. c \<^sup>;^ Suc i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sqinter> range ((\<^sup>;^) c) \<sqsubseteq> c \<^sup>;^ (0::nat) \<sqinter> (\<Sqinter>i::nat. c \<^sup>;^ Suc i)
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
by (meson INF_greatest INF_lower UNIV_I le_inf_iff)
[PROOF STATE]
proof (state)
this:
\<Sqinter> range ((\<^sup>;^) (c::'a::refinement_lattice)) \<sqsubseteq> c \<^sup>;^ 0 \<sqinter> (\<Sqinter>i::nat. c \<^sup>;^ Suc i)

goal (1 subgoal):
 1. \<Sqinter> range ((\<^sup>;^) c) \<sqsubseteq> c\<^sup>\<star>
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<Sqinter> range ((\<^sup>;^) (c::'a::refinement_lattice)) \<sqsubseteq> c \<^sup>;^ 0 \<sqinter> (\<Sqinter>i::nat. c \<^sup>;^ Suc i)

goal (1 subgoal):
 1. \<Sqinter> range ((\<^sup>;^) c) \<sqsubseteq> c\<^sup>\<star>
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
have "... = nil \<sqinter> (\<Sqinter>i. c ; (c \<^sup>;^ i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c \<^sup>;^ (0::nat) \<sqinter> (\<Sqinter>i::nat. c \<^sup>;^ Suc i) = nil \<sqinter> (\<Sqinter>i::nat. c ; (c \<^sup>;^ i))
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(c::'a::refinement_lattice) \<^sup>;^ 0 \<sqinter> (\<Sqinter>i::nat. c \<^sup>;^ Suc i) = nil \<sqinter> (\<Sqinter>i::nat. c ; (c \<^sup>;^ i))

goal (1 subgoal):
 1. \<Sqinter> range ((\<^sup>;^) c) \<sqsubseteq> c\<^sup>\<star>
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(c::'a::refinement_lattice) \<^sup>;^ 0 \<sqinter> (\<Sqinter>i::nat. c \<^sup>;^ Suc i) = nil \<sqinter> (\<Sqinter>i::nat. c ; (c \<^sup>;^ i))

goal (1 subgoal):
 1. \<Sqinter> range ((\<^sup>;^) c) \<sqsubseteq> c\<^sup>\<star>
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
have "... = nil \<sqinter> c ; (\<Sqinter>i. c \<^sup>;^ i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nil \<sqinter> (\<Sqinter>i::nat. c ; (c \<^sup>;^ i)) = nil \<sqinter> c ; \<Sqinter> range ((\<^sup>;^) c)
variables:
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
c, nil :: 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
by (simp add: seq_INF_distrib)
[PROOF STATE]
proof (state)
this:
nil \<sqinter> (\<Sqinter>i::nat. (c::'a::refinement_lattice) ; (c \<^sup>;^ i)) = nil \<sqinter> c ; \<Sqinter> range ((\<^sup>;^) c)

goal (1 subgoal):
 1. \<Sqinter> range ((\<^sup>;^) c) \<sqsubseteq> c\<^sup>\<star>
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<Sqinter> range ((\<^sup>;^) (c::'a::refinement_lattice)) \<sqsubseteq> nil \<sqinter> c ; \<Sqinter> range ((\<^sup>;^) c)
[PROOF STEP]
show "(\<Sqinter>i. c \<^sup>;^ i) \<sqsubseteq> c\<^sup>\<star>"
[PROOF STATE]
proof (prove)
using this:
\<Sqinter> range ((\<^sup>;^) (c::'a::refinement_lattice)) \<sqsubseteq> nil \<sqinter> c ; \<Sqinter> range ((\<^sup>;^) c)

goal (1 subgoal):
 1. \<Sqinter> range ((\<^sup>;^) c) \<sqsubseteq> c\<^sup>\<star>
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
using fiter_induct
[PROOF STATE]
proof (prove)
using this:
\<Sqinter> range ((\<^sup>;^) (c::'a::refinement_lattice)) \<sqsubseteq> nil \<sqinter> c ; \<Sqinter> range ((\<^sup>;^) c)
(?x::'a::refinement_lattice) \<sqsubseteq> (?d::'a::refinement_lattice) \<sqinter> (?c::'a::refinement_lattice) ; ?x \<Longrightarrow> ?x \<sqsubseteq> ?c\<^sup>\<star> ; ?d

goal (1 subgoal):
 1. \<Sqinter> range ((\<^sup>;^) c) \<sqsubseteq> c\<^sup>\<star>
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<Sqinter> range ((\<^sup>;^) (c::'a::refinement_lattice)) \<sqsubseteq> c\<^sup>\<star>

goal:
No subgoals!
variables:
c, nil :: 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
qed


[STATEMENT]
lemma short_vector_hybrid: assumes res: "short_vector_hybrid \<alpha> fs_init = v"
  and m0: "m \<noteq> 0"
shows "v \<in> carrier_vec n"
  "v \<in> L - {0\<^sub>v n}"
  "h \<in> L - {0\<^sub>v n} \<Longrightarrow> rat_of_int (sq_norm v) \<le> \<alpha> ^ (m - 1) * rat_of_int (sq_norm h)"
  "v \<noteq> 0\<^sub>v j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (v \<in> carrier_vec n &&& v \<in> L - {0\<^sub>v n}) &&& (h \<in> L - {0\<^sub>v n} \<Longrightarrow> rat_of_int \<parallel>v\<parallel>\<^sup>2 \<le> \<alpha> ^ (m - 1) * rat_of_int \<parallel>h\<parallel>\<^sup>2) &&& v \<noteq> 0\<^sub>v j
[PROOF STEP]
using short_vector[of v, OF _ m0] short_vector_external[of v, OF _ m0]
    res[unfolded short_vector_hybrid_def]
[PROOF STATE]
proof (prove)
using this:
LLL_Impl.short_vector \<alpha> fs_init = v \<Longrightarrow> v \<in> carrier_vec n
LLL_Impl.short_vector \<alpha> fs_init = v \<Longrightarrow> v \<in> L - {0\<^sub>v n}
\<lbrakk>LLL_Impl.short_vector \<alpha> fs_init = v; ?h \<in> L - {0\<^sub>v n}\<rbrakk> \<Longrightarrow> rat_of_int \<parallel>v\<parallel>\<^sup>2 \<le> \<alpha> ^ (m - 1) * rat_of_int \<parallel>?h\<parallel>\<^sup>2
LLL_Impl.short_vector \<alpha> fs_init = v \<Longrightarrow> v \<noteq> 0\<^sub>v ?j
short_vector_external \<alpha> fs_init = v \<Longrightarrow> v \<in> carrier_vec n
short_vector_external \<alpha> fs_init = v \<Longrightarrow> v \<in> L - {0\<^sub>v n}
\<lbrakk>short_vector_external \<alpha> fs_init = v; ?h \<in> L - {0\<^sub>v n}\<rbrakk> \<Longrightarrow> rat_of_int \<parallel>v\<parallel>\<^sup>2 \<le> \<alpha> ^ (m - 1) * rat_of_int \<parallel>?h\<parallel>\<^sup>2
short_vector_external \<alpha> fs_init = v \<Longrightarrow> v \<noteq> 0\<^sub>v ?j
(if enable_external_lll_solver then short_vector_external else LLL_Impl.short_vector) \<alpha> fs_init = v

goal (1 subgoal):
 1. (v \<in> carrier_vec n &&& v \<in> L - {0\<^sub>v n}) &&& (h \<in> L - {0\<^sub>v n} \<Longrightarrow> rat_of_int \<parallel>v\<parallel>\<^sup>2 \<le> \<alpha> ^ (m - 1) * rat_of_int \<parallel>h\<parallel>\<^sup>2) &&& v \<noteq> 0\<^sub>v j
[PROOF STEP]
by (auto split: if_splits)