1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: MeasureTheory.AEEqFun.comp_compQuasiMeasurePreserving
File: Mathlib/MeasureTheory/Function/AEEqFun.lean

tactic: rcases f
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : MeasurableSpace α
μ ν✝ : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : TopologicalSpace δ
inst✝ : MeasurableSpace β
ν : Measure β
g : γ → δ
hg : Continuous g
f : β →ₘ[ν] γ
φ : α → β
hφ : Measure.QuasiMeasurePreserving φ μ ν
⊢ (comp g hg f).compQuasiMeasurePreserving φ hφ = comp g hg (f.compQuasiMeasurePreserving φ hφ)
state_after: case mk
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : MeasurableSpace α
μ ν✝ : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : TopologicalSpace δ
inst✝ : MeasurableSpace β
ν : Measure β
g : γ → δ
hg : Continuous g
f : β →ₘ[ν] γ
φ : α → β
hφ : Measure.QuasiMeasurePreserving φ μ ν
a✝ : { f // AEStronglyMeasurable f ν }
⊢ (comp g hg (Quot.mk Setoid.r a✝)).compQuasiMeasurePreserving φ hφ =
    comp g hg (compQuasiMeasurePreserving (Quot.mk Setoid.r a✝) φ hφ)

tactic: rfl
state_before: case mk
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : MeasurableSpace α
μ ν✝ : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : TopologicalSpace δ
inst✝ : MeasurableSpace β
ν : Measure β
g : γ → δ
hg : Continuous g
f : β →ₘ[ν] γ
φ : α → β
hφ : Measure.QuasiMeasurePreserving φ μ ν
a✝ : { f // AEStronglyMeasurable f ν }
⊢ (comp g hg (Quot.mk Setoid.r a✝)).compQuasiMeasurePreserving φ hφ =
    comp g hg (compQuasiMeasurePreserving (Quot.mk Setoid.r a✝) φ hφ)
state_after: no goals
Theorem: MonoidAlgebra.mul_apply_left
File: Mathlib/Algebra/MonoidAlgebra/Basic.lean

tactic: rw [← Finsupp.sum_apply, ← Finsupp.sum_mul g f, f.sum_single]
state_before: k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Group G
f g : MonoidAlgebra k G
x : G
⊢ (f * g) x = sum f fun a b => (single a b * g) x
state_after: no goals

tactic: simp only [single_mul_apply, Finsupp.sum]
state_before: k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Group G
f g : MonoidAlgebra k G
x : G
⊢ (sum f fun a b => (single a b * g) x) = sum f fun a b => b * g (a⁻¹ * x)
state_after: no goals
Theorem: tendsto_log_mul_rpow_nhds_zero
File: Mathlib/Analysis/SpecialFunctions/Pow/Asymptotics.lean

tactic: rw [rpow_neg hx.out.le, div_inv_eq_mul]
state_before: r : ℝ
hr : 0 < r
x : ℝ
hx : x ∈ Set.Ioi 0
⊢ log x / x ^ (-r) = (fun x => log x * x ^ r) x
state_after: no goals
Theorem: LinearMap.range_comp_of_range_eq_top
File: Mathlib/Algebra/Module/Submodule/Range.lean

tactic: rw [range_comp, hf, Submodule.map_top]
state_before: R : Type u_1
R₂ : Type u_2
R₃ : Type u_3
K : Type u_4
K₂ : Type u_5
M : Type u_6
M₂ : Type u_7
M₃ : Type u_8
V : Type u_9
V₂ : Type u_10
inst✝¹² : Semiring R
inst✝¹¹ : Semiring R₂
inst✝¹⁰ : Semiring R₃
inst✝⁹ : AddCommMonoid M
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : AddCommMonoid M₃
inst✝⁶ : Module R M
inst✝⁵ : Module R₂ M₂
inst✝⁴ : Module R₃ M₃
τ₁₂ : R →+* R₂
τ₂₃ : R₂ →+* R₃
τ₁₃ : R →+* R₃
inst✝³ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃
inst✝² : RingHomSurjective τ₁₂
inst✝¹ : RingHomSurjective τ₂₃
inst✝ : RingHomSurjective τ₁₃
f : M →ₛₗ[τ₁₂] M₂
g : M₂ →ₛₗ[τ₂₃] M₃
hf : range f = ⊤
⊢ range (g.comp f) = range g
state_after: no goals
Theorem: Sum.traverse_eq_map_id
File: Mathlib/Control/Traversable/Instances.lean

tactic: induction x <;> simp! [*, functor_norm] <;> rfl
state_before: σ : Type u
F G : Type u → Type u
inst✝³ : Applicative F
inst✝² : Applicative G
inst✝¹ : LawfulApplicative F
inst✝ : LawfulApplicative G
α β : Type u
f : α → β
x : σ ⊕ α
⊢ Sum.traverse (pure ∘ f) x = pure (f <$> x)
state_after: no goals
Theorem: NNReal.finset_sup_div
File: Mathlib/Data/NNReal/Basic.lean

tactic: simp only [div_eq_inv_mul, mul_finset_sup]
state_before: r✝ r₁ r₂ : ℝ≥0
x y : ℝ
α : Type u_1
f : α → ℝ≥0
s : Finset α
r : ℝ≥0
⊢ s.sup f / r = s.sup fun a => f a / r
state_after: no goals
Theorem: Finset.memberSubfamily_image_insert
File: Mathlib/Combinatorics/SetFamily/Compression/Down.lean

tactic: ext s
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
a : α
h𝒜 : ∀ s ∈ 𝒜, a ∉ s
⊢ memberSubfamily a (image (insert a) 𝒜) = 𝒜
state_after: case a
α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s✝ : Finset α
a : α
h𝒜 : ∀ s ∈ 𝒜, a ∉ s
s : Finset α
⊢ s ∈ memberSubfamily a (image (insert a) 𝒜) ↔ s ∈ 𝒜

tactic: simp only [mem_memberSubfamily, mem_image]
state_before: case a
α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s✝ : Finset α
a : α
h𝒜 : ∀ s ∈ 𝒜, a ∉ s
s : Finset α
⊢ s ∈ memberSubfamily a (image (insert a) 𝒜) ↔ s ∈ 𝒜
state_after: case a
α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s✝ : Finset α
a : α
h𝒜 : ∀ s ∈ 𝒜, a ∉ s
s : Finset α
⊢ (∃ a_1 ∈ 𝒜, insert a a_1 = insert a s) ∧ a ∉ s ↔ s ∈ 𝒜

tactic: refine ⟨?_, fun hs ↦ ⟨⟨s, hs, rfl⟩, h𝒜 _ hs⟩⟩
state_before: case a
α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s✝ : Finset α
a : α
h𝒜 : ∀ s ∈ 𝒜, a ∉ s
s : Finset α
⊢ (∃ a_1 ∈ 𝒜, insert a a_1 = insert a s) ∧ a ∉ s ↔ s ∈ 𝒜
state_after: case a
α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s✝ : Finset α
a : α
h𝒜 : ∀ s ∈ 𝒜, a ∉ s
s : Finset α
⊢ (∃ a_1 ∈ 𝒜, insert a a_1 = insert a s) ∧ a ∉ s → s ∈ 𝒜

tactic: rintro ⟨⟨t, ht, hts⟩, hs⟩
state_before: case a
α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s✝ : Finset α
a : α
h𝒜 : ∀ s ∈ 𝒜, a ∉ s
s : Finset α
⊢ (∃ a_1 ∈ 𝒜, insert a a_1 = insert a s) ∧ a ∉ s → s ∈ 𝒜
state_after: case a.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s✝ : Finset α
a : α
h𝒜 : ∀ s ∈ 𝒜, a ∉ s
s : Finset α
hs : a ∉ s
t : Finset α
ht : t ∈ 𝒜
hts : insert a t = insert a s
⊢ s ∈ 𝒜

tactic: rwa [← insert_erase_invOn.2.injOn (h𝒜 _ ht) hs hts]
state_before: case a.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s✝ : Finset α
a : α
h𝒜 : ∀ s ∈ 𝒜, a ∉ s
s : Finset α
hs : a ∉ s
t : Finset α
ht : t ∈ 𝒜
hts : insert a t = insert a s
⊢ s ∈ 𝒜
state_after: no goals
Theorem: exists_nat_one_div_lt
File: Mathlib/Algebra/Order/Archimedean.lean

tactic: cases' exists_nat_gt (1 / ε) with n hn
state_before: α : Type u_1
M : Type u_2
inst✝² : LinearOrderedSemifield α
inst✝¹ : Archimedean α
inst✝ : ExistsAddOfLE α
x y ε : α
hε : 0 < ε
⊢ ∃ n, 1 / (↑n + 1) < ε
state_after: case intro
α : Type u_1
M : Type u_2
inst✝² : LinearOrderedSemifield α
inst✝¹ : Archimedean α
inst✝ : ExistsAddOfLE α
x y ε : α
hε : 0 < ε
n : ℕ
hn : 1 / ε < ↑n
⊢ ∃ n, 1 / (↑n + 1) < ε

tactic: use n
state_before: case intro
α : Type u_1
M : Type u_2
inst✝² : LinearOrderedSemifield α
inst✝¹ : Archimedean α
inst✝ : ExistsAddOfLE α
x y ε : α
hε : 0 < ε
n : ℕ
hn : 1 / ε < ↑n
⊢ ∃ n, 1 / (↑n + 1) < ε
state_after: case h
α : Type u_1
M : Type u_2
inst✝² : LinearOrderedSemifield α
inst✝¹ : Archimedean α
inst✝ : ExistsAddOfLE α
x y ε : α
hε : 0 < ε
n : ℕ
hn : 1 / ε < ↑n
⊢ 1 / (↑n + 1) < ε

tactic: rw [div_lt_iff, ← div_lt_iff' hε]
state_before: case h
α : Type u_1
M : Type u_2
inst✝² : LinearOrderedSemifield α
inst✝¹ : Archimedean α
inst✝ : ExistsAddOfLE α
x y ε : α
hε : 0 < ε
n : ℕ
hn : 1 / ε < ↑n
⊢ 1 / (↑n + 1) < ε
state_after: case h
α : Type u_1
M : Type u_2
inst✝² : LinearOrderedSemifield α
inst✝¹ : Archimedean α
inst✝ : ExistsAddOfLE α
x y ε : α
hε : 0 < ε
n : ℕ
hn : 1 / ε < ↑n
⊢ 1 / ε < ↑n + 1

case h
α : Type u_1
M : Type u_2
inst✝² : LinearOrderedSemifield α
inst✝¹ : Archimedean α
inst✝ : ExistsAddOfLE α
x y ε : α
hε : 0 < ε
n : ℕ
hn : 1 / ε < ↑n
⊢ 0 < ↑n + 1

tactic: apply hn.trans
state_before: case h
α : Type u_1
M : Type u_2
inst✝² : LinearOrderedSemifield α
inst✝¹ : Archimedean α
inst✝ : ExistsAddOfLE α
x y ε : α
hε : 0 < ε
n : ℕ
hn : 1 / ε < ↑n
⊢ 1 / ε < ↑n + 1
state_after: case h
α : Type u_1
M : Type u_2
inst✝² : LinearOrderedSemifield α
inst✝¹ : Archimedean α
inst✝ : ExistsAddOfLE α
x y ε : α
hε : 0 < ε
n : ℕ
hn : 1 / ε < ↑n
⊢ ↑n < ↑n + 1

tactic: simp [zero_lt_one]
state_before: case h
α : Type u_1
M : Type u_2
inst✝² : LinearOrderedSemifield α
inst✝¹ : Archimedean α
inst✝ : ExistsAddOfLE α
x y ε : α
hε : 0 < ε
n : ℕ
hn : 1 / ε < ↑n
⊢ ↑n < ↑n + 1
state_after: no goals

tactic: exact n.cast_add_one_pos
state_before: case h
α : Type u_1
M : Type u_2
inst✝² : LinearOrderedSemifield α
inst✝¹ : Archimedean α
inst✝ : ExistsAddOfLE α
x y ε : α
hε : 0 < ε
n : ℕ
hn : 1 / ε < ↑n
⊢ 0 < ↑n + 1
state_after: no goals
Theorem: Rat.divInt_sub_divInt
File: .lake/packages/batteries/Batteries/Data/Rat/Lemmas.lean

tactic: simp only [Rat.sub_eq_add_neg, neg_divInt,
  divInt_add_divInt _ _ z₁ z₂, Int.neg_mul, Int.sub_eq_add_neg]
state_before: n₁ n₂ d₁ d₂ : Int
z₁ : d₁ ≠ 0
z₂ : d₂ ≠ 0
⊢ n₁ /. d₁ - n₂ /. d₂ = (n₁ * d₂ - n₂ * d₁) /. (d₁ * d₂)
state_after: no goals
Theorem: NumberField.InfinitePlace.one_le_mult
File: Mathlib/NumberTheory/NumberField/Embeddings.lean

tactic: rw [← Nat.cast_one, Nat.cast_le]
state_before: k : Type u_1
inst✝² : Field k
K : Type u_2
inst✝¹ : Field K
F : Type u_3
inst✝ : Field F
w : InfinitePlace K
⊢ 1 ≤ ↑w.mult
state_after: k : Type u_1
inst✝² : Field k
K : Type u_2
inst✝¹ : Field K
F : Type u_3
inst✝ : Field F
w : InfinitePlace K
⊢ 1 ≤ w.mult

tactic: exact mult_pos
state_before: k : Type u_1
inst✝² : Field k
K : Type u_2
inst✝¹ : Field K
F : Type u_3
inst✝ : Field F
w : InfinitePlace K
⊢ 1 ≤ w.mult
state_after: no goals
Theorem: Real.pi_gt_sqrtTwoAddSeries
File: Mathlib/Data/Real/Pi/Bounds.lean

tactic: have : √(2 - sqrtTwoAddSeries 0 n) / (2 : ℝ) * (2 : ℝ) ^ (n + 2) < π := by
  rw [← lt_div_iff, ← sin_pi_over_two_pow_succ]
  focus
    apply sin_lt
    apply div_pos pi_pos
  all_goals apply pow_pos; norm_num
state_before: n : ℕ
⊢ 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) < π
state_after: n : ℕ
this : √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < π
⊢ 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) < π

tactic: apply lt_of_le_of_lt (le_of_eq _) this
state_before: n : ℕ
this : √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < π
⊢ 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) < π
state_after: n : ℕ
this : √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < π
⊢ 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) = √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2)

tactic: rw [pow_succ' _ (n + 1), ← mul_assoc, div_mul_cancel₀, mul_comm]
state_before: n : ℕ
this : √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < π
⊢ 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) = √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2)
state_after: case h
n : ℕ
this : √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < π
⊢ 2 ≠ 0

tactic: norm_num
state_before: case h
n : ℕ
this : √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < π
⊢ 2 ≠ 0
state_after: no goals

tactic: rw [← lt_div_iff, ← sin_pi_over_two_pow_succ]
state_before: n : ℕ
⊢ √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < π
state_after: n : ℕ
⊢ sin (π / 2 ^ (n + 2)) < π / 2 ^ (n + 2)

n : ℕ
⊢ 0 < 2 ^ (n + 2)

tactic: focus
  apply sin_lt
  apply div_pos pi_pos
state_before: n : ℕ
⊢ sin (π / 2 ^ (n + 2)) < π / 2 ^ (n + 2)

n : ℕ
⊢ 0 < 2 ^ (n + 2)
state_after: case h
n : ℕ
⊢ 0 < 2 ^ (n + 2)

n : ℕ
⊢ 0 < 2 ^ (n + 2)

tactic: all_goals apply pow_pos; norm_num
state_before: case h
n : ℕ
⊢ 0 < 2 ^ (n + 2)

n : ℕ
⊢ 0 < 2 ^ (n + 2)
state_after: no goals

tactic: apply sin_lt
state_before: n : ℕ
⊢ sin (π / 2 ^ (n + 2)) < π / 2 ^ (n + 2)
state_after: case h
n : ℕ
⊢ 0 < π / 2 ^ (n + 2)

tactic: apply div_pos pi_pos
state_before: case h
n : ℕ
⊢ 0 < π / 2 ^ (n + 2)
state_after: case h
n : ℕ
⊢ 0 < 2 ^ (n + 2)

tactic: apply pow_pos
state_before: n : ℕ
⊢ 0 < 2 ^ (n + 2)
state_after: case H
n : ℕ
⊢ 0 < 2

tactic: norm_num
state_before: case H
n : ℕ
⊢ 0 < 2
state_after: no goals
Theorem: CategoryTheory.Limits.ConeMorphism.ext
File: Mathlib/CategoryTheory/Limits/Cones.lean

tactic: cases f
state_before: J : Type u₁
inst✝³ : Category.{v₁, u₁} J
K : Type u₂
inst✝² : Category.{v₂, u₂} K
C : Type u₃
inst✝¹ : Category.{v₃, u₃} C
D : Type u₄
inst✝ : Category.{v₄, u₄} D
F : J ⥤ C
c c' : Cone F
f g : c ⟶ c'
w : f.hom = g.hom
⊢ f = g
state_after: case mk
J : Type u₁
inst✝³ : Category.{v₁, u₁} J
K : Type u₂
inst✝² : Category.{v₂, u₂} K
C : Type u₃
inst✝¹ : Category.{v₃, u₃} C
D : Type u₄
inst✝ : Category.{v₄, u₄} D
F : J ⥤ C
c c' : Cone F
g : c ⟶ c'
hom✝ : c.pt ⟶ c'.pt
w✝ : ∀ (j : J), hom✝ ≫ c'.π.app j = c.π.app j
w : { hom := hom✝, w := w✝ }.hom = g.hom
⊢ { hom := hom✝, w := w✝ } = g

tactic: cases g
state_before: case mk
J : Type u₁
inst✝³ : Category.{v₁, u₁} J
K : Type u₂
inst✝² : Category.{v₂, u₂} K
C : Type u₃
inst✝¹ : Category.{v₃, u₃} C
D : Type u₄
inst✝ : Category.{v₄, u₄} D
F : J ⥤ C
c c' : Cone F
g : c ⟶ c'
hom✝ : c.pt ⟶ c'.pt
w✝ : ∀ (j : J), hom✝ ≫ c'.π.app j = c.π.app j
w : { hom := hom✝, w := w✝ }.hom = g.hom
⊢ { hom := hom✝, w := w✝ } = g
state_after: case mk.mk
J : Type u₁
inst✝³ : Category.{v₁, u₁} J
K : Type u₂
inst✝² : Category.{v₂, u₂} K
C : Type u₃
inst✝¹ : Category.{v₃, u₃} C
D : Type u₄
inst✝ : Category.{v₄, u₄} D
F : J ⥤ C
c c' : Cone F
hom✝¹ : c.pt ⟶ c'.pt
w✝¹ : ∀ (j : J), hom✝¹ ≫ c'.π.app j = c.π.app j
hom✝ : c.pt ⟶ c'.pt
w✝ : ∀ (j : J), hom✝ ≫ c'.π.app j = c.π.app j
w : { hom := hom✝¹, w := w✝¹ }.hom = { hom := hom✝, w := w✝ }.hom
⊢ { hom := hom✝¹, w := w✝¹ } = { hom := hom✝, w := w✝ }

tactic: congr
state_before: case mk.mk
J : Type u₁
inst✝³ : Category.{v₁, u₁} J
K : Type u₂
inst✝² : Category.{v₂, u₂} K
C : Type u₃
inst✝¹ : Category.{v₃, u₃} C
D : Type u₄
inst✝ : Category.{v₄, u₄} D
F : J ⥤ C
c c' : Cone F
hom✝¹ : c.pt ⟶ c'.pt
w✝¹ : ∀ (j : J), hom✝¹ ≫ c'.π.app j = c.π.app j
hom✝ : c.pt ⟶ c'.pt
w✝ : ∀ (j : J), hom✝ ≫ c'.π.app j = c.π.app j
w : { hom := hom✝¹, w := w✝¹ }.hom = { hom := hom✝, w := w✝ }.hom
⊢ { hom := hom✝¹, w := w✝¹ } = { hom := hom✝, w := w✝ }
state_after: no goals
Theorem: Ring.inverse_sub_inverse
File: Mathlib/Algebra/Ring/Invertible.lean

tactic: by_cases ha : IsUnit a
state_before: α : Type u
inst✝ : Ring α
a b : α
h : IsUnit a ↔ IsUnit b
⊢ inverse a - inverse b = inverse a * (b - a) * inverse b
state_after: case pos
α : Type u
inst✝ : Ring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : IsUnit a
⊢ inverse a - inverse b = inverse a * (b - a) * inverse b

case neg
α : Type u
inst✝ : Ring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : ¬IsUnit a
⊢ inverse a - inverse b = inverse a * (b - a) * inverse b

tactic: have hb := h.mp ha
state_before: case pos
α : Type u
inst✝ : Ring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : IsUnit a
⊢ inverse a - inverse b = inverse a * (b - a) * inverse b
state_after: case pos
α : Type u
inst✝ : Ring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : IsUnit a
hb : IsUnit b
⊢ inverse a - inverse b = inverse a * (b - a) * inverse b

tactic: obtain ⟨ia⟩ := ha.nonempty_invertible
state_before: case pos
α : Type u
inst✝ : Ring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : IsUnit a
hb : IsUnit b
⊢ inverse a - inverse b = inverse a * (b - a) * inverse b
state_after: case pos.intro
α : Type u
inst✝ : Ring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : IsUnit a
hb : IsUnit b
ia : Invertible a
⊢ inverse a - inverse b = inverse a * (b - a) * inverse b

tactic: obtain ⟨ib⟩ := hb.nonempty_invertible
state_before: case pos.intro
α : Type u
inst✝ : Ring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : IsUnit a
hb : IsUnit b
ia : Invertible a
⊢ inverse a - inverse b = inverse a * (b - a) * inverse b
state_after: case pos.intro.intro
α : Type u
inst✝ : Ring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : IsUnit a
hb : IsUnit b
ia : Invertible a
ib : Invertible b
⊢ inverse a - inverse b = inverse a * (b - a) * inverse b

tactic: simp_rw [inverse_invertible, invOf_sub_invOf]
state_before: case pos.intro.intro
α : Type u
inst✝ : Ring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : IsUnit a
hb : IsUnit b
ia : Invertible a
ib : Invertible b
⊢ inverse a - inverse b = inverse a * (b - a) * inverse b
state_after: no goals

tactic: have hb := h.not.mp ha
state_before: case neg
α : Type u
inst✝ : Ring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : ¬IsUnit a
⊢ inverse a - inverse b = inverse a * (b - a) * inverse b
state_after: case neg
α : Type u
inst✝ : Ring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : ¬IsUnit a
hb : ¬IsUnit b
⊢ inverse a - inverse b = inverse a * (b - a) * inverse b

tactic: simp [inverse_non_unit, ha, hb]
state_before: case neg
α : Type u
inst✝ : Ring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : ¬IsUnit a
hb : ¬IsUnit b
⊢ inverse a - inverse b = inverse a * (b - a) * inverse b
state_after: no goals
Theorem: RatFunc.num_algebraMap
File: Mathlib/FieldTheory/RatFunc/Basic.lean

tactic: convert num_div p 1 <;> simp
state_before: K : Type u
inst✝ : Field K
p : K[X]
⊢ ((algebraMap K[X] (RatFunc K)) p).num = p
state_after: no goals
Theorem: Filter.tendsto_const_mul_atTop_iff
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: rcases lt_trichotomy r 0 with (hr | rfl | hr)
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : LinearOrderedField α
l : Filter β
f : β → α
r : α
inst✝ : l.NeBot
⊢ Tendsto (fun x => r * f x) l atTop ↔ 0 < r ∧ Tendsto f l atTop ∨ r < 0 ∧ Tendsto f l atBot
state_after: case inl
ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : LinearOrderedField α
l : Filter β
f : β → α
r : α
inst✝ : l.NeBot
hr : r < 0
⊢ Tendsto (fun x => r * f x) l atTop ↔ 0 < r ∧ Tendsto f l atTop ∨ r < 0 ∧ Tendsto f l atBot

case inr.inl
ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : LinearOrderedField α
l : Filter β
f : β → α
inst✝ : l.NeBot
⊢ Tendsto (fun x => 0 * f x) l atTop ↔ 0 < 0 ∧ Tendsto f l atTop ∨ 0 < 0 ∧ Tendsto f l atBot

case inr.inr
ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : LinearOrderedField α
l : Filter β
f : β → α
r : α
inst✝ : l.NeBot
hr : 0 < r
⊢ Tendsto (fun x => r * f x) l atTop ↔ 0 < r ∧ Tendsto f l atTop ∨ r < 0 ∧ Tendsto f l atBot

tactic: simp [hr, hr.not_lt, tendsto_const_mul_atTop_of_neg]
state_before: case inl
ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : LinearOrderedField α
l : Filter β
f : β → α
r : α
inst✝ : l.NeBot
hr : r < 0
⊢ Tendsto (fun x => r * f x) l atTop ↔ 0 < r ∧ Tendsto f l atTop ∨ r < 0 ∧ Tendsto f l atBot
state_after: no goals

tactic: simp [not_tendsto_const_atTop]
state_before: case inr.inl
ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : LinearOrderedField α
l : Filter β
f : β → α
inst✝ : l.NeBot
⊢ Tendsto (fun x => 0 * f x) l atTop ↔ 0 < 0 ∧ Tendsto f l atTop ∨ 0 < 0 ∧ Tendsto f l atBot
state_after: no goals

tactic: simp [hr, hr.not_lt, tendsto_const_mul_atTop_of_pos]
state_before: case inr.inr
ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : LinearOrderedField α
l : Filter β
f : β → α
r : α
inst✝ : l.NeBot
hr : 0 < r
⊢ Tendsto (fun x => r * f x) l atTop ↔ 0 < r ∧ Tendsto f l atTop ∨ r < 0 ∧ Tendsto f l atBot
state_after: no goals
Theorem: isRightRegular_of_mul_eq_one
File: Mathlib/Algebra/Regular/Basic.lean

tactic: rw [h]
state_before: R : Type u_1
inst✝ : Monoid R
a b : R
h : a * b = 1
⊢ IsRightRegular (a * ?m.14590)
state_after: R : Type u_1
inst✝ : Monoid R
a b : R
h : a * b = 1
⊢ IsRightRegular 1

tactic: exact isRegular_one.right
state_before: R : Type u_1
inst✝ : Monoid R
a b : R
h : a * b = 1
⊢ IsRightRegular 1
state_after: no goals
Theorem: CategoryTheory.Subobject.inf_pullback
File: Mathlib/CategoryTheory/Subobject/Lattice.lean

tactic: revert f₁
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : HasPullbacks C
X Y : C
g : X ⟶ Y
f₁ f₂ : Subobject Y
⊢ (pullback g).obj (f₁ ⊓ f₂) = (pullback g).obj f₁ ⊓ (pullback g).obj f₂
state_after: C : Type u₁
inst✝² : Category.{v₁, u₁} C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : HasPullbacks C
X Y : C
g : X ⟶ Y
f₂ : Subobject Y
⊢ ∀ (f₁ : Subobject Y), (pullback g).obj (f₁ ⊓ f₂) = (pullback g).obj f₁ ⊓ (pullback g).obj f₂

tactic: apply Quotient.ind'
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : HasPullbacks C
X Y : C
g : X ⟶ Y
f₂ : Subobject Y
⊢ ∀ (f₁ : Subobject Y), (pullback g).obj (f₁ ⊓ f₂) = (pullback g).obj f₁ ⊓ (pullback g).obj f₂
state_after: case h
C : Type u₁
inst✝² : Category.{v₁, u₁} C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : HasPullbacks C
X Y : C
g : X ⟶ Y
f₂ : Subobject Y
⊢ ∀ (a : MonoOver Y), (pullback g).obj (Quotient.mk'' a ⊓ f₂) = (pullback g).obj (Quotient.mk'' a) ⊓ (pullback g).obj f₂

tactic: intro f₁
state_before: case h
C : Type u₁
inst✝² : Category.{v₁, u₁} C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : HasPullbacks C
X Y : C
g : X ⟶ Y
f₂ : Subobject Y
⊢ ∀ (a : MonoOver Y), (pullback g).obj (Quotient.mk'' a ⊓ f₂) = (pullback g).obj (Quotient.mk'' a) ⊓ (pullback g).obj f₂
state_after: case h
C : Type u₁
inst✝² : Category.{v₁, u₁} C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : HasPullbacks C
X Y : C
g : X ⟶ Y
f₂ : Subobject Y
f₁ : MonoOver Y
⊢ (pullback g).obj (Quotient.mk'' f₁ ⊓ f₂) = (pullback g).obj (Quotient.mk'' f₁) ⊓ (pullback g).obj f₂

tactic: erw [inf_def, inf_def, inf_eq_map_pullback', inf_eq_map_pullback', ← pullback_comp, ←
  map_pullback pullback.condition (pullbackIsPullback f₁.arrow g), ← pullback_comp,
  pullback.condition]
state_before: case h
C : Type u₁
inst✝² : Category.{v₁, u₁} C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : HasPullbacks C
X Y : C
g : X ⟶ Y
f₂ : Subobject Y
f₁ : MonoOver Y
⊢ (pullback g).obj (Quotient.mk'' f₁ ⊓ f₂) = (pullback g).obj (Quotient.mk'' f₁) ⊓ (pullback g).obj f₂
state_after: case h
C : Type u₁
inst✝² : Category.{v₁, u₁} C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : HasPullbacks C
X Y : C
g : X ⟶ Y
f₂ : Subobject Y
f₁ : MonoOver Y
⊢ (map pullback.snd).obj ((pullback (pullback.snd ≫ g)).obj f₂) =
    (map ((MonoOver.pullback g).obj f₁).arrow).obj ((pullback (((MonoOver.pullback g).obj f₁).arrow ≫ g)).obj f₂)

tactic: rfl
state_before: case h
C : Type u₁
inst✝² : Category.{v₁, u₁} C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : HasPullbacks C
X Y : C
g : X ⟶ Y
f₂ : Subobject Y
f₁ : MonoOver Y
⊢ (map pullback.snd).obj ((pullback (pullback.snd ≫ g)).obj f₂) =
    (map ((MonoOver.pullback g).obj f₁).arrow).obj ((pullback (((MonoOver.pullback g).obj f₁).arrow ≫ g)).obj f₂)
state_after: no goals
Theorem: Ordinal.opow_log_le_self
File: Mathlib/SetTheory/Ordinal/Exponential.lean

tactic: rcases eq_or_ne b 0 with (rfl | b0)
state_before: b x : Ordinal.{u_1}
hx : x ≠ 0
⊢ b ^ log b x ≤ x
state_after: case inl
x : Ordinal.{u_1}
hx : x ≠ 0
⊢ 0 ^ log 0 x ≤ x

case inr
b x : Ordinal.{u_1}
hx : x ≠ 0
b0 : b ≠ 0
⊢ b ^ log b x ≤ x

tactic: rcases lt_or_eq_of_le (one_le_iff_ne_zero.2 b0) with (hb | rfl)
state_before: case inr
b x : Ordinal.{u_1}
hx : x ≠ 0
b0 : b ≠ 0
⊢ b ^ log b x ≤ x
state_after: case inr.inl
b x : Ordinal.{u_1}
hx : x ≠ 0
b0 : b ≠ 0
hb : 1 < b
⊢ b ^ log b x ≤ x

case inr.inr
x : Ordinal.{u_1}
hx : x ≠ 0
b0 : 1 ≠ 0
⊢ 1 ^ log 1 x ≤ x

tactic: rw [zero_opow']
state_before: case inl
x : Ordinal.{u_1}
hx : x ≠ 0
⊢ 0 ^ log 0 x ≤ x
state_after: case inl
x : Ordinal.{u_1}
hx : x ≠ 0
⊢ 1 - log 0 x ≤ x

tactic: exact (sub_le_self _ _).trans (one_le_iff_ne_zero.2 hx)
state_before: case inl
x : Ordinal.{u_1}
hx : x ≠ 0
⊢ 1 - log 0 x ≤ x
state_after: no goals

tactic: refine le_of_not_lt fun h => (lt_succ (log b x)).not_le ?_
state_before: case inr.inl
b x : Ordinal.{u_1}
hx : x ≠ 0
b0 : b ≠ 0
hb : 1 < b
⊢ b ^ log b x ≤ x
state_after: case inr.inl
b x : Ordinal.{u_1}
hx : x ≠ 0
b0 : b ≠ 0
hb : 1 < b
h : x < b ^ log b x
⊢ succ (log b x) ≤ log b x

tactic: have := @csInf_le' _ _ { o | x < b ^ o } _ h
state_before: case inr.inl
b x : Ordinal.{u_1}
hx : x ≠ 0
b0 : b ≠ 0
hb : 1 < b
h : x < b ^ log b x
⊢ succ (log b x) ≤ log b x
state_after: case inr.inl
b x : Ordinal.{u_1}
hx : x ≠ 0
b0 : b ≠ 0
hb : 1 < b
h : x < b ^ log b x
this : sInf {o | x < b ^ o} ≤ log b x
⊢ succ (log b x) ≤ log b x

tactic: rwa [← succ_log_def hb hx] at this
state_before: case inr.inl
b x : Ordinal.{u_1}
hx : x ≠ 0
b0 : b ≠ 0
hb : 1 < b
h : x < b ^ log b x
this : sInf {o | x < b ^ o} ≤ log b x
⊢ succ (log b x) ≤ log b x
state_after: no goals

tactic: rwa [one_opow, one_le_iff_ne_zero]
state_before: case inr.inr
x : Ordinal.{u_1}
hx : x ≠ 0
b0 : 1 ≠ 0
⊢ 1 ^ log 1 x ≤ x
state_after: no goals