contains
Defines list membership for stakeholder identifiers in conflict graphs. Modelers of ethical constraints in multi-agent systems reference it for basic containment checks during graph traversal. The implementation delegates to List.any with a decidable equality test on strings.
claimFor a list $xs$ of stakeholder labels and a stakeholder $s$, contains$(xs, s)$ returns true precisely when $s$ appears in $xs$.
background
The StakeGraph module models stakeholder relationships for conflict-of-interest detection, where each Stakeholder is a String label. This contains definition provides the primitive membership test on lists of such labels. It parallels the interval containment predicate from Numerics.Interval.Basic, which checks whether a real lies between lo and hi bounds, but here the domain is discrete string equality.
proof idea
One-line definition that applies List.any to the input list, using decide on structural equality to return a Bool.
why it matters in Recognition Science
This membership test underpins the reachable definition in the same module, which implements depth-first search for stakeholder connectivity. It appears in downstream results for cellular automata runtime hypotheses, J-cost calculations in complexity, and vertex cover instances, indicating its role in propagating ethical constraints across formal models. In the Recognition framework it supports the ethics layer that interfaces with complexity and cosmology pipelines.
scope and limits
- Does not remove duplicates from the input list.
- Does not traverse graph edges, only checks direct list presence.
- Does not distinguish between different stakeholder types beyond string equality.
- Does not provide asymptotic complexity guarantees.
Lean usage
def test : Bool := contains [``Alice``, ``Bob``] ``Alice``
formal statement (Lean)
15def contains (xs : List Stakeholder) (s : Stakeholder) : Bool :=
proof body
Definition body.
16 xs.any (fun x => decide (x = s))
17
used by (40)
-
H_SATCARuntime -
jcostEdgeWeight_le_clauses -
Instance -
zAgingChannel_count -
reachable -
aggCoeff_rowMoves_aux_theorem -
mem_toMoves_of_coeff_ne_zero -
phi3_eq -
RSExists_stable -
has_distinguishable_events -
firstPassProgram_nodup -
firstPassSchedule_mem_high_or_immediate -
Recognizer -
J_stationary -
unity_has_no_phi_structure -
self_feasible -
gutenbergRichterCert -
liCoupling -
phi_irrational_information -
simulation_reduces_to_tautology -
simulation_unprovable -
chain_unique_given_edge_pair -
current_chain_distinct -
numberSystemCount -
congruence_offsets_unique -
nine801_eq_9_times_11_sq -
integral_radial_skew_identity_from -
denseDomain_nonempty -
concreteDirectedEulerLedgerSystem -
oscOn_Icc_le_drop_of_antitone