1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Nat.prime_divisors_eq_to_filter_divisors_prime
File: Mathlib/NumberTheory/Divisors.lean

tactic: rcases n.eq_zero_or_pos with (rfl | hn)
state_before: n✝ n : ℕ
⊢ n.factors.toFinset = filter Prime n.divisors
state_after: case inl
n : ℕ
⊢ (factors 0).toFinset = filter Prime (divisors 0)

case inr
n✝ n : ℕ
hn : n > 0
⊢ n.factors.toFinset = filter Prime n.divisors

tactic: simp
state_before: case inl
n : ℕ
⊢ (factors 0).toFinset = filter Prime (divisors 0)
state_after: no goals

tactic: ext q
state_before: case inr
n✝ n : ℕ
hn : n > 0
⊢ n.factors.toFinset = filter Prime n.divisors
state_after: case inr.a
n✝ n : ℕ
hn : n > 0
q : ℕ
⊢ q ∈ n.factors.toFinset ↔ q ∈ filter Prime n.divisors

tactic: simpa [hn, hn.ne', mem_factors] using and_comm
state_before: case inr.a
n✝ n : ℕ
hn : n > 0
q : ℕ
⊢ q ∈ n.factors.toFinset ↔ q ∈ filter Prime n.divisors
state_after: no goals
Theorem: List.filter_comm
File: Mathlib/Data/List/Basic.lean

tactic: simp [and_comm]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
p q : α → Bool
l : List α
⊢ filter p (filter q l) = filter q (filter p l)
state_after: no goals
Theorem: Real.toNNReal_le_toNNReal_iff'
File: Mathlib/Data/NNReal/Basic.lean

tactic: simp_rw [← not_lt, toNNReal_lt_toNNReal_iff', not_and_or]
state_before: r p : ℝ
⊢ r.toNNReal ≤ p.toNNReal ↔ r ≤ p ∨ r ≤ 0
state_after: no goals
Theorem: Finset.erase_union_of_mem
File: Mathlib/Data/Finset/Basic.lean

tactic: rw [← insert_erase (mem_union_right s ha), erase_union_distrib, ← union_insert, insert_erase ha]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s✝ t u v : Finset α
a b : α
ha : a ∈ t
s : Finset α
⊢ s.erase a ∪ t = s ∪ t
state_after: no goals
Theorem: Orientation.kahler_rotation_right
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean

tactic: simp only [o.rotation_apply, map_add, LinearMap.map_smulₛₗ, RingHom.id_apply, real_smul,
  kahler_rightAngleRotation_right, Real.Angle.coe_expMapCircle]
state_before: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x y : V
θ : Real.Angle
⊢ (o.kahler x) ((o.rotation θ) y) = ↑θ.expMapCircle * (o.kahler x) y
state_after: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x y : V
θ : Real.Angle
⊢ ↑θ.cos * (o.kahler x) y + ↑θ.sin * (I * (o.kahler x) y) = (↑θ.cos + ↑θ.sin * I) * (o.kahler x) y

tactic: ring
state_before: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x y : V
θ : Real.Angle
⊢ ↑θ.cos * (o.kahler x) y + ↑θ.sin * (I * (o.kahler x) y) = (↑θ.cos + ↑θ.sin * I) * (o.kahler x) y
state_after: no goals
Theorem: Finset.prod_add_prod_le'
File: Mathlib/Algebra/Order/BigOperators/Ring/Finset.lean

tactic: classical
  simp_rw [prod_eq_mul_prod_diff_singleton hi]
  refine le_trans ?_ (mul_le_mul_right' h2i _)
  rw [right_distrib]
  apply add_le_add <;> apply mul_le_mul_left' <;> apply prod_le_prod' <;>
          simp only [and_imp, mem_sdiff, mem_singleton] <;>
        intros <;>
      apply_assumption <;>
    assumption
state_before: ι : Type u_1
R : Type u_2
inst✝ : CanonicallyOrderedCommSemiring R
f g h : ι → R
s : Finset ι
i : ι
hi : i ∈ s
h2i : g i + h i ≤ f i
hgf : ∀ j ∈ s, j ≠ i → g j ≤ f j
hhf : ∀ j ∈ s, j ≠ i → h j ≤ f j
⊢ ∏ i ∈ s, g i + ∏ i ∈ s, h i ≤ ∏ i ∈ s, f i
state_after: no goals

tactic: simp_rw [prod_eq_mul_prod_diff_singleton hi]
state_before: ι : Type u_1
R : Type u_2
inst✝ : CanonicallyOrderedCommSemiring R
f g h : ι → R
s : Finset ι
i : ι
hi : i ∈ s
h2i : g i + h i ≤ f i
hgf : ∀ j ∈ s, j ≠ i → g j ≤ f j
hhf : ∀ j ∈ s, j ≠ i → h j ≤ f j
⊢ ∏ i ∈ s, g i + ∏ i ∈ s, h i ≤ ∏ i ∈ s, f i
state_after: ι : Type u_1
R : Type u_2
inst✝ : CanonicallyOrderedCommSemiring R
f g h : ι → R
s : Finset ι
i : ι
hi : i ∈ s
h2i : g i + h i ≤ f i
hgf : ∀ j ∈ s, j ≠ i → g j ≤ f j
hhf : ∀ j ∈ s, j ≠ i → h j ≤ f j
⊢ g i * ∏ i ∈ s \ {i}, g i + h i * ∏ i ∈ s \ {i}, h i ≤ f i * ∏ i ∈ s \ {i}, f i

tactic: refine le_trans ?_ (mul_le_mul_right' h2i _)
state_before: ι : Type u_1
R : Type u_2
inst✝ : CanonicallyOrderedCommSemiring R
f g h : ι → R
s : Finset ι
i : ι
hi : i ∈ s
h2i : g i + h i ≤ f i
hgf : ∀ j ∈ s, j ≠ i → g j ≤ f j
hhf : ∀ j ∈ s, j ≠ i → h j ≤ f j
⊢ g i * ∏ i ∈ s \ {i}, g i + h i * ∏ i ∈ s \ {i}, h i ≤ f i * ∏ i ∈ s \ {i}, f i
state_after: ι : Type u_1
R : Type u_2
inst✝ : CanonicallyOrderedCommSemiring R
f g h : ι → R
s : Finset ι
i : ι
hi : i ∈ s
h2i : g i + h i ≤ f i
hgf : ∀ j ∈ s, j ≠ i → g j ≤ f j
hhf : ∀ j ∈ s, j ≠ i → h j ≤ f j
⊢ g i * ∏ i ∈ s \ {i}, g i + h i * ∏ i ∈ s \ {i}, h i ≤ (g i + h i) * ∏ i ∈ s \ {i}, f i

tactic: rw [right_distrib]
state_before: ι : Type u_1
R : Type u_2
inst✝ : CanonicallyOrderedCommSemiring R
f g h : ι → R
s : Finset ι
i : ι
hi : i ∈ s
h2i : g i + h i ≤ f i
hgf : ∀ j ∈ s, j ≠ i → g j ≤ f j
hhf : ∀ j ∈ s, j ≠ i → h j ≤ f j
⊢ g i * ∏ i ∈ s \ {i}, g i + h i * ∏ i ∈ s \ {i}, h i ≤ (g i + h i) * ∏ i ∈ s \ {i}, f i
state_after: ι : Type u_1
R : Type u_2
inst✝ : CanonicallyOrderedCommSemiring R
f g h : ι → R
s : Finset ι
i : ι
hi : i ∈ s
h2i : g i + h i ≤ f i
hgf : ∀ j ∈ s, j ≠ i → g j ≤ f j
hhf : ∀ j ∈ s, j ≠ i → h j ≤ f j
⊢ g i * ∏ i ∈ s \ {i}, g i + h i * ∏ i ∈ s \ {i}, h i ≤ g i * ∏ i ∈ s \ {i}, f i + h i * ∏ i ∈ s \ {i}, f i

tactic: apply add_le_add <;> apply mul_le_mul_left' <;> apply prod_le_prod' <;>
        simp only [and_imp, mem_sdiff, mem_singleton] <;>
      intros <;>
    apply_assumption <;>
  assumption
state_before: ι : Type u_1
R : Type u_2
inst✝ : CanonicallyOrderedCommSemiring R
f g h : ι → R
s : Finset ι
i : ι
hi : i ∈ s
h2i : g i + h i ≤ f i
hgf : ∀ j ∈ s, j ≠ i → g j ≤ f j
hhf : ∀ j ∈ s, j ≠ i → h j ≤ f j
⊢ g i * ∏ i ∈ s \ {i}, g i + h i * ∏ i ∈ s \ {i}, h i ≤ g i * ∏ i ∈ s \ {i}, f i + h i * ∏ i ∈ s \ {i}, f i
state_after: no goals
Theorem: Seminorm.preimage_metric_closedBall
File: Mathlib/Analysis/Seminorm.lean

tactic: ext x
state_before: R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝⁶ : SeminormedRing 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module 𝕜 E
inst✝³ : SeminormedRing 𝕜₂
inst✝² : AddCommGroup E₂
inst✝¹ : Module 𝕜₂ E₂
σ₁₂ : 𝕜 →+* 𝕜₂
inst✝ : RingHomIsometric σ₁₂
p : Seminorm 𝕜 E
r : ℝ
⊢ ⇑p ⁻¹' Metric.closedBall 0 r = {x | p x ≤ r}
state_after: case h
R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝⁶ : SeminormedRing 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module 𝕜 E
inst✝³ : SeminormedRing 𝕜₂
inst✝² : AddCommGroup E₂
inst✝¹ : Module 𝕜₂ E₂
σ₁₂ : 𝕜 →+* 𝕜₂
inst✝ : RingHomIsometric σ₁₂
p : Seminorm 𝕜 E
r : ℝ
x : E
⊢ x ∈ ⇑p ⁻¹' Metric.closedBall 0 r ↔ x ∈ {x | p x ≤ r}

tactic: simp only [mem_setOf, mem_preimage, mem_closedBall_zero_iff,
  Real.norm_of_nonneg (apply_nonneg p _)]
state_before: case h
R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝⁶ : SeminormedRing 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module 𝕜 E
inst✝³ : SeminormedRing 𝕜₂
inst✝² : AddCommGroup E₂
inst✝¹ : Module 𝕜₂ E₂
σ₁₂ : 𝕜 →+* 𝕜₂
inst✝ : RingHomIsometric σ₁₂
p : Seminorm 𝕜 E
r : ℝ
x : E
⊢ x ∈ ⇑p ⁻¹' Metric.closedBall 0 r ↔ x ∈ {x | p x ≤ r}
state_after: no goals
Theorem: isRegular_mul_and_mul_iff
File: Mathlib/Algebra/Regular/Basic.lean

tactic: refine ⟨?_, ?_⟩
state_before: R : Type u_1
inst✝ : Semigroup R
a b : R
⊢ IsRegular (a * b) ∧ IsRegular (b * a) ↔ IsRegular a ∧ IsRegular b
state_after: case refine_1
R : Type u_1
inst✝ : Semigroup R
a b : R
⊢ IsRegular (a * b) ∧ IsRegular (b * a) → IsRegular a ∧ IsRegular b

case refine_2
R : Type u_1
inst✝ : Semigroup R
a b : R
⊢ IsRegular a ∧ IsRegular b → IsRegular (a * b) ∧ IsRegular (b * a)

tactic: rintro ⟨ab, ba⟩
state_before: case refine_1
R : Type u_1
inst✝ : Semigroup R
a b : R
⊢ IsRegular (a * b) ∧ IsRegular (b * a) → IsRegular a ∧ IsRegular b
state_after: case refine_1.intro
R : Type u_1
inst✝ : Semigroup R
a b : R
ab : IsRegular (a * b)
ba : IsRegular (b * a)
⊢ IsRegular a ∧ IsRegular b

tactic: exact
  ⟨⟨IsLeftRegular.of_mul ba.left, IsRightRegular.of_mul ab.right⟩,
    ⟨IsLeftRegular.of_mul ab.left, IsRightRegular.of_mul ba.right⟩⟩
state_before: case refine_1.intro
R : Type u_1
inst✝ : Semigroup R
a b : R
ab : IsRegular (a * b)
ba : IsRegular (b * a)
⊢ IsRegular a ∧ IsRegular b
state_after: no goals

tactic: rintro ⟨ha, hb⟩
state_before: case refine_2
R : Type u_1
inst✝ : Semigroup R
a b : R
⊢ IsRegular a ∧ IsRegular b → IsRegular (a * b) ∧ IsRegular (b * a)
state_after: case refine_2.intro
R : Type u_1
inst✝ : Semigroup R
a b : R
ha : IsRegular a
hb : IsRegular b
⊢ IsRegular (a * b) ∧ IsRegular (b * a)

tactic: exact ⟨ha.mul hb, hb.mul ha⟩
state_before: case refine_2.intro
R : Type u_1
inst✝ : Semigroup R
a b : R
ha : IsRegular a
hb : IsRegular b
⊢ IsRegular (a * b) ∧ IsRegular (b * a)
state_after: no goals
Theorem: Zsqrtd.nonnegg_pos_neg
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

tactic: rw [nonnegg_comm]
state_before: d✝ : ℤ
c d a b : ℕ
⊢ Nonnegg c d (↑a) (-↑b) ↔ SqLe b c a d
state_after: d✝ : ℤ
c d a b : ℕ
⊢ Nonnegg d c (-↑b) ↑a ↔ SqLe b c a d

tactic: exact nonnegg_neg_pos
state_before: d✝ : ℤ
c d a b : ℕ
⊢ Nonnegg d c (-↑b) ↑a ↔ SqLe b c a d
state_after: no goals
Theorem: ContinuousMap.sup_mem_closed_subalgebra
File: Mathlib/Topology/ContinuousFunction/StoneWeierstrass.lean

tactic: convert sup_mem_subalgebra_closure A f g
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
h : IsClosed ↑A
f g : ↥A
⊢ ↑f ⊔ ↑g ∈ A
state_after: case h.e'_5
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
h : IsClosed ↑A
f g : ↥A
⊢ A = A.topologicalClosure

tactic: apply SetLike.ext'
state_before: case h.e'_5
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
h : IsClosed ↑A
f g : ↥A
⊢ A = A.topologicalClosure
state_after: case h.e'_5.h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
h : IsClosed ↑A
f g : ↥A
⊢ ↑A = ↑A.topologicalClosure

tactic: symm
state_before: case h.e'_5.h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
h : IsClosed ↑A
f g : ↥A
⊢ ↑A = ↑A.topologicalClosure
state_after: case h.e'_5.h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
h : IsClosed ↑A
f g : ↥A
⊢ ↑A.topologicalClosure = ↑A

tactic: erw [closure_eq_iff_isClosed]
state_before: case h.e'_5.h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
h : IsClosed ↑A
f g : ↥A
⊢ ↑A.topologicalClosure = ↑A
state_after: case h.e'_5.h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
h : IsClosed ↑A
f g : ↥A
⊢ IsClosed ↑A

tactic: exact h
state_before: case h.e'_5.h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
h : IsClosed ↑A
f g : ↥A
⊢ IsClosed ↑A
state_after: no goals
Theorem: List.reduceOption_length_lt_iff
File: Mathlib/Data/List/ReduceOption.lean

tactic: rw [Nat.lt_iff_le_and_ne, and_iff_right (reduceOption_length_le l), Ne,
  reduceOption_length_eq_iff]
state_before: α : Type u_1
β : Type u_2
l : List (Option α)
⊢ l.reduceOption.length < l.length ↔ none ∈ l
state_after: α : Type u_1
β : Type u_2
l : List (Option α)
⊢ (¬∀ (x : Option α), x ∈ l → x.isSome = true) ↔ none ∈ l

tactic: induction l <;> simp [*]
state_before: α : Type u_1
β : Type u_2
l : List (Option α)
⊢ (¬∀ (x : Option α), x ∈ l → x.isSome = true) ↔ none ∈ l
state_after: case cons
α : Type u_1
β : Type u_2
head✝ : Option α
tail✝ : List (Option α)
tail_ih✝ : (¬∀ (x : Option α), x ∈ tail✝ → x.isSome = true) ↔ none ∈ tail✝
⊢ head✝.isSome = true → none ∈ tail✝ ↔ none = head✝ ∨ none ∈ tail✝

tactic: rw [@eq_comm _ none, ← Option.not_isSome_iff_eq_none, Decidable.imp_iff_not_or]
state_before: case cons
α : Type u_1
β : Type u_2
head✝ : Option α
tail✝ : List (Option α)
tail_ih✝ : (¬∀ (x : Option α), x ∈ tail✝ → x.isSome = true) ↔ none ∈ tail✝
⊢ head✝.isSome = true → none ∈ tail✝ ↔ none = head✝ ∨ none ∈ tail✝
state_after: no goals
Theorem: CategoryTheory.MonoidalCategory.pentagon_inv_hom_hom_hom_inv
File: Mathlib/CategoryTheory/Monoidal/Category.lean

tactic: simp
state_before: C✝ : Type u
𝒞 : Category.{v, u} C✝
inst✝² : MonoidalCategory C✝
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : MonoidalCategory C
U V W X Y Z : C
⊢ inv ((α_ (W ⊗ X) Y Z).inv ≫ (α_ W X Y).hom ▷ Z ≫ (α_ W (X ⊗ Y) Z).hom) =
    inv ((α_ W X (Y ⊗ Z)).hom ≫ W ◁ (α_ X Y Z).inv)
state_after: no goals
Theorem: CliffordAlgebraComplex.toComplex_comp_ofComplex
File: Mathlib/LinearAlgebra/CliffordAlgebra/Equivs.lean

tactic: ext1
state_before: ⊢ toComplex.comp ofComplex = AlgHom.id ℝ ℂ
state_after: case h

⊢ (toComplex.comp ofComplex) Complex.I = (AlgHom.id ℝ ℂ) Complex.I

tactic: dsimp only [AlgHom.comp_apply, Subtype.coe_mk, AlgHom.id_apply]
state_before: case h

⊢ (toComplex.comp ofComplex) Complex.I = (AlgHom.id ℝ ℂ) Complex.I
state_after: case h

⊢ toComplex (ofComplex Complex.I) = Complex.I

tactic: rw [ofComplex_I, toComplex_ι, one_smul]
state_before: case h

⊢ toComplex (ofComplex Complex.I) = Complex.I
state_after: no goals
Theorem: TopCat.embedding_of_pullback_embeddings
File: Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean

tactic: convert H₂.comp (snd_embedding_of_left_embedding H₁ g)
state_before: J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
H₁ : Embedding ⇑f
H₂ : Embedding ⇑g
⊢ Embedding ⇑(limit.π (cospan f g) WalkingCospan.one)
state_after: case h.e'_5.h
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
H₁ : Embedding ⇑f
H₂ : Embedding ⇑g
e_2✝ : ↑((cospan f g).obj WalkingCospan.one) = ↑S
⊢ ⇑(limit.π (cospan f g) WalkingCospan.one) = ⇑g ∘ ⇑pullback.snd

tactic: erw [← coe_comp]
state_before: case h.e'_5.h
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
H₁ : Embedding ⇑f
H₂ : Embedding ⇑g
e_2✝ : ↑((cospan f g).obj WalkingCospan.one) = ↑S
⊢ ⇑(limit.π (cospan f g) WalkingCospan.one) = ⇑g ∘ ⇑pullback.snd
state_after: case h.e'_5.h
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
H₁ : Embedding ⇑f
H₂ : Embedding ⇑g
e_2✝ : ↑((cospan f g).obj WalkingCospan.one) = ↑S
⊢ ⇑(limit.π (cospan f g) WalkingCospan.one) = ⇑(pullback.snd ≫ g)

tactic: rw [← limit.w _ WalkingCospan.Hom.inr]
state_before: case h.e'_5.h
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
H₁ : Embedding ⇑f
H₂ : Embedding ⇑g
e_2✝ : ↑((cospan f g).obj WalkingCospan.one) = ↑S
⊢ ⇑(limit.π (cospan f g) WalkingCospan.one) = ⇑(pullback.snd ≫ g)
state_after: case h.e'_5.h
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
H₁ : Embedding ⇑f
H₂ : Embedding ⇑g
e_2✝ : ↑((cospan f g).obj WalkingCospan.one) = ↑S
⊢ ⇑(limit.π (cospan f g) WalkingCospan.right ≫ (cospan f g).map WalkingCospan.Hom.inr) = ⇑(pullback.snd ≫ g)

tactic: rfl
state_before: case h.e'_5.h
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
H₁ : Embedding ⇑f
H₂ : Embedding ⇑g
e_2✝ : ↑((cospan f g).obj WalkingCospan.one) = ↑S
⊢ ⇑(limit.π (cospan f g) WalkingCospan.right ≫ (cospan f g).map WalkingCospan.Hom.inr) = ⇑(pullback.snd ≫ g)
state_after: no goals
Theorem: Set.pairwise_disjoint_Ioo_intCast
File: Mathlib/Algebra/Order/Interval/Set/Group.lean

tactic: simpa only [zero_add] using pairwise_disjoint_Ioo_add_intCast (0 : α)
state_before: α : Type u_1
inst✝ : OrderedRing α
a : α
⊢ Pairwise (Disjoint on fun n => Ioo (↑n) (↑n + 1))
state_after: no goals
Theorem: TopCat.Presheaf.stalk_hom_ext
File: Mathlib/Topology/Sheaves/Stalks.lean

tactic: induction' U using Opposite.rec with U
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y✝ Z : TopCat
F : Presheaf C X
x : ↑X
Y : C
f₁ f₂ : F.stalk x ⟶ Y
ih : ∀ (U : Opens ↑X) (hxU : x ∈ U), F.germ ⟨x, hxU⟩ ≫ f₁ = F.germ ⟨x, hxU⟩ ≫ f₂
U : (OpenNhds x)ᵒᵖ
⊢ colimit.ι (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F) U ≫ f₁ =
    colimit.ι (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F) U ≫ f₂
state_after: case op
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y✝ Z : TopCat
F : Presheaf C X
x : ↑X
Y : C
f₁ f₂ : F.stalk x ⟶ Y
ih : ∀ (U : Opens ↑X) (hxU : x ∈ U), F.germ ⟨x, hxU⟩ ≫ f₁ = F.germ ⟨x, hxU⟩ ≫ f₂
U : OpenNhds x
⊢ colimit.ι (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F) { unop := U } ≫ f₁ =
    colimit.ι (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F) { unop := U } ≫ f₂

tactic: cases' U with U hxU
state_before: case op
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y✝ Z : TopCat
F : Presheaf C X
x : ↑X
Y : C
f₁ f₂ : F.stalk x ⟶ Y
ih : ∀ (U : Opens ↑X) (hxU : x ∈ U), F.germ ⟨x, hxU⟩ ≫ f₁ = F.germ ⟨x, hxU⟩ ≫ f₂
U : OpenNhds x
⊢ colimit.ι (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F) { unop := U } ≫ f₁ =
    colimit.ι (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F) { unop := U } ≫ f₂
state_after: case op.mk
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y✝ Z : TopCat
F : Presheaf C X
x : ↑X
Y : C
f₁ f₂ : F.stalk x ⟶ Y
ih : ∀ (U : Opens ↑X) (hxU : x ∈ U), F.germ ⟨x, hxU⟩ ≫ f₁ = F.germ ⟨x, hxU⟩ ≫ f₂
U : Opens ↑X
hxU : x ∈ U
⊢ colimit.ι (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F)
        { unop := { obj := U, property := hxU } } ≫
      f₁ =
    colimit.ι (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F)
        { unop := { obj := U, property := hxU } } ≫
      f₂

tactic: exact ih U hxU
state_before: case op.mk
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y✝ Z : TopCat
F : Presheaf C X
x : ↑X
Y : C
f₁ f₂ : F.stalk x ⟶ Y
ih : ∀ (U : Opens ↑X) (hxU : x ∈ U), F.germ ⟨x, hxU⟩ ≫ f₁ = F.germ ⟨x, hxU⟩ ≫ f₂
U : Opens ↑X
hxU : x ∈ U
⊢ colimit.ι (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F)
        { unop := { obj := U, property := hxU } } ≫
      f₁ =
    colimit.ι (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F)
        { unop := { obj := U, property := hxU } } ≫
      f₂
state_after: no goals
Theorem: LocalizedModule.mk_cancel
File: Mathlib/Algebra/Module/LocalizedModule.lean

tactic: simp
state_before: R : Type u
inst✝⁵ : CommSemiring R
S : Submonoid R
M : Type v
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
T : Type u_1
inst✝² : CommSemiring T
inst✝¹ : Algebra R T
inst✝ : IsLocalization S T
s : ↥S
m : M
⊢ 1 • 1 • s • m = 1 • s • m
state_after: no goals
Theorem: Nat.one_le_div_iff
File: Mathlib/Data/Nat/Defs.lean

tactic: rw [le_div_iff_mul_le hb, Nat.one_mul]
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
hb : 0 < b
⊢ 1 ≤ a / b ↔ b ≤ a
state_after: no goals
Theorem: DFA.toNFA_correct
File: Mathlib/Computability/NFA.lean

tactic: ext x
state_before: α : Type u
σ σ' : Type v
M✝ : NFA α σ
M : DFA α σ
⊢ M.toNFA.accepts = M.accepts
state_after: case h
α : Type u
σ σ' : Type v
M✝ : NFA α σ
M : DFA α σ
x : List α
⊢ x ∈ M.toNFA.accepts ↔ x ∈ M.accepts

tactic: rw [NFA.mem_accepts, toNFA_start, toNFA_evalFrom_match]
state_before: case h
α : Type u
σ σ' : Type v
M✝ : NFA α σ
M : DFA α σ
x : List α
⊢ x ∈ M.toNFA.accepts ↔ x ∈ M.accepts
state_after: case h
α : Type u
σ σ' : Type v
M✝ : NFA α σ
M : DFA α σ
x : List α
⊢ (∃ S ∈ M.toNFA.accept, S ∈ {M.evalFrom M.start x}) ↔ x ∈ M.accepts

tactic: constructor
state_before: case h
α : Type u
σ σ' : Type v
M✝ : NFA α σ
M : DFA α σ
x : List α
⊢ (∃ S ∈ M.toNFA.accept, S ∈ {M.evalFrom M.start x}) ↔ x ∈ M.accepts
state_after: case h.mp
α : Type u
σ σ' : Type v
M✝ : NFA α σ
M : DFA α σ
x : List α
⊢ (∃ S ∈ M.toNFA.accept, S ∈ {M.evalFrom M.start x}) → x ∈ M.accepts

case h.mpr
α : Type u
σ σ' : Type v
M✝ : NFA α σ
M : DFA α σ
x : List α
⊢ x ∈ M.accepts → ∃ S ∈ M.toNFA.accept, S ∈ {M.evalFrom M.start x}

tactic: rintro ⟨S, hS₁, hS₂⟩
state_before: case h.mp
α : Type u
σ σ' : Type v
M✝ : NFA α σ
M : DFA α σ
x : List α
⊢ (∃ S ∈ M.toNFA.accept, S ∈ {M.evalFrom M.start x}) → x ∈ M.accepts
state_after: case h.mp.intro.intro
α : Type u
σ σ' : Type v
M✝ : NFA α σ
M : DFA α σ
x : List α
S : σ
hS₁ : S ∈ M.toNFA.accept
hS₂ : S ∈ {M.evalFrom M.start x}
⊢ x ∈ M.accepts

tactic: rwa [Set.mem_singleton_iff.mp hS₂] at hS₁
state_before: case h.mp.intro.intro
α : Type u
σ σ' : Type v
M✝ : NFA α σ
M : DFA α σ
x : List α
S : σ
hS₁ : S ∈ M.toNFA.accept
hS₂ : S ∈ {M.evalFrom M.start x}
⊢ x ∈ M.accepts
state_after: no goals

tactic: exact fun h => ⟨M.eval x, h, rfl⟩
state_before: case h.mpr
α : Type u
σ σ' : Type v
M✝ : NFA α σ
M : DFA α σ
x : List α
⊢ x ∈ M.accepts → ∃ S ∈ M.toNFA.accept, S ∈ {M.evalFrom M.start x}
state_after: no goals
Theorem: WittVector.RecursionMain.root_exists
File: Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean

tactic: simp only [succNthDefiningPoly_degree p n a₁ a₂ bs ha₁ ha₂, ne_eq, Nat.cast_eq_zero,
  hp.out.ne_zero, not_false_eq_true]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝² : Field k
inst✝¹ : CharP k p
inst✝ : IsAlgClosed k
n : ℕ
a₁ a₂ : 𝕎 k
bs : Fin (n + 1) → k
ha₁ : a₁.coeff 0 ≠ 0
ha₂ : a₂.coeff 0 ≠ 0
⊢ (succNthDefiningPoly p n a₁ a₂ bs).degree ≠ 0
state_after: no goals
Theorem: pow_three'
File: Mathlib/Algebra/Group/Defs.lean

tactic: rw [pow_succ, pow_two]
state_before: G : Type u_1
M : Type u_2
inst✝ : Monoid M
a✝ b c : M
m n : ℕ
a : M
⊢ a ^ 3 = a * a * a
state_after: no goals
Theorem: MulAction.minimalPeriod_eq_card
File: Mathlib/Data/ZMod/Quotient.lean

tactic: rw [← Fintype.ofEquiv_card (orbitZPowersEquiv a b), @ZMod.card _ (_)]
state_before: n : ℕ
A : Type u_1
R : Type u_2
inst✝⁴ : AddGroup A
inst✝³ : Ring R
α : Type u_3
β : Type u_4
inst✝² : Group α
a : α
inst✝¹ : MulAction α β
b : β
inst✝ : Fintype ↑(orbit (↥(zpowers a)) b)
⊢ minimalPeriod (fun x => a • x) b = Fintype.card ↑(orbit (↥(zpowers a)) b)
state_after: no goals
Theorem: Quaternion.normSq_add
File: Mathlib/Algebra/Quaternion.lean

tactic: simp_rw [normSq_def, star_add, add_mul, mul_add, add_re]
state_before: S : Type u_1
T : Type u_2
R : Type u_3
inst✝ : CommRing R
r x y z : R
a✝ b✝ c a b : ℍ[R]
⊢ normSq (a + b) = normSq a + (a * star b).re + ((b * star a).re + normSq b)
state_after: no goals

tactic: abel
state_before: S : Type u_1
T : Type u_2
R : Type u_3
inst✝ : CommRing R
r x y z : R
a✝ b✝ c a b : ℍ[R]
⊢ normSq a + (a * star b).re + ((b * star a).re + normSq b) = normSq a + normSq b + ((a * star b).re + (b * star a).re)
state_after: no goals

tactic: rw [← add_re, ← star_mul_star a b, self_add_star', coe_re]
state_before: S : Type u_1
T : Type u_2
R : Type u_3
inst✝ : CommRing R
r x y z : R
a✝ b✝ c a b : ℍ[R]
⊢ normSq a + normSq b + ((a * star b).re + (b * star a).re) = normSq a + normSq b + 2 * (a * star b).re
state_after: no goals
Theorem: Multiset.filter_comm
File: Mathlib/Data/Multiset/Basic.lean

tactic: simp [and_comm]
state_before: α : Type u_1
β : Type v
γ : Type u_2
p : α → Prop
inst✝¹ : DecidablePred p
q : α → Prop
inst✝ : DecidablePred q
s : Multiset α
⊢ filter p (filter q s) = filter q (filter p s)
state_after: no goals
Theorem: SetTheory.PGame.fuzzy_congr
File: Mathlib/SetTheory/Game/PGame.lean

tactic: rw [lf_congr hx hy, lf_congr hy hx]
state_before: xl xr : Type u
x₁ y₁ x₂ y₂ : PGame
hx : x₁ ≈ x₂
hy : y₁ ≈ y₂
⊢ x₁ ⧏ y₁ ∧ y₁ ⧏ x₁ ↔ x₂ ⧏ y₂ ∧ y₂ ⧏ x₂
state_after: no goals