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).

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).