Ltac enrich tac :=
  first
    [ tac
    | match goal with
      | |- OpaqueProp (Typeclass_Rewrite (?x :: _) -> _) =>
             apply (pop_schedule x);
             enrich tac;
             apply (push_schedule x)
      end
    ].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).
Lemma MakeAxiomatization_BasicSequentCalculus {L: Language} {Gamma: ProofTheory L} {bSC: BasicSequentCalculus L Gamma}: forall (G: Prop) (l: list (sig (fun X: Prop => X))), (forall (SC: NormalSequentCalculus L (Build_SequentCalculus (@derivable L Gamma))) (bSC: BasicSequentCalculus L (Build_SequentCalculus (@derivable L Gamma))), OpaqueProp (OpaqueProp (Typeclass_Rewrite l -> G))) <-> OpaqueProp (Typeclass_Rewrite ((exist (fun X: Prop => X) (BasicSequentCalculus L Gamma) bSC) :: l) -> G).
Lemma MakeAxiomatization_MinimunSequentCalculus {L: Language} {minL: MinimunLanguage L} {Gamma: ProofTheory L} {minSC: MinimunSequentCalculus L Gamma} {bSC': BasicSequentCalculus L (Build_SequentCalculus (@derivable L Gamma))}: forall (G: Prop) (l: list (sig (fun X: Prop => X))), (forall (minSC: MinimunSequentCalculus L (Build_SequentCalculus (@derivable L Gamma))) (minAX: MinimunAxiomatization L (Build_SequentCalculus (@derivable L Gamma))), OpaqueProp (OpaqueProp (Typeclass_Rewrite l -> G))) <-> OpaqueProp (Typeclass_Rewrite ((exist (fun X: Prop => X) (MinimunSequentCalculus L Gamma) minSC) :: l) -> G).
Lemma MakeAxiomatization_FiniteWitnessedSequentCalculus {L: Language} {minL: MinimunLanguage L} {Gamma: ProofTheory L} {fwSC: FiniteWitnessedSequentCalculus L Gamma} {bSC': BasicSequentCalculus L (Build_SequentCalculus (@derivable L Gamma))} {minSC': MinimunSequentCalculus L (Build_SequentCalculus (@derivable L Gamma))}: forall (G: Prop) (l: list (sig (fun X: Prop => X))), (forall (fwSC: FiniteWitnessedSequentCalculus L (Build_SequentCalculus (@derivable L Gamma))) (AX: NormalAxiomatization L (Build_SequentCalculus (@derivable L Gamma))), OpaqueProp (OpaqueProp (Typeclass_Rewrite l -> G))) <-> OpaqueProp (Typeclass_Rewrite ((exist (fun X: Prop => X) (FiniteWitnessedSequentCalculus L Gamma) fwSC) :: l) -> G).