Section EXTRA1.
Definition inconsistent {L : language} (Gamma : ensemble (frm L)) : Prop :=
forall p, Gamma ⊢ p.
Context {L : language}.
Proof with repeat ((now left) || right).
eapply NegationE, ContradictionI.
- eapply DisjunctionI2, NegationI, ContradictionI.
+ eapply DisjunctionI1, ByAssumption...
+ eapply ByAssumption...
- eapply ByAssumption...
Qed.
#[local] Notation formula := (frm L).
#[global]
Instance formula_isBA : isBA formula :=
{ andB := Con_frm
; orB := Dis_frm
; notB := Neg_frm
; trueB := Imp_frm Bot_frm Bot_frm
; falseB := Bot_frm
}.
#[local] Obligation Tactic := i.
#[global, program]
Instance formula_isSetoid : isSetoid formula :=
{ eqProp (lhs : formula) (rhs : formula) := E.singleton lhs ⊢ rhs /\ E.singleton rhs ⊢ lhs }.
Next Obligation with done!.
split.
- ii. split; eapply ByAssumption...
- ii; des...
- ii; des. split; eapply Cut_property; try eassumption; eapply extend_infers; try eassumption...
Qed.
#[global]
Instance LBA_satisfiesBooleanAlgebraLaws
: BooleanAlgebraLaws formula_isBA.
Proof with done!.
repeat (split; ii); simpl in *; des.
{ eapply ConjunctionI.
- eapply Cut_property with (A := x1).
+ eapply ConjunctionE1, ByAssumption...
+ eapply extend_infers...
- eapply Cut_property with (A := y1).
+ eapply ConjunctionE2, ByAssumption...
+ eapply extend_infers...
}
{ eapply ConjunctionI.
- eapply Cut_property with (A := x2).
+ eapply ConjunctionE1, ByAssumption...
+ eapply extend_infers...
- eapply Cut_property with (A := y2).
+ eapply ConjunctionE2, ByAssumption...
+ eapply extend_infers...
}
{ eapply DisjunctionE.
- eapply ByAssumption...
- eapply DisjunctionI1, extend_infers...
- eapply DisjunctionI2, extend_infers...
}
{ eapply DisjunctionE.
- eapply ByAssumption...
- eapply DisjunctionI1, extend_infers...
- eapply DisjunctionI2, extend_infers...
}
{ eapply NegationI. eapply ContradictionI with (A := x1).
- eapply extend_infers...
- eapply ByAssumption...
}
{ eapply NegationI. eapply ContradictionI with (A := x2).
- eapply extend_infers...
- eapply ByAssumption...
}
{ eapply ConjunctionI.
- eapply ConjunctionI.
+ eapply ConjunctionE1, ByAssumption...
+ eapply ConjunctionE1, ConjunctionE2, ByAssumption...
- eapply ConjunctionE2, ConjunctionE2, ByAssumption...
}
{ eapply ConjunctionI.
- eapply ConjunctionE1, ConjunctionE1, ByAssumption...
- eapply ConjunctionI.
+ eapply ConjunctionE2, ConjunctionE1, ByAssumption...
+ eapply ConjunctionE2, ByAssumption...
}
{ eapply DisjunctionE.
- eapply ByAssumption...
- eapply DisjunctionI1, DisjunctionI1, ByAssumption. left...
- eapply DisjunctionE.
+ eapply ByAssumption. left...
+ eapply DisjunctionI1, DisjunctionI2, ByAssumption. left...
+ eapply DisjunctionI2, ByAssumption. left...
}
{ eapply DisjunctionE.
- eapply ByAssumption...
- eapply DisjunctionE.
+ eapply ByAssumption. left...
+ eapply DisjunctionI1, ByAssumption. left...
+ eapply DisjunctionI2, DisjunctionI1, ByAssumption. left...
- eapply DisjunctionI2, DisjunctionI2, ByAssumption. left...
}
{ eapply ConjunctionI.
- eapply ConjunctionE2, ByAssumption...
- eapply ConjunctionE1, ByAssumption...
}
{ eapply ConjunctionI.
- eapply ConjunctionE2, ByAssumption...
- eapply ConjunctionE1, ByAssumption...
}
{ eapply DisjunctionE.
- eapply ByAssumption...
- eapply DisjunctionI2, ByAssumption. left...
- eapply DisjunctionI1, ByAssumption. left...
}
{ eapply DisjunctionE.
- eapply ByAssumption...
- eapply DisjunctionI2, ByAssumption. left...
- eapply DisjunctionI1, ByAssumption. left...
}
{ eapply DisjunctionE.
- eapply ConjunctionE2, ByAssumption...
- eapply DisjunctionI1, ConjunctionI.
+ eapply ConjunctionE1, ByAssumption. right...
+ eapply ByAssumption. left...
- eapply DisjunctionI2, ConjunctionI.
+ eapply ConjunctionE1, ByAssumption. right...
+ eapply ByAssumption. left...
}
{ eapply DisjunctionE.
- eapply ByAssumption...
- eapply ConjunctionI.
+ eapply ConjunctionE1, ByAssumption. left...
+ eapply DisjunctionI1, ConjunctionE2, ByAssumption. left...
- eapply ConjunctionI.
+ eapply ConjunctionE1, ByAssumption. left...
+ eapply DisjunctionI2, ConjunctionE2, ByAssumption. left...
}
{ eapply DisjunctionE.
- eapply ConjunctionE1, ByAssumption...
- eapply DisjunctionI1, ConjunctionI.
+ eapply ByAssumption. left...
+ eapply ConjunctionE2, ByAssumption. right...
- eapply DisjunctionI2, ConjunctionI.
+ eapply ByAssumption. left...
+ eapply ConjunctionE2, ByAssumption. right...
}
{ eapply DisjunctionE.
- eapply ByAssumption...
- eapply ConjunctionI.
+ eapply DisjunctionI1, ConjunctionE1, ByAssumption. left...
+ eapply ConjunctionE2, ByAssumption. left...
- eapply ConjunctionI.
+ eapply DisjunctionI2, ConjunctionE1, ByAssumption. left...
+ eapply ConjunctionE2, ByAssumption. left...
}
{ eapply DisjunctionE.
- eapply ByAssumption...
- eapply ConjunctionI.
+ eapply DisjunctionE.
* eapply ByAssumption. right...
* eapply DisjunctionI1, ByAssumption. left...
* eapply DisjunctionI2, ConjunctionE1, ByAssumption. left...
+ eapply DisjunctionE.
* eapply ByAssumption. right...
* eapply DisjunctionI1, ByAssumption. left...
* eapply DisjunctionI2, ConjunctionE2, ByAssumption. left...
- eapply ConjunctionI.
+ eapply DisjunctionE.
* eapply ByAssumption. right...
* eapply DisjunctionI1, ByAssumption. left...
* eapply DisjunctionI2, ConjunctionE1, ByAssumption. left...
+ eapply DisjunctionE.
* eapply ByAssumption. right...
* eapply DisjunctionI1, ByAssumption. left...
* eapply DisjunctionI2, ConjunctionE2, ByAssumption. left...
}
{ eapply DisjunctionE.
- eapply ConjunctionE1, ByAssumption...
- eapply DisjunctionI1, ByAssumption. left...
- eapply DisjunctionE.
+ eapply ConjunctionE2, ByAssumption. right...
+ eapply DisjunctionI1, ByAssumption. left...
+ eapply DisjunctionI2, ConjunctionI.
* eapply ByAssumption. right; left...
* eapply ByAssumption. left...
}
{ eapply DisjunctionE.
- eapply ByAssumption...
- eapply ConjunctionI.
+ eapply DisjunctionI1, ConjunctionE1, ByAssumption. left...
+ eapply DisjunctionI1, ConjunctionE2, ByAssumption. left...
-  eapply ConjunctionI.
+ eapply DisjunctionI2, ByAssumption. left...
+ eapply DisjunctionI2, ByAssumption. left...
}
{ eapply DisjunctionE.
- eapply ConjunctionE1, ByAssumption...
- eapply DisjunctionE.
+ eapply ConjunctionE2, ByAssumption. right...
+ eapply DisjunctionI1, ConjunctionI.
* eapply ByAssumption. right; left...
* eapply ByAssumption. left...
+ eapply DisjunctionI2, ByAssumption. left...
- eapply DisjunctionI2, ByAssumption. left...
}
{ eapply ConjunctionE2, ByAssumption... }
{ eapply ConjunctionI.
- eapply ImplicationI, ByAssumption. left...
- eapply ByAssumption...
}
{ eapply ConjunctionE1, ByAssumption... }
{ eapply ConjunctionI.
- eapply ByAssumption...
- eapply ImplicationI, ByAssumption. left...
}
{ eapply DisjunctionE.
- eapply ByAssumption...
- eapply ContradictionE, ByAssumption. left...
- eapply ByAssumption. left...
}
{ eapply DisjunctionI2, ByAssumption... }
{ eapply DisjunctionE.
- eapply ByAssumption...
- eapply ByAssumption. left...
- eapply ContradictionE, ByAssumption. left...
}
{ eapply DisjunctionI1, ByAssumption... }
{ eapply ConjunctionE1, ByAssumption... }
{ eapply ConjunctionI.
- eapply ByAssumption...
- eapply ContradictionE, ByAssumption...
}
{ eapply ConjunctionE2, ByAssumption... }
{ eapply ConjunctionI.
- eapply ContradictionE, ByAssumption...
- eapply ByAssumption...
}
{ eapply ImplicationI, ByAssumption. left... }
{ eapply DisjunctionI1, ImplicationI, ByAssumption. left... }
{ eapply ImplicationI, ByAssumption. left... }
{ eapply DisjunctionI2, ImplicationI, ByAssumption. left... }
{ eapply ConjunctionE1, ByAssumption... }
{ eapply ConjunctionI; eapply ByAssumption... }
{ eapply DisjunctionE.
- eapply ByAssumption...
- eapply ByAssumption. left...
- eapply ByAssumption. left...
}
{ eapply DisjunctionI1, ByAssumption... }
{ eapply ConjunctionE1, ByAssumption... }
{ eapply ConjunctionI.
- eapply ByAssumption...
- eapply DisjunctionI1, ByAssumption...
}
{ eapply DisjunctionE.
- eapply ByAssumption...
- eapply ByAssumption. left...
- eapply ConjunctionE1, ByAssumption. left...
}
{ eapply DisjunctionI1, ByAssumption... }
{ eapply ContradictionI with (A := x).
- eapply ConjunctionE1, ByAssumption...
- eapply ConjunctionE2, ByAssumption...
}
{ eapply ContradictionE, ByAssumption... }
{ eapply ImplicationI, ByAssumption. left... }
{ eapply extend_infers.
- eapply Law_of_Excluded_Middle.
- intros ? [].
}
Qed.
Proof with reflexivity || trivial.
simpl. split.
- intros [INFERS INFERS'].
eapply Cut_property with (A := Con_frm lhs rhs)...
eapply ConjunctionE2, ByAssumption. left...
- intros INFERS. split.
+ eapply ConjunctionE1, ByAssumption...
+ eapply ConjunctionI...
eapply ByAssumption...
Qed.
#[global]
Add Parametric Morphism :
(@proves L) with signature (eqProp ==> eqProp ==> iff)
as proves_compatWith_eqProp.
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.

Lemma filter_inconsistent_iff (F : ensemble formula)
(F_isFilter : isFilter F)
: inconsistent F <-> Bot_frm \in F.