(*******   Kripke_Model    ****************************************)


Inductive Kripke_Model (A : Set) (World : A -> Type) 
(le : A -> A -> Type) (forces0 : A -> Int -> Prop) : Type :=
    kripke_model :
      (forall k : A, World k -> le k k) ->
      (forall k0 k1 k2 : A,
       World k0 -> World k1 -> World k2 -> le k0 k1 -> le k1 k2 -> le k0 k2) ->
      (forall k0 k1 : A,
       World k0 ->
       World k1 -> le k0 k1 -> forall i : Int, forces0 k0 i -> forces0 k1 i) ->
      Kripke_Model A World le forces0.(*******   Kripke_Model    ****************************************)


Inductive Kripke_Model (A : Set) (World : A -> Type) 
(le : A -> A -> Type) (forces0 : A -> Int -> Prop) : Type :=
    kripke_model :
      (forall k : A, World k -> le k k) ->
      (forall k0 k1 k2 : A,
       World k0 -> World k1 -> World k2 -> le k0 k1 -> le k1 k2 -> le k0 k2) ->
      (forall k0 k1 : A,
       World k0 ->
       World k1 -> le k0 k1 -> forall i : Int, forces0 k0 i -> forces0 k1 i) ->
      Kripke_Model A World le forces0.Fixpoint forces (A : Set) (World : A -> Type) 
 (le : A -> A -> Type) (forces0 : A -> Int -> Prop) 
 (k : A) (a : form) {struct a} : Prop :=
  match a with
  | Falsum => False
  | Atom i => forces0 k i
  | AndF a0 a1 =>
      forces A World le forces0 k a0 /\ forces A World le forces0 k a1
  | OrF a0 a1 =>
      forces A World le forces0 k a0 \/ forces A World le forces0 k a1
  | Imp a0 a1 =>
      forall k' : A,
      World k' ->
      le k k' ->
      forces A World le forces0 k' a0 -> forces A World le forces0 k' a1
  end.

Lemma soundness : forall (t : proof_term) (context : flist) (a : form), derives context t a -> forall (A : Set) (World : A -> Type) (le : A -> A -> Type) (forces0 : A -> Int -> Prop), Kripke_Model A World le forces0 -> forall k : A, World k -> (forall c : form, In c context -> forces A World le forces0 k c) -> forces A World le forces0 k a.