The priority of a forward rule.
- normSafe
(n : Int)
: ForwardRulePriority
If the rule is a norm or safe rule, its priority is an integer.
- unsafe
(p : Percent)
: ForwardRulePriority
If the rule is an unsafe rule, its priority is a percentage representing the rule's success probability.
Instances For
Equations
Equations
Compare two rule priorities. Less means higher priority ('better'). Norm/safe rules have higher priority than unsafe rules. Among norm/safe rules, lower penalty is better. Among unsafe rules, higher percentage is better.
Equations
- (Aesop.ForwardRulePriority.normSafe n).compare (Aesop.ForwardRulePriority.unsafe p) = Ordering.lt
- (Aesop.ForwardRulePriority.unsafe p).compare (Aesop.ForwardRulePriority.normSafe n) = Ordering.gt
- (Aesop.ForwardRulePriority.normSafe n₁).compare (Aesop.ForwardRulePriority.normSafe n₂) = compare n₁ n₂
- (Aesop.ForwardRulePriority.unsafe p₁).compare (Aesop.ForwardRulePriority.unsafe p₂) = (compare p₁ p₂).swap
Instances For
Equations
- Aesop.ForwardRulePriority.instOrd = { compare := Aesop.ForwardRulePriority.compare }
Equations
- One or more equations did not get rendered due to their size.
A forward rule.
- slotClusters : Array (Array Slot)
- name : RuleName
The rule's name. Should be unique among all rules in a rule set.
- term : RuleTerm
The theorem from which this rule is derived.
- prio : ForwardRulePriority
The rule's priority.
Instances For
Equations
- Aesop.ForwardRule.instBEq = { beq := fun (r₁ r₂ : Aesop.ForwardRule) => r₁.name == r₂.name }
Equations
- Aesop.ForwardRule.instHashable = { hash := fun (r : Aesop.ForwardRule) => hash r.name }
Equations
- Aesop.ForwardRule.instOrd = { compare := fun (r₁ r₂ : Aesop.ForwardRule) => (compare r₁.prio r₂.prio).then (compare r₁.name r₂.name) }
Is this rule a destruct
rule (i.e., should we clear matched hyps)?