1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Set.ite_eq_of_subset_left
File: Mathlib/Data/Set/Basic.lean

tactic: ext x
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁✝ s₂✝ t✝ t₁ t₂ u t s₁ s₂ : Set α
h : s₁ ⊆ s₂
⊢ t.ite s₁ s₂ = s₁ ∪ s₂ \ t
state_after: case h
α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁✝ s₂✝ t✝ t₁ t₂ u t s₁ s₂ : Set α
h : s₁ ⊆ s₂
x : α
⊢ x ∈ t.ite s₁ s₂ ↔ x ∈ s₁ ∪ s₂ \ t

tactic: by_cases hx : x ∈ t <;> simp [*, Set.ite, or_iff_right_of_imp (@h x)]
state_before: case h
α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁✝ s₂✝ t✝ t₁ t₂ u t s₁ s₂ : Set α
h : s₁ ⊆ s₂
x : α
⊢ x ∈ t.ite s₁ s₂ ↔ x ∈ s₁ ∪ s₂ \ t
state_after: no goals
Theorem: MvPolynomial.expand_one
File: Mathlib/Algebra/MvPolynomial/Expand.lean

tactic: ext1 f
state_before: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
⊢ expand 1 = AlgHom.id R (MvPolynomial σ R)
state_after: case hf
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f : σ
⊢ (expand 1) (X f) = (AlgHom.id R (MvPolynomial σ R)) (X f)

tactic: rw [expand_one_apply, AlgHom.id_apply]
state_before: case hf
σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f : σ
⊢ (expand 1) (X f) = (AlgHom.id R (MvPolynomial σ R)) (X f)
state_after: no goals
Theorem: Substring.Valid.contains
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

tactic: simp [h.contains, h.toString]
state_before: c : Char
x✝ : Substring
h✝ : x✝.Valid
w✝² w✝¹ w✝ : List Char
h : ValidFor w✝² w✝¹ w✝ x✝
⊢ x✝.contains c = true ↔ c ∈ x✝.toString.data
state_after: no goals
Theorem: PosNum.size_to_nat
File: Mathlib/Data/Num/Lemmas.lean

tactic: rw [size, succ_to_nat, size_to_nat n, cast_bit0, Nat.size_bit0 <| ne_of_gt <| to_nat_pos n]
state_before: α : Type u_1
n : PosNum
⊢ ↑n.bit0.size = (↑n.bit0).size
state_after: no goals

tactic: rw [size, succ_to_nat, size_to_nat n, cast_bit1, Nat.size_bit1]
state_before: α : Type u_1
n : PosNum
⊢ ↑n.bit1.size = (↑n.bit1).size
state_after: no goals
Theorem: Submodule.quotientQuotientEquivQuotientAux_mk_mk
File: Mathlib/LinearAlgebra/Isomorphisms.lean

tactic: simp
state_before: R : Type u_1
M : Type u_2
M₂ : Type u_3
M₃ : Type u_4
inst✝⁶ : Ring R
inst✝⁵ : AddCommGroup M
inst✝⁴ : AddCommGroup M₂
inst✝³ : AddCommGroup M₃
inst✝² : Module R M
inst✝¹ : Module R M₂
inst✝ : Module R M₃
f : M →ₗ[R] M₂
S T : Submodule R M
h : S ≤ T
x : M
⊢ (S.quotientQuotientEquivQuotientAux T h) (Quotient.mk (Quotient.mk x)) = Quotient.mk x
state_after: no goals
Theorem: HomologicalComplex.π_homologyIsoSc'_inv
File: Mathlib/Algebra/Homology/ShortComplex/HomologicalComplex.lean

tactic: apply ShortComplex.homologyπ_naturality
state_before: C : Type u_1
inst✝³ : Category.{u_3, u_1} C
inst✝² : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K : HomologicalComplex C c
i j k : ι
hi : c.prev j = i
hk : c.next j = k
inst✝¹ : K.HasHomology j
inst✝ : (K.sc' i j k).HasHomology
⊢ (K.sc' i j k).homologyπ ≫ (K.homologyIsoSc' i j k hi hk).inv = (K.cyclesIsoSc' i j k hi hk).inv ≫ K.homologyπ j
state_after: no goals
Theorem: MeasureTheory.Integrable.const_inner
File: Mathlib/MeasureTheory/Function/L2Space.lean

tactic: rw [← memℒp_one_iff_integrable] at hf ⊢
state_before: α : Type u_1
m : MeasurableSpace α
p : ℝ≥0∞
μ : Measure α
E : Type u_2
𝕜 : Type u_3
inst✝² : RCLike 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace 𝕜 E
f : α → E
c : E
hf : Integrable f μ
⊢ Integrable (fun x => ⟪c, f x⟫_𝕜) μ
state_after: α : Type u_1
m : MeasurableSpace α
p : ℝ≥0∞
μ : Measure α
E : Type u_2
𝕜 : Type u_3
inst✝² : RCLike 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace 𝕜 E
f : α → E
c : E
hf : Memℒp f 1 μ
⊢ Memℒp (fun x => ⟪c, f x⟫_𝕜) 1 μ

tactic: exact hf.const_inner c
state_before: α : Type u_1
m : MeasurableSpace α
p : ℝ≥0∞
μ : Measure α
E : Type u_2
𝕜 : Type u_3
inst✝² : RCLike 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace 𝕜 E
f : α → E
c : E
hf : Memℒp f 1 μ
⊢ Memℒp (fun x => ⟪c, f x⟫_𝕜) 1 μ
state_after: no goals
Theorem: tsub_le_tsub_add_tsub
File: Mathlib/Algebra/Order/Sub/Defs.lean

tactic: rw [tsub_le_iff_left, ← add_assoc, add_right_comm]
state_before: α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
inst✝³ : AddCommSemigroup α
inst✝² : Sub α
inst✝¹ : OrderedSub α
a b c d : α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
⊢ a - c ≤ a - b + (b - c)
state_after: α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
inst✝³ : AddCommSemigroup α
inst✝² : Sub α
inst✝¹ : OrderedSub α
a b c d : α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
⊢ a ≤ c + (b - c) + (a - b)

tactic: exact le_add_tsub.trans (add_le_add_right le_add_tsub _)
state_before: α : Type u_1
β : Type u_2
inst✝⁴ : Preorder α
inst✝³ : AddCommSemigroup α
inst✝² : Sub α
inst✝¹ : OrderedSub α
a b c d : α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
⊢ a ≤ c + (b - c) + (a - b)
state_after: no goals
Theorem: jacobiSym.mod_left
File: Mathlib/NumberTheory/LegendreSymbol/JacobiSymbol.lean

tactic: rintro p hp _ h₂
state_before: a : ℤ
b : ℕ
⊢ ∀ a_1 ∈ b.factors, ∀ (h₁ h₂ : Nat.Prime a_1), legendreSym a_1 a = legendreSym a_1 (a % ↑b)
state_after: a : ℤ
b p : ℕ
hp : p ∈ b.factors
h₁✝ h₂ : Nat.Prime p
⊢ legendreSym p a = legendreSym p (a % ↑b)

tactic: letI : Fact p.Prime := ⟨h₂⟩
state_before: a : ℤ
b p : ℕ
hp : p ∈ b.factors
h₁✝ h₂ : Nat.Prime p
⊢ legendreSym p a = legendreSym p (a % ↑b)
state_after: a : ℤ
b p : ℕ
hp : p ∈ b.factors
h₁✝ h₂ : Nat.Prime p
this : Fact (Nat.Prime p) := { out := h₂ }
⊢ legendreSym p a = legendreSym p (a % ↑b)

tactic: conv_rhs =>
  rw [legendreSym.mod, Int.emod_emod_of_dvd _ (Int.natCast_dvd_natCast.2 <|
    dvd_of_mem_factors hp), ← legendreSym.mod]
state_before: a : ℤ
b p : ℕ
hp : p ∈ b.factors
h₁✝ h₂ : Nat.Prime p
this : Fact (Nat.Prime p) := { out := h₂ }
⊢ legendreSym p a = legendreSym p (a % ↑b)
state_after: no goals
Theorem: toIcoDiv_zsmul_sub_toIcoMod
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: rw [add_comm, toIcoMod_add_toIcoDiv_zsmul]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
⊢ toIcoDiv hp a b • p + toIcoMod hp a b = b
state_after: no goals
Theorem: ZNum.zneg_succ
File: Mathlib/Data/Num/Lemmas.lean

tactic: cases n <;> try { rfl }
state_before: α : Type u_1
n : ZNum
⊢ -n.succ = (-n).pred
state_after: case neg
α : Type u_1
a✝ : PosNum
⊢ -(neg a✝).succ = (-neg a✝).pred

tactic: rw [succ, Num.zneg_toZNumNeg]
state_before: case neg
α : Type u_1
a✝ : PosNum
⊢ -(neg a✝).succ = (-neg a✝).pred
state_after: case neg
α : Type u_1
a✝ : PosNum
⊢ a✝.pred'.toZNum = (-neg a✝).pred

tactic: rfl
state_before: case neg
α : Type u_1
a✝ : PosNum
⊢ a✝.pred'.toZNum = (-neg a✝).pred
state_after: no goals

tactic: rfl
state_before: case pos
α : Type u_1
a✝ : PosNum
⊢ -(pos a✝).succ = (-pos a✝).pred
state_after: no goals
Theorem: List.duplicate_cons_iff_of_ne
File: Mathlib/Data/List/Duplicate.lean

tactic: simp [duplicate_cons_iff, hne.symm]
state_before: α : Type u_1
l : List α
x y : α
hne : x ≠ y
⊢ x ∈+ y :: l ↔ x ∈+ l
state_after: no goals
Theorem: IsLocalization.AtPrime.to_map_mem_maximal_iff
File: Mathlib/RingTheory/Localization/AtPrime.lean

tactic: simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using
  isUnit_to_map_iff S I x
state_before: R : Type u_1
inst✝⁶ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝⁵ : CommSemiring S
inst✝⁴ : Algebra R S
P : Type u_3
inst✝³ : CommSemiring P
A : Type u_4
inst✝² : CommRing A
inst✝¹ : IsDomain A
I : Ideal R
hI : I.IsPrime
inst✝ : IsLocalization.AtPrime S I
x : R
h : optParam (LocalRing S) ⋯
⊢ (algebraMap R S) x ∉ LocalRing.maximalIdeal S ↔ x ∉ I
state_after: no goals
Theorem: circleIntegrable_zero_radius
File: Mathlib/MeasureTheory/Integral/CircleIntegral.lean

tactic: simp [CircleIntegrable]
state_before: E : Type u_1
inst✝ : NormedAddCommGroup E
f : ℂ → E
c : ℂ
⊢ CircleIntegrable f c 0
state_after: no goals
Theorem: List.mapIdx_append_one
File: Mathlib/Data/List/Indexes.lean

tactic: intros f l e
state_before: α : Type u
β : Type v
⊢ ∀ (f : ℕ → α → β) (l : List α) (e : α), mapIdx f (l ++ [e]) = mapIdx f l ++ [f l.length e]
state_after: α : Type u
β : Type v
f : ℕ → α → β
l : List α
e : α
⊢ mapIdx f (l ++ [e]) = mapIdx f l ++ [f l.length e]

tactic: unfold mapIdx
state_before: α : Type u
β : Type v
f : ℕ → α → β
l : List α
e : α
⊢ mapIdx f (l ++ [e]) = mapIdx f l ++ [f l.length e]
state_after: α : Type u
β : Type v
f : ℕ → α → β
l : List α
e : α
⊢ mapIdx.go f (l ++ [e]) #[] = mapIdx.go f l #[] ++ [f l.length e]

tactic: rw [mapIdxGo_append f l [e]]
state_before: α : Type u
β : Type v
f : ℕ → α → β
l : List α
e : α
⊢ mapIdx.go f (l ++ [e]) #[] = mapIdx.go f l #[] ++ [f l.length e]
state_after: α : Type u
β : Type v
f : ℕ → α → β
l : List α
e : α
⊢ mapIdx.go f [e] (toArray (mapIdx.go f l #[])) = mapIdx.go f l #[] ++ [f l.length e]

tactic: simp only [mapIdx.go, Array.size_toArray, mapIdxGo_length, length_nil, Nat.add_zero,
  Array.toList_eq, Array.push_data, Array.data_toArray]
state_before: α : Type u
β : Type v
f : ℕ → α → β
l : List α
e : α
⊢ mapIdx.go f [e] (toArray (mapIdx.go f l #[])) = mapIdx.go f l #[] ++ [f l.length e]
state_after: no goals
Theorem: IsUpperSet.div_left
File: Mathlib/Algebra/Order/UpperLower.lean

tactic: rw [div_eq_mul_inv]
state_before: α : Type u_1
inst✝ : OrderedCommGroup α
s t : Set α
a : α
ht : IsUpperSet t
⊢ IsLowerSet (s / t)
state_after: α : Type u_1
inst✝ : OrderedCommGroup α
s t : Set α
a : α
ht : IsUpperSet t
⊢ IsLowerSet (s * t⁻¹)

tactic: exact ht.inv.mul_left
state_before: α : Type u_1
inst✝ : OrderedCommGroup α
s t : Set α
a : α
ht : IsUpperSet t
⊢ IsLowerSet (s * t⁻¹)
state_after: no goals
Theorem: Ordinal.nfpFamily_fp
File: Mathlib/SetTheory/Ordinal/FixedPoint.lean

tactic: unfold nfpFamily
state_before: ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
i : ι
H : IsNormal (f i)
a : Ordinal.{max u v}
⊢ f i (nfpFamily f a) = nfpFamily f a
state_after: ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
i : ι
H : IsNormal (f i)
a : Ordinal.{max u v}
⊢ f i (sup (List.foldr f a)) = sup (List.foldr f a)

tactic: rw [@IsNormal.sup.{u, v, v} _ H _ _ ⟨[]⟩]
state_before: ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
i : ι
H : IsNormal (f i)
a : Ordinal.{max u v}
⊢ f i (sup (List.foldr f a)) = sup (List.foldr f a)
state_after: ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
i : ι
H : IsNormal (f i)
a : Ordinal.{max u v}
⊢ sup (f i ∘ List.foldr f a) = sup (List.foldr f a)

tactic: apply le_antisymm <;> refine Ordinal.sup_le fun l => ?_
state_before: ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
i : ι
H : IsNormal (f i)
a : Ordinal.{max u v}
⊢ sup (f i ∘ List.foldr f a) = sup (List.foldr f a)
state_after: case a
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
i : ι
H : IsNormal (f i)
a : Ordinal.{max u v}
l : List ι
⊢ (f i ∘ List.foldr f a) l ≤ sup (List.foldr f a)

case a
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
i : ι
H : IsNormal (f i)
a : Ordinal.{max u v}
l : List ι
⊢ List.foldr f a l ≤ sup (f i ∘ List.foldr f a)

tactic: exact le_sup _ (i::l)
state_before: case a
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
i : ι
H : IsNormal (f i)
a : Ordinal.{max u v}
l : List ι
⊢ (f i ∘ List.foldr f a) l ≤ sup (List.foldr f a)
state_after: no goals

tactic: exact (H.self_le _).trans (le_sup _ _)
state_before: case a
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
i : ι
H : IsNormal (f i)
a : Ordinal.{max u v}
l : List ι
⊢ List.foldr f a l ≤ sup (f i ∘ List.foldr f a)
state_after: no goals
Theorem: Filter.mem_coclosed_compact'
File: Mathlib/Topology/Compactness/Compact.lean

tactic: simp only [hasBasis_coclosedCompact.mem_iff, compl_subset_comm, and_assoc]
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
⊢ s ∈ coclosedCompact X ↔ ∃ t, IsClosed t ∧ IsCompact t ∧ sᶜ ⊆ t
state_after: no goals
Theorem: Module.DualBases.lc_coeffs
File: Mathlib/LinearAlgebra/Dual.lean

tactic: refine eq_of_sub_eq_zero <| h.total fun i ↦ ?_
state_before: R : Type u_1
M : Type u_2
ι : Type u_3
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
e : ι → M
ε : ι → Dual R M
inst✝ : DecidableEq ι
h : DualBases e ε
m : M
⊢ lc e (h.coeffs m) = m
state_after: R : Type u_1
M : Type u_2
ι : Type u_3
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
e : ι → M
ε : ι → Dual R M
inst✝ : DecidableEq ι
h : DualBases e ε
m : M
i : ι
⊢ (ε i) (lc e (h.coeffs m) - m) = 0

tactic: simp [LinearMap.map_sub, h.dual_lc, sub_eq_zero]
state_before: R : Type u_1
M : Type u_2
ι : Type u_3
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
e : ι → M
ε : ι → Dual R M
inst✝ : DecidableEq ι
h : DualBases e ε
m : M
i : ι
⊢ (ε i) (lc e (h.coeffs m) - m) = 0
state_after: no goals
Theorem: finrank_span_set_eq_card
File: Mathlib/LinearAlgebra/Dimension/Constructions.lean

tactic: have : Module.rank R (span R s) = #s := rank_span_set hs
state_before: R S : Type u
M : Type v
M' : Type v'
M₁ : Type v
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type u_1
inst✝⁹ : Ring R
inst✝⁸ : CommRing S
inst✝⁷ : AddCommGroup M
inst✝⁶ : AddCommGroup M'
inst✝⁵ : AddCommGroup M₁
inst✝⁴ : Module R M
inst✝³ : Module R M'
inst✝² : Module R M₁
inst✝¹ : StrongRankCondition R
s : Set M
inst✝ : Fintype ↑s
hs : LinearIndependent (ι := { x // x ∈ s }) R Subtype.val
⊢ Module.rank R ↥(span R s) = ↑s.toFinset.card
state_after: R S : Type u
M : Type v
M' : Type v'
M₁ : Type v
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type u_1
inst✝⁹ : Ring R
inst✝⁸ : CommRing S
inst✝⁷ : AddCommGroup M
inst✝⁶ : AddCommGroup M'
inst✝⁵ : AddCommGroup M₁
inst✝⁴ : Module R M
inst✝³ : Module R M'
inst✝² : Module R M₁
inst✝¹ : StrongRankCondition R
s : Set M
inst✝ : Fintype ↑s
hs : LinearIndependent (ι := { x // x ∈ s }) R Subtype.val
this : Module.rank R ↥(span R s) = #↑s
⊢ Module.rank R ↥(span R s) = ↑s.toFinset.card

tactic: rwa [Cardinal.mk_fintype, ← Set.toFinset_card] at this
state_before: R S : Type u
M : Type v
M' : Type v'
M₁ : Type v
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type u_1
inst✝⁹ : Ring R
inst✝⁸ : CommRing S
inst✝⁷ : AddCommGroup M
inst✝⁶ : AddCommGroup M'
inst✝⁵ : AddCommGroup M₁
inst✝⁴ : Module R M
inst✝³ : Module R M'
inst✝² : Module R M₁
inst✝¹ : StrongRankCondition R
s : Set M
inst✝ : Fintype ↑s
hs : LinearIndependent (ι := { x // x ∈ s }) R Subtype.val
this : Module.rank R ↥(span R s) = #↑s
⊢ Module.rank R ↥(span R s) = ↑s.toFinset.card
state_after: no goals
Theorem: is_const_of_deriv_eq_zero
File: Mathlib/Analysis/Calculus/MeanValue.lean

tactic: ext
state_before: E : Type u_1
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
F : Type u_2
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
𝕜 : Type u_3
G : Type u_4
inst✝³ : RCLike 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f f' : 𝕜 → G
s : Set 𝕜
x✝ y✝ : 𝕜
hf : Differentiable 𝕜 f
hf' : ∀ (x : 𝕜), deriv f x = 0
x y z : 𝕜
⊢ fderiv 𝕜 f z = 0
state_after: case h
E : Type u_1
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
F : Type u_2
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
𝕜 : Type u_3
G : Type u_4
inst✝³ : RCLike 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f f' : 𝕜 → G
s : Set 𝕜
x✝ y✝ : 𝕜
hf : Differentiable 𝕜 f
hf' : ∀ (x : 𝕜), deriv f x = 0
x y z : 𝕜
⊢ (fderiv 𝕜 f z) 1 = 0 1

tactic: simp [← deriv_fderiv, hf']
state_before: case h
E : Type u_1
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
F : Type u_2
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
𝕜 : Type u_3
G : Type u_4
inst✝³ : RCLike 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f f' : 𝕜 → G
s : Set 𝕜
x✝ y✝ : 𝕜
hf : Differentiable 𝕜 f
hf' : ∀ (x : 𝕜), deriv f x = 0
x y z : 𝕜
⊢ (fderiv 𝕜 f z) 1 = 0 1
state_after: no goals
Theorem: MulChar.IsQuadratic.sq_eq_one
File: Mathlib/NumberTheory/MulChar/Basic.lean

tactic: rw [← mul_left_inv χ, pow_two, hχ.inv]
state_before: R : Type u_1
inst✝² : CommMonoid R
R' : Type u_2
inst✝¹ : CommRing R'
R'' : Type u_3
inst✝ : CommRing R''
χ : MulChar R R'
hχ : χ.IsQuadratic
⊢ χ ^ 2 = 1
state_after: no goals
Theorem: SimpleGraph.chromaticNumber_le_one_of_subsingleton
File: Mathlib/Combinatorics/SimpleGraph/Coloring.lean

tactic: rw [← Nat.cast_one, chromaticNumber_le_iff_colorable]
state_before: V : Type u
G✝ : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G✝.Coloring α
G : SimpleGraph V
inst✝ : Subsingleton V
⊢ G.chromaticNumber ≤ 1
state_after: V : Type u
G✝ : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G✝.Coloring α
G : SimpleGraph V
inst✝ : Subsingleton V
⊢ G.Colorable 1

tactic: refine ⟨Coloring.mk (fun _ => 0) ?_⟩
state_before: V : Type u
G✝ : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G✝.Coloring α
G : SimpleGraph V
inst✝ : Subsingleton V
⊢ G.Colorable 1
state_after: V : Type u
G✝ : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G✝.Coloring α
G : SimpleGraph V
inst✝ : Subsingleton V
⊢ ∀ {v w : V}, G.Adj v w → (fun x => 0) v ≠ (fun x => 0) w

tactic: intros v w
state_before: V : Type u
G✝ : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G✝.Coloring α
G : SimpleGraph V
inst✝ : Subsingleton V
⊢ ∀ {v w : V}, G.Adj v w → (fun x => 0) v ≠ (fun x => 0) w
state_after: V : Type u
G✝ : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G✝.Coloring α
G : SimpleGraph V
inst✝ : Subsingleton V
v w : V
⊢ G.Adj v w → (fun x => 0) v ≠ (fun x => 0) w

tactic: cases Subsingleton.elim v w
state_before: V : Type u
G✝ : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G✝.Coloring α
G : SimpleGraph V
inst✝ : Subsingleton V
v w : V
⊢ G.Adj v w → (fun x => 0) v ≠ (fun x => 0) w
state_after: case refl
V : Type u
G✝ : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G✝.Coloring α
G : SimpleGraph V
inst✝ : Subsingleton V
v : V
⊢ G.Adj v v → (fun x => 0) v ≠ (fun x => 0) v

tactic: simp
state_before: case refl
V : Type u
G✝ : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G✝.Coloring α
G : SimpleGraph V
inst✝ : Subsingleton V
v : V
⊢ G.Adj v v → (fun x => 0) v ≠ (fun x => 0) v
state_after: no goals
Theorem: MeasureTheory.SimpleFunc.setToSimpleFunc_const'
File: Mathlib/MeasureTheory/Integral/SetToL1.lean

tactic: simp only [setToSimpleFunc, range_const, Set.mem_singleton, preimage_const_of_mem,
  sum_singleton, ← Function.const_def, coe_const]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
F' : Type u_4
G : Type u_5
𝕜 : Type u_6
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 α
inst✝ : Nonempty α
T : Set α → F →L[ℝ] F'
x : F
m : MeasurableSpace α
⊢ setToSimpleFunc T (const α x) = (T Set.univ) x
state_after: no goals
Theorem: Polynomial.X_pow_sub_one_mul_prod_cyclotomic_eq_X_pow_sub_one_of_dvd
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean

tactic: obtain ⟨hd, hdn⟩ := Nat.mem_properDivisors.mp h
state_before: R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
⊢ (X ^ d - 1) * ∏ x ∈ n.divisors \ d.divisors, cyclotomic x R = X ^ n - 1
state_after: case intro
R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hd : d ∣ n
hdn : d < n
⊢ (X ^ d - 1) * ∏ x ∈ n.divisors \ d.divisors, cyclotomic x R = X ^ n - 1

tactic: have h0n : 0 < n := pos_of_gt hdn
state_before: case intro
R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hd : d ∣ n
hdn : d < n
⊢ (X ^ d - 1) * ∏ x ∈ n.divisors \ d.divisors, cyclotomic x R = X ^ n - 1
state_after: case intro
R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hd : d ∣ n
hdn : d < n
h0n : 0 < n
⊢ (X ^ d - 1) * ∏ x ∈ n.divisors \ d.divisors, cyclotomic x R = X ^ n - 1

tactic: have h0d : 0 < d := Nat.pos_of_dvd_of_pos hd h0n
state_before: case intro
R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hd : d ∣ n
hdn : d < n
h0n : 0 < n
⊢ (X ^ d - 1) * ∏ x ∈ n.divisors \ d.divisors, cyclotomic x R = X ^ n - 1
state_after: case intro
R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hd : d ∣ n
hdn : d < n
h0n : 0 < n
h0d : 0 < d
⊢ (X ^ d - 1) * ∏ x ∈ n.divisors \ d.divisors, cyclotomic x R = X ^ n - 1

tactic: rw [← prod_cyclotomic_eq_X_pow_sub_one h0d, ← prod_cyclotomic_eq_X_pow_sub_one h0n, mul_comm,
  Finset.prod_sdiff (Nat.divisors_subset_of_dvd h0n.ne' hd)]
state_before: case intro
R : Type u_1
inst✝ : CommRing R
d n : ℕ
h : d ∈ n.properDivisors
hd : d ∣ n
hdn : d < n
h0n : 0 < n
h0d : 0 < d
⊢ (X ^ d - 1) * ∏ x ∈ n.divisors \ d.divisors, cyclotomic x R = X ^ n - 1
state_after: no goals
Theorem: MeasureTheory.measure_union_add_inter
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [← measure_inter_add_diff (s ∪ t) ht, Set.union_inter_cancel_right, union_diff_right, ←
  measure_inter_add_diff s ht]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t s : Set α
ht : MeasurableSet t
⊢ μ (s ∪ t) + μ (s ∩ t) = μ s + μ t
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t s : Set α
ht : MeasurableSet t
⊢ μ t + μ (s \ t) + μ (s ∩ t) = μ (s ∩ t) + μ (s \ t) + μ t

tactic: ac_rfl
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t s : Set α
ht : MeasurableSet t
⊢ μ t + μ (s \ t) + μ (s ∩ t) = μ (s ∩ t) + μ (s \ t) + μ t
state_after: no goals
Theorem: Levenshtein.impl_cons
File: Mathlib/Data/List/EditDistance/Defs.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
δ : Type u_3
inst✝¹ : AddZeroClass δ
inst✝ : Min δ
C : Cost α β δ
x : α
xs : List α
y : β
d : δ
ds : List δ
w✝ : 0 < (d :: ds).length
w' : 0 < ds.length
r : List δ
w : 0 < r.length
⊢ 0 < (min (C.delete x + r[0]) (min (C.insert y + d) (C.substitute x y + ds[0])) :: r).length
state_after: no goals
Theorem: NNReal.tendsto_of_antitone
File: Mathlib/Topology/Instances/NNReal.lean

tactic: have h_bdd_0 : (0 : ℝ) ∈ lowerBounds (Set.range fun n : ℕ => (f n : ℝ)) := by
  rintro r ⟨n, hn⟩
  simp_rw [← hn]
  exact NNReal.coe_nonneg _
state_before: f : ℕ → ℝ≥0
h_ant : Antitone f
⊢ ∃ r, Tendsto f atTop (𝓝 r)
state_after: f : ℕ → ℝ≥0
h_ant : Antitone f
h_bdd_0 : 0 ∈ lowerBounds (range fun n => ↑(f n))
⊢ ∃ r, Tendsto f atTop (𝓝 r)

tactic: obtain ⟨L, hL⟩ := Real.tendsto_of_bddBelow_antitone ⟨0, h_bdd_0⟩ h_ant
state_before: f : ℕ → ℝ≥0
h_ant : Antitone f
h_bdd_0 : 0 ∈ lowerBounds (range fun n => ↑(f n))
⊢ ∃ r, Tendsto f atTop (𝓝 r)
state_after: case intro
f : ℕ → ℝ≥0
h_ant : Antitone f
h_bdd_0 : 0 ∈ lowerBounds (range fun n => ↑(f n))
L : ℝ
hL : Tendsto (fun n => ↑(f n)) atTop (𝓝 L)
⊢ ∃ r, Tendsto f atTop (𝓝 r)

tactic: have hL0 : 0 ≤ L :=
  haveI h_glb : IsGLB (Set.range fun n => (f n : ℝ)) L := isGLB_of_tendsto_atTop h_ant hL
  (le_isGLB_iff h_glb).mpr h_bdd_0
state_before: case intro
f : ℕ → ℝ≥0
h_ant : Antitone f
h_bdd_0 : 0 ∈ lowerBounds (range fun n => ↑(f n))
L : ℝ
hL : Tendsto (fun n => ↑(f n)) atTop (𝓝 L)
⊢ ∃ r, Tendsto f atTop (𝓝 r)
state_after: case intro
f : ℕ → ℝ≥0
h_ant : Antitone f
h_bdd_0 : 0 ∈ lowerBounds (range fun n => ↑(f n))
L : ℝ
hL : Tendsto (fun n => ↑(f n)) atTop (𝓝 L)
hL0 : 0 ≤ L
⊢ ∃ r, Tendsto f atTop (𝓝 r)

tactic: exact ⟨⟨L, hL0⟩, NNReal.tendsto_coe.mp hL⟩
state_before: case intro
f : ℕ → ℝ≥0
h_ant : Antitone f
h_bdd_0 : 0 ∈ lowerBounds (range fun n => ↑(f n))
L : ℝ
hL : Tendsto (fun n => ↑(f n)) atTop (𝓝 L)
hL0 : 0 ≤ L
⊢ ∃ r, Tendsto f atTop (𝓝 r)
state_after: no goals

tactic: rintro r ⟨n, hn⟩
state_before: f : ℕ → ℝ≥0
h_ant : Antitone f
⊢ 0 ∈ lowerBounds (range fun n => ↑(f n))
state_after: case intro
f : ℕ → ℝ≥0
h_ant : Antitone f
r : ℝ
n : ℕ
hn : (fun n => ↑(f n)) n = r
⊢ 0 ≤ r

tactic: simp_rw [← hn]
state_before: case intro
f : ℕ → ℝ≥0
h_ant : Antitone f
r : ℝ
n : ℕ
hn : (fun n => ↑(f n)) n = r
⊢ 0 ≤ r
state_after: case intro
f : ℕ → ℝ≥0
h_ant : Antitone f
r : ℝ
n : ℕ
hn : (fun n => ↑(f n)) n = r
⊢ 0 ≤ ↑(f n)

tactic: exact NNReal.coe_nonneg _
state_before: case intro
f : ℕ → ℝ≥0
h_ant : Antitone f
r : ℝ
n : ℕ
hn : (fun n => ↑(f n)) n = r
⊢ 0 ≤ ↑(f n)
state_after: no goals