This attribute should not be used directly.
It is an implementation detail of the mvcgen tactic.
The simp set accumulated by the @[spec] attribute.
(This does not include Hoare triple specs.)
It is an implementation detail of the mvcgen tactic.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Elab.Tactic.Do.SpecAttr.instBEqSpecProof.beq (Lean.Elab.Tactic.Do.SpecAttr.SpecProof.global a) (Lean.Elab.Tactic.Do.SpecAttr.SpecProof.global b) = (a == b)
- Lean.Elab.Tactic.Do.SpecAttr.instBEqSpecProof.beq (Lean.Elab.Tactic.Do.SpecAttr.SpecProof.local a) (Lean.Elab.Tactic.Do.SpecAttr.SpecProof.local b) = (a == b)
- Lean.Elab.Tactic.Do.SpecAttr.instBEqSpecProof.beq x✝¹ x✝ = false
Instances For
A unique identifier corresponding to the origin.
Equations
- (Lean.Elab.Tactic.Do.SpecAttr.SpecProof.global declName).key = declName
- (Lean.Elab.Tactic.Do.SpecAttr.SpecProof.local fvarId).key = fvarId.name
- (Lean.Elab.Tactic.Do.SpecAttr.SpecProof.stx id ref proof).key = id
Instances For
Convert a simp Origin to a SpecProof.
Equations
- Lean.Elab.Tactic.Do.SpecAttr.SpecProof.ofOrigin (Lean.Meta.Origin.decl declName post inv) = some (Lean.Elab.Tactic.Do.SpecAttr.SpecProof.global declName)
- Lean.Elab.Tactic.Do.SpecAttr.SpecProof.ofOrigin (Lean.Meta.Origin.fvar fvarId) = some (Lean.Elab.Tactic.Do.SpecAttr.SpecProof.local fvarId)
- Lean.Elab.Tactic.Do.SpecAttr.SpecProof.ofOrigin x✝ = none
Instances For
Equations
Instances For
Equations
- Lean.Elab.Tactic.Do.SpecAttr.instHashableSpecProof = { hash := fun (sp : Lean.Elab.Tactic.Do.SpecAttr.SpecProof) => hash sp.key }
Equations
- One or more equations did not get rendered due to their size.
- keys : Array Meta.DiscrTree.Key
- prog : Expr
Expr key tested for matching, in ∀-quantified form.
keys = (← mkPath (← forallMetaTelescope prog).2.2). - proof : SpecProof
The proof for the theorem.
- etaPotential : Nat
If
etaPotentialis non-zero, then the precondition contains meta variables that can be instantiated after applyingmintro ∀setaPotentialmany times. - priority : Nat
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Elab.Tactic.Do.SpecAttr.instBEqSpecTheorem.beq x✝¹ x✝ = false
Instances For
Instances For
- specs : Meta.DiscrTree SpecTheorem
Instances For
Instances For
Equations
- d.isErased thmId = Lean.PersistentHashSet.contains d.erased thmId
Instances For
Equations
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
If σs : List Type, then e : SPred σs.
Return the number of times e needs to be applied
in order to assign closed solutions to meta variables.
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
- ext.addSpecTheoremFromConst declName prio attrKind = do let thm ← Lean.Elab.Tactic.Do.SpecAttr.mkSpecTheoremFromConst declName prio Lean.ScopedEnvExtension.add ext thm attrKind
Instances For
Equations
- ext.addSpecTheoremFromLocal fvar prio = do let thm ← Lean.Elab.Tactic.Do.SpecAttr.mkSpecTheoremFromLocal fvar prio Lean.ScopedEnvExtension.add ext thm Lean.AttributeKind.local
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- ext.getTheorems = do let __do_lift ← Lean.getEnv pure (Lean.ScopedEnvExtension.getState ext __do_lift)
Instances For
The kind of a spec theorem.
- triple : SpecTheoremKind
A Hoare triple spec:
⦃P⦄ prog ⦃Q⦄. - simp
(etaArgs : Nat := 0)
: SpecTheoremKind
A simp/equational spec:
lhs = rhs. The pattern is the LHS. When matched, the VCGen rewrites the program fromlhstorhsand continues.etaArgsis the number of extra arguments introduced by eta-expanding function-level equations (e.g., class projection unfold lemmas). These args needcongrFunat instantiation time.
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Elab.Tactic.Do.Internal.SpecAttr.instBEqSpecProof.beq (Lean.Elab.Tactic.Do.Internal.SpecAttr.SpecProof.global a) (Lean.Elab.Tactic.Do.Internal.SpecAttr.SpecProof.global b) = (a == b)
- Lean.Elab.Tactic.Do.Internal.SpecAttr.instBEqSpecProof.beq (Lean.Elab.Tactic.Do.Internal.SpecAttr.SpecProof.local a) (Lean.Elab.Tactic.Do.Internal.SpecAttr.SpecProof.local b) = (a == b)
- Lean.Elab.Tactic.Do.Internal.SpecAttr.instBEqSpecProof.beq x✝¹ x✝ = false
Instances For
A unique identifier corresponding to the origin.
Equations
- (Lean.Elab.Tactic.Do.Internal.SpecAttr.SpecProof.global declName).key = declName
- (Lean.Elab.Tactic.Do.Internal.SpecAttr.SpecProof.local fvarId).key = fvarId.name
- (Lean.Elab.Tactic.Do.Internal.SpecAttr.SpecProof.stx id ref proof).key = id
Instances For
Convert a simp Origin to a SpecProof.
Equations
- Lean.Elab.Tactic.Do.Internal.SpecAttr.SpecProof.ofOrigin (Lean.Meta.Origin.decl declName post inv) = some (Lean.Elab.Tactic.Do.Internal.SpecAttr.SpecProof.global declName)
- Lean.Elab.Tactic.Do.Internal.SpecAttr.SpecProof.ofOrigin (Lean.Meta.Origin.fvar fvarId) = some (Lean.Elab.Tactic.Do.Internal.SpecAttr.SpecProof.local fvarId)
- Lean.Elab.Tactic.Do.Internal.SpecAttr.SpecProof.ofOrigin x✝ = none
Instances For
Equations
Instances For
Equations
- Lean.Elab.Tactic.Do.Internal.SpecAttr.instHashableSpecProof = { hash := fun (sp : Lean.Elab.Tactic.Do.Internal.SpecAttr.SpecProof) => hash sp.key }
Normalises a specification proof so its conclusion is in pre ⊑ wp … form.
- Returns
someforTripleproofs (rewriting viaTriple.hwp) and proofs already inpre ⊑ wp …form (passed through unchanged). - Returns
noneiftypeis neither shape; callers shouldthrowError.
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.
- pattern : Meta.Sym.Pattern
- proof : SpecProof
The proof for the theorem.
- kind : SpecTheoremKind
The kind of spec theorem: triple or simp.
- priority : Nat
Instances For
Equations
- Lean.Elab.Tactic.Do.Internal.SpecAttr.instBEqSpecTheorem = { beq := fun (a b : Lean.Elab.Tactic.Do.Internal.SpecAttr.SpecTheorem) => a.proof == b.proof }
Equations
Instances For
- specs : Meta.DiscrTree SpecTheorem
Instances For
Equations
Instances For
Equations
- d.isErased thmId = Lean.PersistentHashSet.contains d.erased thmId
Instances For
Equations
Instances For
Drops pattern variables that the pattern expression does not depend on.
Sym.mkPatternFromExprWithKey/Sym.mkPatternFromDeclWithKey turn every leading ∀-binder of the
source type into a pattern variable, even binders the selected key (e.g. the program of a Triple
conclusion) never mentions. During matching those variables only ever become fresh metavariables
(see Sym.mkPreResult); for instance binders they additionally trigger spurious trySynthInstance
calls. This keeps only the variables that the pattern expression references, together with the
transitive closure of variables their types depend on, and renumbers the remaining de Bruijn
indices. varInfos? and checkTypeMask? are filtered to the surviving telescope; fnInfos,
levelParams, and the discrimination-tree key are unchanged because the pattern expression's
structure is untouched (bound variables are wildcards in the key).
Important: only use this when the matched arguments are not reused to rebuild a proof term,
as Sym.BackwardRule/Sym.mkValue do — dropping variables would drop arguments those need. It is
meant for databases such as mvcgen''s spec table, where the proof is re-elaborated independently
of the pattern.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Selects the program a spec conclusion is keyed on: the program of a Triple, or the program inside
the wp on the RHS of a pre ⊑ wp … entailment. Returns none if type is neither shape — e.g. a
bare lhs ⊑ rhs whose RHS is not a wp application (an invariant entailment such as
(I n h).inv … ⊑ Q n r.2, which can appear as an ordinary hypothesis but is not a spec). Callers use
none to skip such non-spec hypotheses instead of failing.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Builds a Sym.Pattern keyed on the program selected by selectProg from a spec conclusion.
The conclusion is assumed to already be a valid spec shape (checked by the caller via selectProg);
a non-spec shape reaching here is a logic error and throws.
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
- One or more equations did not get rendered due to their size.
Instances For
Equations
- ext.getTheorems = do let __do_lift ← Lean.getEnv pure (Lean.ScopedEnvExtension.getState ext __do_lift)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Marks a type as an invariant type for the mvcgen tactic.
Goals whose type is an application of a tagged type will be classified
as invariants rather than verification conditions.
Returns true if ty is an application of a type tagged with @[spec_invariant_type].
Equations
- Lean.Elab.Tactic.Do.SpecAttr.isSpecInvariantType env ty = match ty.getAppFn with | Lean.Expr.const name us => Lean.Elab.Tactic.Do.SpecAttr.specInvariantAttr.hasTag env name | x => false