Alpha equivalence for LCNF Code
@[inline, reducible]
Instances For
Equations
- Lean.Compiler.LCNF.AlphaEqv.eqvFVar fvarId₁ fvarId₂ = do let __do_lift ← read let fvarId₂ : Lean.FVarId := Option.getD (Lean.RBMap.find? __do_lift fvarId₂) fvarId₂ pure (fvarId₁ == fvarId₂)
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Compiler.LCNF.AlphaEqv.eqvArg
(a₁ : Lean.Compiler.LCNF.Arg)
(a₂ : Lean.Compiler.LCNF.Arg)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Compiler.LCNF.AlphaEqv.eqvArgs
(as₁ : Array Lean.Compiler.LCNF.Arg)
(as₂ : Array Lean.Compiler.LCNF.Arg)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Compiler.LCNF.AlphaEqv.eqvLetValue
(e₁ : Lean.Compiler.LCNF.LetValue)
(e₂ : Lean.Compiler.LCNF.LetValue)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
def
Lean.Compiler.LCNF.AlphaEqv.withFVar
{α : Type}
(fvarId₁ : Lean.FVarId)
(fvarId₂ : Lean.FVarId)
(x : Lean.Compiler.LCNF.AlphaEqv.EqvM α)
:
Equations
- Lean.Compiler.LCNF.AlphaEqv.withFVar fvarId₁ fvarId₂ x = withReader (fun (x : Lean.FVarIdMap Lean.FVarId) => Lean.FVarIdMap.insert x fvarId₂ fvarId₁) x
Instances For
@[inline]
def
Lean.Compiler.LCNF.AlphaEqv.withParams
(params₁ : Array Lean.Compiler.LCNF.Param)
(params₂ : Array Lean.Compiler.LCNF.Param)
(x : Lean.Compiler.LCNF.AlphaEqv.EqvM Bool)
:
Equations
- Lean.Compiler.LCNF.AlphaEqv.withParams params₁ params₂ x = if h : Array.size params₂ = Array.size params₁ then Lean.Compiler.LCNF.AlphaEqv.withParams.go params₁ params₂ x h 0 else pure false
Instances For
@[specialize #[]]
def
Lean.Compiler.LCNF.AlphaEqv.withParams.go
(params₁ : Array Lean.Compiler.LCNF.Param)
(params₂ : Array Lean.Compiler.LCNF.Param)
(x : Lean.Compiler.LCNF.AlphaEqv.EqvM Bool)
(h : Array.size params₂ = Array.size params₁)
(i : Nat)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
partial def
Lean.Compiler.LCNF.AlphaEqv.eqvAlts
(alts₁ : Array Lean.Compiler.LCNF.Alt)
(alts₂ : Array Lean.Compiler.LCNF.Alt)
:
partial def
Lean.Compiler.LCNF.AlphaEqv.eqv
(code₁ : Lean.Compiler.LCNF.Code)
(code₂ : Lean.Compiler.LCNF.Code)
:
def
Lean.Compiler.LCNF.Code.alphaEqv
(c₁ : Lean.Compiler.LCNF.Code)
(c₂ : Lean.Compiler.LCNF.Code)
:
Return true
if c₁
and c₂
are alpha equivalent.