Offset representation for natural number expressions #
This module provides utilities for representing Nat expressions in the form e + k,
where e is an arbitrary expression and k is a constant.
This normalization is used during pattern matching and unification.
Equations
Increments the constant part of the offset by k'.
Equations
- (Lean.Meta.Sym.Offset.num k).inc x✝ = Lean.Meta.Sym.Offset.num (k + x✝)
- (Lean.Meta.Sym.Offset.add e k).inc x✝ = Lean.Meta.Sym.Offset.add e (k + x✝)
Instances For
Returns true if e is an offset term.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Variant of isOffset? that first checks if declName is Nat.succ or HAdd.hAdd.
Equations
- Lean.Meta.Sym.isOffset' declName p = ((declName == `Nat.succ || declName == `HAdd.hAdd) && Lean.Meta.Sym.isOffset p)