File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed
Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -556,3 +556,16 @@ let goal_of_typ = (ty: Typ.t): Exp.t => {
556556 | _ => Exp . fresh(Invalid ("Bad_Goal" ))
557557 };
558558};
559+
560+ let strip_theorems = (exp: Exp . t ): Exp . t => {
561+ Exp . map_term(
562+ ~f_exp=
563+ (cont, exp) => {
564+ switch (exp |> Exp . term_of) {
565+ | Theorem (_ , _ , e2 ) => cont(e2)
566+ | _ => cont(exp)
567+ }
568+ },
569+ exp,
570+ );
571+ };
Original file line number Diff line number Diff line change @@ -225,10 +225,13 @@ module Update = {
225225 let stitched_scratch =
226226 Exercise . append_exp(just_prelude_term, just_lemmas_term);
227227 let stitched_theorem =
228- Exercise . append_exp(
229- stitched_scratch,
230- Language . Exp . replace_all_ids(just_prelude_term),
231- )
228+ stitched_scratch
229+ |> Exercise . append_exp(
230+ _,
231+ just_prelude_term
232+ |> Language . ProofHacks . strip_theorems
233+ |> Language . Exp . replace_all_ids,
234+ )
232235 |> Exercise . append_exp(_, just_theorem_term);
233236
234237 // Worker Setup
You can’t perform that action at this time.
0 commit comments