Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Footnote 2, p. 11 — the chain definition of M′M'M′ agrees with ⋁i=1dMi\bigvee_{i=1}^d M^i⋁i=1d​Mi

Proved
WarshallBool.Closure.chainRel_iff_powerSum

by mikedeng1 · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

boolean-matricesp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1transitive-closurewarshall-algorithm

Let M=(mij)M = (m_{ij})M=(mij​) be a d×dd \times dd×d matrix with entries in {0,1}\{0,1\}{0,1}, and let i,ji, ji,j be indices. Write MpM^pMp for the boolean powers of MMM (M1=MM^1 = MM1=M, Mp+1=Mp∧MM^{p+1} = M^p \wedge MMp+1=Mp∧M, with (A∧B)ij=⋁k(aik∧bkj)(A \wedge B)_{ij} = \bigvee_k (a_{ik} \wedge b_{kj})(A∧B)ij​=⋁k​(aik​∧bkj​)).

Then either mij=1m_{ij} = 1mij​=1 or there are indices k1,…,knk_1, \dots, k_nk1​,…,kn​ with mik1=mk1k2=⋯=mknj=1m_{ik_1} = m_{k_1k_2} = \cdots = m_{k_nj} = 1mik1​​=mk1​k2​​=⋯=mkn​j​=1, if and only if

(⋁p=1dMp)ij=1.\Bigl(\bigvee_{p=1}^{d} M^p\Bigr)_{ij} = 1 .(p=1⋁d​Mp)ij​=1.

This is footnote 2 of Warshall's note: the THEOREM's chain definition of M′M'M′ "is trivially equivalent to" the introduction's M′=⋁i=1dMiM' = \bigvee_{i=1}^d M^iM′=⋁i=1d​Mi. The content beyond unfolding definitions is that chains may be taken of length at most ddd, so that the powers up to MdM^dMd suffice.

Formalization Note Indices run over {0,…,d−1}\{0, \dots, d-1\}{0,…,d−1} instead of {1,…,d}\{1, \dots, d\}{1,…,d}, and 111 is true. The chain side is the proposition that some (possibly empty) list k1,…,knk_1, \dots, k_nk1​,…,kn​ of indices makes i,k1,…,kn,ji, k_1, \dots, k_n, ji,k1​,…,kn​,j a chain of entries equal to 111; the empty list is the case mij=1m_{ij} = 1mij​=1. There is no reflexive closure on either side.

Preamble
import Mathlib
import Definitions.Def_WarshallBool_Closure_Setting
Formal statement
namespace WarshallBool.Closure

/-- Warshall (1962), p. 11, footnote 2: the chain definition of `M′` in the THEOREM agrees
with the introduction's `M′ = ∨_{p=1}^{d} M^p`. -/
theorem chainRel_iff_powerSum {d : ℕ} (M : Fin d → Fin d → Bool) (i j : Fin d) :
    ChainRel M i j ↔ powerSum M i j = true := by sorry

end WarshallBool.Closure
Source
Warshall, A theorem on Boolean matrices, J. ACM 9 (1962), p. 11, THEOREM (definition of M′) and footnote 2 ('This definition of M′ is trivially equivalent to the previous one'), with the introduction's display M′ = ∨_{i=1}^d M^i
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 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