anchor.diff:    match e with 
     | Patterns.Let(v, e1, e2) -> 
       let inlinedBody = e2.Substitute(fun v2 -> if v = v2 then Some(e1) else None)
  +    //let renamedBody = variableRenaming inlinedBody []
  +    let renamedBody = inlinedBody
  +    Some(renamedBody)
  +  | _ -> None
  +
  +let methodDefToLambda (e: Expr): Expr Option = 
  +  match e with
  +  | ExistingCompiledMethodWithLambda(methodName, moduleName, args, lam) -> 
  +      Some(Expr.Applications(lam, List.map (fun x -> [x]) args))
  +  | _ -> None
  +
  +let lambdaAppToLet (e: Expr): Expr Option = 
  +  match e with
  +  | AppN(LambdaN(inputs, body), args) when (List.length inputs) = (List.length args) -> 
  +      Some(LetN(List.zip inputs args, body))
  +  | _ -> None
  +
  +/// This rule is composition of letInliner, methodDefToLambda, and lambdaAppToLet
  +let methodDefInliner (e: Expr): Expr Option = 
  +  match e with
  +  | ExistingCompiledMethodWithLambda(methodName, moduleName, args, LambdaN(inputs, body)) when (List.length inputs) = (List.length args) -> 
  +    let inputsAndArgs = List.zip inputs args
  +    let inlinedBody = body.Substitute(fun v2 -> inputsAndArgs |> List.tryFind (fun (v, a) -> v = v2) |> Option.map snd)
       let renamedBody = variableRenaming inlinedBody []
       //let renamedBody = inlinedBody
       Some(renamedBody)
  -  | _ -> None
  -
  -let methodDefToLambda (e: Expr): Expr Option = 
  -  match e with
  -  | ExistingCompiledMethodWithLambda(methodName, moduleName, args, lam) -> 
  -      Some(Expr.Applications(lam, List.map (fun x -> [x]) args))
  -  | _ -> None
  -
  -let lambdaAppToLet (e: Expr): Expr Option = 
  -  match e with
  -  | AppN(LambdaN(inputs, body), args) when (List.length inputs) = (List.length args) -> 
  -      Some(LetN(List.zip inputs args, body))
     | _ -> None
   
   open FSharp.Quotations.Evaluator
  
positive.code:     %a - (%b + %c)
    @>
  
  let vectorBuildGet_exp = 
    <@
      (vectorBuild %k %FIN).[%i]
  
negative.code:     %i + (%j - %k)
    @>
  
  let assocSubAddIndex_exp = 
    <@
      (%i - %j) + %k
      <==>
      %i - (%j - %k)
    @>
  
  let assocSubSubIndex_exp = 
    <@
      (%i - %j) - %k
      <==>
      %i - (%j + %k)
    @>
  
  let subSameIndex_exp = 
    <@
      %i - %i
  