Equations
- (Lean.Compiler.LCNF.Simp.CtorInfo.ctor val args).getName = val.name
- (Lean.Compiler.LCNF.Simp.CtorInfo.natVal 0).getName = `Nat.zero
- (Lean.Compiler.LCNF.Simp.CtorInfo.natVal n).getName = `Nat.succ
Equations
A mapping from discriminant to constructor application it is equal to in the current context.
- ctorDiscrMap : PersistentExprMap FVarId
A mapping from constructor application to discriminant it is equal to in the current context.
Helper monad for tracking mappings from discriminant to constructor applications and back.
The combinator withDiscrCtor
should be used when visiting cases
alternatives.
If fvarId
is a constructor application, returns constructor information.
Remark: we use the map discrCtorMap
.
Remark: We use this method when simplifying projections and cases-constructor.
Equations
- One or more equations did not get rendered due to their size.
Execute x
with the information that discr = ctorName ctorFields
.
We use this information to simplify nested cases on the same discriminant.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Execute x
with the information that discr = ctorName ctorFields
.
We use this information to simplify nested cases on the same discriminant.
Equations
- Lean.Compiler.LCNF.Simp.withDiscrCtor discr ctorName ctorFields = monadMap fun {β : Type} => Lean.Compiler.LCNF.Simp.withDiscrCtorImp discr ctorName ctorFields