Skip to content

Commit

Permalink
bug fix in generate rev/fwdCDeriv
Browse files Browse the repository at this point in the history
  • Loading branch information
lecopivo committed Oct 2, 2023
1 parent f4612b2 commit f0e24d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion SciLean/Core/Meta/GenerateFwdCDeriv.lean
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def generateFwdCDeriv (constName : Name) (mainNames trailingNames : Array Name)
let isDiffRuleName :=
constName.append lhsData.declSuffix |>.append "IsDifferentiable_rule"

let xs' := ctx ++ #[W] ++ instW ++ vecInsts ++ args ++ mainArgProps
let xs' := ctx ++ #[W] ++ instW ++ vecInsts ++ mergeArgs' mainArgs unusedArgs argKinds ++ mainArgProps
let isDiffRule ← mkForallFVars xs' isDiff
let isDiffProof ← mkLambdaFVars xs' isDiffProof

Expand Down
2 changes: 1 addition & 1 deletion SciLean/Core/Meta/GenerateRevCDeriv.lean
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def generateRevCDeriv (constName : Name) (mainNames trailingNames : Array Name)
let isDiffRuleName :=
constName.append lhsData.declSuffix |>.append "HasAdjDiff_rule"

let xs' := ctx ++ #[W] ++ instW ++ vecInsts ++ args ++ mainArgProps
let xs' := ctx ++ #[W] ++ instW ++ vecInsts ++ mergeArgs' mainArgs unusedArgs argKinds ++ mainArgProps
let isDiffRule ← mkForallFVars xs' isDiff >>= instantiateMVars
let isDiffProof ← mkLambdaFVars xs' isDiffProof >>= instantiateMVars

Expand Down

0 comments on commit f0e24d3

Please sign in to comment.