src/HOL/GCD.thy
changeset 80764 47c0aa388621
parent 80760 be8c0e039a5e
child 80766 72beac575e9c
equal deleted inserted replaced
80763:29837d4809e7 80764:47c0aa388621
  2854 context semiring_1
  2854 context semiring_1
  2855 begin
  2855 begin
  2856 
  2856 
  2857 context
  2857 context
  2858   fixes CHAR :: nat
  2858   fixes CHAR :: nat
  2859   defines "CHAR \<equiv> semiring_char (Pure.type :: 'a itself)"
  2859   defines "CHAR \<equiv> semiring_char TYPE('a)"
  2860 begin
  2860 begin
  2861 
  2861 
  2862 lemma of_nat_CHAR [simp]: "of_nat CHAR = (0 :: 'a)"
  2862 lemma of_nat_CHAR [simp]: "of_nat CHAR = (0 :: 'a)"
  2863 proof -
  2863 proof -
  2864   have "CHAR \<in> {n. of_nat n = (0::'a)}"
  2864   have "CHAR \<in> {n. of_nat n = (0::'a)}"
  2927 qed
  2927 qed
  2928 
  2928 
  2929 end
  2929 end
  2930 end
  2930 end
  2931 
  2931 
  2932 lemma (in semiring_char_0) CHAR_eq_0 [simp]: "semiring_char (Pure.type :: 'a itself) = 0"
  2932 lemma (in semiring_char_0) CHAR_eq_0 [simp]: "semiring_char TYPE('a) = 0"
  2933   by (simp add: CHAR_eq0_iff)
  2933   by (simp add: CHAR_eq0_iff)
  2934 
  2934 
  2935 
  2935 
  2936 (* nicer notation *)
  2936 (* nicer notation *)
  2937 
  2937