src/HOL/Old_Number_Theory/Quadratic_Reciprocity.thy
changeset 38159 e9b4835a54ee
parent 32479 521cc9bf2958
child 41541 1fa4725c4656
     1.1 --- a/src/HOL/Old_Number_Theory/Quadratic_Reciprocity.thy	Thu Aug 05 23:43:43 2010 +0200
     1.2 +++ b/src/HOL/Old_Number_Theory/Quadratic_Reciprocity.thy	Fri Aug 06 12:37:00 2010 +0200
     1.3 @@ -1,4 +1,5 @@
     1.4 -(*  Authors:    Jeremy Avigad, David Gray, and Adam Kramer
     1.5 +(*  Title:      HOL/Old_Number_Theory/Quadratic_Reciprocity.thy
     1.6 +    Authors:    Jeremy Avigad, David Gray, and Adam Kramer
     1.7  *)
     1.8  
     1.9  header {* The law of Quadratic reciprocity *}
    1.10 @@ -165,33 +166,26 @@
    1.11    assumes p_neq_q:      "p \<noteq> q"
    1.12  begin
    1.13  
    1.14 -definition
    1.15 -  P_set :: "int set" where
    1.16 -  "P_set = {x. 0 < x & x \<le> ((p - 1) div 2) }"
    1.17 +definition P_set :: "int set"
    1.18 +  where "P_set = {x. 0 < x & x \<le> ((p - 1) div 2) }"
    1.19  
    1.20 -definition
    1.21 -  Q_set :: "int set" where
    1.22 -  "Q_set = {x. 0 < x & x \<le> ((q - 1) div 2) }"
    1.23 +definition Q_set :: "int set"
    1.24 +  where "Q_set = {x. 0 < x & x \<le> ((q - 1) div 2) }"
    1.25    
    1.26 -definition
    1.27 -  S :: "(int * int) set" where
    1.28 -  "S = P_set <*> Q_set"
    1.29 +definition S :: "(int * int) set"
    1.30 +  where "S = P_set <*> Q_set"
    1.31  
    1.32 -definition
    1.33 -  S1 :: "(int * int) set" where
    1.34 -  "S1 = { (x, y). (x, y):S & ((p * y) < (q * x)) }"
    1.35 +definition S1 :: "(int * int) set"
    1.36 +  where "S1 = { (x, y). (x, y):S & ((p * y) < (q * x)) }"
    1.37  
    1.38 -definition
    1.39 -  S2 :: "(int * int) set" where
    1.40 -  "S2 = { (x, y). (x, y):S & ((q * x) < (p * y)) }"
    1.41 +definition S2 :: "(int * int) set"
    1.42 +  where "S2 = { (x, y). (x, y):S & ((q * x) < (p * y)) }"
    1.43  
    1.44 -definition
    1.45 -  f1 :: "int => (int * int) set" where
    1.46 -  "f1 j = { (j1, y). (j1, y):S & j1 = j & (y \<le> (q * j) div p) }"
    1.47 +definition f1 :: "int => (int * int) set"
    1.48 +  where "f1 j = { (j1, y). (j1, y):S & j1 = j & (y \<le> (q * j) div p) }"
    1.49  
    1.50 -definition
    1.51 -  f2 :: "int => (int * int) set" where
    1.52 -  "f2 j = { (x, j1). (x, j1):S & j1 = j & (x \<le> (p * j) div q) }"
    1.53 +definition f2 :: "int => (int * int) set"
    1.54 +  where "f2 j = { (x, j1). (x, j1):S & j1 = j & (x \<le> (p * j) div q) }"
    1.55  
    1.56  lemma p_fact: "0 < (p - 1) div 2"
    1.57  proof -