The @[vcgen_rintro] attribute registers the rules by which vcgen destructures a binder while it
introduces the binders of the target, like an rintro pattern fixed per binder type.
A rule is a theorem whose conclusion is a ∀ telescope ending in an application of a parameter
G. Its premises are the binders up to the last one that mentions G, and its conclusion is the
rest. Take
theorem List.forall_mem_cons_intro {G : α → Prop} (ha : G a) (hl : ∀ x, x ∈ l → G x) :
∀ x, x ∈ a :: l → G x
with the conclusion ∀ x, x ∈ a :: l → G x. It turns the target ∀ x ∈ [a, b], G x into the
goals G a and ∀ x ∈ [b], G x. The rules are keyed in a discrimination tree by their
conclusion, whose ∀ binders become .arrow keys over the binder type and the body. At each
binder of the target, vcgen applies the first matching rule in priority order as a backward rule
to the remaining target, and otherwise introduces the binder.
vcgen always uses the rule Prod.forall_intro.
One @[vcgen_rintro] rule: the theorem declName, whose first numPremises binders are the
premises, with the discrimination tree keys keys of its conclusion.
- declName : Name
- numPremises : Nat
- keys : Array Meta.DiscrTree.Key
- prio : Nat
Instances For
Equations
- Lean.Elab.Tactic.VCGen.instBEqRIntroEntry = { beq := fun (e₁ e₂ : Lean.Elab.Tactic.VCGen.RIntroEntry) => e₁.declName == e₂.declName }
The rules vcgen uses without registration.
Equations
- Lean.Elab.Tactic.VCGen.builtinRIntros = #[`Prod.forall_intro]
Instances For
Check that the conclusion of declName is a ∀ telescope ending in an application of a
parameter, and compute its RIntroEntry.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The entries of the rules of builtinRIntros, computed once.
The rules registered with @[vcgen_rintro], and the rules of builtinRIntros that exist in
the environment.
Equations
- One or more equations did not get rendered due to their size.