l3lab/ntp-mathlib huggingface dataset:
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) :
    f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by
  ext1 x
  simp_rw [slash, UpperHalfPlane.denom_cocycle A B x]
  have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x
  

Proof state:
case h
Γ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
k : ℤ
A B : ↥GL(2, ℝ)⁺
f : ℍ → ℂ
x : ℍ
e3 : (A * B) • x = A • B • x
⊢ f ((A * B) • x) * ↑(Matrix.det ↑↑(A * B)) ^ (k - 1) * (denom A (smulAux B x) * denom B x) ^ (-k) =
    f (A • B • x) * ↑(Matrix.det ↑↑A) ^ (k - 1) * denom A (B • x) ^ (-k) * ↑(Matrix.det ↑↑B) ^ (k - 1) *
      denom B x ^ (-k)

Next tactic:
rw [e3]
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) :
    f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by
  ext1 x
  simp_rw [slash, UpperHalfPlane.denom_cocycle A B x]
  have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x
  rw [e3]
  

Proof state:
case h
Γ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
k : ℤ
A B : ↥GL(2, ℝ)⁺
f : ℍ → ℂ
x : ℍ
e3 : (A * B) • x = A • B • x
⊢ f (A • B • x) * ↑(Matrix.det ↑↑(A * B)) ^ (k - 1) * (denom A (smulAux B x) * denom B x) ^ (-k) =
    f (A • B • x) * ↑(Matrix.det ↑↑A) ^ (k - 1) * denom A (B • x) ^ (-k) * ↑(Matrix.det ↑↑B) ^ (k - 1) *
      denom B x ^ (-k)

Next tactic:
simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul,
    UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul,
    UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at *
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) :
    f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by
  ext1 x
  simp_rw [slash, UpperHalfPlane.denom_cocycle A B x]
  have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x
  rw [e3]
  simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul,
    UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul,
    UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at *
  

Proof state:
case h
Γ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
k : ℤ
A B : ↥GL(2, ℝ)⁺
f : ℍ → ℂ
x : ℍ
e3 : (A * B) • x = A • B • x
⊢ f (A • B • x) * (↑(Matrix.det ↑↑A) * ↑(Matrix.det ↑↑B)) ^ (k - 1) *
      ((↑(↑↑A 1 0) * ((↑(↑↑B 0 0) * ↑x + ↑(↑↑B 0 1)) / (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1))) + ↑(↑↑A 1 1)) *
          (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1))) ^
        (-k) =
    f (A • B • x) * ↑(Matrix.det ↑↑A) ^ (k - 1) *
          (↑(↑↑A 1 0) * ((↑(↑↑B 0 0) * ↑x + ↑(↑↑B 0 1)) / (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1))) + ↑(↑↑A 1 1)) ^ (-k) *
        ↑(Matrix.det ↑↑B) ^ (k - 1) *
      (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1)) ^ (-k)

Next tactic:
field_simp
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) :
    f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by
  ext1 x
  simp_rw [slash, UpperHalfPlane.denom_cocycle A B x]
  have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x
  rw [e3]
  simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul,
    UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul,
    UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at *
  field_simp
  

Proof state:
case h
Γ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
k : ℤ
A B : ↥GL(2, ℝ)⁺
f : ℍ → ℂ
x : ℍ
e3 : (A * B) • x = A • B • x
⊢ f (A • B • x) * (↑(Matrix.det ↑↑A) * ↑(Matrix.det ↑↑B)) ^ (k - 1) /
      ((↑(↑↑A 1 0) * (↑(↑↑B 0 0) * ↑x + ↑(↑↑B 0 1)) / (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1)) + ↑(↑↑A 1 1)) *
          (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1))) ^
        k =
    f (A • B • x) * ↑(Matrix.det ↑↑A) ^ (k - 1) * ↑(Matrix.det ↑↑B) ^ (k - 1) /
      ((↑(↑↑A 1 0) * (↑(↑↑B 0 0) * ↑x + ↑(↑↑B 0 1)) / (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1)) + ↑(↑↑A 1 1)) ^ k *
        (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1)) ^ k)

Next tactic:
have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) *
      ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) =
      ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) *
        ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by
    simp_rw [← mul_zpow]
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) :
    f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by
  ext1 x
  simp_rw [slash, UpperHalfPlane.denom_cocycle A B x]
  have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x
  rw [e3]
  simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul,
    UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul,
    UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at *
  field_simp
  have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) *
      ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) =
      ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) *
        ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by
    

Proof state:
Γ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
k : ℤ
A B : ↥GL(2, ℝ)⁺
f : ℍ → ℂ
x : ℍ
e3 : (A * B) • x = A • B • x
⊢ (↑(Matrix.det ↑↑A) * ↑(Matrix.det ↑↑B)) ^ (k - 1) = ↑(Matrix.det ↑↑A) ^ (k - 1) * ↑(Matrix.det ↑↑B) ^ (k - 1)

Next tactic:
simp_rw [← mul_zpow]
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) :
    f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by
  ext1 x
  simp_rw [slash, UpperHalfPlane.denom_cocycle A B x]
  have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x
  rw [e3]
  simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul,
    UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul,
    UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at *
  field_simp
  have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) *
      ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) =
      ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) *
        ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by
    simp_rw [← mul_zpow]
  

Proof state:
case h
Γ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
k : ℤ
A B : ↥GL(2, ℝ)⁺
f : ℍ → ℂ
x : ℍ
e3 : (A * B) • x = A • B • x
this : (↑(Matrix.det ↑↑A) * ↑(Matrix.det ↑↑B)) ^ (k - 1) = ↑(Matrix.det ↑↑A) ^ (k - 1) * ↑(Matrix.det ↑↑B) ^ (k - 1)
⊢ f (A • B • x) * (↑(Matrix.det ↑↑A) * ↑(Matrix.det ↑↑B)) ^ (k - 1) /
      ((↑(↑↑A 1 0) * (↑(↑↑B 0 0) * ↑x + ↑(↑↑B 0 1)) / (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1)) + ↑(↑↑A 1 1)) *
          (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1))) ^
        k =
    f (A • B • x) * ↑(Matrix.det ↑↑A) ^ (k - 1) * ↑(Matrix.det ↑↑B) ^ (k - 1) /
      ((↑(↑↑A 1 0) * (↑(↑↑B 0 0) * ↑x + ↑(↑↑B 0 1)) / (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1)) + ↑(↑↑A 1 1)) ^ k *
        (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1)) ^ k)

Next tactic:
simp_rw [this, ← mul_assoc, ← mul_zpow]
private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) :
    (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by
  

Proof state:
Γ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
k : ℤ
A : ↥GL(2, ℝ)⁺
f g : ℍ → ℂ
⊢ (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A

Next tactic:
ext1
private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) :
    (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by
  ext1
  

Proof state:
case h
Γ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
k : ℤ
A : ↥GL(2, ℝ)⁺
f g : ℍ → ℂ
x✝ : ℍ
⊢ ((f + g) ∣[k]A) x✝ = (f ∣[k]A + g ∣[k]A) x✝

Next tactic:
simp only [slash, Pi.add_apply, denom, zpow_neg]
private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) :
    (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by
  ext1
  simp only [slash, Pi.add_apply, denom, zpow_neg]
  

Proof state:
case h
Γ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
k : ℤ
A : ↥GL(2, ℝ)⁺
f g : ℍ → ℂ
x✝ : ℍ
⊢ (f (A • x✝) + g (A • x✝)) * ↑(Matrix.det ↑↑A) ^ (k - 1) * ((↑(↑↑A 1 0) * ↑x✝ + ↑(↑↑A 1 1)) ^ k)⁻¹ =
    f (A • x✝) * ↑(Matrix.det ↑↑A) ^ (k - 1) * ((↑(↑↑A 1 0) * ↑x✝ + ↑(↑↑A 1 1)) ^ k)⁻¹ +
      g (A • x✝) * ↑(Matrix.det ↑↑A) ^ (k - 1) * ((↑(↑↑A 1 0) * ↑x✝ + ↑(↑↑A 1 1)) ^ k)⁻¹

Next tactic:
ring
private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f :=
  funext <| by 

Proof state:
Γ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
k : ℤ
f : ℍ → ℂ
⊢ ∀ (x : ℍ), (f ∣[k]1) x = f x

Next tactic:
simp [slash, denom]
private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) :
    (c • f) ∣[k]A = c • f ∣[k]A := by
  

Proof state:
Γ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
α : Type u_1
inst✝¹ : SMul α ℂ
inst✝ : IsScalarTower α ℂ ℂ
k : ℤ
A : ↥GL(2, ℝ)⁺
f : ℍ → ℂ
c : α
⊢ (c • f) ∣[k]A = c • f ∣[k]A

Next tactic:
simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)]
private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) :
    (c • f) ∣[k]A = c • f ∣[k]A := by
  simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)]
  

Proof state:
Γ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
α : Type u_1
inst✝¹ : SMul α ℂ
inst✝ : IsScalarTower α ℂ ℂ
k : ℤ
A : ↥GL(2, ℝ)⁺
f : ℍ → ℂ
c : α
⊢ ((c • 1) • f) ∣[k]A = (c • 1) • f ∣[k]A

Next tactic:
ext1
private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) :
    (c • f) ∣[k]A = c • f ∣[k]A := by
  simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)]
  ext1
  

Proof state:
case h
Γ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
α : Type u_1
inst✝¹ : SMul α ℂ
inst✝ : IsScalarTower α ℂ ℂ
k : ℤ
A : ↥GL(2, ℝ)⁺
f : ℍ → ℂ
c : α
x✝ : ℍ
⊢ (((c • 1) • f) ∣[k]A) x✝ = ((c • 1) • f ∣[k]A) x✝

Next tactic:
simp_rw [slash]
private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) :
    (c • f) ∣[k]A = c • f ∣[k]A := by
  simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)]
  ext1
  simp_rw [slash]
  

Proof state:
case h
Γ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
α : Type u_1
inst✝¹ : SMul α ℂ
inst✝ : IsScalarTower α ℂ ℂ
k : ℤ
A : ↥GL(2, ℝ)⁺
f : ℍ → ℂ
c : α
x✝ : ℍ
⊢ ((c • 1) • f) (A • x✝) * ↑(Matrix.det ↑↑A) ^ (k - 1) * denom A x✝ ^ (-k) = ((c • 1) • f ∣[k]A) x✝

Next tactic:
simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply]
private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) :
    (c • f) ∣[k]A = c • f ∣[k]A := by
  simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)]
  ext1
  simp_rw [slash]
  simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply]
  

Proof state:
case h
Γ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
α : Type u_1
inst✝¹ : SMul α ℂ
inst✝ : IsScalarTower α ℂ ℂ
k : ℤ
A : ↥GL(2, ℝ)⁺
f : ℍ → ℂ
c : α
x✝ : ℍ
⊢ c • 1 * f (A • x✝) * ↑(Matrix.det ↑↑A) ^ (k - 1) * denom A x✝ ^ (-k) =
    c • 1 * (f (A • x✝) * ↑(Matrix.det ↑↑A) ^ (k - 1) * denom A x✝ ^ (-k))

Next tactic:
ring
private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 :=
  funext fun _ => by 

Proof state:
Γ : Subgroup SL(2, ℤ)
k✝ : ℤ
f : ℍ → ℂ
α : Type u_1
inst✝¹ : SMul α ℂ
inst✝ : IsScalarTower α ℂ ℂ
k : ℤ
A : ↥GL(2, ℝ)⁺
x✝ : ℍ
⊢ (0 ∣[k]A) x✝ = OfNat.ofNat 0 x✝

Next tactic:
simp only [slash, Pi.zero_apply, zero_mul]
/-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/
-- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex
theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by
  

Proof state:
Γ : Subgroup SL(2, ℤ)
k : ℤ
f : ℍ → ℂ
A : SL(2, ℤ)
⊢ 1 ∣[0] A = 1

Next tactic:
have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe'
/-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/
-- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex
theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by
  have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe'
  

Proof state:
Γ : Subgroup SL(2, ℤ)
k : ℤ
f : ℍ → ℂ
A : SL(2, ℤ)
this : Matrix.det ↑↑↑A = 1
⊢ 1 ∣[0] A = 1

Next tactic:
funext
/-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/
-- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex
theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by
  have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe'
  funext
  

Proof state:
case h
Γ : Subgroup SL(2, ℤ)
k : ℤ
f : ℍ → ℂ
A : SL(2, ℤ)
this : Matrix.det ↑↑↑A = 1
x✝ : ℍ
⊢ (1 ∣[0] A) x✝ = OfNat.ofNat 1 x✝

Next tactic:
rw [SL_slash, slash_def, slash, zero_sub, this]
/-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/
-- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex
theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by
  have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe'
  funext
  rw [SL_slash, slash_def, slash, zero_sub, this]
  

Proof state:
case h
Γ : Subgroup SL(2, ℤ)
k : ℤ
f : ℍ → ℂ
A : SL(2, ℤ)
this : Matrix.det ↑↑↑A = 1
x✝ : ℍ
⊢ OfNat.ofNat 1 (↑A • x✝) * ↑1 ^ (-1) * denom (↑A) x✝ ^ (-0) = OfNat.ofNat 1 x✝

Next tactic:
simp
/-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`,
  if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`,
  and it acts on `ℍ` via Möbius transformations. -/
theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) :
    (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by
  

Proof state:
Γ✝ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
k : ℤ
Γ : Subgroup SL(2, ℤ)
f : ℍ → ℂ
γ : ↥Γ
z : ℍ
⊢ (f ∣[k] γ) z = f z ↔ f (γ • z) = (↑(↑↑↑γ 1 0) * ↑z + ↑(↑↑↑γ 1 1)) ^ k * f z

Next tactic:
simp only [subgroup_slash, slash_def, ModularForm.slash]
/-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`,
  if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`,
  and it acts on `ℍ` via Möbius transformations. -/
theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) :
    (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by
  simp only [subgroup_slash, slash_def, ModularForm.slash]
  

Proof state:
Γ✝ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
k : ℤ
Γ : Subgroup SL(2, ℤ)
f : ℍ → ℂ
γ : ↥Γ
z : ℍ
⊢ f (↑↑γ • z) * ↑(Matrix.det ↑↑↑↑γ) ^ (k - 1) * denom (↑↑γ) z ^ (-k) = f z ↔
    f (γ • z) = (↑(↑↑↑γ 1 0) * ↑z + ↑(↑↑↑γ 1 1)) ^ k * f z

Next tactic:
convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2
/-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`,
  if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`,
  and it acts on `ℍ` via Möbius transformations. -/
theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) :
    (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by
  simp only [subgroup_slash, slash_def, ModularForm.slash]
  convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2
  · 

Proof state:
case h.e'_1.h.e'_2
Γ✝ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
k : ℤ
Γ : Subgroup SL(2, ℤ)
f : ℍ → ℂ
γ : ↥Γ
z : ℍ
⊢ f (↑↑γ • z) * ↑(Matrix.det ↑↑↑↑γ) ^ (k - 1) * denom (↑↑γ) z ^ (-k) =
    ((↑(↑↑↑γ 1 0) * ↑z + ↑(↑↑↑γ 1 1)) ^ k)⁻¹ * f (γ • z)

Next tactic:
rw [mul_comm]
/-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`,
  if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`,
  and it acts on `ℍ` via Möbius transformations. -/
theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) :
    (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by
  simp only [subgroup_slash, slash_def, ModularForm.slash]
  convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2
  · rw [mul_comm]
    

Proof state:
case h.e'_1.h.e'_2
Γ✝ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
k : ℤ
Γ : Subgroup SL(2, ℤ)
f : ℍ → ℂ
γ : ↥Γ
z : ℍ
⊢ denom (↑↑γ) z ^ (-k) * (f (↑↑γ • z) * ↑(Matrix.det ↑↑↑↑γ) ^ (k - 1)) =
    ((↑(↑↑↑γ 1 0) * ↑z + ↑(↑↑↑γ 1 1)) ^ k)⁻¹ * f (γ • z)

Next tactic:
simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb,
      sl_moeb]
/-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`,
  if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`,
  and it acts on `ℍ` via Möbius transformations. -/
theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) :
    (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by
  simp only [subgroup_slash, slash_def, ModularForm.slash]
  convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2
  · rw [mul_comm]
    simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb,
      sl_moeb]
    

Proof state:
case h.e'_1.h.e'_2
Γ✝ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
k : ℤ
Γ : Subgroup SL(2, ℤ)
f : ℍ → ℂ
γ : ↥Γ
z : ℍ
⊢ ((↑(↑↑↑↑γ 1 0) * ↑z + ↑(↑↑↑↑γ 1 1)) ^ k)⁻¹ * f (↑↑γ • z) = ((↑(↑↑↑γ 1 0) * ↑z + ↑(↑↑↑γ 1 1)) ^ k)⁻¹ * f (↑↑γ • z)

Next tactic:
rfl
/-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`,
  if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`,
  and it acts on `ℍ` via Möbius transformations. -/
theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) :
    (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by
  simp only [subgroup_slash, slash_def, ModularForm.slash]
  convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2
  · rw [mul_comm]
    simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb,
      sl_moeb]
    rfl
  · 

Proof state:
case convert_4
Γ✝ : Subgroup SL(2, ℤ)
k✝ : ℤ
f✝ : ℍ → ℂ
k : ℤ
Γ : Subgroup SL(2, ℤ)
f : ℍ → ℂ
γ : ↥Γ
z : ℍ
⊢ (↑(↑↑↑γ 1 0) * ↑z + ↑(↑↑↑γ 1 1)) ^ k ≠ 0

Next tactic:
convert zpow_ne_zero k (denom_ne_zero γ z)
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) :
    (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by
  

Proof state:
Γ : Subgroup SL(2, ℤ)
k : ℤ
f✝ : ℍ → ℂ
k1 k2 : ℤ
A : ↥GL(2, ℝ)⁺
f g : ℍ → ℂ
⊢ (f * g) ∣[k1 + k2] A = Matrix.det ↑↑A • f ∣[k1] A * g ∣[k2] A

Next tactic:
ext1 x
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) :
    (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by
  ext1 x
  

Proof state:
case h
Γ : Subgroup SL(2, ℤ)
k : ℤ
f✝ : ℍ → ℂ
k1 k2 : ℤ
A : ↥GL(2, ℝ)⁺
f g : ℍ → ℂ
x : ℍ
⊢ ((f * g) ∣[k1 + k2] A) x = (Matrix.det ↑↑A • f ∣[k1] A * g ∣[k2] A) x

Next tactic:
simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply,
    Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul]
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) :
    (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by
  ext1 x
  simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply,
    Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul]
  

Proof state:
case h
Γ : Subgroup SL(2, ℤ)
k : ℤ
f✝ : ℍ → ℂ
k1 k2 : ℤ
A : ↥GL(2, ℝ)⁺
f g : ℍ → ℂ
x : ℍ
⊢ f (A • x) * g (A • x) * ↑(Matrix.det ↑↑A) ^ (k1 + k2 - 1) * denom A x ^ (-(k1 + k2)) =
    ↑(Matrix.det ↑↑A) * (f (A • x) * ↑(Matrix.det ↑↑A) ^ (k1 - 1) * denom A x ^ (-k1)) *
      (g (A • x) * ↑(Matrix.det ↑↑A) ^ (k2 - 1) * denom A x ^ (-k2))

Next tactic:
set d : ℂ := ↑((↑ₘA).det : ℝ)
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) :
    (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by
  ext1 x
  simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply,
    Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul]
  set d : ℂ := ↑((↑ₘA).det : ℝ)
  

Proof state:
case h
Γ : Subgroup SL(2, ℤ)
k : ℤ
f✝ : ℍ → ℂ
k1 k2 : ℤ
A : ↥GL(2, ℝ)⁺
f g : ℍ → ℂ
x : ℍ
d : ℂ := ↑(Matrix.det ↑↑A)
⊢ f (A • x) * g (A • x) * d ^ (k1 + k2 - 1) * denom A x ^ (-(k1 + k2)) =
    d * (f (A • x) * d ^ (k1 - 1) * denom A x ^ (-k1)) * (g (A • x) * d ^ (k2 - 1) * denom A x ^ (-k2))

Next tactic:
have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by
    have : d ≠ 0 := by
      dsimp
      norm_cast
      exact Matrix.GLPos.det_ne_zero A
    rw [← zpow_one_add₀ this, ← zpow_add₀ this]
    congr; ring
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) :
    (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by
  ext1 x
  simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply,
    Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul]
  set d : ℂ := ↑((↑ₘA).det : ℝ)
  have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by
    

Proof state:
Γ : Subgroup SL(2, ℤ)
k : ℤ
f✝ : ℍ → ℂ
k1 k2 : ℤ
A : ↥GL(2, ℝ)⁺
f g : ℍ → ℂ
x : ℍ
d : ℂ := ↑(Matrix.det ↑↑A)
⊢ d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1)

Next tactic:
have : d ≠ 0 := by
      dsimp
      norm_cast
      exact Matrix.GLPos.det_ne_zero A
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) :
    (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by
  ext1 x
  simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply,
    Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul]
  set d : ℂ := ↑((↑ₘA).det : ℝ)
  have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by
    have : d ≠ 0 := by
      

Proof state:
Γ : Subgroup SL(2, ℤ)
k : ℤ
f✝ : ℍ → ℂ
k1 k2 : ℤ
A : ↥GL(2, ℝ)⁺
f g : ℍ → ℂ
x : ℍ
d : ℂ := ↑(Matrix.det ↑↑A)
⊢ d ≠ 0

Next tactic:
dsimp
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) :
    (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by
  ext1 x
  simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply,
    Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul]
  set d : ℂ := ↑((↑ₘA).det : ℝ)
  have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by
    have : d ≠ 0 := by
      dsimp
      

Proof state:
Γ : Subgroup SL(2, ℤ)
k : ℤ
f✝ : ℍ → ℂ
k1 k2 : ℤ
A : ↥GL(2, ℝ)⁺
f g : ℍ → ℂ
x : ℍ
d : ℂ := ↑(Matrix.det ↑↑A)
⊢ ¬↑(Matrix.det ↑↑A) = 0

Next tactic:
norm_cast
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) :
    (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by
  ext1 x
  simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply,
    Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul]
  set d : ℂ := ↑((↑ₘA).det : ℝ)
  have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by
    have : d ≠ 0 := by
      dsimp
      norm_cast
      

Proof state:
Γ : Subgroup SL(2, ℤ)
k : ℤ
f✝ : ℍ → ℂ
k1 k2 : ℤ
A : ↥GL(2, ℝ)⁺
f g : ℍ → ℂ
x : ℍ
d : ℂ := ↑(Matrix.det ↑↑A)
⊢ ¬Matrix.det ↑↑A = 0

Next tactic:
exact Matrix.GLPos.det_ne_zero A
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) :
    (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by
  ext1 x
  simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply,
    Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul]
  set d : ℂ := ↑((↑ₘA).det : ℝ)
  have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by
    have : d ≠ 0 := by
      dsimp
      norm_cast
      exact Matrix.GLPos.det_ne_zero A
    

Proof state:
Γ : Subgroup SL(2, ℤ)
k : ℤ
f✝ : ℍ → ℂ
k1 k2 : ℤ
A : ↥GL(2, ℝ)⁺
f g : ℍ → ℂ
x : ℍ
d : ℂ := ↑(Matrix.det ↑↑A)
this : d ≠ 0
⊢ d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1)

Next tactic:
rw [← zpow_one_add₀ this, ← zpow_add₀ this]
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) :
    (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by
  ext1 x
  simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply,
    Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul]
  set d : ℂ := ↑((↑ₘA).det : ℝ)
  have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by
    have : d ≠ 0 := by
      dsimp
      norm_cast
      exact Matrix.GLPos.det_ne_zero A
    rw [← zpow_one_add₀ this, ← zpow_add₀ this]
    

Proof state:
Γ : Subgroup SL(2, ℤ)
k : ℤ
f✝ : ℍ → ℂ
k1 k2 : ℤ
A : ↥GL(2, ℝ)⁺
f g : ℍ → ℂ
x : ℍ
d : ℂ := ↑(Matrix.det ↑↑A)
this : d ≠ 0
⊢ d ^ (k1 + k2 - 1) = d ^ (1 + (k1 - 1) + (k2 - 1))

Next tactic:
congr