l3lab/ntp-mathlib huggingface dataset:
/-- Exactly `n / p` naturals in `[1, n]` are multiples of `p`. -/
theorem card_multiples (n p : ℕ) : card ((Finset.range n).filter fun e => p ∣ e + 1) = n / p := by
  induction' n with n hn
  · 

Proof state:
case zero
a b m n p✝ p : ℕ
⊢ card (Finset.filter (fun e => p ∣ e + 1) (Finset.range zero)) = zero / p

Next tactic:
simp
/-- Exactly `n / p` naturals in `[1, n]` are multiples of `p`. -/
theorem card_multiples (n p : ℕ) : card ((Finset.range n).filter fun e => p ∣ e + 1) = n / p := by
  induction' n with n hn
  · simp
  

Proof state:
case succ
a b m n✝ p✝ p n : ℕ
hn : card (Finset.filter (fun e => p ∣ e + 1) (Finset.range n)) = n / p
⊢ card (Finset.filter (fun e => p ∣ e + 1) (Finset.range (succ n))) = succ n / p

Next tactic:
simp [Nat.succ_div, add_ite, add_zero, Finset.range_succ, filter_insert, apply_ite card,
    card_insert_of_not_mem, hn]
/-- Exactly `n / p` naturals in `(0, n]` are multiples of `p`. -/
theorem Ioc_filter_dvd_card_eq_div (n p : ℕ) : ((Ioc 0 n).filter fun x => p ∣ x).card = n / p := by
  

Proof state:
a b m n✝ p✝ n p : ℕ
⊢ card (Finset.filter (fun x => p ∣ x) (Ioc 0 n)) = n / p

Next tactic:
induction' n with n IH
/-- Exactly `n / p` naturals in `(0, n]` are multiples of `p`. -/
theorem Ioc_filter_dvd_card_eq_div (n p : ℕ) : ((Ioc 0 n).filter fun x => p ∣ x).card = n / p := by
  induction' n with n IH
  · 

Proof state:
case zero
a b m n p✝ p : ℕ
⊢ card (Finset.filter (fun x => p ∣ x) (Ioc 0 zero)) = zero / p

Next tactic:
simp
/-- Exactly `n / p` naturals in `(0, n]` are multiples of `p`. -/
theorem Ioc_filter_dvd_card_eq_div (n p : ℕ) : ((Ioc 0 n).filter fun x => p ∣ x).card = n / p := by
  induction' n with n IH
  · simp
  -- TODO: Golf away `h1` after Yaël PRs a lemma asserting this
  

Proof state:
case succ
a b m n✝ p✝ p n : ℕ
IH : card (Finset.filter (fun x => p ∣ x) (Ioc 0 n)) = n / p
⊢ card (Finset.filter (fun x => p ∣ x) (Ioc 0 (succ n))) = succ n / p

Next tactic:
have h1 : Ioc 0 n.succ = insert n.succ (Ioc 0 n) := by
    rcases n.eq_zero_or_pos with (rfl | hn)
    · simp
    simp_rw [← Ico_succ_succ, Ico_insert_right (succ_le_succ hn.le), Ico_succ_right]
/-- Exactly `n / p` naturals in `(0, n]` are multiples of `p`. -/
theorem Ioc_filter_dvd_card_eq_div (n p : ℕ) : ((Ioc 0 n).filter fun x => p ∣ x).card = n / p := by
  induction' n with n IH
  · simp
  -- TODO: Golf away `h1` after Yaël PRs a lemma asserting this
  have h1 : Ioc 0 n.succ = insert n.succ (Ioc 0 n) := by
    

Proof state:
a b m n✝ p✝ p n : ℕ
IH : card (Finset.filter (fun x => p ∣ x) (Ioc 0 n)) = n / p
⊢ Ioc 0 (succ n) = insert (succ n) (Ioc 0 n)

Next tactic:
rcases n.eq_zero_or_pos with (rfl | hn)
/-- Exactly `n / p` naturals in `(0, n]` are multiples of `p`. -/
theorem Ioc_filter_dvd_card_eq_div (n p : ℕ) : ((Ioc 0 n).filter fun x => p ∣ x).card = n / p := by
  induction' n with n IH
  · simp
  -- TODO: Golf away `h1` after Yaël PRs a lemma asserting this
  have h1 : Ioc 0 n.succ = insert n.succ (Ioc 0 n) := by
    rcases n.eq_zero_or_pos with (rfl | hn)
    · 

Proof state:
case inl
a b m n p✝ p : ℕ
IH : card (Finset.filter (fun x => p ∣ x) (Ioc 0 0)) = 0 / p
⊢ Ioc 0 (succ 0) = insert (succ 0) (Ioc 0 0)

Next tactic:
simp
/-- Exactly `n / p` naturals in `(0, n]` are multiples of `p`. -/
theorem Ioc_filter_dvd_card_eq_div (n p : ℕ) : ((Ioc 0 n).filter fun x => p ∣ x).card = n / p := by
  induction' n with n IH
  · simp
  -- TODO: Golf away `h1` after Yaël PRs a lemma asserting this
  have h1 : Ioc 0 n.succ = insert n.succ (Ioc 0 n) := by
    rcases n.eq_zero_or_pos with (rfl | hn)
    · simp
    

Proof state:
case inr
a b m n✝ p✝ p n : ℕ
IH : card (Finset.filter (fun x => p ∣ x) (Ioc 0 n)) = n / p
hn : n > 0
⊢ Ioc 0 (succ n) = insert (succ n) (Ioc 0 n)

Next tactic:
simp_rw [← Ico_succ_succ, Ico_insert_right (succ_le_succ hn.le), Ico_succ_right]
/-- Exactly `n / p` naturals in `(0, n]` are multiples of `p`. -/
theorem Ioc_filter_dvd_card_eq_div (n p : ℕ) : ((Ioc 0 n).filter fun x => p ∣ x).card = n / p := by
  induction' n with n IH
  · simp
  -- TODO: Golf away `h1` after Yaël PRs a lemma asserting this
  have h1 : Ioc 0 n.succ = insert n.succ (Ioc 0 n) := by
    rcases n.eq_zero_or_pos with (rfl | hn)
    · simp
    simp_rw [← Ico_succ_succ, Ico_insert_right (succ_le_succ hn.le), Ico_succ_right]
  

Proof state:
case succ
a b m n✝ p✝ p n : ℕ
IH : card (Finset.filter (fun x => p ∣ x) (Ioc 0 n)) = n / p
h1 : Ioc 0 (succ n) = insert (succ n) (Ioc 0 n)
⊢ card (Finset.filter (fun x => p ∣ x) (Ioc 0 (succ n))) = succ n / p

Next tactic:
simp [Nat.succ_div, add_ite, add_zero, h1, filter_insert, apply_ite card, card_insert_eq_ite, IH,
    Finset.mem_filter, mem_Ioc, not_le.2 (lt_add_one n), Nat.succ_eq_add_one]
theorem aux_ne_zero (f : (L ≃ₐ[K] L) → Lˣ) : aux K L f ≠ 0 :=
/- the set `Aut_K(L)` is linearly independent in the `L`-vector space `L → L`, by Dedekind's
linear independence of characters -/
  have : LinearIndependent L (fun (f : L ≃ₐ[K] L) => (f : L → L)) :=
    LinearIndependent.comp (ι' := L ≃ₐ[K] L)
      (linearIndependent_monoidHom L L) (fun f => f)
      (fun x y h => by 

Proof state:
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : FiniteDimensional K L
f : (L ≃ₐ[K] L) → Lˣ
x y : L ≃ₐ[K] L
h : (fun f => ↑f) x = (fun f => ↑f) y
⊢ x = y

Next tactic:
ext
theorem aux_ne_zero (f : (L ≃ₐ[K] L) → Lˣ) : aux K L f ≠ 0 :=
/- the set `Aut_K(L)` is linearly independent in the `L`-vector space `L → L`, by Dedekind's
linear independence of characters -/
  have : LinearIndependent L (fun (f : L ≃ₐ[K] L) => (f : L → L)) :=
    LinearIndependent.comp (ι' := L ≃ₐ[K] L)
      (linearIndependent_monoidHom L L) (fun f => f)
      (fun x y h => by ext; 

Proof state:
case h
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : FiniteDimensional K L
f : (L ≃ₐ[K] L) → Lˣ
x y : L ≃ₐ[K] L
h : (fun f => ↑f) x = (fun f => ↑f) y
a✝ : L
⊢ x a✝ = y a✝

Next tactic:
exact FunLike.ext_iff.1 h _
theorem hilbert90 (f : (L ≃ₐ[K] L) → Lˣ)
    (hf : ∀ (g h : (L ≃ₐ[K] L)), f (g * h) = g (f h) * f g) :
    ∃ β : Lˣ, ∀ g : (L ≃ₐ[K] L), f g * Units.map g β = β := by
/- Let `z : L` be such that `∑ f(h) * h(z) ≠ 0`, for `h ∈ Aut_K(L)` -/
  

Proof state:
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : FiniteDimensional K L
f : (L ≃ₐ[K] L) → Lˣ
hf : ∀ (g h : L ≃ₐ[K] L), ↑(f (g * h)) = g ↑(f h) * ↑(f g)
⊢ ∃ β, ∀ (g : L ≃ₐ[K] L), f g * (Units.map ↑g) β = β

Next tactic:
obtain ⟨z, hz⟩ : ∃ z, aux K L f z ≠ 0 :=
    not_forall.1 (fun H => aux_ne_zero K L f $ funext $ fun x => H x)
theorem hilbert90 (f : (L ≃ₐ[K] L) → Lˣ)
    (hf : ∀ (g h : (L ≃ₐ[K] L)), f (g * h) = g (f h) * f g) :
    ∃ β : Lˣ, ∀ g : (L ≃ₐ[K] L), f g * Units.map g β = β := by
/- Let `z : L` be such that `∑ f(h) * h(z) ≠ 0`, for `h ∈ Aut_K(L)` -/
  obtain ⟨z, hz⟩ : ∃ z, aux K L f z ≠ 0 :=
    not_forall.1 (fun H => aux_ne_zero K L f $ funext $ fun x => H x)
  

Proof state:
case intro
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : FiniteDimensional K L
f : (L ≃ₐ[K] L) → Lˣ
hf : ∀ (g h : L ≃ₐ[K] L), ↑(f (g * h)) = g ↑(f h) * ↑(f g)
z : L
hz : aux K L f z ≠ 0
⊢ ∃ β, ∀ (g : L ≃ₐ[K] L), f g * (Units.map ↑g) β = β

Next tactic:
have : aux K L f z = ∑ h, f h * h z := by simp [aux, Finsupp.total, Finsupp.sum_fintype]
theorem hilbert90 (f : (L ≃ₐ[K] L) → Lˣ)
    (hf : ∀ (g h : (L ≃ₐ[K] L)), f (g * h) = g (f h) * f g) :
    ∃ β : Lˣ, ∀ g : (L ≃ₐ[K] L), f g * Units.map g β = β := by
/- Let `z : L` be such that `∑ f(h) * h(z) ≠ 0`, for `h ∈ Aut_K(L)` -/
  obtain ⟨z, hz⟩ : ∃ z, aux K L f z ≠ 0 :=
    not_forall.1 (fun H => aux_ne_zero K L f $ funext $ fun x => H x)
  have : aux K L f z = ∑ h, f h * h z := by 

Proof state:
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : FiniteDimensional K L
f : (L ≃ₐ[K] L) → Lˣ
hf : ∀ (g h : L ≃ₐ[K] L), ↑(f (g * h)) = g ↑(f h) * ↑(f g)
z : L
hz : aux K L f z ≠ 0
⊢ aux K L f z = ∑ h : L ≃ₐ[K] L, ↑(f h) * h z

Next tactic:
simp [aux, Finsupp.total, Finsupp.sum_fintype]
theorem hilbert90 (f : (L ≃ₐ[K] L) → Lˣ)
    (hf : ∀ (g h : (L ≃ₐ[K] L)), f (g * h) = g (f h) * f g) :
    ∃ β : Lˣ, ∀ g : (L ≃ₐ[K] L), f g * Units.map g β = β := by
/- Let `z : L` be such that `∑ f(h) * h(z) ≠ 0`, for `h ∈ Aut_K(L)` -/
  obtain ⟨z, hz⟩ : ∃ z, aux K L f z ≠ 0 :=
    not_forall.1 (fun H => aux_ne_zero K L f $ funext $ fun x => H x)
  have : aux K L f z = ∑ h, f h * h z := by simp [aux, Finsupp.total, Finsupp.sum_fintype]
/- Let `β = ∑ f(h) * h(z).` -/
  

Proof state:
case intro
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : FiniteDimensional K L
f : (L ≃ₐ[K] L) → Lˣ
hf : ∀ (g h : L ≃ₐ[K] L), ↑(f (g * h)) = g ↑(f h) * ↑(f g)
z : L
hz : aux K L f z ≠ 0
this : aux K L f z = ∑ h : L ≃ₐ[K] L, ↑(f h) * h z
⊢ ∃ β, ∀ (g : L ≃ₐ[K] L), f g * (Units.map ↑g) β = β

Next tactic:
use Units.mk0 (aux K L f z) hz
theorem hilbert90 (f : (L ≃ₐ[K] L) → Lˣ)
    (hf : ∀ (g h : (L ≃ₐ[K] L)), f (g * h) = g (f h) * f g) :
    ∃ β : Lˣ, ∀ g : (L ≃ₐ[K] L), f g * Units.map g β = β := by
/- Let `z : L` be such that `∑ f(h) * h(z) ≠ 0`, for `h ∈ Aut_K(L)` -/
  obtain ⟨z, hz⟩ : ∃ z, aux K L f z ≠ 0 :=
    not_forall.1 (fun H => aux_ne_zero K L f $ funext $ fun x => H x)
  have : aux K L f z = ∑ h, f h * h z := by simp [aux, Finsupp.total, Finsupp.sum_fintype]
/- Let `β = ∑ f(h) * h(z).` -/
  use Units.mk0 (aux K L f z) hz
  

Proof state:
case h
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : FiniteDimensional K L
f : (L ≃ₐ[K] L) → Lˣ
hf : ∀ (g h : L ≃ₐ[K] L), ↑(f (g * h)) = g ↑(f h) * ↑(f g)
z : L
hz : aux K L f z ≠ 0
this : aux K L f z = ∑ h : L ≃ₐ[K] L, ↑(f h) * h z
⊢ ∀ (g : L ≃ₐ[K] L), f g * (Units.map ↑g) (Units.mk0 (aux K L f z) hz) = Units.mk0 (aux K L f z) hz

Next tactic:
intro g
theorem hilbert90 (f : (L ≃ₐ[K] L) → Lˣ)
    (hf : ∀ (g h : (L ≃ₐ[K] L)), f (g * h) = g (f h) * f g) :
    ∃ β : Lˣ, ∀ g : (L ≃ₐ[K] L), f g * Units.map g β = β := by
/- Let `z : L` be such that `∑ f(h) * h(z) ≠ 0`, for `h ∈ Aut_K(L)` -/
  obtain ⟨z, hz⟩ : ∃ z, aux K L f z ≠ 0 :=
    not_forall.1 (fun H => aux_ne_zero K L f $ funext $ fun x => H x)
  have : aux K L f z = ∑ h, f h * h z := by simp [aux, Finsupp.total, Finsupp.sum_fintype]
/- Let `β = ∑ f(h) * h(z).` -/
  use Units.mk0 (aux K L f z) hz
  intro g
/- Then the equality follows from the hypothesis `hf` (that `f` is a 1-cocycle). -/
  

Proof state:
case h
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : FiniteDimensional K L
f : (L ≃ₐ[K] L) → Lˣ
hf : ∀ (g h : L ≃ₐ[K] L), ↑(f (g * h)) = g ↑(f h) * ↑(f g)
z : L
hz : aux K L f z ≠ 0
this : aux K L f z = ∑ h : L ≃ₐ[K] L, ↑(f h) * h z
g : L ≃ₐ[K] L
⊢ f g * (Units.map ↑g) (Units.mk0 (aux K L f z) hz) = Units.mk0 (aux K L f z) hz

Next tactic:
simp_rw [Units.ext_iff, this, Units.val_mul, Units.coe_map, Units.val_mk0, MonoidHom.coe_coe,
    map_sum, map_mul, Finset.mul_sum, ← mul_assoc, mul_comm (f _ : L), ← hf, mul_comm (f _ : L)]
theorem hilbert90 (f : (L ≃ₐ[K] L) → Lˣ)
    (hf : ∀ (g h : (L ≃ₐ[K] L)), f (g * h) = g (f h) * f g) :
    ∃ β : Lˣ, ∀ g : (L ≃ₐ[K] L), f g * Units.map g β = β := by
/- Let `z : L` be such that `∑ f(h) * h(z) ≠ 0`, for `h ∈ Aut_K(L)` -/
  obtain ⟨z, hz⟩ : ∃ z, aux K L f z ≠ 0 :=
    not_forall.1 (fun H => aux_ne_zero K L f $ funext $ fun x => H x)
  have : aux K L f z = ∑ h, f h * h z := by simp [aux, Finsupp.total, Finsupp.sum_fintype]
/- Let `β = ∑ f(h) * h(z).` -/
  use Units.mk0 (aux K L f z) hz
  intro g
/- Then the equality follows from the hypothesis `hf` (that `f` is a 1-cocycle). -/
  simp_rw [Units.ext_iff, this, Units.val_mul, Units.coe_map, Units.val_mk0, MonoidHom.coe_coe,
    map_sum, map_mul, Finset.mul_sum, ← mul_assoc, mul_comm (f _ : L), ← hf, mul_comm (f _ : L)]
  

Proof state:
case h
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : FiniteDimensional K L
f : (L ≃ₐ[K] L) → Lˣ
hf : ∀ (g h : L ≃ₐ[K] L), ↑(f (g * h)) = g ↑(f h) * ↑(f g)
z : L
hz : aux K L f z ≠ 0
this : aux K L f z = ∑ h : L ≃ₐ[K] L, ↑(f h) * h z
g : L ≃ₐ[K] L
⊢ ∑ x : L ≃ₐ[K] L, g (x z) * ↑(f (g * x)) = ∑ x : L ≃ₐ[K] L, x z * ↑(f x)

Next tactic:
exact Fintype.sum_bijective (fun i => g * i) (Group.mulLeft_bijective g) _ _ (fun i => rfl)
/-- Given a finite extension of fields `L/K`, the first group cohomology `H¹(Aut_K(L), Lˣ)` is
trivial. -/
noncomputable instance hilbert90 : Unique (H1 (Rep.ofAlgebraAutOnUnits K L)) where
  default := 0
  uniq := fun a => Quotient.inductionOn' a fun x => (Submodule.Quotient.mk_eq_zero _).2 <| by
    

Proof state:
K L : Type
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : FiniteDimensional K L
a : H1 (Rep.ofAlgebraAutOnUnits K L)
x : ↥(oneCocycles (Rep.ofAlgebraAutOnUnits K L))
⊢ x ∈ oneCoboundaries (Rep.ofAlgebraAutOnUnits K L)

Next tactic:
rcases _root_.hilbert90 (Additive.toMul ∘ x.1) (fun g h => Units.ext_iff.1
      ((mem_oneCocycles_iff x.1).1 x.2 g h)) with ⟨β, hβ⟩
/-- Given a finite extension of fields `L/K`, the first group cohomology `H¹(Aut_K(L), Lˣ)` is
trivial. -/
noncomputable instance hilbert90 : Unique (H1 (Rep.ofAlgebraAutOnUnits K L)) where
  default := 0
  uniq := fun a => Quotient.inductionOn' a fun x => (Submodule.Quotient.mk_eq_zero _).2 <| by
    rcases _root_.hilbert90 (Additive.toMul ∘ x.1) (fun g h => Units.ext_iff.1
      ((mem_oneCocycles_iff x.1).1 x.2 g h)) with ⟨β, hβ⟩
    

Proof state:
case intro
K L : Type
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : FiniteDimensional K L
a : H1 (Rep.ofAlgebraAutOnUnits K L)
x : ↥(oneCocycles (Rep.ofAlgebraAutOnUnits K L))
β : Lˣ
hβ : ∀ (g : L ≃ₐ[K] L), (⇑Additive.toMul ∘ ↑x) g * (Units.map ↑g) β = β
⊢ x ∈ oneCoboundaries (Rep.ofAlgebraAutOnUnits K L)

Next tactic:
use Additive.ofMul (β⁻¹ : Lˣ)
/-- Given a finite extension of fields `L/K`, the first group cohomology `H¹(Aut_K(L), Lˣ)` is
trivial. -/
noncomputable instance hilbert90 : Unique (H1 (Rep.ofAlgebraAutOnUnits K L)) where
  default := 0
  uniq := fun a => Quotient.inductionOn' a fun x => (Submodule.Quotient.mk_eq_zero _).2 <| by
    rcases _root_.hilbert90 (Additive.toMul ∘ x.1) (fun g h => Units.ext_iff.1
      ((mem_oneCocycles_iff x.1).1 x.2 g h)) with ⟨β, hβ⟩
    use Additive.ofMul (β⁻¹ : Lˣ)
    

Proof state:
case h
K L : Type
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : FiniteDimensional K L
a : H1 (Rep.ofAlgebraAutOnUnits K L)
x : ↥(oneCocycles (Rep.ofAlgebraAutOnUnits K L))
β : Lˣ
hβ : ∀ (g : L ≃ₐ[K] L), (⇑Additive.toMul ∘ ↑x) g * (Units.map ↑g) β = β
⊢ (LinearMap.codRestrict (oneCocycles (Rep.ofAlgebraAutOnUnits K L)) (dZero (Rep.ofAlgebraAutOnUnits K L))
        (_ :
          ∀ (c : CoeSort.coe (Rep.ofAlgebraAutOnUnits K L)),
            (dOne (Rep.ofAlgebraAutOnUnits K L) ∘ₗ dZero (Rep.ofAlgebraAutOnUnits K L)) c = 0 c))
      (Additive.ofMul β⁻¹) =
    x

Next tactic:
ext g
/-- Given a finite extension of fields `L/K`, the first group cohomology `H¹(Aut_K(L), Lˣ)` is
trivial. -/
noncomputable instance hilbert90 : Unique (H1 (Rep.ofAlgebraAutOnUnits K L)) where
  default := 0
  uniq := fun a => Quotient.inductionOn' a fun x => (Submodule.Quotient.mk_eq_zero _).2 <| by
    rcases _root_.hilbert90 (Additive.toMul ∘ x.1) (fun g h => Units.ext_iff.1
      ((mem_oneCocycles_iff x.1).1 x.2 g h)) with ⟨β, hβ⟩
    use Additive.ofMul (β⁻¹ : Lˣ)
    ext g
    

Proof state:
case h.a.h
K L : Type
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : FiniteDimensional K L
a : H1 (Rep.ofAlgebraAutOnUnits K L)
x : ↥(oneCocycles (Rep.ofAlgebraAutOnUnits K L))
β : Lˣ
hβ : ∀ (g : L ≃ₐ[K] L), (⇑Additive.toMul ∘ ↑x) g * (Units.map ↑g) β = β
g : L ≃ₐ[K] L
⊢ ↑((LinearMap.codRestrict (oneCocycles (Rep.ofAlgebraAutOnUnits K L)) (dZero (Rep.ofAlgebraAutOnUnits K L))
            (_ :
              ∀ (c : CoeSort.coe (Rep.ofAlgebraAutOnUnits K L)),
                (dOne (Rep.ofAlgebraAutOnUnits K L) ∘ₗ dZero (Rep.ofAlgebraAutOnUnits K L)) c = 0 c))
          (Additive.ofMul β⁻¹))
      g =
    ↑x g

Next tactic:
refine' Additive.toMul.bijective.1 _
/-- Given a finite extension of fields `L/K`, the first group cohomology `H¹(Aut_K(L), Lˣ)` is
trivial. -/
noncomputable instance hilbert90 : Unique (H1 (Rep.ofAlgebraAutOnUnits K L)) where
  default := 0
  uniq := fun a => Quotient.inductionOn' a fun x => (Submodule.Quotient.mk_eq_zero _).2 <| by
    rcases _root_.hilbert90 (Additive.toMul ∘ x.1) (fun g h => Units.ext_iff.1
      ((mem_oneCocycles_iff x.1).1 x.2 g h)) with ⟨β, hβ⟩
    use Additive.ofMul (β⁻¹ : Lˣ)
    ext g
    refine' Additive.toMul.bijective.1 _
    

Proof state:
case h.a.h
K L : Type
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : FiniteDimensional K L
a : H1 (Rep.ofAlgebraAutOnUnits K L)
x : ↥(oneCocycles (Rep.ofAlgebraAutOnUnits K L))
β : Lˣ
hβ : ∀ (g : L ≃ₐ[K] L), (⇑Additive.toMul ∘ ↑x) g * (Units.map ↑g) β = β
g : L ≃ₐ[K] L
⊢ Additive.toMul
      (↑((LinearMap.codRestrict (oneCocycles (Rep.ofAlgebraAutOnUnits K L)) (dZero (Rep.ofAlgebraAutOnUnits K L))
              (_ :
                ∀ (c : CoeSort.coe (Rep.ofAlgebraAutOnUnits K L)),
                  (dOne (Rep.ofAlgebraAutOnUnits K L) ∘ₗ dZero (Rep.ofAlgebraAutOnUnits K L)) c = 0 c))
            (Additive.ofMul β⁻¹))
        g) =
    Additive.toMul (↑x g)

Next tactic:
show Units.map g β⁻¹ / β⁻¹ = Additive.toMul (x.1 g)
/-- Given a finite extension of fields `L/K`, the first group cohomology `H¹(Aut_K(L), Lˣ)` is
trivial. -/
noncomputable instance hilbert90 : Unique (H1 (Rep.ofAlgebraAutOnUnits K L)) where
  default := 0
  uniq := fun a => Quotient.inductionOn' a fun x => (Submodule.Quotient.mk_eq_zero _).2 <| by
    rcases _root_.hilbert90 (Additive.toMul ∘ x.1) (fun g h => Units.ext_iff.1
      ((mem_oneCocycles_iff x.1).1 x.2 g h)) with ⟨β, hβ⟩
    use Additive.ofMul (β⁻¹ : Lˣ)
    ext g
    refine' Additive.toMul.bijective.1 _
    show Units.map g β⁻¹ / β⁻¹ = Additive.toMul (x.1 g)
    

Proof state:
case h.a.h
K L : Type
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : FiniteDimensional K L
a : H1 (Rep.ofAlgebraAutOnUnits K L)
x : ↥(oneCocycles (Rep.ofAlgebraAutOnUnits K L))
β : Lˣ
hβ : ∀ (g : L ≃ₐ[K] L), (⇑Additive.toMul ∘ ↑x) g * (Units.map ↑g) β = β
g : L ≃ₐ[K] L
⊢ (Units.map ↑g) β⁻¹ / β⁻¹ = Additive.toMul (↑x g)

Next tactic:
rw [map_inv, div_inv_eq_mul, mul_comm]
/-- Given a finite extension of fields `L/K`, the first group cohomology `H¹(Aut_K(L), Lˣ)` is
trivial. -/
noncomputable instance hilbert90 : Unique (H1 (Rep.ofAlgebraAutOnUnits K L)) where
  default := 0
  uniq := fun a => Quotient.inductionOn' a fun x => (Submodule.Quotient.mk_eq_zero _).2 <| by
    rcases _root_.hilbert90 (Additive.toMul ∘ x.1) (fun g h => Units.ext_iff.1
      ((mem_oneCocycles_iff x.1).1 x.2 g h)) with ⟨β, hβ⟩
    use Additive.ofMul (β⁻¹ : Lˣ)
    ext g
    refine' Additive.toMul.bijective.1 _
    show Units.map g β⁻¹ / β⁻¹ = Additive.toMul (x.1 g)
    rw [map_inv, div_inv_eq_mul, mul_comm]
    

Proof state:
case h.a.h
K L : Type
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : FiniteDimensional K L
a : H1 (Rep.ofAlgebraAutOnUnits K L)
x : ↥(oneCocycles (Rep.ofAlgebraAutOnUnits K L))
β : Lˣ
hβ : ∀ (g : L ≃ₐ[K] L), (⇑Additive.toMul ∘ ↑x) g * (Units.map ↑g) β = β
g : L ≃ₐ[K] L
⊢ β * ((Units.map ↑g) β)⁻¹ = Additive.toMul (↑x g)

Next tactic:
exact mul_inv_eq_iff_eq_mul.2 (hβ g).symm
/-- Asymptotic bound for the `Γ` function integrand. -/
theorem Gamma_integrand_isLittleO (s : ℝ) :
    (fun x : ℝ => exp (-x) * x ^ s) =o[atTop] fun x : ℝ => exp (-(1 / 2) * x) := by
  

Proof state:
s : ℝ
⊢ (fun x => rexp (-x) * x ^ s) =o[atTop] fun x => rexp (-(1 / 2) * x)

Next tactic:
refine' isLittleO_of_tendsto (fun x hx => _) _
/-- Asymptotic bound for the `Γ` function integrand. -/
theorem Gamma_integrand_isLittleO (s : ℝ) :
    (fun x : ℝ => exp (-x) * x ^ s) =o[atTop] fun x : ℝ => exp (-(1 / 2) * x) := by
  refine' isLittleO_of_tendsto (fun x hx => _) _
  · 

Proof state:
case refine'_1
s x : ℝ
hx : rexp (-(1 / 2) * x) = 0
⊢ rexp (-x) * x ^ s = 0

Next tactic:
exfalso
/-- Asymptotic bound for the `Γ` function integrand. -/
theorem Gamma_integrand_isLittleO (s : ℝ) :
    (fun x : ℝ => exp (-x) * x ^ s) =o[atTop] fun x : ℝ => exp (-(1 / 2) * x) := by
  refine' isLittleO_of_tendsto (fun x hx => _) _
  · exfalso; 

Proof state:
case refine'_1.h
s x : ℝ
hx : rexp (-(1 / 2) * x) = 0
⊢ False

Next tactic:
exact (exp_pos (-(1 / 2) * x)).ne' hx
/-- Asymptotic bound for the `Γ` function integrand. -/
theorem Gamma_integrand_isLittleO (s : ℝ) :
    (fun x : ℝ => exp (-x) * x ^ s) =o[atTop] fun x : ℝ => exp (-(1 / 2) * x) := by
  refine' isLittleO_of_tendsto (fun x hx => _) _
  · exfalso; exact (exp_pos (-(1 / 2) * x)).ne' hx
  

Proof state:
case refine'_2
s : ℝ
⊢ Tendsto (fun x => rexp (-x) * x ^ s / rexp (-(1 / 2) * x)) atTop (𝓝 0)

Next tactic:
have : (fun x : ℝ => exp (-x) * x ^ s / exp (-(1 / 2) * x)) =
      (fun x : ℝ => exp (1 / 2 * x) / x ^ s)⁻¹ := by
    ext1 x
    field_simp [exp_ne_zero, exp_neg, ← Real.exp_add]
    left
    ring
/-- Asymptotic bound for the `Γ` function integrand. -/
theorem Gamma_integrand_isLittleO (s : ℝ) :
    (fun x : ℝ => exp (-x) * x ^ s) =o[atTop] fun x : ℝ => exp (-(1 / 2) * x) := by
  refine' isLittleO_of_tendsto (fun x hx => _) _
  · exfalso; exact (exp_pos (-(1 / 2) * x)).ne' hx
  have : (fun x : ℝ => exp (-x) * x ^ s / exp (-(1 / 2) * x)) =
      (fun x : ℝ => exp (1 / 2 * x) / x ^ s)⁻¹ := by
    

Proof state:
s : ℝ
⊢ (fun x => rexp (-x) * x ^ s / rexp (-(1 / 2) * x)) = (fun x => rexp (1 / 2 * x) / x ^ s)⁻¹

Next tactic:
ext1 x
/-- Asymptotic bound for the `Γ` function integrand. -/
theorem Gamma_integrand_isLittleO (s : ℝ) :
    (fun x : ℝ => exp (-x) * x ^ s) =o[atTop] fun x : ℝ => exp (-(1 / 2) * x) := by
  refine' isLittleO_of_tendsto (fun x hx => _) _
  · exfalso; exact (exp_pos (-(1 / 2) * x)).ne' hx
  have : (fun x : ℝ => exp (-x) * x ^ s / exp (-(1 / 2) * x)) =
      (fun x : ℝ => exp (1 / 2 * x) / x ^ s)⁻¹ := by
    ext1 x
    

Proof state:
case h
s x : ℝ
⊢ rexp (-x) * x ^ s / rexp (-(1 / 2) * x) = (fun x => rexp (1 / 2 * x) / x ^ s)⁻¹ x

Next tactic:
field_simp [exp_ne_zero, exp_neg, ← Real.exp_add]
/-- Asymptotic bound for the `Γ` function integrand. -/
theorem Gamma_integrand_isLittleO (s : ℝ) :
    (fun x : ℝ => exp (-x) * x ^ s) =o[atTop] fun x : ℝ => exp (-(1 / 2) * x) := by
  refine' isLittleO_of_tendsto (fun x hx => _) _
  · exfalso; exact (exp_pos (-(1 / 2) * x)).ne' hx
  have : (fun x : ℝ => exp (-x) * x ^ s / exp (-(1 / 2) * x)) =
      (fun x : ℝ => exp (1 / 2 * x) / x ^ s)⁻¹ := by
    ext1 x
    field_simp [exp_ne_zero, exp_neg, ← Real.exp_add]
    

Proof state:
case h
s x : ℝ
⊢ x = x * 2 + -x ∨ x ^ s = 0

Next tactic:
left
/-- Asymptotic bound for the `Γ` function integrand. -/
theorem Gamma_integrand_isLittleO (s : ℝ) :
    (fun x : ℝ => exp (-x) * x ^ s) =o[atTop] fun x : ℝ => exp (-(1 / 2) * x) := by
  refine' isLittleO_of_tendsto (fun x hx => _) _
  · exfalso; exact (exp_pos (-(1 / 2) * x)).ne' hx
  have : (fun x : ℝ => exp (-x) * x ^ s / exp (-(1 / 2) * x)) =
      (fun x : ℝ => exp (1 / 2 * x) / x ^ s)⁻¹ := by
    ext1 x
    field_simp [exp_ne_zero, exp_neg, ← Real.exp_add]
    left
    

Proof state:
case h.h
s x : ℝ
⊢ x = x * 2 + -x

Next tactic:
ring
/-- Asymptotic bound for the `Γ` function integrand. -/
theorem Gamma_integrand_isLittleO (s : ℝ) :
    (fun x : ℝ => exp (-x) * x ^ s) =o[atTop] fun x : ℝ => exp (-(1 / 2) * x) := by
  refine' isLittleO_of_tendsto (fun x hx => _) _
  · exfalso; exact (exp_pos (-(1 / 2) * x)).ne' hx
  have : (fun x : ℝ => exp (-x) * x ^ s / exp (-(1 / 2) * x)) =
      (fun x : ℝ => exp (1 / 2 * x) / x ^ s)⁻¹ := by
    ext1 x
    field_simp [exp_ne_zero, exp_neg, ← Real.exp_add]
    left
    ring
  

Proof state:
case refine'_2
s : ℝ
this : (fun x => rexp (-x) * x ^ s / rexp (-(1 / 2) * x)) = (fun x => rexp (1 / 2 * x) / x ^ s)⁻¹
⊢ Tendsto (fun x => rexp (-x) * x ^ s / rexp (-(1 / 2) * x)) atTop (𝓝 0)

Next tactic:
rw [this]