File: .lake/packages/lean4/src/lean/Lean/Compiler/LCNF/ToLCNF.lean

full_name: Lean.Compiler.LCNF.ToLCNF.isLCProof
code: /--
Return `true` if `e` is a `lcProof` application.
Recall that we use `lcProof` to erase all nested proofs.
-/
def isLCProof (e : Expr) : Bool 
goal: Bool

full_name: Lean.Compiler.LCNF.ToLCNF.mkLcProof
code: /-- Create the temporary `lcProof` -/
def mkLcProof (p : Expr) 
goal: Lean.Expr

full_name: Lean.Compiler.LCNF.ToLCNF.Element.let
code: /--
Auxiliary inductive datatype for constructing LCNF `Code` objects.
The `toLCNF` function maintains a sequence of elements that is eventually
converted into `Code`.
-/
inductive Element where
  | jp  (decl : FunDecl)
  | fun (decl : FunDecl)
  | let (decl : LetDecl)
  | cases (p : Param) (cases : Cases)
  | unreach (p : Param)
  deriving Inhabited
goal: Lean.Compiler.LCNF.ToLCNF.Element

full_name: Lean.Compiler.LCNF.ToLCNF.Element
code: /--
Auxiliary inductive datatype for constructing LCNF `Code` objects.
The `toLCNF` function maintains a sequence of elements that is eventually
converted into `Code`.
-/
inductive Element where
  | jp  (decl : FunDecl)
  | fun (decl : FunDecl)
  | let (decl : LetDecl)
  | cases (p : Param) (cases : Cases)
  | unreach (p : Param)
  deriving Inhabited
goal: Type

full_name: Lean.Compiler.LCNF.ToLCNF.Element.cases
code: /--
Auxiliary inductive datatype for constructing LCNF `Code` objects.
The `toLCNF` function maintains a sequence of elements that is eventually
converted into `Code`.
-/
inductive Element where
  | jp  (decl : FunDecl)
  | fun (decl : FunDecl)
  | let (decl : LetDecl)
  | cases (p : Param) (cases : Cases)
  | unreach (p : Param)
  deriving Inhabited
goal: Lean.Compiler.LCNF.ToLCNF.Element

full_name: Lean.Compiler.LCNF.ToLCNF.Element.unreach
code: /--
Auxiliary inductive datatype for constructing LCNF `Code` objects.
The `toLCNF` function maintains a sequence of elements that is eventually
converted into `Code`.
-/
inductive Element where
  | jp  (decl : FunDecl)
  | fun (decl : FunDecl)
  | let (decl : LetDecl)
  | cases (p : Param) (cases : Cases)
  | unreach (p : Param)
  deriving Inhabited
goal: Lean.Compiler.LCNF.ToLCNF.Element

full_name: Lean.Compiler.LCNF.ToLCNF.instInhabitedElement
code: /--
Auxiliary inductive datatype for constructing LCNF `Code` objects.
The `toLCNF` function maintains a sequence of elements that is eventually
converted into `Code`.
-/
inductive Element where
  | jp  (decl : FunDecl)
  | fun (decl : FunDecl)
  | let (decl : LetDecl)
  | cases (p : Param) (cases : Cases)
  | unreach (p : Param)
  deriving Inhabited
goal: Inhabited Lean.Compiler.LCNF.ToLCNF.Element

full_name: Lean.Compiler.LCNF.ToLCNF.Element.fun
code: /--
Auxiliary inductive datatype for constructing LCNF `Code` objects.
The `toLCNF` function maintains a sequence of elements that is eventually
converted into `Code`.
-/
inductive Element where
  | jp  (decl : FunDecl)
  | fun (decl : FunDecl)
  | let (decl : LetDecl)
  | cases (p : Param) (cases : Cases)
  | unreach (p : Param)
  deriving Inhabited
goal: Lean.Compiler.LCNF.ToLCNF.Element

full_name: Lean.Compiler.LCNF.ToLCNF.Element.jp
code: /--
Auxiliary inductive datatype for constructing LCNF `Code` objects.
The `toLCNF` function maintains a sequence of elements that is eventually
converted into `Code`.
-/
inductive Element where
  | jp  (decl : FunDecl)
  | fun (decl : FunDecl)
  | let (decl : LetDecl)
  | cases (p : Param) (cases : Cases)
  | unreach (p : Param)
  deriving Inhabited
goal: Lean.Compiler.LCNF.ToLCNF.Element

full_name: Lean.Compiler.LCNF.ToLCNF.BindCasesM.State
code: /--
State for `BindCasesM` monad
Mapping from `_alt.<idx>` variables to new join points
-/
abbrev BindCasesM.State 
goal: Type

full_name: Lean.Compiler.LCNF.ToLCNF.BindCasesM
code: /-- Auxiliary monad for implementing `bindCases` -/
abbrev BindCasesM 
goal: Type

full_name: Lean.Compiler.LCNF.ToLCNF.bindCases.findFun?
code: /--
This method returns code that at each exit point of `cases`, it jumps to `jpDecl`.
It is similar to `Code.bind`, but we add special support for `inlineMatcher`.
The `inlineMatcher` function inlines the auxiliary `_match_<idx>` declarations.
To make sure there is no code duplication, `inlineMatcher` creates auxiliary declarations `_alt.<idx>`.
We can say the `_alt.<idx>` declarations are pre join points. For each auxiliary declaration used at
an exit point of `cases`, this method creates an new auxiliary join point that invokes `_alt.<idx>`,
and then jumps to `jpDecl`. The goal is to make sure the auxiliary join point is the only occurrence
of `_alt.<idx>`, then `simp` will inline it.
That is, our goal is to try to promote the pre join points `_alt.<idx>` into a proper join point.
-/
partial def bindCases (jpDecl : FunDecl) (cases : Cases) : CompilerM Code 
goal: Lean.Compiler.LCNF.CompilerM (Option Lean.Compiler.LCNF.FunDecl)

full_name: Lean.Compiler.LCNF.ToLCNF.bindCases.visitAlts
code: /--
This method returns code that at each exit point of `cases`, it jumps to `jpDecl`.
It is similar to `Code.bind`, but we add special support for `inlineMatcher`.
The `inlineMatcher` function inlines the auxiliary `_match_<idx>` declarations.
To make sure there is no code duplication, `inlineMatcher` creates auxiliary declarations `_alt.<idx>`.
We can say the `_alt.<idx>` declarations are pre join points. For each auxiliary declaration used at
an exit point of `cases`, this method creates an new auxiliary join point that invokes `_alt.<idx>`,
and then jumps to `jpDecl`. The goal is to make sure the auxiliary join point is the only occurrence
of `_alt.<idx>`, then `simp` will inline it.
That is, our goal is to try to promote the pre join points `_alt.<idx>` into a proper join point.
-/
partial def bindCases (jpDecl : FunDecl) (cases : Cases) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.BindCasesM (Array Lean.Compiler.LCNF.Alt)

full_name: Lean.Compiler.LCNF.ToLCNF.bindCases
code: /--
This method returns code that at each exit point of `cases`, it jumps to `jpDecl`.
It is similar to `Code.bind`, but we add special support for `inlineMatcher`.
The `inlineMatcher` function inlines the auxiliary `_match_<idx>` declarations.
To make sure there is no code duplication, `inlineMatcher` creates auxiliary declarations `_alt.<idx>`.
We can say the `_alt.<idx>` declarations are pre join points. For each auxiliary declaration used at
an exit point of `cases`, this method creates an new auxiliary join point that invokes `_alt.<idx>`,
and then jumps to `jpDecl`. The goal is to make sure the auxiliary join point is the only occurrence
of `_alt.<idx>`, then `simp` will inline it.
That is, our goal is to try to promote the pre join points `_alt.<idx>` into a proper join point.
-/
partial def bindCases (jpDecl : FunDecl) (cases : Cases) : CompilerM Code 
goal: Lean.Compiler.LCNF.CompilerM Lean.Compiler.LCNF.Code

full_name: Lean.Compiler.LCNF.ToLCNF.bindCases.go
code: /--
This method returns code that at each exit point of `cases`, it jumps to `jpDecl`.
It is similar to `Code.bind`, but we add special support for `inlineMatcher`.
The `inlineMatcher` function inlines the auxiliary `_match_<idx>` declarations.
To make sure there is no code duplication, `inlineMatcher` creates auxiliary declarations `_alt.<idx>`.
We can say the `_alt.<idx>` declarations are pre join points. For each auxiliary declaration used at
an exit point of `cases`, this method creates an new auxiliary join point that invokes `_alt.<idx>`,
and then jumps to `jpDecl`. The goal is to make sure the auxiliary join point is the only occurrence
of `_alt.<idx>`, then `simp` will inline it.
That is, our goal is to try to promote the pre join points `_alt.<idx>` into a proper join point.
-/
partial def bindCases (jpDecl : FunDecl) (cases : Cases) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.BindCasesM Lean.Compiler.LCNF.Code

full_name: Lean.Compiler.LCNF.ToLCNF.seqToCode.go
code: def seqToCode (seq : Array Element) (k : Code) : CompilerM Code 
goal: Lean.Compiler.LCNF.CompilerM Lean.Compiler.LCNF.Code

full_name: Lean.Compiler.LCNF.ToLCNF.seqToCode
code: def seqToCode (seq : Array Element) (k : Code) : CompilerM Code 
goal: Lean.Compiler.LCNF.CompilerM Lean.Compiler.LCNF.Code

full_name: Lean.Compiler.LCNF.ToLCNF.State.typeCache
code: structure State where
  /-- Local context containing the original Lean types (not LCNF ones). -/
  lctx : LocalContext := {}
  /-- Cache from Lean regular expression to LCNF argument. -/
  cache : PHashMap Expr Arg := {}
  /-- `toLCNFType` cache -/
  typeCache : HashMap Expr Expr := {}
  /-- isTypeFormerType cache -/
  isTypeFormerTypeCache : HashMap Expr Bool := {}
  /-- LCNF sequence, we chain it to create a LCNF `Code` object. -/
  seq : Array Element := #[]
  /--
  Fields that are type formers must be replaced with `◾`
  in the resulting code. Otherwise, we have data occurring in
  types.
  When converting a `casesOn` into LCNF, we add constructor fields
  that are types and type formers into this set. See `visitCases`.
  -/
  toAny : FVarIdSet := {}
goal: Lean.HashMap Lean.Expr Lean.Expr

full_name: Lean.Compiler.LCNF.ToLCNF.State.cache
code: structure State where
  /-- Local context containing the original Lean types (not LCNF ones). -/
  lctx : LocalContext := {}
  /-- Cache from Lean regular expression to LCNF argument. -/
  cache : PHashMap Expr Arg := {}
  /-- `toLCNFType` cache -/
  typeCache : HashMap Expr Expr := {}
  /-- isTypeFormerType cache -/
  isTypeFormerTypeCache : HashMap Expr Bool := {}
  /-- LCNF sequence, we chain it to create a LCNF `Code` object. -/
  seq : Array Element := #[]
  /--
  Fields that are type formers must be replaced with `◾`
  in the resulting code. Otherwise, we have data occurring in
  types.
  When converting a `casesOn` into LCNF, we add constructor fields
  that are types and type formers into this set. See `visitCases`.
  -/
  toAny : FVarIdSet := {}
goal: Lean.PHashMap Lean.Expr Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.State.isTypeFormerTypeCache
code: structure State where
  /-- Local context containing the original Lean types (not LCNF ones). -/
  lctx : LocalContext := {}
  /-- Cache from Lean regular expression to LCNF argument. -/
  cache : PHashMap Expr Arg := {}
  /-- `toLCNFType` cache -/
  typeCache : HashMap Expr Expr := {}
  /-- isTypeFormerType cache -/
  isTypeFormerTypeCache : HashMap Expr Bool := {}
  /-- LCNF sequence, we chain it to create a LCNF `Code` object. -/
  seq : Array Element := #[]
  /--
  Fields that are type formers must be replaced with `◾`
  in the resulting code. Otherwise, we have data occurring in
  types.
  When converting a `casesOn` into LCNF, we add constructor fields
  that are types and type formers into this set. See `visitCases`.
  -/
  toAny : FVarIdSet := {}
goal: Lean.HashMap Lean.Expr Bool

full_name: Lean.Compiler.LCNF.ToLCNF.State
code: structure State where
  /-- Local context containing the original Lean types (not LCNF ones). -/
  lctx : LocalContext := {}
  /-- Cache from Lean regular expression to LCNF argument. -/
  cache : PHashMap Expr Arg := {}
  /-- `toLCNFType` cache -/
  typeCache : HashMap Expr Expr := {}
  /-- isTypeFormerType cache -/
  isTypeFormerTypeCache : HashMap Expr Bool := {}
  /-- LCNF sequence, we chain it to create a LCNF `Code` object. -/
  seq : Array Element := #[]
  /--
  Fields that are type formers must be replaced with `◾`
  in the resulting code. Otherwise, we have data occurring in
  types.
  When converting a `casesOn` into LCNF, we add constructor fields
  that are types and type formers into this set. See `visitCases`.
  -/
  toAny : FVarIdSet := {}
goal: Type

full_name: Lean.Compiler.LCNF.ToLCNF.State.lctx
code: structure State where
  /-- Local context containing the original Lean types (not LCNF ones). -/
  lctx : LocalContext := {}
  /-- Cache from Lean regular expression to LCNF argument. -/
  cache : PHashMap Expr Arg := {}
  /-- `toLCNFType` cache -/
  typeCache : HashMap Expr Expr := {}
  /-- isTypeFormerType cache -/
  isTypeFormerTypeCache : HashMap Expr Bool := {}
  /-- LCNF sequence, we chain it to create a LCNF `Code` object. -/
  seq : Array Element := #[]
  /--
  Fields that are type formers must be replaced with `◾`
  in the resulting code. Otherwise, we have data occurring in
  types.
  When converting a `casesOn` into LCNF, we add constructor fields
  that are types and type formers into this set. See `visitCases`.
  -/
  toAny : FVarIdSet := {}
goal: Lean.LocalContext

full_name: Lean.Compiler.LCNF.ToLCNF.State.seq
code: structure State where
  /-- Local context containing the original Lean types (not LCNF ones). -/
  lctx : LocalContext := {}
  /-- Cache from Lean regular expression to LCNF argument. -/
  cache : PHashMap Expr Arg := {}
  /-- `toLCNFType` cache -/
  typeCache : HashMap Expr Expr := {}
  /-- isTypeFormerType cache -/
  isTypeFormerTypeCache : HashMap Expr Bool := {}
  /-- LCNF sequence, we chain it to create a LCNF `Code` object. -/
  seq : Array Element := #[]
  /--
  Fields that are type formers must be replaced with `◾`
  in the resulting code. Otherwise, we have data occurring in
  types.
  When converting a `casesOn` into LCNF, we add constructor fields
  that are types and type formers into this set. See `visitCases`.
  -/
  toAny : FVarIdSet := {}
goal: Array Lean.Compiler.LCNF.ToLCNF.Element

full_name: Lean.Compiler.LCNF.ToLCNF.State.toAny
code: structure State where
  /-- Local context containing the original Lean types (not LCNF ones). -/
  lctx : LocalContext := {}
  /-- Cache from Lean regular expression to LCNF argument. -/
  cache : PHashMap Expr Arg := {}
  /-- `toLCNFType` cache -/
  typeCache : HashMap Expr Expr := {}
  /-- isTypeFormerType cache -/
  isTypeFormerTypeCache : HashMap Expr Bool := {}
  /-- LCNF sequence, we chain it to create a LCNF `Code` object. -/
  seq : Array Element := #[]
  /--
  Fields that are type formers must be replaced with `◾`
  in the resulting code. Otherwise, we have data occurring in
  types.
  When converting a `casesOn` into LCNF, we add constructor fields
  that are types and type formers into this set. See `visitCases`.
  -/
  toAny : FVarIdSet := {}
goal: Lean.FVarIdSet

full_name: Lean.Compiler.LCNF.ToLCNF.M
code: abbrev M 
goal: Type

full_name: Lean.Compiler.LCNF.ToLCNF.liftMetaM
code: @[inline] def liftMetaM (x : MetaM α) : M α 
goal: Lean.Compiler.LCNF.ToLCNF.M α

full_name: Lean.Compiler.LCNF.ToLCNF.pushElement
code: /-- Add LCNF element to the current sequence -/
def pushElement (elem : Element) : M Unit 
goal: Lean.Compiler.LCNF.ToLCNF.M Unit

full_name: Lean.Compiler.LCNF.ToLCNF.mkUnreachable
code: def mkUnreachable (type : Expr) : M Arg 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.mkAuxLetDecl
code: def mkAuxLetDecl (e : LetValue) (prefixName := `_x) : M FVarId 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.FVarId

full_name: Lean.Compiler.LCNF.ToLCNF.letValueToArg
code: def letValueToArg (e : LetValue) (prefixName := `_x) : M Arg 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toCode
code: /-- Create `Code` that executes the current `seq` and then returns `result` -/
def toCode (result : Arg) : M Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Code

full_name: Lean.Compiler.LCNF.ToLCNF.run
code: def run (x : M α) : CompilerM α 
goal: Lean.Compiler.LCNF.CompilerM α

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.LCNF.ToLCNF.0.Lean.Compiler.LCNF.ToLCNF.isTypeFormerType.quick
code: /--
Return true iff `type` is `Sort _` or `As → Sort _`.
-/
private partial def isTypeFormerType (type : Expr) : M Bool 
goal: Lean.Expr → Lean.LBool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.LCNF.ToLCNF.0.Lean.Compiler.LCNF.ToLCNF.isTypeFormerType
code: /--
Return true iff `type` is `Sort _` or `As → Sort _`.
-/
private partial def isTypeFormerType (type : Expr) : M Bool 
goal: Lean.Compiler.LCNF.ToLCNF.M Bool

full_name: Lean.Compiler.LCNF.ToLCNF.withNewScope
code: def withNewScope (x : M α) : M α 
goal: Lean.Compiler.LCNF.ToLCNF.M α

full_name: Lean.Compiler.LCNF.ToLCNF.applyToAny
code: def applyToAny (type : Expr) : M Expr 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Expr

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNFType
code: def toLCNFType (type : Expr) : M Expr 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Expr

full_name: Lean.Compiler.LCNF.ToLCNF.cleanupBinderName
code: def cleanupBinderName (binderName : Name) : CompilerM Name 
goal: Lean.Compiler.LCNF.CompilerM Lean.Name

full_name: Lean.Compiler.LCNF.ToLCNF.mkParam
code: /-- Create a new local declaration using a Lean regular type. -/
def mkParam (binderName : Name) (type : Expr) : M Param 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Param

full_name: Lean.Compiler.LCNF.ToLCNF.mkLetDecl
code: def mkLetDecl (binderName : Name) (type : Expr) (value : Expr) (type' : Expr) (arg : Arg) : M LetDecl 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.LetDecl

full_name: Lean.Compiler.LCNF.ToLCNF.visitLambda.go
code: def visitLambda (e : Expr) : M (Array Param × Expr) 
goal: Lean.Compiler.LCNF.ToLCNF.M (Array Lean.Compiler.LCNF.Param × Lean.Expr)

full_name: Lean.Compiler.LCNF.ToLCNF.visitLambda
code: def visitLambda (e : Expr) : M (Array Param × Expr) 
goal: Lean.Compiler.LCNF.ToLCNF.M (Array Lean.Compiler.LCNF.Param × Lean.Expr)

full_name: Lean.Compiler.LCNF.ToLCNF.visitBoundedLambda.go
code: def visitBoundedLambda (e : Expr) (n : Nat) : M (Array Param × Expr) 
goal: Lean.Compiler.LCNF.ToLCNF.M (Array Lean.Compiler.LCNF.Param × Lean.Expr)

full_name: Lean.Compiler.LCNF.ToLCNF.visitBoundedLambda
code: def visitBoundedLambda (e : Expr) (n : Nat) : M (Array Param × Expr) 
goal: Lean.Compiler.LCNF.ToLCNF.M (Array Lean.Compiler.LCNF.Param × Lean.Expr)

full_name: Lean.Compiler.LCNF.ToLCNF.mustEtaExpand
code: def mustEtaExpand (env : Environment) (e : Expr) : Bool 
goal: Bool

full_name: Lean.Compiler.LCNF.ToLCNF.etaExpandN
code: /--
Eta-expand with `n` lambdas.
-/
def etaExpandN (e : Expr) (n : Nat) : M Expr 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Expr

full_name: Lean.Compiler.LCNF.ToLCNF.etaReduceImplicit
code: /--
Eta reduce implicits. We use this function to eliminate introduced by the implicit lambda feature,
where it generates terms such as `fun {α} => ReaderT.pure`
-/
partial def etaReduceImplicit (e : Expr) : Expr 
goal: Lean.Expr

full_name: Lean.Compiler.LCNF.ToLCNF.litToValue
code: def litToValue (lit : Literal) : LitValue 
goal: Lean.Compiler.LCNF.LitValue

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.visitAppArg
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.visitFalseRec
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.visitCases
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.visitCtor
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.visitAndIffRecCore
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.visitQuotLift
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.visitMData
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.visitProjFn
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.visitNoConfusion
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.mkOverApplication
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.visitCore
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.visit
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.etaIfUnderApplied
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.visitProj
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.visitLet
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.visitAppDefaultConst
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.visitApp
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.CompilerM Lean.Compiler.LCNF.Code

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.visitLit
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.visitLambda
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.visitAlt
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M (Lean.Expr × Lean.Compiler.LCNF.Alt)

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.visitEqRec
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Compiler.LCNF.Arg

full_name: Lean.Compiler.LCNF.ToLCNF.toLCNF.expandNoConfusionMajor
code: /--
Put the given expression in `LCNF`.

- Nested proofs are replaced with `lcProof`-applications.
- Eta-expand applications of declarations that satisfy `shouldEtaExpand`.
- Put computationally relevant expressions in A-normal form.
-/
partial def toLCNF (e : Expr) : CompilerM Code 
goal: Lean.Compiler.LCNF.ToLCNF.M Lean.Expr