The matrix descent and quotient list cfList of the continued-fraction section
Definitionburau_cf_listcontinued-fractionseuclidean-algorithmmatricessl2z
The matrix descent behind the continued-fraction section of .
For integer matrices the definition node provides the two elementary matrices
the Euclidean descent step with , the measure lemma showing that the new -entry is and hence strictly smaller in absolute value (so the recursion terminates), and the recorded quotient list
with its recursion and terminating-case lemmas. This is the combinatorial skeleton of the descent section
of the reduced braid quotient , and its agreement with the integer recursion cfPair is the
statement proved in the companion nodes.
Definition code
import Mathlib
set_option autoImplicit false
open Matrix
namespace BurauNC
abbrev M2 := Matrix (Fin 2) (Fin 2) ℤ
/-- `S = !![0,-1;1,0]` (matrix form). -/
def Sm : M2 := !![0, -1; 1, 0]
/-- `T^n = !![1,n;0,1]` (matrix form). -/
def Tm (n : ℤ) : M2 := !![1, n; 0, 1]
theorem euclid_decrease (M : M2) (h : M 0 0 ≠ 0) :
(((M * Tm (-(M 0 1 / M 0 0))) * Sm) 0 0).natAbs < (M 0 0).natAbs := by
have hkey : (((M * Tm (-(M 0 1 / M 0 0))) * Sm) 0 0) = M 0 1 % M 0 0 := by
rw [Tm, Sm]
simp [Matrix.mul_apply, Fin.sum_univ_two, Int.emod_def]
ring
rw [hkey, Int.natAbs_lt_iff_sq_lt]
exact sq_lt_sq.mpr ((abs_of_nonneg (Int.emod_nonneg (M 0 1) h)).trans_lt
(Int.emod_lt_abs (M 0 1) h))
noncomputable def cfList : M2 → List ℤ
| M => if h : M 0 0 = 0 then []
else (M 0 1 / M 0 0) :: cfList ((M * Tm (-(M 0 1 / M 0 0))) * Sm)
termination_by M => (M 0 0).natAbs
decreasing_by exact euclid_decrease M h
theorem cfList_cons (M : M2) (h : M 0 0 ≠ 0) :
cfList M = (M 0 1 / M 0 0) :: cfList ((M * Tm (-(M 0 1 / M 0 0))) * Sm) := by
rw [cfList.eq_def]
exact dif_neg h
theorem cfList_eq_nil (M : M2) (h : M 0 0 = 0) : cfList M = [] := by
rw [cfList.eq_def]
exact dif_pos h
end BurauNC
Source
Euclidean algorithm in SL(2,Z); cf. C. Moser, H. S. M. Coxeter, *Generators and relations for discrete groups* (1964), Ch. 3; J. S. Birman, *Braids, Links, and Mapping Class Groups*, Ann. of Math. Studies 82 (1974), §3.3.