perm_second_derivative
For a permutation σ : Equiv.Perm (Fin n) and a natural number ℓ : ℕ, the discrete second derivative perm_second_derivative σ ℓ : ℤ is (σ ⟨ℓ, h1⟩ : ℤ) + (σ ⟨ℓ - 2, h0⟩ : ℤ) - 2 * (σ ⟨ℓ - 1, hm⟩ : ℤ) if 2 ≤ ℓ ∧ ℓ ≤ n - 1 (where the indices ℓ, ℓ - 2, ℓ - 1 are in Fin n), and 0 otherwise.
Statement
def perm_second_derivative {n : ℕ} (σ : Equiv.Perm (Fin n)) (ℓ : ℕ) : ℤ- Defined in
- arXiv:2610.38237, Definition 1.1
- Verified
- 07 Nov 2026
- Axioms
- none listed
- Used by 7
- perm_second_derivative_odd_exists_witnessesFor any integer $k \ge 1$, there exist two distinct permutations $\sigma, \pi \in \mathrm{Sym}_{2k+1}$, neither of which is the identity…
- op_686_single_element_admissibleFor all natural numbers k, m : ℕ satisfying 2 ≤ k and k < m, the single-element set {(k, m)} is an admissible inflection set…
- perm_second_derivative_odd_not_injOnFor any integer $k \ge 1$, the discrete second derivative map on $\mathrm{Sym}_{2k+1} \setminus \{e, e^r\}$ is not injective.
- perm_inflection_setFor a permutation σ : Equiv.Perm (Fin n), the inflection set perm_inflection_set σ : Finset (ℕ × ℕ) is the filter of pairs (m, p) in…
- perm_inflection_set_trans_revPermReversing the values of a permutation σ of Fin n (σ.trans Fin.revPerm) does not change its inflection set: perm_inflection_set (σ.trans…
- perm_second_derivative_trans_revPermReversing the values of a permutation σ of Fin n (composing with Fin.revPerm, v ↦ n-1-v) negates its discrete second derivative at every…
- perm_inflection_set_eq_two_of_sign_patternIf a permutation σ has discrete second derivative that is non-negative on [2, k₁), positive at k₁, zero on (k₁, m₁), negative at m₁,…
Read back from the Lean
For an implicit natural number n, a permutation σ of Fin n, and a natural number ℓ, perm_second_derivative σ ℓ is the integer defined as follows: if 2 ≤ ℓ and ℓ ≤ n - 1, it equals (σ(ℓ) : ℤ) + (σ(ℓ - 2) : ℤ) - 2 * (σ(ℓ - 1) : ℤ) (where ℓ, ℓ - 2, and ℓ - 1 are regarded as elements of Fin n via the bounds guaranteed by the condition, and the outputs of σ are coerced from Fin n to ℤ); otherwise, it is 0.
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 discrete second derivative of a permutation σ at 1-based index ℓ. -/ def perm_second_derivative {n : ℕ} (σ : Equiv.Perm (Fin n)) (ℓ : ℕ) : ℤ := if h : 2 ≤ ℓ ∧ ℓ ≤ n - 1 then have h1 : ℓ < n := by omega have h0 : ℓ - 2 < n := by omega have hm : ℓ - 1 < n := by omega (σ ⟨ℓ, h1⟩ : ℤ) + (σ ⟨ℓ - 2, h0⟩ : ℤ) - 2 * (σ ⟨ℓ - 1, hm⟩ : ℤ) else 0