tasksource/leandojo huggingface dataset:
Theorem: MeasureTheory.Measure.measurable_map
File: Mathlib/MeasureTheory/Measure/GiryMonad.lean

tactic: refine' measurable_of_measurable_coe _ fun s hs => _
state_before: α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : α → β
hf : Measurable f
⊢ Measurable fun μ => map f μ

tactic: simp_rw [map_apply hf hs]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : α → β
hf : Measurable f
s : Set β
hs : MeasurableSet s
⊢ Measurable fun b => ↑↑(map f b) s

tactic: exact measurable_coe (hf hs)
state_before: α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : α → β
hf : Measurable f
s : Set β
hs : MeasurableSet s
⊢ Measurable fun b => ↑↑b (f ⁻¹' s)
Theorem: MeasureTheory.SimpleFunc.setToSimpleFunc_add_left
File: Mathlib/MeasureTheory/Integral/SetToL1.lean

tactic: simp_rw [setToSimpleFunc, Pi.add_apply]
state_before: α : Type u_1
E : Type ?u.222342
F : Type u_2
F' : Type u_3
G : Type ?u.222351
𝕜 : Type ?u.222354
p : ℝ≥0∞
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : NormedAddCommGroup F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : NormedAddCommGroup G
m✝ : MeasurableSpace α
μ : Measure α
m : MeasurableSpace α
T T' : Set α → F →L[ℝ] F'
f : α →ₛ F
⊢ setToSimpleFunc (T + T') f = setToSimpleFunc T f + setToSimpleFunc T' f

tactic: push_cast
state_before: α : Type u_1
E : Type ?u.222342
F : Type u_2
F' : Type u_3
G : Type ?u.222351
𝕜 : Type ?u.222354
p : ℝ≥0∞
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : NormedAddCommGroup F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : NormedAddCommGroup G
m✝ : MeasurableSpace α
μ : Measure α
m : MeasurableSpace α
T T' : Set α → F →L[ℝ] F'
f : α →ₛ F
⊢ ∑ x in SimpleFunc.range f, ↑(T (↑f ⁻¹' {x}) + T' (↑f ⁻¹' {x})) x =
    ∑ x in SimpleFunc.range f, ↑(T (↑f ⁻¹' {x})) x + ∑ x in SimpleFunc.range f, ↑(T' (↑f ⁻¹' {x})) x

tactic: simp_rw [Pi.add_apply, sum_add_distrib]
state_before: α : Type u_1
E : Type ?u.222342
F : Type u_2
F' : Type u_3
G : Type ?u.222351
𝕜 : Type ?u.222354
p : ℝ≥0∞
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℝ E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : NormedAddCommGroup F'
inst✝¹ : NormedSpace ℝ F'
inst✝ : NormedAddCommGroup G
m✝ : MeasurableSpace α
μ : Measure α
m : MeasurableSpace α
T T' : Set α → F →L[ℝ] F'
f : α →ₛ F
⊢ ∑ x in SimpleFunc.range f, (↑(T (↑f ⁻¹' {x})) + ↑(T' (↑f ⁻¹' {x}))) x =
    ∑ x in SimpleFunc.range f, ↑(T (↑f ⁻¹' {x})) x + ∑ x in SimpleFunc.range f, ↑(T' (↑f ⁻¹' {x})) x
Theorem: LieModule.maxTrivEquiv_of_refl_eq_refl
File: Mathlib/Algebra/Lie/Abelian.lean

tactic: ext
state_before: R : Type u
L : Type v
M : Type w
N : Type w₁
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
inst✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : LieRingModule L N
inst✝ : LieModule R L N
⊢ maxTrivEquiv LieModuleEquiv.refl = LieModuleEquiv.refl

tactic: simp only [coe_maxTrivEquiv_apply, LieModuleEquiv.refl_apply]
state_before: case h.a
R : Type u
L : Type v
M : Type w
N : Type w₁
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
inst✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : LieRingModule L N
inst✝ : LieModule R L N
m✝ : { x // x ∈ ↑(maxTrivSubmodule R L M) }
⊢ ↑(↑(maxTrivEquiv LieModuleEquiv.refl) m✝) = ↑(↑LieModuleEquiv.refl m✝)
Theorem: FreeAbelianGroup.mem_support_iff
File: Mathlib/GroupTheory/FreeAbelianGroupFinsupp.lean

tactic: rw [support, Finsupp.mem_support_iff]
state_before: X : Type u_1
x : X
a : FreeAbelianGroup X
⊢ x ∈ support a ↔ ↑(coeff x) a ≠ 0

tactic: exact Iff.rfl
state_before: X : Type u_1
x : X
a : FreeAbelianGroup X
⊢ ↑(↑toFinsupp a) x ≠ 0 ↔ ↑(coeff x) a ≠ 0
Theorem: contDiffAt_euclidean
File: Mathlib/Analysis/InnerProductSpace/Calculus.lean

tactic: rw [← (EuclideanSpace.equiv ι 𝕜).comp_contDiffAt_iff, contDiffAt_pi]
state_before: 𝕜 : Type u_1
ι : Type u_3
H : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : NormedAddCommGroup H
inst✝¹ : NormedSpace 𝕜 H
inst✝ : Fintype ι
f : H → EuclideanSpace 𝕜 ι
f' : H →L[𝕜] EuclideanSpace 𝕜 ι
t : Set H
y : H
n : ℕ∞
⊢ ContDiffAt 𝕜 n f y ↔ ∀ (i : ι), ContDiffAt 𝕜 n (fun x => f x i) y

tactic: rfl
state_before: 𝕜 : Type u_1
ι : Type u_3
H : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : NormedAddCommGroup H
inst✝¹ : NormedSpace 𝕜 H
inst✝ : Fintype ι
f : H → EuclideanSpace 𝕜 ι
f' : H →L[𝕜] EuclideanSpace 𝕜 ι
t : Set H
y : H
n : ℕ∞
⊢ (∀ (i : ι), ContDiffAt 𝕜 n (fun x => (↑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) y) ↔
    ∀ (i : ι), ContDiffAt 𝕜 n (fun x => f x i) y
Theorem: MonoidAlgebra.finiteType_iff_group_fg
File: Mathlib/RingTheory/FiniteType.lean

tactic: simpa [Group.fg_iff_monoid_fg] using finiteType_iff_fg
state_before: R : Type u_2
M : Type ?u.721203
inst✝³ : CommMonoid M
G : Type u_1
inst✝² : CommGroup G
inst✝¹ : CommRing R
inst✝ : Nontrivial R
⊢ FiniteType R (MonoidAlgebra R G) ↔ Group.FG G
Theorem: Real.logb_abs
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

tactic: rw [logb, logb, log_abs]
state_before: b x✝ y x : ℝ
⊢ logb b (abs x) = logb b x
Theorem: MeasureTheory.isProbabilityMeasure_map
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: simp [map_apply_of_aemeasurable, hf]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.655475
δ : Type ?u.655478
ι : Type ?u.655481
R : Type ?u.655484
R' : Type ?u.655487
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
inst✝ : IsProbabilityMeasure μ
f : α → β
hf : AEMeasurable f
⊢ ↑↑(Measure.map f μ) univ = 1
Theorem: geom_sum₂_with_one
File: Mathlib/Algebra/GeomSum.lean

tactic: rw [one_pow, mul_one]
state_before: α : Type u
inst✝ : Semiring α
x : α
n i : ℕ
x✝ : i ∈ range n
⊢ x ^ i * 1 ^ (n - 1 - i) = x ^ i
Theorem: Basis.reindexFinsetRange_repr
File: Mathlib/LinearAlgebra/Basis.lean

tactic: simp [reindexFinsetRange]
state_before: ι : Type u_2
ι' : Type ?u.435910
R : Type u_3
R₂ : Type ?u.435916
K : Type ?u.435919
M : Type u_1
M' : Type ?u.435925
M'' : Type ?u.435928
V : Type u
V' : Type ?u.435933
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid M'
inst✝² : Module R M'
b b₁ : Basis ι R M
i✝ : ι
c : R
x✝ : M
b' : Basis ι' R M'
e : ι ≃ ι'
inst✝¹ : Fintype ι
inst✝ : DecidableEq M
x : M
i : ι
h : optParam (↑b i ∈ Finset.image (↑b) Finset.univ) (_ : ↑b i ∈ Finset.image (↑b) Finset.univ)
⊢ ↑(↑(reindexFinsetRange b).repr x) { val := ↑b i, property := h } = ↑(↑b.repr x) i
Theorem: Composition.single_embedding
File: Mathlib/Combinatorics/Composition.lean

tactic: ext
state_before: n✝ : ℕ
c : Composition n✝
n : ℕ
h : 0 < n
i : Fin n
⊢ ↑(embedding (single n h) 0) i = i

tactic: simp
state_before: case h
n✝ : ℕ
c : Composition n✝
n : ℕ
h : 0 < n
i : Fin n
⊢ ↑(↑(embedding (single n h) 0) i) = ↑i
Theorem: ContinuousMultilinearMap.ext_iff
File: Mathlib/Topology/Algebra/Module/Multilinear.lean

tactic: rw [← toMultilinearMap_injective.eq_iff, MultilinearMap.ext_iff]
state_before: R : Type u
ι : Type v
n : ℕ
M : Fin (Nat.succ n) → Type w
M₁ : ι → Type w₁
M₁' : ι → Type w₁'
M₂ : Type w₂
M₃ : Type w₃
M₄ : Type w₄
inst✝¹⁸ : Semiring R
inst✝¹⁷ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝¹⁶ : (i : ι) → AddCommMonoid (M₁ i)
inst✝¹⁵ : (i : ι) → AddCommMonoid (M₁' i)
inst✝¹⁴ : AddCommMonoid M₂
inst✝¹³ : AddCommMonoid M₃
inst✝¹² : AddCommMonoid M₄
inst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝¹⁰ : (i : ι) → Module R (M₁ i)
inst✝⁹ : (i : ι) → Module R (M₁' i)
inst✝⁸ : Module R M₂
inst✝⁷ : Module R M₃
inst✝⁶ : Module R M₄
inst✝⁵ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)
inst✝⁴ : (i : ι) → TopologicalSpace (M₁ i)
inst✝³ : (i : ι) → TopologicalSpace (M₁' i)
inst✝² : TopologicalSpace M₂
inst✝¹ : TopologicalSpace M₃
inst✝ : TopologicalSpace M₄
f✝ f'✝ f f' : ContinuousMultilinearMap R M₁ M₂
⊢ f = f' ↔ ∀ (x : (i : ι) → M₁ i), ↑f x = ↑f' x

tactic: rfl
state_before: R : Type u
ι : Type v
n : ℕ
M : Fin (Nat.succ n) → Type w
M₁ : ι → Type w₁
M₁' : ι → Type w₁'
M₂ : Type w₂
M₃ : Type w₃
M₄ : Type w₄
inst✝¹⁸ : Semiring R
inst✝¹⁷ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝¹⁶ : (i : ι) → AddCommMonoid (M₁ i)
inst✝¹⁵ : (i : ι) → AddCommMonoid (M₁' i)
inst✝¹⁴ : AddCommMonoid M₂
inst✝¹³ : AddCommMonoid M₃
inst✝¹² : AddCommMonoid M₄
inst✝¹¹ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝¹⁰ : (i : ι) → Module R (M₁ i)
inst✝⁹ : (i : ι) → Module R (M₁' i)
inst✝⁸ : Module R M₂
inst✝⁷ : Module R M₃
inst✝⁶ : Module R M₄
inst✝⁵ : (i : Fin (Nat.succ n)) → TopologicalSpace (M i)
inst✝⁴ : (i : ι) → TopologicalSpace (M₁ i)
inst✝³ : (i : ι) → TopologicalSpace (M₁' i)
inst✝² : TopologicalSpace M₂
inst✝¹ : TopologicalSpace M₃
inst✝ : TopologicalSpace M₄
f✝ f'✝ f f' : ContinuousMultilinearMap R M₁ M₂
⊢ (∀ (x : (i : ι) → M₁ i), ↑f.toMultilinearMap x = ↑f'.toMultilinearMap x) ↔ ∀ (x : (i : ι) → M₁ i), ↑f x = ↑f' x
Theorem: OnePoint.isOpen_image_coe
File: Mathlib/Topology/Compactification/OnePoint.lean

tactic: rw [isOpen_iff_of_not_mem infty_not_mem_image_coe, preimage_image_eq _ coe_injective]
state_before: X : Type u_1
inst✝ : TopologicalSpace X
s✝ : Set (OnePoint X)
t s : Set X
⊢ IsOpen (some '' s) ↔ IsOpen s
Theorem: Complex.inv_cpow
File: Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean

tactic: rw [inv_cpow_eq_ite, if_neg hx]
state_before: x n : ℂ
hx : arg x ≠ π
⊢ x⁻¹ ^ n = (x ^ n)⁻¹
Theorem: List.sublists'_reverse
File: Mathlib/Data/List/Sublists.lean

tactic: simp only [sublists_eq_sublists', map_map, map_id' reverse_reverse, Function.comp]
state_before: α : Type u
β : Type v
γ : Type w
l : List α
⊢ sublists' (reverse l) = map reverse (sublists l)
Theorem: Finset.card_le_card_biUnion_add_card_fiber
File: Mathlib/Algebra/BigOperators/Order.lean

tactic: rw [← Finset.filter_card_add_filter_neg_card_eq_card fun i ↦ f i = ∅, add_comm]
state_before: ι : Type u_1
α : Type u_2
β : Type ?u.112786
M : Type ?u.112789
N : Type ?u.112792
G : Type ?u.112795
k : Type ?u.112798
R : Type ?u.112801
inst✝ : DecidableEq α
s✝ : Finset α
B : Finset (Finset α)
n : ℕ
s : Finset ι
f : ι → Finset α
hs : Set.PairwiseDisjoint (↑s) f
⊢ card s ≤ card (Finset.biUnion s f) + card (filter (fun i => f i = ∅) s)

tactic: exact
  add_le_add_right
    ((card_le_card_biUnion (hs.subset <| filter_subset _ _) fun i hi ↦
          nonempty_of_ne_empty <| (mem_filter.1 hi).2).trans <|
      card_le_of_subset <| biUnion_subset_biUnion_of_subset_left _ <| filter_subset _ _)
    _
state_before: ι : Type u_1
α : Type u_2
β : Type ?u.112786
M : Type ?u.112789
N : Type ?u.112792
G : Type ?u.112795
k : Type ?u.112798
R : Type ?u.112801
inst✝ : DecidableEq α
s✝ : Finset α
B : Finset (Finset α)
n : ℕ
s : Finset ι
f : ι → Finset α
hs : Set.PairwiseDisjoint (↑s) f
⊢ card (filter (fun a => ¬f a = ∅) s) + card (filter (fun i => f i = ∅) s) ≤
    card (Finset.biUnion s f) + card (filter (fun i => f i = ∅) s)
Theorem: minpoly.sub_algebraMap
File: Mathlib/FieldTheory/Minpoly/Field.lean

tactic: simpa [sub_eq_add_neg] using add_algebraMap hx (-a)
state_before: A : Type u_2
B✝ : Type ?u.356948
inst✝⁴ : Field A
inst✝³ : Ring B✝
inst✝² : Algebra A B✝
x✝ : B✝
B : Type u_1
inst✝¹ : CommRing B
inst✝ : Algebra A B
x : B
hx : IsIntegral A x
a : A
⊢ minpoly A (x - ↑(algebraMap A B) a) = Polynomial.comp (minpoly A x) (X + ↑C a)
Theorem: MvPolynomial.mem_ideal_span_X_image
File: Mathlib/RingTheory/MvPolynomial/Ideal.lean

tactic: have := @mem_ideal_span_monomial_image σ R _ x ((fun i => Finsupp.single i 1) '' s)
state_before: σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
x : MvPolynomial σ R
s : Set σ
⊢ x ∈ Ideal.span (X '' s) ↔ ∀ (m : σ →₀ ℕ), m ∈ support x → ∃ i, i ∈ s ∧ ↑m i ≠ 0

tactic: rw [Set.image_image] at this
state_before: σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
x : MvPolynomial σ R
s : Set σ
this :
  x ∈ Ideal.span ((fun s => ↑(monomial s) 1) '' ((fun i => Finsupp.single i 1) '' s)) ↔
    ∀ (xi : σ →₀ ℕ), xi ∈ support x → ∃ si, si ∈ (fun i => Finsupp.single i 1) '' s ∧ si ≤ xi
⊢ x ∈ Ideal.span (X '' s) ↔ ∀ (m : σ →₀ ℕ), m ∈ support x → ∃ i, i ∈ s ∧ ↑m i ≠ 0

tactic: refine' this.trans _
state_before: σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
x : MvPolynomial σ R
s : Set σ
this :
  x ∈ Ideal.span ((fun x => ↑(monomial (Finsupp.single x 1)) 1) '' s) ↔
    ∀ (xi : σ →₀ ℕ), xi ∈ support x → ∃ si, si ∈ (fun i => Finsupp.single i 1) '' s ∧ si ≤ xi
⊢ x ∈ Ideal.span (X '' s) ↔ ∀ (m : σ →₀ ℕ), m ∈ support x → ∃ i, i ∈ s ∧ ↑m i ≠ 0

tactic: simp [Nat.one_le_iff_ne_zero]
state_before: σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
x : MvPolynomial σ R
s : Set σ
this :
  x ∈ Ideal.span ((fun x => ↑(monomial (Finsupp.single x 1)) 1) '' s) ↔
    ∀ (xi : σ →₀ ℕ), xi ∈ support x → ∃ si, si ∈ (fun i => Finsupp.single i 1) '' s ∧ si ≤ xi
⊢ (∀ (xi : σ →₀ ℕ), xi ∈ support x → ∃ si, si ∈ (fun i => Finsupp.single i 1) '' s ∧ si ≤ xi) ↔
    ∀ (m : σ →₀ ℕ), m ∈ support x → ∃ i, i ∈ s ∧ ↑m i ≠ 0
Theorem: LinearMap.splittingOfFunOnFintypeSurjective_splits
File: Mathlib/LinearAlgebra/Finsupp.lean

tactic: refine pi_ext' fun x => ext_ring <| funext fun y => ?_
state_before: R : Type u_2
M : Type u_3
N : Type ?u.781740
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
α : Type u_1
inst✝ : Fintype α
f : M →ₗ[R] α → R
s : Surjective ↑f
⊢ comp f (splittingOfFunOnFintypeSurjective f s) = id

tactic: dsimp [splittingOfFunOnFintypeSurjective]
state_before: R : Type u_2
M : Type u_3
N : Type ?u.781740
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
α : Type u_1
inst✝ : Fintype α
f : M →ₗ[R] α → R
s : Surjective ↑f
x y : α
⊢ ↑(comp (comp f (splittingOfFunOnFintypeSurjective f s)) (single x)) 1 y = ↑(comp id (single x)) 1 y

tactic: rw [linearEquivFunOnFinite_symm_single, Finsupp.sum_single_index, one_smul,
  (s (Finsupp.single x 1)).choose_spec, Finsupp.single_eq_pi_single]
state_before: R : Type u_2
M : Type u_3
N : Type ?u.781740
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
α : Type u_1
inst✝ : Fintype α
f : M →ₗ[R] α → R
s : Surjective ↑f
x y : α
⊢ ↑f
      (sum (↑(LinearEquiv.symm (linearEquivFunOnFinite R R α)) (Pi.single x 1)) fun x r =>
        r • Exists.choose (_ : ∃ a, ↑f a = ↑(Finsupp.single x 1)))
      y =
    Pi.single x 1 y

tactic: rw [zero_smul]
state_before: R : Type u_2
M : Type u_3
N : Type ?u.781740
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
α : Type u_1
inst✝ : Fintype α
f : M →ₗ[R] α → R
s : Surjective ↑f
x y : α
⊢ 0 • Exists.choose (_ : ∃ a, ↑f a = ↑(Finsupp.single x 1)) = 0
Theorem: StrictMono.div_const
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: simpa only [div_eq_mul_inv] using hf.mul_const (inv_pos.2 hc)
state_before: ι : Type ?u.114417
α : Type u_2
β✝ : Type ?u.114423
inst✝¹ : LinearOrderedSemifield α
a b c✝ d e : α
m n : ℤ
β : Type u_1
inst✝ : Preorder β
f : β → α
hf : StrictMono f
c : α
hc : 0 < c
⊢ StrictMono fun x => f x / c
Theorem: List.Chain.count_not
File: Mathlib/Data/Bool/Count.lean

tactic: obtain rfl : b = !x := Bool.eq_not_iff.2 (rel_of_chain_cons h)
state_before: b x : Bool
l : List Bool
h : Chain (fun x x_1 => x ≠ x_1) b (x :: l)
⊢ count (!b) (x :: l) = count b (x :: l) + length (x :: l) % 2

tactic: rw [Bool.not_not, count_cons_self, count_cons_of_ne x.not_ne_self,
  Chain.count_not (chain_of_chain_cons h), length, add_assoc, Nat.mod_two_add_succ_mod_two]
state_before: x : Bool
l : List Bool
h : Chain (fun x x_1 => x ≠ x_1) (!x) (x :: l)
⊢ count (!!x) (x :: l) = count (!x) (x :: l) + length (x :: l) % 2
Theorem: Polynomial.mirror_natDegree
File: Mathlib/Data/Polynomial/Mirror.lean

tactic: by_cases hp : p = 0
state_before: R : Type u_1
inst✝ : Semiring R
p q : R[X]
⊢ natDegree (mirror p) = natDegree p

tactic: nontriviality R
state_before: case neg
R : Type u_1
inst✝ : Semiring R
p q : R[X]
hp : ¬p = 0
⊢ natDegree (mirror p) = natDegree p

tactic: rw [mirror, natDegree_mul', reverse_natDegree, natDegree_X_pow,
  tsub_add_cancel_of_le p.natTrailingDegree_le_natDegree]
state_before: R : Type u_1
inst✝ : Semiring R
p q : R[X]
hp : ¬p = 0
✝ : Nontrivial R
⊢ natDegree (mirror p) = natDegree p

tactic: rwa [leadingCoeff_X_pow, mul_one, reverse_leadingCoeff, Ne, trailingCoeff_eq_zero]
state_before: R : Type u_1
inst✝ : Semiring R
p q : R[X]
hp : ¬p = 0
✝ : Nontrivial R
⊢ leadingCoeff (reverse p) * leadingCoeff (X ^ natTrailingDegree p) ≠ 0

tactic: rw [hp, mirror_zero]
state_before: case pos
R : Type u_1
inst✝ : Semiring R
p q : R[X]
hp : p = 0
⊢ natDegree (mirror p) = natDegree p
Theorem: Finset.sup_singleton''
File: Mathlib/Data/Finset/Lattice.lean

tactic: ext a
state_before: F : Type ?u.416774
α : Type u_1
β : Type u_2
γ : Type ?u.416783
ι : Type ?u.416786
κ : Type ?u.416789
inst✝ : DecidableEq α
s : Finset β
f : β → α
⊢ (sup s fun b => {f b}) = image f s

tactic: rw [mem_sup, mem_image]
state_before: case a
F : Type ?u.416774
α : Type u_1
β : Type u_2
γ : Type ?u.416783
ι : Type ?u.416786
κ : Type ?u.416789
inst✝ : DecidableEq α
s : Finset β
f : β → α
a : α
⊢ (a ∈ sup s fun b => {f b}) ↔ a ∈ image f s

tactic: simp only [mem_singleton, eq_comm]
state_before: case a
F : Type ?u.416774
α : Type u_1
β : Type u_2
γ : Type ?u.416783
ι : Type ?u.416786
κ : Type ?u.416789
inst✝ : DecidableEq α
s : Finset β
f : β → α
a : α
⊢ (∃ v, v ∈ s ∧ a ∈ {f v}) ↔ ∃ a_1, a_1 ∈ s ∧ f a_1 = a
Theorem: Set.not_nonempty_iff_eq_empty
File: Mathlib/Data/Set/Basic.lean

tactic: simp only [Set.Nonempty, not_exists, eq_empty_iff_forall_not_mem]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t t₁ t₂ u s : Set α
⊢ ¬Set.Nonempty s ↔ s = ∅
Theorem: mem_nhdsWithin_Ici_iff_exists_Ico_subset'
File: Mathlib/Topology/Order/Basic.lean

tactic: norm_num
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : TopologicalSpace α
inst✝¹ : LinearOrder α
inst✝ : OrderTopology α
a u' : α
s : Set α
hu' : a < u'
⊢ List.get?
      [s ∈ 𝓝[Ici a] a, s ∈ 𝓝[Icc a u'] a, s ∈ 𝓝[Ico a u'] a, ∃ u, u ∈ Ioc a u' ∧ Ico a u ⊆ s,
        ∃ u, u ∈ Ioi a ∧ Ico a u ⊆ s]
      0 =
    some (s ∈ 𝓝[Ici a] a)

tactic: norm_num
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : TopologicalSpace α
inst✝¹ : LinearOrder α
inst✝ : OrderTopology α
a u' : α
s : Set α
hu' : a < u'
⊢ List.get?
      [s ∈ 𝓝[Ici a] a, s ∈ 𝓝[Icc a u'] a, s ∈ 𝓝[Ico a u'] a, ∃ u, u ∈ Ioc a u' ∧ Ico a u ⊆ s,
        ∃ u, u ∈ Ioi a ∧ Ico a u ⊆ s]
      4 =
    some (∃ u, u ∈ Ioi a ∧ Ico a u ⊆ s)
Theorem: bot_symmDiff
File: Mathlib/Order/SymmDiff.lean

tactic: rw [symmDiff_comm, symmDiff_bot]
state_before: ι : Type ?u.18813
α : Type u_1
β : Type ?u.18819
π : ι → Type ?u.18824
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ ⊥ ∆ a = a
Theorem: tendsto_nhds_iff_seq_tendsto
File: Mathlib/Topology/Sequences.lean

tactic: refine'
  ⟨fun hf u hu => hf.comp hu, fun h =>
    ((nhds_basis_closeds _).tendsto_iff (nhds_basis_closeds _)).2 _⟩
state_before: X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : FrechetUrysohnSpace X
f : X → Y
a : X
b : Y
⊢ Tendsto f (𝓝 a) (𝓝 b) ↔ ∀ (u : ℕ → X), Tendsto u atTop (𝓝 a) → Tendsto (f ∘ u) atTop (𝓝 b)

tactic: rintro s ⟨hbs, hsc⟩
state_before: X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : FrechetUrysohnSpace X
f : X → Y
a : X
b : Y
h : ∀ (u : ℕ → X), Tendsto u atTop (𝓝 a) → Tendsto (f ∘ u) atTop (𝓝 b)
⊢ ∀ (ib : Set Y), ¬b ∈ ib ∧ IsClosed ib → ∃ ia, (¬a ∈ ia ∧ IsClosed ia) ∧ ∀ (x : X), x ∈ iaᶜ → f x ∈ ibᶜ

tactic: refine' ⟨closure (f ⁻¹' s), ⟨mt _ hbs, isClosed_closure⟩, fun x => mt fun hx => subset_closure hx⟩
state_before: case intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : FrechetUrysohnSpace X
f : X → Y
a : X
b : Y
h : ∀ (u : ℕ → X), Tendsto u atTop (𝓝 a) → Tendsto (f ∘ u) atTop (𝓝 b)
s : Set Y
hbs : ¬b ∈ s
hsc : IsClosed s
⊢ ∃ ia, (¬a ∈ ia ∧ IsClosed ia) ∧ ∀ (x : X), x ∈ iaᶜ → f x ∈ sᶜ

tactic: rw [← seqClosure_eq_closure]
state_before: case intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : FrechetUrysohnSpace X
f : X → Y
a : X
b : Y
h : ∀ (u : ℕ → X), Tendsto u atTop (𝓝 a) → Tendsto (f ∘ u) atTop (𝓝 b)
s : Set Y
hbs : ¬b ∈ s
hsc : IsClosed s
⊢ a ∈ closure (f ⁻¹' s) → b ∈ s

tactic: rintro ⟨u, hus, hu⟩
state_before: case intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : FrechetUrysohnSpace X
f : X → Y
a : X
b : Y
h : ∀ (u : ℕ → X), Tendsto u atTop (𝓝 a) → Tendsto (f ∘ u) atTop (𝓝 b)
s : Set Y
hbs : ¬b ∈ s
hsc : IsClosed s
⊢ a ∈ seqClosure (f ⁻¹' s) → b ∈ s

tactic: exact hsc.mem_of_tendsto (h u hu) (eventually_of_forall hus)
state_before: case intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : FrechetUrysohnSpace X
f : X → Y
a : X
b : Y
h : ∀ (u : ℕ → X), Tendsto u atTop (𝓝 a) → Tendsto (f ∘ u) atTop (𝓝 b)
s : Set Y
hbs : ¬b ∈ s
hsc : IsClosed s
u : ℕ → X
hus : ∀ (n : ℕ), u n ∈ f ⁻¹' s
hu : Tendsto u atTop (𝓝 a)
⊢ b ∈ s
Theorem: IsOpen.inter_closure
File: Mathlib/Topology/Basic.lean

tactic: simpa only [← interior_compl, compl_inter] using IsClosed.interior_union_left h.isClosed_compl
state_before: α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t✝ : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s t : Set α
h : IsOpen s
⊢ closure (s ∩ t)ᶜ ⊆ (s ∩ closure t)ᶜ
Theorem: balanced_ball_zero
File: Mathlib/Analysis/Seminorm.lean

tactic: rw [← ball_normSeminorm 𝕜]
state_before: R : Type ?u.1457964
R' : Type ?u.1457967
𝕜 : Type u_1
𝕜₂ : Type ?u.1457973
𝕜₃ : Type ?u.1457976
𝕝 : Type ?u.1457979
E : Type u_2
E₂ : Type ?u.1457985
E₃ : Type ?u.1457988
F : Type ?u.1457991
G : Type ?u.1457994
ι : Type ?u.1457997
inst✝² : NormedField 𝕜
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
r : ℝ
x : E
⊢ Balanced 𝕜 (Metric.ball 0 r)

tactic: exact (normSeminorm _ _).balanced_ball_zero r
state_before: R : Type ?u.1457964
R' : Type ?u.1457967
𝕜 : Type u_1
𝕜₂ : Type ?u.1457973
𝕜₃ : Type ?u.1457976
𝕝 : Type ?u.1457979
E : Type u_2
E₂ : Type ?u.1457985
E₃ : Type ?u.1457988
F : Type ?u.1457991
G : Type ?u.1457994
ι : Type ?u.1457997
inst✝² : NormedField 𝕜
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
r : ℝ
x : E
⊢ Balanced 𝕜 (Seminorm.ball (normSeminorm 𝕜 E) 0 r)
Theorem: MvPolynomial.homogeneousComponent_eq_zero'
File: Mathlib/RingTheory/MvPolynomial/Homogeneous.lean

tactic: rw [homogeneousComponent_apply, sum_eq_zero]
state_before: σ : Type u_1
τ : Type ?u.355900
R : Type u_2
S : Type ?u.355906
inst✝ : CommSemiring R
n : ℕ
φ ψ : MvPolynomial σ R
h : ∀ (d : σ →₀ ℕ), d ∈ support φ → ∑ i in d.support, ↑d i ≠ n
⊢ ↑(homogeneousComponent n) φ = 0

tactic: intro d hd
state_before: σ : Type u_1
τ : Type ?u.355900
R : Type u_2
S : Type ?u.355906
inst✝ : CommSemiring R
n : ℕ
φ ψ : MvPolynomial σ R
h : ∀ (d : σ →₀ ℕ), d ∈ support φ → ∑ i in d.support, ↑d i ≠ n
⊢ ∀ (x : σ →₀ ℕ), x ∈ filter (fun d => ∑ i in d.support, ↑d i = n) (support φ) → ↑(monomial x) (coeff x φ) = 0

tactic: rw [mem_filter] at hd
state_before: σ : Type u_1
τ : Type ?u.355900
R : Type u_2
S : Type ?u.355906
inst✝ : CommSemiring R
n : ℕ
φ ψ : MvPolynomial σ R
h : ∀ (d : σ →₀ ℕ), d ∈ support φ → ∑ i in d.support, ↑d i ≠ n
d : σ →₀ ℕ
hd : d ∈ filter (fun d => ∑ i in d.support, ↑d i = n) (support φ)
⊢ ↑(monomial d) (coeff d φ) = 0

tactic: exfalso
state_before: σ : Type u_1
τ : Type ?u.355900
R : Type u_2
S : Type ?u.355906
inst✝ : CommSemiring R
n : ℕ
φ ψ : MvPolynomial σ R
h : ∀ (d : σ →₀ ℕ), d ∈ support φ → ∑ i in d.support, ↑d i ≠ n
d : σ →₀ ℕ
hd : d ∈ support φ ∧ ∑ i in d.support, ↑d i = n
⊢ ↑(monomial d) (coeff d φ) = 0

tactic: exact h _ hd.1 hd.2
state_before: case h
σ : Type u_1
τ : Type ?u.355900
R : Type u_2
S : Type ?u.355906
inst✝ : CommSemiring R
n : ℕ
φ ψ : MvPolynomial σ R
h : ∀ (d : σ →₀ ℕ), d ∈ support φ → ∑ i in d.support, ↑d i ≠ n
d : σ →₀ ℕ
hd : d ∈ support φ ∧ ∑ i in d.support, ↑d i = n
⊢ False