tasksource/leandojo huggingface dataset:
Theorem: Polynomial.erase_mem_lifts
File: Mathlib/Data/Polynomial/Lifts.lean

tactic: rw [lifts_iff_ringHom_rangeS, mem_map_rangeS] at h⊢
state_before: R : Type u
inst✝¹ : Semiring R
S : Type v
inst✝ : Semiring S
f : R →+* S
p : S[X]
n : ℕ
h : p ∈ lifts f
⊢ erase n p ∈ lifts f

tactic: intro k
state_before: R : Type u
inst✝¹ : Semiring R
S : Type v
inst✝ : Semiring S
f : R →+* S
p : S[X]
n : ℕ
h : ∀ (n : ℕ), coeff p n ∈ RingHom.rangeS f
⊢ ∀ (n_1 : ℕ), coeff (erase n p) n_1 ∈ RingHom.rangeS f

tactic: by_cases hk : k = n
state_before: R : Type u
inst✝¹ : Semiring R
S : Type v
inst✝ : Semiring S
f : R →+* S
p : S[X]
n : ℕ
h : ∀ (n : ℕ), coeff p n ∈ RingHom.rangeS f
k : ℕ
⊢ coeff (erase n p) k ∈ RingHom.rangeS f

tactic: obtain ⟨i, hi⟩ := h k
state_before: case neg
R : Type u
inst✝¹ : Semiring R
S : Type v
inst✝ : Semiring S
f : R →+* S
p : S[X]
n : ℕ
h : ∀ (n : ℕ), coeff p n ∈ RingHom.rangeS f
k : ℕ
hk : ¬k = n
⊢ coeff (erase n p) k ∈ RingHom.rangeS f

tactic: use i
state_before: case neg.intro
R : Type u
inst✝¹ : Semiring R
S : Type v
inst✝ : Semiring S
f : R →+* S
p : S[X]
n : ℕ
h : ∀ (n : ℕ), coeff p n ∈ RingHom.rangeS f
k : ℕ
hk : ¬k = n
i : R
hi : ↑f i = coeff p k
⊢ coeff (erase n p) k ∈ RingHom.rangeS f

tactic: simp only [hi, hk, erase_ne, Ne.def, not_false_iff]
state_before: case neg.intro
R : Type u
inst✝¹ : Semiring R
S : Type v
inst✝ : Semiring S
f : R →+* S
p : S[X]
n : ℕ
h : ∀ (n : ℕ), coeff p n ∈ RingHom.rangeS f
k : ℕ
hk : ¬k = n
i : R
hi : ↑f i = coeff p k
⊢ ↑f i = coeff (erase n p) k

tactic: use 0
state_before: case pos
R : Type u
inst✝¹ : Semiring R
S : Type v
inst✝ : Semiring S
f : R →+* S
p : S[X]
n : ℕ
h : ∀ (n : ℕ), coeff p n ∈ RingHom.rangeS f
k : ℕ
hk : k = n
⊢ coeff (erase n p) k ∈ RingHom.rangeS f

tactic: simp only [hk, RingHom.map_zero, erase_same]
state_before: case pos
R : Type u
inst✝¹ : Semiring R
S : Type v
inst✝ : Semiring S
f : R →+* S
p : S[X]
n : ℕ
h : ∀ (n : ℕ), coeff p n ∈ RingHom.rangeS f
k : ℕ
hk : k = n
⊢ ↑f 0 = coeff (erase n p) k
Theorem: Real.arccos_nonneg
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean

tactic: unfold arccos
state_before: x : ℝ
⊢ 0 ≤ arccos x

tactic: linarith [arcsin_le_pi_div_two x]
state_before: x : ℝ
⊢ 0 ≤ π / 2 - arcsin x
Theorem: CategoryTheory.IsIso.Iso.inv_inv
File: Mathlib/CategoryTheory/Iso.lean

tactic: apply inv_eq_of_hom_inv_id
state_before: C : Type u
inst✝ : Category C
X Y Z : C
f✝ g : X ⟶ Y
h : Y ⟶ Z
f : X ≅ Y
⊢ inv f.inv = f.hom

tactic: simp
state_before: case hom_inv_id
C : Type u
inst✝ : Category C
X Y Z : C
f✝ g : X ⟶ Y
h : Y ⟶ Z
f : X ≅ Y
⊢ f.inv ≫ f.hom = 𝟙 Y
Theorem: LaurentSeries.ofPowerSeries_powerSeriesPart
File: Mathlib/RingTheory/LaurentSeries.lean

tactic: refine' Eq.trans _ (congr rfl x.single_order_mul_powerSeriesPart)
state_before: R : Type u
inst✝ : Semiring R
x : LaurentSeries R
⊢ ↑(ofPowerSeries ℤ R) (powerSeriesPart x) = ↑(single (-order x)) 1 * x

tactic: rw [← mul_assoc, single_mul_single, neg_add_self, mul_one, ← C_apply, C_one, one_mul]
state_before: R : Type u
inst✝ : Semiring R
x : LaurentSeries R
⊢ ↑(ofPowerSeries ℤ R) (powerSeriesPart x) =
    ↑(single (-order x)) 1 * (↑(single (order x)) 1 * ↑(ofPowerSeries ℤ R) (powerSeriesPart x))
Theorem: BoxIntegral.Box.iUnion_coe_splitCenterBox
File: Mathlib/Analysis/BoxIntegral/Box/SubboxInduction.lean

tactic: ext x
state_before: ι : Type u_1
I✝ J I : Box ι
⊢ (⋃ (s : Set ι), ↑(splitCenterBox I s)) = ↑I

tactic: simp
state_before: case h
ι : Type u_1
I✝ J I : Box ι
x : ι → ℝ
⊢ (x ∈ ⋃ (s : Set ι), ↑(splitCenterBox I s)) ↔ x ∈ ↑I
Theorem: PadicInt.norm_pow
File: Mathlib/NumberTheory/Padics/PadicIntegers.lean

tactic: simp
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
z : ℤ_[p]
⊢ ‖z ^ 0‖ = ‖z‖ ^ 0

tactic: rw [pow_succ, pow_succ, norm_mul]
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
z : ℤ_[p]
k : ℕ
⊢ ‖z ^ (k + 1)‖ = ‖z‖ ^ (k + 1)

tactic: congr
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
z : ℤ_[p]
k : ℕ
⊢ ‖z‖ * ‖z ^ k‖ = ‖z‖ * ‖z‖ ^ k

tactic: apply norm_pow
state_before: case e_a
p : ℕ
inst✝ : Fact (Nat.Prime p)
z : ℤ_[p]
k : ℕ
⊢ ‖z ^ k‖ = ‖z‖ ^ k
Theorem: Set.Ico_inter_Ico
File: Mathlib/Data/Set/Intervals/Basic.lean

tactic: simp only [Ici_inter_Iio.symm, Ici_inter_Ici.symm, Iio_inter_Iio.symm]
state_before: α : Type u_1
β : Type ?u.185024
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
a a₁ a₂ b b₁ b₂ c d : α
⊢ Ico a₁ b₁ ∩ Ico a₂ b₂ = Ico (a₁ ⊔ a₂) (b₁ ⊓ b₂)

tactic: ac_rfl
state_before: α : Type u_1
β : Type ?u.185024
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
a a₁ a₂ b b₁ b₂ c d : α
⊢ Ici a₁ ∩ Iio b₁ ∩ (Ici a₂ ∩ Iio b₂) = Ici a₁ ∩ Ici a₂ ∩ (Iio b₁ ∩ Iio b₂)
Theorem: Stream'.Seq.not_mem_nil
File: Mathlib/Data/Seq/Seq.lean

tactic: injection h
state_before: α : Type u
β : Type v
γ : Type w
a : α
x✝ : a ∈ nil
w✝ : ℕ
h : some a = none
⊢ False
Theorem: Subspace.quotAnnihilatorEquiv_apply
File: Mathlib/LinearAlgebra/Dual.lean

tactic: ext
state_before: K : Type u
V : Type v
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
W✝ W : Subspace K V
φ : Module.Dual K V
⊢ ↑(quotAnnihilatorEquiv W) (Submodule.Quotient.mk φ) = ↑(dualRestrict W) φ

tactic: rfl
state_before: case h
K : Type u
V : Type v
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
W✝ W : Subspace K V
φ : Module.Dual K V
x✝ : { x // x ∈ W }
⊢ ↑(↑(quotAnnihilatorEquiv W) (Submodule.Quotient.mk φ)) x✝ = ↑(↑(dualRestrict W) φ) x✝
Theorem: Matrix.det_of_mem_unitary
File: Mathlib/LinearAlgebra/UnitaryGroup.lean

tactic: constructor
state_before: n : Type u
inst✝³ : DecidableEq n
inst✝² : Fintype n
α : Type v
inst✝¹ : CommRing α
inst✝ : StarRing α
A✝ A : Matrix n n α
hA : A ∈ unitaryGroup n α
⊢ det A ∈ unitary α

tactic: simpa [star, det_transpose] using congr_arg det hA.1
state_before: case left
n : Type u
inst✝³ : DecidableEq n
inst✝² : Fintype n
α : Type v
inst✝¹ : CommRing α
inst✝ : StarRing α
A✝ A : Matrix n n α
hA : A ∈ unitaryGroup n α
⊢ star (det A) * det A = 1

tactic: simpa [star, det_transpose] using congr_arg det hA.2
state_before: case right
n : Type u
inst✝³ : DecidableEq n
inst✝² : Fintype n
α : Type v
inst✝¹ : CommRing α
inst✝ : StarRing α
A✝ A : Matrix n n α
hA : A ∈ unitaryGroup n α
⊢ det A * star (det A) = 1
Theorem: IsLocalizedModule.mk_eq_mk'
File: Mathlib/Algebra/Module/LocalizedModule.lean

tactic: rw [eq_comm, mk'_eq_iff, Submonoid.smul_def, LocalizedModule.smul'_mk, ← Submonoid.smul_def,
  LocalizedModule.mk_cancel, LocalizedModule.mkLinearMap_apply]
state_before: R : Type u_1
inst✝⁷ : CommRing R
S : Submonoid R
M : Type u_2
M' : Type ?u.925325
M'' : Type ?u.925328
inst✝⁶ : AddCommMonoid M
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M''
inst✝³ : Module R M
inst✝² : Module R M'
inst✝¹ : Module R M''
f : M →ₗ[R] M'
g : M →ₗ[R] M''
inst✝ : IsLocalizedModule S f
s : { x // x ∈ S }
m : M
⊢ LocalizedModule.mk m s = mk' (LocalizedModule.mkLinearMap S M) m s
Theorem: MeasureTheory.measureUnivNNReal_eq_zero
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [← MeasureTheory.Measure.measure_univ_eq_zero, ← coe_measureUnivNNReal]
state_before: α : Type u_1
β : Type ?u.617950
γ : Type ?u.617953
δ : Type ?u.617956
ι : Type ?u.617959
R : Type ?u.617962
R' : Type ?u.617965
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
inst✝ : IsFiniteMeasure μ
⊢ measureUnivNNReal μ = 0 ↔ μ = 0

tactic: norm_cast
state_before: α : Type u_1
β : Type ?u.617950
γ : Type ?u.617953
δ : Type ?u.617956
ι : Type ?u.617959
R : Type ?u.617962
R' : Type ?u.617965
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
inst✝ : IsFiniteMeasure μ
⊢ measureUnivNNReal μ = 0 ↔ ↑(measureUnivNNReal μ) = 0
Theorem: Set.definable_finset_inf
File: Mathlib/ModelTheory/Definability.lean

tactic: classical
  refine' Finset.induction definable_univ (fun i s _ h => _) s
  rw [Finset.inf_insert]
  exact (hf i).inter h
state_before: M : Type w
A : Set M
L : Language
inst✝ : Structure L M
α : Type u₁
β : Type ?u.13116
B : Set M
s✝ : Set (α → M)
ι : Type u_1
f : ι → Set (α → M)
hf : ∀ (i : ι), Definable A L (f i)
s : Finset ι
⊢ Definable A L (Finset.inf s f)

tactic: refine' Finset.induction definable_univ (fun i s _ h => _) s
state_before: M : Type w
A : Set M
L : Language
inst✝ : Structure L M
α : Type u₁
β : Type ?u.13116
B : Set M
s✝ : Set (α → M)
ι : Type u_1
f : ι → Set (α → M)
hf : ∀ (i : ι), Definable A L (f i)
s : Finset ι
⊢ Definable A L (Finset.inf s f)

tactic: rw [Finset.inf_insert]
state_before: M : Type w
A : Set M
L : Language
inst✝ : Structure L M
α : Type u₁
β : Type ?u.13116
B : Set M
s✝¹ : Set (α → M)
ι : Type u_1
f : ι → Set (α → M)
hf : ∀ (i : ι), Definable A L (f i)
s✝ : Finset ι
i : ι
s : Finset ι
x✝ : ¬i ∈ s
h : Definable A L (Finset.inf s f)
⊢ Definable A L (Finset.inf (insert i s) f)

tactic: exact (hf i).inter h
state_before: M : Type w
A : Set M
L : Language
inst✝ : Structure L M
α : Type u₁
β : Type ?u.13116
B : Set M
s✝¹ : Set (α → M)
ι : Type u_1
f : ι → Set (α → M)
hf : ∀ (i : ι), Definable A L (f i)
s✝ : Finset ι
i : ι
s : Finset ι
x✝ : ¬i ∈ s
h : Definable A L (Finset.inf s f)
⊢ Definable A L (f i ⊓ Finset.inf s f)
Theorem: List.Func.eq_of_equiv
File: Mathlib/Data/List/Func.lean

tactic: cases h1
state_before: α : Type u
β : Type v
γ : Type w
a : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
head✝ : α
tail✝ : List α
h1 : length (head✝ :: tail✝) = length []
x✝ : Equiv (head✝ :: tail✝) []
⊢ head✝ :: tail✝ = []

tactic: cases h1
state_before: α : Type u
β : Type v
γ : Type w
a : α
as as1 as2 as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
head✝ : α
tail✝ : List α
h1 : length [] = length (head✝ :: tail✝)
x✝ : Equiv [] (head✝ :: tail✝)
⊢ [] = head✝ :: tail✝

tactic: congr
state_before: α : Type u
β : Type v
γ : Type w
a : α
as as1✝ as2✝ as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a1 : α
as1 : List α
a2 : α
as2 : List α
h1 : length (a1 :: as1) = length (a2 :: as2)
h2 : Equiv (a1 :: as1) (a2 :: as2)
⊢ a1 :: as1 = a2 :: as2

tactic: apply h2 0
state_before: case e_head
α : Type u
β : Type v
γ : Type w
a : α
as as1✝ as2✝ as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a1 : α
as1 : List α
a2 : α
as2 : List α
h1 : length (a1 :: as1) = length (a2 :: as2)
h2 : Equiv (a1 :: as1) (a2 :: as2)
⊢ a1 = a2

tactic: have h3 : as1.length = as2.length := by simpa [add_left_inj, add_comm, length] using h1
state_before: case e_tail
α : Type u
β : Type v
γ : Type w
a : α
as as1✝ as2✝ as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a1 : α
as1 : List α
a2 : α
as2 : List α
h1 : length (a1 :: as1) = length (a2 :: as2)
h2 : Equiv (a1 :: as1) (a2 :: as2)
⊢ as1 = as2

tactic: apply eq_of_equiv h3
state_before: case e_tail
α : Type u
β : Type v
γ : Type w
a : α
as as1✝ as2✝ as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a1 : α
as1 : List α
a2 : α
as2 : List α
h1 : length (a1 :: as1) = length (a2 :: as2)
h2 : Equiv (a1 :: as1) (a2 :: as2)
h3 : length as1 = length as2
⊢ as1 = as2

tactic: intro m
state_before: case e_tail
α : Type u
β : Type v
γ : Type w
a : α
as as1✝ as2✝ as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a1 : α
as1 : List α
a2 : α
as2 : List α
h1 : length (a1 :: as1) = length (a2 :: as2)
h2 : Equiv (a1 :: as1) (a2 :: as2)
h3 : length as1 = length as2
⊢ Equiv as1 as2

tactic: apply h2 (m + 1)
state_before: case e_tail
α : Type u
β : Type v
γ : Type w
a : α
as as1✝ as2✝ as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a1 : α
as1 : List α
a2 : α
as2 : List α
h1 : length (a1 :: as1) = length (a2 :: as2)
h2 : Equiv (a1 :: as1) (a2 :: as2)
h3 : length as1 = length as2
m : ℕ
⊢ get m as1 = get m as2

tactic: simpa [add_left_inj, add_comm, length] using h1
state_before: α : Type u
β : Type v
γ : Type w
a : α
as as1✝ as2✝ as3 : List α
inst✝¹ : Inhabited α
inst✝ : Inhabited β
a1 : α
as1 : List α
a2 : α
as2 : List α
h1 : length (a1 :: as1) = length (a2 :: as2)
h2 : Equiv (a1 :: as1) (a2 :: as2)
⊢ length as1 = length as2
Theorem: Complex.nat_cast_im
File: Mathlib/Data/Complex/Basic.lean

tactic: rw [← ofReal_nat_cast, ofReal_im]
state_before: n : ℕ
⊢ (↑n).im = 0
Theorem: CategoryTheory.Sieve.generate_of_contains_isSplitEpi
File: Mathlib/CategoryTheory/Sites/Sieves.lean

tactic: rw [← id_mem_iff_eq_top]
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
F : C ⥤ D
X Y Z : C
f✝ : Y ⟶ X
S R✝ : Sieve X
R : Presieve X
f : Y ⟶ X
inst✝ : IsSplitEpi f
hf : R f
⊢ generate R = ⊤

tactic: exact ⟨_, section_ f, f, hf, by simp⟩
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
F : C ⥤ D
X Y Z : C
f✝ : Y ⟶ X
S R✝ : Sieve X
R : Presieve X
f : Y ⟶ X
inst✝ : IsSplitEpi f
hf : R f
⊢ (generate R).arrows (𝟙 X)

tactic: simp
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
F : C ⥤ D
X Y Z : C
f✝ : Y ⟶ X
S R✝ : Sieve X
R : Presieve X
f : Y ⟶ X
inst✝ : IsSplitEpi f
hf : R f
⊢ section_ f ≫ f = 𝟙 X
Theorem: NormedAddGroupHom.le_of_opNorm_le
File: Mathlib/Analysis/Normed/Group/Hom.lean

tactic: gcongr
state_before: V : Type ?u.229529
V₁ : Type u_1
V₂ : Type u_2
V₃ : Type ?u.229538
inst✝³ : SeminormedAddCommGroup V
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f g : NormedAddGroupHom V₁ V₂
c : ℝ
h : ‖f‖ ≤ c
x : V₁
⊢ ‖f‖ * ‖x‖ ≤ c * ‖x‖
Theorem: Set.singleton_mem_subchain_iff
File: Mathlib/Order/Height.lean

tactic: simp [cons_mem_subchain_iff]
state_before: α : Type u_1
β : Type ?u.1018
inst✝¹ : LT α
inst✝ : LT β
s t : Set α
l : List α
a : α
⊢ [a] ∈ subchain s ↔ a ∈ s
Theorem: abs_le_one_iff_mul_self_le_one
File: Mathlib/Algebra/Order/Ring/Abs.lean

tactic: simpa only [abs_one, one_mul] using @abs_le_iff_mul_self_le α _ a 1
state_before: α : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
⊢ abs a ≤ 1 ↔ a * a ≤ 1
Theorem: List.prev_next
File: Mathlib/Data/List/Cycle.lean

tactic: obtain ⟨n, hn, rfl⟩ := nthLe_of_mem hx
state_before: α : Type u_1
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
l : List α
h : Nodup l
x : α
hx : x ∈ l
⊢ prev l (next l x hx) (_ : next l x hx ∈ l) = x

tactic: simp only [next_nthLe, prev_nthLe, h, Nat.mod_add_mod]
state_before: case intro.intro
α : Type u_1
inst✝ : DecidableEq α
l✝ : List α
x : α
l : List α
h : Nodup l
n : ℕ
hn : n < length l
hx : nthLe l n hn ∈ l
⊢ prev l (next l (nthLe l n hn) hx) (_ : next l (nthLe l n hn) hx ∈ l) = nthLe l n hn

tactic: cases' l with hd tl
state_before: case intro.intro
α : Type u_1
inst✝ : DecidableEq α
l✝ : List α
x : α
l : List α
h : Nodup l
n : ℕ
hn : n < length l
hx : nthLe l n hn ∈ l
⊢ nthLe l ((n + 1 + (length l - 1)) % length l) (_ : (n + 1 + (length l - 1)) % length l < length l) = nthLe l n hn

tactic: simp at hx
state_before: case intro.intro.nil
α : Type u_1
inst✝ : DecidableEq α
l : List α
x : α
n : ℕ
h : Nodup []
hn : n < length []
hx : nthLe [] n hn ∈ []
⊢ nthLe [] ((n + 1 + (length [] - 1)) % length []) (_ : (n + 1 + (length [] - 1)) % length [] < length []) =
    nthLe [] n hn

tactic: have : (n + 1 + length tl) % (length tl + 1) = n := by
  rw [length_cons] at hn
  rw [add_assoc, add_comm 1, Nat.add_mod_right, Nat.mod_eq_of_lt hn]
state_before: case intro.intro.cons
α : Type u_1
inst✝ : DecidableEq α
l : List α
x : α
n : ℕ
hd : α
tl : List α
h : Nodup (hd :: tl)
hn : n < length (hd :: tl)
hx : nthLe (hd :: tl) n hn ∈ hd :: tl
⊢ nthLe (hd :: tl) ((n + 1 + (length (hd :: tl) - 1)) % length (hd :: tl))
      (_ : (n + 1 + (length (hd :: tl) - 1)) % length (hd :: tl) < length (hd :: tl)) =
    nthLe (hd :: tl) n hn

tactic: simp only [length_cons, Nat.succ_sub_succ_eq_sub, tsub_zero, Nat.succ_eq_add_one, this]
state_before: case intro.intro.cons
α : Type u_1
inst✝ : DecidableEq α
l : List α
x : α
n : ℕ
hd : α
tl : List α
h : Nodup (hd :: tl)
hn : n < length (hd :: tl)
hx : nthLe (hd :: tl) n hn ∈ hd :: tl
this : (n + 1 + length tl) % (length tl + 1) = n
⊢ nthLe (hd :: tl) ((n + 1 + (length (hd :: tl) - 1)) % length (hd :: tl))
      (_ : (n + 1 + (length (hd :: tl) - 1)) % length (hd :: tl) < length (hd :: tl)) =
    nthLe (hd :: tl) n hn

tactic: rw [length_cons] at hn
state_before: α : Type u_1
inst✝ : DecidableEq α
l : List α
x : α
n : ℕ
hd : α
tl : List α
h : Nodup (hd :: tl)
hn : n < length (hd :: tl)
hx : nthLe (hd :: tl) n hn ∈ hd :: tl
⊢ (n + 1 + length tl) % (length tl + 1) = n

tactic: rw [add_assoc, add_comm 1, Nat.add_mod_right, Nat.mod_eq_of_lt hn]
state_before: α : Type u_1
inst✝ : DecidableEq α
l : List α
x : α
n : ℕ
hd : α
tl : List α
h : Nodup (hd :: tl)
hn✝ : n < length (hd :: tl)
hn : n < Nat.succ (length tl)
hx : nthLe (hd :: tl) n hn✝ ∈ hd :: tl
⊢ (n + 1 + length tl) % (length tl + 1) = n
Theorem: Left.one_le_pow_of_le
File: Mathlib/Algebra/GroupPower/Order.lean

tactic: rw [pow_succ]
state_before: β : Type ?u.46829
A : Type ?u.46832
G : Type ?u.46835
M : Type u_1
R : Type ?u.46841
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
hx : 1 ≤ x
n : ℕ
⊢ 1 ≤ x ^ (n + 1)

tactic: exact Left.one_le_mul hx <| Left.one_le_pow_of_le hx
state_before: β : Type ?u.46829
A : Type ?u.46832
G : Type ?u.46835
M : Type u_1
R : Type ?u.46841
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
hx : 1 ≤ x
n : ℕ
⊢ 1 ≤ x * x ^ n
Theorem: UpperSet.mem_iInf_iff
File: Mathlib/Order/UpperLower/Basic.lean

tactic: rw [← SetLike.mem_coe, coe_iInf]
state_before: α : Type u_1
β : Type ?u.59735
γ : Type ?u.59738
ι : Sort u_2
κ : ι → Sort ?u.59746
inst✝ : LE α
S : Set (UpperSet α)
s t : UpperSet α
a : α
f : ι → UpperSet α
⊢ (a ∈ ⨅ (i : ι), f i) ↔ ∃ i, a ∈ f i

tactic: exact mem_iUnion
state_before: α : Type u_1
β : Type ?u.59735
γ : Type ?u.59738
ι : Sort u_2
κ : ι → Sort ?u.59746
inst✝ : LE α
S : Set (UpperSet α)
s t : UpperSet α
a : α
f : ι → UpperSet α
⊢ (a ∈ ⋃ (i : ι), ↑(f i)) ↔ ∃ i, a ∈ f i
Theorem: Fin.Ioi_succ
File: Mathlib/Data/Fintype/Fin.lean

tactic: ext i
state_before: α : Type ?u.7053
β : Type ?u.7056
n : ℕ
i : Fin n
⊢ Ioi (succ i) = map (succEmbedding n).toEmbedding (Ioi i)

tactic: simp only [mem_filter, mem_Ioi, mem_map, mem_univ, true_and_iff, Function.Embedding.coeFn_mk,
  exists_true_left]
state_before: case a
α : Type ?u.7053
β : Type ?u.7056
n : ℕ
i✝ : Fin n
i : Fin (Nat.succ n)
⊢ i ∈ Ioi (succ i✝) ↔ i ∈ map (succEmbedding n).toEmbedding (Ioi i✝)

tactic: constructor
state_before: case a
α : Type ?u.7053
β : Type ?u.7056
n : ℕ
i✝ : Fin n
i : Fin (Nat.succ n)
⊢ succ i✝ < i ↔ ∃ a, i✝ < a ∧ ↑(succEmbedding n).toEmbedding a = i

tactic: refine' cases _ _ i
state_before: case a.mp
α : Type ?u.7053
β : Type ?u.7056
n : ℕ
i✝ : Fin n
i : Fin (Nat.succ n)
⊢ succ i✝ < i → ∃ a, i✝ < a ∧ ↑(succEmbedding n).toEmbedding a = i

tactic: rintro ⟨⟨⟩⟩
state_before: case a.mp.refine'_1
α : Type ?u.7053
β : Type ?u.7056
n : ℕ
i✝ : Fin n
i : Fin (Nat.succ n)
⊢ succ i✝ < 0 → ∃ a, i✝ < a ∧ ↑(succEmbedding n).toEmbedding a = 0

tactic: intro i hi
state_before: case a.mp.refine'_2
α : Type ?u.7053
β : Type ?u.7056
n : ℕ
i✝ : Fin n
i : Fin (Nat.succ n)
⊢ ∀ (i : Fin n), succ i✝ < succ i → ∃ a, i✝ < a ∧ ↑(succEmbedding n).toEmbedding a = succ i

tactic: refine' ⟨i, succ_lt_succ_iff.mp hi, rfl⟩
state_before: case a.mp.refine'_2
α : Type ?u.7053
β : Type ?u.7056
n : ℕ
i✝¹ : Fin n
i✝ : Fin (Nat.succ n)
i : Fin n
hi : succ i✝¹ < succ i
⊢ ∃ a, i✝¹ < a ∧ ↑(succEmbedding n).toEmbedding a = succ i

tactic: rintro ⟨i, hi, rfl⟩
state_before: case a.mpr
α : Type ?u.7053
β : Type ?u.7056
n : ℕ
i✝ : Fin n
i : Fin (Nat.succ n)
⊢ (∃ a, i✝ < a ∧ ↑(succEmbedding n).toEmbedding a = i) → succ i✝ < i

tactic: simpa
state_before: case a.mpr.intro.intro
α : Type ?u.7053
β : Type ?u.7056
n : ℕ
i✝ i : Fin n
hi : i✝ < i
⊢ succ i✝ < ↑(succEmbedding n).toEmbedding i
Theorem: Real.mk_le_of_forall_le
File: Mathlib/Data/Real/Basic.lean

tactic: cases' h with i H
state_before: x✝ y : ℝ
f : CauSeq ℚ abs
x : ℝ
h : ∃ i, ∀ (j : ℕ), j ≥ i → ↑(↑f j) ≤ x
⊢ mk f ≤ x

tactic: rw [← neg_le_neg_iff, ← mk_neg]
state_before: case intro
x✝ y : ℝ
f : CauSeq ℚ abs
x : ℝ
i : ℕ
H : ∀ (j : ℕ), j ≥ i → ↑(↑f j) ≤ x
⊢ mk f ≤ x

tactic: exact le_mk_of_forall_le ⟨i, fun j ij => by simp [H _ ij]⟩
state_before: case intro
x✝ y : ℝ
f : CauSeq ℚ abs
x : ℝ
i : ℕ
H : ∀ (j : ℕ), j ≥ i → ↑(↑f j) ≤ x
⊢ -x ≤ mk (-f)

tactic: simp [H _ ij]
state_before: x✝ y : ℝ
f : CauSeq ℚ abs
x : ℝ
i : ℕ
H : ∀ (j : ℕ), j ≥ i → ↑(↑f j) ≤ x
j : ℕ
ij : j ≥ i
⊢ -x ≤ ↑(↑(-f) j)
Theorem: Finset.Nonempty.zero_mul
File: Mathlib/Data/Finset/Pointwise.lean

tactic: simpa [mem_mul] using hs
state_before: F : Type ?u.599923
α : Type u_1
β : Type ?u.599929
γ : Type ?u.599932
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : MulZeroClass α
s t : Finset α
hs : Finset.Nonempty s
⊢ 0 ⊆ 0 * s
Theorem: MeasureTheory.Measure.map_mono
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: simp [hf.aemeasurable, hs, h _ (hf hs)]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.216218
δ : Type ?u.216221
ι : Type ?u.216224
R : Type ?u.216227
R' : Type ?u.216230
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f : α → β
h : μ ≤ ν
hf : Measurable f
s : Set β
hs : MeasurableSet s
⊢ ↑↑(map f μ) s ≤ ↑↑(map f ν) s
Theorem: Real.le_logb_iff_rpow_le_of_base_lt_one
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

tactic: rw [← rpow_le_rpow_left_iff_of_base_lt_one b_pos b_lt_one, rpow_logb b_pos (b_ne_one b_lt_one) hy]
state_before: b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hy : 0 < y
⊢ x ≤ logb b y ↔ y ≤ b ^ x
Theorem: AlgebraicTopology.DoldKan.QInfty_f_comp_PInfty_f
File: Mathlib/AlgebraicTopology/DoldKan/PInfty.lean

tactic: dsimp only [QInfty]
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
n : ℕ
⊢ HomologicalComplex.Hom.f QInfty n ≫ HomologicalComplex.Hom.f PInfty n = 0

tactic: simp only [HomologicalComplex.sub_f_apply, HomologicalComplex.id_f, sub_comp, id_comp,
  PInfty_f_idem, sub_self]
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
n : ℕ
⊢ HomologicalComplex.Hom.f (𝟙 K[X] - PInfty) n ≫ HomologicalComplex.Hom.f PInfty n = 0
Theorem: List.modifyHead_modifyHead
File: Mathlib/Data/List/Basic.lean

tactic: cases l <;> simp
state_before: ι : Type ?u.49303
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l : List α
f g : α → α
⊢ modifyHead g (modifyHead f l) = modifyHead (g ∘ f) l
Theorem: PowerSeries.coeff_X_pow_mul'
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: split_ifs with h
state_before: R : Type u_1
inst✝ : Semiring R
p : PowerSeries R
n d : ℕ
⊢ ↑(coeff R d) (X ^ n * p) = if n ≤ d then ↑(coeff R (d - n)) p else 0

tactic: rw [← tsub_add_cancel_of_le h, coeff_X_pow_mul]
state_before: case inl
R : Type u_1
inst✝ : Semiring R
p : PowerSeries R
n d : ℕ
h : n ≤ d
⊢ ↑(coeff R d) (X ^ n * p) = ↑(coeff R (d - n)) p

tactic: simp
state_before: case inl
R : Type u_1
inst✝ : Semiring R
p : PowerSeries R
n d : ℕ
h : n ≤ d
⊢ ↑(coeff R (d - n)) p = ↑(coeff R (d - n + n - n)) p

tactic: refine' (coeff_mul _ _ _).trans (Finset.sum_eq_zero fun x hx => _)
state_before: case inr
R : Type u_1
inst✝ : Semiring R
p : PowerSeries R
n d : ℕ
h : ¬n ≤ d
⊢ ↑(coeff R d) (X ^ n * p) = 0

tactic: rw [coeff_X_pow, if_neg, MulZeroClass.zero_mul]
state_before: case inr
R : Type u_1
inst✝ : Semiring R
p : PowerSeries R
n d : ℕ
h : ¬n ≤ d
x : ℕ × ℕ
hx : x ∈ Finset.Nat.antidiagonal d
⊢ ↑(coeff R x.fst) (X ^ n) * ↑(coeff R x.snd) p = 0

tactic: have := Finset.Nat.mem_antidiagonal.mp hx
state_before: case inr.hnc
R : Type u_1
inst✝ : Semiring R
p : PowerSeries R
n d : ℕ
h : ¬n ≤ d
x : ℕ × ℕ
hx : x ∈ Finset.Nat.antidiagonal d
⊢ ¬x.fst = n

tactic: rw [add_comm] at this
state_before: case inr.hnc
R : Type u_1
inst✝ : Semiring R
p : PowerSeries R
n d : ℕ
h : ¬n ≤ d
x : ℕ × ℕ
hx : x ∈ Finset.Nat.antidiagonal d
this : x.fst + x.snd = d
⊢ ¬x.fst = n

tactic: exact ((le_of_add_le_right this.le).trans_lt <| not_le.mp h).ne
state_before: case inr.hnc
R : Type u_1
inst✝ : Semiring R
p : PowerSeries R
n d : ℕ
h : ¬n ≤ d
x : ℕ × ℕ
hx : x ∈ Finset.Nat.antidiagonal d
this : x.snd + x.fst = d
⊢ ¬x.fst = n