Section PROPOSITONAL_LOGIC.
Definition propLetter : Set := nat.
Inductive formula : Set :=
| AtomF (i : propLetter) : formula
| ContradictionF : formula
| NegationF (p1 : formula) : formula
| ConjunctionF (p1 : formula) (p2 : formula) : formula
| DisjunctionF (p1 : formula) (p2 : formula) : formula
| ImplicationF (p1 : formula) (p2 : formula) : formula
| BiconditionalF (p1 : formula) (p2 : formula) : formula.
#[global]
Instance propLetter_hasEqDec : hasEqDec propLetter :=
Nat.eq_dec.
#[global]
Instance formula_hasEqDec
: hasEqDec formula.
Definition is_structure (Gamma : ensemble formula) : Prop :=
forall p : formula, p \in Gamma <-> evalFormula (E.preimage AtomF Gamma) p.
Proof with repeat ((now left) || right).
eapply NegationE, ContradictionI.
- eapply DisjunctionI2, NegationI, ContradictionI.
+ eapply DisjunctionI1, ByAssumption...
+ eapply ByAssumption...
- eapply ByAssumption...
Qed.
Proof with eauto.
revert Gamma' SUBSET. induction INFERS; ii.
- eapply ByAssumption with (C := C)...
- eapply ContradictionI with (A := A)...
- eapply ContradictionE with (A := A)...
- eapply NegationI with (A := A)...
- eapply NegationE with (A := A)...
- eapply ConjunctionI with (A := A) (B := B)...
- eapply ConjunctionE1 with (A := A) (B := B)...
- eapply ConjunctionE2 with (A := A) (B := B)...
- eapply DisjunctionI1 with (A := A) (B := B)...
- eapply DisjunctionI2 with (A := A) (B := B)...
- eapply DisjunctionE with (A := A) (B := B) (C := C)...
- eapply ImplicationI with (A := A) (B := B)...
- eapply ImplicationE with (A := A) (B := B)...
- eapply BiconditionalI with (A := A) (B := B)...
- eapply BiconditionalE1 with (A := A) (B := B)...
- eapply BiconditionalE2 with (A := A) (B := B)...
Qed.

Lemma Deduction_thm (Gamma : ensemble formula) (H : formula) (C : formula)
: Gamma ⊢ ImplicationF H C <-> E.insert H Gamma ⊢ C.