This module contains the basic preprocessing pipeline framework for bv_normalize.
Equations
- One or more equations did not get rendered due to their size.
Instances For
- mvarIdTarget (mvar : MVarId) : Target
- grindTarget (goal : Grind.Goal) : Target
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
The various kinds of matches supported by the match to cond infrastructure.
- simpleEnum
(info : InductiveVal)
(ctors : Array ConstructorVal)
: MatchKind
It is a full match statement on an enum inductive with one constructor handled per arm. The ctors are listed in the order they occur in the match statement in
ctors. - enumWithDefault
(info : InductiveVal)
(ctors : Array ConstructorVal)
: MatchKind
It is a match statement on an enum inductive with a default arm, all explicitly handled ctors are listed in
ctorsin the order they occur in the match statement.
Instances For
The enum inductive that the match discriminates on.
Equations
- (Lean.Meta.Tactic.BVDecide.Normalize.MatchKind.simpleEnum info ctors).getEnumInfo = info
- (Lean.Meta.Tactic.BVDecide.Normalize.MatchKind.enumWithDefault info ctors).getEnumInfo = info
Instances For
Contains the result of the type analysis to be used in the structures and enums pass.
- interestingStructures : Std.HashSet Name
Structures that are interesting for the structures pass.
- interestingEnums : Std.HashSet Name
Inductives enums that are interesting for the enums pass.
- interestingMatchers : Std.HashMap Name MatchKind
func.match_xauxiliary declarations that we consider interesting. - uninteresting : Std.HashSet Name
Other types that we've seen that are not interesting, currently only used as a cache.
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.Normalize.instHashableHypSource.hash (Lean.Meta.Tactic.BVDecide.Normalize.HypSource.lctx a) = mixHash 0 (hash a)
- Lean.Meta.Tactic.BVDecide.Normalize.instHashableHypSource.hash (Lean.Meta.Tactic.BVDecide.Normalize.HypSource.enumDomain a) = mixHash 1 (hash a)
- Lean.Meta.Tactic.BVDecide.Normalize.instHashableHypSource.hash (Lean.Meta.Tactic.BVDecide.Normalize.HypSource.structureProjection a) = mixHash 2 (hash a)
- Lean.Meta.Tactic.BVDecide.Normalize.instHashableHypSource.hash a.andFlattened = mixHash 3 (Lean.Meta.Tactic.BVDecide.Normalize.instHashableHypSource.hash a)
- Lean.Meta.Tactic.BVDecide.Normalize.instHashableHypSource.hash Lean.Meta.Tactic.BVDecide.Normalize.HypSource.grind = 4
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Meta.Tactic.BVDecide.Normalize.instBEqHypSource.beq (Lean.Meta.Tactic.BVDecide.Normalize.HypSource.lctx a) (Lean.Meta.Tactic.BVDecide.Normalize.HypSource.lctx b) = (a == b)
- Lean.Meta.Tactic.BVDecide.Normalize.instBEqHypSource.beq (Lean.Meta.Tactic.BVDecide.Normalize.HypSource.enumDomain a) (Lean.Meta.Tactic.BVDecide.Normalize.HypSource.enumDomain b) = (a == b)
- Lean.Meta.Tactic.BVDecide.Normalize.instBEqHypSource.beq a.andFlattened b.andFlattened = Lean.Meta.Tactic.BVDecide.Normalize.instBEqHypSource.beq a b
- Lean.Meta.Tactic.BVDecide.Normalize.instBEqHypSource.beq Lean.Meta.Tactic.BVDecide.Normalize.HypSource.grind Lean.Meta.Tactic.BVDecide.Normalize.HypSource.grind = true
- Lean.Meta.Tactic.BVDecide.Normalize.instBEqHypSource.beq x✝¹ x✝ = false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Meta.Tactic.BVDecide.Normalize.instBEqHyp = { beq := fun (lhs rhs : Lean.Meta.Tactic.BVDecide.Normalize.Hyp) => lhs.type == rhs.type }
Equations
- Lean.Meta.Tactic.BVDecide.Normalize.instHashableHyp = { hash := fun (hyp : Lean.Meta.Tactic.BVDecide.Normalize.Hyp) => hash hyp.type }
Equations
- Lean.Meta.Tactic.BVDecide.Normalize.instToMessageDataHyp = { toMessageData := fun (hyp : Lean.Meta.Tactic.BVDecide.Normalize.Hyp) => Lean.toMessageData hyp.type }
The mode that the bv_normalize preprocessing pipeline runs in.
- solve
(restrictedTypes : Option (Array Name))
: Mode
A regular run as part of
bv_decideor a standalonebv_normalize.restrictedTypesare the types that the structure and enum analysis is restricted to, as provided by thetypesclause. If this isnonethe analysis discovers the relevant types on its own. - push : Mode
A run as part of
bv_decide_push. It merely prepares the caches of the passes for later runs of the pipeline on descendants of this goal and may thus only produce context independent information.
Instances For
Equations
Instances For
Equations
Instances For
Disables the configuration options that mode cannot support. In push mode these are the options
that either depend on the context (e.g. enums, structures) or require a more clever incrementality
scheme (e.g. embeddedConstraintSubst, andFlattening).
Equations
- One or more equations did not get rendered due to their size.
- (Lean.Meta.Tactic.BVDecide.Normalize.Mode.solve types).adjustConfig config = config
Instances For
The immutable context of the bv_normalize preprocessing pipeline. Use PreProcessContext.new to
create one.
- config : Elab.Tactic.BVDecide.BVDecideConfig
The configuration that the tactic was called with, already adjusted for
mode. - mode : Mode
The mode that the pipeline runs in.
Instances For
Creates the context for a run of the pipeline in mode, disabling all configuration options that
mode does not support.
Equations
- Lean.Meta.Tactic.BVDecide.Normalize.PreProcessContext.new mode config = { config := mode.adjustConfig config, mode := mode }
Instances For
Identifies the Sym.Simp cache that a pass operates on.
- rewrite : SimpCacheId
- ac : SimpCacheId
Instances For
Identifies the Sym.DSimp cache that a pass operates on.
- rewrite : DSimpCacheId
- reduction : DSimpCacheId
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.Normalize.SimpCacheId.rewrite.set x✝¹ x✝ = { reduction := x✝.reduction, rewriteSimp := x✝¹, rewriteDSimp := x✝.rewriteDSimp, ac := x✝.ac }
- Lean.Meta.Tactic.BVDecide.Normalize.SimpCacheId.ac.set x✝¹ x✝ = { reduction := x✝.reduction, rewriteSimp := x✝.rewriteSimp, rewriteDSimp := x✝.rewriteDSimp, ac := x✝¹ }
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.Normalize.DSimpCacheId.rewrite.set x✝¹ x✝ = { reduction := x✝.reduction, rewriteSimp := x✝.rewriteSimp, rewriteDSimp := x✝¹, ac := x✝.ac }
- Lean.Meta.Tactic.BVDecide.Normalize.DSimpCacheId.reduction.set x✝¹ x✝ = { reduction := x✝¹, rewriteSimp := x✝.rewriteSimp, rewriteDSimp := x✝.rewriteDSimp, ac := x✝.ac }
Instances For
- caches : Grind.BVDecide.Caches
The caches of the passes that maintain one.
- typeAnalysis : TypeAnalysis
Analysis results for the structure and enum pass if required.
- target : Target
The target we are operating on.
The set of hypotheses we are operating on. These should be interpreted from withing the lctx of the goal. But they may not necessarily be fvars registered in the goal.
- didChange : Bool
A didChange flag for our fixpoint simplification loop.
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.
- hyp.applySimpResult (Lean.Meta.Sym.Simp.Result.rfl done dep) = pure hyp
Instances For
Equations
- hyp.applyDSimpResult result = pure { name := hyp.name, type := Lean.Meta.Sym.DSimp.Result.getResultExpr hyp.type result, value := hyp.value, source := hyp.source }
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.Normalize.PreProcessM.getConfig = do let __do_lift ← read pure __do_lift.config
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.Normalize.PreProcessM.getRestrictedTypes = do let __do_lift ← read pure __do_lift.mode.restrictedTypes
Instances For
Equations
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.Normalize.PreProcessM.getTarget = do let __do_lift ← get pure __do_lift.target
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Runs x on the target if it is a grind goal and writes the updated goal back. Returns none if the
target is a plain MVarId.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Closes the target using falseProof : False. Grind targets are additionally marked as inconsistent
so that grind knows that there is nothing left to do for this goal.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.Normalize.PreProcessM.didChange = do let __do_lift ← get pure __do_lift.didChange
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.
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.Normalize.PreProcessM.getCaches = do let __do_lift ← get pure __do_lift.caches
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Drops the caches of all passes that maintain one. In bv_decide_push mode this is a no-op as the
caches are the very thing that we want to hand to the next invocation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.Normalize.PreProcessM.getTypeAnalysis = do let __do_lift ← get pure __do_lift.typeAnalysis
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.
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.
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.
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.Normalize.PreProcessM.run ctx target x = (ReaderT.run x ctx).run { target := target }
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.Normalize.PreProcessM.run' ctx target x = Prod.fst <$> Lean.Meta.Tactic.BVDecide.Normalize.PreProcessM.run ctx target x
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.
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.Normalize.PreProcessM.getHyps = do let __do_lift ← get pure __do_lift.hypotheses
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.
Instances For
Equations
Instances For
Equations
Instances For
Runs Sym.Simp on hyp, using the cache identified by cacheId and updating it in place.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Runs Sym.DSimp on hyp, using the cache identified by cacheId and updating it in place.
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.Normalize.PreProcessM.mapSimpHyps methods config = (Lean.Meta.Tactic.BVDecide.Normalize.PreProcessM.mapSimpHyps.go✝ methods config).run' { }
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.Normalize.PreProcessM.mapDSimpHyps methods config = (Lean.Meta.Tactic.BVDecide.Normalize.PreProcessM.mapDSimpHyps.go✝ methods config).run' { }
Instances For
A pass in the normalization pipeline. It operates on the current set of hypotheses stored in the
PreProcessM monad. If it manages to find a way to close the associated goal it can indicate so by
returning true. Otherwise it should always return false.
- name : Name
- run' : PreProcessM Bool
Instances For
Equations
- pass.run = Lean.withTraceNode `Meta.Tactic.bv (fun (x : Except Lean.Exception Bool) => pure (Lean.toMessageData "Running pass: " ++ Lean.toMessageData pass.name)) pass.run'
Instances For
Repeatedly run a list of Pass until they either close the goal or an iteration doesn't change
the goal anymore.
Equations
- One or more equations did not get rendered due to their size.