Alpha equivalence for LCNF Code
@[reducible, inline]
Instances For
Equations
- Lean.Compiler.LCNF.AlphaEqv.eqvFVar fvarId₁ fvarId₂ = do let __do_lift ← read let fvarId₂ : Lean.FVarId := (Lean.RBMap.find? __do_lift fvarId₂).getD fvarId₂ pure (fvarId₁ == fvarId₂)
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Compiler.LCNF.AlphaEqv.eqvArg (Lean.Compiler.LCNF.Arg.type e₁) (Lean.Compiler.LCNF.Arg.type e₂) = Lean.Compiler.LCNF.AlphaEqv.eqvType e₁ e₂
- Lean.Compiler.LCNF.AlphaEqv.eqvArg (Lean.Compiler.LCNF.Arg.fvar x₁) (Lean.Compiler.LCNF.Arg.fvar x₂) = Lean.Compiler.LCNF.AlphaEqv.eqvFVar x₁ x₂
- Lean.Compiler.LCNF.AlphaEqv.eqvArg Lean.Compiler.LCNF.Arg.erased Lean.Compiler.LCNF.Arg.erased = pure true
- Lean.Compiler.LCNF.AlphaEqv.eqvArg a₁ a₂ = pure false
Instances For
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.
- Lean.Compiler.LCNF.AlphaEqv.eqvLetValue (Lean.Compiler.LCNF.LetValue.value v₁) (Lean.Compiler.LCNF.LetValue.value v₂) = pure (v₁ == v₂)
- Lean.Compiler.LCNF.AlphaEqv.eqvLetValue Lean.Compiler.LCNF.LetValue.erased Lean.Compiler.LCNF.LetValue.erased = pure true
- Lean.Compiler.LCNF.AlphaEqv.eqvLetValue e₁ e₂ = pure false
Instances For
@[inline]
def
Lean.Compiler.LCNF.AlphaEqv.withFVar
{α : Type}
(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) => x.insert fvarId₂ fvarId₁) x
Instances For
@[inline]
def
Lean.Compiler.LCNF.AlphaEqv.withParams
(params₁ params₂ : Array Lean.Compiler.LCNF.Param)
(x : Lean.Compiler.LCNF.AlphaEqv.EqvM Bool)
:
Equations
- Lean.Compiler.LCNF.AlphaEqv.withParams params₁ params₂ x = if h : params₂.size = params₁.size then Lean.Compiler.LCNF.AlphaEqv.withParams.go params₁ params₂ x h 0 else pure false
Instances For
@[irreducible, specialize #[]]
def
Lean.Compiler.LCNF.AlphaEqv.withParams.go
(params₁ params₂ : Array Lean.Compiler.LCNF.Param)
(x : Lean.Compiler.LCNF.AlphaEqv.EqvM Bool)
(h : params₂.size = params₁.size)
(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
Return true
if c₁
and c₂
are alpha equivalent.
Equations
- c₁.alphaEqv c₂ = ReaderT.run (Lean.Compiler.LCNF.AlphaEqv.eqv c₁ c₂) ∅