AFTD Auto-Formalizing Theoretical Domains

Physlib.instFintypeDerivativeIndex

instanceimported Lean

Physlib.instFintypeDerivativeIndex

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
noncomputable instance Physlib.instFintypeDerivativeIndex (d k : ℕ) : Fintype (DerivativeIndex d k)
Defined in
Physlib, `Physlib.instFintypeDerivativeIndex`
Lean proof
By Juan Jose Fernandez Morales, from github.com/leanprover-community/physlib at e411c6e89692 (Copyright (c) 2026 Juan Jose Fernandez Morales. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.34.1.
Verified
10 Oct 2026
Axioms
none listed
Built on 20
Used by 4

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
noncomputable instance Physlib.instFintypeDerivativeIndex (d k : ℕ) : Fintype (DerivativeIndex d k) :=
  Fintype.ofInjective
    (fun I : DerivativeIndex d k => fun i : Fin d =>
      ((⟨I.1 i, by
        have hle_order : I.1 i ≤ I.1.order := by
          classical
          unfold Physlib.MultiIndex.order
          simpa using
            (Finset.single_le_sum (fun j _ => Nat.zero_le (I.1 j)) (by simp : i ∈ Finset.univ) :
              I.1 i ≤ ∑ j : Fin d, I.1 j)
        exact Nat.lt_succ_of_le (le_trans hle_order I.2)⟩) : Fin (k + 1)))
    (by
      intro I J h
      apply Subtype.ext
      apply Physlib.MultiIndex.ext
      intro i
      exact congrArg Fin.val (congrFun h i))
See it in the graphDiscuss this resultChallenge it