Section WEAK_COMPLETENESS.
Definition ContradictionF_bool : bool :=
false.
Definition NegationF_bool (b1 : bool) : bool :=
match b1 with
| true => false
| false => true
end.
Definition ConjunctionF_bool (b1 : bool) (b2 : bool) : bool :=
match b1, b2 with
| true, true => true
| true, false => false
| false, true => false
| false, false => false
end.
Definition DisjunctionF_bool (b1 : bool) (b2 : bool) : bool :=
match b1, b2 with
| true, true => true
| true, false => true
| false, true => true
| false, false => false
end.
Definition ImplicationF_bool (b1 : bool) (b2 : bool) : bool :=
match b1, b2 with
| true, true => true
| true, false => false
| false, true => true
| false, false => true
end.
Definition BiconditionalF_bool (b1 : bool) (b2 : bool) : bool :=
match b1, b2 with
| true, true => true
| true, false => false
| false, true => false
| false, false => true
end.
Fixpoint eval_bool (env : propLetter -> bool) (p : formula) {struct p} : bool :=
match p with
| AtomF i => env i
| ContradictionF => ContradictionF_bool
| NegationF p1 => NegationF_bool (eval_bool env p1)
| ConjunctionF p1 p2 => ConjunctionF_bool (eval_bool env p1) (eval_bool env p2)
| DisjunctionF p1 p2 => DisjunctionF_bool (eval_bool env p1) (eval_bool env p2)
| ImplicationF p1 p2 => ImplicationF_bool (eval_bool env p1) (eval_bool env p2)
| BiconditionalF p1 p2 => BiconditionalF_bool (eval_bool env p1) (eval_bool env p2)
end.

Theorem eval_bool_spec (e : propLetter -> bool) (p : formula)
(e' := fun i => if e i then True else False)
: forall b, eval_bool e p = b <-> (if b then evalFormula e' p else ~ evalFormula e' p).