AFTD Auto-Formalizing Theoretical Domains

Order

structure

An order of dimension d is a permutation of the attribute set {0, ..., d-1}, represented as a list without duplicates containing all elements.

Statement

structure Order (d : ℕ)
Defined in
arXiv:2610.39311 Definition 1
Verified
31 Oct 2026
Axioms
none listed
Used by 27

Read back from the Lean

A structure Order d, parameterized by a natural number d : ℕ, consisting of: 1. elems: a list of elements of Fin d, 2. nodup: a proof that elems contains no duplicate elements (elems.Nodup), 3. length_eq: a proof that the length of elems is equal to d (elems.length = d). The structure also derives decidable equality (DecidableEq). (Effectively, an Order d is a permutation / linear ordering of the d elements of Fin d represented as a list without duplicates containing all elements of Fin d).

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

/-- An order of dimension d is a permutation of Fin d, represented as a list of length d without duplicates. -/
structure Order (d : ℕ) where
  elems : List (Fin d)
  nodup : elems.Nodup
  length_eq : elems.length = d
deriving DecidableEq
See it in the graphDiscuss this resultChallenge it