File: .lake/packages/lean4/src/lean/Lean/Meta/Canonicalizer.lean

full_name: Lean.Meta.Canonicalizer.instInhabitedExprVisited
code: /--
Auxiliary structure for creating a pointer-equality.
-/
structure ExprVisited where
  e : Expr
  deriving Inhabited
goal: Inhabited Lean.Meta.Canonicalizer.ExprVisited

full_name: Lean.Meta.Canonicalizer.ExprVisited.e
code: /--
Auxiliary structure for creating a pointer-equality.
-/
structure ExprVisited where
  e : Expr
  deriving Inhabited
goal: Lean.Expr

full_name: Lean.Meta.Canonicalizer.ExprVisited
code: /--
Auxiliary structure for creating a pointer-equality.
-/
structure ExprVisited where
  e : Expr
  deriving Inhabited
goal: Type

full_name: Lean.Meta.Canonicalizer.instBEqExprVisited
code: unsafe instance : BEq ExprVisited 
goal: BEq Lean.Meta.Canonicalizer.ExprVisited

full_name: Lean.Meta.Canonicalizer.instHashableExprVisited
code: unsafe instance : Hashable ExprVisited 
goal: Hashable Lean.Meta.Canonicalizer.ExprVisited

full_name: Lean.Meta.Canonicalizer.State.keyToExprs
code: /--
State for the `CanonM` monad.
-/
structure State where
  /-- Mapping from `Expr` to hash. -/
  -- We use `HashMapImp` to ensure we don't have to tag `State` as `unsafe`.
  cache      : HashMapImp ExprVisited UInt64 := mkHashMapImp
  /--
  Given a hashcode `k` and `keyToExprs.find? h = some es`, we have that all `es` have hashcode `k`, and
  are not definitionally equal modulo the transparency setting used. -/
  keyToExprs : HashMap UInt64 (List Expr) := mkHashMap
goal: Lean.HashMap UInt64 (List Lean.Expr)

full_name: Lean.Meta.Canonicalizer.State.cache
code: /--
State for the `CanonM` monad.
-/
structure State where
  /-- Mapping from `Expr` to hash. -/
  -- We use `HashMapImp` to ensure we don't have to tag `State` as `unsafe`.
  cache      : HashMapImp ExprVisited UInt64 := mkHashMapImp
  /--
  Given a hashcode `k` and `keyToExprs.find? h = some es`, we have that all `es` have hashcode `k`, and
  are not definitionally equal modulo the transparency setting used. -/
  keyToExprs : HashMap UInt64 (List Expr) := mkHashMap
goal: Lean.HashMapImp Lean.Meta.Canonicalizer.ExprVisited UInt64

full_name: Lean.Meta.Canonicalizer.State
code: /--
State for the `CanonM` monad.
-/
structure State where
  /-- Mapping from `Expr` to hash. -/
  -- We use `HashMapImp` to ensure we don't have to tag `State` as `unsafe`.
  cache      : HashMapImp ExprVisited UInt64 := mkHashMapImp
  /--
  Given a hashcode `k` and `keyToExprs.find? h = some es`, we have that all `es` have hashcode `k`, and
  are not definitionally equal modulo the transparency setting used. -/
  keyToExprs : HashMap UInt64 (List Expr) := mkHashMap
goal: Type

full_name: Lean.Meta.Canonicalizer.instInhabitedState
code: instance : Inhabited State 
goal: Inhabited Lean.Meta.Canonicalizer.State

full_name: Lean.Meta.Canonicalizer.CanonM
code: abbrev CanonM 
goal: Type

full_name: Lean.Meta.Canonicalizer.CanonM.run'
code: /--
The definitionally equality tests are performed using the given transparency mode.
We claim `TransparencyMode.instances` is a good setting for most applications.
-/
def CanonM.run' (x : CanonM α) (transparency := TransparencyMode.instances) (s : State := {}) : MetaM α 
goal: Lean.MetaM α

full_name: Lean.Meta.Canonicalizer.CanonM.run
code: def CanonM.run (x : CanonM α) (transparency := TransparencyMode.instances) (s : State := {}) : MetaM (α × State) 
goal: Lean.MetaM (α × Lean.Meta.Canonicalizer.State)

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Meta.Canonicalizer.0.Lean.Meta.Canonicalizer.mkKey
code: private partial def mkKey (e : Expr) : CanonM UInt64 
goal: Lean.Meta.CanonM UInt64

full_name: Lean.Meta.Canonicalizer.canon
code: /--
"Canonicalize" the given expression.
-/
def canon (e : Expr) : CanonM Expr 
goal: Lean.Meta.CanonM Lean.Expr