src/HOL/Relation.thy
changeset 61955 e96292f32c3c
parent 61799 4cf66f21b764
child 62087 44841d07ef1d
equal deleted inserted replaced
61954:1d43f86f48be 61955:e96292f32c3c
   682 lemma OO_eq: "R OO op = = R"
   682 lemma OO_eq: "R OO op = = R"
   683 by blast
   683 by blast
   684 
   684 
   685 subsubsection \<open>Converse\<close>
   685 subsubsection \<open>Converse\<close>
   686 
   686 
   687 inductive_set converse :: "('a \<times> 'b) set \<Rightarrow> ('b \<times> 'a) set" ("(_^-1)" [1000] 999)
   687 inductive_set converse :: "('a \<times> 'b) set \<Rightarrow> ('b \<times> 'a) set"  ("(_\<inverse>)" [1000] 999)
   688   for r :: "('a \<times> 'b) set"
   688   for r :: "('a \<times> 'b) set"
   689 where
   689 where
   690   "(a, b) \<in> r \<Longrightarrow> (b, a) \<in> r^-1"
   690   "(a, b) \<in> r \<Longrightarrow> (b, a) \<in> r\<inverse>"
   691 
       
   692 notation (xsymbols)
       
   693   converse  ("(_\<inverse>)" [1000] 999)
       
   694 
   691 
   695 notation
   692 notation
       
   693   conversep  ("(_\<inverse>\<inverse>)" [1000] 1000)
       
   694 
       
   695 notation (ASCII)
       
   696   converse  ("(_^-1)" [1000] 999) and
   696   conversep ("(_^--1)" [1000] 1000)
   697   conversep ("(_^--1)" [1000] 1000)
   697 
       
   698 notation (xsymbols)
       
   699   conversep  ("(_\<inverse>\<inverse>)" [1000] 1000)
       
   700 
   698 
   701 lemma converseI [sym]:
   699 lemma converseI [sym]:
   702   "(a, b) \<in> r \<Longrightarrow> (b, a) \<in> r\<inverse>"
   700   "(a, b) \<in> r \<Longrightarrow> (b, a) \<in> r\<inverse>"
   703   by (fact converse.intros)
   701   by (fact converse.intros)
   704 
   702