Some tactics substitute hypotheses with expressions.
We track these substitutions using FVarSubst
.
It is just a mapping from the original FVarId (internal) name
to an expression. The free variables occurring in the expression must
be defined in the new goal.
Instances For
Equations
- Lean.Meta.instInhabitedFVarSubst = { default := { map := default } }
Equations
- Lean.Meta.FVarSubst.empty = { map := ∅ }
Instances For
Equations
Instances For
Equations
- Lean.Meta.FVarSubst.contains s fvarId = Lean.AssocList.contains fvarId s.map
Instances For
Add entry fvarId |-> v
to s
if s
does not contain an entry for fvarId
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.FVarSubst.erase s fvarId = { map := Lean.AssocList.erase fvarId s.map }
Instances For
Equations
- Lean.Meta.FVarSubst.find? s fvarId = Lean.AssocList.find? fvarId s.map
Instances For
Equations
- Lean.Meta.FVarSubst.get s fvarId = match Lean.AssocList.find? fvarId s.map with | none => Lean.mkFVar fvarId | some v => v
Instances For
Given e
, for each (x => v)
in s
replace x
with v
in e
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.FVarSubst.domain s = Lean.AssocList.foldl (fun r k x => k :: r) [] s.map
Instances For
Equations
- Lean.Meta.FVarSubst.any p s = Lean.AssocList.any p s.map
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline, reducible]