harrywsanders/mathlib_extracted huggingface dataset:
-- Mathlib/NumberTheory/Rayleigh.lean
theorem no_anticollision (hrs : r.IsConjExponent s) :
    ¬∃ j k m : ℤ, k < j / r ∧ (j + 1) / r ≤ k + 1 ∧ m ≤ j / s ∧ (j + 1) / s < m + 1

Proof state:
r s : ℝ
hrs : r.IsConjExponent s
j k m : ℤ
h₁₁ : ↑k < ↑j / r
h₁₂ : (↑j + 1) / r ≤ ↑k + 1
h₂₁ : ↑m ≤ ↑j / s
h₂₂ : (↑j + 1) / s < ↑m + 1
h₃ : ↑k + ↑m < ↑j / r + ↑j / s
⊢ False

Tactic:
have h₄ := add_lt_add_of_le_of_lt h₁₂ h₂₂

Result:
r s : ℝ
hrs : r.IsConjExponent s
j k m : ℤ
h₁₁ : ↑k < ↑j / r
h₁₂ : (↑j + 1) / r ≤ ↑k + 1
h₂₁ : ↑m ≤ ↑j / s
h₂₂ : (↑j + 1) / s < ↑m + 1
h₃ : ↑k + ↑m < ↑j / r + ↑j / s
h₄ : (↑j + 1) / r + (↑j + 1) / s < ↑k + 1 + (↑m + 1)
⊢ False

Proof state:
r s : ℝ
hrs : r.IsConjExponent s
j k m : ℤ
h₁₁ : ↑k < ↑j / r
h₁₂ : (↑j + 1) / r ≤ ↑k + 1
h₂₁ : ↑m ≤ ↑j / s
h₂₂ : (↑j + 1) / s < ↑m + 1
h₃ : ↑k + ↑m < ↑j
h₄ : ↑j + 1 < ↑k + 1 + (↑m + 1)
⊢ False

Tactic:
rw [← Int.cast_one, ← add_assoc, add_lt_add_iff_right, add_right_comm] at h₄

Result:
r s : ℝ
hrs : r.IsConjExponent s
j k m : ℤ
h₁₁ : ↑k < ↑j / r
h₁₂ : (↑j + 1) / r ≤ ↑k + 1
h₂₁ : ↑m ≤ ↑j / s
h₂₂ : (↑j + 1) / s < ↑m + 1
h₃ : ↑k + ↑m < ↑j
h₄ : ↑j < ↑k + ↑m + ↑1
⊢ False

Proof state:
r s : ℝ
hrs : r.IsConjExponent s
j k m : ℤ
h₁₁ : ↑k < ↑j / r
h₁₂ : (↑j + 1) / r ≤ ↑k + 1
h₂₁ : ↑m ≤ ↑j / s
h₂₂ : (↑j + 1) / s < ↑m + 1
⊢ False

Tactic:
have h₃ := add_lt_add_of_lt_of_le h₁₁ h₂₁

Result:
r s : ℝ
hrs : r.IsConjExponent s
j k m : ℤ
h₁₁ : ↑k < ↑j / r
h₁₂ : (↑j + 1) / r ≤ ↑k + 1
h₂₁ : ↑m ≤ ↑j / s
h₂₂ : (↑j + 1) / s < ↑m + 1
h₃ : ↑k + ↑m < ↑j / r + ↑j / s
⊢ False

Proof state:
r s : ℝ
hrs : r.IsConjExponent s
j k m : ℤ
h₁₁ : ↑k < ↑j / r
h₁₂ : (↑j + 1) / r ≤ ↑k + 1
h₂₁ : ↑m ≤ ↑j / s
h₂₂ : (↑j + 1) / s < ↑m + 1
h₃ : k + m < j
h₄ : j ≤ k + m
⊢ False

Tactic:
exact h₄.not_lt h₃

Result:
no goals

Proof state:
r s : ℝ
hrs : r.IsConjExponent s
j k m : ℤ
h₁₁ : ↑k < ↑j / r
h₁₂ : (↑j + 1) / r ≤ ↑k + 1
h₂₁ : ↑m ≤ ↑j / s
h₂₂ : (↑j + 1) / s < ↑m + 1
h₃ : ↑k + ↑m < ↑j
h₄ : ↑j < ↑k + ↑m + ↑1
⊢ False

Tactic:
simp_rw [← Int.cast_add, Int.cast_lt, Int.lt_add_one_iff] at h₃ h₄

Result:
r s : ℝ
hrs : r.IsConjExponent s
j k m : ℤ
h₁₁ : ↑k < ↑j / r
h₁₂ : (↑j + 1) / r ≤ ↑k + 1
h₂₁ : ↑m ≤ ↑j / s
h₂₂ : (↑j + 1) / s < ↑m + 1
h₃ : k + m < j
h₄ : j ≤ k + m
⊢ False

Proof state:
r s : ℝ
hrs : r.IsConjExponent s
j k m : ℤ
h₁₁ : ↑k < ↑j / r
h₁₂ : (↑j + 1) / r ≤ ↑k + 1
h₂₁ : ↑m ≤ ↑j / s
h₂₂ : (↑j + 1) / s < ↑m + 1
h₃ : ↑k + ↑m < ↑j / r + ↑j / s
h₄ : (↑j + 1) / r + (↑j + 1) / s < ↑k + 1 + (↑m + 1)
⊢ False

Tactic:
simp_rw [div_eq_inv_mul, ← right_distrib, hrs.inv_add_inv_conj, one_mul] at h₃ h₄

Result:
r s : ℝ
hrs : r.IsConjExponent s
j k m : ℤ
h₁₁ : ↑k < ↑j / r
h₁₂ : (↑j + 1) / r ≤ ↑k + 1
h₂₁ : ↑m ≤ ↑j / s
h₂₂ : (↑j + 1) / s < ↑m + 1
h₃ : ↑k + ↑m < ↑j
h₄ : ↑j + 1 < ↑k + 1 + (↑m + 1)
⊢ False

Proof state:
r s : ℝ
hrs : r.IsConjExponent s
⊢ ¬∃ j k m, ↑k < ↑j / r ∧ (↑j + 1) / r ≤ ↑k + 1 ∧ ↑m ≤ ↑j / s ∧ (↑j + 1) / s < ↑m + 1

Tactic:
intro ⟨j, k, m, h₁₁, h₁₂, h₂₁, h₂₂⟩

Result:
r s : ℝ
hrs : r.IsConjExponent s
j k m : ℤ
h₁₁ : ↑k < ↑j / r
h₁₂ : (↑j + 1) / r ≤ ↑k + 1
h₂₁ : ↑m ≤ ↑j / s
h₂₂ : (↑j + 1) / s < ↑m + 1
⊢ False
-- Mathlib/Data/Fin/Tuple/Basic.lean
theorem contractNth_apply_of_gt (j : Fin (n + 1)) (op : α → α → α) (g : Fin (n + 1) → α) (k : Fin n)
    (h : (j : ℕ) < k) : contractNth j op g k = g k.succ

Proof state:
n : ℕ
α : Sort u_1
j : Fin (n + 1)
op : α → α → α
g : Fin (n + 1) → α
k : Fin n
h : ↑j < ↑k
⊢ j.contractNth op g k = g k.succ

Tactic:
rw [contractNth, if_neg (not_lt_of_gt h), if_neg (Ne.symm <| ne_of_lt h)]

Result:
no goals
-- Mathlib/RingTheory/HahnSeries/Basic.lean
theorem leadingCoeff_eq {x : HahnSeries Γ R} : x.leadingCoeff = x.coeff x.order

Proof state:
Γ : Type u_1
R : Type u_3
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
inst✝ : Zero Γ
x : HahnSeries Γ R
⊢ x.leadingCoeff = x.coeff x.order

Tactic:
by_cases h : x = 0

Result:
case pos
Γ : Type u_1
R : Type u_3
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
inst✝ : Zero Γ
x : HahnSeries Γ R
h : x = 0
⊢ x.leadingCoeff = x.coeff x.order

case neg
Γ : Type u_1
R : Type u_3
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
inst✝ : Zero Γ
x : HahnSeries Γ R
h : ¬x = 0
⊢ x.leadingCoeff = x.coeff x.order

Proof state:
case neg
Γ : Type u_1
R : Type u_3
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
inst✝ : Zero Γ
x : HahnSeries Γ R
h : ¬x = 0
⊢ x.leadingCoeff = x.coeff x.order

Tactic:
rw [leadingCoeff_of_ne h, order_of_ne h]

Result:
no goals

Proof state:
case pos
Γ : Type u_1
R : Type u_3
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
inst✝ : Zero Γ
x : HahnSeries Γ R
h : x = 0
⊢ x.leadingCoeff = x.coeff x.order

Tactic:
rw [h, leadingCoeff_zero, coeff_zero]

Result:
no goals
-- Mathlib/Probability/Kernel/Composition/MeasureCompProd.lean
lemma dirac_compProd_apply [MeasurableSingletonClass α] {a : α} [IsSFiniteKernel κ]
    {s : Set (α × β)} (hs : MeasurableSet s) :
    (Measure.dirac a ⊗ₘ κ) s = κ a (Prod.mk a ⁻¹' s)

Proof state:
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : Kernel α β
inst✝¹ : MeasurableSingletonClass α
a : α
inst✝ : IsSFiniteKernel κ
s : Set (α × β)
hs : MeasurableSet s
⊢ (dirac a ⊗ₘ κ) s = (κ a) (Prod.mk a ⁻¹' s)

Tactic:
rw [compProd_apply hs, lintegral_dirac]

Result:
no goals
-- Mathlib/.lake/packages/lean4/src/lean/Init/Data/Ord.lean
theorem then_eq_gt {o₁ o₂ : Ordering} : o₁.then o₂ = gt ↔ o₁ = gt ∨ o₁ = eq ∧ o₂ = gt

Proof state:
o₁ o₂ : Ordering
⊢ o₁.then o₂ = gt ↔ o₁ = gt ∨ o₁ = eq ∧ o₂ = gt

Tactic:
cases o₁ <;> cases o₂ <;> decide

Result:
no goals
-- Mathlib/NumberTheory/Zsqrtd/GaussianInt.lean
theorem toComplex_star (x : ℤ[i]) : ((star x : ℤ[i]) : ℂ) = conj (x : ℂ)

Proof state:
x : ℤ[i]
⊢ toComplex (star x) = (starRingEnd ℂ) (toComplex x)

Tactic:
rw [toComplex_def₂, toComplex_def₂]

Result:
x : ℤ[i]
⊢ { re := ↑(star x).re, im := ↑(star x).im } = (starRingEnd ℂ) { re := ↑x.re, im := ↑x.im }

Proof state:
x : ℤ[i]
⊢ { re := ↑(star x).re, im := ↑(star x).im } = (starRingEnd ℂ) { re := ↑x.re, im := ↑x.im }

Tactic:
exact congr_arg₂ _ rfl (Int.cast_neg _)

Result:
no goals
-- Mathlib/Topology/Algebra/Valued/ValuationTopology.lean
theorem integer_isOpen : IsOpen (_i.v.integer : Set R)

Proof state:
R : Type u
inst✝¹ : Ring R
Γ₀ : Type v
inst✝ : LinearOrderedCommGroupWithZero Γ₀
_i : Valued R Γ₀
⊢ ∀ x ∈ ↑v.integer, ↑v.integer ∈ 𝓝 x

Tactic:
intro x hx

Result:
R : Type u
inst✝¹ : Ring R
Γ₀ : Type v
inst✝ : LinearOrderedCommGroupWithZero Γ₀
_i : Valued R Γ₀
x : R
hx : x ∈ ↑v.integer
⊢ ↑v.integer ∈ 𝓝 x

Proof state:
R : Type u
inst✝¹ : Ring R
Γ₀ : Type v
inst✝ : LinearOrderedCommGroupWithZero Γ₀
_i : Valued R Γ₀
x : R
hx : x ∈ ↑v.integer
⊢ ∃ γ, {y | v (y - x) < ↑γ} ⊆ ↑v.integer

Tactic:
exact ⟨1,
  fun y hy => (sub_add_cancel y x).symm ▸ le_trans (map_add _ _ _) (max_le (le_of_lt hy) hx)⟩

Result:
no goals

Proof state:
R : Type u
inst✝¹ : Ring R
Γ₀ : Type v
inst✝ : LinearOrderedCommGroupWithZero Γ₀
_i : Valued R Γ₀
x : R
hx : x ∈ ↑v.integer
⊢ ↑v.integer ∈ 𝓝 x

Tactic:
rw [mem_nhds]

Result:
R : Type u
inst✝¹ : Ring R
Γ₀ : Type v
inst✝ : LinearOrderedCommGroupWithZero Γ₀
_i : Valued R Γ₀
x : R
hx : x ∈ ↑v.integer
⊢ ∃ γ, {y | v (y - x) < ↑γ} ⊆ ↑v.integer

Proof state:
R : Type u
inst✝¹ : Ring R
Γ₀ : Type v
inst✝ : LinearOrderedCommGroupWithZero Γ₀
_i : Valued R Γ₀
⊢ IsOpen ↑v.integer

Tactic:
rw [isOpen_iff_mem_nhds]

Result:
R : Type u
inst✝¹ : Ring R
Γ₀ : Type v
inst✝ : LinearOrderedCommGroupWithZero Γ₀
_i : Valued R Γ₀
⊢ ∀ x ∈ ↑v.integer, ↑v.integer ∈ 𝓝 x
-- Mathlib/Tactic/Group.lean
theorem zpow_trick_one' {G : Type*} [Group G] (a b : G) (n : ℤ) :
    a * b ^ n * b = a * b ^ (n + 1)

Proof state:
G : Type u_1
inst✝ : Group G
a b : G
n : ℤ
⊢ a * b ^ n * b = a * b ^ (n + 1)

Tactic:
rw [mul_assoc, mul_zpow_self]

Result:
no goals
-- Mathlib/AlgebraicGeometry/EllipticCurve/Projective.lean
@[simp]
lemma map_addY (P Q : Fin 3 → R) :
    (W'.map f).toProjective.addY (f ∘ P) (f ∘ Q) = f (W'.addY P Q)

Proof state:
R : Type r
inst✝¹ : CommRing R
W' : Projective R
S : Type v
inst✝ : CommRing S
f : R →+* S
P Q : Fin 3 → R
⊢ (map W' f).toProjective.addY (⇑f ∘ P) (⇑f ∘ Q) = f (W'.addY P Q)

Tactic:
simp only [addY, negY_eq, map_negAddY, map_addX, map_addZ]

Result:
R : Type r
inst✝¹ : CommRing R
W' : Projective R
S : Type v
inst✝ : CommRing S
f : R →+* S
P Q : Fin 3 → R
⊢ -f (W'.negAddY P Q) - (map W' f).toProjective.a₁ * f (W'.addX P Q) - (map W' f).toProjective.a₃ * f (W'.addZ P Q) =
    f (-W'.negAddY P Q - W'.a₁ * W'.addX P Q - W'.a₃ * W'.addZ P Q)

Proof state:
R : Type r
inst✝¹ : CommRing R
W' : Projective R
S : Type v
inst✝ : CommRing S
f : R →+* S
P Q : Fin 3 → R
⊢ -f (W'.negAddY P Q) - (map W' f).toProjective.a₁ * f (W'.addX P Q) - (map W' f).toProjective.a₃ * f (W'.addZ P Q) =
    f (-W'.negAddY P Q - W'.a₁ * W'.addX P Q - W'.a₃ * W'.addZ P Q)

Tactic:
map_simp

Result:
no goals
-- Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean
theorem card_nthRoots {n : ℕ} {ζ : R} (hζ : IsPrimitiveRoot ζ n) (a : R) :
    Multiset.card (nthRoots n a) = if ∃ α, α ^ n = a then n else 0

Proof state:
case neg
R : Type u_4
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
ζ : R
hζ : IsPrimitiveRoot ζ n
a : R
h : ¬∃ α, α ^ n = a
⊢ (nthRoots n a).card = 0

Tactic:
obtain (rfl|hn) := n.eq_zero_or_pos

Result:
case neg.inl
R : Type u_4
inst✝¹ : CommRing R
inst✝ : IsDomain R
ζ a : R
hζ : IsPrimitiveRoot ζ 0
h : ¬∃ α, α ^ 0 = a
⊢ (nthRoots 0 a).card = 0

case neg.inr
R : Type u_4
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
ζ : R
hζ : IsPrimitiveRoot ζ n
a : R
h : ¬∃ α, α ^ n = a
hn : n > 0
⊢ (nthRoots n a).card = 0

Proof state:
case neg.inr
R : Type u_4
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
ζ : R
hζ : IsPrimitiveRoot ζ n
a : R
hn : n > 0
h : ∀ (α : R), α ^ n ≠ a
⊢ (nthRoots n a).card = 0

Tactic:
simpa only [Multiset.card_eq_zero, Multiset.eq_zero_iff_forall_not_mem, mem_nthRoots hn]

Result:
no goals

Proof state:
case pos.intro
R : Type u_4
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
ζ : R
hζ : IsPrimitiveRoot ζ n
a α : R
hα : α ^ n = a
⊢ (nthRoots n a).card = n

Tactic:
rw [nthRoots_eq hζ hα, Multiset.card_map, Multiset.card_range]

Result:
no goals

Proof state:
case pos
R : Type u_4
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
ζ : R
hζ : IsPrimitiveRoot ζ n
a : R
h : ∃ α, α ^ n = a
⊢ (nthRoots n a).card = n

Tactic:
obtain ⟨α, hα⟩ := h

Result:
case pos.intro
R : Type u_4
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
ζ : R
hζ : IsPrimitiveRoot ζ n
a α : R
hα : α ^ n = a
⊢ (nthRoots n a).card = n

Proof state:
R : Type u_4
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
ζ : R
hζ : IsPrimitiveRoot ζ n
a : R
⊢ (nthRoots n a).card = if ∃ α, α ^ n = a then n else 0

Tactic:
split_ifs with h

Result:
case pos
R : Type u_4
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
ζ : R
hζ : IsPrimitiveRoot ζ n
a : R
h : ∃ α, α ^ n = a
⊢ (nthRoots n a).card = n

case neg
R : Type u_4
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
ζ : R
hζ : IsPrimitiveRoot ζ n
a : R
h : ¬∃ α, α ^ n = a
⊢ (nthRoots n a).card = 0

Proof state:
case neg.inl
R : Type u_4
inst✝¹ : CommRing R
inst✝ : IsDomain R
ζ a : R
hζ : IsPrimitiveRoot ζ 0
h : ¬∃ α, α ^ 0 = a
⊢ (nthRoots 0 a).card = 0

Tactic:
simp

Result:
no goals

Proof state:
case neg.inr
R : Type u_4
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
ζ : R
hζ : IsPrimitiveRoot ζ n
a : R
h : ¬∃ α, α ^ n = a
hn : n > 0
⊢ (nthRoots n a).card = 0

Tactic:
push_neg at h

Result:
case neg.inr
R : Type u_4
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
ζ : R
hζ : IsPrimitiveRoot ζ n
a : R
hn : n > 0
h : ∀ (α : R), α ^ n ≠ a
⊢ (nthRoots n a).card = 0
-- Mathlib/Data/DFinsupp/Defs.lean
theorem mapRange_single {f : ∀ i, β₁ i → β₂ i} {hf : ∀ i, f i 0 = 0} {i : ι} {b : β₁ i} :
    mapRange f hf (single i b) = single i (f i b) :=
  DFinsupp.ext fun i' => by
    by_cases h : i = i'
    · subst i'
      simp
    · simp [h, hf]

Proof state:
case pos
ι : Type u
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β₁ i)
inst✝ : (i : ι) → Zero (β₂ i)
f : (i : ι) → β₁ i → β₂ i
hf : ∀ (i : ι), f i 0 = 0
i : ι
b : β₁ i
i' : ι
h : i = i'
⊢ (mapRange f hf (single i b)) i' = (single i (f i b)) i'

Tactic:
subst i'

Result:
case pos
ι : Type u
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β₁ i)
inst✝ : (i : ι) → Zero (β₂ i)
f : (i : ι) → β₁ i → β₂ i
hf : ∀ (i : ι), f i 0 = 0
i : ι
b : β₁ i
⊢ (mapRange f hf (single i b)) i = (single i (f i b)) i

Proof state:
case pos
ι : Type u
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β₁ i)
inst✝ : (i : ι) → Zero (β₂ i)
f : (i : ι) → β₁ i → β₂ i
hf : ∀ (i : ι), f i 0 = 0
i : ι
b : β₁ i
⊢ (mapRange f hf (single i b)) i = (single i (f i b)) i

Tactic:
simp

Result:
no goals

Proof state:
ι : Type u
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β₁ i)
inst✝ : (i : ι) → Zero (β₂ i)
f : (i : ι) → β₁ i → β₂ i
hf : ∀ (i : ι), f i 0 = 0
i : ι
b : β₁ i
i' : ι
⊢ (mapRange f hf (single i b)) i' = (single i (f i b)) i'

Tactic:
by_cases h : i = i'

Result:
case pos
ι : Type u
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β₁ i)
inst✝ : (i : ι) → Zero (β₂ i)
f : (i : ι) → β₁ i → β₂ i
hf : ∀ (i : ι), f i 0 = 0
i : ι
b : β₁ i
i' : ι
h : i = i'
⊢ (mapRange f hf (single i b)) i' = (single i (f i b)) i'

case neg
ι : Type u
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β₁ i)
inst✝ : (i : ι) → Zero (β₂ i)
f : (i : ι) → β₁ i → β₂ i
hf : ∀ (i : ι), f i 0 = 0
i : ι
b : β₁ i
i' : ι
h : ¬i = i'
⊢ (mapRange f hf (single i b)) i' = (single i (f i b)) i'

Proof state:
case neg
ι : Type u
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β₁ i)
inst✝ : (i : ι) → Zero (β₂ i)
f : (i : ι) → β₁ i → β₂ i
hf : ∀ (i : ι), f i 0 = 0
i : ι
b : β₁ i
i' : ι
h : ¬i = i'
⊢ (mapRange f hf (single i b)) i' = (single i (f i b)) i'

Tactic:
simp [h, hf]

Result:
no goals
-- Mathlib/Algebra/Ring/Ext.lean
theorem ext ⦃inst₁ inst₂ : Semiring R⦄
    (h_add : local_hAdd[R, inst₁] = local_hAdd[R, inst₂])
    (h_mul : local_hMul[R, inst₁] = local_hMul[R, inst₂]) :
    inst₁ = inst₂

Proof state:
R : Type u
inst₁ inst₂ : Semiring R
h_add : HAdd.hAdd = HAdd.hAdd
h_mul : HMul.hMul = HMul.hMul
h₁ : toNonUnitalSemiring = toNonUnitalSemiring
⊢ toNonAssocSemiring = toNonAssocSemiring

Tactic:
ext : 1 <;> assumption

Result:
no goals

Proof state:
case mk.mk
R : Type u
toNonUnitalSemiring✝¹ : NonUnitalSemiring R
toOne✝¹ : One R
one_mul✝¹ : ∀ (a : R), 1 * a = a
mul_one✝¹ : ∀ (a : R), a * 1 = a
toNatCast✝¹ : NatCast R
natCast_zero✝¹ : NatCast.natCast 0 = 0
natCast_succ✝¹ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
npow✝¹ : ℕ → R → R
npow_zero✝¹ : ∀ (x : R), npow✝¹ 0 x = 1
npow_succ✝¹ : ∀ (n : ℕ) (x : R), npow✝¹ (n + 1) x = npow✝¹ n x * x
toNonUnitalSemiring✝ : NonUnitalSemiring R
toOne✝ : One R
one_mul✝ : ∀ (a : R), 1 * a = a
mul_one✝ : ∀ (a : R), a * 1 = a
toNatCast✝ : NatCast R
natCast_zero✝ : NatCast.natCast 0 = 0
natCast_succ✝ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
npow✝ : ℕ → R → R
npow_zero✝ : ∀ (x : R), npow✝ 0 x = 1
npow_succ✝ : ∀ (n : ℕ) (x : R), npow✝ (n + 1) x = npow✝ n x * x
h_add : HAdd.hAdd = HAdd.hAdd
h_mul : HMul.hMul = HMul.hMul
h₁ : toNonUnitalSemiring = toNonUnitalSemiring
h₂ : toNonAssocSemiring = toNonAssocSemiring
h₃ : MonoidWithZero.toMonoid = MonoidWithZero.toMonoid
⊢ mk one_mul✝¹ mul_one✝¹ natCast_zero✝¹ natCast_succ✝¹ npow✝¹ npow_zero✝¹ npow_succ✝¹ =
    mk one_mul✝ mul_one✝ natCast_zero✝ natCast_succ✝ npow✝ npow_zero✝ npow_succ✝

Tactic:
congr <;> solve| injection h₁ | injection h₂ | injection h₃

Result:
no goals

Proof state:
case h_mul
R : Type u
inst₁ inst₂ : Semiring R
h_add : HAdd.hAdd = HAdd.hAdd
h_mul : HMul.hMul = HMul.hMul
h₁ : toNonUnitalSemiring = toNonUnitalSemiring
h₂ : toNonAssocSemiring = toNonAssocSemiring
⊢ HMul.hMul = HMul.hMul

Tactic:
exact h_mul

Result:
no goals

Proof state:
R : Type u
inst₁ inst₂ : Semiring R
h_add : HAdd.hAdd = HAdd.hAdd
h_mul : HMul.hMul = HMul.hMul
⊢ inst₁ = inst₂

Tactic:
have h₁ : inst₁.toNonUnitalSemiring = inst₂.toNonUnitalSemiring := by
  ext : 1 <;> assumption

Result:
R : Type u
inst₁ inst₂ : Semiring R
h_add : HAdd.hAdd = HAdd.hAdd
h_mul : HMul.hMul = HMul.hMul
h₁ : toNonUnitalSemiring = toNonUnitalSemiring
⊢ inst₁ = inst₂

Proof state:
R : Type u
inst₁ inst₂ : Semiring R
h_add : HAdd.hAdd = HAdd.hAdd
h_mul : HMul.hMul = HMul.hMul
h₁ : toNonUnitalSemiring = toNonUnitalSemiring
⊢ inst₁ = inst₂

Tactic:
have h₂ : inst₁.toNonAssocSemiring = inst₂.toNonAssocSemiring := by
  ext : 1 <;> assumption

Result:
R : Type u
inst₁ inst₂ : Semiring R
h_add : HAdd.hAdd = HAdd.hAdd
h_mul : HMul.hMul = HMul.hMul
h₁ : toNonUnitalSemiring = toNonUnitalSemiring
h₂ : toNonAssocSemiring = toNonAssocSemiring
⊢ inst₁ = inst₂
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive additive_of_symmetric_of_isTotal]
lemma multiplicative_of_symmetric_of_isTotal
    (hsymm : Symmetric p) (hf_swap : ∀ {a b}, p a b → f a b * f b a = 1)
    (hmul : ∀ {a b c}, r a b → r b c → p a b → p b c → p a c → f a c = f a b * f b c)
    {a b c : α} (pab : p a b) (pbc : p b c) (pac : p a c) : f a c = f a b * f b c

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : Monoid β
p r : α → α → Prop
inst✝ : IsTotal α r
f : α → α → β
hsymm : Symmetric p
hf_swap : ∀ {a b : α}, p a b → f a b * f b a = 1
hmul : ∀ {a b c : α}, r a b → r b c → p a b → p b c → p a c → f a c = f a b * f b c
a b c : α
pab : p a b
pbc : p b c
pac : p a c
hmul' : ∀ {b c : α}, r b c → p a b → p b c → p a c → f a c = f a b * f b c
⊢ f a c = f a b * f b c

Tactic:
obtain rbc | rcb := total_of r b c

Result:
case inl
α : Type u_1
β : Type u_2
inst✝¹ : Monoid β
p r : α → α → Prop
inst✝ : IsTotal α r
f : α → α → β
hsymm : Symmetric p
hf_swap : ∀ {a b : α}, p a b → f a b * f b a = 1
hmul : ∀ {a b c : α}, r a b → r b c → p a b → p b c → p a c → f a c = f a b * f b c
a b c : α
pab : p a b
pbc : p b c
pac : p a c
hmul' : ∀ {b c : α}, r b c → p a b → p b c → p a c → f a c = f a b * f b c
rbc : r b c
⊢ f a c = f a b * f b c

case inr
α : Type u_1
β : Type u_2
inst✝¹ : Monoid β
p r : α → α → Prop
inst✝ : IsTotal α r
f : α → α → β
hsymm : Symmetric p
hf_swap : ∀ {a b : α}, p a b → f a b * f b a = 1
hmul : ∀ {a b c : α}, r a b → r b c → p a b → p b c → p a c → f a c = f a b * f b c
a b c : α
pab : p a b
pbc : p b c
pac : p a c
hmul' : ∀ {b c : α}, r b c → p a b → p b c → p a c → f a c = f a b * f b c
rcb : r c b
⊢ f a c = f a b * f b c

Proof state:
case inl
α : Type u_1
β : Type u_2
inst✝¹ : Monoid β
p r : α → α → Prop
inst✝ : IsTotal α r
f : α → α → β
hsymm : Symmetric p
hf_swap : ∀ {a b : α}, p a b → f a b * f b a = 1
hmul : ∀ {a b c : α}, r a b → r b c → p a b → p b c → p a c → f a c = f a b * f b c
a b c : α
pab : p a b
pbc : p b c
pac : p a c
hmul' : ∀ {b c : α}, r b c → p a b → p b c → p a c → f a c = f a b * f b c
rbc : r b c
⊢ f a c = f a b * f b c

Tactic:
exact hmul' rbc pab pbc pac

Result:
no goals
-- Mathlib/Topology/MetricSpace/Thickening.lean
/-- An exterior point of a subset `E` (i.e., a point outside the closure of `E`) is not in the
(open) `δ`-thickening of `E` for small enough positive `δ`. -/
lemma eventually_not_mem_thickening_of_infEdist_pos {E : Set α} {x : α} (h : x ∉ closure E) :
    ∀ᶠ δ in 𝓝 (0 : ℝ), x ∉ Metric.thickening δ E

Proof state:
α : Type u
inst✝ : PseudoEMetricSpace α
E : Set α
x : α
h : x ∉ closure E
⊢ ∀ᶠ (δ : ℝ) in 𝓝 0, x ∉ thickening δ E

Tactic:
obtain ⟨ε, ⟨ε_pos, ε_lt⟩⟩ := exists_real_pos_lt_infEdist_of_not_mem_closure h

Result:
case intro.intro
α : Type u
inst✝ : PseudoEMetricSpace α
E : Set α
x : α
h : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
⊢ ∀ᶠ (δ : ℝ) in 𝓝 0, x ∉ thickening δ E

Proof state:
case h
α : Type u
inst✝ : PseudoEMetricSpace α
E : Set α
x : α
h : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
δ : ℝ
hδ : δ < ε
⊢ ENNReal.ofReal δ ≤ infEdist x E

Tactic:
exact (ENNReal.ofReal_le_ofReal hδ.le).trans ε_lt.le

Result:
no goals

Proof state:
case h
α : Type u
inst✝ : PseudoEMetricSpace α
E : Set α
x : α
h : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
δ : ℝ
hδ : δ < ε
⊢ x ∉ thickening δ E

Tactic:
simp only [thickening, mem_setOf_eq, not_lt]

Result:
case h
α : Type u
inst✝ : PseudoEMetricSpace α
E : Set α
x : α
h : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
δ : ℝ
hδ : δ < ε
⊢ ENNReal.ofReal δ ≤ infEdist x E

Proof state:
case intro.intro
α : Type u
inst✝ : PseudoEMetricSpace α
E : Set α
x : α
h : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
⊢ ∀ᶠ (δ : ℝ) in 𝓝 0, x ∉ thickening δ E

Tactic:
filter_upwards [eventually_lt_nhds ε_pos] with δ hδ

Result:
case h
α : Type u
inst✝ : PseudoEMetricSpace α
E : Set α
x : α
h : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
δ : ℝ
hδ : δ < ε
⊢ x ∉ thickening δ E
-- Mathlib/Data/NNReal/Basic.lean
theorem le_mul_iInf {a : ℝ≥0} {g : ℝ≥0} {h : ι → ℝ≥0} (H : ∀ j, a ≤ g * h j) : a ≤ g * iInf h

Proof state:
ι : Sort u_2
inst✝ : Nonempty ι
a g : ℝ≥0
h : ι → ℝ≥0
H : ∀ (j : ι), a ≤ g * h j
⊢ a ≤ g * iInf h

Tactic:
rw [mul_iInf]

Result:
ι : Sort u_2
inst✝ : Nonempty ι
a g : ℝ≥0
h : ι → ℝ≥0
H : ∀ (j : ι), a ≤ g * h j
⊢ a ≤ ⨅ i, g * h i

Proof state:
ι : Sort u_2
inst✝ : Nonempty ι
a g : ℝ≥0
h : ι → ℝ≥0
H : ∀ (j : ι), a ≤ g * h j
⊢ a ≤ ⨅ i, g * h i

Tactic:
exact le_ciInf H

Result:
no goals
-- Mathlib/Data/Int/Init.lean
/-- See `Int.inductionOn'` for an induction in both directions. -/
protected lemma le_induction {P : ℤ → Prop} {m : ℤ} (h0 : P m)
    (h1 : ∀ n : ℤ, m ≤ n → P n → P (n + 1)) (n : ℤ) : m ≤ n → P n

Proof state:
case refine_3
P : ℤ → Prop
m : ℤ
h0 : P m
h1 : ∀ (n : ℤ), m ≤ n → P n → P (n + 1)
n : ℤ
⊢ ∀ (k : ℤ), k ≤ m → (m ≤ k → P k) → m ≤ k - 1 → P (k - 1)

Tactic:
intro k hle _ hle'

Result:
case refine_3
P : ℤ → Prop
m : ℤ
h0 : P m
h1 : ∀ (n : ℤ), m ≤ n → P n → P (n + 1)
n k : ℤ
hle : k ≤ m
a✝ : m ≤ k → P k
hle' : m ≤ k - 1
⊢ P (k - 1)

Proof state:
case refine_1
P : ℤ → Prop
m : ℤ
h0 : P m
h1 : ∀ (n : ℤ), m ≤ n → P n → P (n + 1)
n : ℤ
⊢ m ≤ m → P m

Tactic:
intro

Result:
case refine_1
P : ℤ → Prop
m : ℤ
h0 : P m
h1 : ∀ (n : ℤ), m ≤ n → P n → P (n + 1)
n : ℤ
a✝ : m ≤ m
⊢ P m

Proof state:
case refine_2
P : ℤ → Prop
m : ℤ
h0 : P m
h1 : ∀ (n : ℤ), m ≤ n → P n → P (n + 1)
n k : ℤ
hle : m ≤ k
hi : m ≤ k → P k
a✝ : m ≤ k + 1
⊢ P (k + 1)

Tactic:
exact h1 k hle (hi hle)

Result:
no goals

Proof state:
P : ℤ → Prop
m : ℤ
h0 : P m
h1 : ∀ (n : ℤ), m ≤ n → P n → P (n + 1)
n : ℤ
⊢ m ≤ n → P n

Tactic:
refine Int.inductionOn' n m ?_ ?_ ?_

Result:
case refine_1
P : ℤ → Prop
m : ℤ
h0 : P m
h1 : ∀ (n : ℤ), m ≤ n → P n → P (n + 1)
n : ℤ
⊢ m ≤ m → P m

case refine_2
P : ℤ → Prop
m : ℤ
h0 : P m
h1 : ∀ (n : ℤ), m ≤ n → P n → P (n + 1)
n : ℤ
⊢ ∀ (k : ℤ), m ≤ k → (m ≤ k → P k) → m ≤ k + 1 → P (k + 1)

case refine_3
P : ℤ → Prop
m : ℤ
h0 : P m
h1 : ∀ (n : ℤ), m ≤ n → P n → P (n + 1)
n : ℤ
⊢ ∀ (k : ℤ), k ≤ m → (m ≤ k → P k) → m ≤ k - 1 → P (k - 1)

Proof state:
case refine_3
P : ℤ → Prop
m : ℤ
h0 : P m
h1 : ∀ (n : ℤ), m ≤ n → P n → P (n + 1)
n k : ℤ
hle : k ≤ m
a✝ : m ≤ k → P k
hle' : m ≤ k - 1
⊢ P (k - 1)

Tactic:
omega

Result:
no goals

Proof state:
case refine_1
P : ℤ → Prop
m : ℤ
h0 : P m
h1 : ∀ (n : ℤ), m ≤ n → P n → P (n + 1)
n : ℤ
a✝ : m ≤ m
⊢ P m

Tactic:
exact h0

Result:
no goals

Proof state:
case refine_2
P : ℤ → Prop
m : ℤ
h0 : P m
h1 : ∀ (n : ℤ), m ≤ n → P n → P (n + 1)
n : ℤ
⊢ ∀ (k : ℤ), m ≤ k → (m ≤ k → P k) → m ≤ k + 1 → P (k + 1)

Tactic:
intro k hle hi _

Result:
case refine_2
P : ℤ → Prop
m : ℤ
h0 : P m
h1 : ∀ (n : ℤ), m ≤ n → P n → P (n + 1)
n k : ℤ
hle : m ≤ k
hi : m ≤ k → P k
a✝ : m ≤ k + 1
⊢ P (k + 1)
-- Mathlib/CategoryTheory/Action.lean
theorem back_coe (x : ActionCategory M X) : ↑x.back = x

Proof state:
case mk
M : Type u_1
inst✝¹ : Monoid M
X : Type u
inst✝ : MulAction M X
fst✝ : SingleObj M
snd✝ : (actionAsFunctor M X).obj fst✝
⊢ ⟨(), ActionCategory.back ⟨fst✝, snd✝⟩⟩ = ⟨fst✝, snd✝⟩

Tactic:
rfl

Result:
no goals

Proof state:
M : Type u_1
inst✝¹ : Monoid M
X : Type u
inst✝ : MulAction M X
x : ActionCategory M X
⊢ ⟨(), x.back⟩ = x

Tactic:
cases x

Result:
case mk
M : Type u_1
inst✝¹ : Monoid M
X : Type u
inst✝ : MulAction M X
fst✝ : SingleObj M
snd✝ : (actionAsFunctor M X).obj fst✝
⊢ ⟨(), ActionCategory.back ⟨fst✝, snd✝⟩⟩ = ⟨fst✝, snd✝⟩