Section HENKIN.
#[local] Infix "=~=" := is_similar_to : type_scope.
Context {L : language}.
#[local] Notation L' := (augmented_language L Henkin_constants).
#[local] Notation hatom := (ivar + Henkin_constants)%type.
#[local] Notation hsubst := (hatom -> trm L').
#[local] Existing Instance constant_symbols_sim.
#[local] Existing Instance trm_sim.
#[local] Existing Instance trms_sim.
#[local] Existing Instance frm_sim.
#[local] Existing Instance frms_sim.
#[local] Opaque Nat.mul Nat.div "mod".
Context {enum_frm_L' : isEnumerable (frm L')}.
Fixpoint addHenkin (X : ensemble (frm L')) (n : nat) {struct n} : ensemble (frm L') :=
match n with
| O => X
| S n => E.insert (nth_Henkin_axiom n) (addHenkin X n)
end.
Definition AddHenkin (X : ensemble (frm L')) : ensemble (frm L') :=
union_f (addHenkin X).
#[local] Hint Resolve fact1_of_1_2_8 fact2_of_1_2_8 fact3_of_1_2_8 fact4_of_1_2_8 fact5_of_1_2_8 lemma1_of_1_2_11 : core.
Proof with eauto with *.
split.
- intros INCONSISTENT. eapply inconsistent_compatWith_isSubsetOf... transitivity (Th (AddHenkin X)).
+ intros p p_in. rewrite <- cl_eq_Th in *. eapply fact4_of_1_2_8... eapply @subset_union_f with (L := L') (f := addHenkin X) (n := 0).
+ etransitivity. 2: eapply lemma3_of_1_3_9. intros p p_in. rewrite <- cl_eq_Th in *. eapply fact4_of_1_2_8... eapply @subset_union_f with (L := L') (f := axiom_set (AddHenkin X)) (n := 0).
- intros INCONSISTENT. rewrite <- cl_eq_Th. exists Bot_frm. split. 2: reflexivity. rewrite inconsistent_cl_iff.
assert (INCONSISTENT' : inconsistent' (Th (full_axiom_set (AddHenkin X)))).
{ eapply inconsistent_compatWith_isSubsetOf... eapply lemma2_of_1_3_9. }
rewrite <- cl_eq_Th in INCONSISTENT'. rewrite <- inconsistent_okay in INCONSISTENT'.
rewrite <- inconsistent_iff. rewrite equiconsistent_union_f with (f := addHenkin X).
+ rewrite equiconsistent_union_f with (f := axiom_set (AddHenkin X))...
* intros n1 n2 LE. induction LE as [ | n2 LE IH]; done!.
* eapply axiom_set_equiconsistent.
+ eapply addHenkin_incl.
+ i. eapply addHenkin_equiconsistent...
Qed.

Theorem theorem_of_1_3_10 (Gamma : ensemble (frm L))
: MaximallyConsistentSet_spec (E.image embed_frm Gamma) (MaximallyConsistentSet (AddHenkin (E.image embed_frm Gamma))).