LeanEval crystallographic groups, affine equivalences, and counting functions
DefinitionLeanEval_SpaceGroups_DefinitionsFor every natural dimension , let be real Euclidean space, and consider subgroups of its affine isometry group. A group satisfies the discrete condition when, for every point and every real , only finitely many of its elements move by distance at most . It is crystallographic when it also contains translations by the members of some linearly independent family of vectors.
Two such groups are affinely equivalent when conjugation by an invertible affine map identifies their sets of affine transformations. The orientation-preserving version additionally requires that conjugating map to have positive linear determinant. An isometry is orientation-preserving precisely when its own linear determinant is positive.
The three counting functions take extended-natural cardinalities of the sets of distinct equivalence-class subsets: unrestricted affine equivalence; orientation-preserving affine equivalence; and orientation-preserving affine equivalence restricted to crystallographic groups all of whose elements preserve orientation. They do not prescribe any numerical answer, assume a classification, or identify groups by a supplied finite list. This bundle provides exactly the reusable definitions needed by the goal.
import Mathlib
namespace LeanEval
namespace Geometry
namespace SpaceGroupsProblem
/-- The Euclidean model space `ℝᵈ`. -/
abbrev E (d : ℕ) := EuclideanSpace ℝ (Fin d)
/-- The Euclidean motion group `E_d`. -/
abbrev EuclideanIsom (d : ℕ) := E d ≃ᵃⁱ[ℝ] E d
/-- The affine group `Aff(ℝᵈ)`. -/
abbrev AffineGroup (d : ℕ) := E d ≃ᵃ[ℝ] E d
/-- `g ∈ E_d` is **translation by `v`**. -/
def IsTranslationBy {d : ℕ} (g : EuclideanIsom d) (v : E d) : Prop :=
∀ x : E d, g x = x + v
/-- A subgroup `G ≤ E_d` is **discrete** in the proper-discontinuity
sense. -/
def IsDiscrete {d : ℕ} (G : Subgroup (EuclideanIsom d)) : Prop :=
∀ x : E d, ∀ ε > (0 : ℝ),
{g : EuclideanIsom d | g ∈ G ∧ dist (g x) x ≤ ε}.Finite
/-- A subgroup `G ≤ E_d` is **crystallographic**: discrete and contains
`d` linearly independent translations. -/
structure IsCrystallographicGroup {d : ℕ} (G : Subgroup (EuclideanIsom d)) : Prop where
discrete : IsDiscrete G
cocompact : ∃ v : Fin d → E d, LinearIndependent ℝ v ∧
∀ i, ∃ g : EuclideanIsom d, g ∈ G ∧ IsTranslationBy g (v i)
/-- The set of crystallographic groups in dimension `d`. -/
def CrystallographicGroup (d : ℕ) : Type :=
{ G : Subgroup (EuclideanIsom d) // IsCrystallographicGroup G }
/-- An affine isometry is **orientation-preserving** if its linear part
has positive determinant. -/
def IsOrientationPreservingIsom {d : ℕ} (g : EuclideanIsom d) : Prop :=
0 < (g.toAffineEquiv.linear.det : ℝ)
/-- Two subgroups `G₁, G₂ ≤ E_d` are **affinely equivalent**. -/
def AffinelyEquivalent {d : ℕ} (G₁ G₂ : Subgroup (EuclideanIsom d)) : Prop :=
∃ φ : AffineGroup d,
{h : AffineGroup d | ∃ g ∈ G₁, h = φ * g.toAffineEquiv * φ⁻¹} =
{h : AffineGroup d | ∃ g ∈ G₂, h = g.toAffineEquiv}
/-- Two subgroups `G₁, G₂ ≤ E_d` are **orientation-preserving affinely
equivalent**: conjugation by a positive-determinant affine map takes
one to the other. -/
def AffOPEquivalent {d : ℕ} (G₁ G₂ : Subgroup (EuclideanIsom d)) : Prop :=
∃ φ : AffineGroup d, 0 < (φ.linear.det : ℝ) ∧
{h : AffineGroup d | ∃ g ∈ G₁, h = φ * g.toAffineEquiv * φ⁻¹} =
{h : AffineGroup d | ∃ g ∈ G₂, h = g.toAffineEquiv}
/-- Count of crystallographic groups modulo affine equivalence. -/
noncomputable def crystallographicCount (d : ℕ) : ℕ∞ :=
Set.encard {S : Set (CrystallographicGroup d) |
∃ G₀ : CrystallographicGroup d,
S = {H : CrystallographicGroup d | AffinelyEquivalent G₀.1 H.1}}
/-- Count of crystallographic groups modulo orientation-preserving
affine equivalence. -/
noncomputable def crystallographicCountOP (d : ℕ) : ℕ∞ :=
Set.encard {S : Set (CrystallographicGroup d) |
∃ G₀ : CrystallographicGroup d,
S = {H : CrystallographicGroup d | AffOPEquivalent G₀.1 H.1}}
/-- Count of orientation-preserving crystallographic groups modulo
orientation-preserving affine equivalence. -/
noncomputable def crystallographicCountOPOnly (d : ℕ) : ℕ∞ :=
Set.encard {S : Set { G : CrystallographicGroup d //
∀ g, g ∈ G.1 → IsOrientationPreservingIsom g } |
∃ G₀ : { G : CrystallographicGroup d //
∀ g, g ∈ G.1 → IsOrientationPreservingIsom g },
S = {H | AffOPEquivalent G₀.1.1 H.1.1}}
end SpaceGroupsProblem
end Geometry
end LeanEval
Read-back
What the Lean code literally says, in plain math · gpt-6-astra
E. For every natural number , denotes the real Euclidean space with coordinates indexed by , equipped with its Euclidean inner product. This includes , when the space consists of a single zero vector.
EuclideanIsom. For every natural number , denotes the type of bijective real affine isometries from the coordinate Euclidean space to itself. Dimension zero is included.
AffineGroup. For every natural number , denotes the type of bijective real affine maps from the coordinate Euclidean space to itself, with group operation given by composition. These maps need not preserve distances. Dimension zero is included.
IsTranslationBy. For any natural number , any bijective real affine isometry of , and any vector , this predicate means that for every . The vector may be zero; dimension zero is also allowed.
IsDiscrete. For any natural number and any subgroup of the group of bijective real affine isometries of , this predicate means that, for every and every real , the set is finite. The inequality includes its boundary, and the finiteness concerns the isometries themselves, not just their images of . Dimension zero is included.
IsCrystallographicGroup. For any natural number and any subgroup of the group of bijective real affine isometries of , this proposition requires both of the following: for every and every real , the set is finite; and there exists a real-linearly independent family of vectors in such that, for every index , some satisfies for every . The second requirement is the field named cocompact. When , the family is empty, its linear independence holds, and the requirement for each index is vacuous.
CrystallographicGroup. For every natural number , this defines the type of subgroups of the bijective real affine isometries of , together with evidence that they satisfy these two conditions: for every point and every real , only finitely many satisfy ; and there exist real-linearly independent vectors such that each map belongs to . Dimension zero is included, with an empty family of vectors and no translation requirements from that family.
IsOrientationPreservingIsom. For any natural number and any bijective real affine isometry of , this predicate means that the real determinant of the linear part of is strictly positive. There is no condition on its translation part. When , the determinant is , so the predicate holds.
AffinelyEquivalent. For any natural number and any two subgroups of the bijective real affine isometries of , this predicate means that there exists a bijective real affine map such that as sets of bijective affine maps. The map need not be an isometry and has no determinant-sign restriction. Neither subgroup is assumed to satisfy any discreteness or translation condition. Dimension zero is included.
AffOPEquivalent. For any natural number and any two subgroups of the bijective real affine isometries of , this predicate means that there exists a bijective real affine map whose linear part has strictly positive real determinant and for which as sets of bijective affine maps. The map need not preserve distances, and the elements of and are not required to have positive determinant. Neither subgroup is assumed discrete or required to contain specified translations. Dimension zero is included, where the determinant restriction holds automatically.
crystallographicCount. For every natural number , let be the type of subgroups of the bijective real affine isometries of satisfying both: for every and real , the set is finite; and contains the translations by each vector in some real-linearly independent family of vectors. This definition assigns the extended natural cardinality of the set of subsets for which there exists such that consists exactly of those for which some bijective real affine map satisfies . There is no determinant restriction on . Distinct subsets are counted, rather than choices of representatives or conjugating maps; the value is if there are infinitely many such subsets, and if there are none. Dimension zero is included, where the family of translation vectors is empty.
crystallographicCountOP. For every natural number , let be the type of subgroups of the bijective real affine isometries of such that, for every point and real , only finitely many satisfy , and such that contains translations by all vectors in some real-linearly independent family of vectors. This definition assigns the extended natural cardinality of the set of subsets for which there exists such that consists exactly of those satisfying for some bijective real affine map with strictly positive determinant of its linear part. Group elements themselves have no determinant-sign restriction. Distinct subsets are counted, not representatives or maps; infinitely many subsets give , and no subsets give . Dimension zero is included, with an empty translation family and determinant for the conjugating map.
crystallographicCountOPOnly. For every natural number , let be the type of subgroups of the bijective real affine isometries of satisfying all three conditions: for every and every real , the set is finite; contains translations by every vector in some real-linearly independent family of vectors; and every has strictly positive determinant of its linear part. This definition assigns the extended natural cardinality of the set of subsets for which there exists such that consists exactly of those for which some bijective real affine map with strictly positive determinant of its linear part satisfies . Distinct subsets are counted, not representatives or conjugating maps; the value is for infinitely many subsets and for none. Dimension zero is included, where the translation family is empty and all the determinant conditions hold with determinant .
Confirmed by the mission captain (proposal self-audit).