AFTD Auto-Formalizing Theoretical Domains

phi_morphism

def

For a positive integer k and a letter i in Fin k, phi_morphism k i is [0, i + 1] if i + 1 < k, and [0, i, i] if i + 1 = k.

Statement

def phi_morphism (k : ℕ) (i : Fin k) : List (Fin k)
Defined in
arXiv:2611.13676 Eq. (1)
Verified
15 Nov 2026
Axioms
none listed
Used by 1
  • phi_iterFor a positive integer k with proof hk : 0 < k, the n-th iterate phi_iter k hk n of phi_morphism k starting from [0] is defined…

Read back from the Lean

phi_morphism is a function that takes a natural number k and an element i : Fin k (from which it deduces 0 < k), and returns a List (Fin k) defined as follows: - If i.val + 1 < k, it returns the two-element list [0, i + 1] (where 0 and i.val + 1 are viewed as elements of Fin k). - Otherwise (i.e., if i.val + 1 ≥ k, which means i.val = k - 1), it returns the three-element list [0, i, i] (where 0 is viewed as an element of Fin k).

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 morphism phi_k mapping i to 0(i+1) for i < k - 1 and to 0(k-1)(k-1) for i = k - 1. -/
def phi_morphism (k : ℕ) (i : Fin k) : List (Fin k) :=
  have hk : 0 < k := lt_of_le_of_lt (Nat.zero_le i.val) i.isLt
  if h : i.val + 1 < k then
    [⟨0, hk⟩, ⟨i.val + 1, h⟩]
  else
    [⟨0, hk⟩, i, i]
See it in the graphDiscuss this resultChallenge it