tasksource/leandojo huggingface dataset:
Theorem: AntivaryOn.sum_smul_lt_sum_smul_comp_perm_iff
File: Mathlib/Algebra/Order/Rearrangement.lean

tactic: simp [← hfg.sum_smul_eq_sum_smul_comp_perm_iff hσ, lt_iff_le_and_ne, eq_comm,
  hfg.sum_smul_le_sum_smul_comp_perm hσ]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝³ : LinearOrderedRing α
inst✝² : LinearOrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : OrderedSMul α β
s : Finset ι
σ : Perm ι
f : ι → α
g : ι → β
hfg : AntivaryOn f g ↑s
hσ : {x | ↑σ x ≠ x} ⊆ ↑s
⊢ ∑ i in s, f i • g i < ∑ i in s, f i • g (↑σ i) ↔ ¬AntivaryOn f (g ∘ ↑σ) ↑s
Theorem: Finset.sum_centroidWeights_eq_one_of_cast_card_ne_zero
File: Mathlib/LinearAlgebra/AffineSpace/Combination.lean

tactic: simp [h]
state_before: k : Type u_1
V : Type ?u.465735
P : Type ?u.465738
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_2
s : Finset ι
ι₂ : Type ?u.466257
s₂ : Finset ι₂
h : ↑(card s) ≠ 0
⊢ ∑ i in s, centroidWeights k s i = 1
Theorem: ContinuousMap.dist_lt_iff_of_nonempty
File: Mathlib/Topology/ContinuousFunction/Compact.lean

tactic: simp only [← dist_mkOfCompact, dist_lt_iff_of_nonempty_compact, mkOfCompact_apply]
state_before: α : Type u_1
β : Type u_2
E : Type ?u.76000
inst✝⁴ : TopologicalSpace α
inst✝³ : CompactSpace α
inst✝² : MetricSpace β
inst✝¹ : NormedAddCommGroup E
f g : C(α, β)
C : ℝ
inst✝ : Nonempty α
⊢ dist f g < C ↔ ∀ (x : α), dist (↑f x) (↑g x) < C
Theorem: AddCircle.norm_eq'
File: Mathlib/Analysis/Normed/Group/AddCircle.lean

tactic: conv_rhs =>
  congr
  rw [← abs_eq_self.mpr hp.le]
state_before: p : ℝ
hp : 0 < p
x : ℝ
⊢ ‖↑x‖ = p * abs (p⁻¹ * x - ↑(round (p⁻¹ * x)))

tactic: rw [← abs_mul, mul_sub, mul_inv_cancel_left₀ hp.ne.symm, norm_eq, mul_comm p]
state_before: p : ℝ
hp : 0 < p
x : ℝ
⊢ ‖↑x‖ = abs p * abs (p⁻¹ * x - ↑(round (p⁻¹ * x)))
Theorem: Nat.coprime.dvd_of_dvd_mul_right
File: Std/Data/Nat/Gcd.lean

tactic: let t := dvd_gcd (Nat.dvd_mul_left k m) H2
state_before: k n m : Nat
H1 : coprime k n
H2 : k ∣ m * n
⊢ k ∣ m

tactic: rwa [gcd_mul_left, H1.gcd_eq_one, Nat.mul_one] at t
state_before: k n m : Nat
H1 : coprime k n
H2 : k ∣ m * n
t : k ∣ gcd (m * k) (m * n) := dvd_gcd (Nat.dvd_mul_left k m) H2
⊢ k ∣ m
Theorem: List.tendsto_prod
File: Mathlib/Topology/List.lean

tactic: induction' l with x l ih
state_before: α : Type u_1
β : Type ?u.56124
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : Monoid α
inst✝ : ContinuousMul α
l : List α
⊢ Tendsto prod (𝓝 l) (𝓝 (prod l))

tactic: simp_rw [tendsto_cons_iff, prod_cons]
state_before: case cons
α : Type u_1
β : Type ?u.56124
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : Monoid α
inst✝ : ContinuousMul α
x : α
l : List α
ih : Tendsto prod (𝓝 l) (𝓝 (prod l))
⊢ Tendsto prod (𝓝 (x :: l)) (𝓝 (prod (x :: l)))

tactic: have := continuous_iff_continuousAt.mp continuous_mul (x, l.prod)
state_before: case cons
α : Type u_1
β : Type ?u.56124
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : Monoid α
inst✝ : ContinuousMul α
x : α
l : List α
ih : Tendsto prod (𝓝 l) (𝓝 (prod l))
⊢ Tendsto (fun p => p.fst * prod p.snd) (𝓝 x ×ˢ 𝓝 l) (𝓝 (x * prod l))

tactic: rw [ContinuousAt, nhds_prod_eq] at this
state_before: case cons
α : Type u_1
β : Type ?u.56124
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : Monoid α
inst✝ : ContinuousMul α
x : α
l : List α
ih : Tendsto prod (𝓝 l) (𝓝 (prod l))
this : ContinuousAt (fun p => p.fst * p.snd) (x, prod l)
⊢ Tendsto (fun p => p.fst * prod p.snd) (𝓝 x ×ˢ 𝓝 l) (𝓝 (x * prod l))

tactic: exact this.comp (tendsto_id.prod_map ih)
state_before: case cons
α : Type u_1
β : Type ?u.56124
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : Monoid α
inst✝ : ContinuousMul α
x : α
l : List α
ih : Tendsto prod (𝓝 l) (𝓝 (prod l))
this : Tendsto (fun p => p.fst * p.snd) (𝓝 x ×ˢ 𝓝 (prod l)) (𝓝 ((x, prod l).fst * (x, prod l).snd))
⊢ Tendsto (fun p => p.fst * prod p.snd) (𝓝 x ×ˢ 𝓝 l) (𝓝 (x * prod l))

tactic: simp (config := { contextual := true }) [nhds_nil, mem_of_mem_nhds, tendsto_pure_left]
state_before: case nil
α : Type u_1
β : Type ?u.56124
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : Monoid α
inst✝ : ContinuousMul α
⊢ Tendsto prod (𝓝 []) (𝓝 (prod []))
Theorem: CategoryTheory.Limits.diagonalObjPullbackFstIso_hom_fst_fst
File: Mathlib/CategoryTheory/Limits/Shapes/Diagonal.lean

tactic: delta diagonalObjPullbackFstIso
state_before: C : Type u_2
inst✝⁵ : Category C
X✝ Y✝ Z✝ : C
inst✝⁴ : HasPullbacks C
S T : C
f✝ : X✝ ⟶ T
g✝ : Y✝ ⟶ T
i : T ⟶ S
inst✝³ : HasPullback i i
inst✝² : HasPullback f✝ g✝
inst✝¹ : HasPullback (f✝ ≫ i) (g✝ ≫ i)
inst✝ :
  HasPullback (diagonal i)
    (map (f✝ ≫ i) (g✝ ≫ i) i i f✝ g✝ (𝟙 S) (_ : (f✝ ≫ i) ≫ 𝟙 S = f✝ ≫ i) (_ : (g✝ ≫ i) ≫ 𝟙 S = g✝ ≫ i))
X Y Z : C
f : X ⟶ Z
g : Y ⟶ Z
⊢ (diagonalObjPullbackFstIso f g).hom ≫ fst ≫ fst = fst ≫ snd

tactic: simp
state_before: C : Type u_2
inst✝⁵ : Category C
X✝ Y✝ Z✝ : C
inst✝⁴ : HasPullbacks C
S T : C
f✝ : X✝ ⟶ T
g✝ : Y✝ ⟶ T
i : T ⟶ S
inst✝³ : HasPullback i i
inst✝² : HasPullback f✝ g✝
inst✝¹ : HasPullback (f✝ ≫ i) (g✝ ≫ i)
inst✝ :
  HasPullback (diagonal i)
    (map (f✝ ≫ i) (g✝ ≫ i) i i f✝ g✝ (𝟙 S) (_ : (f✝ ≫ i) ≫ 𝟙 S = f✝ ≫ i) (_ : (g✝ ≫ i) ≫ 𝟙 S = g✝ ≫ i))
X Y Z : C
f : X ⟶ Z
g : Y ⟶ Z
⊢ (pullbackRightPullbackFstIso f g fst ≪≫
          congrHom (_ : fst ≫ f = snd ≫ g) (_ : g = g) ≪≫
            pullbackAssoc f g g g ≪≫ pullbackSymmetry f (fst ≫ g) ≪≫ congrHom (_ : fst ≫ g = snd ≫ g) (_ : f = f)).hom ≫
      fst ≫ fst =
    fst ≫ snd
Theorem: norm_iteratedFDeriv_clm_apply_const
File: Mathlib/Analysis/Calculus/ContDiff.lean

tactic: simp only [← iteratedFDerivWithin_univ]
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.4423078
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
f : E → F →L[𝕜] G
c : F
x : E
N : ℕ∞
n : ℕ
hf : ContDiff 𝕜 N f
hn : ↑n ≤ N
⊢ ‖iteratedFDeriv 𝕜 n (fun y => ↑(f y) c) x‖ ≤ ‖c‖ * ‖iteratedFDeriv 𝕜 n f x‖

tactic: exact norm_iteratedFDerivWithin_clm_apply_const hf.contDiffOn uniqueDiffOn_univ
  (Set.mem_univ x) hn
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.4423078
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
f : E → F →L[𝕜] G
c : F
x : E
N : ℕ∞
n : ℕ
hf : ContDiff 𝕜 N f
hn : ↑n ≤ N
⊢ ‖iteratedFDerivWithin 𝕜 n (fun y => ↑(f y) c) univ x‖ ≤ ‖c‖ * ‖iteratedFDerivWithin 𝕜 n f univ x‖
Theorem: FractionalIdeal.map_mul
File: Mathlib/RingTheory/FractionalIdeal.lean

tactic: simp only [mul_def]
state_before: R : Type u_2
inst✝⁶ : CommRing R
S : Submonoid R
P : Type u_3
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
P' : Type u_1
inst✝³ : CommRing P'
inst✝² : Algebra R P'
loc' : IsLocalization S P'
P'' : Type ?u.565642
inst✝¹ : CommRing P''
inst✝ : Algebra R P''
loc'' : IsLocalization S P''
I J : FractionalIdeal S P
g : P →ₐ[R] P'
⊢ map g (I * J) = map g I * map g J

tactic: exact coeToSubmodule_injective (Submodule.map_mul _ _ _)
state_before: R : Type u_2
inst✝⁶ : CommRing R
S : Submonoid R
P : Type u_3
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
P' : Type u_1
inst✝³ : CommRing P'
inst✝² : Algebra R P'
loc' : IsLocalization S P'
P'' : Type ?u.565642
inst✝¹ : CommRing P''
inst✝ : Algebra R P''
loc'' : IsLocalization S P''
I J : FractionalIdeal S P
g : P →ₐ[R] P'
⊢ map g { val := ↑I * ↑J, property := (_ : IsFractional S (↑I * ↑J)) } =
    { val := ↑(map g I) * ↑(map g J), property := (_ : IsFractional S (↑(map g I) * ↑(map g J))) }
Theorem: surjOn_Ico_of_monotone_surjective
File: Mathlib/Data/Set/Intervals/SurjOn.lean

tactic: obtain hab | hab := lt_or_le a b
state_before: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a b : α
⊢ SurjOn f (Ico a b) (Ico (f a) (f b))

tactic: intro p hp
state_before: case inl
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a b : α
hab : a < b
⊢ SurjOn f (Ico a b) (Ico (f a) (f b))

tactic: rcases eq_left_or_mem_Ioo_of_mem_Ico hp with (rfl | hp')
state_before: case inl
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a b : α
hab : a < b
p : β
hp : p ∈ Ico (f a) (f b)
⊢ p ∈ f '' Ico a b

tactic: exact mem_image_of_mem f (left_mem_Ico.mpr hab)
state_before: case inl.inl
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a b : α
hab : a < b
hp : f a ∈ Ico (f a) (f b)
⊢ f a ∈ f '' Ico a b

tactic: have := surjOn_Ioo_of_monotone_surjective h_mono h_surj a b hp'
state_before: case inl.inr
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a b : α
hab : a < b
p : β
hp : p ∈ Ico (f a) (f b)
hp' : p ∈ Ioo (f a) (f b)
⊢ p ∈ f '' Ico a b

tactic: exact image_subset f Ioo_subset_Ico_self this
state_before: case inl.inr
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a b : α
hab : a < b
p : β
hp : p ∈ Ico (f a) (f b)
hp' : p ∈ Ioo (f a) (f b)
this : p ∈ f '' Ioo a b
⊢ p ∈ f '' Ico a b

tactic: rw [Ico_eq_empty (h_mono hab).not_lt]
state_before: case inr
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a b : α
hab : b ≤ a
⊢ SurjOn f (Ico a b) (Ico (f a) (f b))

tactic: exact surjOn_empty f _
state_before: case inr
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a b : α
hab : b ≤ a
⊢ SurjOn f (Ico a b) ∅
Theorem: SimpleGraph.Walk.ofBoxProdLeft_boxProdLeft
File: Mathlib/Combinatorics/SimpleGraph/Prod.lean

tactic: rw [Walk.boxProdLeft, map_cons, ofBoxProdLeft, Or.by_cases, dif_pos, ← Walk.boxProdLeft]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.57688
G : SimpleGraph α
H : SimpleGraph β
b : β
inst✝¹ : DecidableEq β
inst✝ : DecidableRel G.Adj
a₁ a₂ x z y : α
h : Adj G x y
w : Walk G y z
⊢ ofBoxProdLeft (Walk.boxProdLeft H b (cons' x y z h w)) = cons' x y z h w

tactic: simp [ofBoxProdLeft_boxProdLeft]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.57688
G : SimpleGraph α
H : SimpleGraph β
b : β
inst✝¹ : DecidableEq β
inst✝ : DecidableRel G.Adj
a₁ a₂ x z y : α
h : Adj G x y
w : Walk G y z
⊢ cons (_ : Adj G (x, b).fst (↑(Embedding.toHom (boxProdLeft G H b)) y).fst) (ofBoxProdLeft (Walk.boxProdLeft H b w)) =
    cons' x y z h w

case hc
α : Type u_2
β : Type u_1
γ : Type ?u.57688
G : SimpleGraph α
H : SimpleGraph β
b : β
inst✝¹ : DecidableEq β
inst✝ : DecidableRel G.Adj
a₁ a₂ x z y : α
h : Adj G x y
w : Walk G y z
⊢ Adj G (x, b).fst (↑(Embedding.toHom (boxProdLeft G H b)) y).fst ∧
    (x, b).snd = (↑(Embedding.toHom (boxProdLeft G H b)) y).snd

case hc
α : Type u_2
β : Type u_1
γ : Type ?u.57688
G : SimpleGraph α
H : SimpleGraph β
b : β
inst✝¹ : DecidableEq β
inst✝ : DecidableRel G.Adj
a₁ a₂ x z y : α
h : Adj G x y
w : Walk G y z
⊢ Adj G (x, b).fst (↑(Embedding.toHom (boxProdLeft G H b)) y).fst ∧
    (x, b).snd = (↑(Embedding.toHom (boxProdLeft G H b)) y).snd

tactic: exact ⟨h, rfl⟩
state_before: case hc
α : Type u_2
β : Type u_1
γ : Type ?u.57688
G : SimpleGraph α
H : SimpleGraph β
b : β
inst✝¹ : DecidableEq β
inst✝ : DecidableRel G.Adj
a₁ a₂ x z y : α
h : Adj G x y
w : Walk G y z
⊢ Adj G (x, b).fst (↑(Embedding.toHom (boxProdLeft G H b)) y).fst ∧
    (x, b).snd = (↑(Embedding.toHom (boxProdLeft G H b)) y).snd

case hc
α : Type u_2
β : Type u_1
γ : Type ?u.57688
G : SimpleGraph α
H : SimpleGraph β
b : β
inst✝¹ : DecidableEq β
inst✝ : DecidableRel G.Adj
a₁ a₂ x z y : α
h : Adj G x y
w : Walk G y z
⊢ Adj G (x, b).fst (↑(Embedding.toHom (boxProdLeft G H b)) y).fst ∧
    (x, b).snd = (↑(Embedding.toHom (boxProdLeft G H b)) y).snd
Theorem: Int.odd_add'
File: Mathlib/Data/Int/Parity.lean

tactic: rw [add_comm, odd_add]
state_before: m n : ℤ
⊢ Odd (m + n) ↔ (Odd n ↔ Even m)
Theorem: RingQuot.smul_quot
File: Mathlib/Algebra/RingQuot.lean

tactic: show smul r _ _ = _
state_before: R : Type u₁
inst✝⁴ : Semiring R
S : Type u₂
inst✝³ : CommSemiring S
A : Type u₃
inst✝² : Semiring A
inst✝¹ : Algebra S A
r : R → R → Prop
inst✝ : Algebra S R
n : S
a : R
⊢ n • { toQuot := Quot.mk (Rel r) a } = { toQuot := Quot.mk (Rel r) (n • a) }

tactic: rw [smul_def]
state_before: R : Type u₁
inst✝⁴ : Semiring R
S : Type u₂
inst✝³ : CommSemiring S
A : Type u₃
inst✝² : Semiring A
inst✝¹ : Algebra S A
r : R → R → Prop
inst✝ : Algebra S R
n : S
a : R
⊢ RingQuot.smul r n { toQuot := Quot.mk (Rel r) a } = { toQuot := Quot.mk (Rel r) (n • a) }

tactic: rfl
state_before: R : Type u₁
inst✝⁴ : Semiring R
S : Type u₂
inst✝³ : CommSemiring S
A : Type u₃
inst✝² : Semiring A
inst✝¹ : Algebra S A
r : R → R → Prop
inst✝ : Algebra S R
n : S
a : R
⊢ (match { toQuot := Quot.mk (Rel r) a } with
    | { toQuot := a } =>
      { toQuot := Quot.map (fun a => n • a) (_ : ∀ ⦃a b : R⦄, Rel r a b → Rel r (n • a) (n • b)) a }) =
    { toQuot := Quot.mk (Rel r) (n • a) }
Theorem: FirstOrder.Language.BoundedFormula.realize_top
File: Mathlib/ModelTheory/Semantics.lean

tactic: simp [Top.top]
state_before: L : Language
L' : Language
M : Type w
N : Type ?u.31282
P : Type ?u.31285
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
n l : ℕ
φ ψ : BoundedFormula L α l
θ : BoundedFormula L α (Nat.succ l)
v : α → M
xs : Fin l → M
⊢ Realize ⊤ v xs ↔ True
Theorem: EuclideanGeometry.Sphere.mk_center_radius
File: Mathlib/Geometry/Euclidean/Sphere/Basic.lean

tactic: ext <;> rfl
state_before: V : Type ?u.1295
P : Type u_1
inst✝ : MetricSpace P
s : Sphere P
⊢ { center := s.center, radius := s.radius } = s
Theorem: Bitvec.ofFin_le_ofFin_of_le
File: Mathlib/Data/Bitvec/Lemmas.lean

tactic: simp only [toNat_ofNat, Nat.mod_eq_of_lt, Fin.is_lt]
state_before: n : ℕ
i j : Fin (2 ^ n)
h : i ≤ j
⊢ Bitvec.toNat (Bitvec.ofNat n ↑i) ≤ Bitvec.toNat (Bitvec.ofNat n ↑j)

tactic: exact h
state_before: n : ℕ
i j : Fin (2 ^ n)
h : i ≤ j
⊢ ↑i ≤ ↑j
Theorem: SimpleGraph.singletonSubgraph_le_iff
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

tactic: refine' ⟨fun h ↦ h.1 (Set.mem_singleton v), _⟩
state_before: ι : Sort ?u.207802
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v : V
H : Subgraph G
⊢ SimpleGraph.singletonSubgraph G v ≤ H ↔ v ∈ H.verts

tactic: intro h
state_before: ι : Sort ?u.207802
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v : V
H : Subgraph G
⊢ v ∈ H.verts → SimpleGraph.singletonSubgraph G v ≤ H

tactic: constructor
state_before: ι : Sort ?u.207802
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v : V
H : Subgraph G
h : v ∈ H.verts
⊢ SimpleGraph.singletonSubgraph G v ≤ H

tactic: rwa [singletonSubgraph_verts, Set.singleton_subset_iff]
state_before: case left
ι : Sort ?u.207802
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v : V
H : Subgraph G
h : v ∈ H.verts
⊢ (SimpleGraph.singletonSubgraph G v).verts ⊆ H.verts

tactic: exact fun _ _ ↦ False.elim
state_before: case right
ι : Sort ?u.207802
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v : V
H : Subgraph G
h : v ∈ H.verts
⊢ ∀ ⦃v_1 w : V⦄, Subgraph.Adj (SimpleGraph.singletonSubgraph G v) v_1 w → Subgraph.Adj H v_1 w
Theorem: Nat.succ_add_sub_one
File: Mathlib/Data/Nat/Basic.lean

tactic: rw [succ_add, succ_sub_one]
state_before: m✝ n✝ k n m : ℕ
⊢ succ n + m - 1 = n + m
Theorem: Set.piecewise_preimage
File: Mathlib/Data/Set/Function.lean

tactic: by_cases x ∈ s <;> simp [*, Set.ite]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.89108
ι : Sort ?u.89111
π : α → Type ?u.89116
δ : α → Sort ?u.89121
s : Set α
f✝ g✝ : (i : α) → δ i
inst✝ : (j : α) → Decidable (j ∈ s)
f g : α → β
t : Set β
x : α
⊢ x ∈ piecewise s f g ⁻¹' t ↔ x ∈ Set.ite s (f ⁻¹' t) (g ⁻¹' t)
Theorem: CategoryTheory.Functor.postcomp_map_hEq
File: Mathlib/CategoryTheory/EqToHom.lean

tactic: dsimp
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
E : Type u₃
inst✝ : Category E
F G : C ⥤ D
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
H : D ⥤ E
hx : F.obj X = G.obj X
hy : F.obj Y = G.obj Y
hmap : HEq (F.map f) (G.map f)
⊢ HEq ((F ⋙ H).map f) ((G ⋙ H).map f)

tactic: congr
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
E : Type u₃
inst✝ : Category E
F G : C ⥤ D
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
H : D ⥤ E
hx : F.obj X = G.obj X
hy : F.obj Y = G.obj Y
hmap : HEq (F.map f) (G.map f)
⊢ HEq (H.map (F.map f)) (H.map (G.map f))
Theorem: bddBelow_upperClosure
File: Mathlib/Order/UpperLower/Basic.lean

tactic: simp_rw [BddBelow, lowerBounds_upperClosure]
state_before: α : Type u_1
β : Type ?u.166274
γ : Type ?u.166277
ι : Sort ?u.166280
κ : ι → Sort ?u.166285
inst✝¹ : Preorder α
inst✝ : Preorder β
s t : Set α
x : α
⊢ BddBelow ↑(upperClosure s) ↔ BddBelow s
Theorem: dist_le_Ico_sum_dist
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: induction n, h using Nat.le_induction with
| base => rw [Finset.Ico_self, Finset.sum_empty, dist_self]
| succ n hle ihn =>
  calc
    dist (f m) (f (n + 1)) ≤ dist (f m) (f n) + dist (f n) (f (n + 1)) := dist_triangle _ _ _
    _ ≤ (∑ i in Finset.Ico m n, _) + _ := add_le_add ihn le_rfl
    _ = ∑ i in Finset.Ico m (n + 1), _ := by
    { rw [Nat.Ico_succ_right_eq_insert_Ico hle, Finset.sum_insert, add_comm]; simp }
state_before: α : Type u
β : Type v
X : Type ?u.11251
ι : Type ?u.11254
inst✝ : PseudoMetricSpace α
f : ℕ → α
m n : ℕ
h : m ≤ n
⊢ dist (f m) (f n) ≤ ∑ i in Finset.Ico m n, dist (f i) (f (i + 1))

tactic: rw [Finset.Ico_self, Finset.sum_empty, dist_self]
state_before: case base
α : Type u
β : Type v
X : Type ?u.11251
ι : Type ?u.11254
inst✝ : PseudoMetricSpace α
f : ℕ → α
m n : ℕ
⊢ dist (f m) (f m) ≤ ∑ i in Finset.Ico m m, dist (f i) (f (i + 1))

tactic: calc
  dist (f m) (f (n + 1)) ≤ dist (f m) (f n) + dist (f n) (f (n + 1)) := dist_triangle _ _ _
  _ ≤ (∑ i in Finset.Ico m n, _) + _ := add_le_add ihn le_rfl
  _ = ∑ i in Finset.Ico m (n + 1), _ := by
  { rw [Nat.Ico_succ_right_eq_insert_Ico hle, Finset.sum_insert, add_comm]; simp }
state_before: case succ
α : Type u
β : Type v
X : Type ?u.11251
ι : Type ?u.11254
inst✝ : PseudoMetricSpace α
f : ℕ → α
m n✝ n : ℕ
hle : m ≤ n
ihn : dist (f m) (f n) ≤ ∑ i in Finset.Ico m n, dist (f i) (f (i + 1))
⊢ dist (f m) (f (n + 1)) ≤ ∑ i in Finset.Ico m (n + 1), dist (f i) (f (i + 1))
Theorem: Multiset.prod_X_sub_X_eq_sum_esymm
File: Mathlib/RingTheory/Polynomial/Vieta.lean

tactic: conv_lhs =>
  congr
  congr
  ext x
  rw [sub_eq_add_neg]
  rw [← map_neg C x]
state_before: R : Type u_1
inst✝ : CommRing R
s : Multiset R
⊢ prod (map (fun t => X - ↑C t) s) = ∑ j in Finset.range (↑card s + 1), (-1) ^ j * (↑C (esymm s j) * X ^ (↑card s - j))

tactic: convert prod_X_add_C_eq_sum_esymm (map (fun t => -t) s) using 1
state_before: R : Type u_1
inst✝ : CommRing R
s : Multiset R
⊢ prod (map (fun x => X + ↑C (-x)) s) =
    ∑ j in Finset.range (↑card s + 1), (-1) ^ j * (↑C (esymm s j) * X ^ (↑card s - j))

tactic: rw [map_map]
state_before: case h.e'_2
R : Type u_1
inst✝ : CommRing R
s : Multiset R
⊢ prod (map (fun x => X + ↑C (-x)) s) = prod (map (fun r => X + ↑C r) (map (fun t => -t) s))

tactic: rfl
state_before: case h.e'_2
R : Type u_1
inst✝ : CommRing R
s : Multiset R
⊢ prod (map (fun x => X + ↑C (-x)) s) = prod (map ((fun r => X + ↑C r) ∘ fun t => -t) s)

tactic: simp only [esymm_neg, card_map, mul_assoc, map_mul, map_pow, map_neg, map_one]
state_before: case h.e'_3
R : Type u_1
inst✝ : CommRing R
s : Multiset R
⊢ ∑ j in Finset.range (↑card s + 1), (-1) ^ j * (↑C (esymm s j) * X ^ (↑card s - j)) =
    ∑ j in Finset.range (↑card (map (fun t => -t) s) + 1),
      ↑C (esymm (map (fun t => -t) s) j) * X ^ (↑card (map (fun t => -t) s) - j)
Theorem: SimpleGraph.Walk.append_assoc
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: induction p with
| nil => rfl
| cons h p' ih =>
  dsimp only [append]
  rw [ih]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w x : V
p : Walk G u v
q : Walk G v w
r : Walk G w x
⊢ append p (append q r) = append (append p q) r

tactic: rfl
state_before: case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w x : V
r : Walk G w x
u✝ : V
q : Walk G u✝ w
⊢ append nil (append q r) = append (append nil q) r

tactic: dsimp only [append]
state_before: case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w x : V
r : Walk G w x
u✝ v✝ w✝ : V
h : Adj G u✝ v✝
p' : Walk G v✝ w✝
ih : ∀ (q : Walk G w✝ w), append p' (append q r) = append (append p' q) r
q : Walk G w✝ w
⊢ append (cons h p') (append q r) = append (append (cons h p') q) r

tactic: rw [ih]
state_before: case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w x : V
r : Walk G w x
u✝ v✝ w✝ : V
h : Adj G u✝ v✝
p' : Walk G v✝ w✝
ih : ∀ (q : Walk G w✝ w), append p' (append q r) = append (append p' q) r
q : Walk G w✝ w
⊢ cons h (append p' (append q r)) = cons h (append (append p' q) r)
Theorem: Submodule.smul_mem_span_smul_of_mem
File: Mathlib/Algebra/Algebra/Tower.lean

tactic: rw [zero_smul]
state_before: R : Type u
S : Type v
A : Type w
B : Type u₁
M : Type v₁
inst✝⁶ : Semiring R
inst✝⁵ : Semiring S
inst✝⁴ : AddCommMonoid A
inst✝³ : Module R S
inst✝² : Module S A
inst✝¹ : Module R A
inst✝ : IsScalarTower R S A
s : Set S
t : Set A
k : S
hks : k ∈ span R s
x : A
hx : x ∈ t
⊢ 0 • x ∈ span R (s • t)

tactic: exact zero_mem _
state_before: R : Type u
S : Type v
A : Type w
B : Type u₁
M : Type v₁
inst✝⁶ : Semiring R
inst✝⁵ : Semiring S
inst✝⁴ : AddCommMonoid A
inst✝³ : Module R S
inst✝² : Module S A
inst✝¹ : Module R A
inst✝ : IsScalarTower R S A
s : Set S
t : Set A
k : S
hks : k ∈ span R s
x : A
hx : x ∈ t
⊢ 0 ∈ span R (s • t)

tactic: rw [add_smul]
state_before: R : Type u
S : Type v
A : Type w
B : Type u₁
M : Type v₁
inst✝⁶ : Semiring R
inst✝⁵ : Semiring S
inst✝⁴ : AddCommMonoid A
inst✝³ : Module R S
inst✝² : Module S A
inst✝¹ : Module R A
inst✝ : IsScalarTower R S A
s : Set S
t : Set A
k : S
hks : k ∈ span R s
x : A
hx : x ∈ t
c₁ c₂ : S
ih₁ : c₁ • x ∈ span R (s • t)
ih₂ : c₂ • x ∈ span R (s • t)
⊢ (c₁ + c₂) • x ∈ span R (s • t)

tactic: exact add_mem ih₁ ih₂
state_before: R : Type u
S : Type v
A : Type w
B : Type u₁
M : Type v₁
inst✝⁶ : Semiring R
inst✝⁵ : Semiring S
inst✝⁴ : AddCommMonoid A
inst✝³ : Module R S
inst✝² : Module S A
inst✝¹ : Module R A
inst✝ : IsScalarTower R S A
s : Set S
t : Set A
k : S
hks : k ∈ span R s
x : A
hx : x ∈ t
c₁ c₂ : S
ih₁ : c₁ • x ∈ span R (s • t)
ih₂ : c₂ • x ∈ span R (s • t)
⊢ c₁ • x + c₂ • x ∈ span R (s • t)

tactic: rw [IsScalarTower.smul_assoc]
state_before: R : Type u
S : Type v
A : Type w
B : Type u₁
M : Type v₁
inst✝⁶ : Semiring R
inst✝⁵ : Semiring S
inst✝⁴ : AddCommMonoid A
inst✝³ : Module R S
inst✝² : Module S A
inst✝¹ : Module R A
inst✝ : IsScalarTower R S A
s : Set S
t : Set A
k : S
hks : k ∈ span R s
x : A
hx : x ∈ t
b : R
c : S
hc : c • x ∈ span R (s • t)
⊢ (b • c) • x ∈ span R (s • t)

tactic: exact smul_mem _ _ hc
state_before: R : Type u
S : Type v
A : Type w
B : Type u₁
M : Type v₁
inst✝⁶ : Semiring R
inst✝⁵ : Semiring S
inst✝⁴ : AddCommMonoid A
inst✝³ : Module R S
inst✝² : Module S A
inst✝¹ : Module R A
inst✝ : IsScalarTower R S A
s : Set S
t : Set A
k : S
hks : k ∈ span R s
x : A
hx : x ∈ t
b : R
c : S
hc : c • x ∈ span R (s • t)
⊢ b • c • x ∈ span R (s • t)