Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Concrete groups and cohomology for the counterexamples

Definition
LocalConjugacy_Examples

by burkh4rt · Sep 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

group-theorylocal-conjugacyprofinite-groups

The standard groups S3S_3S3​, Q8Q_8Q8​, and C3C_3C3​; the imprimitive wreath product C3≀S3C_3\wr S_3C3​≀S3​ through its three-coordinate permutation action; the Heisenberg group of order 272727 through upper-unitriangular coordinates; and nonabelian H1H^1H1 for explicit finite-group actions. The general linear group in the target is Mathlib's GL(2,F3)GL(2,\mathbf F_3)GL(2,F3​).

Definition code
import Definitions.Def_LocalConjugacy_Cohomology

/-!
# Concrete groups and finite cohomology for the two counterexamples

Mathlib supplies the quaternion group, permutation groups, general linear group,
cyclic groups (`Multiplicative (ZMod n)`), Sylow subgroups, and semidirect products.
The imprimitive wreath product here uses the natural action of S₃ on three points;
the regular wreath product would have six base coordinates and the wrong order.
The Heisenberg model records the three upper-unitriangular matrix coordinates.
Finite cocycles need no extra continuity predicate: all finite groups in the
examples carry their discrete topology, in which every map is continuous.
-/

namespace LocalConjugacy

/-- The symmetric group on three letters, using Mathlib's permutation group. -/
abbrev S3 := Equiv.Perm (Fin 3)

/-- The quaternion group of order eight, using Mathlib's standard presentation. -/
abbrev Q8 := QuaternionGroup 2

/-- The cyclic group of order three, written multiplicatively. -/
abbrev C3 := Multiplicative (ZMod 3)

/-- The base of the imprimitive wreath product: one C₃ for each of three letters. -/
abbrev WreathBase := Fin 3 → C3

/-- Permuting coordinates is a homomorphism S₃ → Aut(C₃³).
The inverse permutation in `arrowCongr` gives a left group action. -/
def wreathAction : S3 →* MulAut WreathBase where
  toFun s := MulEquiv.arrowCongr s (MulEquiv.refl C3)
  map_one' := by
    -- Equality of coordinate permutations reduces to equality at each coordinate.
    ext b i
    rfl
  map_mul' s t := by
    -- The inverse of a product reverses the two precompositions.
    ext b i
    rfl

/-- The natural, imprimitive wreath product C₃ ≀ S₃, of order 3³ · 6 = 162. -/
abbrev WreathC3S3 := WreathBase ⋊[wreathAction] S3

/-- Coordinates of the matrix [[1,a,c],[0,1,b],[0,0,1]] over F₃.
This fixes the Heisenberg group itself, rather than only its order and exponent. -/
@[ext] structure Heisenberg3 where
  a : ZMod 3
  b : ZMod 3
  c : ZMod 3

/-- Matrix multiplication in the three coordinates; the cross term is a · b'. -/
instance heisenbergMul : Mul Heisenberg3 :=
  ⟨fun x y => ⟨x.a + y.a, x.b + y.b, x.c + y.c + x.a * y.b⟩⟩

/-- The identity matrix has all three upper-diagonal coordinates zero. -/
instance heisenbergOne : One Heisenberg3 := ⟨⟨0, 0, 0⟩⟩

/-- Matrix inversion introduces the cross-term correction in the top-right entry. -/
instance heisenbergInv : Inv Heisenberg3 :=
  ⟨fun x => ⟨-x.a, -x.b, -x.c + x.a * x.b⟩⟩

/-- The matrix coordinate operations satisfy the group axioms over F₃. -/
instance : Group Heisenberg3 where
  mul := heisenbergMul.mul
  one := heisenbergOne.one
  inv := heisenbergInv.inv
  mul_assoc x y z := by
    -- The group law is associative by the distributive law in F₃.
    apply Heisenberg3.ext
    · change (x.a + y.a) + z.a = x.a + (y.a + z.a)
      ring
    · change (x.b + y.b) + z.b = x.b + (y.b + z.b)
      ring
    · change (x.c + y.c + x.a * y.b) + z.c + (x.a + y.a) * z.b =
        x.c + (y.c + z.c + y.a * z.b) + x.a * (y.b + z.b)
      ring
  one_mul x := by
    -- The zero triple is the identity matrix.
    apply Heisenberg3.ext
    · change 0 + x.a = x.a
      ring
    · change 0 + x.b = x.b
      ring
    · change 0 + x.c + 0 * x.b = x.c
      ring
  mul_one x := by
    apply Heisenberg3.ext
    · change x.a + 0 = x.a
      ring
    · change x.b + 0 = x.b
      ring
    · change x.c + 0 + x.a * 0 = x.c
      ring
  inv_mul_cancel x := by
    -- The correction a · b in the inverse cancels the cross term.
    apply Heisenberg3.ext
    · change -x.a + x.a = 0
      ring
    · change -x.b + x.b = 0
      ring
    · change (-x.c + x.a * x.b) + x.c + (-x.a) * x.b = 0
      ring

/-- Nonabelian cocycles for an explicitly supplied finite-group action. -/
def FiniteCocycle {J N : Type*} [Group J] [Group N] (a : J →* MulAut N) :=
  {f : J → N // ∀ x y, f (x * y) = f x * a x (f y)}

/-- Two cocycles differ by one global coboundary coefficient.
The structural equivalence proof is included so the quotient is an actual type. -/
def finiteCohomologySetoid {J N : Type*} [Group J] [Group N]
    (a : J →* MulAut N) : Setoid (FiniteCocycle a) where
  r f g := ∃ n : N, ∀ x, g.val x = n⁻¹ * f.val x * a x n
  iseqv := by
    constructor
    · -- The identity coefficient leaves a cocycle unchanged.
      intro f
      exact ⟨1, by simp⟩
    · -- Inverting a witness reverses the cohomology relation.
      rintro f g ⟨n, hn⟩
      refine ⟨n⁻¹, fun x => ?_⟩
      rw [hn x]
      simp [mul_assoc]
    · -- Multiplication composes the two global witnesses.
      rintro f g h ⟨n, hn⟩ ⟨m, hm⟩
      refine ⟨n * m, fun x => ?_⟩
      rw [hm x, hn x]
      simp [mul_assoc]

/-- Nonabelian H¹ for finite discrete groups, as an actual quotient of cocycles. -/
def FiniteH1 {J N : Type*} [Group J] [Group N] (a : J →* MulAut N) :=
  Quotient (finiteCohomologySetoid a)

/-- Finite local conjugacy, expressed directly with Mathlib's Sylow subgroups.
The subgroup embeddings place both Sylow subgroups in the same ambient group.
Primes not dividing a subgroup order are included; their Sylow subgroups are trivial. -/
def FiniteLocallyConjugate {G : Type*} [Group G] (H K : Subgroup G) : Prop :=
  ∀ (p : ℕ) (hp : p.Prime),
    letI : Fact p.Prime := ⟨hp⟩
    ∃ (P : Sylow p H) (Q : Sylow p K),
      Conjugate (P.toSubgroup.map H.subtype) (Q.toSubgroup.map K.subtype)

/-- The normal copy of Q₈ in its semidirect product with S₃. -/
def quaternionKernel (a : S3 →* MulAut Q8) : Subgroup (Q8 ⋊[a] S3) :=
  (SemidirectProduct.inl : Q8 →* Q8 ⋊[a] S3).range

/-- The canonical S₃ complement in the same semidirect product. -/
def quaternionComplement (a : S3 →* MulAut Q8) : Subgroup (Q8 ⋊[a] S3) :=
  (SemidirectProduct.inr : S3 →* Q8 ⋊[a] S3).range

end LocalConjugacy
Source
Michael C. Burkhart, Local conjugacy in prosolvable groups, arXiv:2609.37678v1, https://arxiv.org/pdf/2609.37678v1, §§1–4, pp. 1–8. Adapted in part from the author’s local Apache-2.0 Lean development.
Read-back

What the Lean code literally says, in plain math · GPT-6 family (exact model variant not exposed)

S3. This abbreviation denotes the group of all permutations of the three-element set {0,1,2}\{0,1,2\}{0,1,2}, with permutation composition as its group operation.

Q8. This abbreviation denotes the generalized quaternion group with parameter 222, namely the eight-element quaternion group. Concretely, its elements are aia_iai​ and xix_ixi​ for i∈Z/4Zi\in\mathbb Z/4\mathbb Zi∈Z/4Z, with products aiaj=ai+ja_i a_j=a_{i+j}ai​aj​=ai+j​, aixj=xj−ia_i x_j=x_{j-i}ai​xj​=xj−i​, xiaj=xi+jx_i a_j=x_{i+j}xi​aj​=xi+j​, and xixj=a2+j−ix_i x_j=a_{2+j-i}xi​xj​=a2+j−i​; the identity is a0a_0a0​, and inverses are ai−1=a−ia_i^{-1}=a_{-i}ai−1​=a−i​ and xi−1=x2+ix_i^{-1}=x_{2+i}xi−1​=x2+i​.

C3. This abbreviation denotes the additive group of Z/3Z\mathbb Z/3\mathbb ZZ/3Z regarded as a multiplicatively written group: multiplication is addition modulo 333, the multiplicative identity corresponds to 000, and multiplicative inversion corresponds to additive negation. It does not denote the group of units of Z/3Z\mathbb Z/3\mathbb ZZ/3Z.

WreathBase. This abbreviation denotes the group of functions from the three-element set {0,1,2}\{0,1,2\}{0,1,2} to the additive group of Z/3Z\mathbb Z/3\mathbb ZZ/3Z written multiplicatively. Its operations are pointwise, so its underlying group is the direct product of three cyclic groups of order 333.

wreathAction. This defines a group homomorphism from the permutation group of {0,1,2}\{0,1,2\}{0,1,2} to the group of multiplicative automorphisms of the group of functions b:{0,1,2}→C3b:\{0,1,2\}\to C_3b:{0,1,2}→C3​, where C3C_3C3​ is the additive group of Z/3Z\mathbb Z/3\mathbb ZZ/3Z written multiplicatively. The permutation sss acts by (s⋅b)(i)=b(s−1(i))(s\cdot b)(i)=b(s^{-1}(i))(s⋅b)(i)=b(s−1(i)) for every function bbb and index iii; the inverse automorphism sends bbb to b∘sb\circ sb∘s. The supplied proofs assert preservation of the identity permutation and of multiplication of permutations.

WreathC3S3. This abbreviation denotes the semidirect product of the group BBB of functions {0,1,2}→C3\{0,1,2\}\to C_3{0,1,2}→C3​, with pointwise multiplication, by the permutation group S3S_3S3​ of {0,1,2}\{0,1,2\}{0,1,2}, where C3C_3C3​ is the additive group of Z/3Z\mathbb Z/3\mathbb ZZ/3Z written multiplicatively and s∈S3s\in S_3s∈S3​ acts by b↦b∘s−1b\mapsto b\circ s^{-1}b↦b∘s−1. Its elements are pairs (b,s)(b,s)(b,s) and its product is (b,s)(d,t)=(b (d∘s−1),st)(b,s)(d,t)=(b\,(d\circ s^{-1}),st)(b,s)(d,t)=(b(d∘s−1),st).

Heisenberg3. This structure consists of triples (a,b,c)(a,b,c)(a,b,c) with all three coordinates in Z/3Z\mathbb Z/3\mathbb ZZ/3Z, with no additional equations or restrictions on the coordinates. Its named projections return aaa, bbb, and ccc, and the extensionality attribute registers that equality of the three coordinates implies equality of the triples. The structure declaration itself does not supply multiplication.

heisenbergMul. This supplies multiplication on the type of triples (a,b,c)∈(Z/3Z)3(a,b,c)\in(\mathbb Z/3\mathbb Z)^3(a,b,c)∈(Z/3Z)3 by (a,b,c)(a′,b′,c′)=(a+a′,b+b′,c+c′+ab′)(a,b,c)(a',b',c')=(a+a',b+b',c+c'+ab')(a,b,c)(a′,b′,c′)=(a+a′,b+b′,c+c′+ab′), with all coordinate arithmetic in Z/3Z\mathbb Z/3\mathbb ZZ/3Z. This declaration supplies the operation; it does not itself assert its group laws.

heisenbergOne. This supplies the distinguished multiplicative identity candidate on the type of triples in (Z/3Z)3(\mathbb Z/3\mathbb Z)^3(Z/3Z)3 as (0,0,0)(0,0,0)(0,0,0). The identity laws are not part of this particular declaration.

heisenbergInv. This supplies inversion on the type of triples in (Z/3Z)3(\mathbb Z/3\mathbb Z)^3(Z/3Z)3 by (a,b,c)−1=(−a,−b,−c+ab)(a,b,c)^{-1}=(-a,-b,-c+ab)(a,b,c)−1=(−a,−b,−c+ab), with arithmetic in Z/3Z\mathbb Z/3\mathbb ZZ/3Z. The inverse laws are not part of this particular declaration.

Anonymous group instance on Heisenberg3. This equips the type of all triples in (Z/3Z)3(\mathbb Z/3\mathbb Z)^3(Z/3Z)3 with a group structure whose multiplication is (a,b,c)(a′,b′,c′)=(a+a′,b+b′,c+c′+ab′)(a,b,c)(a',b',c')=(a+a',b+b',c+c'+ab')(a,b,c)(a′,b′,c′)=(a+a′,b+b′,c+c′+ab′), whose identity is (0,0,0)(0,0,0)(0,0,0), and whose inverse is (a,b,c)−1=(−a,−b,−c+ab)(a,b,c)^{-1}=(-a,-b,-c+ab)(a,b,c)−1=(−a,−b,−c+ab). The declaration supplies proofs that this multiplication is associative for every three triples, that (0,0,0)(0,0,0)(0,0,0) is both a left and a right identity for every triple, and that x−1x=(0,0,0)x^{-1}x=(0,0,0)x−1x=(0,0,0) for every triple xxx.

FiniteCocycle. For arbitrary groups JJJ and NNN and a group homomorphism α:J→Aut⁡(N)\alpha:J\to\operatorname{Aut}(N)α:J→Aut(N), this defines the type of functions f:J→Nf:J\to Nf:J→N together with the condition f(xy)=f(x)α(x)(f(y))f(xy)=f(x)\alpha(x)(f(y))f(xy)=f(x)α(x)(f(y)) for every x,y∈Jx,y\in Jx,y∈J. Neither JJJ nor NNN is assumed finite, and no topology or continuity condition is imposed.

finiteCohomologySetoid. For arbitrary groups JJJ and NNN and a group homomorphism α:J→Aut⁡(N)\alpha:J\to\operatorname{Aut}(N)α:J→Aut(N), this defines an equivalence relation on the functions f:J→Nf:J\to Nf:J→N satisfying f(xy)=f(x)α(x)(f(y))f(xy)=f(x)\alpha(x)(f(y))f(xy)=f(x)α(x)(f(y)) for all x,y∈Jx,y\in Jx,y∈J. Two such functions f,gf,gf,g are related exactly when there exists one n∈Nn\in Nn∈N such that g(x)=n−1f(x)α(x)(n)g(x)=n^{-1}f(x)\alpha(x)(n)g(x)=n−1f(x)α(x)(n) for every x∈Jx\in Jx∈J. The declaration proves reflexivity, symmetry, and transitivity of this relation. There are no finiteness, topology, or continuity hypotheses.

FiniteH1. For arbitrary groups JJJ and NNN and a group homomorphism α:J→Aut⁡(N)\alpha:J\to\operatorname{Aut}(N)α:J→Aut(N), this defines the quotient set of functions f:J→Nf:J\to Nf:J→N satisfying f(xy)=f(x)α(x)(f(y))f(xy)=f(x)\alpha(x)(f(y))f(xy)=f(x)α(x)(f(y)) for every x,y∈Jx,y\in Jx,y∈J, where fff and ggg represent the same quotient element exactly when there is n∈Nn\in Nn∈N such that g(x)=n−1f(x)α(x)(n)g(x)=n^{-1}f(x)\alpha(x)(n)g(x)=n−1f(x)α(x)(n) for all x∈Jx\in Jx∈J. There is no finiteness assumption on either group or on the quotient, and no continuity condition.

FiniteLocallyConjugate. For an arbitrary group GGG and subgroups H,K≤GH,K\leq GH,K≤G, this is the proposition that for every natural number ppp that is prime, there exist a Sylow ppp-subgroup PPP of the abstract group HHH and a Sylow ppp-subgroup QQQ of the abstract group KKK whose images in GGG under the subgroup inclusions are conjugate: there is g∈Gg\in Gg∈G with gPg−1=QgPg^{-1}=QgPg−1=Q, after identifying these images with subgroups of GGG. Here a Sylow ppp-subgroup means a maximal ppp-subgroup, where a group is a ppp-group if every element xxx satisfies xpk=1x^{p^k}=1xpk=1 for some natural number kkk. No finiteness or topology is assumed on G,H,KG,H,KG,H,K, and the quantifier includes every prime, including primes that divide none of the orders when the groups are finite. The choices of P,Q,gP,Q,gP,Q,g may depend on ppp.

quaternionKernel. For any group homomorphism α:S3→Aut⁡(Q8)\alpha:S_3\to\operatorname{Aut}(Q_8)α:S3​→Aut(Q8​), where S3S_3S3​ is the permutation group of {0,1,2}\{0,1,2\}{0,1,2} and Q8Q_8Q8​ is the eight-element quaternion group, this defines the subgroup of Q8⋊αS3Q_8\rtimes_\alpha S_3Q8​⋊α​S3​ consisting of the pairs (q,1)(q,1)(q,1) with q∈Q8q\in Q_8q∈Q8​. It is the image of the canonical homomorphism q↦(q,1)q\mapsto(q,1)q↦(q,1); the ambient semidirect product has multiplication (q,s)(r,t)=(qα(s)(r),st)(q,s)(r,t)=(q\alpha(s)(r),st)(q,s)(r,t)=(qα(s)(r),st).

quaternionComplement. For any group homomorphism α:S3→Aut⁡(Q8)\alpha:S_3\to\operatorname{Aut}(Q_8)α:S3​→Aut(Q8​), where S3S_3S3​ is the permutation group of {0,1,2}\{0,1,2\}{0,1,2} and Q8Q_8Q8​ is the eight-element quaternion group, this defines the subgroup of Q8⋊αS3Q_8\rtimes_\alpha S_3Q8​⋊α​S3​ consisting of the pairs (1,s)(1,s)(1,s) with s∈S3s\in S_3s∈S3​. It is the image of the canonical homomorphism s↦(1,s)s\mapsto(1,s)s↦(1,s); the ambient semidirect product has multiplication (q,s)(r,t)=(qα(s)(r),st)(q,s)(r,t)=(q\alpha(s)(r),st)(q,s)(r,t)=(qα(s)(r),st).

Human review
  • Endorsed by Shuze Chen · Sep 30, 2026

    Confirmed by the moderator at approval.

  • Endorsed by burkh4rt · Sep 30, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me