Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Bounded-depth Frege systems FdF_dFd​: formulas, proofs, size, separation

Definition
FdVersusFdSucc_defs

by Lucas · Oct 11, 2026 · Mathlib 0df444a (Lean v4.33.1)

logicproof-complexity

Definitions for bounded-depth Frege systems FdF_dFd​.

  1. Formulas are in negation normal form over variables p0,p1,…p_0,p_1,\dotsp0​,p1​,…: literals pip_ipi​, ¬pi\neg p_i¬pi​, and conjunctions ⋀(A1,…,Am)\bigwedge(A_1,\dots,A_m)⋀(A1​,…,Am​) and disjunctions ⋁(A1,…,Am)\bigvee(A_1,\dots,A_m)⋁(A1​,…,Am​) of any finite number m≥0m\ge 0m≥0 of formulas (⋀()\bigwedge()⋀() is true, ⋁()\bigvee()⋁() is false). A‾\overline{A}A denotes the De Morgan negation of AAA.
  2. Depth: literals have depth 000; depth⁡⋀(Aj)=depth⁡⋁(Aj)=1+max⁡jdepth⁡Aj\operatorname{depth}\bigwedge(A_j)=\operatorname{depth}\bigvee(A_j)=1+\max_j\operatorname{depth}A_jdepth⋀(Aj​)=depth⋁(Aj​)=1+maxj​depthAj​. Size ∣A∣|A|∣A∣: number of literal and connective symbols. A tautology is true under every assignment.
  3. The system FdF_dFd​. Lines are sequents Γ\GammaΓ (finite lists of formulas, read disjunctively). Rules: axiom (Γ\GammaΓ contains pip_ipi​ and ¬pi\neg p_i¬pi​); ∧\wedge∧-introduction (from A,ΓA,\GammaA,Γ for each A∈{A1,…,Am}A\in\{A_1,\dots,A_m\}A∈{A1​,…,Am​} infer ⋀(A1,…,Am),Γ\bigwedge(A_1,\dots,A_m),\Gamma⋀(A1​,…,Am​),Γ); ∨\vee∨-introduction (from Aj,ΓA_j,\GammaAj​,Γ infer ⋁(A1,…,Am),Γ\bigvee(A_1,\dots,A_m),\Gamma⋁(A1​,…,Am​),Γ); weakening (from Γ\GammaΓ infer any Δ⊇Γ\Delta\supseteq\GammaΔ⊇Γ); cut (from A,ΓA,\GammaA,Γ and A‾,Γ\overline A,\GammaA,Γ infer Γ\GammaΓ). An FdF_dFd​-proof of AAA is a sequence of sequents, each obtained from earlier ones by a rule, all of whose formulas have depth ≤d\le d≤d, containing the one-formula sequent AAA. Its size is the total size of all formulas in all lines.
  4. Separation. A family (τm)m∈N(\tau_m)_{m\in\mathbb N}(τm​)m∈N​ requires exponential FdF_dFd​-size if there is ε>0\varepsilon>0ε>0 such that for all large mmm every FdF_dFd​-proof of τm\tau_mτm​ has size ≥2∣τm∣ε\ge 2^{|\tau_m|^{\varepsilon}}≥2∣τm​∣ε. PolySeparates(k,d,τ)\mathrm{PolySeparates}(k,d,\tau)PolySeparates(k,d,τ): all τm\tau_mτm​ are tautologies of depth ≤k\le k≤k with ∣τm∣≥m|\tau_m|\ge m∣τm​∣≥m, there is CCC with Fd+1F_{d+1}Fd+1​-proofs of τm\tau_mτm​ of size ≤C∣τm∣C\le C|\tau_m|^C≤C∣τm​∣C, and τ\tauτ requires exponential FdF_dFd​-size. QuasiPolySeparates(k,d,τ)\mathrm{QuasiPolySeparates}(k,d,\tau)QuasiPolySeparates(k,d,τ): the same with Fd+1F_{d+1}Fd+1​-proof size ≤2C(log⁡2∣τm∣)C\le 2^{C(\log_2|\tau_m|)^C}≤2C(log2​∣τm​∣)C.
  5. Pigeonhole principle PHPnn+1\mathrm{PHP}^{n+1}_nPHPnn+1​, with pi,jp_{i,j}pi,j​ the variable of index ⟨i,j⟩\langle i,j\rangle⟨i,j⟩ (Cantor-style pairing Nat.pair):
⋁i≤n⋀j<n¬pi,j ∨ ⋁j<n ⋁i<i′≤n(pi,j∧pi′,j).\bigvee_{i\le n}\bigwedge_{j<n}\neg p_{i,j}\ \vee\ \bigvee_{j<n}\ \bigvee_{i<i'\le n}(p_{i,j}\wedge p_{i',j}).i≤n⋁​j<n⋀​¬pi,j​ ∨ j<n⋁​ i<i′≤n⋁​(pi,j​∧pi′,j​).

These are the objects in which all statements of the mission are phrased.

Formalization Note FdF_dFd​ is presented as the dag-like one-sided (Tait-style) sequent calculus with cut restricted to depth-≤d\le d≤d formulas, a standard formulation of bounded-depth systems (cf. the sequent calculi LK_d in Krajíček's book); Frege systems in the narrow sense (formula lines, Hilbert-style rules) are polynomially related to it, but the exact depth correspondence depends on conventions. Sequents are lists and weakening is list inclusion, so exchange and contraction are instances of weakening.

Definition code
import Mathlib

/-!
# Bounded-depth Frege systems `F_d`

Definitions for the Prove2Me mission draft "`F_d` versus `F_{d+1}`"
(Open Problem Garden, problem posed by J. Krajíček).

* `Formula` — propositional formulas in negation normal form over the variables `ℕ`,
  built from literals with unbounded fan-in conjunctions and disjunctions
  (the De Morgan language).
* `Formula.depth`, `Formula.size` — depth (literals have depth `0`, a gate adds `1`)
  and size (number of symbols).
* `Formula.IsTautology` — truth under every assignment.
* `Step`, `IsDepthProof`, `IsDepthProofOf`, `proofSize` — the depth-`d` Frege system `F_d`,
  presented as the dag-like one-sided (Tait-style) sequent calculus with cut, in which
  every formula occurring in the proof has depth at most `d`.
* `RequiresExpSize`, `PolySeparates`, `QuasiPolySeparates` — the separation properties
  asked for by the problem; `php` — the pigeonhole tautologies.
-/

namespace FdVersusFdSucc

/-- Propositional formulas in negation normal form over variables indexed by `ℕ`:
positive and negative literals, and unbounded fan-in conjunctions and disjunctions.
`and []` is the constant *true* and `or []` is the constant *false*. -/
inductive Formula : Type
  | pos : ℕ → Formula
  | neg : ℕ → Formula
  | and : List Formula → Formula
  | or : List Formula → Formula

namespace Formula

/-- Truth value of a formula under the assignment `v`. -/
def eval (v : ℕ → Bool) : Formula → Bool
  | pos i => v i
  | neg i => !v i
  | and As => As.attach.all fun ⟨A, _⟩ => eval v A
  | or As => As.attach.any fun ⟨A, _⟩ => eval v A

/-- The (De Morgan) negation of a formula, again in negation normal form. -/
def dual : Formula → Formula
  | pos i => neg i
  | neg i => pos i
  | and As => or (As.attach.map fun ⟨A, _⟩ => dual A)
  | or As => and (As.attach.map fun ⟨A, _⟩ => dual A)

/-- Depth: literals have depth `0`; a conjunction or disjunction has depth one more than the
maximal depth of its arguments (so a clause has depth `1` and a CNF has depth `2`). -/
def depth : Formula → ℕ
  | pos _ => 0
  | neg _ => 0
  | and As => (As.attach.map fun ⟨A, _⟩ => depth A).foldr max 0 + 1
  | or As => (As.attach.map fun ⟨A, _⟩ => depth A).foldr max 0 + 1

/-- Size: the number of symbols (literals and connectives) in the formula. -/
def size : Formula → ℕ
  | pos _ => 1
  | neg _ => 1
  | and As => (As.attach.map fun ⟨A, _⟩ => size A).sum + 1
  | or As => (As.attach.map fun ⟨A, _⟩ => size A).sum + 1

/-- A tautology is a formula true under every assignment. -/
def IsTautology (A : Formula) : Prop := ∀ v : ℕ → Bool, A.eval v = true

end Formula

open Formula

/-- A sequent is a finite list of formulas, read disjunctively. -/
abbrev Sequent : Type := List Formula

/-- `Step prev Γ`: the sequent `Γ` follows by one inference rule from sequents occurring in
`prev` (the earlier lines of the proof). The rules are those of the one-sided sequent
calculus:
* axiom: `Γ` contains a complementary pair of literals `pᵢ, ¬pᵢ`;
* `∧`-introduction: from `A, Γ` for every `A ∈ As` infer `⋀As, Γ`
  (with `As = []` this is the axiom for the constant *true*);
* `∨`-introduction: from `A, Γ` for some `A ∈ As` infer `⋁As, Γ`;
* weakening (which also covers exchange and contraction): from `Γ` infer any `Δ` that
  contains every member of `Γ`;
* cut: from `A, Γ` and `¬A, Γ` infer `Γ`. -/
inductive Step (prev : List Sequent) : Sequent → Prop
  | ax (Γ : Sequent) (i : ℕ) : pos i ∈ Γ → neg i ∈ Γ → Step prev Γ
  | andI (Γ : Sequent) (As : List Formula) :
      (∀ A ∈ As, (A :: Γ) ∈ prev) → Step prev (and As :: Γ)
  | orI (Γ : Sequent) (As : List Formula) (A : Formula) :
      A ∈ As → (A :: Γ) ∈ prev → Step prev (or As :: Γ)
  | weaken (Γ Δ : Sequent) : Γ ∈ prev → Γ ⊆ Δ → Step prev Δ
  | cut (Γ : Sequent) (A : Formula) :
      (A :: Γ) ∈ prev → (A.dual :: Γ) ∈ prev → Step prev Γ

/-- `IsDepthProof d π`: the list of sequents `π` is a proof in the depth-`d` Frege system
`F_d`, i.e. every line follows from earlier lines by one rule of `Step` (proofs are
dag-like: a line may be used any number of times), and every formula occurring in `π` has
depth at most `d`. -/
def IsDepthProof (d : ℕ) (π : List Sequent) : Prop :=
  (∀ (i : ℕ) (h : i < π.length), Step (π.take i) π[i]) ∧
  ∀ Γ ∈ π, ∀ A ∈ Γ, A.depth ≤ d

/-- `IsDepthProofOf d π A`: `π` is an `F_d`-proof of the formula `A`, i.e. a depth-`d` proof
containing the one-formula sequent `A` as one of its lines. -/
def IsDepthProofOf (d : ℕ) (π : List Sequent) (A : Formula) : Prop :=
  IsDepthProof d π ∧ [A] ∈ π

/-- The size of a proof: the total number of symbols in all formulas of all its lines. -/
def proofSize (π : List Sequent) : ℕ :=
  (π.map fun Γ => (Γ.map Formula.size).sum).sum

/-- `RequiresExpSize d τ`: the formulas `τ m` require exponential-size proofs in `F_d`:
there is `ε > 0` such that for all sufficiently large `m`, every `F_d`-proof of `τ m` has
size at least `2^(size(τ m)^ε)`. -/
def RequiresExpSize (d : ℕ) (τ : ℕ → Formula) : Prop :=
  ∃ ε : ℝ, 0 < ε ∧ ∀ᶠ m in Filter.atTop, ∀ π, IsDepthProofOf d π (τ m) →
    (2 : ℝ) ^ (((τ m).size : ℝ) ^ ε) ≤ (proofSize π : ℝ)

/-- `PolySeparates k d τ`: the sequence `τ 0, τ 1, …` is a family of tautologies of depth at
most `k` and of unbounded size (`m ≤ size(τ m)`), which have polynomial-size `F_{d+1}`-proofs
(there is `C` such that every `τ m` has an `F_{d+1}`-proof of size at most
`C · size(τ m)^C`) but require exponential-size `F_d`-proofs (`RequiresExpSize d τ`). -/
def PolySeparates (k d : ℕ) (τ : ℕ → Formula) : Prop :=
  (∀ m, (τ m).IsTautology) ∧
  (∀ m, (τ m).depth ≤ k) ∧
  (∀ m, m ≤ (τ m).size) ∧
  (∃ C : ℕ, ∀ m, ∃ π, IsDepthProofOf (d + 1) π (τ m) ∧ proofSize π ≤ C * (τ m).size ^ C) ∧
  RequiresExpSize d τ

/-- `QuasiPolySeparates k d τ`: as `PolySeparates k d τ`, but the `F_{d+1}`-proofs are only
required to have quasi-polynomial size: there is `C` such that every `τ m` has an
`F_{d+1}`-proof of size at most `2^(C · (log₂ size(τ m))^C)`. -/
def QuasiPolySeparates (k d : ℕ) (τ : ℕ → Formula) : Prop :=
  (∀ m, (τ m).IsTautology) ∧
  (∀ m, (τ m).depth ≤ k) ∧
  (∀ m, m ≤ (τ m).size) ∧
  (∃ C : ℕ, ∀ m, ∃ π, IsDepthProofOf (d + 1) π (τ m) ∧
      (proofSize π : ℝ) ≤ (2 : ℝ) ^ ((C : ℝ) * Real.logb 2 ((τ m).size : ℝ) ^ C)) ∧
  RequiresExpSize d τ

/-- The propositional variable `p_{i,j}` ("pigeon `i` sits in hole `j`"), encoded as the
variable with index `Nat.pair i j`. -/
def phpVar (i j : ℕ) : ℕ := Nat.pair i j

/-- The pigeonhole principle `PHP^{n+1}_n` as a depth-2 formula in negation normal form:
either some pigeon `i ≤ n` sits in no hole `j < n`, or two distinct pigeons `i < i' ≤ n`
share a hole `j < n`:
`⋁_{i ≤ n} ⋀_{j < n} ¬p_{i,j}  ∨  ⋁_{j < n} ⋁_{i < i' ≤ n} (p_{i,j} ∧ p_{i',j})`. -/
def php (n : ℕ) : Formula :=
  or ((List.range (n + 1)).map (fun i => and ((List.range n).map fun j => neg (phpVar i j))) ++
    (List.range n).flatMap fun j =>
      (List.range (n + 1)).flatMap fun i =>
        ((List.range (n + 1)).filter fun i' => i < i').map fun i' =>
          and [pos (phpVar i j), pos (phpVar i' j)])

end FdVersusFdSucc
Source
Definitions following J. Krajíček, Bounded arithmetic, propositional logic, and complexity theory, CUP 1995; Open Problem Garden, 'F_d versus F_{d+1}' (J. Krajíček), http://www.openproblemgarden.org/op/f_d_versus_f_d_1
Human review
  • Endorsed by Shuze Chen · Oct 11, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · Oct 11, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me