AFTD Auto-Formalizing Theoretical Domains

is_subcube

def

For an implicit dimension $n$, a dimension $d : \mathbb{N}$, and a finite subset $F : \mathrm{Finset} (\mathrm{Fin}\ n \to \mathrm{Bool})$, is_subcube d F holds if there exist a subset of coordinates $S : \mathrm{Finset} (\mathrm{Fin}\ n)$ and a pattern $c : \mathrm{Fin}\ n \to \mathrm{Bool}$ such that $|S| + d = n$ and $F$ consists of all $x : \mathrm{Fin}\ n \to \mathrm{Bool}$ that satisfy $x(i) = c(i)$ for all $i \in S$.

Statement

def is_subcube {n : ℕ} (d : ℕ) (F : Finset (Fin n → Bool)) : Prop
Defined in
arXiv:2610.40486 Sec. 1
Verified
30 Oct 2026
Axioms
none listed
Used by 3

Read back from the Lean

Given an implicit natural number $n$, a natural number $d$, and a finite set $F$ of functions from $\mathrm{Fin}\ n$ to $\mathrm{Bool}$, is_subcube d F asserts that there exist a subset $S \subseteq \mathrm{Fin}\ n$ (as a Finset) and a function $c : \mathrm{Fin}\ n \to \mathrm{Bool}$ such that: 1. $|S| + d = n$, and 2. $F$ is the set of all $x : \mathrm{Fin}\ n \to \mathrm{Bool}$ satisfying $x(i) = c(i)$ for all $i \in S$.

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

/-- A subset `F` of the Boolean hypercube `Fin n → Bool` is a `d`-dimensional subcube if `n - d` coordinates are fixed to values in `c`. -/
def is_subcube {n : ℕ} (d : ℕ) (F : Finset (Fin n → Bool)) : Prop := ∃ (S : Finset (Fin n)) (c : Fin n → Bool),
    S.card + d = n ∧ F = Finset.univ.filter (fun x => ∀ i ∈ S, x i = c i)
See it in the graphDiscuss this resultChallenge it