Ltac enrichs L tac :=
apply (change_schedule L);
repeat
match goal with
| |- OpaqueProp (Typeclass_Rewrite (?x :: _) -> _) =>
enrich tac
| |- OpaqueProp (Typeclass_Rewrite nil -> _) =>
fail 1
| |- OpaqueProp (Typeclass_Rewrite ?l -> _) =>
fail 1000 "Cannot proceed these typeclasses: " l
end;
apply finish_enrich.
Ltac clear_rec L :=
match L with
| nil => idtac
| exist _ _ ?H :: ?L' => clear H; clear_rec L'
end.
Ltac AddSequentCalculus Gamma :=
revert_dep Gamma;
intros_dep;
let L := schedule in
let L' := tactic_rev L in
enrichs L' AddSC_enrich;
clear_rec L;
change (@provable _ Gamma) with (@provable _ (Build_AxiomaticProofTheory provable));
set (Gamma' := (Build_AxiomaticProofTheory provable)) in *;
clearbody Gamma';
clear Gamma;
rename Gamma' into Gamma.
Ltac AddAxiomatization Gamma :=
revert_dep Gamma;
intros_dep;
let L := schedule in
let L' := tactic_rev L in
enrichs L' AddAX_enrich;
clear_rec L;
change (@derivable _ Gamma) with (@derivable _ (Build_SequentCalculus derivable));
set (Gamma' := (Build_SequentCalculus derivable)) in *;
clearbody Gamma';
clear Gamma;
rename Gamma' into Gamma.
Ltac instantiate_must_succeed := instantiate (1 := _); try (instantiate (1 := _); fail 2 || fail 1).

(* Specifications: *)
Lemma MakeSequentCalculus_MinimunAxiomatization {L: Language} {minL: MinimunLanguage L} {Gamma: ProofTheory L} {minAX: MinimunAxiomatization L Gamma}:
forall (G: Prop) (l: list (sig (fun X: Prop => X))),
(forall
(AX: NormalAxiomatization L (Build_AxiomaticProofTheory (@provable L Gamma)))
(minAX: MinimunAxiomatization L (Build_AxiomaticProofTheory (@provable L Gamma)))
(SC: NormalSequentCalculus L (Build_AxiomaticProofTheory (@provable L Gamma)))
(bSC: BasicSequentCalculus L (Build_AxiomaticProofTheory (@provable L Gamma)))
(fwSC: FiniteWitnessedSequentCalculus L (Build_AxiomaticProofTheory (@provable L Gamma)))
(minSC: MinimunSequentCalculus L (Build_AxiomaticProofTheory (@provable L Gamma))),
OpaqueProp (OpaqueProp (Typeclass_Rewrite l -> G))) <->
OpaqueProp (Typeclass_Rewrite ((exist (fun X: Prop => X) (MinimunAxiomatization L Gamma) minAX) :: l) -> G).