src/HOL/Word/Traditional_Syntax.thy
author haftmann
Mon, 06 Jul 2020 10:47:30 +0000
changeset 72000 379d0c207c29
child 72508 c89d8e8bd8c7
permissions -rw-r--r--
separation of traditional bit operations

(*  Author:     Jeremy Dawson, NICTA
*)

section \<open>Operation variants with traditional syntax\<close>

theory Traditional_Syntax
  imports Main
begin

class semiring_bit_syntax = semiring_bit_shifts +
  fixes test_bit :: \<open>'a \<Rightarrow> nat \<Rightarrow> bool\<close>  (infixl "!!" 100)
    and shiftl :: \<open>'a \<Rightarrow> nat \<Rightarrow> 'a\<close>  (infixl "<<" 55)
    and shiftr :: \<open>'a \<Rightarrow> nat \<Rightarrow> 'a\<close>  (infixl ">>" 55)
  assumes test_bit_eq_bit: \<open>test_bit = bit\<close>
    and shiftl_eq_push_bit: \<open>a << n = push_bit n a\<close>
    and shiftr_eq_drop_bit: \<open>a >> n = drop_bit n a\<close>

end