AFTD Auto-Formalizing Theoretical Domains

handshake_is_clean

def

A handshake is clean with respect to a contamination map $t : \Gamma \times \mathrm{Bool} \to \mathrm{Set}(V)$ if no player directly touches a glove side containing contaminants from another player, and in a double handshake the two players wear distinct gloves.

Statement

def handshake_is_clean {V : Type*} {Γ : Type*} (h : Handshake V Γ) (t : Γ × Bool → Set V) : Prop
Defined in
scout/2610-17602-clean-handshake-sequences.md:212
Verified
18 Oct 2026
Axioms
none listed
Built on 2
  • HandshakeA handshake between vertices in $V$ using gloves from $\Gamma$, which is either single-gloved (one vertex wears a glove side inside, the…
  • 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…
Used by 7

Read back from the Lean

Given types V and Γ, a handshake h : Handshake V Γ, and a map t : Γ × Bool → Set V, the property handshake_is_clean h t is defined by cases on h: 1. If h = Handshake.single x a y (where x, y : V and a : Γ × Bool): it asserts that t a ⊆ {x} and t (opp_glove_side a) ⊆ {y}. 2. If h = Handshake.double x a b y (where x, y : V and a, b : Γ × Bool): it asserts that a.1 ≠ b.1 (the first components of a and b in Γ are distinct), t a ⊆ {x}, and t b ⊆ {y}.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- Cleanliness condition for a handshake given contamination sets. -/
def handshake_is_clean {V : Type*} {Γ : Type*} (h : Handshake V Γ) (t : Γ × Bool → Set V) : Prop := match h with
  | .single x a y => t a ⊆ {x} ∧ t (opp_glove_side a) ⊆ {y}
  | .double x a b y => a.1 ≠ b.1 ∧ t a ⊆ {x} ∧ t b ⊆ {y}
See it in the graphDiscuss this resultChallenge it