AFTD Auto-Formalizing Theoretical Domains

handshake_touchers

def

The set of vertices that directly touch the glove side s during the handshake h: for a single handshake x|a opp(a)|y the vertex x touches a and y touches the opposite side; for a double handshake x|a|b|y the vertex x touches a and y touches b; every other side is untouched. (In a double handshake the two outer sides merely exchange contamination, they are not touched.)

Statement

def handshake_touchers {V : Type*} {Γ : Type*} [DecidableEq Γ] (h : Handshake V Γ) (s : Γ × Bool) : Set V
Source
step towards glove_number_k4
Verified
18 Oct 2026
Axioms
none listed
Built on 2
  • opp_glove_sideThe opposite side of a glove side $(g, b)$ in $\Gamma \times \mathrm{Bool}$ is $(g, \neg b)$, representing the inside-out orientation of…
  • HandshakeA handshake between vertices in $V$ using gloves from $\Gamma$, which is either single-gloved (one vertex wears a glove side inside, the…
Used by 4
  • seq_touchersThe set of vertices that directly touch the glove side s at some handshake of the sequence seq (the union of the touch sets of the…
  • seq_touchers_subset_contamContamination is monotone in the following sense: after running the sequence seq from the contamination map t, the contamination of…
  • handshake_clean_update_contam_subset_toucherIf the handshake h is clean with respect to the contamination map t and the vertex v touches the side s during h, then after…
  • seq_touchers_subsingletonIn a clean handshake sequence, each glove side is directly touched by at most one vertex: the set of touching vertices of a side is a…

Lean source view module on GitHub

/-- The vertices that directly touch the glove side `s` during the handshake `h`. -/
def handshake_touchers {V : Type*} {Γ : Type*} [DecidableEq Γ] (h : Handshake V Γ) (s : Γ × Bool) : Set V := match h with
  | .single x a y => if s = a then {x} else if s = opp_glove_side a then {y} else ∅
  | .double x a b y => if s = a then {x} else if s = b then {y} else ∅
See it in the graphDiscuss this resultChallenge it