1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Multiset.toFinsupp_sum_eq
File: Mathlib/Data/Finsupp/Multiset.lean

tactic: rw [← Finsupp.card_toMultiset, toFinsupp_toMultiset]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : DecidableEq α
s : Multiset α
⊢ ((toFinsupp s).sum fun x => id) = card s
state_after: no goals
Theorem: MeasureTheory.Martingale.setIntegral_eq
File: Mathlib/Probability/Martingale/Basic.lean

tactic: rw [← @setIntegral_condexp _ _ _ _ _ (ℱ i) m0 _ _ _ (ℱ.le i) _ (hf.integrable j) hs]
state_before: Ω : Type u_1
E : Type u_2
ι : Type u_3
inst✝⁴ : Preorder ι
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f g : ι → Ω → E
ℱ : Filtration ι m0
inst✝ : SigmaFiniteFiltration μ ℱ
hf : Martingale f ℱ μ
i j : ι
hij : i ≤ j
s : Set Ω
hs : MeasurableSet s
⊢ ∫ (ω : Ω) in s, f i ω ∂μ = ∫ (ω : Ω) in s, f j ω ∂μ
state_after: Ω : Type u_1
E : Type u_2
ι : Type u_3
inst✝⁴ : Preorder ι
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f g : ι → Ω → E
ℱ : Filtration ι m0
inst✝ : SigmaFiniteFiltration μ ℱ
hf : Martingale f ℱ μ
i j : ι
hij : i ≤ j
s : Set Ω
hs : MeasurableSet s
⊢ ∫ (ω : Ω) in s, f i ω ∂μ = ∫ (x : Ω) in s, (μ[f j|↑ℱ i]) x ∂μ

tactic: refine setIntegral_congr_ae (ℱ.le i s hs) ?_
state_before: Ω : Type u_1
E : Type u_2
ι : Type u_3
inst✝⁴ : Preorder ι
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f g : ι → Ω → E
ℱ : Filtration ι m0
inst✝ : SigmaFiniteFiltration μ ℱ
hf : Martingale f ℱ μ
i j : ι
hij : i ≤ j
s : Set Ω
hs : MeasurableSet s
⊢ ∫ (ω : Ω) in s, f i ω ∂μ = ∫ (x : Ω) in s, (μ[f j|↑ℱ i]) x ∂μ
state_after: Ω : Type u_1
E : Type u_2
ι : Type u_3
inst✝⁴ : Preorder ι
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f g : ι → Ω → E
ℱ : Filtration ι m0
inst✝ : SigmaFiniteFiltration μ ℱ
hf : Martingale f ℱ μ
i j : ι
hij : i ≤ j
s : Set Ω
hs : MeasurableSet s
⊢ ∀ᵐ (x : Ω) ∂μ, x ∈ s → f i x = (μ[f j|↑ℱ i]) x

tactic: filter_upwards [hf.2 i j hij] with _ heq _ using heq.symm
state_before: Ω : Type u_1
E : Type u_2
ι : Type u_3
inst✝⁴ : Preorder ι
m0 : MeasurableSpace Ω
μ : Measure Ω
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f g : ι → Ω → E
ℱ : Filtration ι m0
inst✝ : SigmaFiniteFiltration μ ℱ
hf : Martingale f ℱ μ
i j : ι
hij : i ≤ j
s : Set Ω
hs : MeasurableSet s
⊢ ∀ᵐ (x : Ω) ∂μ, x ∈ s → f i x = (μ[f j|↑ℱ i]) x
state_after: no goals
Theorem: Finset.weightedVSubOfPoint_insert
File: Mathlib/LinearAlgebra/AffineSpace/Combination.lean

tactic: rw [weightedVSubOfPoint_apply, weightedVSubOfPoint_apply]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
ι : Type u_4
s : Finset ι
ι₂ : Type u_5
s₂ : Finset ι₂
inst✝ : DecidableEq ι
w : ι → k
p : ι → P
i : ι
⊢ ((insert i s).weightedVSubOfPoint p (p i)) w = (s.weightedVSubOfPoint p (p i)) w
state_after: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
ι : Type u_4
s : Finset ι
ι₂ : Type u_5
s₂ : Finset ι₂
inst✝ : DecidableEq ι
w : ι → k
p : ι → P
i : ι
⊢ ∑ i_1 ∈ insert i s, w i_1 • (p i_1 -ᵥ p i) = ∑ i_1 ∈ s, w i_1 • (p i_1 -ᵥ p i)

tactic: apply sum_insert_zero
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
ι : Type u_4
s : Finset ι
ι₂ : Type u_5
s₂ : Finset ι₂
inst✝ : DecidableEq ι
w : ι → k
p : ι → P
i : ι
⊢ ∑ i_1 ∈ insert i s, w i_1 • (p i_1 -ᵥ p i) = ∑ i_1 ∈ s, w i_1 • (p i_1 -ᵥ p i)
state_after: case h
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
ι : Type u_4
s : Finset ι
ι₂ : Type u_5
s₂ : Finset ι₂
inst✝ : DecidableEq ι
w : ι → k
p : ι → P
i : ι
⊢ w i • (p i -ᵥ p i) = 0

tactic: rw [vsub_self, smul_zero]
state_before: case h
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
ι : Type u_4
s : Finset ι
ι₂ : Type u_5
s₂ : Finset ι₂
inst✝ : DecidableEq ι
w : ι → k
p : ι → P
i : ι
⊢ w i • (p i -ᵥ p i) = 0
state_after: no goals
Theorem: Polynomial.EisensteinCriterionAux.le_natDegree_of_map_eq_mul_X_pow
File: Mathlib/RingTheory/EisensteinCriterion.lean

tactic: rw [hq, degree_mul, hc0, zero_add, degree_pow, degree_X, nsmul_one]
state_before: R : Type u_1
inst✝ : CommRing R
n : ℕ
P : Ideal R
hP : P.IsPrime
q : R[X]
c : (R ⧸ P)[X]
hq : map (mk P) q = c * X ^ n
hc0 : c.degree = 0
⊢ ↑n = (map (mk P) q).degree
state_after: no goals
Theorem: Cardinal.add_one_of_aleph0_le
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: rw [add_comm, ← card_ord c, ← card_one, ← card_add, one_add_of_omega_le]
state_before: c : Cardinal.{u_1}
h : ℵ₀ ≤ c
⊢ c + 1 = c
state_after: c : Cardinal.{u_1}
h : ℵ₀ ≤ c
⊢ ω ≤ c.ord

tactic: rwa [← ord_aleph0, ord_le_ord]
state_before: c : Cardinal.{u_1}
h : ℵ₀ ≤ c
⊢ ω ≤ c.ord
state_after: no goals
Theorem: CategoryTheory.isCodetector_def
File: Mathlib/CategoryTheory/Generator.lean

tactic: obtain rfl := Set.mem_singleton_iff.1 hH
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
G : C
hG : IsCodetector G
X Y : C
f : X ⟶ Y
hf : ∀ (h : X ⟶ G), ∃! h', f ≫ h' = h
H : C
hH : H ∈ {G}
h : X ⟶ H
⊢ ∃! h', f ≫ h' = h
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
X Y : C
f : X ⟶ Y
H : C
h : X ⟶ H
hG : IsCodetector H
hf : ∀ (h : X ⟶ H), ∃! h', f ≫ h' = h
hH : H ∈ {H}
⊢ ∃! h', f ≫ h' = h

tactic: exact hf h
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
X Y : C
f : X ⟶ Y
H : C
h : X ⟶ H
hG : IsCodetector H
hf : ∀ (h : X ⟶ H), ∃! h', f ≫ h' = h
hH : H ∈ {H}
⊢ ∃! h', f ≫ h' = h
state_after: no goals
Theorem: CategoryTheory.Limits.prod.associator_naturality
File: Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean

tactic: simp
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X Y : C
inst✝ : HasBinaryProducts C
X₁ X₂ X₃ Y₁ Y₂ Y₃ : C
f₁ : X₁ ⟶ Y₁
f₂ : X₂ ⟶ Y₂
f₃ : X₃ ⟶ Y₃
⊢ map (map f₁ f₂) f₃ ≫ (associator Y₁ Y₂ Y₃).hom = (associator X₁ X₂ X₃).hom ≫ map f₁ (map f₂ f₃)
state_after: no goals
Theorem: kstar_eq_one
File: Mathlib/Algebra/Order/Kleene.lean

tactic: rwa [one_mul]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝ : KleeneAlgebra α
a b c : α
h : a ≤ 1
⊢ 1 * a ≤ 1
state_after: no goals
Theorem: Complex.IsExpCmpFilter.of_isBigO_im_re_rpow
File: Mathlib/Analysis/SpecialFunctions/CompareExp.lean

tactic: simp only [Real.rpow_mul hz r n, Real.rpow_natCast]
state_before: l : Filter ℂ
hre : Tendsto re l atTop
r : ℝ
hr : im =O[l] fun z => z.re ^ r
n : ℕ
z : ℂ
hz : 0 ≤ z.re
⊢ (fun z => (z.re ^ r) ^ n) z = (fun z => z.re ^ (r * ↑n)) z
state_after: no goals
Theorem: differentiableAt_const_sub_iff
File: Mathlib/Analysis/Calculus/FDeriv/Add.lean

tactic: simp [sub_eq_add_neg]
state_before: 𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_4
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type u_5
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
c : F
⊢ DifferentiableAt 𝕜 (fun y => c - f y) x ↔ DifferentiableAt 𝕜 f x
state_after: no goals
Theorem: Finset.mul_prod_Iio_eq_prod_Iic
File: Mathlib/Algebra/BigOperators/Intervals.lean

tactic: rw [Iic_eq_cons_Iio, prod_cons]
state_before: α : Type u_1
M : Type u_2
inst✝² : PartialOrder α
inst✝¹ : CommMonoid M
f : α → M
a✝ b : α
inst✝ : LocallyFiniteOrderBot α
a : α
⊢ f a * ∏ x ∈ Iio a, f x = ∏ x ∈ Iic a, f x
state_after: no goals
Theorem: isClosedMap_swap
File: Mathlib/Topology/Constructions.lean

tactic: rw [image_swap_eq_preimage_swap]
state_before: X : Type u
Y : Type v
Z : Type u_1
W : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : TopologicalSpace W
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
s : Set (X × Y)
hs : IsClosed s
⊢ IsClosed (Prod.swap '' s)
state_after: X : Type u
Y : Type v
Z : Type u_1
W : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : TopologicalSpace W
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
s : Set (X × Y)
hs : IsClosed s
⊢ IsClosed (Prod.swap ⁻¹' s)

tactic: exact hs.preimage continuous_swap
state_before: X : Type u
Y : Type v
Z : Type u_1
W : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : TopologicalSpace W
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
s : Set (X × Y)
hs : IsClosed s
⊢ IsClosed (Prod.swap ⁻¹' s)
state_after: no goals
Theorem: StarSubalgebra.mem_centralizer_iff
File: Mathlib/Algebra/Star/Subalgebra.lean

tactic: show (∀ g ∈ s ∪ star s, g * z = z * g) ↔ ∀ g ∈ s, g * z = z * g ∧ star g * z = z * star g
state_before: F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
C : Type u_5
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : Semiring A
inst✝¹⁰ : StarRing A
inst✝⁹ : Algebra R A
inst✝⁸ : StarModule R A
inst✝⁷ : Semiring B
inst✝⁶ : StarRing B
inst✝⁵ : Algebra R B
inst✝⁴ : StarModule R B
inst✝³ : Semiring C
inst✝² : StarRing C
inst✝¹ : Algebra R C
inst✝ : StarModule R C
S : StarSubalgebra R A
s : Set A
z : A
⊢ z ∈ centralizer R s ↔ ∀ g ∈ s, g * z = z * g ∧ star g * z = z * star g
state_after: F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
C : Type u_5
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : Semiring A
inst✝¹⁰ : StarRing A
inst✝⁹ : Algebra R A
inst✝⁸ : StarModule R A
inst✝⁷ : Semiring B
inst✝⁶ : StarRing B
inst✝⁵ : Algebra R B
inst✝⁴ : StarModule R B
inst✝³ : Semiring C
inst✝² : StarRing C
inst✝¹ : Algebra R C
inst✝ : StarModule R C
S : StarSubalgebra R A
s : Set A
z : A
⊢ (∀ g ∈ s ∪ star s, g * z = z * g) ↔ ∀ g ∈ s, g * z = z * g ∧ star g * z = z * star g

tactic: simp only [Set.mem_union, or_imp, forall_and, and_congr_right_iff]
state_before: F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
C : Type u_5
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : Semiring A
inst✝¹⁰ : StarRing A
inst✝⁹ : Algebra R A
inst✝⁸ : StarModule R A
inst✝⁷ : Semiring B
inst✝⁶ : StarRing B
inst✝⁵ : Algebra R B
inst✝⁴ : StarModule R B
inst✝³ : Semiring C
inst✝² : StarRing C
inst✝¹ : Algebra R C
inst✝ : StarModule R C
S : StarSubalgebra R A
s : Set A
z : A
⊢ (∀ g ∈ s ∪ star s, g * z = z * g) ↔ ∀ g ∈ s, g * z = z * g ∧ star g * z = z * star g
state_after: F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
C : Type u_5
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : Semiring A
inst✝¹⁰ : StarRing A
inst✝⁹ : Algebra R A
inst✝⁸ : StarModule R A
inst✝⁷ : Semiring B
inst✝⁶ : StarRing B
inst✝⁵ : Algebra R B
inst✝⁴ : StarModule R B
inst✝³ : Semiring C
inst✝² : StarRing C
inst✝¹ : Algebra R C
inst✝ : StarModule R C
S : StarSubalgebra R A
s : Set A
z : A
⊢ (∀ x ∈ s, x * z = z * x) → ((∀ x ∈ star s, x * z = z * x) ↔ ∀ x ∈ s, star x * z = z * star x)

tactic: exact fun _ =>
  ⟨fun hz a ha => hz _ (Set.star_mem_star.mpr ha), fun hz a ha => star_star a ▸ hz _ ha⟩
state_before: F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
C : Type u_5
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : Semiring A
inst✝¹⁰ : StarRing A
inst✝⁹ : Algebra R A
inst✝⁸ : StarModule R A
inst✝⁷ : Semiring B
inst✝⁶ : StarRing B
inst✝⁵ : Algebra R B
inst✝⁴ : StarModule R B
inst✝³ : Semiring C
inst✝² : StarRing C
inst✝¹ : Algebra R C
inst✝ : StarModule R C
S : StarSubalgebra R A
s : Set A
z : A
⊢ (∀ x ∈ s, x * z = z * x) → ((∀ x ∈ star s, x * z = z * x) ↔ ∀ x ∈ s, star x * z = z * star x)
state_after: no goals
Theorem: zpow_sub
File: Mathlib/Algebra/Group/Basic.lean

tactic: rw [Int.sub_eq_add_neg, zpow_add, zpow_neg]
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : Group G
a✝ b c d : G
n✝ : ℤ
a : G
m n : ℤ
⊢ a ^ (m - n) = a ^ m * (a ^ n)⁻¹
state_after: no goals
Theorem: MatrixEquivTensor.left_inv
File: Mathlib/RingTheory/MatrixAlgebra.lean

tactic: induction M with
| zero => simp
| tmul a m => simp
| add x y hx hy =>
  rw [map_add]
  conv_rhs => rw [← hx, ← hy, ← invFun_add]
state_before: R : Type u
inst✝⁴ : CommSemiring R
A : Type v
inst✝³ : Semiring A
inst✝² : Algebra R A
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
M : A ⊗[R] Matrix n n R
⊢ invFun R A n ((toFunAlgHom R A n) M) = M
state_after: no goals

tactic: simp
state_before: case zero
R : Type u
inst✝⁴ : CommSemiring R
A : Type v
inst✝³ : Semiring A
inst✝² : Algebra R A
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
⊢ invFun R A n ((toFunAlgHom R A n) 0) = 0
state_after: no goals

tactic: simp
state_before: case tmul
R : Type u
inst✝⁴ : CommSemiring R
A : Type v
inst✝³ : Semiring A
inst✝² : Algebra R A
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
a : A
m : Matrix n n R
⊢ invFun R A n ((toFunAlgHom R A n) (a ⊗ₜ[R] m)) = a ⊗ₜ[R] m
state_after: no goals

tactic: rw [map_add]
state_before: case add
R : Type u
inst✝⁴ : CommSemiring R
A : Type v
inst✝³ : Semiring A
inst✝² : Algebra R A
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
x y : A ⊗[R] Matrix n n R
hx : invFun R A n ((toFunAlgHom R A n) x) = x
hy : invFun R A n ((toFunAlgHom R A n) y) = y
⊢ invFun R A n ((toFunAlgHom R A n) (x + y)) = x + y
state_after: case add
R : Type u
inst✝⁴ : CommSemiring R
A : Type v
inst✝³ : Semiring A
inst✝² : Algebra R A
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
x y : A ⊗[R] Matrix n n R
hx : invFun R A n ((toFunAlgHom R A n) x) = x
hy : invFun R A n ((toFunAlgHom R A n) y) = y
⊢ invFun R A n ((toFunAlgHom R A n) x + (toFunAlgHom R A n) y) = x + y

tactic: conv_rhs => rw [← hx, ← hy, ← invFun_add]
state_before: case add
R : Type u
inst✝⁴ : CommSemiring R
A : Type v
inst✝³ : Semiring A
inst✝² : Algebra R A
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
x y : A ⊗[R] Matrix n n R
hx : invFun R A n ((toFunAlgHom R A n) x) = x
hy : invFun R A n ((toFunAlgHom R A n) y) = y
⊢ invFun R A n ((toFunAlgHom R A n) x + (toFunAlgHom R A n) y) = x + y
state_after: no goals
Theorem: CategoryTheory.Bicategory.leftUnitor_comp_inv
File: Mathlib/CategoryTheory/Bicategory/Basic.lean

tactic: simp
state_before: B : Type u
inst✝ : Bicategory B
a b c d e : B
f : a ⟶ b
g : b ⟶ c
⊢ (λ_ (f ≫ g)).inv = (λ_ f).inv ▷ g ≫ (α_ (𝟙 a) f g).hom
state_after: no goals
Theorem: GeneralizedContinuedFraction.continuantsAux_stable_step_of_terminated
File: Mathlib/Algebra/ContinuedFractions/TerminatedStable.lean

tactic: rw [terminatedAt_iff_s_none] at terminated_at_n
state_before: K : Type u_1
g : GeneralizedContinuedFraction K
n m : ℕ
inst✝ : DivisionRing K
terminated_at_n : g.TerminatedAt n
⊢ g.continuantsAux (n + 2) = g.continuantsAux (n + 1)
state_after: K : Type u_1
g : GeneralizedContinuedFraction K
n m : ℕ
inst✝ : DivisionRing K
terminated_at_n : g.s.get? n = none
⊢ g.continuantsAux (n + 2) = g.continuantsAux (n + 1)

tactic: simp only [continuantsAux, Nat.add_eq, Nat.add_zero, terminated_at_n]
state_before: K : Type u_1
g : GeneralizedContinuedFraction K
n m : ℕ
inst✝ : DivisionRing K
terminated_at_n : g.s.get? n = none
⊢ g.continuantsAux (n + 2) = g.continuantsAux (n + 1)
state_after: no goals
Theorem: smul_nonneg_iff_neg_imp_nonpos
File: Mathlib/Algebra/Order/Module/Defs.lean

tactic: rw [← neg_smul_neg, smul_nonneg_iff_pos_imp_nonneg]
state_before: α : Type u_1
β : Type u_2
a✝ a₁ a₂ : α
b✝ b₁ b₂ : β
inst✝³ : LinearOrderedRing α
inst✝² : LinearOrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : PosSMulStrictMono α β
a : α
b : β
⊢ 0 ≤ a • b ↔ (a < 0 → b ≤ 0) ∧ (b < 0 → a ≤ 0)
state_after: α : Type u_1
β : Type u_2
a✝ a₁ a₂ : α
b✝ b₁ b₂ : β
inst✝³ : LinearOrderedRing α
inst✝² : LinearOrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : PosSMulStrictMono α β
a : α
b : β
⊢ (0 < -a → 0 ≤ -b) ∧ (0 < -b → 0 ≤ -a) ↔ (a < 0 → b ≤ 0) ∧ (b < 0 → a ≤ 0)

tactic: simp only [neg_pos, neg_nonneg]
state_before: α : Type u_1
β : Type u_2
a✝ a₁ a₂ : α
b✝ b₁ b₂ : β
inst✝³ : LinearOrderedRing α
inst✝² : LinearOrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : PosSMulStrictMono α β
a : α
b : β
⊢ (0 < -a → 0 ≤ -b) ∧ (0 < -b → 0 ≤ -a) ↔ (a < 0 → b ≤ 0) ∧ (b < 0 → a ≤ 0)
state_after: no goals
Theorem: CategoryTheory.Functor.initial_of_exists_of_isCofiltered_of_fullyFaithful
File: Mathlib/CategoryTheory/Filtered/Final.lean

tactic: suffices Final F.op from initial_of_final_op _
state_before: C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
F : C ⥤ D
inst✝² : IsCofilteredOrEmpty D
inst✝¹ : F.Full
inst✝ : F.Faithful
h : ∀ (d : D), ∃ c, Nonempty (F.obj c ⟶ d)
⊢ F.Initial
state_after: C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
F : C ⥤ D
inst✝² : IsCofilteredOrEmpty D
inst✝¹ : F.Full
inst✝ : F.Faithful
h : ∀ (d : D), ∃ c, Nonempty (F.obj c ⟶ d)
⊢ F.op.Final

tactic: refine Functor.final_of_exists_of_isFiltered_of_fullyFaithful F.op (fun d => ?_)
state_before: C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
F : C ⥤ D
inst✝² : IsCofilteredOrEmpty D
inst✝¹ : F.Full
inst✝ : F.Faithful
h : ∀ (d : D), ∃ c, Nonempty (F.obj c ⟶ d)
⊢ F.op.Final
state_after: C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
F : C ⥤ D
inst✝² : IsCofilteredOrEmpty D
inst✝¹ : F.Full
inst✝ : F.Faithful
h : ∀ (d : D), ∃ c, Nonempty (F.obj c ⟶ d)
d : Dᵒᵖ
⊢ ∃ c, Nonempty (d ⟶ F.op.obj c)

tactic: obtain ⟨c, ⟨f⟩⟩ := h d.unop
state_before: C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
F : C ⥤ D
inst✝² : IsCofilteredOrEmpty D
inst✝¹ : F.Full
inst✝ : F.Faithful
h : ∀ (d : D), ∃ c, Nonempty (F.obj c ⟶ d)
d : Dᵒᵖ
⊢ ∃ c, Nonempty (d ⟶ F.op.obj c)
state_after: case intro.intro
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
F : C ⥤ D
inst✝² : IsCofilteredOrEmpty D
inst✝¹ : F.Full
inst✝ : F.Faithful
h : ∀ (d : D), ∃ c, Nonempty (F.obj c ⟶ d)
d : Dᵒᵖ
c : C
f : F.obj c ⟶ d.unop
⊢ ∃ c, Nonempty (d ⟶ F.op.obj c)

tactic: exact ⟨op c, ⟨f.op⟩⟩
state_before: case intro.intro
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
F : C ⥤ D
inst✝² : IsCofilteredOrEmpty D
inst✝¹ : F.Full
inst✝ : F.Faithful
h : ∀ (d : D), ∃ c, Nonempty (F.obj c ⟶ d)
d : Dᵒᵖ
c : C
f : F.obj c ⟶ d.unop
⊢ ∃ c, Nonempty (d ⟶ F.op.obj c)
state_after: no goals
Theorem: List.reverse_revzip
File: Mathlib/Data/List/Zip.lean

tactic: rw [← zip_unzip (revzip l).reverse]
state_before: α : Type u
β : Type u_1
γ : Type u_2
δ : Type u_3
ε : Type u_4
l : List α
⊢ l.revzip.reverse = l.reverse.revzip
state_after: α : Type u
β : Type u_1
γ : Type u_2
δ : Type u_3
ε : Type u_4
l : List α
⊢ l.revzip.reverse.unzip.1.zip l.revzip.reverse.unzip.2 = l.reverse.revzip

tactic: simp [unzip_eq_map, revzip, map_reverse, map_fst_zip, map_snd_zip]
state_before: α : Type u
β : Type u_1
γ : Type u_2
δ : Type u_3
ε : Type u_4
l : List α
⊢ l.revzip.reverse.unzip.1.zip l.revzip.reverse.unzip.2 = l.reverse.revzip
state_after: no goals
Theorem: Set.kernImage_preimage_eq_iff
File: Mathlib/Data/Set/Lattice.lean

tactic: rw [kernImage_eq_compl, ← preimage_compl, compl_eq_comm, eq_comm, image_preimage_eq_iff,
    compl_subset_comm]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
f : α → β
s : Set β
⊢ kernImage f (f ⁻¹' s) = s ↔ (range f)ᶜ ⊆ s
state_after: no goals
Theorem: SimpleGraph.Walk.transfer_eq_map_of_le
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: induction p <;> simp [*]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
p : G.Walk u v
H : SimpleGraph V
hp : ∀ e ∈ p.edges, e ∈ H.edgeSet
GH : G ≤ H
⊢ p.transfer H hp = Walk.map (Hom.mapSpanningSubgraphs GH) p
state_after: no goals
Theorem: AList.empty_lookupFinsupp
File: Mathlib/Data/Finsupp/AList.lean

tactic: classical
  ext
  simp
state_before: α : Type u_1
M : Type u_2
inst✝ : Zero M
⊢ ∅.lookupFinsupp = 0
state_after: no goals

tactic: ext
state_before: α : Type u_1
M : Type u_2
inst✝ : Zero M
⊢ ∅.lookupFinsupp = 0
state_after: case h
α : Type u_1
M : Type u_2
inst✝ : Zero M
a✝ : α
⊢ ∅.lookupFinsupp a✝ = 0 a✝

tactic: simp
state_before: case h
α : Type u_1
M : Type u_2
inst✝ : Zero M
a✝ : α
⊢ ∅.lookupFinsupp a✝ = 0 a✝
state_after: no goals
Theorem: List.filter_sublist
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: rw [filter]
state_before: α : Type u_1
p : α → Bool
a : α
l : List α
⊢ filter p (a :: l) <+ a :: l
state_after: α : Type u_1
p : α → Bool
a : α
l : List α
⊢ (match p a with
    | true => a :: filter p l
    | false => filter p l) <+
    a :: l

tactic: split <;> simp [Sublist.cons, Sublist.cons₂, filter_sublist l]
state_before: α : Type u_1
p : α → Bool
a : α
l : List α
⊢ (match p a with
    | true => a :: filter p l
    | false => filter p l) <+
    a :: l
state_after: no goals
Theorem: Nat.factors_eq_nil
File: Mathlib/Data/Nat/Factors.lean

tactic: constructor <;> intro h
state_before: n : ℕ
⊢ n.factors = [] ↔ n = 0 ∨ n = 1
state_after: case mp
n : ℕ
h : n.factors = []
⊢ n = 0 ∨ n = 1

case mpr
n : ℕ
h : n = 0 ∨ n = 1
⊢ n.factors = []

tactic: rcases n with (_ | _ | n)
state_before: case mp
n : ℕ
h : n.factors = []
⊢ n = 0 ∨ n = 1
state_after: case mp.zero
h : factors 0 = []
⊢ 0 = 0 ∨ 0 = 1

case mp.succ.zero
h : (0 + 1).factors = []
⊢ 0 + 1 = 0 ∨ 0 + 1 = 1

case mp.succ.succ
n : ℕ
h : (n + 1 + 1).factors = []
⊢ n + 1 + 1 = 0 ∨ n + 1 + 1 = 1

tactic: exact Or.inl rfl
state_before: case mp.zero
h : factors 0 = []
⊢ 0 = 0 ∨ 0 = 1
state_after: no goals

tactic: exact Or.inr rfl
state_before: case mp.succ.zero
h : (0 + 1).factors = []
⊢ 0 + 1 = 0 ∨ 0 + 1 = 1
state_after: no goals

tactic: rw [factors] at h
state_before: case mp.succ.succ
n : ℕ
h : (n + 1 + 1).factors = []
⊢ n + 1 + 1 = 0 ∨ n + 1 + 1 = 1
state_after: case mp.succ.succ
n : ℕ
h : (n + 2).minFac :: ((n + 2) / (n + 2).minFac).factors = []
⊢ n + 1 + 1 = 0 ∨ n + 1 + 1 = 1

tactic: injection h
state_before: case mp.succ.succ
n : ℕ
h : (n + 2).minFac :: ((n + 2) / (n + 2).minFac).factors = []
⊢ n + 1 + 1 = 0 ∨ n + 1 + 1 = 1
state_after: no goals

tactic: rcases h with (rfl | rfl)
state_before: case mpr
n : ℕ
h : n = 0 ∨ n = 1
⊢ n.factors = []
state_after: case mpr.inl

⊢ factors 0 = []

case mpr.inr

⊢ factors 1 = []

tactic: exact factors_zero
state_before: case mpr.inl

⊢ factors 0 = []
state_after: no goals

tactic: exact factors_one
state_before: case mpr.inr

⊢ factors 1 = []
state_after: no goals
Theorem: List.modifyNth_succ_cons
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: rfl
state_before: α : Type u_1
f : α → α
a : α
l : List α
n : Nat
⊢ modifyNth f (n + 1) (a :: l) = a :: modifyNth f n l
state_after: no goals
Theorem: NonUnitalRing.toNonUnitalNonAssocring_injective
File: Mathlib/Algebra/Ring/Ext.lean

tactic: intro _ _ _
state_before: R : Type u
⊢ Function.Injective (@toNonUnitalNonAssocRing R)
state_after: R : Type u
a₁✝ a₂✝ : NonUnitalRing R
a✝ : toNonUnitalNonAssocRing = toNonUnitalNonAssocRing
⊢ a₁✝ = a₂✝

tactic: ext <;> congr
state_before: R : Type u
a₁✝ a₂✝ : NonUnitalRing R
a✝ : toNonUnitalNonAssocRing = toNonUnitalNonAssocRing
⊢ a₁✝ = a₂✝
state_after: no goals