1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: AlgebraicIndependent.mvPolynomialOptionEquivPolynomialAdjoin_X_none
File: Mathlib/RingTheory/AlgebraicIndependent.lean

tactic: rw [AlgebraicIndependent.mvPolynomialOptionEquivPolynomialAdjoin_apply, aeval_X, Option.elim,
  Polynomial.map_X]
state_before: ι : Type u_1
ι' : Type u_2
R : Type u_3
K : Type u_4
A : Type u_5
A' : Type u_6
A'' : Type u_7
V : Type u
V' : Type u_8
x : ι → A
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : CommRing A'
inst✝³ : CommRing A''
inst✝² : Algebra R A
inst✝¹ : Algebra R A'
inst✝ : Algebra R A''
a b : R
hx : AlgebraicIndependent R x
⊢ hx.mvPolynomialOptionEquivPolynomialAdjoin (X none) = Polynomial.X
state_after: no goals
Theorem: fderivWithin.comp₃
File: Mathlib/Analysis/Calculus/FDeriv/Comp.lean

tactic: substs h3g h3f
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
g' : G → G'
g : F → G
t : Set F
u : Set G
y : F
y' : G
hg' : DifferentiableWithinAt 𝕜 g' u y'
hg : DifferentiableWithinAt 𝕜 g t y
hf : DifferentiableWithinAt 𝕜 f s x
h2g : MapsTo g t u
h2f : MapsTo f s t
h3g : g y = y'
h3f : f x = y
hxs : UniqueDiffWithinAt 𝕜 s x
⊢ fderivWithin 𝕜 (g' ∘ g ∘ f) s x = (fderivWithin 𝕜 g' u y').comp ((fderivWithin 𝕜 g t y).comp (fderivWithin 𝕜 f s x))
state_after: 𝕜 : 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
g' : G → G'
g : F → G
t : Set F
u : Set G
hf : DifferentiableWithinAt 𝕜 f s x
h2g : MapsTo g t u
h2f : MapsTo f s t
hxs : UniqueDiffWithinAt 𝕜 s x
hg : DifferentiableWithinAt 𝕜 g t (f x)
hg' : DifferentiableWithinAt 𝕜 g' u (g (f x))
⊢ fderivWithin 𝕜 (g' ∘ g ∘ f) s x =
    (fderivWithin 𝕜 g' u (g (f x))).comp ((fderivWithin 𝕜 g t (f x)).comp (fderivWithin 𝕜 f s x))

tactic: exact (hg'.hasFDerivWithinAt.comp x (hg.hasFDerivWithinAt.comp x hf.hasFDerivWithinAt h2f) <|
  h2g.comp h2f).fderivWithin hxs
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
g' : G → G'
g : F → G
t : Set F
u : Set G
hf : DifferentiableWithinAt 𝕜 f s x
h2g : MapsTo g t u
h2f : MapsTo f s t
hxs : UniqueDiffWithinAt 𝕜 s x
hg : DifferentiableWithinAt 𝕜 g t (f x)
hg' : DifferentiableWithinAt 𝕜 g' u (g (f x))
⊢ fderivWithin 𝕜 (g' ∘ g ∘ f) s x =
    (fderivWithin 𝕜 g' u (g (f x))).comp ((fderivWithin 𝕜 g t (f x)).comp (fderivWithin 𝕜 f s x))
state_after: no goals
Theorem: MeasureTheory.tendsto_measure_iUnion'
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [measure_iUnion_eq_iSup']
state_before: α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι✝ : Type u_5
R : Type u_6
R' : Type u_7
m : MeasurableSpace α✝
μ✝ μ₁ μ₂ : Measure α✝
s s₁ s₂ t : Set α✝
α : Type u_8
ι : Type u_9
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : Countable ι
inst✝¹ : Preorder ι
inst✝ : IsDirected ι fun x x_1 => x ≤ x_1
f : ι → Set α
⊢ Tendsto (fun i => μ (Accumulate f i)) atTop (𝓝 (μ (⋃ i, f i)))
state_after: α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι✝ : Type u_5
R : Type u_6
R' : Type u_7
m : MeasurableSpace α✝
μ✝ μ₁ μ₂ : Measure α✝
s s₁ s₂ t : Set α✝
α : Type u_8
ι : Type u_9
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : Countable ι
inst✝¹ : Preorder ι
inst✝ : IsDirected ι fun x x_1 => x ≤ x_1
f : ι → Set α
⊢ Tendsto (fun i => μ (Accumulate f i)) atTop (𝓝 (⨆ i, μ (Accumulate f i)))

tactic: exact tendsto_atTop_iSup fun i j hij ↦ by gcongr
state_before: α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι✝ : Type u_5
R : Type u_6
R' : Type u_7
m : MeasurableSpace α✝
μ✝ μ₁ μ₂ : Measure α✝
s s₁ s₂ t : Set α✝
α : Type u_8
ι : Type u_9
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : Countable ι
inst✝¹ : Preorder ι
inst✝ : IsDirected ι fun x x_1 => x ≤ x_1
f : ι → Set α
⊢ Tendsto (fun i => μ (Accumulate f i)) atTop (𝓝 (⨆ i, μ (Accumulate f i)))
state_after: no goals

tactic: gcongr
state_before: α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι✝ : Type u_5
R : Type u_6
R' : Type u_7
m : MeasurableSpace α✝
μ✝ μ₁ μ₂ : Measure α✝
s s₁ s₂ t : Set α✝
α : Type u_8
ι : Type u_9
inst✝³ : MeasurableSpace α
μ : Measure α
inst✝² : Countable ι
inst✝¹ : Preorder ι
inst✝ : IsDirected ι fun x x_1 => x ≤ x_1
f : ι → Set α
i j : ι
hij : i ≤ j
⊢ μ (Accumulate f i) ≤ μ (Accumulate f j)
state_after: no goals
Theorem: Order.not_isSuccLimit
File: Mathlib/Order/SuccPred/Limit.lean

tactic: simp
state_before: α : Type u_1
inst✝³ : PartialOrder α
inst✝² : SuccOrder α
a b : α
C : α → Sort u_2
inst✝¹ : IsSuccArchimedean α
inst✝ : NoMinOrder α
⊢ ¬IsSuccLimit a
state_after: no goals
Theorem: Matrix.det_eq_sum_mul_adjugate_col
File: Mathlib/LinearAlgebra/Matrix/Adjugate.lean

tactic: simpa only [det_transpose, ← adjugate_transpose] using det_eq_sum_mul_adjugate_row Aᵀ j
state_before: m : Type u
n : Type v
α : Type w
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
inst✝ : CommRing α
A : Matrix n n α
j : n
⊢ A.det = ∑ i : n, A i j * A.adjugate j i
state_after: no goals
Theorem: AlgebraicClosure.toStepOfLE.succ
File: Mathlib/FieldTheory/IsAlgClosed/AlgebraicClosure.lean

tactic: ext1 x
state_before: k : Type u
inst✝ : Field k
n : ℕ
h : 0 ≤ n
⊢ toStepOfLE k 0 (n + 1) ⋯ = (toStepSucc k n).comp (toStepOfLE k 0 n h)
state_after: case a
k : Type u
inst✝ : Field k
n : ℕ
h : 0 ≤ n
x : Step k 0
⊢ (toStepOfLE k 0 (n + 1) ⋯) x = ((toStepSucc k n).comp (toStepOfLE k 0 n h)) x

tactic: rw [RingHom.comp_apply]
state_before: case a
k : Type u
inst✝ : Field k
n : ℕ
h : 0 ≤ n
x : Step k 0
⊢ (toStepOfLE k 0 (n + 1) ⋯) x = ((toStepSucc k n).comp (toStepOfLE k 0 n h)) x
state_after: case a
k : Type u
inst✝ : Field k
n : ℕ
h : 0 ≤ n
x : Step k 0
⊢ (toStepOfLE k 0 (n + 1) ⋯) x = (toStepSucc k n) ((toStepOfLE k 0 n h) x)

tactic: simp only [toStepOfLE, RingHom.coe_mk, MonoidHom.coe_mk, OneHom.coe_mk]
state_before: case a
k : Type u
inst✝ : Field k
n : ℕ
h : 0 ≤ n
x : Step k 0
⊢ (toStepOfLE k 0 (n + 1) ⋯) x = (toStepSucc k n) ((toStepOfLE k 0 n h) x)
state_after: case a
k : Type u
inst✝ : Field k
n : ℕ
h : 0 ≤ n
x : Step k 0
⊢ AlgebraicClosure.toStepOfLE' k 0 (n + 1) ⋯ x = (toStepSucc k n) (AlgebraicClosure.toStepOfLE' k 0 n h x)

tactic: change _ = (_ ∘ _) x
state_before: case a
k : Type u
inst✝ : Field k
n : ℕ
h : 0 ≤ n
x : Step k 0
⊢ AlgebraicClosure.toStepOfLE' k 0 (n + 1) ⋯ x = (toStepSucc k n) (AlgebraicClosure.toStepOfLE' k 0 n h x)
state_after: case a
k : Type u
inst✝ : Field k
n : ℕ
h : 0 ≤ n
x : Step k 0
⊢ AlgebraicClosure.toStepOfLE' k 0 (n + 1) ⋯ x = (⇑(toStepSucc k n) ∘ AlgebraicClosure.toStepOfLE' k 0 n h) x

tactic: rw [toStepOfLE'.succ k 0 n h]
state_before: case a
k : Type u
inst✝ : Field k
n : ℕ
h : 0 ≤ n
x : Step k 0
⊢ AlgebraicClosure.toStepOfLE' k 0 (n + 1) ⋯ x = (⇑(toStepSucc k n) ∘ AlgebraicClosure.toStepOfLE' k 0 n h) x
state_after: no goals
Theorem: AlgebraicGeometry.ProjIsoSpecTopComponent.fromSpec_toSpec
File: Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Scheme.lean

tactic: refine Subtype.ext <| ProjectiveSpectrum.ext _ _ <| HomogeneousIdeal.ext' ?_
state_before: R : Type u_1
A : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
f : A
m : ℕ
f_deg : f ∈ 𝒜 m
hm : 0 < m
x : ↑↑(Proj.restrict ⋯).toPresheafedSpace
⊢ FromSpec.toFun f_deg hm ((toSpec 𝒜 f) x) = x
state_after: R : Type u_1
A : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
f : A
m : ℕ
f_deg : f ∈ 𝒜 m
hm : 0 < m
x : ↑↑(Proj.restrict ⋯).toPresheafedSpace
⊢ ∀ (i : ℕ),
    ∀ x_1 ∈ 𝒜 i, x_1 ∈ (↑(FromSpec.toFun f_deg hm ((toSpec 𝒜 f) x))).asHomogeneousIdeal ↔ x_1 ∈ (↑x).asHomogeneousIdeal

tactic: intros i z hzi
state_before: R : Type u_1
A : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
f : A
m : ℕ
f_deg : f ∈ 𝒜 m
hm : 0 < m
x : ↑↑(Proj.restrict ⋯).toPresheafedSpace
⊢ ∀ (i : ℕ),
    ∀ x_1 ∈ 𝒜 i, x_1 ∈ (↑(FromSpec.toFun f_deg hm ((toSpec 𝒜 f) x))).asHomogeneousIdeal ↔ x_1 ∈ (↑x).asHomogeneousIdeal
state_after: R : Type u_1
A : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
f : A
m : ℕ
f_deg : f ∈ 𝒜 m
hm : 0 < m
x : ↑↑(Proj.restrict ⋯).toPresheafedSpace
i : ℕ
z : A
hzi : z ∈ 𝒜 i
⊢ z ∈ (↑(FromSpec.toFun f_deg hm ((toSpec 𝒜 f) x))).asHomogeneousIdeal ↔ z ∈ (↑x).asHomogeneousIdeal

tactic: refine (FromSpec.mem_carrier_iff_of_mem f_deg hm _ _ hzi).trans ?_
state_before: R : Type u_1
A : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
f : A
m : ℕ
f_deg : f ∈ 𝒜 m
hm : 0 < m
x : ↑↑(Proj.restrict ⋯).toPresheafedSpace
i : ℕ
z : A
hzi : z ∈ 𝒜 i
⊢ z ∈ (↑(FromSpec.toFun f_deg hm ((toSpec 𝒜 f) x))).asHomogeneousIdeal ↔ z ∈ (↑x).asHomogeneousIdeal
state_after: R : Type u_1
A : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
f : A
m : ℕ
f_deg : f ∈ 𝒜 m
hm : 0 < m
x : ↑↑(Proj.restrict ⋯).toPresheafedSpace
i : ℕ
z : A
hzi : z ∈ 𝒜 i
⊢ HomogeneousLocalization.mk { deg := m * i, num := ⟨z ^ m, ⋯⟩, den := ⟨f ^ i, ⋯⟩, den_mem := ⋯ } ∈
      ((toSpec 𝒜 f) x).asIdeal ↔
    z ∈ (↑x).asHomogeneousIdeal

tactic: exact (ToSpec.mk_mem_carrier _ _).trans (x.1.2.pow_mem_iff_mem m hm)
state_before: R : Type u_1
A : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
f : A
m : ℕ
f_deg : f ∈ 𝒜 m
hm : 0 < m
x : ↑↑(Proj.restrict ⋯).toPresheafedSpace
i : ℕ
z : A
hzi : z ∈ 𝒜 i
⊢ HomogeneousLocalization.mk { deg := m * i, num := ⟨z ^ m, ⋯⟩, den := ⟨f ^ i, ⋯⟩, den_mem := ⋯ } ∈
      ((toSpec 𝒜 f) x).asIdeal ↔
    z ∈ (↑x).asHomogeneousIdeal
state_after: no goals
Theorem: Orientation.oangle_rev
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean

tactic: simp only [oangle, o.kahler_swap y x, Complex.arg_conj_coe_angle]
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
⊢ o.oangle y x = -o.oangle x y
state_after: no goals
Theorem: IsCoprime.of_mul_right_right
File: Mathlib/RingTheory/Coprime/Basic.lean

tactic: rw [mul_comm] at H
state_before: R : Type u
inst✝ : CommSemiring R
x y z : R
H : IsCoprime x (y * z)
⊢ IsCoprime x z
state_after: R : Type u
inst✝ : CommSemiring R
x y z : R
H : IsCoprime x (z * y)
⊢ IsCoprime x z

tactic: exact H.of_mul_right_left
state_before: R : Type u
inst✝ : CommSemiring R
x y z : R
H : IsCoprime x (z * y)
⊢ IsCoprime x z
state_after: no goals
Theorem: PMF.support_map
File: Mathlib/Probability/ProbabilityMassFunction/Constructions.lean

tactic: simp [map, @eq_comm β b]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f : α → β
p : PMF α
b✝ b : β
⊢ b ∈ (map f p).support ↔ b ∈ f '' p.support
state_after: no goals
Theorem: IntermediateField.sInf_toSubfield
File: Mathlib/FieldTheory/Adjoin.lean

tactic: simp [Set.sUnion_image]
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set (IntermediateField F E)
⊢ ↑(sInf S).toSubfield = ↑(sInf (toSubfield '' S))
state_after: no goals
Theorem: CategoryTheory.Adjunction.natTransEquiv_id
File: Mathlib/CategoryTheory/Adjunction/Unique.lean

tactic: ext
state_before: C : Type u_1
D : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Category.{u_4, u_2} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
⊢ (adj.natTransEquiv adj) (𝟙 G) = 𝟙 F
state_after: case w.h
C : Type u_1
D : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Category.{u_4, u_2} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
x✝ : C
⊢ ((adj.natTransEquiv adj) (𝟙 G)).app x✝ = (𝟙 F).app x✝

tactic: simp
state_before: case w.h
C : Type u_1
D : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Category.{u_4, u_2} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
x✝ : C
⊢ ((adj.natTransEquiv adj) (𝟙 G)).app x✝ = (𝟙 F).app x✝
state_after: no goals
Theorem: MeasureTheory.Measure.restrict_congr_mono
File: Mathlib/MeasureTheory/Measure/Restrict.lean

tactic: rw [← restrict_restrict_of_subset hs, h, restrict_restrict_of_subset hs]
state_before: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
hs : s ⊆ t
h : μ.restrict t = ν.restrict t
⊢ μ.restrict s = ν.restrict s
state_after: no goals
Theorem: CategoryTheory.GradedObject.Monoidal.tensorHom_def
File: Mathlib/CategoryTheory/GradedObject/Monoidal.lean

tactic: rw [← tensor_comp, id_comp, comp_id]
state_before: I : Type u
inst✝⁵ : AddMonoid I
C : Type u_1
inst✝⁴ : Category.{u_2, u_1} C
inst✝³ : MonoidalCategory C
X₁ X₂ Y₁ Y₂ : GradedObject I C
f : X₁ ⟶ X₂
g : Y₁ ⟶ Y₂
inst✝² : X₁.HasTensor Y₁
inst✝¹ : X₂.HasTensor Y₂
inst✝ : X₂.HasTensor Y₁
⊢ tensorHom f g = whiskerRight f Y₁ ≫ whiskerLeft X₂ g
state_after: no goals
Theorem: Batteries.PairingHeapImp.Heap.noSibling_tail?
File: .lake/packages/batteries/Batteries/Data/PairingHeap.lean

tactic: simp only [Heap.tail?]
state_before: α : Type u_1
le : α → α → Bool
s' s : Heap α
⊢ tail? le s = some s' → s'.NoSibling
state_after: α : Type u_1
le : α → α → Bool
s' s : Heap α
⊢ Option.map (fun x => x.snd) (deleteMin le s) = some s' → s'.NoSibling

tactic: intro eq
state_before: α : Type u_1
le : α → α → Bool
s' s : Heap α
⊢ Option.map (fun x => x.snd) (deleteMin le s) = some s' → s'.NoSibling
state_after: α : Type u_1
le : α → α → Bool
s' s : Heap α
eq : Option.map (fun x => x.snd) (deleteMin le s) = some s'
⊢ s'.NoSibling

tactic: match eq₂ : s.deleteMin le, eq with
| some (a, tl), rfl => exact noSibling_deleteMin eq₂
state_before: α : Type u_1
le : α → α → Bool
s' s : Heap α
eq : Option.map (fun x => x.snd) (deleteMin le s) = some s'
⊢ s'.NoSibling
state_after: no goals

tactic: exact noSibling_deleteMin eq₂
state_before: α : Type u_1
le : α → α → Bool
s' s : Heap α
eq : Option.map (fun x => x.snd) (deleteMin le s) = some s'
a : α
tl : Heap α
eq₂ : deleteMin le s = some (a, tl)
⊢ ((fun x => x.snd) (a, tl)).NoSibling
state_after: no goals
Theorem: NNRat.cast_inv_of_ne_zero
File: Mathlib/Data/Rat/Cast/Defs.lean

tactic: rw [inv_def, cast_divNat_of_ne_zero _ hq, cast_def, inv_div]
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝ : DivisionSemiring α
q r : ℚ≥0
hq : ↑q.num ≠ 0
⊢ ↑q⁻¹ = (↑q)⁻¹
state_after: no goals
Theorem: Nat.fib_lt_fib_succ
File: Mathlib/Data/Nat/Fib/Basic.lean

tactic: rcases exists_add_of_le hn with ⟨n, rfl⟩
state_before: n : ℕ
hn : 2 ≤ n
⊢ fib n < fib (n + 1)
state_after: case intro
n : ℕ
hn : 2 ≤ 2 + n
⊢ fib (2 + n) < fib (2 + n + 1)

tactic: rw [← tsub_pos_iff_lt, add_comm 2, add_right_comm, fib_add_two, add_tsub_cancel_right, fib_pos]
state_before: case intro
n : ℕ
hn : 2 ≤ 2 + n
⊢ fib (2 + n) < fib (2 + n + 1)
state_after: case intro
n : ℕ
hn : 2 ≤ 2 + n
⊢ 0 < n + 1

tactic: exact succ_pos n
state_before: case intro
n : ℕ
hn : 2 ≤ 2 + n
⊢ 0 < n + 1
state_after: no goals
Theorem: Batteries.RBNode.Ordered.modify
File: .lake/packages/batteries/Batteries/Data/RBMap/Alter.lean

tactic: rw [eq] at H
state_before: α : Type u_1
cut : α → Ordering
cmp : α → α → Ordering
f : α → α
t : RBNode α
H : OnRoot (fun x => cmpEq cmp (f x) x) (RBNode.zoom cut t).fst
h : Ordered cmp t
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
x✝ : Path α
eq : RBNode.zoom cut t = (node c✝ l✝ v✝ r✝, x✝)
⊢ Path.RootOrdered cmp x✝ (f v✝) ∧ OnRoot (cmpEq cmp (f v✝)) (node c✝ l✝ v✝ r✝)
state_after: α : Type u_1
cut : α → Ordering
cmp : α → α → Ordering
f : α → α
t : RBNode α
h : Ordered cmp t
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
x✝ : Path α
H : OnRoot (fun x => cmpEq cmp (f x) x) (node c✝ l✝ v✝ r✝, x✝).fst
eq : RBNode.zoom cut t = (node c✝ l✝ v✝ r✝, x✝)
⊢ Path.RootOrdered cmp x✝ (f v✝) ∧ OnRoot (cmpEq cmp (f v✝)) (node c✝ l✝ v✝ r✝)

tactic: exact ⟨H.RootOrdered_congr.2 (h.zoom eq).2.2.1.1, H⟩
state_before: α : Type u_1
cut : α → Ordering
cmp : α → α → Ordering
f : α → α
t : RBNode α
h : Ordered cmp t
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
x✝ : Path α
H : OnRoot (fun x => cmpEq cmp (f x) x) (node c✝ l✝ v✝ r✝, x✝).fst
eq : RBNode.zoom cut t = (node c✝ l✝ v✝ r✝, x✝)
⊢ Path.RootOrdered cmp x✝ (f v✝) ∧ OnRoot (cmpEq cmp (f v✝)) (node c✝ l✝ v✝ r✝)
state_after: no goals
Theorem: Matrix.charmatrix_apply_eq
File: Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean

tactic: simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply, map_apply,
  diagonal_apply_eq]
state_before: R : Type u_1
S : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
m : Type u_3
n : Type u_4
inst✝³ : DecidableEq m
inst✝² : DecidableEq n
inst✝¹ : Fintype m
inst✝ : Fintype n
M₁₁ : Matrix m m R
M₁₂ : Matrix m n R
M₂₁ : Matrix n m R
M₂₂ M : Matrix n n R
i j : n
⊢ M.charmatrix i i = X - C (M i i)
state_after: no goals
Theorem: MonoidAlgebra.mul_def
File: Mathlib/Algebra/MonoidAlgebra/Basic.lean

tactic: with_unfolding_all rfl
state_before: k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f g : MonoidAlgebra k G
⊢ f * g = sum f fun a₁ b₁ => sum g fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)
state_after: no goals

tactic: rfl
state_before: k : Type u₁
G : Type u₂
H : Type u_1
R : Type u_2
inst✝¹ : Semiring k
inst✝ : Mul G
f g : MonoidAlgebra k G
⊢ f * g = sum f fun a₁ b₁ => sum g fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)
state_after: no goals
Theorem: Submonoid.mem_center_iff
File: Mathlib/GroupTheory/Submonoid/Center.lean

tactic: rw [← Semigroup.mem_center_iff]
state_before: M : Type u_1
inst✝ : Monoid M
z : M
⊢ z ∈ center M ↔ ∀ (g : M), g * z = z * g
state_after: M : Type u_1
inst✝ : Monoid M
z : M
⊢ z ∈ center M ↔ z ∈ Set.center M

tactic: exact Iff.rfl
state_before: M : Type u_1
inst✝ : Monoid M
z : M
⊢ z ∈ center M ↔ z ∈ Set.center M
state_after: no goals
Theorem: Basis.adjustToOrientation_apply_eq_or_eq_neg
File: Mathlib/LinearAlgebra/Orientation.lean

tactic: rw [adjustToOrientation]
state_before: R : Type u_1
inst✝⁵ : LinearOrderedCommRing R
M : Type u_2
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
ι : Type u_3
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
inst✝ : Nonempty ι
e : Basis ι R M
x : Orientation R M ι
i : ι
⊢ (e.adjustToOrientation x) i = e i ∨ (e.adjustToOrientation x) i = -e i
state_after: R : Type u_1
inst✝⁵ : LinearOrderedCommRing R
M : Type u_2
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
ι : Type u_3
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
inst✝ : Nonempty ι
e : Basis ι R M
x : Orientation R M ι
i : ι
⊢ (if e.orientation = x then e else e.unitsSMul (Function.update 1 (Classical.arbitrary ι) (-1))) i = e i ∨
    (if e.orientation = x then e else e.unitsSMul (Function.update 1 (Classical.arbitrary ι) (-1))) i = -e i

tactic: split_ifs with h
state_before: R : Type u_1
inst✝⁵ : LinearOrderedCommRing R
M : Type u_2
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
ι : Type u_3
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
inst✝ : Nonempty ι
e : Basis ι R M
x : Orientation R M ι
i : ι
⊢ (if e.orientation = x then e else e.unitsSMul (Function.update 1 (Classical.arbitrary ι) (-1))) i = e i ∨
    (if e.orientation = x then e else e.unitsSMul (Function.update 1 (Classical.arbitrary ι) (-1))) i = -e i
state_after: case pos
R : Type u_1
inst✝⁵ : LinearOrderedCommRing R
M : Type u_2
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
ι : Type u_3
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
inst✝ : Nonempty ι
e : Basis ι R M
x : Orientation R M ι
i : ι
h : e.orientation = x
⊢ e i = e i ∨ e i = -e i

case neg
R : Type u_1
inst✝⁵ : LinearOrderedCommRing R
M : Type u_2
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
ι : Type u_3
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
inst✝ : Nonempty ι
e : Basis ι R M
x : Orientation R M ι
i : ι
h : ¬e.orientation = x
⊢ (e.unitsSMul (Function.update 1 (Classical.arbitrary ι) (-1))) i = e i ∨
    (e.unitsSMul (Function.update 1 (Classical.arbitrary ι) (-1))) i = -e i

tactic: simp
state_before: case pos
R : Type u_1
inst✝⁵ : LinearOrderedCommRing R
M : Type u_2
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
ι : Type u_3
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
inst✝ : Nonempty ι
e : Basis ι R M
x : Orientation R M ι
i : ι
h : e.orientation = x
⊢ e i = e i ∨ e i = -e i
state_after: no goals

tactic: by_cases hi : i = Classical.arbitrary ι <;> simp [unitsSMul_apply, hi]
state_before: case neg
R : Type u_1
inst✝⁵ : LinearOrderedCommRing R
M : Type u_2
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
ι : Type u_3
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
inst✝ : Nonempty ι
e : Basis ι R M
x : Orientation R M ι
i : ι
h : ¬e.orientation = x
⊢ (e.unitsSMul (Function.update 1 (Classical.arbitrary ι) (-1))) i = e i ∨
    (e.unitsSMul (Function.update 1 (Classical.arbitrary ι) (-1))) i = -e i
state_after: no goals
Theorem: Complex.natCast_mem_slitPlane
File: Mathlib/Analysis/Complex/Basic.lean

tactic: simpa [pos_iff_ne_zero] using @ofReal_mem_slitPlane n
state_before: n : ℕ
⊢ ↑n ∈ slitPlane ↔ n ≠ 0
state_after: no goals
Theorem: PNat.XgcdType.flip_isSpecial
File: Mathlib/Data/PNat/Xgcd.lean

tactic: dsimp [IsSpecial, flip]
state_before: u : XgcdType
⊢ u.flip.IsSpecial ↔ u.IsSpecial
state_after: u : XgcdType
⊢ u.zp + u.wp + u.zp * u.wp = u.y * u.x ↔ u.wp + u.zp + u.wp * u.zp = u.x * u.y

tactic: rw [mul_comm u.x, mul_comm u.zp, add_comm u.zp]
state_before: u : XgcdType
⊢ u.zp + u.wp + u.zp * u.wp = u.y * u.x ↔ u.wp + u.zp + u.wp * u.zp = u.x * u.y
state_after: no goals
Theorem: MeasureTheory.tendstoInMeasure_iff_norm
File: Mathlib/MeasureTheory/Function/ConvergenceInMeasure.lean

tactic: simp_rw [TendstoInMeasure, dist_eq_norm]
state_before: α : Type u_1
ι : Type u_2
E : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝ : SeminormedAddCommGroup E
l : Filter ι
f : ι → α → E
g : α → E
⊢ TendstoInMeasure μ f l g ↔ ∀ (ε : ℝ), 0 < ε → Tendsto (fun i => μ {x | ε ≤ ‖f i x - g x‖}) l (𝓝 0)
state_after: no goals