src/HOL/Lambda/Commutation.thy
changeset 21404 eb85850d3eb7
parent 19363 667b5ea637dd
child 21669 c68717c16013
equal deleted inserted replaced
21403:dd58f13a8eb4 21404:eb85850d3eb7
     9 theory Commutation imports Main begin
     9 theory Commutation imports Main begin
    10 
    10 
    11 subsection {* Basic definitions *}
    11 subsection {* Basic definitions *}
    12 
    12 
    13 definition
    13 definition
    14   square :: "[('a \<times> 'a) set, ('a \<times> 'a) set, ('a \<times> 'a) set, ('a \<times> 'a) set] => bool"
    14   square :: "[('a \<times> 'a) set, ('a \<times> 'a) set, ('a \<times> 'a) set, ('a \<times> 'a) set] => bool" where
    15   "square R S T U =
    15   "square R S T U =
    16     (\<forall>x y. (x, y) \<in> R --> (\<forall>z. (x, z) \<in> S --> (\<exists>u. (y, u) \<in> T \<and> (z, u) \<in> U)))"
    16     (\<forall>x y. (x, y) \<in> R --> (\<forall>z. (x, z) \<in> S --> (\<exists>u. (y, u) \<in> T \<and> (z, u) \<in> U)))"
    17 
    17 
    18   commute :: "[('a \<times> 'a) set, ('a \<times> 'a) set] => bool"
    18 definition
       
    19   commute :: "[('a \<times> 'a) set, ('a \<times> 'a) set] => bool" where
    19   "commute R S = square R S S R"
    20   "commute R S = square R S S R"
    20 
    21 
    21   diamond :: "('a \<times> 'a) set => bool"
    22 definition
       
    23   diamond :: "('a \<times> 'a) set => bool" where
    22   "diamond R = commute R R"
    24   "diamond R = commute R R"
    23 
    25 
    24   Church_Rosser :: "('a \<times> 'a) set => bool"
    26 definition
       
    27   Church_Rosser :: "('a \<times> 'a) set => bool" where
    25   "Church_Rosser R =
    28   "Church_Rosser R =
    26     (\<forall>x y. (x, y) \<in> (R \<union> R^-1)^* --> (\<exists>z. (x, z) \<in> R^* \<and> (y, z) \<in> R^*))"
    29     (\<forall>x y. (x, y) \<in> (R \<union> R^-1)^* --> (\<exists>z. (x, z) \<in> R^* \<and> (y, z) \<in> R^*))"
    27 
    30 
    28 abbreviation
    31 abbreviation
    29   confluent :: "('a \<times> 'a) set => bool"
    32   confluent :: "('a \<times> 'a) set => bool" where
    30   "confluent R == diamond (R^*)"
    33   "confluent R == diamond (R^*)"
    31 
    34 
    32 
    35 
    33 subsection {* Basic lemmas *}
    36 subsection {* Basic lemmas *}
    34 
    37