/-
Copyright 2026 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/
module
public import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup.Defs
public import Mathlib.LinearAlgebra.UnitaryGroup
public import Mathlib.NumberTheory.Padics.HeightOneSpectrum
public import Mathlib.NumberTheory.Padics.ProperSpace
public import Mathlib.RingTheory.DedekindDomain.FiniteAdeleRing
public import Mathlib.Topology.Algebra.Group.Matrix
public import Mathlib.Topology.Algebra.RestrictedProduct.TopologicalSpace
public import Mathlib.Topology.Instances.Matrix@[expose] public sectionThe subgroups in the Borel-Jacquet definition of an automorphic form
The subgroups of G(𝔸) = G(𝔸_f) × G(ℝ), for G = GL n / ℚ, that the Borel-Jacquet
definition of an automorphic form quantifies over; see
FormalConjecturesForMathlib.NumberTheory.AutomorphicForm.BorelJacquet for that definition,
and Borel and Jacquet's Corvallis article, the reference below, for its source.
Main declarations
All in the namespace Matrix.GeneralLinearGroup:
diagonalEmbedding and ratDiagonal: the diagonal copy of the rational points
Γ = G(ℚ) = GL n ℚ in G(𝔸_f) × G(ℝ), the subgroup of condition (a).
orthogonalSubgroup: the orthogonal group K = O n ℝ inside GL n ℝ, the maximal compact
subgroup of condition (b2) — mathlib's Matrix.orthogonalGroup n ℝ, a submonoid of
Matrix n n ℝ, transported along the coercion to a subgroup of GL n ℝ.
integralAdeles and integralAdelicSubgroup: the integral adeles Ẑ and the compact open
subgroup GL n Ẑ of G(𝔸_f) (isOpen_integralAdelicSubgroup,
isCompact_integralAdelicSubgroup), which witnesses condition (b1) for constant automorphic
forms.
Implementation notes
Compactness of orthogonalSubgroup n and its maximality (Cartan-Iwasawa-Malcev, which also
makes it unique up to conjugacy) are asserted in its docstring but not formalised; of
compactness, the boundedness half is proved (abs_coe_le_one_of_mem_orthogonalSubgroup).
References:
A. Borel and H. Jacquet, Automorphic forms and automorphic representations, in Automorphic Forms, Representations and L-functions (Corvallis), Proc. Sympos. Pure Math. 33, Part 1, Amer. Math. Soc. (1979), 189–207; §4.
namespace Matrix.GeneralLinearGroupopen scoped IsDedekindDomain.FiniteAdeleRingvariable {n : Type*} [Fintype n] [DecidableEq n]
The subgroups Γ = G(ℚ) and K = O n ℝ: conditions (a) and (b2)
variable (n) in
The diagonal embedding of the rational points G(ℚ) = GL n ℚ into
G(𝔸_f) × G(ℝ) = GL n 𝔸ᶠ[ℤ, ℚ] × GL n ℝ, through the inclusions of ℚ into the finite
adeles and into ℝ.
noncomputable def diagonalEmbedding : GL n ℚ →* GL n 𝔸ᶠ[ℤ, ℚ] × GL n ℝ :=
(map (algebraMap ℚ 𝔸ᶠ[ℤ, ℚ])).prod (map (algebraMap ℚ ℝ))variable (n) in
The subgroup Γ = G(ℚ) of G(𝔸_f) × G(ℝ): the range of the diagonal embedding of
GL n ℚ. Condition (a) for an automorphic form is left invariance under this subgroup.
noncomputable def ratDiagonal : Subgroup (GL n 𝔸ᶠ[ℤ, ℚ] × GL n ℝ) :=
(diagonalEmbedding n).range
The orthogonal group O n ℝ as a subgroup of GL n ℝ: the units of Matrix n n ℝ whose
underlying matrix lies in mathlib's Matrix.orthogonalGroup n ℝ, the submonoid of matrices
whose transpose is their inverse. This is the maximal compact subgroup of GL n ℝ — up to
conjugacy the only one, by the Cartan-Iwasawa-Malcev theorem — and it is the K of the pair
(G, K) in the definition of an automorphic form for GL n.
Mathlib's Matrix.orthogonalGroup n ℝ is a Submonoid (Matrix n n ℝ); what the definition of
an automorphic form needs is a Subgroup (GL n ℝ), so we transport it along the coercion
GL n ℝ → Matrix n n ℝ rather than restate the orthogonality condition.
n✝:Type u_1inst✝³:Fintype n✝inst✝²:DecidableEq n✝n:Type u_2inst✝¹:Fintype ninst✝:DecidableEq na:GL n ℝha:↑a * (↑a)ᵀ = 1⊢ (↑a)ᵀ * ↑a = 1
exact (Matrix.mem_orthogonalGroup_iff' n ℝ).mp ((Matrix.mem_orthogonalGroup_iff n ℝ).mpr ha) All goals completed! 🐙lemma mem_orthogonalSubgroup {y : GL n ℝ} :
y ∈ orthogonalSubgroup n ↔ (y : Matrix n n ℝ) ∈ Matrix.orthogonalGroup n ℝ :=
Set.mem_ofPred_eq ▸ Iff.rfl@[simp]
lemma mem_orthogonalSubgroup_iff_mul_transpose {y : GL n ℝ} :
y ∈ orthogonalSubgroup n ↔ (y : Matrix n n ℝ) * (y : Matrix n n ℝ)ᵀ = 1 :=
mem_orthogonalSubgroup.trans (Matrix.mem_orthogonalGroup_iff n ℝ)
lemma mem_orthogonalSubgroup_iff_transpose_eq_coe_inv {y : GL n ℝ} :
y ∈ orthogonalSubgroup n ↔ (y : Matrix n n ℝ)ᵀ = (↑y⁻¹ : Matrix n n ℝ) := by n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ny:GL n ℝ⊢ y ∈ orthogonalSubgroup n ↔ (↑y)ᵀ = ↑y⁻¹
rw [mem_orthogonalSubgroup_iff_mul_transpose n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ny:GL n ℝ⊢ ↑y * (↑y)ᵀ = 1 ↔ (↑y)ᵀ = ↑y⁻¹ n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ny:GL n ℝ⊢ ↑y * (↑y)ᵀ = 1 ↔ (↑y)ᵀ = ↑y⁻¹] n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ny:GL n ℝ⊢ ↑y * (↑y)ᵀ = 1 ↔ (↑y)ᵀ = ↑y⁻¹
refine ⟨fun h => ?_, fun h => ?_⟩ refine_1 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ny:GL n ℝh:↑y * (↑y)ᵀ = 1⊢ (↑y)ᵀ = ↑y⁻¹refine_2 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ny:GL n ℝh:(↑y)ᵀ = ↑y⁻¹⊢ ↑y * (↑y)ᵀ = 1
· refine_1 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ny:GL n ℝh:↑y * (↑y)ᵀ = 1⊢ (↑y)ᵀ = ↑y⁻¹ rw [← Matrix.inv_eq_right_inv h, refine_1 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ny:GL n ℝh:↑y * (↑y)ᵀ = 1⊢ (↑y)⁻¹ = ↑y⁻¹ All goals completed! 🐙 Matrix.GeneralLinearGroup.coe_inv refine_1 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ny:GL n ℝh:↑y * (↑y)ᵀ = 1⊢ (↑y)⁻¹ = (↑y)⁻¹ All goals completed! 🐙] All goals completed! 🐙
· refine_2 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ny:GL n ℝh:(↑y)ᵀ = ↑y⁻¹⊢ ↑y * (↑y)ᵀ = 1 rw [h refine_2 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ny:GL n ℝh:(↑y)ᵀ = ↑y⁻¹⊢ ↑y * ↑y⁻¹ = 1 refine_2 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ny:GL n ℝh:(↑y)ᵀ = ↑y⁻¹⊢ ↑y * ↑y⁻¹ = 1]refine_2 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ny:GL n ℝh:(↑y)ᵀ = ↑y⁻¹⊢ ↑y * ↑y⁻¹ = 1; exact y.mul_inv All goals completed! 🐙
The entries of an orthogonal matrix are bounded by 1: each row is a unit vector. This is
the boundedness half of the compactness of orthogonalSubgroup n; see the implementation notes
on what is and is not formalised about that.
lemma abs_coe_le_one_of_mem_orthogonalSubgroup {y : GL n ℝ} (hy : y ∈ orthogonalSubgroup n)
(i j : n) : |(y : Matrix n n ℝ) i j| ≤ 1 := by n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ny:GL n ℝhy:y ∈ orthogonalSubgroup ni:nj:n⊢ |↑y i j| ≤ 1
set M := (y : Matrix n n ℝ) with hM n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ny:GL n ℝhy:y ∈ orthogonalSubgroup ni:nj:nM:Matrix n n ℝ := ↑yhM:M = ↑y⊢ |M i j| ≤ 1
have hd : ∑ k, M i k * M i k = 1 := by n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ny:GL n ℝhy:y ∈ orthogonalSubgroup ni:nj:n⊢ |↑y i j| ≤ 1 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ny:GL n ℝhy:y ∈ orthogonalSubgroup ni:nj:nM:Matrix n n ℝ := ↑yhM:M = ↑yhd:∑ k, M i k * M i k = 1⊢ |M i j| ≤ 1
simpa [Matrix.mul_apply, Matrix.one_apply] using congrArg (fun A => A i i)
(mem_orthogonalSubgroup_iff_mul_transpose.mp hy) n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ny:GL n ℝhy:y ∈ orthogonalSubgroup ni:nj:nM:Matrix n n ℝ := ↑yhM:M = ↑yhd:∑ k, M i k * M i k = 1⊢ |M i j| ≤ 1 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ny:GL n ℝhy:y ∈ orthogonalSubgroup ni:nj:nM:Matrix n n ℝ := ↑yhM:M = ↑yhd:∑ k, M i k * M i k = 1⊢ |M i j| ≤ 1
exact abs_le_one_iff_mul_self_le_one.mpr (hd ▸ Finset.single_le_sum
(f := fun k => M i k * M i k) (fun k _ => mul_self_nonneg _) (Finset.mem_univ j)) All goals completed! 🐙
The compact open subgroup GL n Ẑ: condition (b1)
section IntegralSubgroupopen IsDedekindDomain RestrictedProduct
The v-adic integers of ℚ are compact: they are homeomorphic to ℤ_[p] for the
corresponding prime p.
instance (v : HeightOneSpectrum ℤ) : CompactSpace (v.adicCompletionIntegers ℚ) := by n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nv:HeightOneSpectrum ℤ⊢ CompactSpace ↥(HeightOneSpectrum.adicCompletionIntegers ℚ v)
have : Fact (Rat.HeightOneSpectrum.primesEquiv v : ℕ).Prime :=
⟨(Rat.HeightOneSpectrum.primesEquiv v).2⟩ n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nv:HeightOneSpectrum ℤthis:Fact (Nat.Prime ↑(Rat.HeightOneSpectrum.primesEquiv v))⊢ CompactSpace ↥(HeightOneSpectrum.adicCompletionIntegers ℚ v)
let _ : Algebra ℤ ↥(v.adicCompletionIntegers ℚ) := Ring.toIntAlgebra _ n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nv:HeightOneSpectrum ℤthis:Fact (Nat.Prime ↑(Rat.HeightOneSpectrum.primesEquiv v))x✝:Algebra ℤ ↥(HeightOneSpectrum.adicCompletionIntegers ℚ v) := Ring.toIntAlgebra ↥(HeightOneSpectrum.adicCompletionIntegers ℚ v)⊢ CompactSpace ↥(HeightOneSpectrum.adicCompletionIntegers ℚ v)
exact (Rat.HeightOneSpectrum.adicCompletionIntegers.padicIntEquiv
v).toHomeomorph.symm.compactSpace All goals completed! 🐙instance : T2Space 𝔸ᶠ[ℤ, ℚ] :=
inferInstanceAs (T2Space (Πʳ v : HeightOneSpectrum ℤ,
[v.adicCompletion ℚ, v.adicCompletionIntegers ℚ]))
The integral adeles Ẑ = ∏ᵥ ℤᵥ as a subring of the finite adeles of ℚ: the adeles that
are integral at every place.
def integralAdeles : Subring 𝔸ᶠ[ℤ, ℚ] where
carrier := {x | ∀ v, x v ∈ v.adicCompletionIntegers ℚ}
one_mem' _v := one_mem _
mul_mem' hx hy v := mul_mem (hx v) (hy v)
zero_mem' _v := zero_mem _
add_mem' hx hy v := add_mem (hx v) (hy v)
neg_mem' hx v := neg_mem (hx v)lemma isOpen_integralAdeles : IsOpen (integralAdeles : Set 𝔸ᶠ[ℤ, ℚ]) :=
RestrictedProduct.isOpen_forall_mem fun _ => Valued.isOpen_valuationSubring _
lemma isCompact_integralAdeles : IsCompact (integralAdeles : Set 𝔸ᶠ[ℤ, ℚ]) := by ⊢ IsCompact ↑integralAdeles
have h : (integralAdeles : Set 𝔸ᶠ[ℤ, ℚ])
= Set.range (structureMap (fun v : HeightOneSpectrum ℤ => v.adicCompletion ℚ)
(fun v => v.adicCompletionIntegers ℚ) Filter.cofinite) := by
rw [range_structureMap ⊢ ↑integralAdeles = {f | ∀ (i : HeightOneSpectrum ℤ), ↑f i ∈ ↑(HeightOneSpectrum.adicCompletionIntegers ℚ i)} ⊢ ↑integralAdeles = {f | ∀ (i : HeightOneSpectrum ℤ), ↑f i ∈ ↑(HeightOneSpectrum.adicCompletionIntegers ℚ i)} h:↑integralAdeles =
Set.range
(structureMap (fun v ↦ HeightOneSpectrum.adicCompletion ℚ v)
(fun v ↦ ↑(HeightOneSpectrum.adicCompletionIntegers ℚ v)) Filter.cofinite)⊢ IsCompact ↑integralAdeles] ⊢ ↑integralAdeles = {f | ∀ (i : HeightOneSpectrum ℤ), ↑f i ∈ ↑(HeightOneSpectrum.adicCompletionIntegers ℚ i)} h:↑integralAdeles =
Set.range
(structureMap (fun v ↦ HeightOneSpectrum.adicCompletion ℚ v)
(fun v ↦ ↑(HeightOneSpectrum.adicCompletionIntegers ℚ v)) Filter.cofinite)⊢ IsCompact ↑integralAdeles
rfl h:↑integralAdeles =
Set.range
(structureMap (fun v ↦ HeightOneSpectrum.adicCompletion ℚ v)
(fun v ↦ ↑(HeightOneSpectrum.adicCompletionIntegers ℚ v)) Filter.cofinite)⊢ IsCompact ↑integralAdeles h:↑integralAdeles =
Set.range
(structureMap (fun v ↦ HeightOneSpectrum.adicCompletion ℚ v)
(fun v ↦ ↑(HeightOneSpectrum.adicCompletionIntegers ℚ v)) Filter.cofinite)⊢ IsCompact ↑integralAdeles
rw [h, h:↑integralAdeles =
Set.range
(structureMap (fun v ↦ HeightOneSpectrum.adicCompletion ℚ v)
(fun v ↦ ↑(HeightOneSpectrum.adicCompletionIntegers ℚ v)) Filter.cofinite)⊢ IsCompact
(Set.range
(structureMap (fun v ↦ HeightOneSpectrum.adicCompletion ℚ v)
(fun v ↦ ↑(HeightOneSpectrum.adicCompletionIntegers ℚ v)) Filter.cofinite)) h:↑integralAdeles =
Set.range
(structureMap (fun v ↦ HeightOneSpectrum.adicCompletion ℚ v)
(fun v ↦ ↑(HeightOneSpectrum.adicCompletionIntegers ℚ v)) Filter.cofinite)⊢ IsCompact
(structureMap (fun v ↦ HeightOneSpectrum.adicCompletion ℚ v) (fun v ↦ ↑(HeightOneSpectrum.adicCompletionIntegers ℚ v))
Filter.cofinite ''
Set.univ) ← Set.image_univ h:↑integralAdeles =
Set.range
(structureMap (fun v ↦ HeightOneSpectrum.adicCompletion ℚ v)
(fun v ↦ ↑(HeightOneSpectrum.adicCompletionIntegers ℚ v)) Filter.cofinite)⊢ IsCompact
(structureMap (fun v ↦ HeightOneSpectrum.adicCompletion ℚ v) (fun v ↦ ↑(HeightOneSpectrum.adicCompletionIntegers ℚ v))
Filter.cofinite ''
Set.univ) h:↑integralAdeles =
Set.range
(structureMap (fun v ↦ HeightOneSpectrum.adicCompletion ℚ v)
(fun v ↦ ↑(HeightOneSpectrum.adicCompletionIntegers ℚ v)) Filter.cofinite)⊢ IsCompact
(structureMap (fun v ↦ HeightOneSpectrum.adicCompletion ℚ v) (fun v ↦ ↑(HeightOneSpectrum.adicCompletionIntegers ℚ v))
Filter.cofinite ''
Set.univ)] h:↑integralAdeles =
Set.range
(structureMap (fun v ↦ HeightOneSpectrum.adicCompletion ℚ v)
(fun v ↦ ↑(HeightOneSpectrum.adicCompletionIntegers ℚ v)) Filter.cofinite)⊢ IsCompact
(structureMap (fun v ↦ HeightOneSpectrum.adicCompletion ℚ v) (fun v ↦ ↑(HeightOneSpectrum.adicCompletionIntegers ℚ v))
Filter.cofinite ''
Set.univ)
exact (CompactSpace.isCompact_univ
(X := Π v : HeightOneSpectrum ℤ, v.adicCompletionIntegers ℚ)).image
isEmbedding_structureMap.continuous All goals completed! 🐙variable (n) in
GL n Ẑ inside GL n 𝔸ᶠ[ℤ, ℚ]: the matrices whose entries, and whose inverse's entries,
are integral adeles. It is a compact open subgroup of G(𝔸_f)
(isOpen_integralAdelicSubgroup, isCompact_integralAdelicSubgroup), as condition (b1)
requires.
def integralAdelicSubgroup : Subgroup (GL n 𝔸ᶠ[ℤ, ℚ]) where
carrier := {g | (∀ i j, (g : Matrix n n 𝔸ᶠ[ℤ, ℚ]) i j ∈ integralAdeles) ∧
∀ i j, (↑g⁻¹ : Matrix n n 𝔸ᶠ[ℤ, ℚ]) i j ∈ integralAdeles}
one_mem' := by n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq n⊢ 1 ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}
have h1 : ∀ i j : n, (1 : Matrix n n 𝔸ᶠ[ℤ, ℚ]) i j ∈ integralAdeles := fun i j => by n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ni:nj:n⊢ 1 i j ∈ integralAdeles n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh1:∀ (i j : n), 1 i j ∈ integralAdeles⊢ 1 ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}
rcases eq_or_ne i j with rfl | h inl n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ni:n⊢ 1 i i ∈ integralAdelesinr n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ni:nj:nh:i ≠ j⊢ 1 i j ∈ integralAdeles n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh1:∀ (i j : n), 1 i j ∈ integralAdeles⊢ 1 ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}
· inl n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ni:n⊢ 1 i i ∈ integralAdeles n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh1:∀ (i j : n), 1 i j ∈ integralAdeles⊢ 1 ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles} rw [Matrix.one_apply_eq inl n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ni:n⊢ 1 ∈ integralAdeles inl n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ni:n⊢ 1 ∈ integralAdeles n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh1:∀ (i j : n), 1 i j ∈ integralAdeles⊢ 1 ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}]inl n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ni:n⊢ 1 ∈ integralAdeles n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh1:∀ (i j : n), 1 i j ∈ integralAdeles⊢ 1 ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}; exact one_mem _ All goals completed! 🐙 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh1:∀ (i j : n), 1 i j ∈ integralAdeles⊢ 1 ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}
· inr n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ni:nj:nh:i ≠ j⊢ 1 i j ∈ integralAdeles n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh1:∀ (i j : n), 1 i j ∈ integralAdeles⊢ 1 ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles} rw [Matrix.one_apply_ne h inr n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ni:nj:nh:i ≠ j⊢ 0 ∈ integralAdeles inr n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ni:nj:nh:i ≠ j⊢ 0 ∈ integralAdeles n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh1:∀ (i j : n), 1 i j ∈ integralAdeles⊢ 1 ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}]inr n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq ni:nj:nh:i ≠ j⊢ 0 ∈ integralAdeles n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh1:∀ (i j : n), 1 i j ∈ integralAdeles⊢ 1 ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}; exact zero_mem _ n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh1:∀ (i j : n), 1 i j ∈ integralAdeles⊢ 1 ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles} n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh1:∀ (i j : n), 1 i j ∈ integralAdeles⊢ 1 ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}
exact ⟨fun i j => by n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh1:∀ (i j : n), 1 i j ∈ integralAdelesi:nj:n⊢ ↑1 i j ∈ integralAdeles simpa using h1 i j All goals completed! 🐙, fun i j => by n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh1:∀ (i j : n), 1 i j ∈ integralAdelesi:nj:n⊢ ↑1⁻¹ i j ∈ integralAdeles simpa using h1 i j All goals completed! 🐙⟩
mul_mem' {a b} ha hb := by n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]b:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}hb:b ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}⊢ a * b ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}
refine ⟨fun i j => ?_, fun i j => ?_⟩ refine_1 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]b:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}hb:b ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}i:nj:n⊢ ↑(a * b) i j ∈ integralAdelesrefine_2 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]b:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}hb:b ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}i:nj:n⊢ ↑(a * b)⁻¹ i j ∈ integralAdeles
· refine_1 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]b:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}hb:b ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}i:nj:n⊢ ↑(a * b) i j ∈ integralAdeles rw [Units.val_mul, refine_1 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]b:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}hb:b ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}i:nj:n⊢ (↑a * ↑b) i j ∈ integralAdeles refine_1 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]b:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}hb:b ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}i:nj:n⊢ ∑ j_1, ↑a i j_1 * ↑b j_1 j ∈ integralAdeles Matrix.mul_apply refine_1 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]b:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}hb:b ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}i:nj:n⊢ ∑ j_1, ↑a i j_1 * ↑b j_1 j ∈ integralAdelesrefine_1 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]b:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}hb:b ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}i:nj:n⊢ ∑ j_1, ↑a i j_1 * ↑b j_1 j ∈ integralAdeles]refine_1 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]b:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}hb:b ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}i:nj:n⊢ ∑ j_1, ↑a i j_1 * ↑b j_1 j ∈ integralAdeles
exact Subring.sum_mem _ fun k _ => mul_mem (ha.1 i k) (hb.1 k j) All goals completed! 🐙
· refine_2 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]b:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}hb:b ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}i:nj:n⊢ ↑(a * b)⁻¹ i j ∈ integralAdeles have hrev : ((a * b)⁻¹ : GL n 𝔸ᶠ[ℤ, ℚ]) = b⁻¹ * a⁻¹ := _root_.mul_inv_rev a b refine_2 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]b:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}hb:b ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}i:nj:nhrev:(a * b)⁻¹ = b⁻¹ * a⁻¹⊢ ↑(a * b)⁻¹ i j ∈ integralAdeles
rw [hrev, refine_2 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]b:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}hb:b ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}i:nj:nhrev:(a * b)⁻¹ = b⁻¹ * a⁻¹⊢ ↑(b⁻¹ * a⁻¹) i j ∈ integralAdeles refine_2 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]b:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}hb:b ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}i:nj:nhrev:(a * b)⁻¹ = b⁻¹ * a⁻¹⊢ ∑ j_1, ↑b⁻¹ i j_1 * ↑a⁻¹ j_1 j ∈ integralAdeles Units.val_mul, refine_2 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]b:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}hb:b ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}i:nj:nhrev:(a * b)⁻¹ = b⁻¹ * a⁻¹⊢ (↑b⁻¹ * ↑a⁻¹) i j ∈ integralAdelesrefine_2 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]b:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}hb:b ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}i:nj:nhrev:(a * b)⁻¹ = b⁻¹ * a⁻¹⊢ ∑ j_1, ↑b⁻¹ i j_1 * ↑a⁻¹ j_1 j ∈ integralAdeles Matrix.mul_apply refine_2 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]b:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}hb:b ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}i:nj:nhrev:(a * b)⁻¹ = b⁻¹ * a⁻¹⊢ ∑ j_1, ↑b⁻¹ i j_1 * ↑a⁻¹ j_1 j ∈ integralAdelesrefine_2 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]b:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}hb:b ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}i:nj:nhrev:(a * b)⁻¹ = b⁻¹ * a⁻¹⊢ ∑ j_1, ↑b⁻¹ i j_1 * ↑a⁻¹ j_1 j ∈ integralAdeles]refine_2 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]b:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}hb:b ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}i:nj:nhrev:(a * b)⁻¹ = b⁻¹ * a⁻¹⊢ ∑ j_1, ↑b⁻¹ i j_1 * ↑a⁻¹ j_1 j ∈ integralAdeles
exact Subring.sum_mem _ fun k _ => mul_mem (hb.2 i k) (ha.2 k j) All goals completed! 🐙
inv_mem' {a} ha := ⟨ha.2, by n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}⊢ ∀ (i j : n), ↑a⁻¹⁻¹ i j ∈ integralAdeles rw [inv_inv n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}⊢ ∀ (i j : n), ↑a i j ∈ integralAdeles n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}⊢ ∀ (i j : n), ↑a i j ∈ integralAdeles] n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq na:GL n 𝔸ᶠ[ℤ, ℚ]ha:a ∈ {g | (∀ (i j : n), ↑g i j ∈ integralAdeles) ∧ ∀ (i j : n), ↑g⁻¹ i j ∈ integralAdeles}⊢ ∀ (i j : n), ↑a i j ∈ integralAdeles; exact ha.1 All goals completed! 🐙⟩
lemma isOpen_integralAdelicSubgroup :
IsOpen ((integralAdelicSubgroup n) : Set (GL n 𝔸ᶠ[ℤ, ℚ])) := by n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq n⊢ IsOpen ↑(integralAdelicSubgroup n)
have hW : IsOpen {M : Matrix n n 𝔸ᶠ[ℤ, ℚ] | ∀ i j, M i j ∈ integralAdeles} := by
have h : {M : Matrix n n 𝔸ᶠ[ℤ, ℚ] | ∀ i j, M i j ∈ integralAdeles}
= ⋂ i, ⋂ j, (fun M : Matrix n n 𝔸ᶠ[ℤ, ℚ] => M i j) ⁻¹' integralAdeles := by n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq n⊢ IsOpen ↑(integralAdelicSubgroup n) n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh:{M | ∀ (i j : n), M i j ∈ integralAdeles} = ⋂ i, ⋂ j, (fun M ↦ M i j) ⁻¹' ↑integralAdeles⊢ IsOpen {M | ∀ (i j : n), M i j ∈ integralAdeles} n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nhW:IsOpen {M | ∀ (i j : n), M i j ∈ integralAdeles}⊢ IsOpen ↑(integralAdelicSubgroup n)
ext M n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nM:Matrix n n 𝔸ᶠ[ℤ, ℚ]⊢ M ∈ {M | ∀ (i j : n), M i j ∈ integralAdeles} ↔ M ∈ ⋂ i, ⋂ j, (fun M ↦ M i j) ⁻¹' ↑integralAdeles n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh:{M | ∀ (i j : n), M i j ∈ integralAdeles} = ⋂ i, ⋂ j, (fun M ↦ M i j) ⁻¹' ↑integralAdeles⊢ IsOpen {M | ∀ (i j : n), M i j ∈ integralAdeles} n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nhW:IsOpen {M | ∀ (i j : n), M i j ∈ integralAdeles}⊢ IsOpen ↑(integralAdelicSubgroup n); simp n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh:{M | ∀ (i j : n), M i j ∈ integralAdeles} = ⋂ i, ⋂ j, (fun M ↦ M i j) ⁻¹' ↑integralAdeles⊢ IsOpen {M | ∀ (i j : n), M i j ∈ integralAdeles} n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nhW:IsOpen {M | ∀ (i j : n), M i j ∈ integralAdeles}⊢ IsOpen ↑(integralAdelicSubgroup n) n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh:{M | ∀ (i j : n), M i j ∈ integralAdeles} = ⋂ i, ⋂ j, (fun M ↦ M i j) ⁻¹' ↑integralAdeles⊢ IsOpen {M | ∀ (i j : n), M i j ∈ integralAdeles} n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nhW:IsOpen {M | ∀ (i j : n), M i j ∈ integralAdeles}⊢ IsOpen ↑(integralAdelicSubgroup n)
rw [h n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh:{M | ∀ (i j : n), M i j ∈ integralAdeles} = ⋂ i, ⋂ j, (fun M ↦ M i j) ⁻¹' ↑integralAdeles⊢ IsOpen (⋂ i, ⋂ j, (fun M ↦ M i j) ⁻¹' ↑integralAdeles) n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh:{M | ∀ (i j : n), M i j ∈ integralAdeles} = ⋂ i, ⋂ j, (fun M ↦ M i j) ⁻¹' ↑integralAdeles⊢ IsOpen (⋂ i, ⋂ j, (fun M ↦ M i j) ⁻¹' ↑integralAdeles) n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nhW:IsOpen {M | ∀ (i j : n), M i j ∈ integralAdeles}⊢ IsOpen ↑(integralAdelicSubgroup n)] n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nh:{M | ∀ (i j : n), M i j ∈ integralAdeles} = ⋂ i, ⋂ j, (fun M ↦ M i j) ⁻¹' ↑integralAdeles⊢ IsOpen (⋂ i, ⋂ j, (fun M ↦ M i j) ⁻¹' ↑integralAdeles) n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nhW:IsOpen {M | ∀ (i j : n), M i j ∈ integralAdeles}⊢ IsOpen ↑(integralAdelicSubgroup n)
exact isOpen_iInter_of_finite fun i => isOpen_iInter_of_finite fun j =>
isOpen_integralAdeles.preimage (continuous_id.matrix_elem i j) n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nhW:IsOpen {M | ∀ (i j : n), M i j ∈ integralAdeles}⊢ IsOpen ↑(integralAdelicSubgroup n) n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nhW:IsOpen {M | ∀ (i j : n), M i j ∈ integralAdeles}⊢ IsOpen ↑(integralAdelicSubgroup n)
exact (hW.preimage Units.continuous_val).inter (hW.preimage Units.continuous_coe_inv) All goals completed! 🐙
lemma isCompact_integralAdelicSubgroup :
IsCompact ((integralAdelicSubgroup n) : Set (GL n 𝔸ᶠ[ℤ, ℚ])) := by n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq n⊢ IsCompact ↑(integralAdelicSubgroup n)
set W : Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ i j, M i j ∈ integralAdeles} with hWdef n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}⊢ IsCompact ↑(integralAdelicSubgroup n)
have hWc : IsCompact W :=
(Set.ext fun M => ⟨fun h i _ j _ => h i j, fun h i j => h i trivial j trivial⟩ :
W = Set.univ.pi fun _ : n => Set.univ.pi fun _ => (integralAdeles : Set 𝔸ᶠ[ℤ, ℚ])) ▸
isCompact_univ_pi fun _ => isCompact_univ_pi fun _ => isCompact_integralAdeles n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact W⊢ IsCompact ↑(integralAdelicSubgroup n)
have himg : Units.embedProduct _ '' (integralAdelicSubgroup n)
= (fun p : Matrix n n 𝔸ᶠ[ℤ, ℚ] × Matrix n n 𝔸ᶠ[ℤ, ℚ] => (p.1, MulOpposite.op p.2)) ''
((W ×ˢ W) ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1}) := by
ext p n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Wp:Matrix n n 𝔸ᶠ[ℤ, ℚ] × (Matrix n n 𝔸ᶠ[ℤ, ℚ])ᵐᵒᵖ⊢ p ∈ ⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) ↔
p ∈ (fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1}) n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Whimg:⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) =
(fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1})⊢ IsCompact ↑(integralAdelicSubgroup n)
constructor mp n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Wp:Matrix n n 𝔸ᶠ[ℤ, ℚ] × (Matrix n n 𝔸ᶠ[ℤ, ℚ])ᵐᵒᵖ⊢ p ∈ ⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) →
p ∈ (fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1})mpr n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Wp:Matrix n n 𝔸ᶠ[ℤ, ℚ] × (Matrix n n 𝔸ᶠ[ℤ, ℚ])ᵐᵒᵖ⊢ p ∈ (fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1}) →
p ∈ ⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Whimg:⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) =
(fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1})⊢ IsCompact ↑(integralAdelicSubgroup n)
· mp n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Wp:Matrix n n 𝔸ᶠ[ℤ, ℚ] × (Matrix n n 𝔸ᶠ[ℤ, ℚ])ᵐᵒᵖ⊢ p ∈ ⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) →
p ∈ (fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1}) n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Whimg:⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) =
(fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1})⊢ IsCompact ↑(integralAdelicSubgroup n) rintro ⟨g, hg, rfl⟩ mp n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Wg:(Matrix n n 𝔸ᶠ[ℤ, ℚ])ˣhg:g ∈ ↑(integralAdelicSubgroup n)⊢ (Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) g ∈
(fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1}) n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Whimg:⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) =
(fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1})⊢ IsCompact ↑(integralAdelicSubgroup n)
exact ⟨(↑g, ↑g⁻¹), ⟨⟨⟨hg.1, hg.2⟩, g.mul_inv⟩, g.inv_mul⟩, rfl⟩ All goals completed! 🐙 n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Whimg:⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) =
(fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1})⊢ IsCompact ↑(integralAdelicSubgroup n)
· mpr n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Wp:Matrix n n 𝔸ᶠ[ℤ, ℚ] × (Matrix n n 𝔸ᶠ[ℤ, ℚ])ᵐᵒᵖ⊢ p ∈ (fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1}) →
p ∈ ⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Whimg:⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) =
(fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1})⊢ IsCompact ↑(integralAdelicSubgroup n) rintro ⟨⟨A, B⟩, ⟨⟨⟨hA, hB⟩, h1⟩, h2⟩, rfl⟩ mpr n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact WA:Matrix n n 𝔸ᶠ[ℤ, ℚ]B:Matrix n n 𝔸ᶠ[ℤ, ℚ]h2:(A, B) ∈ {p | p.2 * p.1 = 1}h1:(A, B) ∈ {p | p.1 * p.2 = 1}hA:(A, B).1 ∈ WhB:(A, B).2 ∈ W⊢ (fun p ↦ (p.1, MulOpposite.op p.2)) (A, B) ∈ ⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Whimg:⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) =
(fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1})⊢ IsCompact ↑(integralAdelicSubgroup n)
exact ⟨⟨A, B, h1, h2⟩, ⟨hA, hB⟩, rfl⟩ n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Whimg:⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) =
(fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1})⊢ IsCompact ↑(integralAdelicSubgroup n) n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Whimg:⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) =
(fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1})⊢ IsCompact ↑(integralAdelicSubgroup n)
rw [Units.isEmbedding_embedProduct.isCompact_iff, n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Whimg:⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) =
(fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1})⊢ IsCompact (⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n)) n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Whimg:⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) =
(fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1})⊢ IsCompact ((fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1})) himg n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Whimg:⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) =
(fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1})⊢ IsCompact ((fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1})) n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Whimg:⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) =
(fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1})⊢ IsCompact ((fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1}))] n:Type u_1inst✝¹:Fintype ninst✝:DecidableEq nW:Set (Matrix n n 𝔸ᶠ[ℤ, ℚ]) := {M | ∀ (i j : n), M i j ∈ integralAdeles}hWdef:W = {M | ∀ (i j : n), M i j ∈ integralAdeles}hWc:IsCompact Whimg:⇑(Units.embedProduct (Matrix n n 𝔸ᶠ[ℤ, ℚ])) '' ↑(integralAdelicSubgroup n) =
(fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1})⊢ IsCompact ((fun p ↦ (p.1, MulOpposite.op p.2)) '' (W ×ˢ W ∩ {p | p.1 * p.2 = 1} ∩ {p | p.2 * p.1 = 1}))
exact (((hWc.prod hWc).inter_right (isClosed_eq (continuous_fst.mul continuous_snd)
continuous_const)).inter_right (isClosed_eq (continuous_snd.mul continuous_fst)
continuous_const)).image
(continuous_fst.prodMk (MulOpposite.continuous_op.comp continuous_snd)) All goals completed! 🐙end IntegralSubgroupend Matrix.GeneralLinearGroup