Section CONSTRUCTIVE_FACTS.
Variant Th (X : ensemble formula) (b : formula) : Prop :=
| In_Th
(INFERS : X ⊢ b)
: b \in Th X.
#[local] Hint Constructors Th : core.
#[global]
Add Parametric Morphism :
Th with signature (eqProp ==> eqProp)
as Th_lifts_eqProp.
Proof with reflexivity || eauto.
eapply isFilter_intro.
- exists trueB. econstructor.
eapply ImplicationI, ByAssumption; done!.
- intros x1 x2 [INFERS1] [INFERS2].
econstructor. eapply ConjunctionI; done!.
- intros x [INFERS] x' x_le_x'. apply leB_iff in x_le_x'.
econstructor. eapply Cut_property. exact INFERS.
eapply extend_infers with (Gamma := E.singleton x); done!.
Qed.
Proof with eauto.
intros b [xs ?]; des. apply andsB_le_iff in andsB_LE.
destruct andsB_LE as [X' [xs_repr_X' INFERS]].
econstructor. eapply extend_infers...
intros z z_in. eapply FINITE_SUBSET, xs_repr_X'...
Qed.
#[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 inconsistent_compatWith_isSubsetOf inconsistent_cl_iff : core.
Proof with eauto with *.
split; intros INCONSISTENT.
- eapply inconsistent_cl_iff.
eapply inconsistent_compatWith_isSubsetOf with (X := F)...
- eapply inconsistent_compatWith_isSubsetOf with (X := cl F)...
eapply inconsistent_cl_iff...
Qed.
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 *.
revert EQUICONSISTENT SUBSET IS_FILTER. pose (evalFormula env) as X'.
fold X'. ii.
assert (claim1 : evalFormula env b).
{ eapply ENTAILS. ii.
eapply SUBSET. econstructor.
eapply ByAssumption. right...
}
assert (claim2 : inconsistent (cl X')).
{ eapply inconsistent_cl_iff.
eapply ContradictionI with (A := b).
- eapply ByAssumption...
- eapply ByAssumption. eapply SUBSET. econstructor. eapply ByAssumption. left...
}
assert (claim3 : inconsistent (Th (E.insert (NegationF b) X))).
{ eapply EQUICONSISTENT. eapply inconsistent_compatWith_isSubsetOf with (X := cl X')... }
eapply NegationE. eapply inconsistent_cl_iff. rewrite cl_eq_Th...
Qed.
Definition MaximallyConsistentSet (X : ensemble formula) : ensemble formula :=
completeFilterOf (Th X).
Variant full_axiom_set (X : ensemble formula) (b : formula) : Prop :=
| In_full_axiom_set (n : nat)
(H_IN : b \in axiom_set X n)
: b \in full_axiom_set X.
Proof with eauto with *.
revert X FINITE_SUBSET. induction xs as [ | x xs IH]; simpl; ii.
- exists 0. tauto.
- assert (claim1 : forall z : formula, In z xs -> z \in full_axiom_set X) by now firstorder.
assert (claim2 : x \in full_axiom_set X) by now firstorder.
inversion claim2.
assert (claim3 : x \in improveFilter (Th X) n).
{ eapply lemma1_of_1_3_9. econstructor. eapply ByAssumption... }
pose proof (IH X claim1) as [m claim4].
assert (m <= n \/ n <= m) as [m_le_n | n_lt_m] by lia.
+ exists n. intros z [x_eq_z | z_in_xs].
{ subst z... }
{ eapply lemma1_of_1_2_12... }
+ exists m. intros z [x_eq_z | z_in_xs].
{ subst z. eapply lemma1_of_1_2_12... }
{ eapply claim4... }
Qed.
Proof with eauto with *.
intros z [INFERS].
pose proof (inference_is_finite (full_axiom_set X) z INFERS) as [xs [X' [xs_isFiniteSubsetOf [xs_isListRepOf INFERS']]]].
pose proof (lemma3_of_1_3_9_aux1 xs X xs_isFiniteSubsetOf) as [m claim1].
assert (claim2 : isFilter (improveFilter (Th X) m)).
{ eapply @lemma1_of_1_2_11 with (CBA := LindenbaumBooleanAlgebra). eapply lemma1_of_1_3_8. }
inversion claim2. exists m. unnw.
eapply CLOSED_UPWARD with (x := andsB xs).
- eapply fact5_of_1_2_8... exists xs...
- eapply andsB_le_iff. now firstorder.
Qed.
Variant MaximallyConsistentSet_spec (X : ensemble formula) (F : ensemble formula) : Prop :=
| MaximallyConsistentSetSpec_areTheFollowings
(SUBSET : Th X \subseteq F)
(EQUICONSISTENT : equiconsistent (Th X) F)
(CLOSED_infers : forall b : formula, b \in F <-> F ⊢ b)
(META_DN : forall b : formula, << NEGATION : NegationF b \in F -> ContradictionF \in F >> -> b \in F)
(IMPLICATION_FAITHFUL : forall b : formula, forall b' : formula, ImplicationF b b' \in F <-> << IMPLICATION : b \in F -> b' \in F >>)
: MaximallyConsistentSet_spec X F.

Theorem theorem_of_1_3_10 (X : ensemble formula)
: MaximallyConsistentSet_spec X (MaximallyConsistentSet X).