Definition dnQ {b} (phi : form b) : form b := (phi --> Q) --> Q.
Fixpoint trans {b} (phi : form b) : form b :=
match phi with
| Impl phi1 phi2 => Impl (trans phi1) (trans phi2)
| All x phi => All x (trans phi)
| Pr s t => dnQ (Pr s t)
| Q =>  Q
| Fal => Q
end.

(* Specifications: *)
Lemma consts_trans b phi :
consts (trans phi) = consts phi.
Lemma trans_subst b x t (phi : form b) :
trans (subst x t phi) = subst x t (trans phi).
Lemma appCtx b psi1 psi2 A :
psi1 --> psi2 el A -> A ⊢I psi1 -> A ⊢I psi2.
Lemma app1 b psi1 psi2 A :
(psi1 --> psi2 :: A) ⊢I psi1 -> (psi1 --> psi2 :: A) ⊢I psi2.
Lemma app2 b psi1 psi2 A phi :
(phi :: psi1 --> psi2 :: A) ⊢I psi1 -> (phi :: psi1 --> psi2 :: A) ⊢I psi2.
Lemma app3 b psi1 psi2 A phi phi2 :
(phi :: phi2 :: psi1 --> psi2 :: A) ⊢I psi1 -> (phi :: phi2 :: psi1 --> psi2 :: A) ⊢I psi2.
Lemma trans_trans b (phi : form b) A :
A ⊢I ((dnQ (trans phi)) --> trans phi).
Lemma Double' b A (phi : form b) :
A ⊢C phi -> map trans A ⊢I trans phi.
Lemma Double b (phi : form b) :
[] ⊢C phi -> [] ⊢I (trans phi).