diff --git a/doc/ref/blist.xml b/doc/ref/blist.xml index 79f780b687..f0e0210455 100644 --- a/doc/ref/blist.xml +++ b/doc/ref/blist.xml @@ -56,6 +56,7 @@ In function names we call boolean lists blists for brevity. <#Include Label="UniteBlistList"> <#Include Label="IntersectBlist"> <#Include Label="SubtractBlist"> +<#Include Label="MeetBlist"> <#Include Label="FlipBlist"> <#Include Label="SetAllBlist"> <#Include Label="ClearAllBlist"> diff --git a/lib/list.g b/lib/list.g index 33866ac617..5f132bad75 100644 --- a/lib/list.g +++ b/lib/list.g @@ -881,6 +881,34 @@ DeclareSynonym( "IntersectBlist", INTER_BLIST ); ## DeclareSynonym( "SubtractBlist", SUBTR_BLIST ); +############################################################################# +## +#F MeetBlist( , ) +## +## <#GAPDoc Label="MeetBlist"> +## +## +## +## +## Returns true if blist1 and blist2 have true in the same +## position and false otherwise. It is equivalent to, but faster than +## SizeBlist(IntersectionBlist(blist1, blist2)) <> 0. +## The lists must have the same length. +## blist1 := [ true, true, true, true ];; +## gap> blist2 := [ true, false, true, false ];; +## gap> MeetBlist( blist1, blist2 ); +## true +## gap> FlipBlist( blist1 ); +## gap> MeetBlist( blist1, blist2 ); +## false +## ]]> +## +## +## <#/GAPDoc> +## +DeclareSynonym( "MeetBlist", MEET_BLIST ); + ############################################################################# ## #F FlipBlist( )