Node IDs #
Equations
- Aesop.instInhabitedGoalId = { default := { toNat := default } }
 
Equations
- Aesop.GoalId.dummy = { toNat := 1000000000000000 }
 
Instances For
Equations
- Aesop.GoalId.instLT = { lt := fun (n m : Aesop.GoalId) => n.toNat < m.toNat }
 
Equations
- n.instDecidableRelLt m = inferInstanceAs (Decidable (n.toNat < m.toNat))
 
Equations
- Aesop.GoalId.instToString = { toString := fun (n : Aesop.GoalId) => toString n.toNat }
 
Equations
- Aesop.GoalId.instHashable = { hash := fun (n : Aesop.GoalId) => hash n.toNat }
 
Rule Application IDs #
Equations
- Aesop.instInhabitedRappId = { default := { toNat := default } }
 
Equations
- Aesop.RappId.dummy = { toNat := 1000000000000000 }
 
Instances For
Equations
- Aesop.RappId.instLT = { lt := fun (n m : Aesop.RappId) => n.toNat < m.toNat }
 
Equations
- n.instDecidableRelLt m = inferInstanceAs (Decidable (n.toNat < m.toNat))
 
Equations
- Aesop.RappId.instToString = { toString := fun (n : Aesop.RappId) => toString n.toNat }
 
Equations
- Aesop.RappId.instHashable = { hash := fun (n : Aesop.RappId) => hash n.toNat }
 
Iterations #
@[inline]
Equations
Instances For
Equations
Instances For
Equations
Equations
Equations
Equations
- Aesop.Iteration.instDecidableRelLt = inferInstanceAs (DecidableRel fun (x1 x2 : Nat) => x1 < x2)
 
Equations
- Aesop.Iteration.instDecidableRelLe = inferInstanceAs (DecidableRel fun (x1 x2 : Nat) => x1 ≤ x2)
 
The Tree #
At each point during the search, every node of the tree (goal, rapp or mvar cluster) is in one of these states:
proven: the node is proven.unprovable: the node is unprovable, i.e. it will never be proven regardless of any future expansions that might be performed.unknown: neither of the above.
Every node starts in the unknown state and may later become either proven or
unprovable. After this, the state does not change any more.
Instances For
Equations
- Aesop.instInhabitedNodeState = { default := Aesop.NodeState.unknown }
 
Equations
- Aesop.instBEqNodeState = { beq := Aesop.beqNodeState✝ }
 
Equations
- One or more equations did not get rendered due to their size.
 
Equations
- Aesop.NodeState.unknown.isUnknown = true
 - x✝.isUnknown = false
 
Instances For
Equations
- Aesop.NodeState.proven.isProven = true
 - x✝.isProven = false
 
Instances For
Equations
- Aesop.NodeState.unprovable.isUnprovable = true
 - x✝.isUnprovable = false
 
Instances For
Equations
- Aesop.NodeState.proven.isIrrelevant = true
 - Aesop.NodeState.unprovable.isIrrelevant = true
 - Aesop.NodeState.unknown.isIrrelevant = false
 
Instances For
Equations
Instances For
Equations
- Aesop.instInhabitedGoalState = { default := Aesop.GoalState.unknown }
 
Equations
- Aesop.instBEqGoalState = { beq := Aesop.beqGoalState✝ }
 
Equations
- One or more equations did not get rendered due to their size.
 
Equations
- Aesop.GoalState.provenByRuleApplication.isProvenByRuleApplication = true
 - x✝.isProvenByRuleApplication = false
 
Instances For
Equations
- Aesop.GoalState.provenByNormalization.isProvenByNormalization = true
 - x✝.isProvenByNormalization = false
 
Instances For
Equations
- Aesop.GoalState.provenByRuleApplication.isProven = true
 - Aesop.GoalState.provenByNormalization.isProven = true
 - x✝.isProven = false
 
Instances For
Equations
- Aesop.GoalState.unprovable.isUnprovable = true
 - x✝.isUnprovable = false
 
Instances For
Equations
- Aesop.GoalState.unknown.isUnknown = true
 - x✝.isUnknown = false
 
Instances For
Equations
- Aesop.GoalState.unknown.toNodeState = Aesop.NodeState.unknown
 - Aesop.GoalState.provenByRuleApplication.toNodeState = Aesop.NodeState.proven
 - Aesop.GoalState.provenByNormalization.toNodeState = Aesop.NodeState.proven
 - Aesop.GoalState.unprovable.toNodeState = Aesop.NodeState.unprovable
 
Instances For
Equations
- s.isIrrelevant = s.toNodeState.isIrrelevant
 
Instances For
Equations
Instances For
- notNormal : NormalizationState
 - normal (postGoal : Lean.MVarId) (postState : Lean.Meta.SavedState) (script : Array (DisplayRuleName × Option (Array Script.LazyStep))) : NormalizationState
 - provenByNormalization (postState : Lean.Meta.SavedState) (script : Array (DisplayRuleName × Option (Array Script.LazyStep))) : NormalizationState
 
Instances For
Equations
Equations
- Aesop.NormalizationState.notNormal.isNormal = false
 - (Aesop.NormalizationState.normal postGoal postState script).isNormal = true
 - (Aesop.NormalizationState.provenByNormalization postState script).isNormal = true
 
Instances For
Equations
- Aesop.NormalizationState.notNormal.isProvenByNormalization = false
 - (Aesop.NormalizationState.normal postGoal postState script).isProvenByNormalization = false
 - (Aesop.NormalizationState.provenByNormalization postState script).isProvenByNormalization = true
 
Instances For
Equations
- Aesop.NormalizationState.notNormal.normalizedGoal? = none
 - (Aesop.NormalizationState.provenByNormalization postState script).normalizedGoal? = none
 - (Aesop.NormalizationState.normal g postState script).normalizedGoal? = some g
 
Instances For
A goal G can be added to the tree for three reasons:
Gwas produced by its parent rule as a subgoal. This is the most common reason.Gwas copied because it contains some metavariables which were assigned by its parent rule. In this case, we record goal of whichGis a copy. We also record the representative of the equivalence class of goals which are copies of each other. E.g. if goal1is copied to goal2and goal2is copied to goal3, they are all part of the equivalence class with representative1.
- subgoal : GoalOrigin
 - copied («from» rep : GoalId) : GoalOrigin
 - droppedMVar : GoalOrigin
 
Instances For
Equations
- Aesop.instInhabitedGoalOrigin = { default := Aesop.GoalOrigin.subgoal }
 
Equations
- (Aesop.GoalOrigin.copied «from» rep).originalGoalId? = some rep
 - x✝.originalGoalId? = none
 
Instances For
Equations
- Aesop.GoalOrigin.subgoal.toString = "subgoal"
 - (Aesop.GoalOrigin.copied «from» rep).toString = toString "copy of " ++ toString «from» ++ toString ", originally " ++ toString rep ++ toString ""
 - Aesop.GoalOrigin.droppedMVar.toString = "dropped mvar"
 
Instances For
- id : GoalId
 - parent : IO.Ref MVarCluster
 - origin : GoalOrigin
 - depth : Nat
 - state : GoalState
 - isIrrelevant : Bool
 - isForcedUnprovable : Bool
 - preNormGoal : Lean.MVarId
 - normalizationState : NormalizationState
 - mvars : UnorderedArraySet Lean.MVarId
 - successProbability : Percent
 - addedInIteration : Iteration
 - lastExpandedInIteration : Iteration
 - unsafeRulesSelected : Bool
 - unsafeQueue : UnsafeQueue
 - failedRapps : Array RegularRule
 
Instances For
- id : RappId
 - parent : IO.Ref Goal
 - state : NodeState
 - isIrrelevant : Bool
 - appliedRule : RegularRule
 - scriptSteps? : Option (Array Script.LazyStep)
 - originalSubgoals : Array Lean.MVarId
 - successProbability : Percent
 - metaState : Lean.Meta.SavedState
 - introducedMVars : UnorderedArraySet Lean.MVarId
 - assignedMVars : UnorderedArraySet Lean.MVarId
 
Instances For
- mk (d : GoalData RappUnsafe MVarClusterUnsafe) : GoalUnsafe
 
Instances For
- mk (d : MVarClusterData GoalUnsafe RappUnsafe) : MVarClusterUnsafe
 
Instances For
- mk (d : RappData GoalUnsafe MVarClusterUnsafe) : RappUnsafe
 
Instances For
- Goal : Type
 - Rapp : Type
 - MVarCluster : Type
 - introGoal : GoalData self.Rapp self.MVarCluster → self.Goal
 - elimGoal : self.Goal → GoalData self.Rapp self.MVarCluster
 - introRapp : RappData self.Goal self.MVarCluster → self.Rapp
 - elimRapp : self.Rapp → RappData self.Goal self.MVarCluster
 - introMVarCluster : MVarClusterData self.Goal self.Rapp → self.MVarCluster
 - elimMVarCluster : self.MVarCluster → MVarClusterData self.Goal self.Rapp
 
Instances For
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[reducible, inline]
Equations
Instances For
@[reducible, inline]
Equations
Instances For
@[reducible, inline]
Equations
Instances For
@[inline]
def
Aesop.MVarCluster.modify
(f : MVarClusterData Goal Rapp → MVarClusterData Goal Rapp)
(c : MVarCluster)
 :
Equations
- Aesop.MVarCluster.modify f c = Aesop.MVarCluster.mk (f c.elim)
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
Equations
- Aesop.Goal.instBEq = { beq := fun (g₁ g₂ : Aesop.Goal) => g₁.id == g₂.id }
 
Equations
- Aesop.Goal.instHashable = { hash := fun (g : Aesop.Goal) => hash g.id }
 
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
Equations
- Aesop.Rapp.instBEq = { beq := fun (r₁ r₂ : Aesop.Rapp) => r₁.id == r₂.id }
 
Equations
- Aesop.Rapp.instHashable = { hash := fun (r : Aesop.Rapp) => hash r.id }
 
Miscellaneous Queries #
@[inline]
Equations
- g.postNormGoalAndMetaState? = match g.normalizationState with | Aesop.NormalizationState.normal postGoal postState script => some (postGoal, postState) | x => none
 
Instances For
Equations
- g.postNormGoal? = Option.map (fun (x : Lean.MVarId × Lean.Meta.SavedState) => x.fst) g.postNormGoalAndMetaState?
 
Instances For
Equations
- g.currentGoal = g.postNormGoal?.getD g.preNormGoal
 
Instances For
Equations
- g.parentRapp? = do let __do_lift ← ST.Ref.get g.parent pure __do_lift.parent?
 
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
- g.safeRapps = Array.filterM (fun (rref : Aesop.RappRef) => do let __do_lift ← ST.Ref.get rref pure __do_lift.isSafe) g.children
 
Instances For
Equations
- g.hasSafeRapp = Array.anyM (fun (rref : Aesop.RappRef) => do let __do_lift ← ST.Ref.get rref pure __do_lift.isSafe) g.children
 
Instances For
Equations
- g.isUnsafeExhausted = (g.unsafeRulesSelected && Subarray.isEmpty g.unsafeQueue)
 
Instances For
Equations
- g.hasProvableRapp = Array.anyM (fun (r : Aesop.RappRef) => do let __do_lift ← ST.Ref.get r pure !__do_lift.state.isUnprovable) g.children
 
Instances For
Equations
- g.priority = g.successProbability * Aesop.unificationGoalPenalty ^ g.mvars.size
 
Instances For
Equations
- g.isNormal = g.normalizationState.isNormal
 
Instances For
Equations
- g.originalGoalId = g.origin.originalGoalId?.getD g.id
 
Instances For
Equations
- r.parentPostNormMetaState rootMetaState = do let __do_lift ← ST.Ref.get r.parent __do_lift.parentMetaState rootMetaState
 
Instances For
def
Aesop.Rapp.foldSubgoalsM
{m : Type → Type}
{σ : Type}
[Monad m]
[MonadLiftT (ST IO.RealWorld) m]
(init : σ)
(f : σ → GoalRef → m σ)
(r : Rapp)
 :
m σ
Equations
- One or more equations did not get rendered due to their size.
 
Instances For
def
Aesop.Rapp.forSubgoalsM
{m : Type → Type}
[Monad m]
[MonadLiftT (ST IO.RealWorld) m]
(f : GoalRef → m Unit)
(r : Rapp)
 :
m Unit
Equations
- Aesop.Rapp.forSubgoalsM f r = Array.forM (fun (cref : Aesop.MVarClusterRef) => do let __do_lift ← ST.Ref.get cref Array.forM f __do_lift.goals) r.children
 
Instances For
Equations
- r.subgoals = Aesop.Rapp.foldSubgoalsM #[] (fun (subgoals : Array Aesop.GoalRef) (gref : Aesop.GoalRef) => pure (subgoals.push gref)) r
 
Instances For
Equations
- r.depth = do let __do_lift ← ST.Ref.get r.parent pure __do_lift.depth
 
Instances For
Equations
- c.provenGoal? = Array.findM? (fun (gref : Aesop.GoalRef) => do let __do_lift ← ST.Ref.get gref pure __do_lift.state.isProven) c.goals