Skip to content

Commit

Permalink
Merge pull request #1117 from 4ever2/eta-expand-app-fix
Browse files Browse the repository at this point in the history
Fix substitution during eta expansion of partial application
  • Loading branch information
mattam82 authored Nov 12, 2024
2 parents c451d74 + f66b8f4 commit a9f5da7
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 a9f5da7

Please sign in to comment.