src/HOL/Library/Multiset.thy
changeset 72581 de581f98a3a1
parent 71917 4c5778d8a53d
child 72607 feebdaa346e5
equal deleted inserted replaced
72580:531a0c44ea3f 72581:de581f98a3a1
  3537 definition (in term_syntax)
  3537 definition (in term_syntax)
  3538   msetify :: "'a::typerep list \<times> (unit \<Rightarrow> Code_Evaluation.term)
  3538   msetify :: "'a::typerep list \<times> (unit \<Rightarrow> Code_Evaluation.term)
  3539     \<Rightarrow> 'a multiset \<times> (unit \<Rightarrow> Code_Evaluation.term)" where
  3539     \<Rightarrow> 'a multiset \<times> (unit \<Rightarrow> Code_Evaluation.term)" where
  3540   [code_unfold]: "msetify xs = Code_Evaluation.valtermify mset {\<cdot>} xs"
  3540   [code_unfold]: "msetify xs = Code_Evaluation.valtermify mset {\<cdot>} xs"
  3541 
  3541 
  3542 notation fcomp (infixl "\<circ>>" 60)
       
  3543 notation scomp (infixl "\<circ>\<rightarrow>" 60)
       
  3544 
       
  3545 instantiation multiset :: (random) random
  3542 instantiation multiset :: (random) random
  3546 begin
  3543 begin
  3547 
  3544 
       
  3545 context
       
  3546   includes state_combinator_syntax
       
  3547 begin
       
  3548 
  3548 definition
  3549 definition
  3549   "Quickcheck_Random.random i = Quickcheck_Random.random i \<circ>\<rightarrow> (\<lambda>xs. Pair (msetify xs))"
  3550   "Quickcheck_Random.random i = Quickcheck_Random.random i \<circ>\<rightarrow> (\<lambda>xs. Pair (msetify xs))"
  3550 
  3551 
  3551 instance ..
  3552 instance ..
  3552 
  3553 
  3553 end
  3554 end
  3554 
  3555 
  3555 no_notation fcomp (infixl "\<circ>>" 60)
  3556 end
  3556 no_notation scomp (infixl "\<circ>\<rightarrow>" 60)
       
  3557 
  3557 
  3558 instantiation multiset :: (full_exhaustive) full_exhaustive
  3558 instantiation multiset :: (full_exhaustive) full_exhaustive
  3559 begin
  3559 begin
  3560 
  3560 
  3561 definition full_exhaustive_multiset :: "('a multiset \<times> (unit \<Rightarrow> term) \<Rightarrow> (bool \<times> term list) option) \<Rightarrow> natural \<Rightarrow> (bool \<times> term list) option"
  3561 definition full_exhaustive_multiset :: "('a multiset \<times> (unit \<Rightarrow> term) \<Rightarrow> (bool \<times> term list) option) \<Rightarrow> natural \<Rightarrow> (bool \<times> term list) option"