1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: CategoryTheory.ShiftedHom.mk₀_comp
File: Mathlib/CategoryTheory/Shift/ShiftedHom.lean

tactic: rw [hm₀, add_zero]
state_before: C : Type u_1
inst✝² : Category.{?u.17228, u_1} C
M : Type u_2
inst✝¹ : AddMonoid M
inst✝ : HasShift C M
X Y Z T : C
m₀ : M
hm₀ : m₀ = 0
f : X ⟶ Y
a : M
g : ShiftedHom Y Z a
⊢ a + m₀ = a
state_after: no goals

tactic: subst hm₀
state_before: C : Type u_1
inst✝² : Category.{u_3, u_1} C
M : Type u_2
inst✝¹ : AddMonoid M
inst✝ : HasShift C M
X Y Z T : C
m₀ : M
hm₀ : m₀ = 0
f : X ⟶ Y
a : M
g : ShiftedHom Y Z a
⊢ (mk₀ m₀ hm₀ f).comp g ⋯ = f ≫ g
state_after: C : Type u_1
inst✝² : Category.{u_3, u_1} C
M : Type u_2
inst✝¹ : AddMonoid M
inst✝ : HasShift C M
X Y Z T : C
f : X ⟶ Y
a : M
g : ShiftedHom Y Z a
⊢ (mk₀ 0 ⋯ f).comp g ⋯ = f ≫ g

tactic: simp [comp, mk₀, shiftFunctorAdd'_add_zero_inv_app, shiftFunctorZero']
state_before: C : Type u_1
inst✝² : Category.{u_3, u_1} C
M : Type u_2
inst✝¹ : AddMonoid M
inst✝ : HasShift C M
X Y Z T : C
f : X ⟶ Y
a : M
g : ShiftedHom Y Z a
⊢ (mk₀ 0 ⋯ f).comp g ⋯ = f ≫ g
state_after: no goals
Theorem: Batteries.RBNode.ordered_iff
File: .lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean

tactic: induction t with
| nil => simp
| node c l v r ihl ihr =>
  simp [*, List.pairwise_append, Ordered, All_def,
    and_assoc, and_left_comm, and_comm, imp_and, forall_and]
  exact fun _ _ hl hr a ha b hb => (hl _ ha).trans (hr _ hb)
state_before: α : Type u_1
cmp : α → α → Ordering
t : RBNode α
⊢ Ordered cmp t ↔ List.Pairwise (cmpLT cmp) t.toList
state_after: no goals

tactic: simp
state_before: case nil
α : Type u_1
cmp : α → α → Ordering
⊢ Ordered cmp nil ↔ List.Pairwise (cmpLT cmp) nil.toList
state_after: no goals

tactic: simp [*, List.pairwise_append, Ordered, All_def,
  and_assoc, and_left_comm, and_comm, imp_and, forall_and]
state_before: case node
α : Type u_1
cmp : α → α → Ordering
c : RBColor
l : RBNode α
v : α
r : RBNode α
ihl : Ordered cmp l ↔ List.Pairwise (cmpLT cmp) l.toList
ihr : Ordered cmp r ↔ List.Pairwise (cmpLT cmp) r.toList
⊢ Ordered cmp (node c l v r) ↔ List.Pairwise (cmpLT cmp) (node c l v r).toList
state_after: case node
α : Type u_1
cmp : α → α → Ordering
c : RBColor
l : RBNode α
v : α
r : RBNode α
ihl : Ordered cmp l ↔ List.Pairwise (cmpLT cmp) l.toList
ihr : Ordered cmp r ↔ List.Pairwise (cmpLT cmp) r.toList
⊢ List.Pairwise (cmpLT cmp) l.toList →
    List.Pairwise (cmpLT cmp) r.toList →
      (∀ (x : α), x ∈ l → cmpLT cmp x v) →
        (∀ (a' : α), a' ∈ r → cmpLT cmp v a') → ∀ (x : α), x ∈ l → ∀ (a : α), a ∈ r → cmpLT cmp x a

tactic: exact fun _ _ hl hr a ha b hb => (hl _ ha).trans (hr _ hb)
state_before: case node
α : Type u_1
cmp : α → α → Ordering
c : RBColor
l : RBNode α
v : α
r : RBNode α
ihl : Ordered cmp l ↔ List.Pairwise (cmpLT cmp) l.toList
ihr : Ordered cmp r ↔ List.Pairwise (cmpLT cmp) r.toList
⊢ List.Pairwise (cmpLT cmp) l.toList →
    List.Pairwise (cmpLT cmp) r.toList →
      (∀ (x : α), x ∈ l → cmpLT cmp x v) →
        (∀ (a' : α), a' ∈ r → cmpLT cmp v a') → ∀ (x : α), x ∈ l → ∀ (a : α), a ∈ r → cmpLT cmp x a
state_after: no goals
Theorem: Nat.prime_five
File: Mathlib/Data/Nat/Prime.lean

tactic: decide
state_before: n : ℕ
⊢ Prime 5
state_after: no goals
Theorem: CategoryTheory.Subobject.factorThru_add_sub_factorThru_left
File: Mathlib/CategoryTheory/Subobject/FactorThru.lean

tactic: ext
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : Preadditive C
X Y : C
P : Subobject Y
f g : X ⟶ Y
w : P.Factors (f + g)
wf : P.Factors f
⊢ P.factorThru (f + g) w - P.factorThru f wf = P.factorThru g ⋯
state_after: case h
C : Type u₁
inst✝² : Category.{v₁, u₁} C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : Preadditive C
X Y : C
P : Subobject Y
f g : X ⟶ Y
w : P.Factors (f + g)
wf : P.Factors f
⊢ (P.factorThru (f + g) w - P.factorThru f wf) ≫ P.arrow = P.factorThru g ⋯ ≫ P.arrow

tactic: simp
state_before: case h
C : Type u₁
inst✝² : Category.{v₁, u₁} C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : Preadditive C
X Y : C
P : Subobject Y
f g : X ⟶ Y
w : P.Factors (f + g)
wf : P.Factors f
⊢ (P.factorThru (f + g) w - P.factorThru f wf) ≫ P.arrow = P.factorThru g ⋯ ≫ P.arrow
state_after: no goals
Theorem: Set.mk_preimage_prod_right_eq_empty
File: Mathlib/Data/Set/Prod.lean

tactic: ext b
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
ha : a ∉ s
⊢ Prod.mk a ⁻¹' s ×ˢ t = ∅
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b✝ : β
ha : a ∉ s
b : β
⊢ b ∈ Prod.mk a ⁻¹' s ×ˢ t ↔ b ∈ ∅

tactic: simp [ha]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b✝ : β
ha : a ∉ s
b : β
⊢ b ∈ Prod.mk a ⁻¹' s ×ˢ t ↔ b ∈ ∅
state_after: no goals
Theorem: List.ofFn_eq_ofFnTR
File: .lake/packages/batteries/Batteries/Data/List/Basic.lean

tactic: funext α n f
state_before: ⊢ @ofFn = @ofFnTR
state_after: case h.h.h
α : Type u_1
n : Nat
f : Fin n → α
⊢ ofFn f = ofFnTR f

tactic: simp [ofFnTR]
state_before: case h.h.h
α : Type u_1
n : Nat
f : Fin n → α
⊢ ofFn f = ofFnTR f
state_after: case h.h.h
α : Type u_1
n : Nat
f : Fin n → α
⊢ ofFn f = ofFnTR.go f n ⋯ []

tactic: exact (go 0 n (Nat.zero_add _) (Nat.le_refl _)).symm
state_before: case h.h.h
α : Type u_1
n : Nat
f : Fin n → α
⊢ ofFn f = ofFnTR.go f n ⋯ []
state_after: no goals

tactic: unfold ofFnTR.go
state_before: α : Type u_1
n : Nat
f : Fin n → α
i j : Nat
h : i + j = n
h' : j ≤ n
⊢ ofFnTR.go f j h' (ofFn.go f i j h) = ofFn f
state_after: α : Type u_1
n : Nat
f : Fin n → α
i j : Nat
h : i + j = n
h' : j ≤ n
⊢ (match j, h', ofFn.go f i j h with
    | 0, x, acc => acc
    | i.succ, h, acc => ofFnTR.go f i ⋯ (f ⟨i, h⟩ :: acc)) =
    ofFn f

tactic: split
state_before: α : Type u_1
n : Nat
f : Fin n → α
i j : Nat
h : i + j = n
h' : j ≤ n
⊢ (match j, h', ofFn.go f i j h with
    | 0, x, acc => acc
    | i.succ, h, acc => ofFnTR.go f i ⋯ (f ⟨i, h⟩ :: acc)) =
    ofFn f
state_after: case h_1
α : Type u_1
n : Nat
f : Fin n → α
i x✝³ : Nat
x✝² : x✝³ ≤ n
x✝¹ : List α
x✝ : 0 ≤ n
h : i + 0 = n
⊢ ofFn.go f i 0 h = ofFn f

case h_2
α : Type u_1
n : Nat
f : Fin n → α
i x✝² : Nat
x✝¹ : x✝² ≤ n
x✝ : List α
i✝ : Nat
h✝ : i✝ + 1 ≤ n
h : i + i✝.succ = n
⊢ ofFnTR.go f i✝ ⋯ (f ⟨i✝, h✝⟩ :: ofFn.go f i i✝.succ h) = ofFn f

tactic: subst h
state_before: case h_1
α : Type u_1
n : Nat
f : Fin n → α
i x✝³ : Nat
x✝² : x✝³ ≤ n
x✝¹ : List α
x✝ : 0 ≤ n
h : i + 0 = n
⊢ ofFn.go f i 0 h = ofFn f
state_after: case h_1
α : Type u_1
i x✝³ : Nat
x✝² : List α
f : Fin (i + 0) → α
x✝¹ : x✝³ ≤ i + 0
x✝ : 0 ≤ i + 0
⊢ ofFn.go f i 0 ⋯ = ofFn f

tactic: rfl
state_before: case h_1
α : Type u_1
i x✝³ : Nat
x✝² : List α
f : Fin (i + 0) → α
x✝¹ : x✝³ ≤ i + 0
x✝ : 0 ≤ i + 0
⊢ ofFn.go f i 0 ⋯ = ofFn f
state_after: no goals

tactic: next l j h' => exact go (i+1) j ((Nat.succ_add ..).trans h) (Nat.le_of_lt h')
state_before: case h_2
α : Type u_1
n : Nat
f : Fin n → α
i x✝² : Nat
x✝¹ : x✝² ≤ n
x✝ : List α
i✝ : Nat
h✝ : i✝ + 1 ≤ n
h : i + i✝.succ = n
⊢ ofFnTR.go f i✝ ⋯ (f ⟨i✝, h✝⟩ :: ofFn.go f i i✝.succ h) = ofFn f
state_after: no goals

tactic: exact go (i+1) j ((Nat.succ_add ..).trans h) (Nat.le_of_lt h')
state_before: α : Type u_1
n : Nat
f : Fin n → α
i x✝¹ : Nat
x✝ : x✝¹ ≤ n
l : List α
j : Nat
h' : j + 1 ≤ n
h : i + j.succ = n
⊢ ofFnTR.go f j ⋯ (f ⟨j, h'⟩ :: ofFn.go f i j.succ h) = ofFn f
state_after: no goals
Theorem: ContinuousAffineMap.to_affine_map_contLinear
File: Mathlib/Analysis/NormedSpace/ContinuousAffineMap.lean

tactic: ext
state_before: 𝕜 : Type u_1
R : Type u_2
V : Type u_3
W : Type u_4
W₂ : Type u_5
P : Type u_6
Q : Type u_7
Q₂ : Type u_8
inst✝¹⁶ : NormedAddCommGroup V
inst✝¹⁵ : MetricSpace P
inst✝¹⁴ : NormedAddTorsor V P
inst✝¹³ : NormedAddCommGroup W
inst✝¹² : MetricSpace Q
inst✝¹¹ : NormedAddTorsor W Q
inst✝¹⁰ : NormedAddCommGroup W₂
inst✝⁹ : MetricSpace Q₂
inst✝⁸ : NormedAddTorsor W₂ Q₂
inst✝⁷ : NormedField R
inst✝⁶ : NormedSpace R V
inst✝⁵ : NormedSpace R W
inst✝⁴ : NormedSpace R W₂
inst✝³ : NontriviallyNormedField 𝕜
inst✝² : NormedSpace 𝕜 V
inst✝¹ : NormedSpace 𝕜 W
inst✝ : NormedSpace 𝕜 W₂
f : V →L[R] W
⊢ f.toContinuousAffineMap.contLinear = f
state_after: case h
𝕜 : Type u_1
R : Type u_2
V : Type u_3
W : Type u_4
W₂ : Type u_5
P : Type u_6
Q : Type u_7
Q₂ : Type u_8
inst✝¹⁶ : NormedAddCommGroup V
inst✝¹⁵ : MetricSpace P
inst✝¹⁴ : NormedAddTorsor V P
inst✝¹³ : NormedAddCommGroup W
inst✝¹² : MetricSpace Q
inst✝¹¹ : NormedAddTorsor W Q
inst✝¹⁰ : NormedAddCommGroup W₂
inst✝⁹ : MetricSpace Q₂
inst✝⁸ : NormedAddTorsor W₂ Q₂
inst✝⁷ : NormedField R
inst✝⁶ : NormedSpace R V
inst✝⁵ : NormedSpace R W
inst✝⁴ : NormedSpace R W₂
inst✝³ : NontriviallyNormedField 𝕜
inst✝² : NormedSpace 𝕜 V
inst✝¹ : NormedSpace 𝕜 W
inst✝ : NormedSpace 𝕜 W₂
f : V →L[R] W
x✝ : V
⊢ f.toContinuousAffineMap.contLinear x✝ = f x✝

tactic: rfl
state_before: case h
𝕜 : Type u_1
R : Type u_2
V : Type u_3
W : Type u_4
W₂ : Type u_5
P : Type u_6
Q : Type u_7
Q₂ : Type u_8
inst✝¹⁶ : NormedAddCommGroup V
inst✝¹⁵ : MetricSpace P
inst✝¹⁴ : NormedAddTorsor V P
inst✝¹³ : NormedAddCommGroup W
inst✝¹² : MetricSpace Q
inst✝¹¹ : NormedAddTorsor W Q
inst✝¹⁰ : NormedAddCommGroup W₂
inst✝⁹ : MetricSpace Q₂
inst✝⁸ : NormedAddTorsor W₂ Q₂
inst✝⁷ : NormedField R
inst✝⁶ : NormedSpace R V
inst✝⁵ : NormedSpace R W
inst✝⁴ : NormedSpace R W₂
inst✝³ : NontriviallyNormedField 𝕜
inst✝² : NormedSpace 𝕜 V
inst✝¹ : NormedSpace 𝕜 W
inst✝ : NormedSpace 𝕜 W₂
f : V →L[R] W
x✝ : V
⊢ f.toContinuousAffineMap.contLinear x✝ = f x✝
state_after: no goals
Theorem: Set.diagonal_subset_iff
File: Mathlib/Data/Set/Prod.lean

tactic: rw [← range_diag, range_subset_iff]
state_before: α : Type u_1
s✝ t : Set α
s : Set (α × α)
⊢ diagonal α ⊆ s ↔ ∀ (x : α), (x, x) ∈ s
state_after: no goals
Theorem: Order.Ioo_pred_left_of_not_isMin
File: Mathlib/Order/SuccPred/Basic.lean

tactic: rw [← Ioi_inter_Iio, Ioi_pred_of_not_isMin ha, Ici_inter_Iio]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : PredOrder α
a b : α
ha : ¬IsMin a
⊢ Ioo (pred a) b = Ico a b
state_after: no goals
Theorem: MeasureTheory.SignedMeasure.someExistsOneDivLT_spec
File: Mathlib/MeasureTheory/Decomposition/SignedHahn.lean

tactic: rw [someExistsOneDivLT, dif_pos hi]
state_before: α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
hi : ¬restrict s i ≤ restrict 0 i
⊢ MeasureTheory.SignedMeasure.someExistsOneDivLT s i ⊆ i ∧
    MeasurableSet (MeasureTheory.SignedMeasure.someExistsOneDivLT s i) ∧
      1 / (↑(MeasureTheory.SignedMeasure.findExistsOneDivLT s i) + 1) <
        ↑s (MeasureTheory.SignedMeasure.someExistsOneDivLT s i)
state_after: α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
hi : ¬restrict s i ≤ restrict 0 i
⊢ Classical.choose ⋯ ⊆ i ∧
    MeasurableSet (Classical.choose ⋯) ∧
      1 / (↑(MeasureTheory.SignedMeasure.findExistsOneDivLT s i) + 1) < ↑s (Classical.choose ⋯)

tactic: exact Classical.choose_spec (findExistsOneDivLT_spec hi)
state_before: α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
hi : ¬restrict s i ≤ restrict 0 i
⊢ Classical.choose ⋯ ⊆ i ∧
    MeasurableSet (Classical.choose ⋯) ∧
      1 / (↑(MeasureTheory.SignedMeasure.findExistsOneDivLT s i) + 1) < ↑s (Classical.choose ⋯)
state_after: no goals
Theorem: ZMod.natCast_mod
File: Mathlib/Data/ZMod/Basic.lean

tactic: conv =>
    rhs
    rw [← Nat.mod_add_div a n]
state_before: a n : ℕ
⊢ ↑(a % n) = ↑a
state_after: a n : ℕ
⊢ ↑(a % n) = ↑(a % n + n * (a / n))

tactic: simp
state_before: a n : ℕ
⊢ ↑(a % n) = ↑(a % n + n * (a / n))
state_after: no goals
Theorem: IsSl2Triple.lie_h_e_smul
File: Mathlib/Algebra/Lie/Sl2.lean

tactic: simp [t.lie_h_e_nsmul, two_smul]
state_before: R : Type u_1
L : Type u_2
M : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
h e f : L
t : IsSl2Triple h e f
⊢ ⁅h, e⁆ = 2 • e
state_after: no goals
Theorem: VitaliFamily.aemeasurable_limRatio
File: Mathlib/MeasureTheory/Covering/Differentiation.lean

tactic: apply ENNReal.aemeasurable_of_exist_almost_disjoint_supersets _ _ fun p q hpq => ?_
state_before: α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
hρ : ρ ≪ μ
⊢ AEMeasurable (v.limRatio ρ) μ
state_after: α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
hρ : ρ ≪ μ
p q : ℝ≥0
hpq : p < q
⊢ ∃ u v_1,
    MeasurableSet u ∧
      MeasurableSet v_1 ∧ {x | v.limRatio ρ x < ↑p} ⊆ u ∧ {x | ↑q < v.limRatio ρ x} ⊆ v_1 ∧ μ (u ∩ v_1) = 0

tactic: exact v.exists_measurable_supersets_limRatio hρ hpq
state_before: α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
hρ : ρ ≪ μ
p q : ℝ≥0
hpq : p < q
⊢ ∃ u v_1,
    MeasurableSet u ∧
      MeasurableSet v_1 ∧ {x | v.limRatio ρ x < ↑p} ⊆ u ∧ {x | ↑q < v.limRatio ρ x} ⊆ v_1 ∧ μ (u ∩ v_1) = 0
state_after: no goals
Theorem: Submodule.orthogonal_disjoint
File: Mathlib/Analysis/InnerProductSpace/Orthogonal.lean

tactic: simp [disjoint_iff, K.inf_orthogonal_eq_bot]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace 𝕜 F
K : Submodule 𝕜 E
⊢ Disjoint K Kᗮ
state_after: no goals
Theorem: Real.cos_le_one_div_sqrt_sq_add_one
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Bounds.lean

tactic: rcases eq_or_ne x 0 with (rfl | hx3)
state_before: x✝ x : ℝ
hx1 : -(3 * π / 2) ≤ x
hx2 : x ≤ 3 * π / 2
⊢ cos x ≤ 1 / √(x ^ 2 + 1)
state_after: case inl
x : ℝ
hx1 : -(3 * π / 2) ≤ 0
hx2 : 0 ≤ 3 * π / 2
⊢ cos 0 ≤ 1 / √(0 ^ 2 + 1)

case inr
x✝ x : ℝ
hx1 : -(3 * π / 2) ≤ x
hx2 : x ≤ 3 * π / 2
hx3 : x ≠ 0
⊢ cos x ≤ 1 / √(x ^ 2 + 1)

tactic: simp
state_before: case inl
x : ℝ
hx1 : -(3 * π / 2) ≤ 0
hx2 : 0 ≤ 3 * π / 2
⊢ cos 0 ≤ 1 / √(0 ^ 2 + 1)
state_after: no goals

tactic: exact (cos_lt_one_div_sqrt_sq_add_one hx1 hx2 hx3).le
state_before: case inr
x✝ x : ℝ
hx1 : -(3 * π / 2) ≤ x
hx2 : x ≤ 3 * π / 2
hx3 : x ≠ 0
⊢ cos x ≤ 1 / √(x ^ 2 + 1)
state_after: no goals
Theorem: NonUnitalSubsemiring.unitization_range
File: Mathlib/Algebra/Algebra/Subalgebra/Unitization.lean

tactic: have := AddSubmonoidClass.nsmulMemClass (S := S)
state_before: R : Type u_1
S : Type u_2
inst✝¹ : Semiring R
inst✝ : SetLike S R
hSR : NonUnitalSubsemiringClass S R
s : S
⊢ (unitization s).range = subalgebraOfSubsemiring (Subsemiring.closure ↑s)
state_after: R : Type u_1
S : Type u_2
inst✝¹ : Semiring R
inst✝ : SetLike S R
hSR : NonUnitalSubsemiringClass S R
s : S
this : SMulMemClass S ℕ R
⊢ (unitization s).range = subalgebraOfSubsemiring (Subsemiring.closure ↑s)

tactic: rw [unitization, NonUnitalSubalgebra.unitization_range (hSRA := this), Algebra.adjoin_nat]
state_before: R : Type u_1
S : Type u_2
inst✝¹ : Semiring R
inst✝ : SetLike S R
hSR : NonUnitalSubsemiringClass S R
s : S
this : SMulMemClass S ℕ R
⊢ (unitization s).range = subalgebraOfSubsemiring (Subsemiring.closure ↑s)
state_after: no goals
Theorem: AddMonoidAlgebra.mem_adjoin_support
File: Mathlib/RingTheory/FiniteType.lean

tactic: suffices span R (of' R M '' f.support) ≤
    Subalgebra.toSubmodule (adjoin R (of' R M '' f.support)) by
  exact this (mem_span_support f)
state_before: R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
inst✝ : AddMonoid M
f : R[M]
⊢ f ∈ adjoin R (of' R M '' ↑f.support)
state_after: R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
inst✝ : AddMonoid M
f : R[M]
⊢ span R (of' R M '' ↑f.support) ≤ Subalgebra.toSubmodule (adjoin R (of' R M '' ↑f.support))

tactic: rw [Submodule.span_le]
state_before: R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
inst✝ : AddMonoid M
f : R[M]
⊢ span R (of' R M '' ↑f.support) ≤ Subalgebra.toSubmodule (adjoin R (of' R M '' ↑f.support))
state_after: R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
inst✝ : AddMonoid M
f : R[M]
⊢ of' R M '' ↑f.support ⊆ ↑(Subalgebra.toSubmodule (adjoin R (of' R M '' ↑f.support)))

tactic: exact subset_adjoin
state_before: R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
inst✝ : AddMonoid M
f : R[M]
⊢ of' R M '' ↑f.support ⊆ ↑(Subalgebra.toSubmodule (adjoin R (of' R M '' ↑f.support)))
state_after: no goals

tactic: exact this (mem_span_support f)
state_before: R : Type u_1
M : Type u_2
inst✝¹ : CommSemiring R
inst✝ : AddMonoid M
f : R[M]
this : span R (of' R M '' ↑f.support) ≤ Subalgebra.toSubmodule (adjoin R (of' R M '' ↑f.support))
⊢ f ∈ adjoin R (of' R M '' ↑f.support)
state_after: no goals
Theorem: ProbabilityTheory.IsCondKernelCDF.toKernel_Iic
File: Mathlib/Probability/Kernel/Disintegration/CdfToKernel.lean

tactic: rw [IsCondKernelCDF.toKernel_apply p, (f p).measure_Iic (hf.tendsto_atBot_zero p)]
state_before: α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : ↥(kernel α (β × ℝ))
ν✝ : ↥(kernel α β)
x✝ : MeasurableSpace β
f : α × β → StieltjesFunction
κ : ↥(kernel α (β × ℝ))
ν : ↥(kernel α β)
hf : IsCondKernelCDF f κ ν
p : α × β
x : ℝ
⊢ ((toKernel f hf) p) (Iic x) = ENNReal.ofReal (↑(f p) x)
state_after: α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : ↥(kernel α (β × ℝ))
ν✝ : ↥(kernel α β)
x✝ : MeasurableSpace β
f : α × β → StieltjesFunction
κ : ↥(kernel α (β × ℝ))
ν : ↥(kernel α β)
hf : IsCondKernelCDF f κ ν
p : α × β
x : ℝ
⊢ ENNReal.ofReal (↑(f p) x - 0) = ENNReal.ofReal (↑(f p) x)

tactic: simp
state_before: α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : ↥(kernel α (β × ℝ))
ν✝ : ↥(kernel α β)
x✝ : MeasurableSpace β
f : α × β → StieltjesFunction
κ : ↥(kernel α (β × ℝ))
ν : ↥(kernel α β)
hf : IsCondKernelCDF f κ ν
p : α × β
x : ℝ
⊢ ENNReal.ofReal (↑(f p) x - 0) = ENNReal.ofReal (↑(f p) x)
state_after: no goals
Theorem: CategoryTheory.Bicategory.whiskerRight_comp_symm
File: Mathlib/CategoryTheory/Bicategory/Basic.lean

tactic: simp
state_before: B : Type u
inst✝ : Bicategory B
a b c d e : B
f f' : a ⟶ b
η : f ⟶ f'
g : b ⟶ c
h : c ⟶ d
⊢ η ▷ g ▷ h = (α_ f g h).hom ≫ η ▷ (g ≫ h) ≫ (α_ f' g h).inv
state_after: no goals
Theorem: Polynomial.taylor_coeff
File: Mathlib/Algebra/Polynomial/Taylor.lean

tactic: congr 1
state_before: R : Type u_1
inst✝ : Semiring R
r : R
f : R[X]
n : ℕ
⊢ (lcoeff R n ∘ₗ taylor r) f = (leval r ∘ₗ hasseDeriv n) f
state_after: case e_a
R : Type u_1
inst✝ : Semiring R
r : R
f : R[X]
n : ℕ
⊢ lcoeff R n ∘ₗ taylor r = leval r ∘ₗ hasseDeriv n

tactic: clear! f
state_before: case e_a
R : Type u_1
inst✝ : Semiring R
r : R
f : R[X]
n : ℕ
⊢ lcoeff R n ∘ₗ taylor r = leval r ∘ₗ hasseDeriv n
state_after: case e_a
R : Type u_1
inst✝ : Semiring R
r : R
n : ℕ
⊢ lcoeff R n ∘ₗ taylor r = leval r ∘ₗ hasseDeriv n

tactic: ext i
state_before: case e_a
R : Type u_1
inst✝ : Semiring R
r : R
n : ℕ
⊢ lcoeff R n ∘ₗ taylor r = leval r ∘ₗ hasseDeriv n
state_after: case e_a.h.h
R : Type u_1
inst✝ : Semiring R
r : R
n i : ℕ
⊢ ((lcoeff R n ∘ₗ taylor r) ∘ₗ monomial i) 1 = ((leval r ∘ₗ hasseDeriv n) ∘ₗ monomial i) 1

tactic: simp only [leval_apply, mul_one, one_mul, eval_monomial, LinearMap.comp_apply, coeff_C_mul,
  hasseDeriv_monomial, taylor_apply, monomial_comp, C_1, (commute_X (C r)).add_pow i,
  map_sum]
state_before: case e_a.h.h
R : Type u_1
inst✝ : Semiring R
r : R
n i : ℕ
⊢ ((lcoeff R n ∘ₗ taylor r) ∘ₗ monomial i) 1 = ((leval r ∘ₗ hasseDeriv n) ∘ₗ monomial i) 1
state_after: case e_a.h.h
R : Type u_1
inst✝ : Semiring R
r : R
n i : ℕ
⊢ ∑ x ∈ Finset.range (i + 1), (lcoeff R n) (X ^ x * C r ^ (i - x) * ↑(i.choose x)) = ↑(i.choose n) * r ^ (i - n)

tactic: simp only [lcoeff_apply, ← C_eq_natCast, mul_assoc, ← C_pow, ← C_mul, coeff_mul_C,
  (Nat.cast_commute _ _).eq, coeff_X_pow, boole_mul, Finset.sum_ite_eq, Finset.mem_range]
state_before: case e_a.h.h
R : Type u_1
inst✝ : Semiring R
r : R
n i : ℕ
⊢ ∑ x ∈ Finset.range (i + 1), (lcoeff R n) (X ^ x * C r ^ (i - x) * ↑(i.choose x)) = ↑(i.choose n) * r ^ (i - n)
state_after: case e_a.h.h
R : Type u_1
inst✝ : Semiring R
r : R
n i : ℕ
⊢ (if n < i + 1 then r ^ (i - n) * ↑(i.choose n) else 0) = r ^ (i - n) * ↑(i.choose n)

tactic: split_ifs with h
state_before: case e_a.h.h
R : Type u_1
inst✝ : Semiring R
r : R
n i : ℕ
⊢ (if n < i + 1 then r ^ (i - n) * ↑(i.choose n) else 0) = r ^ (i - n) * ↑(i.choose n)
state_after: case pos
R : Type u_1
inst✝ : Semiring R
r : R
n i : ℕ
h : n < i + 1
⊢ r ^ (i - n) * ↑(i.choose n) = r ^ (i - n) * ↑(i.choose n)

case neg
R : Type u_1
inst✝ : Semiring R
r : R
n i : ℕ
h : ¬n < i + 1
⊢ 0 = r ^ (i - n) * ↑(i.choose n)

tactic: push_neg at h
state_before: case neg
R : Type u_1
inst✝ : Semiring R
r : R
n i : ℕ
h : ¬n < i + 1
⊢ 0 = r ^ (i - n) * ↑(i.choose n)
state_after: case neg
R : Type u_1
inst✝ : Semiring R
r : R
n i : ℕ
h : i + 1 ≤ n
⊢ 0 = r ^ (i - n) * ↑(i.choose n)

tactic: rw [Nat.choose_eq_zero_of_lt h, Nat.cast_zero, mul_zero]
state_before: case neg
R : Type u_1
inst✝ : Semiring R
r : R
n i : ℕ
h : i + 1 ≤ n
⊢ 0 = r ^ (i - n) * ↑(i.choose n)
state_after: no goals

tactic: rfl
state_before: case pos
R : Type u_1
inst✝ : Semiring R
r : R
n i : ℕ
h : n < i + 1
⊢ r ^ (i - n) * ↑(i.choose n) = r ^ (i - n) * ↑(i.choose n)
state_after: no goals
Theorem: SimpleGraph.Subgraph.neighborSet_iInf
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

tactic: simp [iInf]
state_before: ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : G.Subgraph
a b : V
f : ι → G.Subgraph
v : V
⊢ (⨅ i, f i).neighborSet v = (⋂ i, (f i).neighborSet v) ∩ G.neighborSet v
state_after: no goals
Theorem: MvPolynomial.comap_eq_id_of_eq_id
File: Mathlib/Algebra/MvPolynomial/Comap.lean

tactic: convert comap_id_apply x
state_before: σ : Type u_1
τ : Type u_2
υ : Type u_3
R : Type u_4
inst✝ : CommSemiring R
f : MvPolynomial σ R →ₐ[R] MvPolynomial σ R
hf : ∀ (φ : MvPolynomial σ R), f φ = φ
x : σ → R
⊢ comap f x = x
state_after: case h.e'_2.h.e'_5
σ : Type u_1
τ : Type u_2
υ : Type u_3
R : Type u_4
inst✝ : CommSemiring R
f : MvPolynomial σ R →ₐ[R] MvPolynomial σ R
hf : ∀ (φ : MvPolynomial σ R), f φ = φ
x : σ → R
⊢ f = AlgHom.id R (MvPolynomial σ R)

tactic: ext1 φ
state_before: case h.e'_2.h.e'_5
σ : Type u_1
τ : Type u_2
υ : Type u_3
R : Type u_4
inst✝ : CommSemiring R
f : MvPolynomial σ R →ₐ[R] MvPolynomial σ R
hf : ∀ (φ : MvPolynomial σ R), f φ = φ
x : σ → R
⊢ f = AlgHom.id R (MvPolynomial σ R)
state_after: case h.e'_2.h.e'_5.hf
σ : Type u_1
τ : Type u_2
υ : Type u_3
R : Type u_4
inst✝ : CommSemiring R
f : MvPolynomial σ R →ₐ[R] MvPolynomial σ R
hf : ∀ (φ : MvPolynomial σ R), f φ = φ
x : σ → R
φ : σ
⊢ f (X φ) = (AlgHom.id R (MvPolynomial σ R)) (X φ)

tactic: simp [hf, AlgHom.id_apply]
state_before: case h.e'_2.h.e'_5.hf
σ : Type u_1
τ : Type u_2
υ : Type u_3
R : Type u_4
inst✝ : CommSemiring R
f : MvPolynomial σ R →ₐ[R] MvPolynomial σ R
hf : ∀ (φ : MvPolynomial σ R), f φ = φ
x : σ → R
φ : σ
⊢ f (X φ) = (AlgHom.id R (MvPolynomial σ R)) (X φ)
state_after: no goals