1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Polynomial.roots_mul
File: Mathlib/Algebra/Polynomial/Roots.lean

tactic: classical
exact Multiset.ext.mpr fun r => by
  rw [count_add, count_roots, count_roots, count_roots, rootMultiplicity_mul hpq]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q✝ p q : R[X]
hpq : p * q ≠ 0
⊢ (p * q).roots = p.roots + q.roots
state_after: no goals

tactic: exact Multiset.ext.mpr fun r => by
  rw [count_add, count_roots, count_roots, count_roots, rootMultiplicity_mul hpq]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q✝ p q : R[X]
hpq : p * q ≠ 0
⊢ (p * q).roots = p.roots + q.roots
state_after: no goals

tactic: rw [count_add, count_roots, count_roots, count_roots, rootMultiplicity_mul hpq]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q✝ p q : R[X]
hpq : p * q ≠ 0
r : R
⊢ count r (p * q).roots = count r (p.roots + q.roots)
state_after: no goals
Theorem: iteratedDerivWithin_univ
File: Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean

tactic: ext x
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x : 𝕜
⊢ iteratedDerivWithin n f univ = iteratedDeriv n f
state_after: case h
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ x : 𝕜
⊢ iteratedDerivWithin n f univ x = iteratedDeriv n f x

tactic: rw [iteratedDerivWithin, iteratedDeriv, iteratedFDerivWithin_univ]
state_before: case h
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ x : 𝕜
⊢ iteratedDerivWithin n f univ x = iteratedDeriv n f x
state_after: no goals
Theorem: ProbabilityTheory.kernel.measurableSet_mutuallySingular
File: Mathlib/Probability/Kernel/RadonNikodym.lean

tactic: simp_rw [← withDensity_rnDeriv_eq_zero_iff_mutuallySingular,
  withDensity_rnDeriv_eq_zero_iff_measure_eq_zero]
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ✝ η✝ : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
κ η : ↥(kernel α γ)
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
⊢ MeasurableSet {a | κ a ⟂ₘ η a}
state_after: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ✝ η✝ : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
κ η : ↥(kernel α γ)
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
⊢ MeasurableSet {a | (κ a) (mutuallySingularSetSlice κ η a)ᶜ = 0}

tactic: exact measurable_kernel_prod_mk_left (measurableSet_mutuallySingularSet κ η).compl
  (measurableSet_singleton 0)
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ✝ η✝ : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
κ η : ↥(kernel α γ)
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
⊢ MeasurableSet {a | (κ a) (mutuallySingularSetSlice κ η a)ᶜ = 0}
state_after: no goals
Theorem: HNNExtension.NormalWord.not_cancels_of_cons_hyp
File: Mathlib/GroupTheory/HNNExtension.lean

tactic: simp only [Cancels, Option.map_eq_some', Prod.exists,
  exists_and_right, exists_eq_right, not_and, not_exists]
state_before: G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
u : ℤˣ
w : NormalWord d
h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?, w.head ∈ toSubgroup A B u → u = u'
⊢ ¬Cancels u w
state_after: G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
u : ℤˣ
w : NormalWord d
h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?, w.head ∈ toSubgroup A B u → u = u'
⊢ w.head ∈ toSubgroup A B u → ∀ (x : G), ¬w.toList.head? = some (-u, x)

tactic: intro hw x hx
state_before: G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
u : ℤˣ
w : NormalWord d
h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?, w.head ∈ toSubgroup A B u → u = u'
⊢ w.head ∈ toSubgroup A B u → ∀ (x : G), ¬w.toList.head? = some (-u, x)
state_after: G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
u : ℤˣ
w : NormalWord d
h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?, w.head ∈ toSubgroup A B u → u = u'
hw : w.head ∈ toSubgroup A B u
x : G
hx : w.toList.head? = some (-u, x)
⊢ False

tactic: rw [hx] at h2
state_before: G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
u : ℤˣ
w : NormalWord d
h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?, w.head ∈ toSubgroup A B u → u = u'
hw : w.head ∈ toSubgroup A B u
x : G
hx : w.toList.head? = some (-u, x)
⊢ False
state_after: G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
u : ℤˣ
w : NormalWord d
hw : w.head ∈ toSubgroup A B u
x : G
h2 : ∀ u' ∈ Option.map Prod.fst (some (-u, x)), w.head ∈ toSubgroup A B u → u = u'
hx : w.toList.head? = some (-u, x)
⊢ False

tactic: simpa using h2 (-u) rfl hw
state_before: G : Type u_1
inst✝³ : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝² : Group H
M : Type u_3
inst✝¹ : Monoid M
d : TransversalPair G A B
inst✝ : DecidableEq G
u : ℤˣ
w : NormalWord d
hw : w.head ∈ toSubgroup A B u
x : G
h2 : ∀ u' ∈ Option.map Prod.fst (some (-u, x)), w.head ∈ toSubgroup A B u → u = u'
hx : w.toList.head? = some (-u, x)
⊢ False
state_after: no goals
Theorem: Metric.eventually_not_mem_cthickening_of_infEdist_pos
File: Mathlib/Topology/MetricSpace/Thickening.lean

tactic: obtain ⟨ε, ⟨ε_pos, ε_lt⟩⟩ := exists_real_pos_lt_infEdist_of_not_mem_closure h
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝ : PseudoEMetricSpace α
δ ε : ℝ
s t : Set α
x✝ : α
E : Set α
x : α
h : x ∉ closure E
⊢ ∀ᶠ (δ : ℝ) in 𝓝 0, x ∉ cthickening δ E
state_after: case intro.intro
ι : Sort u_1
α : Type u
β : Type v
inst✝ : PseudoEMetricSpace α
δ ε✝ : ℝ
s t : Set α
x✝ : α
E : Set α
x : α
h : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
⊢ ∀ᶠ (δ : ℝ) in 𝓝 0, x ∉ cthickening δ E

tactic: filter_upwards [eventually_lt_nhds ε_pos] with δ hδ
state_before: case intro.intro
ι : Sort u_1
α : Type u
β : Type v
inst✝ : PseudoEMetricSpace α
δ ε✝ : ℝ
s t : Set α
x✝ : α
E : Set α
x : α
h : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
⊢ ∀ᶠ (δ : ℝ) in 𝓝 0, x ∉ cthickening δ E
state_after: case h
ι : Sort u_1
α : Type u
β : Type v
inst✝ : PseudoEMetricSpace α
δ✝ ε✝ : ℝ
s t : Set α
x✝ : α
E : Set α
x : α
h : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
δ : ℝ
hδ : δ < ε
⊢ x ∉ cthickening δ E

tactic: simp only [cthickening, mem_setOf_eq, not_le]
state_before: case h
ι : Sort u_1
α : Type u
β : Type v
inst✝ : PseudoEMetricSpace α
δ✝ ε✝ : ℝ
s t : Set α
x✝ : α
E : Set α
x : α
h : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
δ : ℝ
hδ : δ < ε
⊢ x ∉ cthickening δ E
state_after: case h
ι : Sort u_1
α : Type u
β : Type v
inst✝ : PseudoEMetricSpace α
δ✝ ε✝ : ℝ
s t : Set α
x✝ : α
E : Set α
x : α
h : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
δ : ℝ
hδ : δ < ε
⊢ ENNReal.ofReal δ < infEdist x E

tactic: exact ((ofReal_lt_ofReal_iff ε_pos).mpr hδ).trans ε_lt
state_before: case h
ι : Sort u_1
α : Type u
β : Type v
inst✝ : PseudoEMetricSpace α
δ✝ ε✝ : ℝ
s t : Set α
x✝ : α
E : Set α
x : α
h : x ∉ closure E
ε : ℝ
ε_pos : 0 < ε
ε_lt : ENNReal.ofReal ε < infEdist x E
δ : ℝ
hδ : δ < ε
⊢ ENNReal.ofReal δ < infEdist x E
state_after: no goals
Theorem: WithLp.prod_edist_eq_of_L2
File: Mathlib/Analysis/NormedSpace/ProdLp.lean

tactic: simp [prod_edist_eq_add]
state_before: p : ℝ≥0∞
𝕜 : Type u_1
α : Type u_2
β : Type u_3
hp : Fact (1 ≤ p)
inst✝¹ : SeminormedAddCommGroup α
inst✝ : SeminormedAddCommGroup β
x y : WithLp 2 (α × β)
⊢ edist x y = (edist x.1 y.1 ^ 2 + edist x.2 y.2 ^ 2) ^ (1 / 2)
state_after: no goals
Theorem: Polynomial.natDegree_mul
File: Mathlib/Algebra/Polynomial/RingDivision.lean

tactic: rw [← Nat.cast_inj (R := WithBot ℕ), ← degree_eq_natDegree (mul_ne_zero hp hq),
  Nat.cast_add, ← degree_eq_natDegree hp, ← degree_eq_natDegree hq, degree_mul]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : p ≠ 0
hq : q ≠ 0
⊢ (p * q).natDegree = p.natDegree + q.natDegree
state_after: no goals
Theorem: CategoryTheory.associativity_app
File: Mathlib/CategoryTheory/Monoidal/End.lean

tactic: have := congr_app (F.toLaxMonoidalFunctor.associativity m₁ m₂ m₃) X
state_before: C : Type u
inst✝² : Category.{v, u} C
M : Type u_1
inst✝¹ : Category.{u_2, u_1} M
inst✝ : MonoidalCategory M
F : MonoidalFunctor M (C ⥤ C)
m₁ m₂ m₃ : M
X : C
⊢ (F.obj m₃).map ((F.μ m₁ m₂).app X) ≫ (F.μ (m₁ ⊗ m₂) m₃).app X ≫ (F.map (α_ m₁ m₂ m₃).hom).app X =
    (F.μ m₂ m₃).app ((F.obj m₁).obj X) ≫ (F.μ m₁ (m₂ ⊗ m₃)).app X
state_after: C : Type u
inst✝² : Category.{v, u} C
M : Type u_1
inst✝¹ : Category.{u_2, u_1} M
inst✝ : MonoidalCategory M
F : MonoidalFunctor M (C ⥤ C)
m₁ m₂ m₃ : M
X : C
this :
  (F.μ m₁ m₂ ▷ F.obj m₃ ≫ F.μ (m₁ ⊗ m₂) m₃ ≫ F.map (α_ m₁ m₂ m₃).hom).app X =
    ((α_ (F.obj m₁) (F.obj m₂) (F.obj m₃)).hom ≫ F.obj m₁ ◁ F.μ m₂ m₃ ≫ F.μ m₁ (m₂ ⊗ m₃)).app X
⊢ (F.obj m₃).map ((F.μ m₁ m₂).app X) ≫ (F.μ (m₁ ⊗ m₂) m₃).app X ≫ (F.map (α_ m₁ m₂ m₃).hom).app X =
    (F.μ m₂ m₃).app ((F.obj m₁).obj X) ≫ (F.μ m₁ (m₂ ⊗ m₃)).app X

tactic: dsimp at this
state_before: C : Type u
inst✝² : Category.{v, u} C
M : Type u_1
inst✝¹ : Category.{u_2, u_1} M
inst✝ : MonoidalCategory M
F : MonoidalFunctor M (C ⥤ C)
m₁ m₂ m₃ : M
X : C
this :
  (F.μ m₁ m₂ ▷ F.obj m₃ ≫ F.μ (m₁ ⊗ m₂) m₃ ≫ F.map (α_ m₁ m₂ m₃).hom).app X =
    ((α_ (F.obj m₁) (F.obj m₂) (F.obj m₃)).hom ≫ F.obj m₁ ◁ F.μ m₂ m₃ ≫ F.μ m₁ (m₂ ⊗ m₃)).app X
⊢ (F.obj m₃).map ((F.μ m₁ m₂).app X) ≫ (F.μ (m₁ ⊗ m₂) m₃).app X ≫ (F.map (α_ m₁ m₂ m₃).hom).app X =
    (F.μ m₂ m₃).app ((F.obj m₁).obj X) ≫ (F.μ m₁ (m₂ ⊗ m₃)).app X
state_after: C : Type u
inst✝² : Category.{v, u} C
M : Type u_1
inst✝¹ : Category.{u_2, u_1} M
inst✝ : MonoidalCategory M
F : MonoidalFunctor M (C ⥤ C)
m₁ m₂ m₃ : M
X : C
this :
  (F.obj m₃).map ((F.μ m₁ m₂).app X) ≫ (F.μ (m₁ ⊗ m₂) m₃).app X ≫ (F.map (α_ m₁ m₂ m₃).hom).app X =
    𝟙 ((F.obj m₃).obj ((F.obj m₂).obj ((F.obj m₁).obj X))) ≫
      (F.μ m₂ m₃).app ((F.obj m₁).obj X) ≫ (F.μ m₁ (m₂ ⊗ m₃)).app X
⊢ (F.obj m₃).map ((F.μ m₁ m₂).app X) ≫ (F.μ (m₁ ⊗ m₂) m₃).app X ≫ (F.map (α_ m₁ m₂ m₃).hom).app X =
    (F.μ m₂ m₃).app ((F.obj m₁).obj X) ≫ (F.μ m₁ (m₂ ⊗ m₃)).app X

tactic: simpa using this
state_before: C : Type u
inst✝² : Category.{v, u} C
M : Type u_1
inst✝¹ : Category.{u_2, u_1} M
inst✝ : MonoidalCategory M
F : MonoidalFunctor M (C ⥤ C)
m₁ m₂ m₃ : M
X : C
this :
  (F.obj m₃).map ((F.μ m₁ m₂).app X) ≫ (F.μ (m₁ ⊗ m₂) m₃).app X ≫ (F.map (α_ m₁ m₂ m₃).hom).app X =
    𝟙 ((F.obj m₃).obj ((F.obj m₂).obj ((F.obj m₁).obj X))) ≫
      (F.μ m₂ m₃).app ((F.obj m₁).obj X) ≫ (F.μ m₁ (m₂ ⊗ m₃)).app X
⊢ (F.obj m₃).map ((F.μ m₁ m₂).app X) ≫ (F.μ (m₁ ⊗ m₂) m₃).app X ≫ (F.map (α_ m₁ m₂ m₃).hom).app X =
    (F.μ m₂ m₃).app ((F.obj m₁).obj X) ≫ (F.μ m₁ (m₂ ⊗ m₃)).app X
state_after: no goals
Theorem: MvPolynomial.IsHomogeneous.inj_right
File: Mathlib/RingTheory/MvPolynomial/Homogeneous.lean

tactic: obtain ⟨d, hd⟩ : ∃ d, coeff d φ ≠ 0 := exists_coeff_ne_zero hφ
state_before: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
inst✝² inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
φ ψ : MvPolynomial σ R
m n : ℕ
hm : φ.IsHomogeneous m
hn : φ.IsHomogeneous n
hφ : φ ≠ 0
⊢ m = n
state_after: case intro
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
inst✝² inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
φ ψ : MvPolynomial σ R
m n : ℕ
hm : φ.IsHomogeneous m
hn : φ.IsHomogeneous n
hφ : φ ≠ 0
d : σ →₀ ℕ
hd : coeff d φ ≠ 0
⊢ m = n

tactic: rw [← hm hd, ← hn hd]
state_before: case intro
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
inst✝² inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
φ ψ : MvPolynomial σ R
m n : ℕ
hm : φ.IsHomogeneous m
hn : φ.IsHomogeneous n
hφ : φ ≠ 0
d : σ →₀ ℕ
hd : coeff d φ ≠ 0
⊢ m = n
state_after: no goals
Theorem: List.formPerm_apply_mem_eq_next
File: Mathlib/GroupTheory/Perm/Cycle/Concrete.lean

tactic: obtain ⟨k, rfl⟩ := get_of_mem hx
state_before: α : Type u_1
inst✝ : DecidableEq α
l l' : List α
hl : l.Nodup
x : α
hx : x ∈ l
⊢ l.formPerm x = l.next x hx
state_after: case intro
α : Type u_1
inst✝ : DecidableEq α
l l' : List α
hl : l.Nodup
k : Fin l.length
hx : l.get k ∈ l
⊢ l.formPerm (l.get k) = l.next (l.get k) hx

tactic: rw [next_get _ hl, formPerm_apply_get _ hl]
state_before: case intro
α : Type u_1
inst✝ : DecidableEq α
l l' : List α
hl : l.Nodup
k : Fin l.length
hx : l.get k ∈ l
⊢ l.formPerm (l.get k) = l.next (l.get k) hx
state_after: no goals
Theorem: SameRay.norm_smul_eq
File: Mathlib/Analysis/NormedSpace/Ray.lean

tactic: rcases h.exists_eq_smul with ⟨u, a, b, ha, hb, -, rfl, rfl⟩
state_before: E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
x y : E
h : SameRay ℝ x y
⊢ ‖x‖ • y = ‖y‖ • x
state_after: case intro.intro.intro.intro.intro.intro.intro
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
u : E
a b : ℝ
ha : 0 ≤ a
hb : 0 ≤ b
h : SameRay ℝ (a • u) (b • u)
⊢ ‖a • u‖ • b • u = ‖b • u‖ • a • u

tactic: simp only [norm_smul_of_nonneg, *, mul_smul]
state_before: case intro.intro.intro.intro.intro.intro.intro
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
u : E
a b : ℝ
ha : 0 ≤ a
hb : 0 ≤ b
h : SameRay ℝ (a • u) (b • u)
⊢ ‖a • u‖ • b • u = ‖b • u‖ • a • u
state_after: case intro.intro.intro.intro.intro.intro.intro
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
u : E
a b : ℝ
ha : 0 ≤ a
hb : 0 ≤ b
h : SameRay ℝ (a • u) (b • u)
⊢ a • ‖u‖ • b • u = b • ‖u‖ • a • u

tactic: rw [smul_comm, smul_comm b, smul_comm a b u]
state_before: case intro.intro.intro.intro.intro.intro.intro
E : Type u_1
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
u : E
a b : ℝ
ha : 0 ≤ a
hb : 0 ≤ b
h : SameRay ℝ (a • u) (b • u)
⊢ a • ‖u‖ • b • u = b • ‖u‖ • a • u
state_after: no goals
Theorem: HomologicalComplex.restriction_d_eq
File: Mathlib/Algebra/Homology/Embedding/Restriction.lean

tactic: subst hi hj
state_before: ι : Type u_1
ι' : Type u_2
c : ComplexShape ι
c' : ComplexShape ι'
C : Type u_3
inst✝³ : Category.{u_4, u_3} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
K L M : HomologicalComplex C c'
φ : K ⟶ L
φ' : L ⟶ M
e : c.Embedding c'
inst✝ : e.IsRelIff
i j : ι
i' j' : ι'
hi : e.f i = i'
hj : e.f j = j'
⊢ (K.restriction e).d i j = (K.restrictionXIso e hi).hom ≫ K.d i' j' ≫ (K.restrictionXIso e hj).inv
state_after: ι : Type u_1
ι' : Type u_2
c : ComplexShape ι
c' : ComplexShape ι'
C : Type u_3
inst✝³ : Category.{u_4, u_3} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
K L M : HomologicalComplex C c'
φ : K ⟶ L
φ' : L ⟶ M
e : c.Embedding c'
inst✝ : e.IsRelIff
i j : ι
⊢ (K.restriction e).d i j = (K.restrictionXIso e ⋯).hom ≫ K.d (e.f i) (e.f j) ≫ (K.restrictionXIso e ⋯).inv

tactic: simp [restrictionXIso]
state_before: ι : Type u_1
ι' : Type u_2
c : ComplexShape ι
c' : ComplexShape ι'
C : Type u_3
inst✝³ : Category.{u_4, u_3} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
K L M : HomologicalComplex C c'
φ : K ⟶ L
φ' : L ⟶ M
e : c.Embedding c'
inst✝ : e.IsRelIff
i j : ι
⊢ (K.restriction e).d i j = (K.restrictionXIso e ⋯).hom ≫ K.d (e.f i) (e.f j) ≫ (K.restrictionXIso e ⋯).inv
state_after: no goals
Theorem: Turing.ToPartrec.Code.id_eval
File: Mathlib/Computability/TMToPartrec.lean

tactic: simp [id]
state_before: v : List ℕ
⊢ id.eval v = pure v
state_after: no goals
Theorem: Fin.foldl_loop_eq
File: .lake/packages/batteries/Batteries/Data/Fin/Lemmas.lean

tactic: rw [foldl.loop, dif_neg (Nat.lt_irrefl _)]
state_before: α : Sort u_1
n : Nat
f : α → Fin n → α
x : α
⊢ foldl.loop n f x n = x
state_after: no goals
Theorem: ProbabilityTheory.condIndepSet_iff
File: Mathlib/Probability/Independence/Conditional.lean

tactic: rw [condIndepSet_iff_condIndepSets_singleton _ _ hs ht μ, condIndepSets_singleton_iff _ _ hs ht]
state_before: Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
s t : Set Ω
hs : MeasurableSet s
ht : MeasurableSet t
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
⊢ CondIndepSet m' hm' s t μ ↔
    μ[(s ∩ t).indicator fun ω => 1|m'] =ᶠ[ae μ] μ[s.indicator fun ω => 1|m'] * μ[t.indicator fun ω => 1|m']
state_after: no goals
Theorem: and_symm_right
File: Mathlib/Logic/Basic.lean

tactic: simp [eq_comm]
state_before: a✝ b✝ : Prop
α : Sort u_1
a b : α
p : Prop
⊢ p ∧ a = b ↔ p ∧ b = a
state_after: no goals
Theorem: CategoryTheory.Arrow.hom_inv_id_right
File: Mathlib/CategoryTheory/Comma/Arrow.lean

tactic: rw [← comp_right, e.hom_inv_id, id_right]
state_before: T : Type u
inst✝ : Category.{v, u} T
f g : Arrow T
sq : f ⟶ g
e : f ≅ g
⊢ e.hom.right ≫ e.inv.right = 𝟙 f.right
state_after: no goals
Theorem: Ordinal.opow_succ
File: Mathlib/SetTheory/Ordinal/Exponential.lean

tactic: subst a
state_before: a b : Ordinal.{u_1}
h : a = 0
⊢ a ^ succ b = a ^ b * a
state_after: b : Ordinal.{u_1}
⊢ 0 ^ succ b = 0 ^ b * 0

tactic: simp only [zero_opow (succ_ne_zero _), mul_zero]
state_before: b : Ordinal.{u_1}
⊢ 0 ^ succ b = 0 ^ b * 0
state_after: no goals

tactic: simp only [opow_def, limitRecOn_succ, if_neg h]
state_before: a b : Ordinal.{u_1}
h : ¬a = 0
⊢ a ^ succ b = a ^ b * a
state_after: no goals
Theorem: MeasurableSpace.measurableSet_generateFrom_memPartition
File: Mathlib/MeasureTheory/MeasurableSpace/CountablyGenerated.lean

tactic: have : t n = ⋃ u ∈ memPartition t n, u ∩ t n := by
  simp_rw [← iUnion_inter, ← sUnion_eq_biUnion, sUnion_memPartition, univ_inter]
state_before: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
⊢ MeasurableSet (t n)
state_after: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
this : t n = ⋃ u ∈ memPartition t n, u ∩ t n
⊢ MeasurableSet (t n)

tactic: rw [this]
state_before: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
this : t n = ⋃ u ∈ memPartition t n, u ∩ t n
⊢ MeasurableSet (t n)
state_after: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
this : t n = ⋃ u ∈ memPartition t n, u ∩ t n
⊢ MeasurableSet (⋃ u ∈ memPartition t n, u ∩ t n)

tactic: refine MeasurableSet.biUnion (finite_memPartition _ _).countable (fun v hv ↦ ?_)
state_before: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
this : t n = ⋃ u ∈ memPartition t n, u ∩ t n
⊢ MeasurableSet (⋃ u ∈ memPartition t n, u ∩ t n)
state_after: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
this : t n = ⋃ u ∈ memPartition t n, u ∩ t n
v : Set α
hv : v ∈ memPartition t n
⊢ MeasurableSet (v ∩ t n)

tactic: refine measurableSet_generateFrom ?_
state_before: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
this : t n = ⋃ u ∈ memPartition t n, u ∩ t n
v : Set α
hv : v ∈ memPartition t n
⊢ MeasurableSet (v ∩ t n)
state_after: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
this : t n = ⋃ u ∈ memPartition t n, u ∩ t n
v : Set α
hv : v ∈ memPartition t n
⊢ v ∩ t n ∈ memPartition t (n + 1)

tactic: rw [memPartition_succ]
state_before: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
this : t n = ⋃ u ∈ memPartition t n, u ∩ t n
v : Set α
hv : v ∈ memPartition t n
⊢ v ∩ t n ∈ memPartition t (n + 1)
state_after: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
this : t n = ⋃ u ∈ memPartition t n, u ∩ t n
v : Set α
hv : v ∈ memPartition t n
⊢ v ∩ t n ∈ {s | ∃ u ∈ memPartition t n, s = u ∩ t n ∨ s = u \ t n}

tactic: exact ⟨v, hv, Or.inl rfl⟩
state_before: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
this : t n = ⋃ u ∈ memPartition t n, u ∩ t n
v : Set α
hv : v ∈ memPartition t n
⊢ v ∩ t n ∈ {s | ∃ u ∈ memPartition t n, s = u ∩ t n ∨ s = u \ t n}
state_after: no goals

tactic: simp_rw [← iUnion_inter, ← sUnion_eq_biUnion, sUnion_memPartition, univ_inter]
state_before: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
⊢ t n = ⋃ u ∈ memPartition t n, u ∩ t n
state_after: no goals
Theorem: Nat.frequently_modEq
File: Mathlib/Order/Filter/ModEq.lean

tactic: simp [Nat.modEq_iff_dvd, ← sub_sub]
state_before: n : ℕ
h : n ≠ 0
d m : ℕ
⊢ ((fun a => a + d) ∘ fun x => n • id x) m ≡ d [MOD n]
state_after: no goals
Theorem: IsTorsion.not_torsion_free
File: Mathlib/GroupTheory/Torsion.lean

tactic: obtain ⟨x, hx⟩ := (nontrivial_iff_exists_ne (1 : G)).mp hN
state_before: G : Type u_1
H : Type u_2
inst✝ : Group G
hN : Nontrivial G
tG : IsTorsion G
⊢ ∃ g, g ≠ 1 ∧ IsOfFinOrder g
state_after: case intro
G : Type u_1
H : Type u_2
inst✝ : Group G
hN : Nontrivial G
tG : IsTorsion G
x : G
hx : x ≠ 1
⊢ ∃ g, g ≠ 1 ∧ IsOfFinOrder g

tactic: exact ⟨x, hx, tG x⟩
state_before: case intro
G : Type u_1
H : Type u_2
inst✝ : Group G
hN : Nontrivial G
tG : IsTorsion G
x : G
hx : x ≠ 1
⊢ ∃ g, g ≠ 1 ∧ IsOfFinOrder g
state_after: no goals
Theorem: Matrix.charpoly.univ_coeff_eval₂Hom
File: Mathlib/LinearAlgebra/Matrix/Charpoly/Univ.lean

tactic: rw [← univ_map_eval₂Hom n f M, Polynomial.coeff_map]
state_before: R : Type u_1
S : Type u_2
n : Type u_3
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : Fintype n
inst✝ : DecidableEq n
f : R →+* S
M : n × n → S
i : ℕ
⊢ (MvPolynomial.eval₂Hom f M) ((univ R n).coeff i) = (of (Function.curry M)).charpoly.coeff i
state_after: no goals