AFTD Auto-Formalizing Theoretical Domains

WickContraction.mem_not_eq_erase_of_isSome

theoremverifiedformalizationimported Lean

WickContraction.mem_not_eq_erase_of_isSome

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.mem_not_eq_erase_of_isSome (c : WickContraction n.succ) (i : Fin n.succ)
    (h : (c.getDual? i).isSome) (ha : a ∈ c.1) (ha2 : a ≠ {i, (c.getDual? i).get h}) :
    ∃ a', a' ∈ (c.erase i).1 ∧ a = Finset.map i.succAboveEmb a'
Formalizes
Physlib, `WickContraction.mem_not_eq_erase_of_isSome`
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 28

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.mem_not_eq_erase_of_isSome (c : WickContraction n.succ) (i : Fin n.succ)    (h : (c.getDual? i).isSome) (ha : a ∈ c.1) (ha2 : a ≠ {i, (c.getDual? i).get h}) :    ∃ a', a' ∈ (c.erase i).1 ∧ a = Finset.map i.succAboveEmb a' := by  have h2a := c.2.1 a ha  rw [@Finset.card_eq_two] at h2a  obtain ⟨x, y, hx,hy⟩ := h2a  subst hy  have hxn : ¬ x = i := by    by_contra hx    subst hx    rw [← @getDual?_eq_some_iff_mem] at ha    rw [(Option.get_of_mem h ha)] at ha2    simp at ha2  have hyn : ¬ y = i := by    by_contra hy    subst hy    rw [@Finset.pair_comm] at ha    rw [← @getDual?_eq_some_iff_mem] at ha    rw [(Option.get_of_mem h ha)] at ha2    simp [Finset.pair_comm] at ha2  simp only [Nat.succ_eq_add_one, ← Fin.exists_succAbove_eq_iff] at hxn hyn  obtain ⟨x', hx'⟩ := hxn  obtain ⟨y', hy'⟩ := hyn  use {x', y'}  subst hx' hy'  simp only [erase, Nat.succ_eq_add_one, Finset.mem_filter, Finset.mem_univ, Finset.map_insert,    Fin.succAboveEmb_apply, Finset.map_singleton, true_and, and_true]  exact ha
See it in the graphDiscuss this resultChallenge it