fact: Fixpoint qf_to_odnf (f : formula R) (neg : bool) {struct f} : seq (oclause R) := match f with | Bool b => if b (+) neg then [:: (Oclause [::] [::] [::] [::])] else [::] | t1 == t2 => [:: if neg then (Oclause [::] [:: t1 - t2] [::] [::]) else (Oclause [:: t1 - t2] [::] [::] [::])] | t1 <% t2 => [:: if neg then (Oclause [::] [::] [::] [:: t1 - t2]) else (Oclause [::] [::] [:: t2 - t1] [::])] | t1 <=% t2 => [:: if neg then (Oclause [::] [::] [:: t1 - t2] [::]) else (Oclause [::] [::] [::] [:: t2 - t1])] | f1 /\ f2 => (if neg then cat else and_odnf) [rec f1, neg] [rec f2, neg] | f1 \/ f2 => (if neg then and_odnf else cat) [rec f1, neg] [rec f2, neg] | f1 ==> f2 => (if neg then and_odnf else cat) [rec f1, ~~ neg] [rec f2, neg] | ~ f1 => [rec f1, ~~ neg] | _ => if neg then [:: (Oclause [::] [::] [::] [::])] else [::] end%oT where "[ 'rec' f , neg ]" := (qf_to_odnf f neg).
imports: HB(structures) mathcomp.ssreflect.ssreflect mathcomp(ssrfun ssrbool eqtype ssrnat seq div choice fintype) mathcomp(bigop order ssralg finset fingroup zmodp) mathcomp(poly ssrnum)