The Aesop-specific parts of an Aesop rule set. A BaseRuleSet
stores global
Aesop rules, e.g. safe and unsafe rules. It does not store simp theorems for
the builtin norm simp rule; these are instead stored in a simp extension.
- normRules : Index NormRuleInfo
Normalisation rules registered in this rule set.
- unsafeRules : Index UnsafeRuleInfo
Unsafe rules registered in this rule set.
- safeRules : Index SafeRuleInfo
Safe rules registered in this rule set.
- unfoldRules : Lean.PHashMap Lean.Name (Option Lean.Name)
Rules for the builtin unfold rule. A pair
(decl, unfoldThm?)
in this map represents a declarationdecl
which should be unfolded.unfoldThm?
should be the output ofgetUnfoldEqnFor? decl
and is cached here for efficiency. - forwardRules : ForwardIndex
Forward rules. There's a special procedure for applying forward rules, so we don't store them in the regular indices.
- forwardRuleNames : Lean.PHashSet RuleName
The names of all rules in
forwardRules
. - rulePatterns : RulePatternIndex
An index for the rule patterns associated with rules contained in this rule set. When rules are removed from the rule set, their patterns are not removed from this index.
- erased : Lean.PHashSet RuleName
The set of rules that were erased from
normRules
,unsafeRules
,safeRules
andforwardRules
. When we erase a rule which is present in any of these four indices, the rule is not removed from the indices but just added to this set. By contrast, when we erase a rule fromunfoldRules
, we actually delete it. - ruleNames : Lean.PHashMap Lean.Name (UnorderedArraySet RuleName)
A cache of the names of all rules registered in this rule set. Invariant:
ruleNames
contains exactly the names of the rules present innormRules
,unsafeRules
,safeRules
,forwardRules
andunfoldRules
and not present inerased
. We use this cache (a) to quickly determine whether a rule is present in the rule set and (b) to find the full rule names associated with the fvar or const identified by a name.
Instances For
Equations
- One or more equations did not get rendered due to their size.
A global Aesop rule set. When we tag a declaration with @[aesop]
, it is stored
in one or more of these rule sets. Internally, a GlobalRuleSet
is composed of
a BaseRuleSet
(stored in an Aesop rule set extension) plus a set of simp
theorems (stored in a SimpExtension
).
- simpTheorems : Lean.Meta.SimpTheorems
The simp theorems stored in this rule set.
- simprocs : Lean.Meta.Simprocs
The simprocs stored in this rule set.
Instances For
Equations
- Aesop.instInhabitedGlobalRuleSet = { default := { toBaseRuleSet := default, simpTheorems := default, simprocs := default } }
The rule set used by an Aesop tactic call. A local rule set is produced by combining several global rule sets and possibly adding or erasing some individual rules.
- simpTheoremsArray : Array (Lean.Name × Lean.Meta.SimpTheorems)
The simp theorems used by the builtin norm simp rule.
The simp theorems array must contain at least one
SimpTheorems
structure. When a simp theorem is added to aLocalRuleSet
, it is stored in this firstSimpTheorems
structure.- simprocsArray : Array (Lean.Name × Lean.Meta.Simprocs)
The simprocs used by the builtin norm simp rule.
The simprocs array must contain at least one
Simprocs
structure, for the same reason as above.- localNormSimpRules : Array LocalNormSimpRule
FVars that were explicitly added as simp rules.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
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
- Aesop.LocalRuleSet.trace.printSimpSetName `_ = "<default>"
- Aesop.LocalRuleSet.trace.printSimpSetName x✝ = toString x✝
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Aesop.instEmptyCollectionBaseRuleSet = { emptyCollection := Aesop.BaseRuleSet.empty }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Aesop.instEmptyCollectionGlobalRuleSet = { emptyCollection := Aesop.GlobalRuleSet.empty }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Aesop.instEmptyCollectionLocalRuleSet = { emptyCollection := Aesop.LocalRuleSet.empty }
Equations
- Aesop.instInhabitedLocalRuleSet = { default := ∅ }
Equations
- rs.contains n = (!Aesop.BaseRuleSet.isErased✝ rs n && match Lean.PersistentHashMap.find? rs.ruleNames n.name with | some ns => Aesop.UnorderedArraySet.contains n ns | x => false)
Instances For
Equations
- rs.contains n = (rs.contains n || n.builder == Aesop.BuilderName.simp && n.scope == Aesop.ScopeName.global && Aesop.SimpTheorems.containsDecl rs.simpTheorems n.name)
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.
- Aesop.BaseRuleSet.add.addRulePattern n none rs = rs
Instances For
Equations
- One or more equations did not get rendered due to their size.
- rs.add (Aesop.LocalRuleSetMember.global (Aesop.GlobalRuleSetMember.base m)) = Aesop.LocalRuleSet.modifyBase (fun (x : Aesop.BaseRuleSet) => x.add m) rs
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
- rs.applicableNormalizationRules fms goal = rs.applicableNormalizationRulesWith fms goal fun (x : Aesop.NormRule) => true
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- rs.applicableUnsafeRules fms goal = rs.applicableUnsafeRulesWith fms goal fun (x : Aesop.UnsafeRule) => true
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- rs.applicableSafeRules fms goal = rs.applicableSafeRulesWith fms goal fun (x : Aesop.SafeRule) => true
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- rs.applicableForwardRules e = rs.applicableForwardRulesWith e fun (x : Aesop.ForwardRule) => true
Instances For
Equations
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.