prologues := 3;
input boxes
beginfig(1);
spacex=15mm; spacey=3mm;
pickup pencircle scaled 1pt;
boxit.aoo(btex 00 etex scaled 1.5);
boxit.aol(btex 01 etex scaled 1.5);
boxit.alo(btex 10 etex scaled 1.5);
boxit.all(btex 11 etex scaled 1.5);
boxit.boo(btex 00 etex scaled 1.5);
boxit.bol(btex 01 etex scaled 1.5);
boxit.blo(btex 10 etex scaled 1.5);
boxit.bll(btex 11 etex scaled 1.5);
boxit.coo(btex 00 etex scaled 1.5);
boxit.col(btex 01 etex scaled 1.5);
boxit.clo(btex 10 etex scaled 1.5);
boxit.cll(btex 11 etex scaled 1.5);
boxit.doo(btex 00 etex scaled 1.5);
boxit.dol(btex 01 etex scaled 1.5);
boxit.dlo(btex 10 etex scaled 1.5);
boxit.dll(btex 11 etex scaled 1.5);
boxit.eoo(btex 00 etex scaled 1.5);
boxit.eol(btex 01 etex scaled 1.5);
boxit.elo(btex 10 etex scaled 1.5);
boxit.ell(btex 11 etex scaled 1.5);
aoo.s - (0,spacey) = aol.n;
aol.s - (0,spacey) = alo.n;
alo.s - (0,spacey) = all.n;
aoo.e + (spacex,0) = boo.w;
aol.e + (spacex,0) = bol.w;
alo.e + (spacex,0) = blo.w;
all.e + (spacex,0) = bll.w;
boo.e + (spacex,0) = coo.w;
bol.e + (spacex,0) = col.w;
blo.e + (spacex,0) = clo.w;
bll.e + (spacex,0) = cll.w;
coo.e + (spacex,0) = doo.w;
col.e + (spacex,0) = dol.w;
clo.e + (spacex,0) = dlo.w;
cll.e + (spacex,0) = dll.w;
doo.e + (spacex,0) = eoo.w;
dol.e + (spacex,0) = eol.w;
dlo.e + (spacex,0) = elo.w;
dll.e + (spacex,0) = ell.w;
drawboxed(aoo, aol, alo, all);
drawboxed(boo, bol, blo, bll);
drawboxed(coo, col, clo, cll);
drawboxed(doo, dol, dlo, dll);
drawboxed(eoo, eol, elo, ell);
% solid arrows
drawarrow aoo.e--boo.w withcolor red;
drawarrow aol.e--boo.w;
drawarrow alo.e--bol.w;
drawarrow all.e--bol.w;
drawarrow boo.e--coo.w;
drawarrow bol.e--coo.w;
drawarrow blo.e--col.w;
drawarrow bll.e--col.w;
drawarrow coo.e--doo.w;
drawarrow col.e--doo.w;
drawarrow clo.e--dol.w withcolor red;
drawarrow cll.e--dol.w;
drawarrow doo.e--eoo.w;
drawarrow dol.e--eoo.w;
drawarrow dlo.e--eol.w;
drawarrow dll.e--eol.w;
% dashed arrows
drawarrow aoo.e--blo.w dashed evenly;
drawarrow aol.e--blo.w dashed evenly;
drawarrow alo.e--bll.w dashed evenly;
drawarrow all.e--bll.w dashed evenly;
drawarrow boo.e--clo.w dashed evenly withcolor red;
drawarrow bol.e--clo.w dashed evenly;
drawarrow blo.e--cll.w dashed evenly;
drawarrow bll.e--cll.w dashed evenly;
drawarrow coo.e--dlo.w dashed evenly;
drawarrow col.e--dlo.w dashed evenly;
drawarrow clo.e--dll.w dashed evenly;
drawarrow cll.e--dll.w dashed evenly;
drawarrow doo.e--elo.w dashed evenly;
drawarrow dol.e--elo.w dashed evenly withcolor red;
drawarrow dlo.e--ell.w dashed evenly;
drawarrow dll.e--ell.w dashed evenly;
endfig;
end