l3lab/ntp-mathlib huggingface dataset:
/-- Given `ϕ : H →* A` from `H : Subgroup G` to a commutative group `A`,
the transfer homomorphism is `transfer ϕ : G →* A`. -/
@[to_additive "Given `ϕ : H →+ A` from `H : AddSubgroup G` to an additive commutative group `A`,
the transfer homomorphism is `transfer ϕ : G →+ A`."]
noncomputable def transfer [FiniteIndex H] : G →* A :=
  let T : leftTransversals (H : Set G) := Inhabited.default
  { toFun := fun g => diff ϕ T (g • T)
    map_one' := by 

Proof state:
G : Type u_1
inst✝² : Group G
H : Subgroup G
A : Type u_2
inst✝¹ : CommGroup A
ϕ : ↥H →* A
inst✝ : FiniteIndex H
T : ↑(leftTransversals ↑H) := default
⊢ (fun g => diff ϕ T (g • T)) 1 = 1

Next tactic:
simp only
/-- Given `ϕ : H →* A` from `H : Subgroup G` to a commutative group `A`,
the transfer homomorphism is `transfer ϕ : G →* A`. -/
@[to_additive "Given `ϕ : H →+ A` from `H : AddSubgroup G` to an additive commutative group `A`,
the transfer homomorphism is `transfer ϕ : G →+ A`."]
noncomputable def transfer [FiniteIndex H] : G →* A :=
  let T : leftTransversals (H : Set G) := Inhabited.default
  { toFun := fun g => diff ϕ T (g • T)
    map_one' := by simp only; 

Proof state:
G : Type u_1
inst✝² : Group G
H : Subgroup G
A : Type u_2
inst✝¹ : CommGroup A
ϕ : ↥H →* A
inst✝ : FiniteIndex H
T : ↑(leftTransversals ↑H) := default
⊢ diff ϕ default (1 • default) = 1

Next tactic:
rw [one_smul, diff_self]
/-- Given `ϕ : H →* A` from `H : Subgroup G` to a commutative group `A`,
the transfer homomorphism is `transfer ϕ : G →* A`. -/
@[to_additive "Given `ϕ : H →+ A` from `H : AddSubgroup G` to an additive commutative group `A`,
the transfer homomorphism is `transfer ϕ : G →+ A`."]
noncomputable def transfer [FiniteIndex H] : G →* A :=
  let T : leftTransversals (H : Set G) := Inhabited.default
  { toFun := fun g => diff ϕ T (g • T)
    map_one' := by simp only; rw [one_smul, diff_self] -- porting note: added `simp only`
    map_mul' := fun g h => by 

Proof state:
G : Type u_1
inst✝² : Group G
H : Subgroup G
A : Type u_2
inst✝¹ : CommGroup A
ϕ : ↥H →* A
inst✝ : FiniteIndex H
T : ↑(leftTransversals ↑H) := default
g h : G
⊢ OneHom.toFun { toFun := fun g => diff ϕ T (g • T), map_one' := (_ : (fun g => diff ϕ T (g • T)) 1 = 1) } (g * h) =
    OneHom.toFun { toFun := fun g => diff ϕ T (g • T), map_one' := (_ : (fun g => diff ϕ T (g • T)) 1 = 1) } g *
      OneHom.toFun { toFun := fun g => diff ϕ T (g • T), map_one' := (_ : (fun g => diff ϕ T (g • T)) 1 = 1) } h

Next tactic:
simp only
/-- Given `ϕ : H →* A` from `H : Subgroup G` to a commutative group `A`,
the transfer homomorphism is `transfer ϕ : G →* A`. -/
@[to_additive "Given `ϕ : H →+ A` from `H : AddSubgroup G` to an additive commutative group `A`,
the transfer homomorphism is `transfer ϕ : G →+ A`."]
noncomputable def transfer [FiniteIndex H] : G →* A :=
  let T : leftTransversals (H : Set G) := Inhabited.default
  { toFun := fun g => diff ϕ T (g • T)
    map_one' := by simp only; rw [one_smul, diff_self] -- porting note: added `simp only`
    map_mul' := fun g h => by simp only; 

Proof state:
G : Type u_1
inst✝² : Group G
H : Subgroup G
A : Type u_2
inst✝¹ : CommGroup A
ϕ : ↥H →* A
inst✝ : FiniteIndex H
T : ↑(leftTransversals ↑H) := default
g h : G
⊢ diff ϕ default ((g * h) • default) = diff ϕ default (g • default) * diff ϕ default (h • default)

Next tactic:
rw [mul_smul, ← diff_mul_diff, smul_diff_smul]
@[to_additive]
theorem transfer_def [FiniteIndex H] (g : G) : transfer ϕ g = diff ϕ T (g • T) := by
  

Proof state:
G : Type u_1
inst✝² : Group G
H : Subgroup G
A : Type u_2
inst✝¹ : CommGroup A
ϕ : ↥H →* A
T : ↑(leftTransversals ↑H)
inst✝ : FiniteIndex H
g : G
⊢ (transfer ϕ) g = diff ϕ T (g • T)

Next tactic:
rw [transfer, ← diff_mul_diff, ← smul_diff_smul, mul_comm, diff_mul_diff]
@[to_additive]
theorem transfer_def [FiniteIndex H] (g : G) : transfer ϕ g = diff ϕ T (g • T) := by
  rw [transfer, ← diff_mul_diff, ← smul_diff_smul, mul_comm, diff_mul_diff] <;> 

Proof state:
G : Type u_1
inst✝² : Group G
H : Subgroup G
A : Type u_2
inst✝¹ : CommGroup A
ϕ : ↥H →* A
T : ↑(leftTransversals ↑H)
inst✝ : FiniteIndex H
g : G
⊢ (let T := default;
      {
        toOneHom :=
          { toFun := fun g => diff ϕ T (g • T), map_one' := (_ : (fun g => diff ϕ default (g • default)) 1 = 1) },
        map_mul' :=
          (_ :
            ∀ (g h : G),
              OneHom.toFun
                  { toFun := fun g => diff ϕ default (g • default),
                    map_one' := (_ : (fun g => diff ϕ default (g • default)) 1 = 1) }
                  (g * h) =
                OneHom.toFun
                    { toFun := fun g => diff ϕ default (g • default),
                      map_one' := (_ : (fun g => diff ϕ default (g • default)) 1 = 1) }
                    g *
                  OneHom.toFun
                    { toFun := fun g => diff ϕ default (g • default),
                      map_one' := (_ : (fun g => diff ϕ default (g • default)) 1 = 1) }
                    h) })
      g =
    diff ϕ ?R (g • ?R)

Next tactic:
rfl
/-- Explicit computation of the transfer homomorphism. -/
theorem transfer_eq_prod_quotient_orbitRel_zpowers_quot [FiniteIndex H] (g : G)
    [Fintype (Quotient (orbitRel (zpowers g) (G ⧸ H)))] :
    transfer ϕ g =
      ∏ q : Quotient (orbitRel (zpowers g) (G ⧸ H)),
        ϕ
          ⟨q.out'.out'⁻¹ * g ^ Function.minimalPeriod (g • ·) q.out' * q.out'.out',
            QuotientGroup.out'_conj_pow_minimalPeriod_mem H g q.out'⟩ := by
  

Proof state:
G : Type u_1
inst✝³ : Group G
H : Subgroup G
A : Type u_2
inst✝² : CommGroup A
ϕ : ↥H →* A
T : ↑(leftTransversals ↑H)
inst✝¹ : FiniteIndex H
g : G
inst✝ : Fintype (Quotient (orbitRel (↥(zpowers g)) (G ⧸ H)))
⊢ (transfer ϕ) g =
    ∏ q : Quotient (orbitRel (↥(zpowers g)) (G ⧸ H)),
      ϕ
        {
          val :=
            (Quotient.out' (Quotient.out' q))⁻¹ * g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) *
              Quotient.out' (Quotient.out' q),
          property :=
            (_ :
              (Quotient.out' (Quotient.out' q))⁻¹ * g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) *
                  Quotient.out' (Quotient.out' q) ∈
                H) }

Next tactic:
classical
    letI := H.fintypeQuotientOfFiniteIndex
    calc
      transfer ϕ g = ∏ q : G ⧸ H, _ := transfer_def ϕ (transferTransversal H g) g
      _ = _ := ((quotientEquivSigmaZMod H g).symm.prod_comp _).symm
      _ = _ := (Finset.prod_sigma _ _ _)
      _ = _ := by
        refine' Fintype.prod_congr _ _ (fun q => _)
        simp only [quotientEquivSigmaZMod_symm_apply, transferTransversal_apply',
          transferTransversal_apply'']
        rw [Fintype.prod_eq_single (0 : ZMod (Function.minimalPeriod (g • ·) q.out')) _]
        · simp only [if_pos, ZMod.cast_zero, zpow_zero, one_mul, mul_assoc]
        · intro k hk
          simp only [if_neg hk, inv_mul_self]
          exact map_one ϕ
/-- Explicit computation of the transfer homomorphism. -/
theorem transfer_eq_prod_quotient_orbitRel_zpowers_quot [FiniteIndex H] (g : G)
    [Fintype (Quotient (orbitRel (zpowers g) (G ⧸ H)))] :
    transfer ϕ g =
      ∏ q : Quotient (orbitRel (zpowers g) (G ⧸ H)),
        ϕ
          ⟨q.out'.out'⁻¹ * g ^ Function.minimalPeriod (g • ·) q.out' * q.out'.out',
            QuotientGroup.out'_conj_pow_minimalPeriod_mem H g q.out'⟩ := by
  classical
    

Proof state:
G : Type u_1
inst✝³ : Group G
H : Subgroup G
A : Type u_2
inst✝² : CommGroup A
ϕ : ↥H →* A
T : ↑(leftTransversals ↑H)
inst✝¹ : FiniteIndex H
g : G
inst✝ : Fintype (Quotient (orbitRel (↥(zpowers g)) (G ⧸ H)))
⊢ (transfer ϕ) g =
    ∏ q : Quotient (orbitRel (↥(zpowers g)) (G ⧸ H)),
      ϕ
        {
          val :=
            (Quotient.out' (Quotient.out' q))⁻¹ * g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) *
              Quotient.out' (Quotient.out' q),
          property :=
            (_ :
              (Quotient.out' (Quotient.out' q))⁻¹ * g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) *
                  Quotient.out' (Quotient.out' q) ∈
                H) }

Next tactic:
letI := H.fintypeQuotientOfFiniteIndex
/-- Explicit computation of the transfer homomorphism. -/
theorem transfer_eq_prod_quotient_orbitRel_zpowers_quot [FiniteIndex H] (g : G)
    [Fintype (Quotient (orbitRel (zpowers g) (G ⧸ H)))] :
    transfer ϕ g =
      ∏ q : Quotient (orbitRel (zpowers g) (G ⧸ H)),
        ϕ
          ⟨q.out'.out'⁻¹ * g ^ Function.minimalPeriod (g • ·) q.out' * q.out'.out',
            QuotientGroup.out'_conj_pow_minimalPeriod_mem H g q.out'⟩ := by
  classical
    letI := H.fintypeQuotientOfFiniteIndex
    

Proof state:
G : Type u_1
inst✝³ : Group G
H : Subgroup G
A : Type u_2
inst✝² : CommGroup A
ϕ : ↥H →* A
T : ↑(leftTransversals ↑H)
inst✝¹ : FiniteIndex H
g : G
inst✝ : Fintype (Quotient (orbitRel (↥(zpowers g)) (G ⧸ H)))
this : Fintype (G ⧸ H) := fintypeQuotientOfFiniteIndex H
⊢ (transfer ϕ) g =
    ∏ q : Quotient (orbitRel (↥(zpowers g)) (G ⧸ H)),
      ϕ
        {
          val :=
            (Quotient.out' (Quotient.out' q))⁻¹ * g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) *
              Quotient.out' (Quotient.out' q),
          property :=
            (_ :
              (Quotient.out' (Quotient.out' q))⁻¹ * g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) *
                  Quotient.out' (Quotient.out' q) ∈
                H) }

Next tactic:
calc
      transfer ϕ g = ∏ q : G ⧸ H, _ := transfer_def ϕ (transferTransversal H g) g
      _ = _ := ((quotientEquivSigmaZMod H g).symm.prod_comp _).symm
      _ = _ := (Finset.prod_sigma _ _ _)
      _ = _ := by
        refine' Fintype.prod_congr _ _ (fun q => _)
        simp only [quotientEquivSigmaZMod_symm_apply, transferTransversal_apply',
          transferTransversal_apply'']
        rw [Fintype.prod_eq_single (0 : ZMod (Function.minimalPeriod (g • ·) q.out')) _]
        · simp only [if_pos, ZMod.cast_zero, zpow_zero, one_mul, mul_assoc]
        · intro k hk
          simp only [if_neg hk, inv_mul_self]
          exact map_one ϕ
/-- Explicit computation of the transfer homomorphism. -/
theorem transfer_eq_prod_quotient_orbitRel_zpowers_quot [FiniteIndex H] (g : G)
    [Fintype (Quotient (orbitRel (zpowers g) (G ⧸ H)))] :
    transfer ϕ g =
      ∏ q : Quotient (orbitRel (zpowers g) (G ⧸ H)),
        ϕ
          ⟨q.out'.out'⁻¹ * g ^ Function.minimalPeriod (g • ·) q.out' * q.out'.out',
            QuotientGroup.out'_conj_pow_minimalPeriod_mem H g q.out'⟩ := by
  classical
    letI := H.fintypeQuotientOfFiniteIndex
    calc
      transfer ϕ g = ∏ q : G ⧸ H, _ := transfer_def ϕ (transferTransversal H g) g
      _ = _ := ((quotientEquivSigmaZMod H g).symm.prod_comp _).symm
      _ = _ := (Finset.prod_sigma _ _ _)
      _ = _ := by
        

Proof state:
G : Type u_1
inst✝³ : Group G
H : Subgroup G
A : Type u_2
inst✝² : CommGroup A
ϕ : ↥H →* A
T : ↑(leftTransversals ↑H)
inst✝¹ : FiniteIndex H
g : G
inst✝ : Fintype (Quotient (orbitRel (↥(zpowers g)) (G ⧸ H)))
this : Fintype (G ⧸ H) := fintypeQuotientOfFiniteIndex H
⊢ ∏ a : orbitRel.Quotient (↥(zpowers g)) (G ⧸ H),
      ∏ s in (fun x => Finset.univ) a,
        ϕ
          {
            val :=
              (↑((MemLeftTransversals.toEquiv (_ : ↑(transferTransversal H g) ∈ leftTransversals ↑H))
                      ((quotientEquivSigmaZMod H g).symm { fst := a, snd := s })))⁻¹ *
                ↑((MemLeftTransversals.toEquiv (_ : ↑(g • transferTransversal H g) ∈ leftTransversals ↑H))
                    ((quotientEquivSigmaZMod H g).symm { fst := a, snd := s })),
            property :=
              (_ :
                (↑((MemLeftTransversals.toEquiv (_ : ↑(transferTransversal H g) ∈ leftTransversals ↑H))
                          ((quotientEquivSigmaZMod H g).symm { fst := a, snd := s })))⁻¹ *
                    ↑((MemLeftTransversals.toEquiv (_ : ↑(g • transferTransversal H g) ∈ leftTransversals ↑H))
                        ((quotientEquivSigmaZMod H g).symm { fst := a, snd := s })) ∈
                  H) } =
    ∏ q : Quotient (orbitRel (↥(zpowers g)) (G ⧸ H)),
      ϕ
        {
          val :=
            (Quotient.out' (Quotient.out' q))⁻¹ * g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) *
              Quotient.out' (Quotient.out' q),
          property :=
            (_ :
              (Quotient.out' (Quotient.out' q))⁻¹ * g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) *
                  Quotient.out' (Quotient.out' q) ∈
                H) }

Next tactic:
refine' Fintype.prod_congr _ _ (fun q => _)
/-- Explicit computation of the transfer homomorphism. -/
theorem transfer_eq_prod_quotient_orbitRel_zpowers_quot [FiniteIndex H] (g : G)
    [Fintype (Quotient (orbitRel (zpowers g) (G ⧸ H)))] :
    transfer ϕ g =
      ∏ q : Quotient (orbitRel (zpowers g) (G ⧸ H)),
        ϕ
          ⟨q.out'.out'⁻¹ * g ^ Function.minimalPeriod (g • ·) q.out' * q.out'.out',
            QuotientGroup.out'_conj_pow_minimalPeriod_mem H g q.out'⟩ := by
  classical
    letI := H.fintypeQuotientOfFiniteIndex
    calc
      transfer ϕ g = ∏ q : G ⧸ H, _ := transfer_def ϕ (transferTransversal H g) g
      _ = _ := ((quotientEquivSigmaZMod H g).symm.prod_comp _).symm
      _ = _ := (Finset.prod_sigma _ _ _)
      _ = _ := by
        refine' Fintype.prod_congr _ _ (fun q => _)
        

Proof state:
G : Type u_1
inst✝³ : Group G
H : Subgroup G
A : Type u_2
inst✝² : CommGroup A
ϕ : ↥H →* A
T : ↑(leftTransversals ↑H)
inst✝¹ : FiniteIndex H
g : G
inst✝ : Fintype (Quotient (orbitRel (↥(zpowers g)) (G ⧸ H)))
this : Fintype (G ⧸ H) := fintypeQuotientOfFiniteIndex H
q : orbitRel.Quotient (↥(zpowers g)) (G ⧸ H)
⊢ ∏ s in (fun x => Finset.univ) q,
      ϕ
        {
          val :=
            (↑((MemLeftTransversals.toEquiv (_ : ↑(transferTransversal H g) ∈ leftTransversals ↑H))
                    ((quotientEquivSigmaZMod H g).symm { fst := q, snd := s })))⁻¹ *
              ↑((MemLeftTransversals.toEquiv (_ : ↑(g • transferTransversal H g) ∈ leftTransversals ↑H))
                  ((quotientEquivSigmaZMod H g).symm { fst := q, snd := s })),
          property :=
            (_ :
              (↑((MemLeftTransversals.toEquiv (_ : ↑(transferTransversal H g) ∈ leftTransversals ↑H))
                        ((quotientEquivSigmaZMod H g).symm { fst := q, snd := s })))⁻¹ *
                  ↑((MemLeftTransversals.toEquiv (_ : ↑(g • transferTransversal H g) ∈ leftTransversals ↑H))
                      ((quotientEquivSigmaZMod H g).symm { fst := q, snd := s })) ∈
                H) } =
    ϕ
      {
        val :=
          (Quotient.out' (Quotient.out' q))⁻¹ * g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) *
            Quotient.out' (Quotient.out' q),
        property :=
          (_ :
            (Quotient.out' (Quotient.out' q))⁻¹ * g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) *
                Quotient.out' (Quotient.out' q) ∈
              H) }

Next tactic:
simp only [quotientEquivSigmaZMod_symm_apply, transferTransversal_apply',
          transferTransversal_apply'']
/-- Explicit computation of the transfer homomorphism. -/
theorem transfer_eq_prod_quotient_orbitRel_zpowers_quot [FiniteIndex H] (g : G)
    [Fintype (Quotient (orbitRel (zpowers g) (G ⧸ H)))] :
    transfer ϕ g =
      ∏ q : Quotient (orbitRel (zpowers g) (G ⧸ H)),
        ϕ
          ⟨q.out'.out'⁻¹ * g ^ Function.minimalPeriod (g • ·) q.out' * q.out'.out',
            QuotientGroup.out'_conj_pow_minimalPeriod_mem H g q.out'⟩ := by
  classical
    letI := H.fintypeQuotientOfFiniteIndex
    calc
      transfer ϕ g = ∏ q : G ⧸ H, _ := transfer_def ϕ (transferTransversal H g) g
      _ = _ := ((quotientEquivSigmaZMod H g).symm.prod_comp _).symm
      _ = _ := (Finset.prod_sigma _ _ _)
      _ = _ := by
        refine' Fintype.prod_congr _ _ (fun q => _)
        simp only [quotientEquivSigmaZMod_symm_apply, transferTransversal_apply',
          transferTransversal_apply'']
        

Proof state:
G : Type u_1
inst✝³ : Group G
H : Subgroup G
A : Type u_2
inst✝² : CommGroup A
ϕ : ↥H →* A
T : ↑(leftTransversals ↑H)
inst✝¹ : FiniteIndex H
g : G
inst✝ : Fintype (Quotient (orbitRel (↥(zpowers g)) (G ⧸ H)))
this : Fintype (G ⧸ H) := fintypeQuotientOfFiniteIndex H
q : orbitRel.Quotient (↥(zpowers g)) (G ⧸ H)
⊢ ∏ x : ZMod (Function.minimalPeriod (fun x => g • x) (Quotient.out' q)),
      ϕ
        {
          val :=
            (g ^ ↑x * Quotient.out' (Quotient.out' q))⁻¹ *
              if x = 0 then
                g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) * Quotient.out' (Quotient.out' q)
              else g ^ ↑x * Quotient.out' (Quotient.out' q),
          property :=
            (_ :
              (fun x => x ∈ H)
                ((g ^ ↑x * Quotient.out' (Quotient.out' q))⁻¹ *
                  if x = 0 then
                    g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) * Quotient.out' (Quotient.out' q)
                  else g ^ ↑x * Quotient.out' (Quotient.out' q))) } =
    ϕ
      {
        val :=
          (Quotient.out' (Quotient.out' q))⁻¹ * g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) *
            Quotient.out' (Quotient.out' q),
        property :=
          (_ :
            (Quotient.out' (Quotient.out' q))⁻¹ * g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) *
                Quotient.out' (Quotient.out' q) ∈
              H) }

Next tactic:
rw [Fintype.prod_eq_single (0 : ZMod (Function.minimalPeriod (g • ·) q.out')) _]
/-- Explicit computation of the transfer homomorphism. -/
theorem transfer_eq_prod_quotient_orbitRel_zpowers_quot [FiniteIndex H] (g : G)
    [Fintype (Quotient (orbitRel (zpowers g) (G ⧸ H)))] :
    transfer ϕ g =
      ∏ q : Quotient (orbitRel (zpowers g) (G ⧸ H)),
        ϕ
          ⟨q.out'.out'⁻¹ * g ^ Function.minimalPeriod (g • ·) q.out' * q.out'.out',
            QuotientGroup.out'_conj_pow_minimalPeriod_mem H g q.out'⟩ := by
  classical
    letI := H.fintypeQuotientOfFiniteIndex
    calc
      transfer ϕ g = ∏ q : G ⧸ H, _ := transfer_def ϕ (transferTransversal H g) g
      _ = _ := ((quotientEquivSigmaZMod H g).symm.prod_comp _).symm
      _ = _ := (Finset.prod_sigma _ _ _)
      _ = _ := by
        refine' Fintype.prod_congr _ _ (fun q => _)
        simp only [quotientEquivSigmaZMod_symm_apply, transferTransversal_apply',
          transferTransversal_apply'']
        rw [Fintype.prod_eq_single (0 : ZMod (Function.minimalPeriod (g • ·) q.out')) _]
        · 

Proof state:
G : Type u_1
inst✝³ : Group G
H : Subgroup G
A : Type u_2
inst✝² : CommGroup A
ϕ : ↥H →* A
T : ↑(leftTransversals ↑H)
inst✝¹ : FiniteIndex H
g : G
inst✝ : Fintype (Quotient (orbitRel (↥(zpowers g)) (G ⧸ H)))
this : Fintype (G ⧸ H) := fintypeQuotientOfFiniteIndex H
q : orbitRel.Quotient (↥(zpowers g)) (G ⧸ H)
⊢ ϕ
      {
        val :=
          (g ^ ↑0 * Quotient.out' (Quotient.out' q))⁻¹ *
            if 0 = 0 then
              g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) * Quotient.out' (Quotient.out' q)
            else g ^ ↑0 * Quotient.out' (Quotient.out' q),
        property :=
          (_ :
            (fun x => x ∈ H)
              ((g ^ ↑0 * Quotient.out' (Quotient.out' q))⁻¹ *
                if 0 = 0 then
                  g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) * Quotient.out' (Quotient.out' q)
                else g ^ ↑0 * Quotient.out' (Quotient.out' q))) } =
    ϕ
      {
        val :=
          (Quotient.out' (Quotient.out' q))⁻¹ * g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) *
            Quotient.out' (Quotient.out' q),
        property :=
          (_ :
            (Quotient.out' (Quotient.out' q))⁻¹ * g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) *
                Quotient.out' (Quotient.out' q) ∈
              H) }

Next tactic:
simp only [if_pos, ZMod.cast_zero, zpow_zero, one_mul, mul_assoc]
/-- Explicit computation of the transfer homomorphism. -/
theorem transfer_eq_prod_quotient_orbitRel_zpowers_quot [FiniteIndex H] (g : G)
    [Fintype (Quotient (orbitRel (zpowers g) (G ⧸ H)))] :
    transfer ϕ g =
      ∏ q : Quotient (orbitRel (zpowers g) (G ⧸ H)),
        ϕ
          ⟨q.out'.out'⁻¹ * g ^ Function.minimalPeriod (g • ·) q.out' * q.out'.out',
            QuotientGroup.out'_conj_pow_minimalPeriod_mem H g q.out'⟩ := by
  classical
    letI := H.fintypeQuotientOfFiniteIndex
    calc
      transfer ϕ g = ∏ q : G ⧸ H, _ := transfer_def ϕ (transferTransversal H g) g
      _ = _ := ((quotientEquivSigmaZMod H g).symm.prod_comp _).symm
      _ = _ := (Finset.prod_sigma _ _ _)
      _ = _ := by
        refine' Fintype.prod_congr _ _ (fun q => _)
        simp only [quotientEquivSigmaZMod_symm_apply, transferTransversal_apply',
          transferTransversal_apply'']
        rw [Fintype.prod_eq_single (0 : ZMod (Function.minimalPeriod (g • ·) q.out')) _]
        · simp only [if_pos, ZMod.cast_zero, zpow_zero, one_mul, mul_assoc]
        · 

Proof state:
G : Type u_1
inst✝³ : Group G
H : Subgroup G
A : Type u_2
inst✝² : CommGroup A
ϕ : ↥H →* A
T : ↑(leftTransversals ↑H)
inst✝¹ : FiniteIndex H
g : G
inst✝ : Fintype (Quotient (orbitRel (↥(zpowers g)) (G ⧸ H)))
this : Fintype (G ⧸ H) := fintypeQuotientOfFiniteIndex H
q : orbitRel.Quotient (↥(zpowers g)) (G ⧸ H)
⊢ ∀ (x : ZMod (Function.minimalPeriod (fun x => g • x) (Quotient.out' q))),
    x ≠ 0 →
      ϕ
          {
            val :=
              (g ^ ↑x * Quotient.out' (Quotient.out' q))⁻¹ *
                if x = 0 then
                  g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) * Quotient.out' (Quotient.out' q)
                else g ^ ↑x * Quotient.out' (Quotient.out' q),
            property :=
              (_ :
                (fun x => x ∈ H)
                  ((g ^ ↑x * Quotient.out' (Quotient.out' q))⁻¹ *
                    if x = 0 then
                      g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) * Quotient.out' (Quotient.out' q)
                    else g ^ ↑x * Quotient.out' (Quotient.out' q))) } =
        1

Next tactic:
intro k hk
/-- Explicit computation of the transfer homomorphism. -/
theorem transfer_eq_prod_quotient_orbitRel_zpowers_quot [FiniteIndex H] (g : G)
    [Fintype (Quotient (orbitRel (zpowers g) (G ⧸ H)))] :
    transfer ϕ g =
      ∏ q : Quotient (orbitRel (zpowers g) (G ⧸ H)),
        ϕ
          ⟨q.out'.out'⁻¹ * g ^ Function.minimalPeriod (g • ·) q.out' * q.out'.out',
            QuotientGroup.out'_conj_pow_minimalPeriod_mem H g q.out'⟩ := by
  classical
    letI := H.fintypeQuotientOfFiniteIndex
    calc
      transfer ϕ g = ∏ q : G ⧸ H, _ := transfer_def ϕ (transferTransversal H g) g
      _ = _ := ((quotientEquivSigmaZMod H g).symm.prod_comp _).symm
      _ = _ := (Finset.prod_sigma _ _ _)
      _ = _ := by
        refine' Fintype.prod_congr _ _ (fun q => _)
        simp only [quotientEquivSigmaZMod_symm_apply, transferTransversal_apply',
          transferTransversal_apply'']
        rw [Fintype.prod_eq_single (0 : ZMod (Function.minimalPeriod (g • ·) q.out')) _]
        · simp only [if_pos, ZMod.cast_zero, zpow_zero, one_mul, mul_assoc]
        · intro k hk
          

Proof state:
G : Type u_1
inst✝³ : Group G
H : Subgroup G
A : Type u_2
inst✝² : CommGroup A
ϕ : ↥H →* A
T : ↑(leftTransversals ↑H)
inst✝¹ : FiniteIndex H
g : G
inst✝ : Fintype (Quotient (orbitRel (↥(zpowers g)) (G ⧸ H)))
this : Fintype (G ⧸ H) := fintypeQuotientOfFiniteIndex H
q : orbitRel.Quotient (↥(zpowers g)) (G ⧸ H)
k : ZMod (Function.minimalPeriod (fun x => g • x) (Quotient.out' q))
hk : k ≠ 0
⊢ ϕ
      {
        val :=
          (g ^ ↑k * Quotient.out' (Quotient.out' q))⁻¹ *
            if k = 0 then
              g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) * Quotient.out' (Quotient.out' q)
            else g ^ ↑k * Quotient.out' (Quotient.out' q),
        property :=
          (_ :
            (fun x => x ∈ H)
              ((g ^ ↑k * Quotient.out' (Quotient.out' q))⁻¹ *
                if k = 0 then
                  g ^ Function.minimalPeriod (fun x => g • x) (Quotient.out' q) * Quotient.out' (Quotient.out' q)
                else g ^ ↑k * Quotient.out' (Quotient.out' q))) } =
    1

Next tactic:
simp only [if_neg hk, inv_mul_self]