AFTD Auto-Formalizing Theoretical Domains

sages_row_other_than

def

For S ≥ 2 sages, a canonical sage other than a given sage x: seat 1 if x occupies seat 0, and seat 0 otherwise.

Statement

def sages_row_other_than {S : ℕ} (hS : 2 ≤ S) (x : Fin S) : Fin S
Source
step towards sages_row_upper_bound_binomial
Verified
29 Oct 2026
Axioms
none listed
Used by 3
  • sages_row_other_than_neFor S ≥ 2, the canonical other sage of x (seat 1 if x is at seat 0, else seat 0) is not x.
  • sages_row_pair_protocolEvery sage in a row announces the unordered pair consisting of themselves together with their right neighbour; the rightmost sage, who has…
  • sages_row_upper_bound_binomialFor every integer S ≥ 3, the anonymous-slip puzzle for S sages in a row with unlabeled seats can be solved using Nat.choose S 2 symbols.

Lean source view module on GitHub

/-- A default partner distinct from x, used by `sages_row_pair_protocol` on local views that carry no neighbour at all. -/
def sages_row_other_than {S : ℕ} (hS : 2 ≤ S) (x : Fin S) : Fin S := ⟨if x.val = 0 then 1 else 0, by split_ifs with h <;> omega⟩
See it in the graphDiscuss this resultChallenge it