AlgebraicAnalysis/Commutator.lean

AlgebraicAnalysis library · bbbbf3fc358ca8100b158cec4cf47f336ab70163

1 module
2 public import Mathlib.Tactic.NoncommRing
3 public import Mathlib.Algebra.Module.NatInt
4 
5 @[expose] public section
6 
7 /-!
8 # Ring commutators
9 
10 This module contains the multiplication identities used by both the Weyl
11 symplectic layer and the differential-Ore escape layer.  The convention is
12 `[u,v] = u*v - v*u`; no Weyl relation, Ore presentation, or application
13 specific structure is assumed.
14 -/
15 
16 namespace AlgebraicAnalysis
17 
18 section
19 
20 variable {A : Type*} [Ring A]
21 
22 /-- The ring commutator, with the written multiplication order retained. -/
23 def ringCommutator (u v : A) : A := u * v - v * u
24 
25 @[simp] theorem ringCommutator_apply (u v : A) :
26     ringCommutator u v = u * v - v * u := rfl
27 
28 /-- Leibniz expansion in the first argument. -/
29 theorem ringCommutator_mul (u v x : A) :
30     ringCommutator (u * v) x =
31       u * ringCommutator v x + ringCommutator u x * v := by
32   simp only [ringCommutator]
33   noncomm_ring
34 
35 /-- Iterated commutation with a Weyl-type relation. -/
36 theorem ringCommutator_pow (z x : A) (h : ringCommutator z x = 1) :
37     ∀ n : ℕ, ringCommutator (z ^ n) x = n • z ^ (n - 1)
38   | 0 => by simp [ringCommutator]
39   | n + 1 => by
40       rw [pow_succ, ringCommutator_mul, h, ringCommutator_pow z x h n]
41       by_cases hn : n = 0
42       · subst n
43         simp
44       · rw [smul_mul_assoc, Nat.succ_sub_one, mul_one, add_nsmul]
45         have hpow : z ^ (n - 1) * z = z ^ n := by
46           rw [← pow_succ, Nat.sub_add_cancel (Nat.pos_of_ne_zero hn)]
47         rw [hpow, one_nsmul]
48         exact add_comm _ _
49 
50 end
51 
52 end AlgebraicAnalysis
53