Local Open Scope logic_base.
Local Open Scope syntax.
Section ContextProperties.
Context {L: Language}
{minL: MinimunLanguage L}
{pL: PropositionalLanguage L}.
Definition orp_witnessed: context -> Prop :=
fun Phi => forall x y, Phi (orp x y) -> Phi x \/ Phi y.
Context {Gamma: ProofTheory L}.
Definition context_orp (Phi Psi: context): context :=
fun z => exists x y, z = x || y /\ Phi |-- x /\ Psi |-- y.
Definition context_orp_captured (P: context -> Prop): Prop :=
forall Phi Psi, P (context_orp Phi Psi) -> P Phi \/ P Psi.
Context {SC: NormalSequentCalculus L Gamma}
{bSC: BasicSequentCalculus L Gamma}
{minSC: MinimunSequentCalculus L Gamma}
{ipSC: IntuitionisticPropositionalSequentCalculus L Gamma}
{minAX: MinimunAxiomatization L Gamma}
{ipGamma: IntuitionisticPropositionalLogic L Gamma}.

(* Specifications: *)
Lemma context_orp_mono: forall Phi Psi Phi' Psi',
Included _ (derivable Phi) (derivable Phi') ->
Included _ (derivable Psi) (derivable Psi') ->
Included _ (context_orp Phi Psi) (context_orp Phi' Psi').
Lemma context_orp_mono': forall Phi Psi Phi' Psi',
Included _ Phi Phi' ->
Included _ Psi Psi' ->
Included _ (context_orp Phi Psi) (context_orp Phi' Psi').
Lemma cannot_derive_context_orp_captured: forall (x: expr),
context_orp_captured (cannot_derive x).
Lemma DCS_truep: forall (Phi: context),
derivable_closed Phi ->
Phi TT.
Lemma DCS_andp_iff: forall (Phi: context),
derivable_closed Phi ->
(forall x y: expr, Phi (x && y) <-> (Phi x /\ Phi y)).
Lemma DCS_iffp: forall (Phi: context) (x y: expr),
derivable_closed Phi ->
|-- x <--> y ->
(Phi x <-> Phi y).
Lemma DCS_multi_and_iff: forall (Phi: context),
derivable_closed Phi ->
(forall xs: list expr, Phi (multi_and xs) <-> Forall Phi xs).
Lemma DCS_orp_iff: forall (Phi: context),
derivable_closed Phi ->
orp_witnessed Phi ->
(forall x y: expr, Phi (x || y) <-> (Phi x \/ Phi y)).
Lemma derivable_closed_union_derivable {AX: NormalAxiomatization L Gamma}: forall (Phi Psi: context) (x: expr),
derivable_closed Psi ->
Union _ Phi Psi |-- x ->
exists y, Psi y /\ Phi |-- y --> x.
Lemma consistent_spec:
forall (Phi: context), consistent Phi <-> ~ Phi |-- FF.