AFTD Auto-Formalizing Theoretical Domains

WickContraction.erase

defimported Lean

Given a Wick contraction WickContraction n.succ and a i : Fin n.succ the Wick contraction associated with n obtained by removing i. If i is contracted with j in the new Wick contraction j will be uncontracted.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
variable {𝓕 : FieldSpecification} in
variable {n : ℕ} (c : WickContraction n) in
def WickContraction.erase (c : WickContraction n.succ) (i : Fin n.succ) : WickContraction n
Defined in
Physlib, `WickContraction.erase`
Lean proof
By Joseph Tooby-Smith, from github.com/leanprover-community/physlib at e411c6e89692 (Copyright (c) 2025 Joseph Tooby-Smith. 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 25
Used by 3

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
variable {𝓕 : FieldSpecification} in
variable {n : ℕ} (c : WickContraction n) in
/-- Given a Wick contraction `WickContraction n.succ` and a `i : Fin n.succ` the Wick contraction associated with `n` obtained by removing `i`. If `i` is contracted with `j` in the new Wick contraction `j` will be uncontracted. -/
def WickContraction.erase (c : WickContraction n.succ) (i : Fin n.succ) : WickContraction n := by
  refine ⟨Finset.filter (fun x => Finset.map i.succAboveEmb x ∈ c.1) Finset.univ, ?_, ?_⟩
  · intro a ha
    simpa using c.2.1 (Finset.map i.succAboveEmb a) (by simpa using ha)
  · intro a ha b hb
    simp only [Nat.succ_eq_add_one, Finset.mem_filter, Finset.mem_univ, true_and] at ha hb
    rw [← Finset.disjoint_map i.succAboveEmb, ← (Finset.map_injective i.succAboveEmb).eq_iff]
    exact c.2.2 _ ha _ hb
See it in the graphDiscuss this resultChallenge it