harrywsanders/mathlib_extracted huggingface dataset:
-- Mathlib/Data/Int/GCD.lean
theorem gcdA_zero_right {s : ℕ} (h : s ≠ 0) : gcdA s 0 = 1

Proof state:
case intro
s : ℕ
h : s.succ ≠ 0
⊢ ((0 % s.succ).xgcdAux (0 - ↑(0 / s.succ) * 1) (1 - ↑(0 / s.succ) * 0) s.succ 1 0).2.1 = 1

Tactic:
simp

Result:
no goals

Proof state:
s : ℕ
h : s ≠ 0
⊢ (s.xgcdAux 1 0 0 0 1).2.1 = 1

Tactic:
obtain ⟨s, rfl⟩ := Nat.exists_eq_succ_of_ne_zero h

Result:
case intro
s : ℕ
h : s.succ ≠ 0
⊢ (s.succ.xgcdAux 1 0 0 0 1).2.1 = 1

Proof state:
case intro
s : ℕ
h : s.succ ≠ 0
⊢ (s.succ.xgcdAux 1 0 0 0 1).2.1 = 1

Tactic:
rw [xgcdAux]

Result:
case intro
s : ℕ
h : s.succ ≠ 0
⊢ ((0 % s.succ).xgcdAux (0 - ↑(0 / s.succ) * 1) (1 - ↑(0 / s.succ) * 0) s.succ 1 0).2.1 = 1

Proof state:
s : ℕ
h : s ≠ 0
⊢ s.gcdA 0 = 1

Tactic:
unfold gcdA xgcd

Result:
s : ℕ
h : s ≠ 0
⊢ (s.xgcdAux 1 0 0 0 1).2.1 = 1
-- Mathlib/Analysis/SpecialFunctions/Stirling.lean
theorem stirlingSeq'_bounded_by_pos_constant : ∃ a, 0 < a ∧ ∀ n : ℕ, a ≤ stirlingSeq (n + 1)

Proof state:
case intro
c : ℝ
h : ∀ (n : ℕ), c ≤ Real.log (stirlingSeq (n + 1))
n : ℕ
⊢ c ≤ Real.log (stirlingSeq (n + 1))

Tactic:
exact h n

Result:
no goals

Proof state:
⊢ ∃ a, 0 < a ∧ ∀ (n : ℕ), a ≤ stirlingSeq (n + 1)

Tactic:
obtain ⟨c, h⟩ := log_stirlingSeq_bounded_by_constant

Result:
case intro
c : ℝ
h : ∀ (n : ℕ), c ≤ Real.log (stirlingSeq (n + 1))
⊢ ∃ a, 0 < a ∧ ∀ (n : ℕ), a ≤ stirlingSeq (n + 1)

Proof state:
case intro
c : ℝ
h : ∀ (n : ℕ), c ≤ Real.log (stirlingSeq (n + 1))
⊢ ∃ a, 0 < a ∧ ∀ (n : ℕ), a ≤ stirlingSeq (n + 1)

Tactic:
refine ⟨exp c, exp_pos _, fun n => ?_⟩

Result:
case intro
c : ℝ
h : ∀ (n : ℕ), c ≤ Real.log (stirlingSeq (n + 1))
n : ℕ
⊢ rexp c ≤ stirlingSeq (n + 1)

Proof state:
case intro
c : ℝ
h : ∀ (n : ℕ), c ≤ Real.log (stirlingSeq (n + 1))
n : ℕ
⊢ rexp c ≤ stirlingSeq (n + 1)

Tactic:
rw [← le_log_iff_exp_le (stirlingSeq'_pos n)]

Result:
case intro
c : ℝ
h : ∀ (n : ℕ), c ≤ Real.log (stirlingSeq (n + 1))
n : ℕ
⊢ c ≤ Real.log (stirlingSeq (n + 1))
-- Mathlib/NumberTheory/DiophantineApproximation/Basic.lean
theorem exists_int_int_abs_mul_sub_le (ξ : ℝ) {n : ℕ} (n_pos : 0 < n) :
    ∃ j k : ℤ, 0 < k ∧ k ≤ n ∧ |↑k * ξ - j| ≤ 1 / (n + 1)

Proof state:
ξ : ℝ
n : ℕ
n_pos : 0 < n
f : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋
hn : 0 < ↑n + 1
hfu : ∀ (m : ℤ), fract (ξ * ↑m) * (↑n + 1) < ↑n + 1
D : Finset ℤ := Icc 0 ↑n
⊢ ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |(ξ * ↑k - ↑j) * (↑n + 1)| ≤ 1

Tactic:
by_cases H : ∃ m ∈ D, f m = n

Result:
case pos
ξ : ℝ
n : ℕ
n_pos : 0 < n
f : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋
hn : 0 < ↑n + 1
hfu : ∀ (m : ℤ), fract (ξ * ↑m) * (↑n + 1) < ↑n + 1
D : Finset ℤ := Icc 0 ↑n
H : ∃ m ∈ D, f m = ↑n
⊢ ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |(ξ * ↑k - ↑j) * (↑n + 1)| ≤ 1

case neg
ξ : ℝ
n : ℕ
n_pos : 0 < n
f : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋
hn : 0 < ↑n + 1
hfu : ∀ (m : ℤ), fract (ξ * ↑m) * (↑n + 1) < ↑n + 1
D : Finset ℤ := Icc 0 ↑n
H : ¬∃ m ∈ D, f m = ↑n
⊢ ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |(ξ * ↑k - ↑j) * (↑n + 1)| ≤ 1

Proof state:
ξ : ℝ
n : ℕ
n_pos : 0 < n
f : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋
hn : 0 < ↑n + 1
hfu : ∀ (m : ℤ), fract (ξ * ↑m) * (↑n + 1) < ↑n + 1
⊢ ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |↑k * ξ - ↑j| ≤ 1 / (↑n + 1)

Tactic:
conv in |_| ≤ _ => rw [mul_comm, le_div_iff₀ hn, ← abs_of_pos hn, ← abs_mul]

Result:
ξ : ℝ
n : ℕ
n_pos : 0 < n
f : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋
hn : 0 < ↑n + 1
hfu : ∀ (m : ℤ), fract (ξ * ↑m) * (↑n + 1) < ↑n + 1
⊢ ∃ j k, 0 < k ∧ k ≤ ↑n ∧ |(ξ * ↑k - ↑j) * (↑n + 1)| ≤ 1

Proof state:
case pos.intro.intro
ξ : ℝ
n : ℕ
n_pos : 0 < n
f : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋
hn : 0 < ↑n + 1
hfu : ∀ (m : ℤ), fract (ξ * ↑m) * (↑n + 1) < ↑n + 1
D : Finset ℤ := Icc 0 ↑n
m : ℤ
hm : m ∈ D
hf : f m = ↑n
hf' : ↑↑n ≤ fract (ξ * ↑m) * (↑n + 1)
hm₀ : 0 < m
⊢ -1 ≤ (ξ * ↑m - ↑⌊ξ * ↑m⌋) * (↑n + 1) - (↑n + 1) ∧ (ξ * ↑m - ↑⌊ξ * ↑m⌋) * (↑n + 1) - (↑n + 1) ≤ 1

Tactic:
refine
  ⟨le_sub_iff_add_le.mpr ?_, sub_le_iff_le_add.mpr <| le_of_lt <| (hfu m).trans <| lt_one_add _⟩

Result:
case pos.intro.intro
ξ : ℝ
n : ℕ
n_pos : 0 < n
f : ℤ → ℤ := fun m => ⌊fract (ξ * ↑m) * (↑n + 1)⌋
hn : 0 < ↑n + 1
hfu : ∀ (m : ℤ), fract (ξ * ↑m) * (↑n + 1) < ↑n + 1
D : Finset ℤ := Icc 0 ↑n
m : ℤ
hm : m ∈ D
hf : f m = ↑n
hf' : ↑↑n ≤ fract (ξ * ↑m) * (↑n + 1)
hm₀ : 0 < m
⊢ -1 + (↑n + 1) ≤ (ξ * ↑m - ↑⌊ξ * ↑m⌋) * (↑n + 1)
-- Mathlib/NumberTheory/LSeries/AbstractFuncEq.lean
/-- Reformulated functional equation with `f` and `g` interchanged. -/
lemma WeakFEPair.h_feq' (P : WeakFEPair E) (x : ℝ) (hx : 0 < x) :
    P.g (1 / x) = (P.ε⁻¹ * ↑(x ^ P.k)) • P.f x

Proof state:
case h.e'_3.h.e'_5
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
P : WeakFEPair E
x : ℝ
hx : 0 < x
⊢ P.ε⁻¹ * ↑(x ^ P.k) * (P.ε * ↑((1 / x) ^ P.k)) = 1

Tactic:
rw [one_div, inv_rpow hx.le, ofReal_inv]

Result:
case h.e'_3.h.e'_5
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
P : WeakFEPair E
x : ℝ
hx : 0 < x
⊢ P.ε⁻¹ * ↑(x ^ P.k) * (P.ε * (↑(x ^ P.k))⁻¹) = 1

Proof state:
case h.e'_3.h.e'_5
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
P : WeakFEPair E
x : ℝ
hx : 0 < x
⊢ P.ε⁻¹ * ↑(x ^ P.k) * (P.ε * (↑(x ^ P.k))⁻¹) = 1

Tactic:
field_simp [P.hε, (rpow_pos_of_pos hx _).ne']

Result:
no goals

Proof state:
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
P : WeakFEPair E
x : ℝ
hx : 0 < x
⊢ P.g (1 / x) = (P.ε⁻¹ * ↑(x ^ P.k) * (P.ε * ↑((1 / x) ^ P.k))) • P.g (1 / x)

Tactic:
convert (one_smul ℂ (P.g (1 / x))).symm using 2

Result:
case h.e'_3.h.e'_5
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
P : WeakFEPair E
x : ℝ
hx : 0 < x
⊢ P.ε⁻¹ * ↑(x ^ P.k) * (P.ε * ↑((1 / x) ^ P.k)) = 1

Proof state:
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
P : WeakFEPair E
x : ℝ
hx : 0 < x
⊢ P.g (1 / x) = (P.ε⁻¹ * ↑(x ^ P.k)) • P.f x

Tactic:
rw [(div_div_cancel₀ (one_ne_zero' ℝ) ▸ P.h_feq (1 / x) (one_div_pos.mpr hx):), ← mul_smul]

Result:
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
P : WeakFEPair E
x : ℝ
hx : 0 < x
⊢ P.g (1 / x) = (P.ε⁻¹ * ↑(x ^ P.k) * (P.ε * ↑((1 / x) ^ P.k))) • P.g (1 / x)
-- Mathlib/MeasureTheory/Function/AEEqFun.lean
theorem le_sup_right (f g : α →ₘ[μ] β) : g ≤ f ⊔ g

Proof state:
case h
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : TopologicalSpace β
inst✝¹ : SemilatticeSup β
inst✝ : ContinuousSup β
f g : α →ₘ[μ] β
a✝ : α
ha : ↑(f ⊔ g) a✝ = ↑f a✝ ⊔ ↑g a✝
⊢ ↑g a✝ ≤ ↑f a✝ ⊔ ↑g a✝

Tactic:
exact le_sup_right

Result:
no goals

Proof state:
case h
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : TopologicalSpace β
inst✝¹ : SemilatticeSup β
inst✝ : ContinuousSup β
f g : α →ₘ[μ] β
a✝ : α
ha : ↑(f ⊔ g) a✝ = ↑f a✝ ⊔ ↑g a✝
⊢ ↑g a✝ ≤ ↑(f ⊔ g) a✝

Tactic:
rw [ha]

Result:
case h
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : TopologicalSpace β
inst✝¹ : SemilatticeSup β
inst✝ : ContinuousSup β
f g : α →ₘ[μ] β
a✝ : α
ha : ↑(f ⊔ g) a✝ = ↑f a✝ ⊔ ↑g a✝
⊢ ↑g a✝ ≤ ↑f a✝ ⊔ ↑g a✝

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : TopologicalSpace β
inst✝¹ : SemilatticeSup β
inst✝ : ContinuousSup β
f g : α →ₘ[μ] β
⊢ g ≤ f ⊔ g

Tactic:
rw [← coeFn_le]

Result:
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : TopologicalSpace β
inst✝¹ : SemilatticeSup β
inst✝ : ContinuousSup β
f g : α →ₘ[μ] β
⊢ ↑g ≤ᶠ[ae μ] ↑(f ⊔ g)

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : TopologicalSpace β
inst✝¹ : SemilatticeSup β
inst✝ : ContinuousSup β
f g : α →ₘ[μ] β
⊢ ↑g ≤ᶠ[ae μ] ↑(f ⊔ g)

Tactic:
filter_upwards [coeFn_sup f g] with _ ha

Result:
case h
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : TopologicalSpace β
inst✝¹ : SemilatticeSup β
inst✝ : ContinuousSup β
f g : α →ₘ[μ] β
a✝ : α
ha : ↑(f ⊔ g) a✝ = ↑f a✝ ⊔ ↑g a✝
⊢ ↑g a✝ ≤ ↑(f ⊔ g) a✝
-- Mathlib/Data/Rat/Lemmas.lean
theorem mul_self_den (q : ℚ) : (q * q).den = q.den * q.den

Proof state:
q : ℚ
⊢ (q * q).den = q.den * q.den

Tactic:
rw [Rat.mul_den, Int.natAbs_mul, Nat.Coprime.gcd_eq_one, Nat.div_one]

Result:
q : ℚ
⊢ (q.num.natAbs * q.num.natAbs).Coprime (q.den * q.den)

Proof state:
q : ℚ
⊢ (q.num.natAbs * q.num.natAbs).Coprime (q.den * q.den)

Tactic:
exact (q.reduced.mul_right q.reduced).mul (q.reduced.mul_right q.reduced)

Result:
no goals
-- Mathlib/CategoryTheory/Monoidal/Functor.lean
theorem associativity_inv (X Y Z : C) :
    F.obj X ◁ μ F Y Z ≫ μ F X (Y ⊗ Z) ≫ F.map (α_ X Y Z).inv =
      (α_ (F.obj X) (F.obj Y) (F.obj Z)).inv ≫ μ F X Y ▷ F.obj Z ≫ μ F (X ⊗ Y) Z

Proof state:
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
F : C ⥤ D
inst✝ : F.LaxMonoidal
X Y Z : C
⊢ F.obj X ◁ μ F Y Z ≫ μ F X (Y ⊗ Z) ≫ F.map (α_ X Y Z).inv =
    (α_ (F.obj X) (F.obj Y) (F.obj Z)).inv ≫ μ F X Y ▷ F.obj Z ≫ μ F (X ⊗ Y) Z

Tactic:
rw [Iso.eq_inv_comp, ← associativity_assoc, ← F.map_comp, Iso.hom_inv_id,
  F.map_id, comp_id]

Result:
no goals
-- Mathlib/Algebra/Ring/Subring/Basic.lean
theorem coe_iInf {ι : Sort*} {S : ι → Subring R} : (↑(⨅ i, S i) : Set R) = ⋂ i, S i

Proof state:
R : Type u
inst✝ : Ring R
ι : Sort u_1
S : ι → Subring R
⊢ ↑(⨅ i, S i) = ⋂ i, ↑(S i)

Tactic:
simp only [iInf, coe_sInf, Set.biInter_range]

Result:
no goals
-- Mathlib/RingTheory/WittVector/Basic.lean
theorem surjective (f : α → β) (hf : Surjective f) : Surjective (mapFun f : 𝕎 α → 𝕎 β) := fun x =>
  ⟨mk _ fun n => Classical.choose <| hf <| x.coeff n,
    by ext n; simp only [mapFun, coeff_mk, comp_apply, Classical.choose_spec (hf (x.coeff n))]⟩

Proof state:
p : ℕ
α : Type u_3
β : Type u_4
f : α → β
hf : Surjective f
x : 𝕎 β
⊢ mapFun f (mk p fun n => Classical.choose ⋯) = x

Tactic:
ext n

Result:
case h
p : ℕ
α : Type u_3
β : Type u_4
f : α → β
hf : Surjective f
x : 𝕎 β
n : ℕ
⊢ (mapFun f (mk p fun n => Classical.choose ⋯)).coeff n = x.coeff n

Proof state:
case h
p : ℕ
α : Type u_3
β : Type u_4
f : α → β
hf : Surjective f
x : 𝕎 β
n : ℕ
⊢ (mapFun f (mk p fun n => Classical.choose ⋯)).coeff n = x.coeff n

Tactic:
simp only [mapFun, coeff_mk, comp_apply, Classical.choose_spec (hf (x.coeff n))]

Result:
no goals
-- Mathlib/Order/Lattice.lean
theorem update_sup [∀ i, SemilatticeSup (π i)] (f : ∀ i, π i) (i : ι) (a b : π i) :
    update f i (a ⊔ b) = update f i a ⊔ update f i b :=
  funext fun j => by obtain rfl | hji := eq_or_ne j i <;> simp [update_of_ne, *]

Proof state:
ι : Type u_1
π : ι → Type u_2
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → SemilatticeSup (π i)
f : (i : ι) → π i
i : ι
a b : π i
j : ι
⊢ update f i (a ⊔ b) j = (update f i a ⊔ update f i b) j

Tactic:
obtain rfl | hji := eq_or_ne j i <;> simp [update_of_ne, *]

Result:
no goals
-- Mathlib/AlgebraicGeometry/StructureSheaf.lean
theorem IsFraction.eq_mk' {U : Opens (PrimeSpectrum.Top R)} {f : ∀ x : U, Localizations R x}
    (hf : IsFraction f) :
    ∃ r s : R,
      ∀ x : U,
        ∃ hs : s ∉ x.1.asIdeal,
          f x =
            IsLocalization.mk' (Localization.AtPrime _) r
              (⟨s, hs⟩ : (x : PrimeSpectrum.Top R).asIdeal.primeCompl)

Proof state:
case intro.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
f : (x : ↥U) → Localizations R ↑x
r s : R
h : ∀ (x : ↥U), s ∉ (↑x).asIdeal ∧ f x * (algebraMap R (Localizations R ↑x)) s = (algebraMap R (Localizations R ↑x)) r
⊢ ∃ r s, ∀ (x : ↥U), ∃ (hs : s ∉ (↑x).asIdeal), f x = IsLocalization.mk' (Localization.AtPrime (↑x).asIdeal) r ⟨s, hs⟩

Tactic:
refine ⟨r, s, fun x => ⟨(h x).1, (IsLocalization.mk'_eq_iff_eq_mul.mpr ?_).symm⟩⟩

Result:
case intro.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
f : (x : ↥U) → Localizations R ↑x
r s : R
h : ∀ (x : ↥U), s ∉ (↑x).asIdeal ∧ f x * (algebraMap R (Localizations R ↑x)) s = (algebraMap R (Localizations R ↑x)) r
x : ↥U
⊢ (algebraMap R (Localizations R ↑x)) r = f x * (algebraMap R (Localizations R ↑x)) ↑⟨s, ⋯⟩

Proof state:
case intro.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
f : (x : ↥U) → Localizations R ↑x
r s : R
h : ∀ (x : ↥U), s ∉ (↑x).asIdeal ∧ f x * (algebraMap R (Localizations R ↑x)) s = (algebraMap R (Localizations R ↑x)) r
x : ↥U
⊢ (algebraMap R (Localizations R ↑x)) r = f x * (algebraMap R (Localizations R ↑x)) ↑⟨s, ⋯⟩

Tactic:
exact (h x).2.symm

Result:
no goals

Proof state:
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
f : (x : ↥U) → Localizations R ↑x
hf : IsFraction f
⊢ ∃ r s, ∀ (x : ↥U), ∃ (hs : s ∉ (↑x).asIdeal), f x = IsLocalization.mk' (Localization.AtPrime (↑x).asIdeal) r ⟨s, hs⟩

Tactic:
rcases hf with ⟨r, s, h⟩

Result:
case intro.intro
R : Type u
inst✝ : CommRing R
U : Opens ↑(PrimeSpectrum.Top R)
f : (x : ↥U) → Localizations R ↑x
r s : R
h : ∀ (x : ↥U), s ∉ (↑x).asIdeal ∧ f x * (algebraMap R (Localizations R ↑x)) s = (algebraMap R (Localizations R ↑x)) r
⊢ ∃ r s, ∀ (x : ↥U), ∃ (hs : s ∉ (↑x).asIdeal), f x = IsLocalization.mk' (Localization.AtPrime (↑x).asIdeal) r ⟨s, hs⟩
-- Mathlib/Order/SemiconjSup.lean
theorem semiconj_of_isLUB [PartialOrder α] [Group G] (f₁ f₂ : G →* α ≃o α) {h : α → α}
    (H : ∀ x, IsLUB (range fun g' => (f₁ g')⁻¹ (f₂ g' x)) (h x)) (g : G) :
    Function.Semiconj h (f₂ g) (f₁ g)

Proof state:
α : Type u_1
G : Type u_4
inst✝¹ : PartialOrder α
inst✝ : Group G
f₁ f₂ : G →* α ≃o α
h : α → α
H : ∀ (x : α), IsLUB (range fun g' => (f₁ g')⁻¹ ((f₂ g') x)) (h x)
g : G
y : α
this : IsLUB (range ((⇑(f₁ g) ∘ fun g' => (f₁ g')⁻¹ ((f₂ g') y)) ∘ ⇑(Equiv.mulRight g))) ((f₁ g) (h y))
⊢ IsLUB (range fun g' => (f₁ g')⁻¹ ((f₂ g') ((f₂ g) y))) ((f₁ g) (h y))

Tactic:
simpa [comp_def] using this

Result:
no goals

Proof state:
α : Type u_1
G : Type u_4
inst✝¹ : PartialOrder α
inst✝ : Group G
f₁ f₂ : G →* α ≃o α
h : α → α
H : ∀ (x : α), IsLUB (range fun g' => (f₁ g')⁻¹ ((f₂ g') x)) (h x)
g : G
y : α
this : IsLUB (⇑(f₁ g) '' range fun g' => (f₁ g')⁻¹ ((f₂ g') y)) ((f₁ g) (h y))
⊢ IsLUB (range fun g' => (f₁ g')⁻¹ ((f₂ g') ((f₂ g) y))) ((f₁ g) (h y))

Tactic:
rw [← range_comp, ← (Equiv.mulRight g).surjective.range_comp _] at this

Result:
α : Type u_1
G : Type u_4
inst✝¹ : PartialOrder α
inst✝ : Group G
f₁ f₂ : G →* α ≃o α
h : α → α
H : ∀ (x : α), IsLUB (range fun g' => (f₁ g')⁻¹ ((f₂ g') x)) (h x)
g : G
y : α
this : IsLUB (range ((⇑(f₁ g) ∘ fun g' => (f₁ g')⁻¹ ((f₂ g') y)) ∘ ⇑(Equiv.mulRight g))) ((f₁ g) (h y))
⊢ IsLUB (range fun g' => (f₁ g')⁻¹ ((f₂ g') ((f₂ g) y))) ((f₁ g) (h y))

Proof state:
α : Type u_1
G : Type u_4
inst✝¹ : PartialOrder α
inst✝ : Group G
f₁ f₂ : G →* α ≃o α
h : α → α
H : ∀ (x : α), IsLUB (range fun g' => (f₁ g')⁻¹ ((f₂ g') x)) (h x)
g : G
y : α
⊢ IsLUB (range fun g' => (f₁ g')⁻¹ ((f₂ g') ((f₂ g) y))) ((f₁ g) (h y))

Tactic:
have := (f₁ g).leftOrdContinuous (H y)

Result:
α : Type u_1
G : Type u_4
inst✝¹ : PartialOrder α
inst✝ : Group G
f₁ f₂ : G →* α ≃o α
h : α → α
H : ∀ (x : α), IsLUB (range fun g' => (f₁ g')⁻¹ ((f₂ g') x)) (h x)
g : G
y : α
this : IsLUB (⇑(f₁ g) '' range fun g' => (f₁ g')⁻¹ ((f₂ g') y)) ((f₁ g) (h y))
⊢ IsLUB (range fun g' => (f₁ g')⁻¹ ((f₂ g') ((f₂ g) y))) ((f₁ g) (h y))

Proof state:
α : Type u_1
G : Type u_4
inst✝¹ : PartialOrder α
inst✝ : Group G
f₁ f₂ : G →* α ≃o α
h : α → α
H : ∀ (x : α), IsLUB (range fun g' => (f₁ g')⁻¹ ((f₂ g') x)) (h x)
g : G
⊢ Semiconj h ⇑(f₂ g) ⇑(f₁ g)

Tactic:
refine fun y => (H _).unique ?_

Result:
α : Type u_1
G : Type u_4
inst✝¹ : PartialOrder α
inst✝ : Group G
f₁ f₂ : G →* α ≃o α
h : α → α
H : ∀ (x : α), IsLUB (range fun g' => (f₁ g')⁻¹ ((f₂ g') x)) (h x)
g : G
y : α
⊢ IsLUB (range fun g' => (f₁ g')⁻¹ ((f₂ g') ((f₂ g) y))) ((f₁ g) (h y))
-- Mathlib/Analysis/Convex/Intrinsic.lean
theorem intrinsicFrontier_union_intrinsicInterior (s : Set P) :
    intrinsicFrontier 𝕜 s ∪ intrinsicInterior 𝕜 s = intrinsicClosure 𝕜 s

Proof state:
𝕜 : Type u_1
V : Type u_2
P : Type u_5
inst✝⁴ : Ring 𝕜
inst✝³ : AddCommGroup V
inst✝² : Module 𝕜 V
inst✝¹ : TopologicalSpace P
inst✝ : AddTorsor V P
s : Set P
⊢ intrinsicFrontier 𝕜 s ∪ intrinsicInterior 𝕜 s = intrinsicClosure 𝕜 s

Tactic:
rw [union_comm, intrinsicInterior_union_intrinsicFrontier]

Result:
no goals
-- Mathlib/Analysis/Convex/StrictConvexSpace.lean
theorem abs_lt_norm_sub_of_not_sameRay (h : ¬SameRay ℝ x y) : |‖x‖ - ‖y‖| < ‖x - y‖

Proof state:
E : Type u_2
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : StrictConvexSpace ℝ E
x y : E
h : ¬SameRay ℝ x y
⊢ ‖y‖ - ‖x‖ < ‖x - y‖

Tactic:
rw [norm_sub_rev]

Result:
E : Type u_2
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : StrictConvexSpace ℝ E
x y : E
h : ¬SameRay ℝ x y
⊢ ‖y‖ - ‖x‖ < ‖y - x‖

Proof state:
E : Type u_2
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : StrictConvexSpace ℝ E
x y : E
h : ¬SameRay ℝ x y
⊢ ‖y‖ - ‖x‖ < ‖y - x‖

Tactic:
exact lt_norm_sub_of_not_sameRay (mt SameRay.symm h)

Result:
no goals

Proof state:
E : Type u_2
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : StrictConvexSpace ℝ E
x y : E
h : ¬SameRay ℝ x y
⊢ |‖x‖ - ‖y‖| < ‖x - y‖

Tactic:
refine abs_sub_lt_iff.2 ⟨lt_norm_sub_of_not_sameRay h, ?_⟩

Result:
E : Type u_2
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : StrictConvexSpace ℝ E
x y : E
h : ¬SameRay ℝ x y
⊢ ‖y‖ - ‖x‖ < ‖x - y‖
-- Mathlib/Data/Set/Prod.lean
theorem preimage_swap_prod (s : Set α) (t : Set β) : Prod.swap ⁻¹' s ×ˢ t = t ×ˢ s

Proof state:
α : Type u_1
β : Type u_2
s : Set α
t : Set β
⊢ Prod.swap ⁻¹' s ×ˢ t = t ×ˢ s

Tactic:
ext ⟨x, y⟩

Result:
case h.mk
α : Type u_1
β : Type u_2
s : Set α
t : Set β
x : β
y : α
⊢ (x, y) ∈ Prod.swap ⁻¹' s ×ˢ t ↔ (x, y) ∈ t ×ˢ s

Proof state:
case h.mk
α : Type u_1
β : Type u_2
s : Set α
t : Set β
x : β
y : α
⊢ (x, y) ∈ Prod.swap ⁻¹' s ×ˢ t ↔ (x, y) ∈ t ×ˢ s

Tactic:
simp [and_comm]

Result:
no goals
-- Mathlib/RingTheory/LaurentSeries.lean
theorem hasseDeriv_single_add (k : ℕ) (n : ℤ) (x : V) :
    hasseDeriv R k (single (n + k) x) = single n ((Ring.choose (n + k) k) • x)

Proof state:
case neg
R : Type u_1
inst✝² : Semiring R
V : Type u_2
inst✝¹ : AddCommGroup V
inst✝ : Module R V
k : ℕ
n : ℤ
x : V
m : ℤ
h : ¬m = n
⊢ Ring.choose (m + ↑k) k • ((single (n + ↑k)) x).coeff (m + ↑k) = ((single n) (Ring.choose (n + ↑k) k • x)).coeff m

Tactic:
simp [h, show m + k ≠ n + k by omega]

Result:
no goals

Proof state:
case pos
R : Type u_1
inst✝² : Semiring R
V : Type u_2
inst✝¹ : AddCommGroup V
inst✝ : Module R V
k : ℕ
n : ℤ
x : V
m : ℤ
h : m = n
⊢ Ring.choose (m + ↑k) k • ((single (n + ↑k)) x).coeff (m + ↑k) = ((single n) (Ring.choose (n + ↑k) k • x)).coeff m

Tactic:
simp [h]

Result:
no goals

Proof state:
R : Type u_1
inst✝² : Semiring R
V : Type u_2
inst✝¹ : AddCommGroup V
inst✝ : Module R V
k : ℕ
n : ℤ
x : V
⊢ (hasseDeriv R k) ((single (n + ↑k)) x) = (single n) (Ring.choose (n + ↑k) k • x)

Tactic:
ext m

Result:
case coeff.h
R : Type u_1
inst✝² : Semiring R
V : Type u_2
inst✝¹ : AddCommGroup V
inst✝ : Module R V
k : ℕ
n : ℤ
x : V
m : ℤ
⊢ ((hasseDeriv R k) ((single (n + ↑k)) x)).coeff m = ((single n) (Ring.choose (n + ↑k) k • x)).coeff m

Proof state:
case coeff.h
R : Type u_1
inst✝² : Semiring R
V : Type u_2
inst✝¹ : AddCommGroup V
inst✝ : Module R V
k : ℕ
n : ℤ
x : V
m : ℤ
⊢ Ring.choose (m + ↑k) k • ((single (n + ↑k)) x).coeff (m + ↑k) = ((single n) (Ring.choose (n + ↑k) k • x)).coeff m

Tactic:
by_cases h : m = n

Result:
case pos
R : Type u_1
inst✝² : Semiring R
V : Type u_2
inst✝¹ : AddCommGroup V
inst✝ : Module R V
k : ℕ
n : ℤ
x : V
m : ℤ
h : m = n
⊢ Ring.choose (m + ↑k) k • ((single (n + ↑k)) x).coeff (m + ↑k) = ((single n) (Ring.choose (n + ↑k) k • x)).coeff m

case neg
R : Type u_1
inst✝² : Semiring R
V : Type u_2
inst✝¹ : AddCommGroup V
inst✝ : Module R V
k : ℕ
n : ℤ
x : V
m : ℤ
h : ¬m = n
⊢ Ring.choose (m + ↑k) k • ((single (n + ↑k)) x).coeff (m + ↑k) = ((single n) (Ring.choose (n + ↑k) k • x)).coeff m

Proof state:
case coeff.h
R : Type u_1
inst✝² : Semiring R
V : Type u_2
inst✝¹ : AddCommGroup V
inst✝ : Module R V
k : ℕ
n : ℤ
x : V
m : ℤ
⊢ ((hasseDeriv R k) ((single (n + ↑k)) x)).coeff m = ((single n) (Ring.choose (n + ↑k) k • x)).coeff m

Tactic:
dsimp only [hasseDeriv_coeff]

Result:
case coeff.h
R : Type u_1
inst✝² : Semiring R
V : Type u_2
inst✝¹ : AddCommGroup V
inst✝ : Module R V
k : ℕ
n : ℤ
x : V
m : ℤ
⊢ Ring.choose (m + ↑k) k • ((single (n + ↑k)) x).coeff (m + ↑k) = ((single n) (Ring.choose (n + ↑k) k • x)).coeff m

Proof state:
R : Type u_1
inst✝² : Semiring R
V : Type u_2
inst✝¹ : AddCommGroup V
inst✝ : Module R V
k : ℕ
n : ℤ
x : V
m : ℤ
h : ¬m = n
⊢ m + ↑k ≠ n + ↑k

Tactic:
omega

Result:
no goals
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem mk_iUnion_le_lift {α : Type u} {ι : Type v} (f : ι → Set α) :
    lift.{v} #(⋃ i, f i) ≤ lift.{u} #ι * ⨆ i, lift.{v} #(f i)

Proof state:
α : Type u
ι : Type v
f : ι → Set α
⊢ lift.{v, u} #↑(⋃ i, f i) ≤ lift.{u, v} #ι * ⨆ i, lift.{v, u} #↑(f i)

Tactic:
refine mk_iUnion_le_sum_mk_lift.trans <| Eq.trans_le ?_ (sum_le_iSup_lift _)

Result:
α : Type u
ι : Type v
f : ι → Set α
⊢ (sum fun i => #↑(f i)) = sum fun i => lift.{v, u} #↑(f i)

Proof state:
α : Type u
ι : Type v
f : ι → Set α
⊢ (sum fun i => #↑(f i)) = sum fun i => lift.{v, u} #↑(f i)

Tactic:
rw [← lift_sum, lift_id'.{_,u}]

Result:
no goals
-- Mathlib/Data/ENNReal/Inv.lean
theorem exists_mem_Ico_zpow {x y : ℝ≥0∞} (hx : x ≠ 0) (h'x : x ≠ ∞) (hy : 1 < y) (h'y : y ≠ ⊤) :
    ∃ n : ℤ, x ∈ Ico (y ^ n) (y ^ (n + 1))

Proof state:
x : ℝ≥0
hx : ↑x ≠ 0
y : ℝ≥0
hy : 1 < ↑y
⊢ y ≠ 0

Tactic:
simpa only [Ne, coe_eq_zero] using (zero_lt_one.trans hy).ne'

Result:
no goals

Proof state:
case intro.intro.intro.intro.refine_1
x : ℝ≥0
hx : ↑x ≠ 0
y : ℝ≥0
hy : 1 < ↑y
A : y ≠ 0
n : ℤ
hn : y ^ n ≤ x
h'n : x < y ^ (n + 1)
⊢ ↑y ^ n ≤ ↑x

Tactic:
rwa [← ENNReal.coe_zpow A, ENNReal.coe_le_coe]

Result:
no goals

Proof state:
x y : ℝ≥0∞
hx : x ≠ 0
h'x : x ≠ ⊤
hy : 1 < y
h'y : y ≠ ⊤
⊢ ∃ n, x ∈ Ico (y ^ n) (y ^ (n + 1))

Tactic:
lift x to ℝ≥0 using h'x

Result:
case intro
y : ℝ≥0∞
hy : 1 < y
h'y : y ≠ ⊤
x : ℝ≥0
hx : ↑x ≠ 0
⊢ ∃ n, ↑x ∈ Ico (y ^ n) (y ^ (n + 1))

Proof state:
x : ℝ≥0
hx : ↑x ≠ 0
y : ℝ≥0
hy : 1 < ↑y
A : y ≠ 0
⊢ ∃ n, y ^ n ≤ x ∧ x < y ^ (n + 1)

Tactic:
refine NNReal.exists_mem_Ico_zpow ?_ (one_lt_coe_iff.1 hy)

Result:
x : ℝ≥0
hx : ↑x ≠ 0
y : ℝ≥0
hy : 1 < ↑y
A : y ≠ 0
⊢ x ≠ 0

Proof state:
case intro.intro
x : ℝ≥0
hx : ↑x ≠ 0
y : ℝ≥0
hy : 1 < ↑y
⊢ ∃ n, ↑x ∈ Ico (↑y ^ n) (↑y ^ (n + 1))

Tactic:
have A : y ≠ 0 := by simpa only [Ne, coe_eq_zero] using (zero_lt_one.trans hy).ne'

Result:
case intro.intro
x : ℝ≥0
hx : ↑x ≠ 0
y : ℝ≥0
hy : 1 < ↑y
A : y ≠ 0
⊢ ∃ n, ↑x ∈ Ico (↑y ^ n) (↑y ^ (n + 1))

Proof state:
case intro.intro.intro.intro
x : ℝ≥0
hx : ↑x ≠ 0
y : ℝ≥0
hy : 1 < ↑y
A : y ≠ 0
n : ℤ
hn : y ^ n ≤ x
h'n : x < y ^ (n + 1)
⊢ ∃ n, ↑x ∈ Ico (↑y ^ n) (↑y ^ (n + 1))

Tactic:
refine ⟨n, ?_, ?_⟩

Result:
case intro.intro.intro.intro.refine_1
x : ℝ≥0
hx : ↑x ≠ 0
y : ℝ≥0
hy : 1 < ↑y
A : y ≠ 0
n : ℤ
hn : y ^ n ≤ x
h'n : x < y ^ (n + 1)
⊢ ↑y ^ n ≤ ↑x

case intro.intro.intro.intro.refine_2
x : ℝ≥0
hx : ↑x ≠ 0
y : ℝ≥0
hy : 1 < ↑y
A : y ≠ 0
n : ℤ
hn : y ^ n ≤ x
h'n : x < y ^ (n + 1)
⊢ ↑x < ↑y ^ (n + 1)

Proof state:
x : ℝ≥0
hx : ↑x ≠ 0
y : ℝ≥0
hy : 1 < ↑y
A : y ≠ 0
⊢ x ≠ 0

Tactic:
simpa only [Ne, coe_eq_zero] using hx

Result:
no goals

Proof state:
case intro.intro
x : ℝ≥0
hx : ↑x ≠ 0
y : ℝ≥0
hy : 1 < ↑y
A : y ≠ 0
⊢ ∃ n, ↑x ∈ Ico (↑y ^ n) (↑y ^ (n + 1))

Tactic:
obtain ⟨n, hn, h'n⟩ : ∃ n : ℤ, y ^ n ≤ x ∧ x < y ^ (n + 1) := by
  refine NNReal.exists_mem_Ico_zpow ?_ (one_lt_coe_iff.1 hy)
  simpa only [Ne, coe_eq_zero] using hx

Result:
case intro.intro.intro.intro
x : ℝ≥0
hx : ↑x ≠ 0
y : ℝ≥0
hy : 1 < ↑y
A : y ≠ 0
n : ℤ
hn : y ^ n ≤ x
h'n : x < y ^ (n + 1)
⊢ ∃ n, ↑x ∈ Ico (↑y ^ n) (↑y ^ (n + 1))

Proof state:
case intro
y : ℝ≥0∞
hy : 1 < y
h'y : y ≠ ⊤
x : ℝ≥0
hx : ↑x ≠ 0
⊢ ∃ n, ↑x ∈ Ico (y ^ n) (y ^ (n + 1))

Tactic:
lift y to ℝ≥0 using h'y

Result:
case intro.intro
x : ℝ≥0
hx : ↑x ≠ 0
y : ℝ≥0
hy : 1 < ↑y
⊢ ∃ n, ↑x ∈ Ico (↑y ^ n) (↑y ^ (n + 1))

Proof state:
case intro.intro.intro.intro.refine_2
x : ℝ≥0
hx : ↑x ≠ 0
y : ℝ≥0
hy : 1 < ↑y
A : y ≠ 0
n : ℤ
hn : y ^ n ≤ x
h'n : x < y ^ (n + 1)
⊢ ↑x < ↑y ^ (n + 1)

Tactic:
rwa [← ENNReal.coe_zpow A, ENNReal.coe_lt_coe]

Result:
no goals
-- Mathlib/Algebra/Category/ModuleCat/Adjunctions.lean
@[simp]
lemma free_η_freeMk (x : PUnit) : η (free R) (freeMk x) = 1

Proof state:
R : Type u
inst✝ : CommRing R
x : PUnit.{u + 1}
⊢ (ConcreteCategory.hom (η (free R))) (freeMk x) = 1

Tactic:
apply FreeMonoidal.εIso_inv_freeMk

Result:
no goals