Skip to content

Commit

Permalink
Fix substitution during eta expansion of partial application
Browse files Browse the repository at this point in the history
  • Loading branch information
4ever2 committed Nov 8, 2024
1 parent c451d74 commit f66b8f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion template-coq/theories/EtaExpand.v
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Section Eta.
let prev_args := map (lift0 needed) args in
let eta_args := rev_map tRel (seq 0 needed) in
let remaining := firstn needed (skipn #|args| (rev (smash_context [] (decompose_prod_assum [] ty).1))) in
let remaining_subst := subst_context (rev args) 0 remaining in
let remaining_subst := rev (subst_context (rev args) 0 (rev remaining)) in
fold_right (fun d b => Ast.tLambda d.(decl_name) d.(decl_type) b) (mkApps (lift0 needed t) (prev_args ++ eta_args)) remaining_subst.

Definition eta_constructor (ind : inductive) c u args :=
Expand Down

0 comments on commit f66b8f4

Please sign in to comment.