Declarations
The result of Agree over a goal sequence, the state after copying from every interacting goal,
the goals flagged as interacting, in search order, and the goal flagged as the satisfier, if
any.
state : σ
The state after copying from every interacting goal.
interacted : List α
The goals flagged as interacting, in search order.
satisfier : Option α
The goal flagged as satisfying the probe, if the search was satisfied.
Used by Dynamic.agree , agree , Spec.agree
Used in Deal2024
A probe that depends on a state, as a probe under dynamic interaction depends on what it has
met.
Used by Dynamic.agree , Dynamic.agree_nil , Dynamic.agree_cons , Dynamic.agree_satisfier
Agree for a probe that depends on a state. Each goal in turn is flagged and copied from if it
interacts with the probe of the current state, ends the search if it satisfies it, and otherwise
moves the state by update before the next goal.
{α : Type u_1} {σ : Type u_2} (P : Dynamic σ α ) (copy update : α → σ → σ ) :
The definition is too large to print here; read it in the source .
Built from Result , Dynamic
Used by Dynamic.agree_nil , Dynamic.agree_cons , Dynamic.agree_satisfier , agree
@[simp] theorem Dynamic.agree_nil L132
{α : Type u_1} {σ : Type u_2} {P : Dynamic σ α } {copy update : α → σ → σ } {s : σ } : P .agree copy update s [ ] = { state := s , interacted := [ ] , satisfier := none }
Built from Dynamic , Dynamic.agree
{α : Type u_1} {σ : Type u_2} {P : Dynamic σ α } {copy update : α → σ → σ } {s : σ } (a : α ) (as : List α ) : P .agree copy update s (a :: as ) = if (P s ) .sat a then { state := if (P s ) .int a then copy a s else s , interacted := if (P s ) .int a then [ a ] else [ ] , satisfier := some a } else have r := P .agree copy update (update a (if (P s ) .int a then copy a s else s ) ) as ; { state := r .state , interacted := (if (P s ) .int a then [ a ] else [ ] ) ++ r .interacted , satisfier := r .satisfier }
Built from Dynamic , Dynamic.agree
When satisfaction does not depend on the state, the satisfier is the first goal that
satisfies the probe.
{α : Type u_1} {σ : Type u_2} {P : Dynamic σ α } {copy update : α → σ → σ } {s : σ } {goals : List α } {q : Probe α } (h : ∀ (s : σ ), (P s ) .sat = q .sat ) :
Built from Dynamic , Dynamic.agree
Agree for a fixed probe over an ordered goal sequence, copying from every interacting goal up
to the first satisfier.
Built from Result , Dynamic.agree
Used by agree_nil , agree_cons , agree_satisfier , agree_interacted , agree_state , le_agree_state , agree_state_eq_of_forall_not_int , agree_interacted_eq_goal , agree_state_eq_elim , relativized_agree_interacted , insatiable_agree_interacted , agree_sup_state , agreeList , Spec.agree_empty
Used in Syntax/Minimalist/Feature/Valuation , Syntax/Minimalist/Probe/Minimal , Amato2025
The goals a probe inspects, those before the first satisfying goal together with it.
{α : Type u_1} (p : Probe α ) (goals : List α ) : List α
p .inspected goals = List.takeWhile (fun (x : α ) => decide ¬ p .sat x ) goals ++ (p .search goals ) .toList Used by agree_interacted , mem_of_mem_inspected , inspected_filter_int_eq_goal , agree_sup_state , Spec.copied_agree_empty
Used in Syntax/Minimalist/Probe/Minimal
@[simp] theorem agree_nil L165
{α : Type u_1} {σ : Type u_2} {p : Probe α } {copy : α → σ → σ } {s : σ } : p .agree copy s [ ] = { state := s , interacted := [ ] , satisfier := none }
Built from agree
{α : Type u_1} {σ : Type u_2} {p : Probe α } {copy : α → σ → σ } {s : σ } (a : α ) (as : List α ) : p .agree copy s (a :: as ) = if p .sat a then { state := if p .int a then copy a s else s , interacted := if p .int a then [ a ] else [ ] , satisfier := some a } else have r := p .agree copy (if p .int a then copy a s else s ) as ; { state := r .state , interacted := (if p .int a then [ a ] else [ ] ) ++ r .interacted , satisfier := r .satisfier }
Built from agree
The satisfier is the goal the search finds.
{α : Type u_1} {σ : Type u_2} {p : Probe α } {copy : α → σ → σ } {s : σ } {goals : List α } :
Built from agree
The goals flagged as interacting are the inspected goals that interact.
{α : Type u_1} {σ : Type u_2} {p : Probe α } {copy : α → σ → σ } {s : σ } {goals : List α } :
Built from agree , inspected
The state is the fold of copy over the goals flagged as interacting.
{α : Type u_1} {σ : Type u_2} {p : Probe α } {copy : α → σ → σ } {s : σ } {goals : List α } :
Built from agree
Agree only adds to the state when copying does.
{α : Type u_1} {σ : Type u_2} {p : Probe α } {copy : α → σ → σ } {s : σ } {goals : List α } [Preorder σ ] (h : ∀ (a : α ) (s : σ ), s ≤ copy a s ) :
Built from agree
{α : Type u_1} {p : Probe α } {goals : List α } {a : α } (ha : a ∈ p .inspected goals ) : a ∈ goals
Built from inspected
theorem agree_state_eq_of_forall_not_int L216–220
{α : Type u_1} {σ : Type u_2} {p : Probe α } {copy : α → σ → σ } {s : σ } {goals : List α } (h : ∀ a ∈ goals , ¬ p .int a ) :
Built from agree
theorem inspected_filter_int_eq_goal L222–230
{α : Type u_1} {p : Probe α } {goals : List α } (h : ∀ (a : α ), p .int a → p .sat a ) : List.filter (fun (x : α ) => decide (p .int x ) ) (p .inspected goals ) = (p .goal goals ) .toList
Built from inspected
When every interacting goal satisfies the probe, the only goal flagged as interacting is the
goal of the probe.
{α : Type u_1} {σ : Type u_2} {p : Probe α } {copy : α → σ → σ } {s : σ } {goals : List α } (h : ∀ (a : α ), p .int a → p .sat a ) :
Built from agree
A probe that interacts with exactly the goals that satisfy it copies once, from the goal its
search finds.
{α : Type u_1} {σ : Type u_2} {p : Probe α } {copy : α → σ → σ } {s : σ } {goals : List α } (h : ∀ (a : α ), p .int a ↔ p .sat a ) :
Built from agree
theorem relativized_agree_interacted L246–248
{α : Type u_1} {σ : Type u_2} {copy : α → σ → σ } {s : σ } {goals : List α } (f : α → Prop ) [DecidablePred f ] :
Built from agree
An insatiable probe flags every interacting goal, Multiple Agree (Hiraiwa 2001 ).
{α : Type u_1} {σ : Type u_2} {copy : α → σ → σ } {s : σ } {goals : List α } (f : α → Prop ) [DecidablePred f ] :
Built from agree
When copying joins the state with what each goal contributes, Agree joins the initial state
with the contributions of the goals it flags.
{α : Type u_1} {σ : Type u_2} {p : Probe α } {s : σ } {goals : List α } [SemilatticeSup σ ] [OrderBot σ ] [DecidableEq α ] (δ : α → σ ) : (p .agree (fun (a : α ) (s : σ ) => s ⊔ δ a ) s goals ) .state = s ⊔ (List.filter (fun (x : α ) => decide (p .int x ) ) (p .inspected goals ) ) .toFinset .sup δ
Built from agree , inspected
Feature specifications
A probe specification over a feature type, [INT:int, SAT:sat] in Deal 2025a 's notation.
Each condition lists bundles of features, and a goal meets it when it bears every feature of one
of them, so that a condition presents the upper set of the bundles containing one of its own:
[INT:Ā+D, SAT:D] is ⟨{{Ā, D}}, {{D}}⟩, and a condition listing several bundles is a
disjunction.
int : Finset (Finset F )
The bundles whose bearers the probe interacts with.
sat : Finset (Finset F )
The bundles whose bearers halt the probe's search.
Used by Spec.equivProd , Spec.instPartialOrder , Spec.le_def , Spec.instOrderBot , Spec.instLatticeOfDecidableEq , Spec.sup_int , Spec.sup_sat , Spec.ofFeatures , Spec.intFeatures , Spec.satFeatures , Spec.toProbe , Spec.toProbe_int , Spec.toProbe_sat , Spec.sup_toProbe_int , Spec.sup_toProbe_sat , Spec.ofGeometry , Spec.relativized , Spec.agree , Spec.agree_satisfier , Spec.agree_empty , Spec.copied_agree_empty , Spec.mem_agree_interacted_iff
Used in Syntax/Minimalist/Probe/Minimal , BrananErlewine2024 , Deal2025a , HammerlyMathieu2026
A specification is the pair of its conditions.
{F : Type u_3} : Spec F ≃ Finset (Finset F ) × Finset (Finset F )
The definition is too large to print here; read it in the source .
Built from Spec
Used by Spec.instPartialOrder , Spec.instLatticeOfDecidableEq
@[instance_reducible] instance Spec.instPartialOrder L318–319
Specifications are ordered by inclusion of both conditions' bundles.
Built from Spec , Spec.equivProd
@[instance_reducible] instance Spec.instOrderBot L323–326
The specification with no bundles, a head without that probe.
Built from Spec
@[simp] theorem Spec.bot_int L328
@[simp] theorem Spec.bot_sat L329
@[instance_reducible] instance Spec.instLatticeOfDecidableEq L331–332
The join of two specifications lists the bundles of either, a disjunctive probe.
{F : Type u_3} [DecidableEq F ] :
Built from Spec , Spec.equivProd
{F : Type u_3} [DecidableEq F ] (sp sp' : Spec F ) :
Built from Spec
{F : Type u_3} [DecidableEq F ] (sp sp' : Spec F ) :
Built from Spec
The specification whose bundles are single features, interacting with a goal that bears a
feature of int and satisfied by one that bears a feature of sat .
{F : Type u_3} (int sat : Finset F ) :
Spec.ofFeatures int sat = { int := Finset.powersetCard 1 int , sat := Finset.powersetCard 1 sat } Built from Spec
Used by Spec.ofFeatures_toProbe_int , Spec.ofFeatures_toProbe_sat , Spec.ofFeatures_intFeatures , Spec.ofFeatures_satFeatures , Spec.ofGeometry
Used in Deal2025a
The state of Agree for a specification, the features copied so far and the current
interaction condition.
copied : Finset F
The features copied to the probe so far.
int : Finset (Finset F )
The current interaction condition.
Used by Spec.agree
The features of the interaction condition a goal bears, which Agree copies from it.
{α : Type u_1} {F : Type u_3} [DecidableEq F ] (sp : Spec F ) (feats : α → Finset F ) (a : α ) : Finset F
Built from Spec
Used by Spec.ofFeatures_intFeatures , Spec.ofGeometry_intFeatures , Spec.agree_empty , Spec.copied_agree_empty
Used in Syntax/Minimalist/Probe/Minimal
The features of the satisfaction condition a goal bears.
{α : Type u_1} {F : Type u_3} [DecidableEq F ] (sp : Spec F ) (feats : α → Finset F ) (a : α ) : Finset F
Built from Spec
Used by Spec.ofFeatures_satFeatures
Used in Syntax/Minimalist/Probe/Minimal
The probe a specification denotes over goals exposing feature sets, interacting with a goal
whose features lie in the upper set the interaction condition presents, and satisfied by one
whose features lie in the upper set the satisfaction condition presents.
{α : Type u_1} {F : Type u_3} [DecidableEq F ] (sp : Spec F ) (feats : α → Finset F ) :
The definition is too large to print here; read it in the source .
Built from Spec
Used by Spec.toProbe_int , Spec.toProbe_sat , Spec.sup_toProbe_int , Spec.sup_toProbe_sat , Spec.ofFeatures_toProbe_int , Spec.ofFeatures_toProbe_sat , Spec.ofGeometry_toProbe_int_iff , Spec.agree_satisfier , Spec.agree_empty , Spec.copied_agree_empty , Spec.mem_agree_interacted_iff
Used in Syntax/Minimalist/Probe/Minimal , BrananErlewine2024
@[simp] theorem Spec.toProbe_int L368–370
{α : Type u_1} {F : Type u_3} [DecidableEq F ] (sp : Spec F ) (feats : α → Finset F ) (a : α ) :
Built from Spec , Spec.toProbe
@[simp] theorem Spec.toProbe_sat L372–374
{α : Type u_1} {F : Type u_3} [DecidableEq F ] (sp : Spec F ) (feats : α → Finset F ) (a : α ) :
Built from Spec , Spec.toProbe
The join interacts with a goal iff either specification does.
{α : Type u_1} {F : Type u_3} [DecidableEq F ] {sp : Spec F } {feats : α → Finset F } {sp' : Spec F } {a : α } :
Built from Spec , Spec.toProbe
The join is satisfied by a goal iff either specification is.
{α : Type u_1} {F : Type u_3} [DecidableEq F ] {sp : Spec F } {feats : α → Finset F } {sp' : Spec F } {a : α } :
Built from Spec , Spec.toProbe
@[simp] theorem Spec.ofFeatures_toProbe_int L390–392
{α : Type u_1} {F : Type u_3} [DecidableEq F ] {feats : α → Finset F } {int sat : Finset F } {a : α } :
Built from Spec.ofFeatures , Spec.toProbe
@[simp] theorem Spec.ofFeatures_toProbe_sat L394–396
{α : Type u_1} {F : Type u_3} [DecidableEq F ] {feats : α → Finset F } {int sat : Finset F } {a : α } :
Built from Spec.ofFeatures , Spec.toProbe
@[simp] theorem Spec.ofFeatures_intFeatures L398–400
{α : Type u_1} {F : Type u_3} [DecidableEq F ] {feats : α → Finset F } {int sat : Finset F } {a : α } :
Built from Spec.ofFeatures , Spec.intFeatures
@[simp] theorem Spec.ofFeatures_satFeatures L402–404
{α : Type u_1} {F : Type u_3} [DecidableEq F ] {feats : α → Finset F } {int sat : Finset F } {a : α } :
Built from Spec.ofFeatures , Spec.satFeatures
The specification [INT:f, SAT:g] over a feature geometry, in which a feature is below the
features it dominates: interaction with f copies f and every feature it dominates, (8a) of
Deal 2024 , and satisfaction is bearing g.
{F : Type u_3} [Preorder F ] [LocallyFiniteOrderTop F ] (f g : F ) :
Built from Spec , Spec.ofFeatures
Used by Spec.relativized , Spec.ofGeometry_intFeatures , Spec.ofGeometry_toProbe_int_iff
The relativized probe [INT:f, SAT:f].
{F : Type u_3} [Preorder F ] [LocallyFiniteOrderTop F ] (f : F ) :
Built from Spec , Spec.ofGeometry
Used in HammerlyMathieu2026
@[simp] theorem Spec.ofGeometry_intFeatures L420–422
{α : Type u_1} {F : Type u_3} [DecidableEq F ] {feats : α → Finset F } {a : α } [Preorder F ] [LocallyFiniteOrderTop F ] {f g : F } :
Built from Spec.intFeatures , Spec.ofGeometry
When a goal bears every feature dominating one it bears, as in a privative geometry, it
interacts with [INT:f] exactly when it bears f.
{α : Type u_1} {F : Type u_3} [DecidableEq F ] {feats : α → Finset F } {a : α } [Preorder F ] [LocallyFiniteOrderTop F ] {f g : F } (hc : ∀ x ∈ feats a , ∀ y ≤ x , y ∈ feats a ) :
Built from Spec.toProbe , Spec.ofGeometry
After a goal, the interaction condition becomes any one of the features dominated by every
feature of the goal marked for dynamic interaction, and stays unchanged if the goal bears none.
{α : Type u_1} {F : Type u_3} [DecidableEq F ] (feats : α → Finset F ) [Preorder F ] [LocallyFiniteOrderTop F ] (dyn : Finset F ) (a : α ) (int : Finset (Finset F ) ) : Finset (Finset F )
Spec.dynamicUpdate feats dyn a int = if h : (feats a ∩ dyn ) .Nonempty then Finset.powersetCard 1 ((feats a ∩ dyn ) .inf' h Finset.Ici ) else int Used by Spec.subset_Ici_of_mem_dynamicUpdate , Spec.dynamicUpdate_empty , Spec.dynamicUpdate_eq_of_nonempty , Spec.dynamicUpdate_eq_self , Spec.foldl_dynamicUpdate , Spec.mem_agree_interacted_iff
Agree (30) of Deal 2025a over goals exposing feature sets, dyn the features marked for
dynamic interaction. The probe interacts by the current interaction condition, which starts as
sp.int .
{α : Type u_1} {F : Type u_3} [DecidableEq F ] (sp : Spec F ) (feats : α → Finset F ) [Preorder F ] [LocallyFiniteOrderTop F ] (dyn : Finset F ) (goals : List α ) :
The definition is too large to print here; read it in the source .
Built from Result , Spec , Spec.State
Used by Spec.agree_satisfier , Spec.agree_empty , Spec.copied_agree_empty , Spec.mem_agree_interacted_iff
A specification halts on the first goal bearing a satisfaction feature, whatever the dynamic
interaction.
{α : Type u_1} {F : Type u_3} [DecidableEq F ] (sp : Spec F ) (feats : α → Finset F ) [Preorder F ] [LocallyFiniteOrderTop F ] (dyn : Finset F ) (goals : List α ) :
Built from Spec , Spec.toProbe , Spec.agree
Dynamic interaction narrows the interaction condition to the features that a dynamic feature
of the goal dominates.
{α : Type u_1} {F : Type u_3} [DecidableEq F ] (feats : α → Finset F ) [Preorder F ] [LocallyFiniteOrderTop F ] (dyn : Finset F ) {a : α } {x : F } (hx : x ∈ feats a ∩ dyn ) {int : Finset (Finset F ) } {m : Finset F } (hm : m ∈ dynamicUpdate feats dyn a int ) : m ⊆ Finset.Ici x
Built from Spec.dynamicUpdate
@[simp] theorem Spec.dynamicUpdate_empty L470–472
{α : Type u_1} {F : Type u_3} [DecidableEq F ] (feats : α → Finset F ) [Preorder F ] [LocallyFiniteOrderTop F ] (a : α ) (int : Finset (Finset F ) ) :
Built from Spec.dynamicUpdate
Without dynamic interaction, a specification Agrees as the probe it denotes, copying the
interaction-specified features of each interacting goal.
{α : Type u_1} {F : Type u_3} [DecidableEq F ] (sp : Spec F ) (feats : α → Finset F ) [Preorder F ] [LocallyFiniteOrderTop F ] (goals : List α ) :
Built from agree , Spec , Spec.intFeatures , Spec.toProbe , Spec.agree
Without dynamic interaction, the features a specification copies are those of the interacting
goals it inspects, whatever their order.
{α : Type u_1} {F : Type u_3} [DecidableEq F ] (sp : Spec F ) (feats : α → Finset F ) [Preorder F ] [LocallyFiniteOrderTop F ] [DecidableEq α ] (goals : List α ) :
Built from inspected , Spec , Spec.intFeatures , Spec.toProbe , Spec.agree
theorem Spec.dynamicUpdate_eq_of_nonempty L499–502
{α : Type u_1} {F : Type u_3} [DecidableEq F ] (feats : α → Finset F ) [Preorder F ] [LocallyFiniteOrderTop F ] (dyn : Finset F ) {a : α } (h : (feats a ∩ dyn ) .Nonempty ) (int int' : Finset (Finset F ) ) :
Built from Spec.dynamicUpdate
theorem Spec.dynamicUpdate_eq_self L504–506
{α : Type u_1} {F : Type u_3} [DecidableEq F ] (feats : α → Finset F ) [Preorder F ] [LocallyFiniteOrderTop F ] (dyn : Finset F ) {a : α } (h : ¬ (feats a ∩ dyn ) .Nonempty ) (int : Finset (Finset F ) ) :
Built from Spec.dynamicUpdate
After a sequence of goals the interaction condition is the one the last goal bearing a dynamic
feature sets, and the initial condition if no goal bears one.
{α : Type u_1} {F : Type u_3} [DecidableEq F ] (feats : α → Finset F ) [Preorder F ] [LocallyFiniteOrderTop F ] (dyn : Finset F ) (int : Finset (Finset F ) ) (l : List α ) : List.foldl (fun (i : Finset (Finset F ) ) (a : α ) => dynamicUpdate feats dyn a i ) int l = (List.filter (fun (a : α ) => decide (feats a ∩ dyn ) .Nonempty ) l ) .getLast? .elim int fun (b : α ) => dynamicUpdate feats dyn b int
Built from Spec.dynamicUpdate
Agree with dynamic interaction flags a goal iff no goal before it satisfies the probe and it
bears a feature of the interaction condition the goals before it leave, which
foldl_dynamicUpdate reads off the last of them bearing a dynamic feature.
{α : Type u_1} {F : Type u_3} [DecidableEq F ] (sp : Spec F ) (feats : α → Finset F ) [Preorder F ] [LocallyFiniteOrderTop F ] (dyn : Finset F ) {a : α } (goals : List α ) : a ∈ (sp .agree feats dyn goals ) .interacted ↔ ∃ (l₁ : List α ) (l₂ : List α ), goals = l₁ ++ a :: l₂ ∧ (∀ b ∈ l₁ , ¬ (sp .toProbe feats ) .sat b ) ∧ feats a ∈ upperClosure ↑(List.foldl (fun (i : Finset (Finset F ) ) (b : α ) => dynamicUpdate feats dyn b i ) sp .int l₁ )
Built from Spec , Spec.toProbe , Spec.dynamicUpdate , Spec.agree