src/HOL/Library/Sum_of_Squares_Remote.thy
author haftmann
Tue Feb 19 19:44:10 2013 +0100 (2013-02-19)
changeset 51188 9b5bf1a9a710
parent 48934 f9a800f21434
child 58881 b9556a055632
permissions -rw-r--r--
dropped spurious left-over from 0a2371e7ced3
wenzelm@48932
     1
(*  Title:      HOL/Library/Sum_of_Squares_Remote.thy
wenzelm@48932
     2
    Author:     Amine Chaieb, University of Cambridge
wenzelm@48932
     3
    Author:     Philipp Meyer, TU Muenchen
wenzelm@48932
     4
*)
wenzelm@48932
     5
wenzelm@48932
     6
header {* Examples with remote CSDP *}
wenzelm@48932
     7
wenzelm@48932
     8
theory Sum_of_Squares_Remote
wenzelm@48932
     9
imports Sum_of_Squares
wenzelm@48932
    10
begin
wenzelm@48932
    11
wenzelm@48932
    12
lemma "(3::real) * x + 7 * a < 4 & 3 < 2 * x \<Longrightarrow> a < 0"
wenzelm@48932
    13
  by (sos remote_csdp)
wenzelm@48932
    14
wenzelm@48932
    15
lemma "a1 >= 0 & a2 >= 0 \<and> (a1 * a1 + a2 * a2 = b1 * b1 + b2 * b2 + 2) \<and> (a1 * b1 + a2 * b2 = 0) --> a1 * a2 - b1 * b2 >= (0::real)"
wenzelm@48932
    16
  by (sos remote_csdp)
wenzelm@48932
    17
wenzelm@48932
    18
lemma "(3::real) * x + 7 * a < 4 & 3 < 2 * x --> a < 0"
wenzelm@48932
    19
  by (sos remote_csdp)
wenzelm@48932
    20
wenzelm@48932
    21
lemma "(0::real) <= x & x <= 1 & 0 <= y & y <= 1  --> x^2 + y^2 < 1 |(x - 1)^2 + y^2 < 1 | x^2 + (y - 1)^2 < 1 | (x - 1)^2 + (y - 1)^2 < 1"
wenzelm@48932
    22
  by (sos remote_csdp)
wenzelm@48932
    23
wenzelm@48932
    24
lemma "(0::real) <= x & 0 <= y & 0 <= z & x + y + z <= 3 --> x * y + x * z + y * z >= 3 * x * y * z"
wenzelm@48932
    25
  by (sos remote_csdp)
wenzelm@48932
    26
wenzelm@48932
    27
lemma "((x::real)^2 + y^2 + z^2 = 1) --> (x + y + z)^2 <= 3"
wenzelm@48932
    28
  by (sos remote_csdp)
wenzelm@48932
    29
wenzelm@48932
    30
lemma "(w^2 + x^2 + y^2 + z^2 = 1) --> (w + x + y + z)^2 <= (4::real)"
wenzelm@48932
    31
  by (sos remote_csdp)
wenzelm@48932
    32
wenzelm@48932
    33
lemma "(x::real) >= 1 & y >= 1 --> x * y >= x + y - 1"
wenzelm@48932
    34
  by (sos remote_csdp)
wenzelm@48932
    35
wenzelm@48932
    36
end