AFTD Auto-Formalizing Theoretical Domains

list_switches_nil

theoremverified

The number of switches in the empty list of booleans is zero.

Statement

theorem list_switches_nil : list_switches [] = 0
Source
arXiv:2611.28727 Fig. 9
Verified
29 Nov 2026
Axioms
propext
Built on 1
  • list_switchesThe function list_switches counts the number of indices where adjacent elements in a list of booleans differ, defined recursively.

Read back from the Lean

list_switches applied to the empty list [] equals 0.

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

/-- The empty list has zero switches. -/
theorem list_switches_nil : list_switches [] = 0 := rfl
See it in the graphDiscuss this resultChallenge it