src/HOL/Decision_Procs/ex/Commutative_Ring_Ex.thy
author wenzelm
Mon, 03 Sep 2012 09:15:58 +0200
changeset 49070 f00fee6d21d4
parent 48480 cb03acfae211
child 58889 5b7a9633cfa8
permissions -rw-r--r--
tuned proofs;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33356
9157d0f9f00e moved Commutative_Ring into session Decision_Procs
haftmann
parents: 17508
diff changeset
     1
(*  Author:     Bernhard Haeupler *)
17388
495c799df31d tuned headers etc.;
wenzelm
parents: 17378
diff changeset
     2
495c799df31d tuned headers etc.;
wenzelm
parents: 17378
diff changeset
     3
header {* Some examples demonstrating the comm-ring method *}
495c799df31d tuned headers etc.;
wenzelm
parents: 17378
diff changeset
     4
33356
9157d0f9f00e moved Commutative_Ring into session Decision_Procs
haftmann
parents: 17508
diff changeset
     5
theory Commutative_Ring_Ex
48480
cb03acfae211 modernized imports;
wenzelm
parents: 33356
diff changeset
     6
imports "../Commutative_Ring"
17378
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
     7
begin
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
     8
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
     9
lemma "4*(x::int)^5*y^3*x^2*3 + x*z + 3^5 = 12*x^7*y^3 + z*x + 243"
49070
f00fee6d21d4 tuned proofs;
wenzelm
parents: 48480
diff changeset
    10
  by comm_ring
17378
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    11
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    12
lemma "((x::int) + y)^2  = x^2 + y^2 + 2*x*y"
49070
f00fee6d21d4 tuned proofs;
wenzelm
parents: 48480
diff changeset
    13
  by comm_ring
17378
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    14
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    15
lemma "((x::int) + y)^3  = x^3 + y^3 + 3*x^2*y + 3*y^2*x"
49070
f00fee6d21d4 tuned proofs;
wenzelm
parents: 48480
diff changeset
    16
  by comm_ring
17378
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    17
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    18
lemma "((x::int) - y)^3  = x^3 + 3*x*y^2 + (-3)*y*x^2 - y^3"
49070
f00fee6d21d4 tuned proofs;
wenzelm
parents: 48480
diff changeset
    19
  by comm_ring
17378
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    20
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    21
lemma "((x::int) - y)^2  = x^2 + y^2 - 2*x*y"
49070
f00fee6d21d4 tuned proofs;
wenzelm
parents: 48480
diff changeset
    22
  by comm_ring
17378
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    23
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    24
lemma " ((a::int) + b + c)^2 = a^2 + b^2 + c^2 + 2*a*b + 2*b*c + 2*a*c"
49070
f00fee6d21d4 tuned proofs;
wenzelm
parents: 48480
diff changeset
    25
  by comm_ring
17378
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    26
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    27
lemma "((a::int) - b - c)^2 = a^2 + b^2 + c^2 - 2*a*b + 2*b*c - 2*a*c"
49070
f00fee6d21d4 tuned proofs;
wenzelm
parents: 48480
diff changeset
    28
  by comm_ring
17378
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    29
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    30
lemma "(a::int)*b + a*c = a*(b+c)"
49070
f00fee6d21d4 tuned proofs;
wenzelm
parents: 48480
diff changeset
    31
  by comm_ring
17378
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    32
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    33
lemma "(a::int)^2 - b^2 = (a - b) * (a + b)"
49070
f00fee6d21d4 tuned proofs;
wenzelm
parents: 48480
diff changeset
    34
  by comm_ring
17378
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    35
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    36
lemma "(a::int)^3 - b^3 = (a - b) * (a^2 + a*b + b^2)"
49070
f00fee6d21d4 tuned proofs;
wenzelm
parents: 48480
diff changeset
    37
  by comm_ring
17378
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    38
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    39
lemma "(a::int)^3 + b^3 = (a + b) * (a^2 - a*b + b^2)"
49070
f00fee6d21d4 tuned proofs;
wenzelm
parents: 48480
diff changeset
    40
  by comm_ring
17378
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    41
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    42
lemma "(a::int)^4 - b^4 = (a - b) * (a + b)*(a^2 + b^2)"
49070
f00fee6d21d4 tuned proofs;
wenzelm
parents: 48480
diff changeset
    43
  by comm_ring
17378
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    44
49070
f00fee6d21d4 tuned proofs;
wenzelm
parents: 48480
diff changeset
    45
lemma "(a::int)^10 - b^10 =
f00fee6d21d4 tuned proofs;
wenzelm
parents: 48480
diff changeset
    46
  (a - b) * (a^9 + a^8*b + a^7*b^2 + a^6*b^3 + a^5*b^4 + a^4*b^5 + a^3*b^6 + a^2*b^7 + a*b^8 + b^9)"
f00fee6d21d4 tuned proofs;
wenzelm
parents: 48480
diff changeset
    47
  by comm_ring
17378
105519771c67 The oracle for Presburger has been changer: It is automatically generated form a verified formaliztion of Cooper's Algorithm ex/Reflected_Presburger.thy
chaieb
parents:
diff changeset
    48
17388
495c799df31d tuned headers etc.;
wenzelm
parents: 17378
diff changeset
    49
end