AFTD Auto-Formalizing Theoretical Domains

FieldStatistic.instCommGroup

instanceimported Lean

The type FieldStatistic carries an instance of a commutative group in which - bosonic * bosonic = bosonic - bosonic * fermionic = fermionic - fermionic * bosonic = fermionic - fermionic * fermionic = bosonic This group is isomorphic to ℤ₂.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
variable {𝓕 : Type} in
@[simp]
instance FieldStatistic.instCommGroup : CommGroup FieldStatistic
Defined in
Physlib, `FieldStatistic.instCommGroup`
Lean proof
By Joseph Tooby-Smith, from github.com/leanprover-community/physlib at e411c6e89692 (Copyright (c) 2024 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 1
  • FieldStatisticThe type FieldStatistic is the type containing two elements bosonic and fermionic. This type is used to specify if a field or…
Used by 48

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
variable {𝓕 : Type} in
/-- The type `FieldStatistic` carries an instance of a commutative group in which - `bosonic * bosonic = bosonic` - `bosonic * fermionic = fermionic` - `fermionic * bosonic = fermionic` - `fermionic * fermionic = bosonic` This group is isomorphic to `ℤ₂`. -/
@[simp]
instance FieldStatistic.instCommGroup : CommGroup FieldStatistic where
  one := bosonic
  mul a b :=
    match a, b with
    | bosonic, bosonic => bosonic
    | bosonic, fermionic => fermionic
    | fermionic, bosonic => fermionic
    | fermionic, fermionic => bosonic
  inv a := a
  mul_assoc a b c := by
    cases a <;> cases b <;> cases c <;>
    dsimp [HMul.hMul]
  one_mul a := by
    cases a <;> dsimp [HMul.hMul]
  mul_one a := by
    cases a <;> dsimp [HMul.hMul]
  inv_mul_cancel a := by
    cases a <;> dsimp only [HMul.hMul, Nat.succ_eq_add_one] <;> rfl
  mul_comm a b := by
    cases a <;> cases b <;> rfl
See it in the graphDiscuss this resultChallenge it