  
  [1X6 [33X[0;0YOrdered partition stacks[133X[101X
  
  [33X[0;0YAn  [13Xordered partition stack[113X is an ordered partition which supports splitting
  a  cell, and then later undoing a change, reverting the partition back to an
  earlier state.[133X
  
  
  [1X6.1 [33X[0;0YAPI[133X[101X
  
  [1X6.1-1 PartitionStack[101X
  
  [33X[1;0Y[29X[2XPartitionStack[102X(  ) [32X function[133X
  [6XReturns:[106X  [33X[0;10YA partition stack[133X
  
  [33X[0;0YConstructor for partition stacks.[133X
  
  [1X6.1-2 IsPartitionStack[101X
  
  [33X[1;0Y[29X[2XIsPartitionStack[102X( [3Xarg[103X ) [32X Category[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X[133X
  
  [33X[0;0YCategory of partition stacks.[133X
  
  [1X6.1-3 PS_Points[101X
  
  [33X[1;0Y[29X[2XPS_Points[102X( [3XPS[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10YA positive integer[133X
  
  [33X[0;0YReturn  the  number of points on which the partition stack [3XPS[103X was originally
  defined.[133X
  
  [1X6.1-4 PS_ExtendedPoints[101X
  
  [33X[1;0Y[29X[2XPS_ExtendedPoints[102X( [3XPS[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10YA positive integer[133X
  
  [33X[0;0YReturn  the  number  of  points on which the partition stack [3XPS[103X is currently
  defined on (which includes extra points added during refinement)[133X
  
  [1X6.1-5 PS_Extend[101X
  
  [33X[1;0Y[29X[2XPS_Extend[102X( [3XPS[103X, [3XNewPoints[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10YThe label of the new cell[133X
  
  [33X[0;0YAdds  [3XNewPoints[103X  to  PS,  as  a  new  cell  at  the  end. Will be removed on
  backtracking.[133X
  
  [1X6.1-6 PS_Cells[101X
  
  [33X[1;0Y[29X[2XPS_Cells[102X( [3XPS[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10YA positive integer[133X
  
  [33X[0;0YThe  number  of  cells in the current partition state of the partition stack
  [3XPS[103X.[133X
  
  [1X6.1-7 PS_Fixed[101X
  
  [33X[1;0Y[29X[2XPS_Fixed[102X( [3XPS[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X[133X
  
  [33X[0;0YReturn [9Xtrue[109X if all the cells of the current partition state of the partition
  stack [3XPS[103X have size 1 and were in the 'original partition'.[133X
  
  [1X6.1-8 PS_AsPartition[101X
  
  [33X[1;0Y[29X[2XPS_AsPartition[102X( [3XPS[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10YA list of lists of positive integers[133X
  
  [33X[0;0YReturn  the  current  partition state of the partition stack [3XPS[103X as a list of
  sets, in the correct order.[133X
  
  [1X6.1-9 PS_CellLen[101X
  
  [33X[1;0Y[29X[2XPS_CellLen[102X( [3XPS[103X, [3Xi[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10YA positive integer[133X
  
  [33X[0;0YThe size of cell [3Xi[103X in the current partition state of the partition stack [3XPS[103X.
  This requires that [3Xi[103X is contained in [10X[1..PS_Cells([3XPS[103X[10X)][110X.[133X
  
  [1X6.1-10 PS_CellSlice[101X
  
  [33X[1;0Y[29X[2XPS_CellSlice[102X( [3XPS[103X, [3Xi[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10YAn immutable list of positive integers[133X
  
  [33X[0;0YReturn  an  immutable  list containing the elements of cell [3Xi[103X in the current
  partition state of the partition stack [3XPS[103X. This requires that [3Xi[103X is contained
  in [10X[1..PS_Cells([3XPS[103X[10X)][110X.[133X
  
  [1X6.1-11 PS_FixedCells[101X
  
  [33X[1;0Y[29X[2XPS_FixedCells[102X( [3XPS[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10YA list of 1-element lists of positive integers[133X
  
  [33X[0;0YReturn  a  list of the 1-element cells of the current state of the partition
  stack  [3XPS[103X  which  contain points from the original size of the partition, in
  the order in which the cells came to have size 1.[133X
  
  [1X6.1-12 PS_FixedPoints[101X
  
  [33X[1;0Y[29X[2XPS_FixedPoints[102X( [3XPS[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10YA list of positive integers[133X
  
  [33X[0;0YReturn a list of points in 1-element cells of the partition stack [3XPS[103X, in the
  order  in  which  the  cells  came  to  have  size 1. In other words, return
  [10XConcatenation(PS_FixedCells([3XPS[103X[10X))[110X.[133X
  
  [1X6.1-13 PS_CellOfPoint[101X
  
  [33X[1;0Y[29X[2XPS_CellOfPoint[102X( [3XPS[103X, [3Xi[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10YA positive integer[133X
  
  [33X[0;0YReturn the index of the cell containing the value [3Xi[103X in the current partition
  state  of  the  partition  stack  [3XPS[103X.  This  requires that [3Xi[103X is contained in
  [10X[1..PS_ExtededPoints([3XPS[103X[10X)][110X.[133X
  
  [1X6.1-14 PS_RevertToCellCount[101X
  
  [33X[1;0Y[29X[2XPS_RevertToCellCount[102X( [3XPS[103X, [3Xi[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10YNothing[133X
  
  [33X[0;0YRevert  the state of the partition stack [3XPS[103X to when there were [3Xi[103X cells. This
  requires that [3Xi[103X is contained in [10X[1..PS_Cells([3XPS[103X[10X)][110X.[133X
  
  [1X6.1-15 PS_SplitCellByFunction[101X
  
  [33X[1;0Y[29X[2XPS_SplitCellByFunction[102X( [3XPS[103X, [3Xt[103X, [3Xi[103X, [3Xf[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X[133X
  
  [33X[0;0YSplit  cell  [3Xi[103X  of  the  current  partition  state of the partition stack [3XPS[103X
  according  to the function [3Xf[103X. The values in the cell are split so that those
  with  different  images  under  [3Xf[103X  are  put into different cells. The second
  argument [3Xt[103X should be a tracer.[133X
  
  [1X6.1-16 PS_SplitCellsByFunction[101X
  
  [33X[1;0Y[29X[2XPS_SplitCellsByFunction[102X( [3XPS[103X, [3Xt[103X, [3Xf[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X[133X
  
  [33X[0;0YApply  [10XPS_SplitCellByFunction[110X to every active cell in the partition stack [3XPS[103X
  (ignoring points added after search starts).[133X
  
  [1X6.1-17 PS_ExtendedSplitCellsByFunction[101X
  
  [33X[1;0Y[29X[2XPS_ExtendedSplitCellsByFunction[102X( [3XPS[103X, [3Xt[103X, [3Xf[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X[133X
  
  [33X[0;0YApply  [10XPS_SplitCellByFunction[110X to every active cell in the partition stack [3XPS[103X
  (including points added after search starts).[133X
  
  [1X6.1-18 PS_SplitCellByUnorderedFunction[101X
  
  [33X[1;0Y[29X[2XPS_SplitCellByUnorderedFunction[102X( [3XPS[103X, [3Xt[103X, [3Xi[103X, [3Xf[103X ) [32X operation[133X
  
  [33X[0;0YSplit  cell  [3Xi[103X  of  the  current  partition  state of the partition stack [3XPS[103X
  according  to the function [3Xf[103X. The values in the cell are split so that those
  with  different  images  under  [3Xf[103X  are  put into different cells. The second
  argument [3Xt[103X should be a tracer.[133X
  
  [1X6.1-19 PS_SplitCellsByUnorderedFunction[101X
  
  [33X[1;0Y[29X[2XPS_SplitCellsByUnorderedFunction[102X( [3XPS[103X, [3Xt[103X, [3Xf[103X ) [32X operation[133X
  
  [33X[0;0YApply  [10XPS_SplitCellByUnorderedFunction[110X to every active cell in the partition
  stack [3XPS[103X. The second argument [3Xt[103X should be a tracer.[133X
  
