Zulip Chat Archive
Stream: LftCM22
Topic: Symplectic group
Moritz Doll (Jul 12 2022 at 15:49):
A thread for the symplectic group
@Matej Penciak and Fabien Clery.
Moritz Doll (Jul 12 2022 at 15:50):
@Fabien Cléry
Heather Macbeth (Jul 12 2022 at 16:24):
A thread for the symplectic group group ...
Moritz Doll (Jul 12 2022 at 16:33):
right now we are only a monoid..
Matej Penciak (Jul 13 2022 at 01:04):
I got kind of bogged down with some annoying technical things on the train back home.
I made the repo: https://github.com/mpenciak/symplectic_groups if you want to check it out. I didn't quite get a group instance yet because I think I made a bad choice at some point to write all my theorems in terms of the hypotheses
{A : matrix (l ⊕ l) (l ⊕ l) ℝ} (hA : A ∈ symplectic l)
instead of
(A : symplectic l)
so I've run into a weird situation where I need to prove ⟨(↑A)⁻¹, _⟩ * A = 1
Matej Penciak (Jul 13 2022 at 01:07):
(also people are welcome to :golf: my proofs)
Moritz Doll (Jul 13 2022 at 02:17):
I just came back from dinner, but I will have a look now
Jim Fowler (Jul 13 2022 at 05:58):
The code for symplectic_inv
was removed, but it seems like
noncomputable def symplectic_inv {A : matrix (l ⊕ l) (l ⊕ l) ℝ} (hA : A ∈ symplectic_group l) [invertible A] [invertible Aᵀ]:
symplectic_group l :=
{ val := A⁻¹,
property :=
begin
rw mem_symplectic_group_iff at hA ⊢,
apply_fun (λ x, A⁻¹ ⬝ (x) ⬝ (Aᵀ)⁻¹) at hA,
rw matrix.transpose_nonsing_inv,
calc A⁻¹ ⬝ J l ℝ ⬝ Aᵀ⁻¹ = A⁻¹ ⬝ (A ⬝ J l ℝ ⬝ Aᵀ) ⬝ Aᵀ⁻¹ : by exact hA.symm
... = A⁻¹ ⬝ A ⬝ J l ℝ ⬝ Aᵀ ⬝ Aᵀ⁻¹ : by simp only [matrix.mul_assoc]
... = (A⁻¹ ⬝ A) ⬝ (J l ℝ) ⬝ (Aᵀ ⬝ Aᵀ⁻¹) : by simp only [matrix.mul_assoc]
... = (has_inv.inv A ⬝ A) ⬝ (J l ℝ) ⬝ (Aᵀ ⬝ Aᵀ⁻¹) : by refl
... = (⅟ A ⬝ A) ⬝ (J l ℝ) ⬝ (Aᵀ ⬝ Aᵀ⁻¹) : by rw matrix.inv_of_eq_nonsing_inv
... = 1 ⬝ (J l ℝ) ⬝ (Aᵀ ⬝ Aᵀ⁻¹) : by rw matrix.inv_of_mul_self
... = 1 ⬝ (J l ℝ) ⬝ (Aᵀ ⬝ (⅟ (Aᵀ))) : by rw matrix.inv_of_eq_nonsing_inv
... = 1 ⬝ (J l ℝ) ⬝ 1 : by rw matrix.mul_inv_of_self
... = J l ℝ : by simp
end }
would work.
I find that I don't fully understand why matrices use ⬝
and the situation surrounding between ⅟
versus ⁻¹
and between has_inv
versus invertible
.
Junyan Xu (Jul 13 2022 at 06:17):
Isn't invertible Aᵀ
redundant? You could do haveI : invertible Aᵀ := // proof
after the begin
.
Moritz Doll (Jul 13 2022 at 06:50):
thanks @Jim Fowler actually both typeclasses are redunant, because we have hA
Yakov Pechersky (Jul 13 2022 at 06:52):
docs#invertible is a data-carrying class, unfortunately
Moritz Doll (Jul 13 2022 at 07:45):
One can completely get around using invertible
and the weird inversion, see the current commit in Matej's repo (commit f356924).
Jim Fowler (Jul 13 2022 at 13:02):
I'm new to all this, and I would have thought that typeclass inference could have produced the [invertible A]
from hA
, so I am not sure what effect including [invertible A]
has.
Moritz Doll (Jul 13 2022 at 13:21):
these are called typeclass-instances. A brief and not really correct explanation is that a typeclass behaves somewhat like a structure, but it is not type, so you can add additional fields to different types and an instance is the implementation, so that you can access the fields of invertible
for A
Jim Fowler (Jul 13 2022 at 14:41):
But I would have thought having hA
in the tactic state would mean that 1/
would infer the invertible
instance, so I'm not sure what effect including [invertible A]
had.
Last updated: Dec 20 2023 at 11:08 UTC