Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The reordered basis (e0,e1,e2,e4∣e3,e5,e6,e7)(e_0, e_1, e_2, e_4 \mid e_3, e_5, e_6, e_7)(e0​,e1​,e2​,e4​∣e3​,e5​,e6​,e7​) and the two 4×44\times44×4 blocks of the flow matrix

Definition
OctonionD8_blocks

by ShapeZero · Sep 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

characteristic-polynomialfano-planelinear-algebraoctonions

The reordering. blockEquiv is the bijection from the indices {0,…,7}\{0, \dots, 7\}{0,…,7} to two copies of {0,1,2,3}\{0, 1, 2, 3\}{0,1,2,3} that sends 0,1,2,40, 1, 2, 40,1,2,4 to positions 0,1,2,30, 1, 2, 30,1,2,3 of the first block and 3,5,6,73, 5, 6, 73,5,6,7 to positions 0,1,2,30, 1, 2, 30,1,2,3 of the second: the basis order (e0,e1,e2,e4∣e3,e5,e6,e7)(e_0, e_1, e_2, e_4 \mid e_3, e_5, e_6, e_7)(e0​,e1​,e2​,e4​∣e3​,e5​,e6​,e7​).

The blocks. For real c,sc, sc,s,

A=(0−c−1−s0c+100ss001−c0−sc−10),B=(0−s01−cs01−c00c−10−sc−10s0),A = \begin{pmatrix} 0 & -c-1 & -s & 0 \\ c+1 & 0 & 0 & s \\ s & 0 & 0 & 1-c \\ 0 & -s & c-1 & 0 \end{pmatrix}, \qquad B = \begin{pmatrix} 0 & -s & 0 & 1-c \\ s & 0 & 1-c & 0 \\ 0 & c-1 & 0 & -s \\ c-1 & 0 & s & 0 \end{pmatrix},A=​0c+1s0​−c−100−s​−s00c−1​0s1−c0​​,B=​0s0c−1​−s0c−10​01−c0s​1−c0−s0​​,

intended as the blocks of the flow matrix on (e0,e1,e2,e4)(e_0, e_1, e_2, e_4)(e0​,e1​,e2​,e4​) and on (e3,e5,e6,e7)(e_3, e_5, e_6, e_7)(e3​,e5​,e6​,e7​).

Formalization Note blockEquiv : Fin 8 ≃ Fin 4 ⊕ Fin 4; blockA c s and blockB c s are explicit Matrix (Fin 4) (Fin 4) ℝ.

Definition code
import Mathlib
import Definitions.Def_OctonionD8_flow

namespace OctonionD8

/-- Reordering of the basis e₀, …, e₇ as (e₀, e₁, e₂, e₄ | e₃, e₅, e₆, e₇):
indices 0, 1, 2, 4 go to the first block, 3, 5, 6, 7 to the second, in that order. -/
def blockEquiv : Fin 8 ≃ Fin 4 ⊕ Fin 4 where
  toFun := ![Sum.inl 0, Sum.inl 1, Sum.inl 2, Sum.inr 0, Sum.inl 3, Sum.inr 1, Sum.inr 2, Sum.inr 3]
  invFun := Sum.elim ![0, 1, 2, 4] ![3, 5, 6, 7]
  left_inv := by decide
  right_inv := by decide

/-- The block of `flowMat c s` on (e₀, e₁, e₂, e₄). -/
def blockA (c s : ℝ) : Matrix (Fin 4) (Fin 4) ℝ := !![0, -c - 1, -s, 0;
    c + 1, 0, 0, s;
    s, 0, 0, 1 - c;
    0, -s, c - 1, 0]

/-- The block of `flowMat c s` on (e₃, e₅, e₆, e₇). -/
def blockB (c s : ℝ) : Matrix (Fin 4) (Fin 4) ℝ := !![0, -s, 0, 1 - c;
    s, 0, 1 - c, 0;
    0, c - 1, 0, -s;
    c - 1, 0, s, 0]

end OctonionD8
Source
Motivated by the two-generator D8 flow in the Shape Zero derivation (Shape Zero LLC): https://github.com/ShapeZeroSZ/shape-zero/blob/main/00_START_HERE/MODEL_SPEC.md §1b and https://github.com/ShapeZeroSZ/shape-zero/blob/main/02_synthesis/D8_SYNTHESIS.md (block decomposition of the flow matrix) ; Fano plane: Prove2Me definition RolesForceSeven.fano (mission "The role postulates force exactly seven points") ; public references: Wikipedia, "Octonion": https://en.wikipedia.org/wiki/Octonion ; Wikipedia, "Fano plane": https://en.wikipedia.org/wiki/Fano_plane
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Conventions. All three declarations live in the namespace OctonionD8. Indices of Fin 8\mathrm{Fin}\,8Fin8 are 0,1,…,70,1,\dots,70,1,…,7 and indices of Fin 4\mathrm{Fin}\,4Fin4 are 0,1,2,30,1,2,30,1,2,3 (zero-based, exactly as in the code). None of the three definitions refers to anything from the imported files (the octonion table, omul\mathrm{omul}omul, RRR, LLL, flowMat\mathrm{flowMat}flowMat, the Fano plane); they are written out by hand with explicit literal entries.

blockEquiv. This is a bijection

blockEquiv:{0,…,7}  → ∼   {0,1,2,3}⊔{0,1,2,3},\mathrm{blockEquiv} : \{0,\dots,7\} \;\xrightarrow{\ \sim\ }\; \{0,1,2,3\} \sqcup \{0,1,2,3\},blockEquiv:{0,…,7} ∼ ​{0,1,2,3}⊔{0,1,2,3},

where the target is the disjoint union of two copies of Fin 4\mathrm{Fin}\,4Fin4, a "left" copy (written ιL(i)\iota_L(i)ιL​(i)) and a "right" copy (written ιR(i)\iota_R(i)ιR​(i)). The forward map is the explicit table

0↦ιL(0),1↦ιL(1),2↦ιL(2),3↦ιR(0),0 \mapsto \iota_L(0),\quad 1 \mapsto \iota_L(1),\quad 2 \mapsto \iota_L(2),\quad 3 \mapsto \iota_R(0),0↦ιL​(0),1↦ιL​(1),2↦ιL​(2),3↦ιR​(0), 4↦ιL(3),5↦ιR(1),6↦ιR(2),7↦ιR(3).4 \mapsto \iota_L(3),\quad 5 \mapsto \iota_R(1),\quad 6 \mapsto \iota_R(2),\quad 7 \mapsto \iota_R(3).4↦ιL​(3),5↦ιR​(1),6↦ιR​(2),7↦ιR​(3).

So the left block consists of the indices 0,1,2,40,1,2,40,1,2,4 (in that order, becoming left-indices 0,1,2,30,1,2,30,1,2,3) and the right block consists of the indices 3,5,6,73,5,6,73,5,6,7 (in that order, becoming right-indices 0,1,2,30,1,2,30,1,2,3). The inverse map is

ιL(0),ιL(1),ιL(2),ιL(3)↦0,1,2,4,ιR(0),ιR(1),ιR(2),ιR(3)↦3,5,6,7,\iota_L(0),\iota_L(1),\iota_L(2),\iota_L(3) \mapsto 0,1,2,4, \qquad \iota_R(0),\iota_R(1),\iota_R(2),\iota_R(3) \mapsto 3,5,6,7,ιL​(0),ιL​(1),ιL​(2),ιL​(3)↦0,1,2,4,ιR​(0),ιR​(1),ιR​(2),ιR​(3)↦3,5,6,7,

and the two inverse laws are checked by exhaustive computation. Note that the order within each block is increasing, but the split is not "first four / last four": index 333 goes to the right block and index 444 to the left block.

blockA. For arbitrary real numbers c,sc, sc,s (no relation between them is assumed; in particular c2+s2=1c^2+s^2=1c2+s2=1 is not required), A(c,s)A(c,s)A(c,s) is the real 4×44\times 44×4 matrix whose entry in row iii, column jjj (i,j∈{0,1,2,3}i,j\in\{0,1,2,3\}i,j∈{0,1,2,3}) is given by

A(c,s)=(0−(c+1)−s0c+100ss001−c0−sc−10),A(c,s) = \begin{pmatrix} 0 & -(c+1) & -s & 0 \\ c+1 & 0 & 0 & s \\ s & 0 & 0 & 1-c \\ 0 & -s & c-1 & 0 \end{pmatrix},A(c,s)=​0c+1s0​−(c+1)00−s​−s00c−1​0s1−c0​​,

rows listed top to bottom as i=0,1,2,3i=0,1,2,3i=0,1,2,3 and columns left to right as j=0,1,2,3j=0,1,2,3j=0,1,2,3. Entry by entry, the nonzero entries are

A01=−c−1,  A02=−s,  A10=c+1,  A13=s,  A20=s,  A23=1−c,  A31=−s,  A32=c−1,A_{01} = -c-1,\; A_{02} = -s,\; A_{10} = c+1,\; A_{13} = s,\; A_{20} = s,\; A_{23} = 1-c,\; A_{31} = -s,\; A_{32} = c-1,A01​=−c−1,A02​=−s,A10​=c+1,A13​=s,A20​=s,A23​=1−c,A31​=−s,A32​=c−1,

and all other entries (A00,A03,A11,A12,A21,A22,A30,A33A_{00},A_{03},A_{11},A_{12},A_{21},A_{22},A_{30},A_{33}A00​,A03​,A11​,A12​,A21​,A22​,A30​,A33​) are 000. As written, Aji=−AijA_{ji} = -A_{ij}Aji​=−Aij​ for all i,ji,ji,j (the matrix is skew-symmetric for every c,sc,sc,s). Degenerate values: at c=1,s=0c=1,s=0c=1,s=0 the only nonzero entries are A01=−2A_{01}=-2A01​=−2, A10=2A_{10}=2A10​=2; at c=−1,s=0c=-1,s=0c=−1,s=0 the only nonzero entries are A23=2A_{23}=2A23​=2, A32=−2A_{32}=-2A32​=−2.

blockB. For arbitrary real numbers c,sc, sc,s (again unconstrained), B(c,s)B(c,s)B(c,s) is the real 4×44\times 44×4 matrix with rows i=0,1,2,3i=0,1,2,3i=0,1,2,3 top to bottom and columns j=0,1,2,3j=0,1,2,3j=0,1,2,3 left to right:

B(c,s)=(0−s01−cs01−c00c−10−sc−10s0).B(c,s) = \begin{pmatrix} 0 & -s & 0 & 1-c \\ s & 0 & 1-c & 0 \\ 0 & c-1 & 0 & -s \\ c-1 & 0 & s & 0 \end{pmatrix}.B(c,s)=​0s0c−1​−s0c−10​01−c0s​1−c0−s0​​.

Entry by entry, the possibly nonzero entries are

B01=−s,  B03=1−c,  B10=s,  B12=1−c,  B21=c−1,  B23=−s,  B30=c−1,  B32=s,B_{01} = -s,\; B_{03} = 1-c,\; B_{10} = s,\; B_{12} = 1-c,\; B_{21} = c-1,\; B_{23} = -s,\; B_{30} = c-1,\; B_{32} = s,B01​=−s,B03​=1−c,B10​=s,B12​=1−c,B21​=c−1,B23​=−s,B30​=c−1,B32​=s,

and all other entries (B00,B02,B11,B13,B20,B22,B31,B33B_{00},B_{02},B_{11},B_{13},B_{20},B_{22},B_{31},B_{33}B00​,B02​,B11​,B13​,B20​,B22​,B31​,B33​) are 000. As written, Bji=−BijB_{ji} = -B_{ij}Bji​=−Bij​ for all i,ji,ji,j (skew-symmetric for every c,sc,sc,s). Degenerate values: at c=1,s=0c=1,s=0c=1,s=0, B(1,0)B(1,0)B(1,0) is the zero matrix; at c=−1,s=0c=-1,s=0c=−1,s=0 the nonzero entries are B03=B12=2B_{03}=B_{12}=2B03​=B12​=2 and B21=B30=−2B_{21}=B_{30}=-2B21​=B30​=−2.

Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by ShapeZero · Sep 27, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me