File: Mathlib/GroupTheory/SpecificGroups/KleinFour.lean

full_name: IsAddKleinFour.exponent_two
code: /-- An (additive) Klein four-group is an (additive) group of cardinality four and exponent two. -/
class IsAddKleinFour (G : Type*) [AddGroup G] : Prop where
  card_four : Nat.card G = 4
  exponent_two : AddMonoid.exponent G = 2
goal: AddMonoid.exponent G = 2

full_name: IsAddKleinFour
code: /-- An (additive) Klein four-group is an (additive) group of cardinality four and exponent two. -/
class IsAddKleinFour (G : Type*) [AddGroup G] : Prop where
  card_four : Nat.card G = 4
  exponent_two : AddMonoid.exponent G = 2
goal: Prop

full_name: IsAddKleinFour.card_four
code: /-- An (additive) Klein four-group is an (additive) group of cardinality four and exponent two. -/
class IsAddKleinFour (G : Type*) [AddGroup G] : Prop where
  card_four : Nat.card G = 4
  exponent_two : AddMonoid.exponent G = 2
goal: Nat.card G = 4

full_name: IsKleinFour.exponent_two
code: /-- A Klein four-group is a group of cardinality four and exponent two. -/
@[to_additive existing IsAddKleinFour]
class IsKleinFour (G : Type*) [Group G] : Prop where
  card_four : Nat.card G = 4
  exponent_two : Monoid.exponent G = 2
goal: Monoid.exponent G = 2

full_name: IsKleinFour
code: /-- A Klein four-group is a group of cardinality four and exponent two. -/
@[to_additive existing IsAddKleinFour]
class IsKleinFour (G : Type*) [Group G] : Prop where
  card_four : Nat.card G = 4
  exponent_two : Monoid.exponent G = 2
goal: Prop

full_name: IsKleinFour.card_four
code: /-- A Klein four-group is a group of cardinality four and exponent two. -/
@[to_additive existing IsAddKleinFour]
class IsKleinFour (G : Type*) [Group G] : Prop where
  card_four : Nat.card G = 4
  exponent_two : Monoid.exponent G = 2
goal: Nat.card G = 4

full_name: instIsAddKleinFourProdZModOfNatNat
code: instance : IsAddKleinFour (ZMod 2 × ZMod 2) 
goal: IsAddKleinFour (ZMod 2 × ZMod 2)

full_name: instIsKleinFourDihedralGroupOfNatNat
code: instance : IsKleinFour (DihedralGroup 2) 
goal: IsKleinFour (DihedralGroup 2)

full_name: instIsAddKleinFourAdditiveOfIsKleinFour
code: instance {G : Type*} [Group G] [IsKleinFour G] :
    IsAddKleinFour (Additive G) 
goal: IsAddKleinFour (Additive G)

full_name: instIsKleinFourMultiplicativeOfIsAddKleinFour
code: instance {G : Type*} [AddGroup G] [IsAddKleinFour G] :
    IsKleinFour (Multiplicative G) 
goal: IsKleinFour (Multiplicative G)

full_name: IsKleinFour.instFinite
code: @[to_additive]
instance instFinite {G : Type*} [Group G] [IsKleinFour G] : Finite G 
goal: Finite G

full_name: IsAddKleinFour.instFinite
code: @[to_additive]
instance instFinite {G : Type*} [Group G] [IsKleinFour G] : Finite G 
goal: Finite G

full_name: IsAddKleinFour.card_four'
code: @[to_additive (attr := simp)]
lemma card_four' {G : Type*} [Group G] [Fintype G] [IsKleinFour G] :
    Fintype.card G = 4 
goal: Fintype.card G = 4

full_name: IsKleinFour.card_four'
code: @[to_additive (attr := simp)]
lemma card_four' {G : Type*} [Group G] [Fintype G] [IsKleinFour G] :
    Fintype.card G = 4 
goal: Fintype.card G = 4

full_name: IsAddKleinFour.not_isAddCyclic
code: @[to_additive]
lemma not_isCyclic : ¬ IsCyclic G 
goal: ¬IsAddCyclic G

full_name: IsKleinFour.not_isCyclic
code: @[to_additive]
lemma not_isCyclic : ¬ IsCyclic G 
goal: ¬IsCyclic G

full_name: IsAddKleinFour.neg_eq_self
code: @[to_additive]
lemma inv_eq_self (x : G) : x⁻¹ = x 
goal: -x = x

full_name: IsKleinFour.inv_eq_self
code: @[to_additive]
lemma inv_eq_self (x : G) : x⁻¹ = x 
goal: x⁻¹ = x

full_name: IsAddKleinFour.add_self
code: @[to_additive]
lemma mul_self (x : G) : x * x = 1 
goal: x + x = 0

full_name: IsKleinFour.mul_self
code: @[to_additive]
lemma mul_self (x : G) : x * x = 1 
goal: x * x = 1

full_name: IsKleinFour.eq_finset_univ
code: @[to_additive]
lemma eq_finset_univ [Fintype G] [DecidableEq G]
    {x y : G} (hx : x ≠ 1) (hy : y ≠ 1) (hxy : x ≠ y) : {x * y, x, y, (1 : G)} = Finset.univ 
goal: {x * y, x, y, 1} = Finset.univ

full_name: IsAddKleinFour.eq_finset_univ
code: @[to_additive]
lemma eq_finset_univ [Fintype G] [DecidableEq G]
    {x y : G} (hx : x ≠ 1) (hy : y ≠ 1) (hxy : x ≠ y) : {x * y, x, y, (1 : G)} = Finset.univ 
goal: {x + y, x, y, 0} = Finset.univ

full_name: IsAddKleinFour.eq_add_of_ne_all
code: @[to_additive]
lemma eq_mul_of_ne_all {x y z : G} (hx : x ≠ 1)
    (hy : y ≠ 1) (hxy : x ≠ y) (hz : z ≠ 1) (hzx : z ≠ x) (hzy : z ≠ y) : z = x * y 
goal: z = x + y

full_name: IsKleinFour.eq_mul_of_ne_all
code: @[to_additive]
lemma eq_mul_of_ne_all {x y z : G} (hx : x ≠ 1)
    (hy : y ≠ 1) (hxy : x ≠ y) (hz : z ≠ 1) (hzx : z ≠ x) (hzy : z ≠ y) : z = x * y 
goal: z = x * y

full_name: IsAddKleinFour.addEquiv'
code: /-- An equivalence between an `IsKleinFour` group `G₁` and a group `G₂` of exponent two which sends
`1 : G₁` to `1 : G₂` is in fact an isomorphism. -/
@[to_additive "An equivalence between an `IsAddKleinFour` group `G₁` and a group `G₂` of exponent
two which sends `0 : G₁` to `0 : G₂` is in fact an isomorphism."]
def mulEquiv' (e : G₁ ≃ G₂) (he : e 1 = 1) (h : Monoid.exponent G₂ = 2) : G₁ ≃* G₂ 
goal: G₁ ≃+ G₂

full_name: IsKleinFour.mulEquiv'
code: /-- An equivalence between an `IsKleinFour` group `G₁` and a group `G₂` of exponent two which sends
`1 : G₁` to `1 : G₂` is in fact an isomorphism. -/
@[to_additive "An equivalence between an `IsAddKleinFour` group `G₁` and a group `G₂` of exponent
two which sends `0 : G₁` to `0 : G₂` is in fact an isomorphism."]
def mulEquiv' (e : G₁ ≃ G₂) (he : e 1 = 1) (h : Monoid.exponent G₂ = 2) : G₁ ≃* G₂ 
goal: G₁ ≃* G₂

full_name: IsKleinFour.mulEquiv
code: /-- Any two `IsKleinFour` groups are isomorphic via any equivalence which sends the identity of one
group to the identity of the other. -/
@[to_additive (attr := reducible) "Any two `IsAddKleinFour` groups are isomorphic via any
equivalence which sends the identity of one group to the identity of the other."]
def mulEquiv [IsKleinFour G₂] (e : G₁ ≃ G₂) (he : e 1 = 1) : G₁ ≃* G₂ 
goal: G₁ ≃* G₂

full_name: IsAddKleinFour.addEquiv
code: /-- Any two `IsKleinFour` groups are isomorphic via any equivalence which sends the identity of one
group to the identity of the other. -/
@[to_additive (attr := reducible) "Any two `IsAddKleinFour` groups are isomorphic via any
equivalence which sends the identity of one group to the identity of the other."]
def mulEquiv [IsKleinFour G₂] (e : G₁ ≃ G₂) (he : e 1 = 1) : G₁ ≃* G₂ 
goal: G₁ ≃+ G₂

full_name: IsAddKleinFour.nonempty_addEquiv
code: /-- Any two `IsKleinFour` groups are isomorphic. -/
@[to_additive "Any two `IsAddKleinFour` groups are isomorphic."]
lemma nonempty_mulEquiv [IsKleinFour G₂] : Nonempty (G₁ ≃* G₂) 
goal: Nonempty (G₁ ≃+ G₂)

full_name: IsKleinFour.nonempty_mulEquiv
code: /-- Any two `IsKleinFour` groups are isomorphic. -/
@[to_additive "Any two `IsAddKleinFour` groups are isomorphic."]
lemma nonempty_mulEquiv [IsKleinFour G₂] : Nonempty (G₁ ≃* G₂) 
goal: Nonempty (G₁ ≃* G₂)