tasksource/leandojo huggingface dataset:
Theorem: isArtinian_of_tower
File: Mathlib/RingTheory/Artinian.lean

tactic: rw [isArtinian_iff_wellFounded] at h⊢
state_before: R : Type u_1
S : Type u_2
M : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : Ring S
inst✝⁴ : AddCommGroup M
inst✝³ : Algebra R S
inst✝² : Module S M
inst✝¹ : Module R M
inst✝ : IsScalarTower R S M
h : IsArtinian R M
⊢ IsArtinian S M

tactic: refine' (Submodule.restrictScalarsEmbedding R S M).wellFounded h
state_before: R : Type u_1
S : Type u_2
M : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : Ring S
inst✝⁴ : AddCommGroup M
inst✝³ : Algebra R S
inst✝² : Module S M
inst✝¹ : Module R M
inst✝ : IsScalarTower R S M
h : WellFounded fun x x_1 => x < x_1
⊢ WellFounded fun x x_1 => x < x_1
Theorem: Finset.affineCombination_affineCombinationSingleWeights
File: Mathlib/LinearAlgebra/AffineSpace/Combination.lean

tactic: refine' s.affineCombination_of_eq_one_of_eq_zero _ _ hi (by simp) _
state_before: k : Type u_3
V : Type u_4
P : Type u_2
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
ι : Type u_1
s : Finset ι
ι₂ : Type ?u.451416
s₂ : Finset ι₂
inst✝ : DecidableEq ι
p : ι → P
i : ι
hi : i ∈ s
⊢ ↑(affineCombination k s p) (affineCombinationSingleWeights k i) = p i

tactic: rintro j - hj
state_before: k : Type u_3
V : Type u_4
P : Type u_2
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
ι : Type u_1
s : Finset ι
ι₂ : Type ?u.451416
s₂ : Finset ι₂
inst✝ : DecidableEq ι
p : ι → P
i : ι
hi : i ∈ s
⊢ ∀ (i2 : ι), i2 ∈ s → i2 ≠ i → affineCombinationSingleWeights k i i2 = 0

tactic: simp [hj]
state_before: k : Type u_3
V : Type u_4
P : Type u_2
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
ι : Type u_1
s : Finset ι
ι₂ : Type ?u.451416
s₂ : Finset ι₂
inst✝ : DecidableEq ι
p : ι → P
i : ι
hi : i ∈ s
j : ι
hj : j ≠ i
⊢ affineCombinationSingleWeights k i j = 0

tactic: simp
state_before: k : Type u_3
V : Type u_4
P : Type u_2
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
S : AffineSpace V P
ι : Type u_1
s : Finset ι
ι₂ : Type ?u.451416
s₂ : Finset ι₂
inst✝ : DecidableEq ι
p : ι → P
i : ι
hi : i ∈ s
⊢ affineCombinationSingleWeights k i i = 1
Theorem: mul_invOf_self_assoc
File: Mathlib/Algebra/Invertible.lean

tactic: rw [← mul_assoc, mul_invOf_self, one_mul]
state_before: α : Type u
inst✝¹ : Monoid α
a b : α
inst✝ : Invertible a
⊢ a * (⅟a * b) = b
Theorem: Filter.Tendsto.of_tendsto_comp
File: Mathlib/Order/Filter/Basic.lean

tactic: rw [tendsto_iff_comap] at hfg⊢
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.312157
ι : Sort x
f : α → β
g : β → γ
a : Filter α
b : Filter β
c : Filter γ
hfg : Tendsto (g ∘ f) a c
hg : comap g c ≤ b
⊢ Tendsto f a b

tactic: calc
  a ≤ comap (g ∘ f) c := hfg
  _ ≤ comap f b := by simpa [comap_comap] using comap_mono hg
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.312157
ι : Sort x
f : α → β
g : β → γ
a : Filter α
b : Filter β
c : Filter γ
hfg : a ≤ comap (g ∘ f) c
hg : comap g c ≤ b
⊢ a ≤ comap f b

tactic: simpa [comap_comap] using comap_mono hg
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.312157
ι : Sort x
f : α → β
g : β → γ
a : Filter α
b : Filter β
c : Filter γ
hfg : a ≤ comap (g ∘ f) c
hg : comap g c ≤ b
⊢ comap (g ∘ f) c ≤ comap f b
Theorem: CategoryTheory.Limits.coprod.desc_comp
File: Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean

tactic: apply coprod.hom_ext
state_before: C : Type u
inst✝¹ : Category C
X✝ Y✝ V W X Y : C
inst✝ : HasBinaryCoproduct X Y
f : V ⟶ W
g : X ⟶ V
h : Y ⟶ V
⊢ desc g h ≫ f = desc (g ≫ f) (h ≫ f)

tactic: simp
state_before: case h₁
C : Type u
inst✝¹ : Category C
X✝ Y✝ V W X Y : C
inst✝ : HasBinaryCoproduct X Y
f : V ⟶ W
g : X ⟶ V
h : Y ⟶ V
⊢ inl ≫ desc g h ≫ f = inl ≫ desc (g ≫ f) (h ≫ f)

case h₂
C : Type u
inst✝¹ : Category C
X✝ Y✝ V W X Y : C
inst✝ : HasBinaryCoproduct X Y
f : V ⟶ W
g : X ⟶ V
h : Y ⟶ V
⊢ inr ≫ desc g h ≫ f = inr ≫ desc (g ≫ f) (h ≫ f)

tactic: simp
state_before: case h₂
C : Type u
inst✝¹ : Category C
X✝ Y✝ V W X Y : C
inst✝ : HasBinaryCoproduct X Y
f : V ⟶ W
g : X ⟶ V
h : Y ⟶ V
⊢ inr ≫ desc g h ≫ f = inr ≫ desc (g ≫ f) (h ≫ f)
Theorem: CircleDeg1Lift.le_translationNumber_of_add_int_le
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

tactic: simp only [coe_pow, mul_comm (m : ℝ), ← Nat.cast_add_one, f.le_iterate_of_add_int_le_map h]
state_before: f g : CircleDeg1Lift
x : ℝ
m : ℤ
h : x + ↑m ≤ ↑f x
n : ℕ
⊢ x + ↑m * (↑n + 1) ≤ ↑(f ^ (n + 1)) x
Theorem: List.join_concat
File: Mathlib/Data/List/Join.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.1306
L : List (List α)
l : List α
⊢ join (concat L l) = join L ++ l
Theorem: MeasureTheory.L1.continuous_integral
File: Mathlib/MeasureTheory/Integral/Bochner.lean

tactic: simp only [integral]
state_before: α : Type u_1
E : Type u_2
F : Type ?u.553193
𝕜 : Type ?u.553196
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedAddCommGroup F
m : MeasurableSpace α
μ : Measure α
inst✝⁵ : NormedSpace ℝ E
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedSpace 𝕜 E
inst✝² : SMulCommClass ℝ 𝕜 E
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace E
⊢ Continuous fun f => integral f

tactic: exact L1.integralCLM.continuous
state_before: α : Type u_1
E : Type u_2
F : Type ?u.553193
𝕜 : Type ?u.553196
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedAddCommGroup F
m : MeasurableSpace α
μ : Measure α
inst✝⁵ : NormedSpace ℝ E
inst✝⁴ : NontriviallyNormedField 𝕜
inst✝³ : NormedSpace 𝕜 E
inst✝² : SMulCommClass ℝ 𝕜 E
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace E
⊢ Continuous fun f => ↑integralCLM f
Theorem: HilbertBasis.repr_apply_apply
File: Mathlib/Analysis/InnerProductSpace/l2Space.lean

tactic: rw [← b.repr.inner_map_map (b i) v, b.repr_self, lp.inner_single_left]
state_before: ι : Type u_1
𝕜 : Type u_2
inst✝⁴ : IsROrC 𝕜
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
cplt : CompleteSpace E
G : ι → Type ?u.717710
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
b : HilbertBasis ι 𝕜 E
v : E
i : ι
⊢ ↑(↑b.repr v) i = inner ((fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) v

tactic: simp
state_before: ι : Type u_1
𝕜 : Type u_2
inst✝⁴ : IsROrC 𝕜
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
cplt : CompleteSpace E
G : ι → Type ?u.717710
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
b : HilbertBasis ι 𝕜 E
v : E
i : ι
⊢ ↑(↑b.repr v) i = inner 1 (↑(↑b.repr v) i)
Theorem: ContDiffOn.continuousOn_fderivWithin_apply
File: Mathlib/Analysis/Calculus/ContDiff.lean

tactic: rwa [zero_add]
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
D : Type uD
inst✝⁹ : NormedAddCommGroup D
inst✝⁸ : NormedSpace 𝕜 D
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type ?u.1151332
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
b : E × F → G
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
hf : ContDiffOn 𝕜 n f s
hs : UniqueDiffOn 𝕜 s
hn : 1 ≤ n
⊢ ?m.1156836 hf hs hn + 1 ≤ n
Theorem: Stream'.WSeq.head_terminates_of_head_tail_terminates
File: Mathlib/Data/Seq/WSeq.lean

tactic: rcases (head_terminates_iff _).1 T with ⟨⟨a, h⟩⟩
state_before: α : Type u
β : Type v
γ : Type w
s : WSeq α
T : Terminates (head (tail s))
⊢ Terminates (destruct s)

tactic: simp [tail] at h
state_before: case mk.intro
α : Type u
β : Type v
γ : Type w
s : WSeq α
T : Terminates (head (tail s))
a : Option (α × WSeq α)
h : a ∈ destruct (tail s)
⊢ Terminates (destruct s)

tactic: rcases exists_of_mem_bind h with ⟨s', h1, _⟩
state_before: case mk.intro
α : Type u
β : Type v
γ : Type w
s : WSeq α
T : Terminates (head (tail s))
a : Option (α × WSeq α)
h : a ∈ (fun o => Option.rec nil Prod.snd o) <$> destruct s >>= destruct
⊢ Terminates (destruct s)

tactic: unfold Functor.map at h1
state_before: case mk.intro.intro.intro
α : Type u
β : Type v
γ : Type w
s : WSeq α
T : Terminates (head (tail s))
a : Option (α × WSeq α)
h : a ∈ (fun o => Option.rec nil Prod.snd o) <$> destruct s >>= destruct
s' : WSeq α
h1 : s' ∈ (fun o => Option.rec nil Prod.snd o) <$> destruct s
right✝ : a ∈ destruct s'
⊢ Terminates (destruct s)

tactic: exact
  let ⟨t, h3, _⟩ := Computation.exists_of_mem_map h1
  Computation.terminates_of_mem h3
state_before: case mk.intro.intro.intro
α : Type u
β : Type v
γ : Type w
s : WSeq α
T : Terminates (head (tail s))
a : Option (α × WSeq α)
h : a ∈ (fun o => Option.rec nil Prod.snd o) <$> destruct s >>= destruct
s' : WSeq α
h1 : s' ∈ Applicative.toFunctor.1 (fun o => Option.rec nil Prod.snd o) (destruct s)
right✝ : a ∈ destruct s'
⊢ Terminates (destruct s)
Theorem: Fin.exists_succ_eq_iff
File: Mathlib/Data/Fin/Basic.lean

tactic: convert @exists_succAbove_eq_iff n 0 x
state_before: n m : ℕ
x : Fin (n + 1)
⊢ (∃ y, succ y = x) ↔ x ≠ 0
Theorem: Set.OrdConnected.strictConvex
File: Mathlib/Analysis/Convex/Strict.lean

tactic: refine' strictConvex_iff_openSegment_subset.2 fun x hx y hy hxy => _
state_before: 𝕜 : Type u_2
𝕝 : Type ?u.35536
E : Type ?u.35539
F : Type ?u.35542
β : Type u_1
inst✝¹¹ : OrderedSemiring 𝕜
inst✝¹⁰ : TopologicalSpace E
inst✝⁹ : TopologicalSpace F
inst✝⁸ : AddCommMonoid E
inst✝⁷ : AddCommMonoid F
inst✝⁶ : Module 𝕜 E
inst✝⁵ : Module 𝕜 F
s✝ : Set E
inst✝⁴ : TopologicalSpace β
inst✝³ : LinearOrderedCancelAddCommMonoid β
inst✝² : OrderTopology β
inst✝¹ : Module 𝕜 β
inst✝ : OrderedSMul 𝕜 β
s : Set β
hs : OrdConnected s
⊢ StrictConvex 𝕜 s

tactic: cases' hxy.lt_or_lt with hlt hlt <;> [skip; rw [openSegment_symm]] <;>
  exact
    (openSegment_subset_Ioo hlt).trans
      (isOpen_Ioo.subset_interior_iff.2 <| Ioo_subset_Icc_self.trans <| hs.out ‹_› ‹_›)
state_before: 𝕜 : Type u_2
𝕝 : Type ?u.35536
E : Type ?u.35539
F : Type ?u.35542
β : Type u_1
inst✝¹¹ : OrderedSemiring 𝕜
inst✝¹⁰ : TopologicalSpace E
inst✝⁹ : TopologicalSpace F
inst✝⁸ : AddCommMonoid E
inst✝⁷ : AddCommMonoid F
inst✝⁶ : Module 𝕜 E
inst✝⁵ : Module 𝕜 F
s✝ : Set E
inst✝⁴ : TopologicalSpace β
inst✝³ : LinearOrderedCancelAddCommMonoid β
inst✝² : OrderTopology β
inst✝¹ : Module 𝕜 β
inst✝ : OrderedSMul 𝕜 β
s : Set β
hs : OrdConnected s
x : β
hx : x ∈ s
y : β
hy : y ∈ s
hxy : x ≠ y
⊢ (fun x y => openSegment 𝕜 x y ⊆ interior s) x y
Theorem: Finsupp.sum_comapDomain
File: Mathlib/Data/Finsupp/Basic.lean

tactic: exact Finset.sum_preimage_of_bij f _ hf fun x => g x (l x)
state_before: α : Type u_4
β : Type u_3
γ : Type ?u.300313
ι : Type ?u.300316
M : Type u_1
M' : Type ?u.300322
N : Type u_2
P : Type ?u.300328
G : Type ?u.300331
H : Type ?u.300334
R : Type ?u.300337
S : Type ?u.300340
inst✝¹ : Zero M
inst✝ : AddCommMonoid N
f : α → β
l : β →₀ M
g : β → M → N
hf : Set.BijOn f (f ⁻¹' ↑l.support) ↑l.support
⊢ ∑ x in preimage l.support f (_ : Set.InjOn f (f ⁻¹' ↑l.support)),
      g (f x)
        (↑{ support := preimage l.support f (_ : Set.InjOn f (f ⁻¹' ↑l.support)), toFun := fun a => ↑l (f a),
              mem_support_toFun :=
                (_ :
                  ∀ (a : α),
                    a ∈ preimage l.support f (_ : Set.InjOn f (f ⁻¹' ↑l.support)) ↔ (fun a => ↑l (f a)) a ≠ 0) }
          x) =
    ∑ x in l.support, g x (↑l x)
Theorem: CategoryTheory.GlueData.t'_iji
File: Mathlib/CategoryTheory/GlueData.lean

tactic: rw [← Category.assoc, ← D.t_fac]
state_before: C : Type u₁
inst✝¹ : Category C
C' : Type u₂
inst✝ : Category C'
D : GlueData C
i j : D.J
⊢ t' D i j i = pullback.fst ≫ t D i j ≫ inv pullback.snd

tactic: simp
state_before: C : Type u₁
inst✝¹ : Category C
C' : Type u₂
inst✝ : Category C'
D : GlueData C
i j : D.J
⊢ t' D i j i = (t' D i j i ≫ pullback.snd) ≫ inv pullback.snd
Theorem: Multiset.toFinset_subset
File: Mathlib/Data/Finset/Basic.lean

tactic: simp only [Finset.subset_iff, Multiset.subset_iff, Multiset.mem_toFinset]
state_before: α : Type u_1
β : Type ?u.452644
γ : Type ?u.452647
inst✝ : DecidableEq α
s t : Multiset α
⊢ toFinset s ⊆ toFinset t ↔ s ⊆ t
Theorem: Colex.hom_fin_le_iff
File: Mathlib/Combinatorics/Colex.lean

tactic: refine' Colex.hom_le_iff _ _ _
state_before: α : Type ?u.45017
n : ℕ
A B : Finset (Fin n)
⊢ toColex (image (fun i => ↑i) A) ≤ toColex (image (fun i => ↑i) B) ↔ toColex A ≤ toColex B

tactic: exact (fun x y k => k)
state_before: α : Type ?u.45017
n : ℕ
A B : Finset (Fin n)
⊢ StrictMono fun i => ↑i
Theorem: Subgroup.iSup_induction
File: Mathlib/GroupTheory/Subgroup/Pointwise.lean

tactic: rw [iSup_eq_closure] at hx
state_before: α : Type ?u.10942
G : Type u_2
A : Type ?u.10948
S✝ : Type ?u.10951
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_1
S : ι → Subgroup G
C : G → Prop
x : G
hx : x ∈ ⨆ (i : ι), S i
hp : ∀ (i : ι) (x : G), x ∈ S i → C x
h1 : C 1
hmul : ∀ (x y : G), C x → C y → C (x * y)
⊢ C x

tactic: refine' closure_induction'' hx (fun x hx => _) (fun x hx => _) h1 hmul
state_before: α : Type ?u.10942
G : Type u_2
A : Type ?u.10948
S✝ : Type ?u.10951
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_1
S : ι → Subgroup G
C : G → Prop
x : G
hx : x ∈ closure (⋃ (i : ι), ↑(S i))
hp : ∀ (i : ι) (x : G), x ∈ S i → C x
h1 : C 1
hmul : ∀ (x y : G), C x → C y → C (x * y)
⊢ C x

tactic: obtain ⟨i, hi⟩ := Set.mem_iUnion.mp hx
state_before: case refine'_1
α : Type ?u.10942
G : Type u_2
A : Type ?u.10948
S✝ : Type ?u.10951
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_1
S : ι → Subgroup G
C : G → Prop
x✝ : G
hx✝ : x✝ ∈ closure (⋃ (i : ι), ↑(S i))
hp : ∀ (i : ι) (x : G), x ∈ S i → C x
h1 : C 1
hmul : ∀ (x y : G), C x → C y → C (x * y)
x : G
hx : x ∈ ⋃ (i : ι), ↑(S i)
⊢ C x

tactic: exact hp _ _ hi
state_before: case refine'_1.intro
α : Type ?u.10942
G : Type u_2
A : Type ?u.10948
S✝ : Type ?u.10951
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_1
S : ι → Subgroup G
C : G → Prop
x✝ : G
hx✝ : x✝ ∈ closure (⋃ (i : ι), ↑(S i))
hp : ∀ (i : ι) (x : G), x ∈ S i → C x
h1 : C 1
hmul : ∀ (x y : G), C x → C y → C (x * y)
x : G
hx : x ∈ ⋃ (i : ι), ↑(S i)
i : ι
hi : x ∈ ↑(S i)
⊢ C x

tactic: obtain ⟨i, hi⟩ := Set.mem_iUnion.mp hx
state_before: case refine'_2
α : Type ?u.10942
G : Type u_2
A : Type ?u.10948
S✝ : Type ?u.10951
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_1
S : ι → Subgroup G
C : G → Prop
x✝ : G
hx✝ : x✝ ∈ closure (⋃ (i : ι), ↑(S i))
hp : ∀ (i : ι) (x : G), x ∈ S i → C x
h1 : C 1
hmul : ∀ (x y : G), C x → C y → C (x * y)
x : G
hx : x ∈ ⋃ (i : ι), ↑(S i)
⊢ C x⁻¹

tactic: exact hp _ _ (inv_mem hi)
state_before: case refine'_2.intro
α : Type ?u.10942
G : Type u_2
A : Type ?u.10948
S✝ : Type ?u.10951
inst✝¹ : Group G
inst✝ : AddGroup A
s : Set G
ι : Sort u_1
S : ι → Subgroup G
C : G → Prop
x✝ : G
hx✝ : x✝ ∈ closure (⋃ (i : ι), ↑(S i))
hp : ∀ (i : ι) (x : G), x ∈ S i → C x
h1 : C 1
hmul : ∀ (x y : G), C x → C y → C (x * y)
x : G
hx : x ∈ ⋃ (i : ι), ↑(S i)
i : ι
hi : x ∈ ↑(S i)
⊢ C x⁻¹
Theorem: Multiset.ndunion_le
File: Mathlib/Data/Multiset/FinsetOps.lean

tactic: simp [zero_ndunion]
state_before: α : Type u_1
inst✝ : DecidableEq α
s✝ s t u : Multiset α
⊢ ndunion 0 t ≤ u ↔ 0 ⊆ u ∧ t ≤ u

tactic: simp only [cons_ndunion, mem_ndunion, ndinsert_le, and_comm, cons_subset, and_left_comm, h,
and_assoc]
state_before: α : Type u_1
inst✝ : DecidableEq α
s✝ s t u : Multiset α
x✝¹ : α
x✝ : Multiset α
h : ndunion x✝ t ≤ u ↔ x✝ ⊆ u ∧ t ≤ u
⊢ ndunion (x✝¹ ::ₘ x✝) t ≤ u ↔ x✝¹ ::ₘ x✝ ⊆ u ∧ t ≤ u
Theorem: Equiv.Perm.pow_apply_eq_self_of_apply_eq_self
File: Mathlib/GroupTheory/Perm/Support.lean

tactic: rw [pow_succ', mul_apply, hfx, pow_apply_eq_self_of_apply_eq_self hfx n]
state_before: α : Type u_1
f g h : Perm α
x : α
hfx : ↑f x = x
n : ℕ
⊢ ↑(f ^ (n + 1)) x = x
Theorem: slope_sub_smul
File: Mathlib/LinearAlgebra/AffineSpace/Slope.lean

tactic: simp [slope, inv_smul_smul₀ (sub_ne_zero.2 h.symm)]
state_before: k : Type u_1
E : Type u_2
PE : Type ?u.20418
inst✝³ : Field k
inst✝² : AddCommGroup E
inst✝¹ : Module k E
inst✝ : AddTorsor E PE
f : k → E
a b : k
h : a ≠ b
⊢ slope (fun x => (x - a) • f x) a b = f b
Theorem: Set.LeftInvOn.mapsTo
File: Mathlib/Data/Set/Function.lean

tactic: let ⟨x, hs, hx⟩ := hf hy
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.58172
ι : Sort ?u.58175
π : α → Type ?u.58180
s s₁ s₂ : Set α
t t₁ t₂ : Set β
p : Set γ
f f₁ f₂ f₃ : α → β
g g₁ g₂ : β → γ
f' f₁' f₂' : β → α
g' : γ → β
a : α
b : β
h : LeftInvOn f' f s
hf : SurjOn f s t
y : β
hy : y ∈ t
⊢ f' y ∈ s

tactic: rwa [← hx, h hs]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.58172
ι : Sort ?u.58175
π : α → Type ?u.58180
s s₁ s₂ : Set α
t t₁ t₂ : Set β
p : Set γ
f f₁ f₂ f₃ : α → β
g g₁ g₂ : β → γ
f' f₁' f₂' : β → α
g' : γ → β
a : α
b : β
h : LeftInvOn f' f s
hf : SurjOn f s t
y : β
hy : y ∈ t
x : α
hs : x ∈ s
hx : f x = y
⊢ f' y ∈ s
Theorem: Matrix.uniformity
File: Mathlib/Topology/UniformSpace/Matrix.lean

tactic: erw [Pi.uniformity, Pi.uniformity]
state_before: m : Type u_1
n : Type u_2
𝕜 : Type u_3
inst✝ : UniformSpace 𝕜
⊢ 𝓤 (Matrix m n 𝕜) = ⨅ (i : m) (j : n), Filter.comap (fun a => (Prod.fst a i j, Prod.snd a i j)) (𝓤 𝕜)

tactic: simp_rw [Filter.comap_iInf, Filter.comap_comap]
state_before: m : Type u_1
n : Type u_2
𝕜 : Type u_3
inst✝ : UniformSpace 𝕜
⊢ (⨅ (i : m),
      Filter.comap (fun a => (Prod.fst a i, Prod.snd a i))
        (⨅ (i : n), Filter.comap (fun a => (Prod.fst a i, Prod.snd a i)) (𝓤 𝕜))) =
    ⨅ (i : m) (j : n), Filter.comap (fun a => (Prod.fst a i j, Prod.snd a i j)) (𝓤 𝕜)

tactic: rfl
state_before: m : Type u_1
n : Type u_2
𝕜 : Type u_3
inst✝ : UniformSpace 𝕜
⊢ (⨅ (i : m) (i_1 : n),
      Filter.comap ((fun a => (Prod.fst a i_1, Prod.snd a i_1)) ∘ fun a => (Prod.fst a i, Prod.snd a i)) (𝓤 𝕜)) =
    ⨅ (i : m) (j : n), Filter.comap (fun a => (Prod.fst a i j, Prod.snd a i j)) (𝓤 𝕜)
Theorem: Vector.get_cons_succ
File: Mathlib/Data/Vector/Basic.lean

tactic: rw [← get_tail_succ, tail_cons]
state_before: n : ℕ
α : Type u_1
a : α
v : Vector α n
i : Fin n
⊢ get (a ::ᵥ v) (Fin.succ i) = get v i
Theorem: Polynomial.taylor_coeff
File: Mathlib/Data/Polynomial/Taylor.lean

tactic: congr 1
state_before: R : Type u_1
inst✝ : Semiring R
r : R
f : R[X]
n : ℕ
⊢ ↑(LinearMap.comp (lcoeff R n) (taylor r)) f = ↑(LinearMap.comp (leval r) (hasseDeriv n)) f

tactic: clear! f
state_before: case e_a
R : Type u_1
inst✝ : Semiring R
r : R
f : R[X]
n : ℕ
⊢ LinearMap.comp (lcoeff R n) (taylor r) = LinearMap.comp (leval r) (hasseDeriv n)

tactic: ext i
state_before: case e_a
R : Type u_1
inst✝ : Semiring R
r : R
n : ℕ
⊢ LinearMap.comp (lcoeff R n) (taylor r) = LinearMap.comp (leval r) (hasseDeriv n)

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,
  LinearMap.map_sum]
state_before: case e_a.h.h
R : Type u_1
inst✝ : Semiring R
r : R
n i : ℕ
⊢ ↑(LinearMap.comp (LinearMap.comp (lcoeff R n) (taylor r)) (monomial i)) 1 =
    ↑(LinearMap.comp (LinearMap.comp (leval r) (hasseDeriv n)) (monomial i)) 1

tactic: simp only [lcoeff_apply, ← C_eq_nat_cast, 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 : ℕ
⊢ (Finset.sum (Finset.range (i + 1)) fun x => ↑(lcoeff R n) (X ^ x * ↑C r ^ (i - x) * ↑(Nat.choose i x))) =
    ↑(Nat.choose i n) * r ^ (i - 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) * ↑(Nat.choose i n) else 0) = r ^ (i - n) * ↑(Nat.choose i n)

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

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

tactic: rfl
state_before: case e_a.h.h.inl
R : Type u_1
inst✝ : Semiring R
r : R
n i : ℕ
h : n < i + 1
⊢ r ^ (i - n) * ↑(Nat.choose i n) = r ^ (i - n) * ↑(Nat.choose i n)
Theorem: EuclideanDomain.mod_eq_zero
File: Mathlib/Algebra/EuclideanDomain/Basic.lean

tactic: rw [← div_add_mod a b, h, add_zero]
state_before: R : Type u
inst✝ : EuclideanDomain R
a b : R
h : a % b = 0
⊢ b ∣ a

tactic: exact dvd_mul_right _ _
state_before: R : Type u
inst✝ : EuclideanDomain R
a b : R
h : a % b = 0
⊢ b ∣ b * (a / b)

tactic: rw [e, ← add_left_cancel_iff, div_add_mod, add_zero]
state_before: R : Type u
inst✝ : EuclideanDomain R
a b : R
x✝ : b ∣ a
c : R
e : a = b * c
⊢ a % b = 0

tactic: haveI := Classical.dec
state_before: R : Type u
inst✝ : EuclideanDomain R
a b : R
x✝ : b ∣ a
c : R
e : a = b * c
⊢ b * c = b * (b * c / b)

tactic: by_cases b0 : b = 0
state_before: R : Type u
inst✝ : EuclideanDomain R
a b : R
x✝ : b ∣ a
c : R
e : a = b * c
this : (p : Prop) → Decidable p
⊢ b * c = b * (b * c / b)

tactic: simp only [b0, zero_mul]
state_before: case pos
R : Type u
inst✝ : EuclideanDomain R
a b : R
x✝ : b ∣ a
c : R
e : a = b * c
this : (p : Prop) → Decidable p
b0 : b = 0
⊢ b * c = b * (b * c / b)

tactic: rw [mul_div_cancel_left _ b0]
state_before: case neg
R : Type u
inst✝ : EuclideanDomain R
a b : R
x✝ : b ∣ a
c : R
e : a = b * c
this : (p : Prop) → Decidable p
b0 : ¬b = 0
⊢ b * c = b * (b * c / b)
Theorem: Int.le_total
File: Std/Data/Int/Lemmas.lean

tactic: rwa [show -(b - a) = a - b by simp [Int.add_comm, Int.sub_eq_add_neg]] at H
state_before: a b : Int
H : NonNeg (-(b - a))
⊢ b ≤ a

tactic: simp [Int.add_comm, Int.sub_eq_add_neg]
state_before: a b : Int
H : NonNeg (-(b - a))
⊢ -(b - a) = a - b
Theorem: CategoryTheory.Limits.HasZeroObject.zeroIsoTerminal_inv
File: Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean

tactic: ext
state_before: C : Type u
inst✝⁴ : Category C
D : Type u'
inst✝³ : Category D
inst✝² : HasZeroObject C
inst✝¹ : HasZeroMorphisms C
inst✝ : HasTerminal C
⊢ zeroIsoTerminal.inv = 0
Theorem: Matrix.conjTranspose_nsmul
File: Mathlib/Data/Matrix/Basic.lean

tactic: simp
state_before: l : Type ?u.980503
m : Type u_1
n : Type u_2
o : Type ?u.980512
m' : o → Type ?u.980517
n' : o → Type ?u.980522
R : Type ?u.980525
S : Type ?u.980528
α : Type v
β : Type w
γ : Type ?u.980535
inst✝¹ : AddMonoid α
inst✝ : StarAddMonoid α
c : ℕ
M : Matrix m n α
⊢ ∀ (i : n) (j : m), (c • M)ᴴ i j = (c • Mᴴ) i j
Theorem: Nat.count_succ_eq_succ_count_iff
File: Mathlib/Data/Nat/Count.lean

tactic: by_cases h : p n <;> simp [h, count_succ]
state_before: p : ℕ → Prop
inst✝ : DecidablePred p
n : ℕ
⊢ count p (n + 1) = count p n + 1 ↔ p n
Theorem: toIcoMod_add_toIcoDiv_zsmul
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: rw [toIcoMod, sub_add_cancel]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
⊢ toIcoMod hp a b + toIcoDiv hp a b • p = b