src/HOLCF/Tools/Domain/domain_take_proofs.ML
changeset 36692 54b64d4ad524
parent 36241 2a4cec6bcae2
child 37078 a1656804fcad
equal deleted inserted replaced
36674:d95f39448121 36692:54b64d4ad524
   552         (chain_take_thms ~~ lub_take_thms ~~ dbinds) thy;
   552         (chain_take_thms ~~ lub_take_thms ~~ dbinds) thy;
   553 
   553 
   554     (* test for finiteness of domain definitions *)
   554     (* test for finiteness of domain definitions *)
   555     local
   555     local
   556       val types = [@{type_name ssum}, @{type_name sprod}];
   556       val types = [@{type_name ssum}, @{type_name sprod}];
   557       fun finite d T = if T mem absTs then d else finite' d T
   557       fun finite d T = if member (op =) absTs T then d else finite' d T
   558       and finite' d (Type (c, Ts)) =
   558       and finite' d (Type (c, Ts)) =
   559           let val d' = d andalso c mem types;
   559           let val d' = d andalso member (op =) types c;
   560           in forall (finite d') Ts end
   560           in forall (finite d') Ts end
   561         | finite' d _ = true;
   561         | finite' d _ = true;
   562     in
   562     in
   563       val is_finite = forall (finite true) repTs;
   563       val is_finite = forall (finite true) repTs;
   564     end;
   564     end;