AFTD Auto-Formalizing Theoretical Domains

WickContraction.finset_eq_fstFieldOfContract_sndFieldOfContract

theoremverifiedformalizationimported Lean

WickContraction.finset_eq_fstFieldOfContract_sndFieldOfContract

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open WickContraction in
variable {𝓕 : FieldSpecification} in
variable {n : ℕ} (c : WickContraction n) in
lemma WickContraction.finset_eq_fstFieldOfContract_sndFieldOfContract (c : WickContraction n) (a : c.1) :
    a.1 = {c.fstFieldOfContract a, c.sndFieldOfContract a}
Formalizes
Physlib, `WickContraction.finset_eq_fstFieldOfContract_sndFieldOfContract`
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
Classical.choiceQuot.soundpropext
Built on 20
Used by 8

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true inopen WickContraction invariable {𝓕 : FieldSpecification} invariable {n : ℕ} (c : WickContraction n) inlemma WickContraction.finset_eq_fstFieldOfContract_sndFieldOfContract (c : WickContraction n) (a : c.1) :    a.1 = {c.fstFieldOfContract a, c.sndFieldOfContract a} := by  suffices h : ∀ x y : Fin n, x < y → a.1 = {x, y} →      a.1 = {c.fstFieldOfContract a, c.sndFieldOfContract a} by    obtain ⟨x, y, hxy, ha⟩ := Finset.card_eq_two.mp (c.2.1 a.1 a.2)    rcases lt_or_gt_of_ne hxy with h' | h'    · exact h x y h' ha    · exact h y x h' (ha.trans (Finset.pair_comm x y))  intro x y hxy ha  have h1 : ∀ b ∈ ({y} : Finset (Fin n)), x ≤ b := by simp [hxy.le]  have hs : a.1.sort (· ≤ ·) = [x, y] := by    rw [ha, Finset.sort_insert _ h1 (by simp [hxy.ne]), Finset.sort_singleton]  rw [ha]  simp [fstFieldOfContract, sndFieldOfContract, hs]
See it in the graphDiscuss this resultChallenge it