equal
deleted
inserted
replaced
1988 qed |
1988 qed |
1989 |
1989 |
1990 definition |
1990 definition |
1991 "Gcd (M::nat set) = Lcm {d. \<forall>m\<in>M. d dvd m}" |
1991 "Gcd (M::nat set) = Lcm {d. \<forall>m\<in>M. d dvd m}" |
1992 |
1992 |
|
1993 interpretation bla: semilattice_neutr_set gcd "0::nat" .. |
|
1994 |
1993 instance .. |
1995 instance .. |
1994 |
1996 |
1995 end |
1997 end |
1996 |
1998 |
1997 instance nat :: semiring_Gcd |
1999 instance nat :: semiring_Gcd |
2010 by (rule associated_eqI) (auto intro!: Gcd_dvd Gcd_greatest) |
2012 by (rule associated_eqI) (auto intro!: Gcd_dvd Gcd_greatest) |
2011 qed |
2013 qed |
2012 |
2014 |
2013 interpretation gcd_lcm_complete_lattice_nat: |
2015 interpretation gcd_lcm_complete_lattice_nat: |
2014 complete_lattice Gcd Lcm gcd Rings.dvd "\<lambda>m n. m dvd n \<and> \<not> n dvd m" lcm 1 "0::nat" |
2016 complete_lattice Gcd Lcm gcd Rings.dvd "\<lambda>m n. m dvd n \<and> \<not> n dvd m" lcm 1 "0::nat" |
2015 rewrites "Inf.INFIMUM Gcd A f = Gcd (f ` A :: nat set)" |
2017 by standard (auto simp add: Gcd_nat_def Lcm_nat_empty Lcm_nat_infinite) |
2016 and "Sup.SUPREMUM Lcm A f = Lcm (f ` A)" |
|
2017 proof - |
|
2018 show "class.complete_lattice Gcd Lcm gcd Rings.dvd (\<lambda>m n. m dvd n \<and> \<not> n dvd m) lcm 1 (0::nat)" |
|
2019 by standard (auto simp add: Gcd_nat_def Lcm_nat_empty Lcm_nat_infinite) |
|
2020 then interpret gcd_lcm_complete_lattice_nat: |
|
2021 complete_lattice Gcd Lcm gcd Rings.dvd "\<lambda>m n. m dvd n \<and> \<not> n dvd m" lcm 1 "0::nat" . |
|
2022 from gcd_lcm_complete_lattice_nat.INF_def show "Inf.INFIMUM Gcd A f = Gcd (f ` A)" . |
|
2023 from gcd_lcm_complete_lattice_nat.SUP_def show "Sup.SUPREMUM Lcm A f = Lcm (f ` A)" . |
|
2024 qed |
|
2025 |
|
2026 declare gcd_lcm_complete_lattice_nat.Inf_image_eq [simp del] |
|
2027 declare gcd_lcm_complete_lattice_nat.Sup_image_eq [simp del] |
|
2028 |
2018 |
2029 lemma Lcm_empty_nat: |
2019 lemma Lcm_empty_nat: |
2030 "Lcm {} = (1::nat)" |
2020 "Lcm {} = (1::nat)" |
2031 by (fact Lcm_empty) |
2021 by (fact Lcm_empty) |
2032 |
2022 |