Section UNION.
Variable f : nat -> ensemble (frm L).
Definition union_f : ensemble (frm L) :=
fun p => exists n, p \in f n.
Hypothesis incl : forall n1 : nat, forall n2 : nat, forall LE : n1 <= n2, f n1 \subseteq f n2.
Hypothesis equiconsistent : forall n : nat, inconsistent (f n) <-> inconsistent (f (S n)).
End UNION.
#[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.
Context {enum_frm_L : isEnumerable formula}.
#[global]
Instance LindenbaumBooleanAlgebra : isCBA formula (SETOID := formula_isSetoid) :=
{ CBA_isBA := formula_isBA
; CBA_satisfiesBooleanAlgebraLaws := LBA_satisfiesBooleanAlgebraLaws
; CBA_countable := enum_frm_L
}.
Fixpoint axiom_set (X : ensemble formula) (n : nat) {struct n} : ensemble formula :=
match n with
| O => X
| S n => E.union (axiom_set X n) (insertion (improveFilter (Th X) n) n)
end.
Proof with eauto with *.
revert X; induction n as [ | n IH]; [reflexivity | intros X b].
simpl. unfold Insertion. rewrite cl_eq_Th, IH. split; intros b_in.
- rewrite <- cl_eq_Th. rewrite <- cl_eq_Th in b_in. revert b b_in.
change ((cl (E.union (Th (axiom_set X n)) (insertion (Th (axiom_set X n)) n))) \subseteq (cl (E.union (axiom_set X n) (insertion (Th (axiom_set X n)) n)))).
transitivity (cl (cl (E.union (axiom_set X n) (insertion (Th (axiom_set X n)) n)))).
+ eapply fact4_of_1_2_8. intros b [b_in | b_in].
* rewrite <- cl_eq_Th in b_in. revert b b_in. eapply fact4_of_1_2_8. ii; left...
* rewrite cl_eq_Th. econstructor. eapply ByAssumption. right...
+ eapply fact5_of_1_2_8...
- rewrite <- cl_eq_Th. rewrite <- cl_eq_Th in b_in. revert b b_in.
eapply fact4_of_1_2_8. intros b [b_in | b_in].
+ left. econstructor. eapply ByAssumption...
+ right...
Qed.
Proof with eauto with *.
split.
- do 2 rewrite inconsistent_iff. intros INCONSISTENT. eapply extend_infers... done!.
- do 2 rewrite inconsistent_iff. do 2 rewrite <- in_Th_iff. intros INCONSISTENT.
rewrite <- lemma1_of_1_3_9 in *. pose proof (lemma2_of_1_2_13 (Th X)) as claim. eapply fact5_of_1_2_8.
+ eapply @lemma1_of_1_2_11 with (CBA := LindenbaumBooleanAlgebra). eapply lemma1_of_1_3_8.
+ rewrite cl_eq_Th. rewrite in_Th_iff. rewrite <- inconsistent_iff. rewrite inconsistent_okay. rewrite cl_eq_Th.
enough (WTS : inconsistent' (improveFilter (Th X) n)).
{ eapply inconsistent_compatWith_isSubsetOf... ii. rewrite in_Th_iff. eapply ByAssumption... }
eapply claim with (n2 := S n).
* eapply lemma1_of_1_3_8.
* enough (INFERS : improveFilter (Th X) (S n) ⊢ Bot_frm).
{ rewrite <- inconsistent_iff in INFERS. rewrite inconsistent_okay in INFERS.
eapply inconsistent_compatWith_isSubsetOf with (X := cl (improveFilter (Th X) (S n)))...
eapply fact5_of_1_2_8... eapply @lemma1_of_1_2_11 with (CBA := LindenbaumBooleanAlgebra). eapply lemma1_of_1_3_8.
}
simpl in INCONSISTENT. rewrite cl_eq_Th in INCONSISTENT. rewrite in_Th_iff in INCONSISTENT. simpl.
eapply extend_infers...
Qed.
Definition MaximallyConsistentSet (X : ensemble formula) : ensemble formula :=
completeFilterOf (Th X).
Definition full_axiom_set (X : ensemble formula) : ensemble formula :=
union_f (axiom_set X).

Lemma lemma3_of_1_3_9_aux1 (xs : list formula) (X : ensemble formula)
(FINITE_SUBSET : L.is_finsubset_of xs (full_axiom_set X))
: exists m, L.is_finsubset_of xs (improveFilter (Th X) m).