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.

Lemma leB_iff (lhs : formula) (rhs : formula)
: lhs =< rhs <-> E.singleton lhs ⊢ rhs.