Local Open Scope logic_base.
Local Open Scope syntax.
Local Open Scope kripke_model.
Section partial_soundness.
Existing Instance unit_kMD.
Context {P: ProgrammingLanguage}
{iP: ImperativeProgrammingLanguage P}
{MD: Model}
{R: Relation model}
{po_R: PreOrder Krelation}
{BSS: BigStepSemantics P model}
{iBSS: ImpBigStepSemantics P model BSS}.
Context {L: Language} {minL: MinimunLanguage L} {pL: PropositionalLanguage L} {SL: SeparationLanguage L} {SM: Semantics L MD} {kiSM: KripkeIntuitionisticSemantics L MD tt SM} {kminSM: KripkeMinimunSemantics L MD tt SM} {kpSM: KripkePropositionalSemantics L MD tt SM}.

(* Specifications: *)
Lemma hoare_seq_partial_sound: forall c1 c2 P1 P2 P3,
triple_partial_valid P1 c1 P2 ->
triple_partial_valid P2 c2 P3 ->
triple_partial_valid P1 (Ssequence c1 c2) P3.
Lemma hoare_if_partial_sound: forall b c1 c2 B P1 P2,
(forall s, s |= B <-> eval_bool s b) ->
triple_partial_valid (P1 && B) c1 P2 ->
triple_partial_valid (P1 && ~~ B) c2 P2 ->
triple_partial_valid P1 (Sifthenelse b c1 c2) P2.
Lemma hoare_while_partial_sound: forall b c B P,
(forall s, s |= B <-> eval_bool s b) ->
triple_partial_valid (P && B) c P ->
triple_partial_valid P (Swhile b c) (P && ~~ B).