Module CanonicalModel.
Context {venv: Var_env}.
Existing Instance IPC.
Local Open Scope IPC_scope.
Context (IPC_classic: forall ctx t, {ctx |-- t} + {~ ctx |-- t}).
Definition W := {w: Context &
(forall t, w |-- t -> w t = true) /\
(forall t1 t2, w (t1 || t2) = true -> w t1 = true \/ w t2 = true)}.
Definition R (w v: W) := match w, v with existT w _, existT v _ => forall t, w t = true -> v t = true end.
Definition gen (ctx: Context) : Context := fun t => if IPC_classic ctx t then true else false.

Lemma gen_derive: forall ctx t, ctx |-- t <-> gen ctx |-- t.