src/HOL/Algebra/Divisibility.thy
changeset 81142 6ad2c917dd2e
parent 80914 d97fdabd9e2b
equal deleted inserted replaced
81141:3e3e7a68cd80 81142:6ad2c917dd2e
  1991 
  1991 
  1992 subsection \<open>Greatest Common Divisors and Lowest Common Multiples\<close>
  1992 subsection \<open>Greatest Common Divisors and Lowest Common Multiples\<close>
  1993 
  1993 
  1994 subsubsection \<open>Definitions\<close>
  1994 subsubsection \<open>Definitions\<close>
  1995 
  1995 
  1996 definition isgcd :: "[('a,_) monoid_scheme, 'a, 'a, 'a] \<Rightarrow> bool"  (\<open>(_ gcdof\<index> _ _)\<close> [81,81,81] 80)
  1996 definition isgcd :: "[('a,_) monoid_scheme, 'a, 'a, 'a] \<Rightarrow> bool"
       
  1997     (\<open>(\<open>notation=\<open>mixfix gcdof\<close>\<close>_ gcdof\<index> _ _)\<close> [81,81,81] 80)
  1997   where "x gcdof\<^bsub>G\<^esub> a b \<longleftrightarrow> x divides\<^bsub>G\<^esub> a \<and> x divides\<^bsub>G\<^esub> b \<and>
  1998   where "x gcdof\<^bsub>G\<^esub> a b \<longleftrightarrow> x divides\<^bsub>G\<^esub> a \<and> x divides\<^bsub>G\<^esub> b \<and>
  1998     (\<forall>y\<in>carrier G. (y divides\<^bsub>G\<^esub> a \<and> y divides\<^bsub>G\<^esub> b \<longrightarrow> y divides\<^bsub>G\<^esub> x))"
  1999     (\<forall>y\<in>carrier G. (y divides\<^bsub>G\<^esub> a \<and> y divides\<^bsub>G\<^esub> b \<longrightarrow> y divides\<^bsub>G\<^esub> x))"
  1999 
  2000 
  2000 definition islcm :: "[_, 'a, 'a, 'a] \<Rightarrow> bool"  (\<open>(_ lcmof\<index> _ _)\<close> [81,81,81] 80)
  2001 definition islcm :: "[_, 'a, 'a, 'a] \<Rightarrow> bool"
       
  2002     (\<open>(\<open>notation=\<open>mixfix lcmof\<close>\<close>_ lcmof\<index> _ _)\<close> [81,81,81] 80)
  2001   where "x lcmof\<^bsub>G\<^esub> a b \<longleftrightarrow> a divides\<^bsub>G\<^esub> x \<and> b divides\<^bsub>G\<^esub> x \<and>
  2003   where "x lcmof\<^bsub>G\<^esub> a b \<longleftrightarrow> a divides\<^bsub>G\<^esub> x \<and> b divides\<^bsub>G\<^esub> x \<and>
  2002     (\<forall>y\<in>carrier G. (a divides\<^bsub>G\<^esub> y \<and> b divides\<^bsub>G\<^esub> y \<longrightarrow> x divides\<^bsub>G\<^esub> y))"
  2004     (\<forall>y\<in>carrier G. (a divides\<^bsub>G\<^esub> y \<and> b divides\<^bsub>G\<^esub> y \<longrightarrow> x divides\<^bsub>G\<^esub> y))"
  2003 
  2005 
  2004 definition somegcd :: "('a,_) monoid_scheme \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> 'a"
  2006 definition somegcd :: "('a,_) monoid_scheme \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> 'a"
  2005   where "somegcd G a b = (SOME x. x \<in> carrier G \<and> x gcdof\<^bsub>G\<^esub> a b)"
  2007   where "somegcd G a b = (SOME x. x \<in> carrier G \<and> x gcdof\<^bsub>G\<^esub> a b)"