anchor.diff:  -endif.
   
   %% API
  -%% -export([execute/2]).
  --compile(export_all).
  +-export([execute/2]).
   
   %% Record declarations ("q" is short for "query")
   -record(and_q,  {l_sub_q :: q(), r_sub_q :: q()}).
  
positive.code: prop_no_nested_or() ->
      ?FORALL(X, q(), not nested_or(dnf({X,depth(X)}))).
  
  nested_or({or_q,L,R}) ->
      nested_or(L) or nested_or(R);
  nested_or({and_q,L,R}) ->
      (is_record(L, or_q) or is_record(R, or_q))
          orelse (nested_or(L) or nested_or(R));
  nested_or({not_q,Q}) ->
      nested_or(Q);
  nested_or(_) ->
  
negative.code: mv_not(Q) ->
      Q.
  
  mv_and({and_q, Q, {or_q, L, R}}) ->
      {or_q, mv_and({and_q, Q, mv_and(L)}), mv_and({and_q, Q, mv_and(R)})};
  mv_and({and_q, {or_q, L, R}, Q}) ->
      {or_q, mv_and({and_q, Q, mv_and(L)}), mv_and({and_q, Q, mv_and(R)})};
  mv_and({and_q, L, R}) ->
      {and_qT, mv_and(L), mv_and(R)};
  mv_and({or_q, L, R}) ->
      {or_q, mv_and(L), mv_and(R)};
  mv_and(Q) ->
      Q.
  
  