Lean / Reader
Lean reader

AxialAdditive.lean

86 lines5 declarationsno sorryimports AxialPolynomial AxialArithmetic

Lean 4 Web has Mathlib, so it can check files that import only Mathlib. This one also imports AxialPolynomial, AxialArithmetic, which it does not have: you can read it there, but it will not check. Build the project itself to check it.

  1. import AxialPolynomial
  2. import AxialArithmetic
  3. namespace Axial
  4. open Matrix
  5. namespace AdditiveAction
  6. def conjugate {n : ℕ} (g : AdditiveAction n) (A : Mat n) (t : ℚ) :=
  7. g.matrix (-t) * A * g.matrix t
  8. private theorem conjugate_add {n : ℕ} (g : AdditiveAction n) (A : Mat n) (b s : ℚ) :
  9. g.conjugate A (b+s) = g.matrix (-s) * g.conjugate A b * g.matrix s := by
  10. have h : -(b+s) = -s + -b := by ring
  11. simp only [conjugate,h,g.at_add,Matrix.mul_assoc]
  12. private theorem transfer {n : ℕ} {B C L R : Mat n} {axis : Vec n} {s t : ℚ}
  13. {d : ℕ} {z : ℤ} (hc : C = L*B*R) (hrl : R*L = 1) (haxis : L.mulVec axis = axis)
  14. (hL : IntegralMat ((d:ℚ) • L)) (hR : IntegralMat ((d:ℚ) • R))
  15. (hs : Normalized B s) (ht : Normalized C t) (hz : z ∈ AxialImage (s • B) axis) :
  16. (d:ℤ)^3*z ∈ AxialImage (t • C) axis := by
  17. obtain ⟨v,hv,he⟩ := hz
  18. let c := (d:ℚ)^2*s/t
  19. have hi : Integral c := by
  20. apply integral_ratio ht
  21. have h := (hL.mul hs.2.1).mul hR
  22. simp only [Matrix.smul_mul,Matrix.mul_smul,smul_smul,←hc] at h
  23. convert h using 2 <;> ring
  24. refine ⟨c • (((d:ℚ) • L).mulVec v), (hL.mulVec hv).smul hi, ?_⟩
  25. have commute : C*L = L*B := by rw [hc,Matrix.mul_assoc,hrl,Matrix.mul_one]
  26. rw [Matrix.smul_mulVec] at he
  27. have he' := congrArg (fun w => L.mulVec w) he
  28. simp only [Matrix.mulVec_smul,Matrix.mulVec_mulVec,haxis] at he'
  29. simp only [Matrix.smul_mulVec,Matrix.mulVec_smul,Matrix.mulVec_mulVec,Matrix.smul_mul,commute,smul_smul,Int.cast_mul,
  30. Int.cast_pow,Int.cast_natCast]
  31. calc
  32. _ = ((d:ℚ)^3*s) • (L*B).mulVec v := by
  33. congr 1; dsimp [c]; field_simp [ht.1]
  34. _ = (d:ℚ)^3 • (s • (L*B).mulVec v) := by rw [smul_smul]
  35. _ = _ := by rw [he',smul_smul]
  36. private theorem step {n : ℕ} (g : AdditiveAction n) {axis : Vec n}
  37. (haxis : ∀ t, (g.matrix t).mulVec axis = axis) (A : Mat n) (scale : ℚ → ℚ)
  38. (hs : ∀ s, Normalized (g.conjugate A s) (scale s))
  39. (b s : ℚ) (d : ℕ) (hR : IntegralMat ((d:ℚ) • g.matrix s))
  40. (hL : IntegralMat ((d:ℚ) • g.matrix (-s))) {z : ℤ}
  41. (hz : z ∈ AxialImage (scale b • g.conjugate A b) axis) :
  42. (d:ℤ)^3*z ∈ AxialImage (scale (b+s) • g.conjugate A (b+s)) axis := by
  43. apply transfer (g.conjugate_add A b s) _ (haxis (-s)) hL hR (hs b) (hs _) hz
  44. rw [←g.at_add,add_neg_cancel,g.at_zero]
  45. /-- For any algebraic additive action fixing the given axis and any operator that
  46. admits the source's minimal normalization, its normalized axial union is a subgroup.
  47. In particular this covers the stated nilpotent operators annihilating the axis. -/
  48. theorem subgroup {n : ℕ} (g : AdditiveAction n) (axis : Vec n)
  49. (haxis : ∀ t, (g.matrix t).mulVec axis = axis) (A : Mat n) (scale : ℚ → ℚ)
  50. (hs : ∀ s, Normalized (g.conjugate A s) (scale s)) :
  51. ∃ H : AddSubgroup ℤ, (H : Set ℤ) = AxialUnion (g.conjugate A) scale axis := by
  52. let H (u : ℚ) := axialSubgroup (scale u • g.conjugate A u) axis
  53. suffices hadd : ∀ x y : ℤ, ∀ a b : ℚ, x ∈ H a → y ∈ H b → ∃ s, x+y ∈ H s by
  54. exact ⟨{ carrier := AxialUnion (g.conjugate A) scale axis
  55. zero_mem' := ⟨0,(H 0).zero_mem⟩
  56. add_mem' := fun ⟨a,ha⟩ ⟨b,hb⟩ => hadd _ _ a b ha hb
  57. neg_mem' := fun ⟨a,ha⟩ => ⟨a,(H a).neg_mem ha⟩ },rfl⟩
  58. intro x y a b hx hy
  59. by_cases hy0 : y=0
  60. · exact ⟨a,by simpa [hy0] using hx⟩
  61. let δ := b-a
  62. obtain ⟨D,hD,hstep⟩ := g.clear_steps δ
  63. obtain ⟨h,l,r,h₁,h₂,c,e,hcomb⟩ := glueIntegers D hD x y hy0
  64. have moves (d : ℕ) (j : ℤ) (hd : (D:ℤ) ∣ d*j) :
  65. IntegralMat ((d:ℚ) • g.matrix ((j:ℚ)*δ)) ∧ IntegralMat ((d:ℚ) • g.matrix (-((j:ℚ)*δ))) := by
  66. refine ⟨hstep j d hd,?_⟩
  67. simpa using hstep (-j) d (by simpa using dvd_neg.mpr hd)
  68. obtain ⟨hlp,hlm⟩ := moves l h h₁
  69. obtain ⟨hrp,hrm⟩ := moves r (h-1) h₂
  70. have hleft := g.step haxis A scale hs a ((h:ℚ)*δ) l hlp hlm hx
  71. have hright := g.step haxis A scale hs b (((h-1:ℤ):ℚ)*δ) r hrp hrm hy
  72. have heq : b+((h-1:ℤ):ℚ)*δ = a+(h:ℚ)*δ := by dsimp [δ]; push_cast; ring
  73. rw [heq] at hright
  74. refine ⟨a+(h:ℚ)*δ,?_⟩
  75. rw [←hcomb]
  76. exact (H _).add_mem ((H _).zsmul_mem hleft c) ((H _).zsmul_mem hright e)
  77. #print axioms subgroup
  78. end AdditiveAction
  79. end Axial