(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Wolfram 15.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       154,          7]
NotebookDataLength[     51230,       1335]
NotebookOptionsPosition[     42151,       1168]
NotebookOutlinePosition[     44262,       1217]
CellTagsIndexPosition[     44184,       1212]
WindowTitle->SearchLedgerFilter
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[BoxData[GridBox[{
   {GridBox[{
      {
       ItemBox[Cell[BoxData[
         RowBox[{
          TemplateBox[{12},
           "Spacer1"], Cell[
          "WOLFRAM INSTITUTE/ PUZZLES SYMBOL", "PacletNameCell",
           TextAlignment->Center,ExpressionUUID->
           "7e0ee9f6-bb24-47df-8fd8-c3c7d14a0c26"], 
          TemplateBox[{8},
           "Spacer1"]}]],
         TextAlignment->Center,ExpressionUUID->
         "0151e1f9-6dd6-4115-b100-9c147c625d38"],
        Background->LightDarkSwitched[
          RGBColor[0.490196, 0.576471, 0.690196]],
        ItemSize->Full], ""}
     },
     GridBoxAlignment->{"Rows" -> {{Center}}},
     GridBoxItemSize->{"Columns" -> {Full, 
         Scaled[0.02]}, "Rows" -> {{2.5}}}], Cell[TextData[{
     Cell[BoxData[
      TagBox[
       ActionMenuBox[
        FrameBox[Cell[TextData[{
          "See Also",
          " ",
          Cell[BoxData[
           GraphicsBox[
            {GrayLevel[0.66667], Thickness[0.13], 
             LineBox[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]},
            AspectRatio->1,
            ImageSize->20,
            PlotRange->{{-3, 4}, {-1, 1}}]],ExpressionUUID->
           "4e3d73f8-8b92-4fdb-a2d7-5c528e6aa321"]
         }],ExpressionUUID->"8f5e39ca-32f0-4dde-96af-2f88f20f4d89"],
         StripOnInput->False],{
        StyleBox["\"SearchLedger\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/SearchLedger"], 
         StyleBox[
          "\"SearchLedgerRecord\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/SearchLedgerRecord"], 
         StyleBox[
          "\"SearchLedgerTestedQ\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/SearchLedgerTestedQ"], 
         StyleBox[
          "\"CandidateFingerprint\"", "SeeAlsoRelated", StripOnInput -> 
           False] :> Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/CandidateFingerprint"], 
         StyleBox[
          "\"CandidateSweep\"", "SeeAlsoRelated", StripOnInput -> False] :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/ref/CandidateSweep"]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"SeeAlso"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "bdfcc9d9-d2d6-4a86-9d28-af54ca242a2b"],
     "\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\
\[ThickSpace]",
     Cell[BoxData[
      TagBox[
       ActionMenuBox[
        FrameBox[Cell[TextData[{
          "Related Guides",
          " ",
          Cell[BoxData[
           GraphicsBox[
            {GrayLevel[0.66667], Thickness[0.13], 
             LineBox[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]},
            AspectRatio->1,
            ImageSize->20,
            PlotRange->{{-3, 4}, {-1, 1}}]],ExpressionUUID->
           "4ea7cb6f-6c50-4fda-8489-6e9ffe8554a5"]
         }],ExpressionUUID->"416e8cf7-1faa-4942-afc4-e4bc808fb4dd"],
         StripOnInput->False],{
        "\"Search\"" :> 
         Documentation`HelpLookup[
          "paclet:WolframInstitute/Puzzles/guide/Search"]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"MoreAbout"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "236a91b1-fa68-42dd-93d7-efee99f3949c"],
     "\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\
\[ThickSpace]",
     Cell[BoxData[
      TagBox[
       ActionMenuBox[
        FrameBox[Cell[TextData[{
          "URL",
          " ",
          Cell[BoxData[
           GraphicsBox[
            {GrayLevel[0.66667], Thickness[0.13], 
             LineBox[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]},
            AspectRatio->1,
            ImageSize->20,
            PlotRange->{{-3, 4}, {-1, 1}}]],ExpressionUUID->
           "8eee8bbf-0f8b-47f5-9fd9-5692d619f1f7"]
         }],ExpressionUUID->"1c075be9-4c5c-4ab1-8f73-a2bb3792e75f"],
         StripOnInput->False],{
        "\"WolframInstitute/Puzzles/ref/SearchLedgerFilter\"" :> None, 
         "\"Copy Wolfram Documentation Center URL\"" :> 
         CopyToClipboard["WolframInstitute/Puzzles/ref/SearchLedgerFilter"], 
         Delimiter, "\"Copy web URL\"" :> 
         Module[{DocumentationSearch`Private`nb$}, 
           DocumentationSearch`Private`nb$ = 
            NotebookPut[
             Notebook[{
               Cell[BoxData[
                 MakeBoxes[
                  Hyperlink[
                   "http://reference.wolfram.com/language/WolframInstitute/\
Puzzles/ref/SearchLedgerFilter.html"], StandardForm]], "Input", 
                 TextClipboardType -> "PlainText"]}, Visible -> False]]; 
           SelectionMove[DocumentationSearch`Private`nb$, All, Notebook]; 
           FrontEndTokenExecute[DocumentationSearch`Private`nb$, "Copy"]; 
           NotebookClose[DocumentationSearch`Private`nb$]; Null], 
         "\"Go to web URL\"" :> 
         FrontEndExecute[{
           NotebookLocate[{
             URL[If[TrueQ[False], 
                 "http://reference.wolfram.com/system-modeler/", 
                 "http://reference.wolfram.com/language/"] <> 
               "WolframInstitute/Puzzles/ref/SearchLedgerFilter" <> ".html"], 
              None}]}]},
        Appearance->None,
        MenuAppearance->Automatic,
        MenuStyle->"URLMenu"],
       MouseAppearanceTag["LinkHand"]]],
      LineSpacing->{1.4, 0},ExpressionUUID->
      "e92c2c5c-aa08-45b0-b30f-ab91fb8fc14a"]
    }], "AnchorBar",
     CacheGraphics->False,ExpressionUUID->
     "a5b1c542-2d9f-44fc-b2e6-00f13c290fa6"]}
  }]], "AnchorBarGrid",
 CellID->1,ExpressionUUID->"0ad447cf-8155-4c58-ac86-3667f092de66"],

Cell["WolframInstitute`Puzzles`", "ContextNameCell",ExpressionUUID->"ede4cfec-b5e7-443b-b2e7-cd1ebf33ffd8"],

Cell[CellGroupData[{

Cell[BoxData[GridBox[{
   {Cell[TextData[{
     Cell[
     "SearchLedgerFilter", "ObjectName",ExpressionUUID->
      "7de8b7de-c519-4dc9-821f-0b50521715a6"],
     Cell[BoxData[
      TemplateBox[{8},
       "Spacer1"]],ExpressionUUID->"407fe10e-4bca-4111-b308-36f256c90c8a"],
     Cell[BoxData[
     ""], "ObjectNameTranslation",ExpressionUUID->
      "8ba425c0-9190-4742-a9ab-01bad9c4f7f4"]
    }],ExpressionUUID->"607a362a-2dab-4c5b-be6d-8787f8ee8e75"], 
    "\[SpanFromLeft]"}
  }]], "ObjectNameGrid",ExpressionUUID->"fae7156e-87e2-424d-b757-\
4641e67622ce"],

Cell[BoxData[GridBox[{
   {"", Cell[TextData[{
     Cell[BoxData[
      RowBox[{
       TemplateBox[{
         Cell[
          TextData["SearchLedgerFilter"]], 
         "paclet:WolframInstitute/Puzzles/ref/SearchLedgerFilter", 
         "WolframInstitute/Puzzles Package Symbol"},
        "PackageLink",
        BaseStyle->"InlineFormula"], "[", 
       RowBox[{
        StyleBox["ledger", "TI"], ",", 
        " ", "\"\<\!\(\*StyleBox[\"target\", \"TI\"]\)\>\"", ",", " ", 
        RowBox[{"{", 
         RowBox[{
          StyleBox["cand\:2081", "TI"], ",", " ", 
          StyleBox["cand\:2082", "TI"], ",", " ", "\[Ellipsis]"}], "}"}]}], 
       "]"}]], "InlineFormula",
      FontFamily->"Source Sans Pro",
      FontSize->0.9 Inherited,ExpressionUUID->
      "0933aa35-4ad6-4e32-a454-689b1d6f85fc"],
     "\[LineSeparator]",
     "gives the candidates that have not yet been recorded against the \
target, in their original order and with repeats within the batch removed."
    }],ExpressionUUID->"4f6d1deb-880b-4eb2-b561-4d7f19776efd"]}
  }]], "Usage",ExpressionUUID->"4ffc4651-0173-4979-9795-7470f11d12e2"]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[Cell[BoxData[Cell[TextData[{
  Cell[BoxData[
   DynamicBox[ToBoxes[
     If[CurrentValue[
        EvaluationCell[], "CellGroupOpen"] =!= Closed, 
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], 
      Rotate[
       Style[
        Graphics[{
          Thickness[0.18], 
          RGBColor[0.8509803921568627, 0.396078431372549, 0], 
          Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
         PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
        0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]],
    ImageSizeCache->{
     13.600000000000001`, {-0.1685058593749993, 13.768505859375}}]],
   ExpressionUUID->"dbed84a6-efd3-4b12-9b9f-4c3a2ec1a5b8"],
  Cell[BoxData[
   TemplateBox[{1},
    "Spacer1"]],ExpressionUUID->"0f19f25e-c89f-4ea7-ac58-c7118cddcdc5"],
  "Details and Options"
 }], "NotesFrameText",ExpressionUUID->
  "68ddff49-4c29-4135-8252-fe791ec096f0"]],ExpressionUUID->"312415b5-a756-\
4ec0-8917-4071bf943091"]], "NotesSection",
 ShowGroupOpener->"Thumbnail",
 WholeCellGroupOpener->True,
 CellGroupingRules->{"SectionGrouping", 50},
 CacheGraphics->False,
 CellID->115020856,ExpressionUUID->"f61f5e6a-ffe5-4f86-abfd-c0453a6cbc4d"],

Cell[TextData[{
 "This is the batch form of ",
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["SearchLedgerTestedQ"]], 
    "paclet:WolframInstitute/Puzzles/ref/SearchLedgerTestedQ", 
    "WolframInstitute/Puzzles Package Symbol"},
   "PackageLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "74b21cc2-a491-4be2-80e9-1ea6a1f25775"],
 ", and the one to use inside a loop: it reads the target's store once and \
fingerprints each candidate once."
}], "Notes",ExpressionUUID->"ce8d696c-8fed-4ba0-946f-c4bd202650ec"],

Cell["\<\
Order is preserved, so an index into the filtered list still corresponds to a \
position in the original batch in the obvious way.\
\>", "Notes",ExpressionUUID->"7e3e4bdc-f8f7-4485-9810-8f6e184e510f"],

Cell["\<\
A candidate that appears twice in the batch is kept once, since testing it \
twice inside one batch is the same waste the ledger exists to remove.\
\>", "Notes",ExpressionUUID->"fefd7a9e-b2da-49a9-98e3-31cf94a77865"],

Cell["\<\
Candidates are strings or byte arrays. A batch holding anything else matches \
no definition and the call is returned unevaluated.\
\>", "Notes",ExpressionUUID->"52856615-44f9-4b20-9189-a445f52f8220"],

Cell["\<\
An empty batch gives an empty list, and a target with no records gives the \
batch back unchanged.\
\>", "Notes",ExpressionUUID->"123ff47c-805e-499d-a694-405d9b5ceb86"],

Cell[TextData[{
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["CandidateSweep"]], 
    "paclet:WolframInstitute/Puzzles/ref/CandidateSweep", 
    "WolframInstitute/Puzzles Package Symbol"},
   "PackageLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "c77371ec-df26-482a-802c-afc4a02be195"],
 " with a ",
 Cell[BoxData["\<\"Ledger\"\>"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "9ed4ce56-b3ca-4359-aab6-f7d5a2de153c"],
 " applies this to every chunk before the oracle sees it, so a sweep of a \
space already covered tests nothing."
}], "Notes",ExpressionUUID->"2faad2b3-c7ea-4396-be2d-5e8289dab9be"]
}, Closed]],

Cell["", "PageDelimiter",ExpressionUUID->"6fff85b0-2a40-46c3-abe7-fc40eb16cd84"],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[
     MatchQ[
      CurrentValue[
       EvaluationNotebook[], {
       TaggingRules, "Openers", "PrimaryExamplesSection"}, Open], 
      Alternatives[True, Open]], 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]],
   ImageSizeCache->{
    13.600000000000001`, {4.251494140625001, 9.348505859375}}]],
  ExpressionUUID->"43ed0f23-8562-4a03-8c49-21c25f7d85be"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"447811e1-10d3-4444-8826-4eec7413a25c"],
 "Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(11)", "ExampleCount",ExpressionUUID->
  "a703a399-9aa5-498d-ac11-47f0a4aacf07"]
}], "PrimaryExamplesSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->420244492,ExpressionUUID->"b1182a70-63b3-4d35-8652-4e609371ad9e"],

Cell[BoxData[
 RowBox[{"Needs", "[", "\"\<WolframInstitute`Puzzles`\>\"", "]"}]], "Input", \
"ExampleInitialization",
 CellLabel->"In[1]:=",
 CellID->1969679695,ExpressionUUID->"65d1c82c-41a0-4db5-93b3-716afcf73c06"],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "5738139c-e1be-481d-a207-cdc01afb5c69"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"d0c54936-3fd7-4b9c-94ec-df2a48b49399"],
 "Basic Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(3)", "ExampleCount",ExpressionUUID->
  "e8241710-bbc1-45c1-9a81-96d38c335177"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->2122945708,ExpressionUUID->"d2271f5c-24bd-4746-9a84-71b2bc406f8a"],

Cell["Dropping the candidates already ruled out:", "ExampleText",
 CellTags->
  "TextAnnotation",ExpressionUUID->"604d7b11-97f1-48c9-b04c-31ef69d736c1"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Module", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"ledger", " ", "=", " ", 
      RowBox[{"SearchLedger", "[", 
       RowBox[{"FileNameJoin", "[", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"CreateDirectory", "[", "]"}], ",", " ", "\"\<ledger\>\""}],
          "}"}], "]"}], "]"}]}], ",", " ", 
     RowBox[{
     "target", " ", "=", 
      " ", "\"\<1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\>\""}]}], "}"}], ",", "\n",
    "\t", 
   RowBox[{
    RowBox[{"SearchLedgerRecord", "[", 
     RowBox[{"ledger", ",", " ", "target", ",", " ", 
      RowBox[{"{", 
       RowBox[{"\"\<hunter2\>\"", ",", " ", "\"\<letmein\>\""}], "}"}]}], 
     "]"}], ";", "\n", "\t", 
    RowBox[{"SearchLedgerFilter", "[", 
     RowBox[{"ledger", ",", " ", "target", ",", " ", 
      RowBox[{"{", 
       RowBox[{"\"\<hunter2\>\"", ",", " ", "\"\<swordfish\>\"", ",", 
        " ", "\"\<letmein\>\"", ",", " ", "\"\<correct horse\>\""}], "}"}]}], 
     "]"}]}]}], "\n", "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"b556eef4-32c5-41f7-be26-58db7c8d7138"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"\<\"swordfish\"\>", ",", "\<\"correct horse\"\>"}], 
  "}"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"3f0d4e75-2c66-4c5e-8ac7-a297c3ec84e7"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "c60106a4-293b-4051-a125-66ebb9c28181"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"8b1fd821-db7c-4031-\
926e-61ab384ca187"],

Cell["A target with no records gives the batch back:", "ExampleText",ExpressionUUID->"0bc32fb4-0173-4740-a004-4813a75ddf4a"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Module", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"ledger", " ", "=", " ", 
     RowBox[{"SearchLedger", "[", 
      RowBox[{"FileNameJoin", "[", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"CreateDirectory", "[", "]"}], ",", " ", "\"\<ledger\>\""}], 
        "}"}], "]"}], "]"}]}], "}"}], ",", "\n", "\t", 
   RowBox[{"SearchLedgerFilter", "[", 
    RowBox[{"ledger", ",", " ", "\"\<a target never searched\>\"", ",", " ", 
     RowBox[{"{", 
      RowBox[{"\"\<hunter2\>\"", ",", " ", "\"\<letmein\>\""}], "}"}]}], 
    "]"}]}], "\n", "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"b473c44f-ea49-449e-8919-2540b62ef081"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"\<\"hunter2\"\>", ",", "\<\"letmein\"\>"}], "}"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"043ac331-a417-45fb-ab39-781ae1dc74ef"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "f5be74a8-68a9-4711-af8b-8ddb5bdbd8c6"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"5ced6785-266f-48cb-\
8788-3241e940829f"],

Cell["Repeats inside the batch are collapsed:", "ExampleText",ExpressionUUID->"31a7db08-8a51-4cd7-9865-a8a0671222f8"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Module", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"ledger", " ", "=", " ", 
     RowBox[{"SearchLedger", "[", 
      RowBox[{"FileNameJoin", "[", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"CreateDirectory", "[", "]"}], ",", " ", "\"\<ledger\>\""}], 
        "}"}], "]"}], "]"}]}], "}"}], ",", "\n", "\t", 
   RowBox[{"SearchLedgerFilter", "[", 
    RowBox[{
    "ledger", ",", " ", "\"\<1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\>\"", ",", 
     " ", 
     RowBox[{"{", 
      RowBox[{"\"\<a\>\"", ",", " ", "\"\<b\>\"", ",", " ", "\"\<a\>\"", ",", 
       " ", "\"\<b\>\"", ",", " ", "\"\<c\>\""}], "}"}]}], "]"}]}], "\n", 
  "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"25c56126-bd24-4694-b6e4-8df0c0c35e65"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"\<\"a\"\>", ",", "\<\"b\"\>", ",", "\<\"c\"\>"}], "}"}]], "Output",\

 CellLabel->"Out[1]= ",ExpressionUUID->"1436897a-04f7-4238-88fd-cd2d71ed73c6"]
}, Open  ]]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "3a3d7a7a-177c-4044-b353-f1290d77dfb7"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"9a380345-8160-41df-904e-f14cdc21f5be"],
 "Scope",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(4)", "ExampleCount",ExpressionUUID->
  "e5db2775-c8c7-4e00-9ad1-61cb732d2327"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->1293636265,ExpressionUUID->"a9f496c5-414c-4d7a-8877-3ea86ef6933e"],

Cell["An empty batch gives an empty list:", "ExampleText",ExpressionUUID->"202b16bd-7393-4d73-8938-f96840008232"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Module", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"ledger", " ", "=", " ", 
     RowBox[{"SearchLedger", "[", 
      RowBox[{"FileNameJoin", "[", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"CreateDirectory", "[", "]"}], ",", " ", "\"\<ledger\>\""}], 
        "}"}], "]"}], "]"}]}], "}"}], ",", "\n", "\t", 
   RowBox[{"SearchLedgerFilter", "[", 
    RowBox[{
    "ledger", ",", " ", "\"\<1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\>\"", ",", 
     " ", 
     RowBox[{"{", "}"}]}], "]"}]}], "\n", "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"ebc41590-b0a0-47f3-8aea-24c4ff186245"],

Cell[BoxData[
 RowBox[{"{", "}"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"aa474204-874c-4d81-b8d2-f14c137e7bd5"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "b77baa16-cc30-4ffd-8c9d-5b3d48975324"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"d3f25ed8-3111-4510-\
94db-cf7fd8b5095c"],

Cell["Everything already recorded leaves nothing to test:", "ExampleText",ExpressionUUID->"f791b4b9-5c8a-441a-bcbb-baa71975c05b"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Module", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"ledger", " ", "=", " ", 
      RowBox[{"SearchLedger", "[", 
       RowBox[{"FileNameJoin", "[", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"CreateDirectory", "[", "]"}], ",", " ", "\"\<ledger\>\""}],
          "}"}], "]"}], "]"}]}], ",", " ", 
     RowBox[{
     "target", " ", "=", 
      " ", "\"\<1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\>\""}]}], "}"}], ",", "\n",
    "\t", 
   RowBox[{
    RowBox[{"SearchLedgerRecord", "[", 
     RowBox[{"ledger", ",", " ", "target", ",", " ", 
      RowBox[{"{", 
       RowBox[{"\"\<a\>\"", ",", " ", "\"\<b\>\"", ",", " ", "\"\<c\>\""}], 
       "}"}]}], "]"}], ";", "\n", "\t", 
    RowBox[{"SearchLedgerFilter", "[", 
     RowBox[{"ledger", ",", " ", "target", ",", " ", 
      RowBox[{"{", 
       RowBox[{"\"\<a\>\"", ",", " ", "\"\<b\>\"", ",", " ", "\"\<c\>\""}], 
       "}"}]}], "]"}]}]}], "\n", "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"fb8b46aa-1c3b-4ae3-8f00-ff9c998f6bb0"],

Cell[BoxData[
 RowBox[{"{", "}"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"54e5b58c-be60-4fd4-8424-cfcdd025ed6b"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "d2f95218-2076-4b01-a6dc-24cfc7b422ee"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"01d59f6a-8f8c-434d-\
9091-076ccdfea727"],

Cell["\<\
Filtering a whole candidate space down to what is left of it:\
\>", "ExampleText",ExpressionUUID->"61af50da-9b92-4cce-bb9a-e8cbbe8d08f6"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Module", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"ledger", " ", "=", " ", 
      RowBox[{"SearchLedger", "[", 
       RowBox[{"FileNameJoin", "[", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"CreateDirectory", "[", "]"}], ",", " ", "\"\<ledger\>\""}],
          "}"}], "]"}], "]"}]}], ",", " ", 
     RowBox[{
     "target", " ", "=", " ", "\"\<1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\>\""}], 
     ",", " ", "space"}], "}"}], ",", "\n", "\t", 
   RowBox[{
    RowBox[{"space", " ", "=", " ", 
     RowBox[{"WordlistCandidates", "[", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"{", "\"\<correct\>\"", "}"}], ",", " ", 
        RowBox[{"{", 
         RowBox[{"\"\<horse\>\"", ",", " ", "\"\<pony\>\"", ",", 
          " ", "\"\<mule\>\""}], "}"}], ",", " ", 
        RowBox[{"{", "\"\<battery\>\"", "}"}], ",", " ", 
        RowBox[{"{", "\"\<staple\>\"", "}"}]}], "}"}], "]"}]}], ";", "\n", 
    "\t", 
    RowBox[{"SearchLedgerRecord", "[", 
     RowBox[{"ledger", ",", " ", "target", ",", " ", 
      RowBox[{"{", "\"\<correct pony battery staple\>\"", "}"}]}], "]"}], ";",
     "\n", "\t", 
    RowBox[{"SearchLedgerFilter", "[", 
     RowBox[{"ledger", ",", " ", "target", ",", " ", 
      RowBox[{"Normal", "[", "space", "]"}]}], "]"}]}]}], "\n", 
  "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"a1b0b66c-9054-448b-8b1e-9db21f69fb1c"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"\<\"correct horse battery staple\"\>", 
   ",", "\<\"correct mule battery staple\"\>"}], "}"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"861c8e48-8283-48e9-970f-ed31a19178b1"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "e3879864-1167-4f3c-b6f6-e8a49872e2de"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"ddea0f86-fb4e-48a4-\
9eb9-ac8059ec0592"],

Cell["Byte array candidates filter the same way:", "ExampleText",ExpressionUUID->"2fff131f-dc4d-4963-a508-64bc60e0c1b9"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Module", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"ledger", " ", "=", " ", 
      RowBox[{"SearchLedger", "[", 
       RowBox[{"FileNameJoin", "[", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"CreateDirectory", "[", "]"}], ",", " ", "\"\<ledger\>\""}],
          "}"}], "]"}], "]"}]}], ",", " ", 
     RowBox[{
     "target", " ", "=", 
      " ", "\"\<1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\>\""}]}], "}"}], ",", "\n",
    "\t", 
   RowBox[{
    RowBox[{"SearchLedgerRecord", "[", 
     RowBox[{"ledger", ",", " ", "target", ",", " ", 
      RowBox[{"{", 
       RowBox[{"ByteArray", "[", 
        RowBox[{"{", 
         RowBox[{"1", ",", " ", "2"}], "}"}], "]"}], "}"}]}], "]"}], ";", 
    "\n", "\t", 
    RowBox[{"SearchLedgerFilter", "[", 
     RowBox[{"ledger", ",", " ", "target", ",", " ", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"ByteArray", "[", 
         RowBox[{"{", 
          RowBox[{"1", ",", " ", "2"}], "}"}], "]"}], ",", " ", 
        RowBox[{"ByteArray", "[", 
         RowBox[{"{", 
          RowBox[{"3", ",", " ", "4"}], "}"}], "]"}]}], "}"}]}], "]"}]}]}], 
  "\n", "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"bd5b045c-19ef-46ea-9e0b-b0fb604d98f8"],

Cell[BoxData[
 RowBox[{"{", 
  InterpretationBox[
   RowBox[{
    TagBox["ByteArray",
     "SummaryHead"], "[", 
    DynamicModuleBox[{Typeset`open$$ = False, Typeset`embedState$$ = "Ready"}, 
     TemplateBox[{
       PaneSelectorBox[{False -> GridBox[{{
             GridBox[{{
                TagBox["\"2 bytes\"", "SummaryItem"]}}, 
              GridBoxAlignment -> {
               "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, AutoDelete -> 
              False, GridBoxItemSize -> {
               "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
              GridBoxSpacings -> {
               "Columns" -> {{2}}, "Rows" -> {{Automatic}}}, 
              BaseStyle -> {
               ShowStringCharacters -> False, NumberMarks -> False, 
                PrintPrecision -> 3, ShowSyntaxStyles -> False}]}}, 
           GridBoxAlignment -> {"Columns" -> {{Left}}, "Rows" -> {{Top}}}, 
           AutoDelete -> False, 
           GridBoxItemSize -> {
            "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
           BaselinePosition -> {1, 1}], True -> GridBox[{{
             GridBox[{{
                TagBox["\"2 bytes\"", "SummaryItem"]}}, 
              GridBoxAlignment -> {
               "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, AutoDelete -> 
              False, GridBoxItemSize -> {
               "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
              GridBoxSpacings -> {
               "Columns" -> {{2}}, "Rows" -> {{Automatic}}}, 
              BaseStyle -> {
               ShowStringCharacters -> False, NumberMarks -> False, 
                PrintPrecision -> 3, ShowSyntaxStyles -> False}]}}, 
           GridBoxAlignment -> {"Columns" -> {{Left}}, "Rows" -> {{Top}}}, 
           AutoDelete -> False, 
           GridBoxItemSize -> {
            "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
           BaselinePosition -> {1, 1}]}, 
        Dynamic[Typeset`open$$], ImageSize -> Automatic]},
      "SummaryPanel"],
     DynamicModuleValues:>{}], "]"}],
   ByteArray[{3, 4}],
   Editable->False,
   SelectWithContents->True,
   Selectable->False], "}"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"a4e1e469-2e10-4027-a2d2-5ba0f277071a"]
}, Open  ]]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "7e54994b-65f8-4af7-af0c-6e572d415b35"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"ce2f8fda-b6a1-4a36-b2e5-302313de15bf"],
 "Properties & Relations",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(2)", "ExampleCount",ExpressionUUID->
  "ff475582-9fb7-4658-8628-1ff2ade9973a"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->2123667759,ExpressionUUID->"f132946b-860a-4eb8-94fc-06ed2863dfe8"],

Cell[TextData[{
 "A candidate survives the filter exactly when ",
 Cell[BoxData[
  TemplateBox[{
    Cell[
     TextData["SearchLedgerTestedQ"]], 
    "paclet:WolframInstitute/Puzzles/ref/SearchLedgerTestedQ", 
    "WolframInstitute/Puzzles Package Symbol"},
   "PackageLink",
   BaseStyle->"InlineFormula"]], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "adfa8adc-d2e3-4988-ae02-ad2848fd3df9"],
 " says ",
 Cell[BoxData["False"], "InlineFormula",
  FontFamily->"Source Sans Pro",
  FontSize->0.9 Inherited,ExpressionUUID->
  "8250e9f0-9b8f-4ed0-93d3-a0779fec53c4"],
 ":"
}], "ExampleText",ExpressionUUID->"2281a81f-a5cc-42ab-b588-db89cca3465f"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Module", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"ledger", " ", "=", " ", 
      RowBox[{"SearchLedger", "[", 
       RowBox[{"FileNameJoin", "[", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"CreateDirectory", "[", "]"}], ",", " ", "\"\<ledger\>\""}],
          "}"}], "]"}], "]"}]}], ",", " ", 
     RowBox[{
     "target", " ", "=", " ", "\"\<1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\>\""}], 
     ",", " ", 
     RowBox[{"batch", " ", "=", " ", 
      RowBox[{"{", 
       RowBox[{"\"\<a\>\"", ",", " ", "\"\<b\>\"", ",", " ", "\"\<c\>\""}], 
       "}"}]}]}], "}"}], ",", "\n", "\t", 
   RowBox[{
    RowBox[{"SearchLedgerRecord", "[", 
     RowBox[{"ledger", ",", " ", "target", ",", " ", 
      RowBox[{"{", "\"\<b\>\"", "}"}]}], "]"}], ";", "\n", "\t", 
    RowBox[{
     RowBox[{"SearchLedgerFilter", "[", 
      RowBox[{"ledger", ",", " ", "target", ",", " ", "batch"}], "]"}], " ", "===",
      " ", 
     RowBox[{"Select", "[", 
      RowBox[{"batch", ",", " ", 
       RowBox[{
        RowBox[{"!", " ", 
         RowBox[{"SearchLedgerTestedQ", "[", 
          RowBox[{"ledger", ",", " ", "target", ",", " ", "#"}], "]"}]}], " ",
         "&"}]}], "]"}]}]}]}], "\n", "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"381356db-660f-4a68-b6b4-515c156ee001"],

Cell[BoxData["True"], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"1aea0fc2-d824-4306-b365-095da6a04d3b"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "c2929b22-487e-4ab4-a925-3640ee05c01b"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"b0471227-5429-4c24-\
aa4c-885a466cc254"],

Cell["\<\
Recording the filtered batch leaves nothing for the next pass:\
\>", "ExampleText",ExpressionUUID->"22c30153-e856-4c55-b35a-3c41a6bd1c1a"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Module", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"ledger", " ", "=", " ", 
      RowBox[{"SearchLedger", "[", 
       RowBox[{"FileNameJoin", "[", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"CreateDirectory", "[", "]"}], ",", " ", "\"\<ledger\>\""}],
          "}"}], "]"}], "]"}]}], ",", " ", 
     RowBox[{
     "target", " ", "=", " ", "\"\<1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\>\""}], 
     ",", " ", 
     RowBox[{"batch", " ", "=", " ", 
      RowBox[{"{", 
       RowBox[{"\"\<a\>\"", ",", " ", "\"\<b\>\"", ",", " ", "\"\<c\>\""}], 
       "}"}]}]}], "}"}], ",", "\n", "\t", 
   RowBox[{
    RowBox[{"SearchLedgerRecord", "[", 
     RowBox[{"ledger", ",", " ", "target", ",", " ", 
      RowBox[{"SearchLedgerFilter", "[", 
       RowBox[{"ledger", ",", " ", "target", ",", " ", "batch"}], "]"}]}], 
     "]"}], ";", "\n", "\t", 
    RowBox[{"SearchLedgerFilter", "[", 
     RowBox[{"ledger", ",", " ", "target", ",", " ", "batch"}], "]"}]}]}], 
  "\n", "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"c542e217-4528-419a-823e-059218972500"],

Cell[BoxData[
 RowBox[{"{", "}"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"33510a60-2619-48e8-996a-4b51a2cb75df"]
}, Open  ]]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  DynamicBox[ToBoxes[
    If[CurrentValue[
       EvaluationCell[], "CellGroupOpen"] =!= Closed, 
     Style[
      Graphics[{
        Thickness[0.18], 
        RGBColor[0.8509803921568627, 0.396078431372549, 0], 
        Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
       PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
      0.68 Inherited], 
     Rotate[
      Style[
       Graphics[{
         Thickness[0.18], 
         RGBColor[0.8509803921568627, 0.396078431372549, 0], 
         Line[{{-1.8, 0.5}, {0, 0}, {1.8, 0.5}}]}, AspectRatio -> 1, 
        PlotRange -> {{-3, 4}, {-1, 1}}, ImageSize -> 20], Magnification -> 
       0.68 Inherited], Rational[1, 2] Pi, {-1.65, -1}]]]]],ExpressionUUID->
  "f89fd8f7-cb2d-4743-acf3-7af05bf314bf"],
 Cell[BoxData[
  TemplateBox[{1},
   "Spacer1"]],ExpressionUUID->"e1cebb20-8c2a-4b90-9ede-7f0a20613566"],
 "Possible Issues",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(2)", "ExampleCount",ExpressionUUID->
  "b1e576bb-9ae6-4476-91a3-a980611ce161"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CacheGraphics->False,
 CellID->1305812373,ExpressionUUID->"0d9ba126-22da-41ad-b520-a6ff6adf65dc"],

Cell["\<\
A batch holding something that is neither a string nor a byte array matches \
no definition:\
\>", "ExampleText",ExpressionUUID->"f575ea0d-d30f-43b3-89ee-99c561bfd884"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Module", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"ledger", " ", "=", " ", 
     RowBox[{"SearchLedger", "[", 
      RowBox[{"FileNameJoin", "[", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"CreateDirectory", "[", "]"}], ",", " ", "\"\<ledger\>\""}], 
        "}"}], "]"}], "]"}]}], "}"}], ",", "\n", "\t", 
   RowBox[{"SearchLedgerFilter", "[", 
    RowBox[{
    "ledger", ",", " ", "\"\<1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\>\"", ",", 
     " ", 
     RowBox[{"{", 
      RowBox[{"\"\<a\>\"", ",", " ", "2"}], "}"}]}], "]"}]}], "\n", 
  "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"c936e072-ab22-4233-8b55-7969bcbcc052"],

Cell[BoxData[
 RowBox[{"SearchLedgerFilter", "[", 
  RowBox[{
   InterpretationBox[
    TemplateBox[{"\"SearchLedger[\"", "\"ledger\"", "\"]\""},
     "RowDefault"],
    WolframInstitute`Puzzles`SearchLedger[<|
     "Directory" -> 
      "/private/var/folders/5x/lyq7cw110cx_zr1zb3zr63gm0000gn/T/m000022788461/\
ledger"|>]], ",", "\<\"1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\"\>", ",", 
   RowBox[{"{", 
    RowBox[{"\<\"a\"\>", ",", "2"}], "}"}]}], "]"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"6efd569f-6dec-4ba6-8037-e68c2ebfa253"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "bb801115-eeff-4a4d-9840-276721d7cd24"],
  $Line = 0; Null]], "ExampleDelimiter",ExpressionUUID->"b73c9c99-de32-46c4-\
bf75-d71757a14e2a"],

Cell["The first argument must be a ledger:", "ExampleText",ExpressionUUID->"8ff455c2-7ce8-41e1-a814-5fb564c0cb54"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"SearchLedgerFilter", "[", 
  RowBox[{"\"\</tmp/ledger\>\"", ",", 
   " ", "\"\<1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\>\"", ",", " ", 
   RowBox[{"{", "\"\<a\>\"", "}"}]}], "]"}]], "Input",
 CellProlog:>Needs["WolframInstitute`Puzzles`"],
 CellLabel->"In[1]:=",ExpressionUUID->"ad9e357b-25d3-47c2-ab8d-bee07611c652"],

Cell[BoxData[
 RowBox[{"SearchLedgerFilter", "[", 
  RowBox[{"\<\"/tmp/ledger\"\>", 
   ",", "\<\"1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\"\>", ",", 
   RowBox[{"{", "\<\"a\"\>", "}"}]}], "]"}]], "Output",
 CellLabel->"Out[1]= ",ExpressionUUID->"f23597d3-4b82-4926-8d65-c1bde59a7acf"]
}, Open  ]]
}, Open  ]]
}, Closed]]
}, Open  ]],

Cell[BoxData[GridBox[{
   {
    DynamicBox[FEPrivate`ImportImage[
      FrontEnd`FileName[{"Documentation", "FooterIcons"}, 
       "RelatedFunction.png"]]], GridBox[{
      {
       StyleBox[
        RowBox[{"See", " ", "Also"}], "SeeAlsoSection"]},
      {Cell[TextData[{
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["SearchLedger"]], 
           "paclet:WolframInstitute/Puzzles/ref/SearchLedger", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "80f9c151-7df9-4a5c-a5db-2f60a6820780"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["SearchLedgerRecord"]], 
           "paclet:WolframInstitute/Puzzles/ref/SearchLedgerRecord", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "35b0e098-5844-415c-96fc-cac2aa34e96f"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["SearchLedgerTestedQ"]], 
           "paclet:WolframInstitute/Puzzles/ref/SearchLedgerTestedQ", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "aeae7198-4577-4605-a52c-a37bc9433c47"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["CandidateFingerprint"]], 
           "paclet:WolframInstitute/Puzzles/ref/CandidateFingerprint", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "bc207284-443b-4a93-9aa3-5697dea13b74"],
        "\[NonBreakingSpace]",
        StyleBox[
        "\[MediumSpace]\[FilledVerySmallSquare]\[MediumSpace]", 
         "InlineSeparator"],
        " ",
        Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["CandidateSweep"]], 
           "paclet:WolframInstitute/Puzzles/ref/CandidateSweep", 
           "WolframInstitute/Puzzles Package Symbol"},
          "PackageLink",
          BaseStyle->"InlineFormula"]], "InlineFormula",
         FontFamily->"Source Sans Pro",ExpressionUUID->
         "5d80f210-f1fd-46b4-8881-72aa57e052d1"]
       }], "SeeAlso",ExpressionUUID->"90a44c3b-a005-4125-aedb-c4af70ac4423"]}
     }]}
  }]], "SeeAlsoSection",ExpressionUUID->"1c76e8db-3c7e-444d-b815-\
11baf5024333"],

Cell[BoxData[GridBox[{
   {
    DynamicBox[FEPrivate`ImportImage[
      FrontEnd`FileName[{"Documentation", "FooterIcons"}, 
       "RelatedGuide.png"]]], GridBox[{
      {
       StyleBox[
        RowBox[{"Related", " ", "Guides"}], "MoreAboutSection"]},
      {
       RowBox[{"\[FilledVerySmallSquare]", Cell[BoxData[
         TemplateBox[{
           Cell[
            TextData["Search"]], 
           "paclet:WolframInstitute/Puzzles/guide/Search"},
          "RefLinkPlain",
          BaseStyle->{"MoreAbout"}]], "MoreAbout",ExpressionUUID->
         "19904a8a-789a-4ad6-877c-fb755290fb08"]}]}
     }]}
  }]], "MoreAboutSection",ExpressionUUID->"c32a7bc2-a134-4057-8a4e-\
701f289d4d1f"],

Cell[" ", "FooterCell",ExpressionUUID->"338173ce-a986-4ce0-99d1-a8980856bc25"]
},
Saveable->False,
ScreenStyleEnvironment->"Working",
WindowSize->{900, 830},
WindowMargins->{{0, Automatic}, {Automatic, 0}},
WindowTitle->"SearchLedgerFilter",
TaggingRules->{
 "ModificationHighlight" -> False, "ColorType" -> "", "LinkTrails" -> "", 
  "ExampleCounter" -> 1, 
  "Openers" -> {
   "PrimaryExamplesSection" -> Open, "ExampleSection" -> {"0" -> Open}, 
    "AllOptsTable" -> Closed}, "NewStyles" -> True, 
  "CitationPopupData" -> $Failed, "ShowCitation" -> False, "HasOptions" -> 
  True, "RootCaptions" -> "", "HeaderCoreAreaLink" -> {}, 
  "Metadata" -> {
   "built" -> "{2026, 8, 27, 0, 11, 50.179686}", 
    "history" -> {"XX", "", "", ""}, "context" -> "WolframInstitute`Puzzles`",
     "keywords" -> {}, "specialkeywords" -> {}, 
    "tutorialcollectionlinks" -> {}, "index" -> True, "label" -> 
    "Wolfram Institute/ Puzzles Symbol", "language" -> "en", "paclet" -> 
    "WolframInstitute/Puzzles", "status" -> "None", "summary" -> 
    "PackageLink[SearchLedgerFilter, paclet : \
WolframInstitute/Puzzles/ref/SearchLedgerFilter, WolframInstitute/Puzzles \
Package Symbol][ledger,  target, {cand\:2081, cand\:2082, ...}] gives the \
candidates that have not yet been recorded against the target, in their \
original order and with repeats within the batch removed.", "synonyms" -> {}, 
    "tabletags" -> {}, "title" -> "SearchLedgerFilter", "titlemodifier" -> "",
     "metadescription" -> "", "windowtitle" -> "SearchLedgerFilter", "type" -> 
    "Symbol", "uri" -> "WolframInstitute/Puzzles/ref/SearchLedgerFilter"}},
CellContext->CellGroup,
FrontEndVersion->"15.0 for Mac OS X ARM (64-bit) (May 19, 2026)",
StyleDefinitions->FrontEnd`FileName[{"Wolfram"}, "Reference.nb"],
ExpressionUUID->"ccdc16ea-7f94-44c5-9882-4ab20328490d"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{
 "TextAnnotation"->{
  Cell[14926, 395, 152, 2, 70, "ExampleText",ExpressionUUID->"604d7b11-97f1-48c9-b04c-31ef69d736c1",
   CellTags->"TextAnnotation"]}
 }
*)
(*CellTagsIndex
CellTagsIndex->{
 {"TextAnnotation", 44027, 1206}
 }
*)
(*NotebookFileOutline
Notebook[{
Cell[586, 21, 5845, 142, 70, "AnchorBarGrid",ExpressionUUID->"0ad447cf-8155-4c58-ac86-3667f092de66",
 CellID->1],
Cell[6434, 165, 107, 0, 70, "ContextNameCell",ExpressionUUID->"ede4cfec-b5e7-443b-b2e7-cd1ebf33ffd8"],
Cell[CellGroupData[{
Cell[6566, 169, 561, 14, 70, "ObjectNameGrid",ExpressionUUID->"fae7156e-87e2-424d-b757-4641e67622ce"],
Cell[7130, 185, 1115, 26, 70, "Usage",ExpressionUUID->"4ffc4651-0173-4979-9795-7470f11d12e2"]
}, Open  ]],
Cell[CellGroupData[{
Cell[8282, 216, 1443, 34, 70, "NotesSection",ExpressionUUID->"f61f5e6a-ffe5-4f86-abfd-c0453a6cbc4d",
 CellGroupingRules->{"SectionGrouping", 50},
 CellID->115020856],
Cell[9728, 252, 606, 15, 70, "Notes",ExpressionUUID->"ce8d696c-8fed-4ba0-946f-c4bd202650ec"],
Cell[10337, 269, 210, 3, 70, "Notes",ExpressionUUID->"7e3e4bdc-f8f7-4485-9810-8f6e184e510f"],
Cell[10550, 274, 226, 3, 70, "Notes",ExpressionUUID->"fefd7a9e-b2da-49a9-98e3-31cf94a77865"],
Cell[10779, 279, 210, 3, 70, "Notes",ExpressionUUID->"52856615-44f9-4b20-9189-a445f52f8220"],
Cell[10992, 284, 178, 3, 70, "Notes",ExpressionUUID->"123ff47c-805e-499d-a694-405d9b5ceb86"],
Cell[11173, 289, 749, 19, 70, "Notes",ExpressionUUID->"2faad2b3-c7ea-4396-be2d-5e8289dab9be"]
}, Closed]],
Cell[11937, 311, 80, 0, 70, "PageDelimiter",ExpressionUUID->"6fff85b0-2a40-46c3-abe7-fc40eb16cd84"],
Cell[CellGroupData[{
Cell[12042, 315, 1401, 37, 70, "PrimaryExamplesSection",ExpressionUUID->"b1182a70-63b3-4d35-8652-4e609371ad9e",
 CellID->420244492],
Cell[13446, 354, 216, 4, 70, "Input",ExpressionUUID->"65d1c82c-41a0-4db5-93b3-716afcf73c06",
 CellID->1969679695],
Cell[CellGroupData[{
Cell[13687, 362, 1236, 31, 70, "ExampleSection",ExpressionUUID->"d2271f5c-24bd-4746-9a84-71b2bc406f8a",
 CellID->2122945708],
Cell[14926, 395, 152, 2, 70, "ExampleText",ExpressionUUID->"604d7b11-97f1-48c9-b04c-31ef69d736c1",
 CellTags->"TextAnnotation"],
Cell[CellGroupData[{
Cell[15103, 401, 1145, 29, 70, "Input",ExpressionUUID->"b556eef4-32c5-41f7-be26-58db7c8d7138"],
Cell[16251, 432, 191, 4, 70, "Output",ExpressionUUID->"3f0d4e75-2c66-4c5e-8ac7-a297c3ec84e7"]
}, Open  ]],
Cell[CellGroupData[{
Cell[16479, 441, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"8b1fd821-db7c-4031-926e-61ab384ca187"],
Cell[16706, 448, 124, 0, 70, "ExampleText",ExpressionUUID->"0bc32fb4-0173-4740-a004-4813a75ddf4a"],
Cell[CellGroupData[{
Cell[16855, 452, 721, 17, 70, "Input",ExpressionUUID->"b473c44f-ea49-449e-8919-2540b62ef081"],
Cell[17579, 471, 180, 3, 70, "Output",ExpressionUUID->"043ac331-a417-45fb-ab39-781ae1dc74ef"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[17808, 480, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"5ced6785-266f-48cb-8788-3241e940829f"],
Cell[18035, 487, 117, 0, 70, "ExampleText",ExpressionUUID->"31a7db08-8a51-4cd7-9865-a8a0671222f8"],
Cell[CellGroupData[{
Cell[18177, 491, 806, 20, 70, "Input",ExpressionUUID->"25c56126-bd24-4694-b6e4-8df0c0c35e65"],
Cell[18986, 513, 188, 4, 70, "Output",ExpressionUUID->"1436897a-04f7-4238-88fd-cd2d71ed73c6"]
}, Open  ]]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[19235, 524, 1227, 31, 70, "ExampleSection",ExpressionUUID->"a9f496c5-414c-4d7a-8877-3ea86ef6933e",
 CellID->1293636265],
Cell[20465, 557, 113, 0, 70, "ExampleText",ExpressionUUID->"202b16bd-7393-4d73-8938-f96840008232"],
Cell[CellGroupData[{
Cell[20603, 561, 673, 17, 70, "Input",ExpressionUUID->"ebc41590-b0a0-47f3-8aea-24c4ff186245"],
Cell[21279, 580, 124, 2, 70, "Output",ExpressionUUID->"aa474204-874c-4d81-b8d2-f14c137e7bd5"]
}, Open  ]],
Cell[CellGroupData[{
Cell[21440, 587, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"d3f25ed8-3111-4510-94db-cf7fd8b5095c"],
Cell[21667, 594, 129, 0, 70, "ExampleText",ExpressionUUID->"f791b4b9-5c8a-441a-bcbb-baa71975c05b"],
Cell[CellGroupData[{
Cell[21821, 598, 1096, 28, 70, "Input",ExpressionUUID->"fb8b46aa-1c3b-4ae3-8f00-ff9c998f6bb0"],
Cell[22920, 628, 124, 2, 70, "Output",ExpressionUUID->"54e5b58c-be60-4fd4-8424-cfcdd025ed6b"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[23093, 636, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"01d59f6a-8f8c-434d-9091-076ccdfea727"],
Cell[23320, 643, 147, 2, 70, "ExampleText",ExpressionUUID->"61af50da-9b92-4cce-bb9a-e8cbbe8d08f6"],
Cell[CellGroupData[{
Cell[23492, 649, 1462, 36, 70, "Input",ExpressionUUID->"a1b0b66c-9054-448b-8b1e-9db21f69fb1c"],
Cell[24957, 687, 225, 4, 70, "Output",ExpressionUUID->"861c8e48-8283-48e9-970f-ed31a19178b1"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[25231, 697, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"ddea0f86-fb4e-48a4-9eb9-ac8059ec0592"],
Cell[25458, 704, 120, 0, 70, "ExampleText",ExpressionUUID->"2fff131f-dc4d-4963-a508-64bc60e0c1b9"],
Cell[CellGroupData[{
Cell[25603, 708, 1298, 36, 70, "Input",ExpressionUUID->"bd5b045c-19ef-46ea-9e0b-b0fb604d98f8"],
Cell[26904, 746, 2227, 48, 70, "Output",ExpressionUUID->"a4e1e469-2e10-4027-a2d2-5ba0f277071a"]
}, Open  ]]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[29192, 801, 1244, 31, 70, "ExampleSection",ExpressionUUID->"f132946b-860a-4eb8-94fc-06ed2863dfe8",
 CellID->2123667759],
Cell[30439, 834, 695, 19, 70, "ExampleText",ExpressionUUID->"2281a81f-a5cc-42ab-b588-db89cca3465f"],
Cell[CellGroupData[{
Cell[31159, 857, 1375, 35, 70, "Input",ExpressionUUID->"381356db-660f-4a68-b6b4-515c156ee001"],
Cell[32537, 894, 110, 1, 70, "Output",ExpressionUUID->"1aea0fc2-d824-4306-b365-095da6a04d3b"]
}, Open  ]],
Cell[CellGroupData[{
Cell[32684, 900, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"b0471227-5429-4c24-aa4c-885a466cc254"],
Cell[32911, 907, 148, 2, 70, "ExampleText",ExpressionUUID->"22c30153-e856-4c55-b35a-3c41a6bd1c1a"],
Cell[CellGroupData[{
Cell[33084, 913, 1163, 29, 70, "Input",ExpressionUUID->"c542e217-4528-419a-823e-059218972500"],
Cell[34250, 944, 124, 2, 70, "Output",ExpressionUUID->"33510a60-2619-48e8-996a-4b51a2cb75df"]
}, Open  ]]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[34435, 953, 1237, 31, 70, "ExampleSection",ExpressionUUID->"0d9ba126-22da-41ad-b520-a6ff6adf65dc",
 CellID->1305812373],
Cell[35675, 986, 178, 3, 70, "ExampleText",ExpressionUUID->"f575ea0d-d30f-43b3-89ee-99c561bfd884"],
Cell[CellGroupData[{
Cell[35878, 993, 721, 19, 70, "Input",ExpressionUUID->"c936e072-ab22-4233-8b55-7969bcbcc052"],
Cell[36602, 1014, 541, 12, 70, "Output",ExpressionUUID->"6efd569f-6dec-4ba6-8037-e68c2ebfa253"]
}, Open  ]],
Cell[CellGroupData[{
Cell[37180, 1031, 224, 5, 70, "ExampleDelimiter",ExpressionUUID->"b73c9c99-de32-46c4-bf75-d71757a14e2a"],
Cell[37407, 1038, 114, 0, 70, "ExampleText",ExpressionUUID->"8ff455c2-7ce8-41e1-a814-5fb564c0cb54"],
Cell[CellGroupData[{
Cell[37546, 1042, 336, 6, 70, "Input",ExpressionUUID->"ad9e357b-25d3-47c2-ab8d-bee07611c652"],
Cell[37885, 1050, 279, 5, 70, "Output",ExpressionUUID->"f23597d3-4b82-4926-8d65-c1bde59a7acf"]
}, Open  ]]
}, Open  ]]
}, Closed]]
}, Open  ]],
Cell[38215, 1061, 3156, 82, 70, "SeeAlsoSection",ExpressionUUID->"1c76e8db-3c7e-444d-b815-11baf5024333"],
Cell[41374, 1145, 692, 19, 70, "MoreAboutSection",ExpressionUUID->"c32a7bc2-a134-4057-8a4e-701f289d4d1f"],
Cell[42069, 1166, 78, 0, 70, "FooterCell",ExpressionUUID->"338173ce-a986-4ce0-99d1-a8980856bc25"]
}
]
*)

(* End of internal cache information *)

