tasksource/leandojo huggingface dataset:
Theorem: PowerSeries.coeff_mul_prod_one_sub_of_lt_order
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: induction' s using Finset.induction_on with a s ha ih t
state_before: R✝ : Type ?u.4226629
inst✝¹ : Semiring R✝
φ✝ : PowerSeries R✝
R : Type u_1
ι : Type u_2
inst✝ : CommRing R
k : ℕ
s : Finset ι
φ : PowerSeries R
f : ι → PowerSeries R
⊢ (∀ (i : ι), i ∈ s → ↑k < order (f i)) → ↑(coeff R k) (φ * ∏ i in s, (1 - f i)) = ↑(coeff R k) φ

tactic: simp
state_before: case empty
R✝ : Type ?u.4226629
inst✝¹ : Semiring R✝
φ✝ : PowerSeries R✝
R : Type u_1
ι : Type u_2
inst✝ : CommRing R
k : ℕ
φ : PowerSeries R
f : ι → PowerSeries R
⊢ (∀ (i : ι), i ∈ ∅ → ↑k < order (f i)) → ↑(coeff R k) (φ * ∏ i in ∅, (1 - f i)) = ↑(coeff R k) φ

tactic: intro t
state_before: case insert
R✝ : Type ?u.4226629
inst✝¹ : Semiring R✝
φ✝ : PowerSeries R✝
R : Type u_1
ι : Type u_2
inst✝ : CommRing R
k : ℕ
φ : PowerSeries R
f : ι → PowerSeries R
a : ι
s : Finset ι
ha : ¬a ∈ s
ih : (∀ (i : ι), i ∈ s → ↑k < order (f i)) → ↑(coeff R k) (φ * ∏ i in s, (1 - f i)) = ↑(coeff R k) φ
⊢ (∀ (i : ι), i ∈ insert a s → ↑k < order (f i)) → ↑(coeff R k) (φ * ∏ i in insert a s, (1 - f i)) = ↑(coeff R k) φ

tactic: simp only [Finset.mem_insert, forall_eq_or_imp] at t
state_before: case insert
R✝ : Type ?u.4226629
inst✝¹ : Semiring R✝
φ✝ : PowerSeries R✝
R : Type u_1
ι : Type u_2
inst✝ : CommRing R
k : ℕ
φ : PowerSeries R
f : ι → PowerSeries R
a : ι
s : Finset ι
ha : ¬a ∈ s
ih : (∀ (i : ι), i ∈ s → ↑k < order (f i)) → ↑(coeff R k) (φ * ∏ i in s, (1 - f i)) = ↑(coeff R k) φ
t : ∀ (i : ι), i ∈ insert a s → ↑k < order (f i)
⊢ ↑(coeff R k) (φ * ∏ i in insert a s, (1 - f i)) = ↑(coeff R k) φ

tactic: rw [Finset.prod_insert ha, ← mul_assoc, mul_right_comm, coeff_mul_one_sub_of_lt_order _ t.1]
state_before: case insert
R✝ : Type ?u.4226629
inst✝¹ : Semiring R✝
φ✝ : PowerSeries R✝
R : Type u_1
ι : Type u_2
inst✝ : CommRing R
k : ℕ
φ : PowerSeries R
f : ι → PowerSeries R
a : ι
s : Finset ι
ha : ¬a ∈ s
ih : (∀ (i : ι), i ∈ s → ↑k < order (f i)) → ↑(coeff R k) (φ * ∏ i in s, (1 - f i)) = ↑(coeff R k) φ
t : ↑k < order (f a) ∧ ∀ (a : ι), a ∈ s → ↑k < order (f a)
⊢ ↑(coeff R k) (φ * ∏ i in insert a s, (1 - f i)) = ↑(coeff R k) φ

tactic: exact ih t.2
state_before: case insert
R✝ : Type ?u.4226629
inst✝¹ : Semiring R✝
φ✝ : PowerSeries R✝
R : Type u_1
ι : Type u_2
inst✝ : CommRing R
k : ℕ
φ : PowerSeries R
f : ι → PowerSeries R
a : ι
s : Finset ι
ha : ¬a ∈ s
ih : (∀ (i : ι), i ∈ s → ↑k < order (f i)) → ↑(coeff R k) (φ * ∏ i in s, (1 - f i)) = ↑(coeff R k) φ
t : ↑k < order (f a) ∧ ∀ (a : ι), a ∈ s → ↑k < order (f a)
⊢ ↑(coeff R k) (φ * ∏ x in s, (1 - f x)) = ↑(coeff R k) φ
Theorem: Primrec.list_join
File: Mathlib/Computability/Primrec.lean

tactic: dsimp
state_before: α : Type u_1
β : Type ?u.314731
γ : Type ?u.314734
σ : Type ?u.314737
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
l : List (List α)
⊢ List.foldr (fun b s => (fun x x_1 => x ++ x_1) (l, b, s).snd.fst (l, b, s).snd.snd) [] (id l) = List.join l

tactic: induction l <;> simp [*]
state_before: α : Type u_1
β : Type ?u.314731
γ : Type ?u.314734
σ : Type ?u.314737
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
l : List (List α)
⊢ List.foldr (fun b s => b ++ s) [] l = List.join l
Theorem: Finset.strongDownwardInductionOn_eq
File: Mathlib/Data/Finset/Card.lean

tactic: dsimp only [strongDownwardInductionOn]
state_before: α : Type u_1
β : Type ?u.89625
s✝ t : Finset α
f : α → β
n : ℕ
p : Finset α → Sort u_2
s : Finset α
H : (t₁ : Finset α) → ({t₂ : Finset α} → card t₂ ≤ n → t₁ ⊂ t₂ → p t₂) → card t₁ ≤ n → p t₁
⊢ (fun a => strongDownwardInductionOn s H a) = H s fun {t} ht x => strongDownwardInductionOn t H ht

tactic: rw [strongDownwardInduction]
state_before: α : Type u_1
β : Type ?u.89625
s✝ t : Finset α
f : α → β
n : ℕ
p : Finset α → Sort u_2
s : Finset α
H : (t₁ : Finset α) → ({t₂ : Finset α} → card t₂ ≤ n → t₁ ⊂ t₂ → p t₂) → card t₁ ≤ n → p t₁
⊢ (fun a => strongDownwardInduction H s a) = H s fun {t} ht x => strongDownwardInduction H t ht
Theorem: Finset.erase_eq_empty_iff
File: Mathlib/Data/Finset/Basic.lean

tactic: rw [← sdiff_singleton_eq_erase, sdiff_eq_empty_iff_subset, subset_singleton_iff]
state_before: α : Type u_1
β : Type ?u.272209
γ : Type ?u.272212
inst✝ : DecidableEq α
s✝ t u v : Finset α
a✝ b : α
s : Finset α
a : α
⊢ erase s a = ∅ ↔ s = ∅ ∨ s = {a}
Theorem: EReal.bot_mul_of_neg
File: Mathlib/Data/Real/EReal.lean

tactic: rw [EReal.mul_comm]
state_before: x : EReal
h : x < 0
⊢ ⊥ * x = ⊤

tactic: exact mul_bot_of_neg h
state_before: x : EReal
h : x < 0
⊢ x * ⊥ = ⊤
Theorem: Filter.EventuallyLE.congr
File: Mathlib/Order/Filter/Basic.lean

tactic: rwa [hf, hg] at H
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.204158
ι : Sort x
inst✝ : LE β
l : Filter α
f f' g g' : α → β
H✝ : f ≤ᶠ[l] g
hf✝ : f =ᶠ[l] f'
hg✝ : g =ᶠ[l] g'
x : α
hf : f x = f' x
hg : g x = g' x
H : f x ≤ g x
⊢ f' x ≤ g' x
Theorem: Dfinsupp.neLocus_eq_support_sub
File: Mathlib/Data/Dfinsupp/NeLocus.lean

tactic: rw [← @neLocus_add_right α N _ _ _ _ _ (-g), add_right_neg, neLocus_zero_right, sub_eq_add_neg]
state_before: α : Type u_1
N : α → Type u_2
inst✝² : DecidableEq α
inst✝¹ : (a : α) → DecidableEq (N a)
inst✝ : (a : α) → AddGroup (N a)
f f₁ f₂ g g₁ g₂ : Π₀ (a : α), N a
⊢ neLocus f g = support (f - g)
Theorem: Memℓp.sub
File: Mathlib/Analysis/NormedSpace/lpSpace.lean

tactic: rw [sub_eq_add_neg]
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f g : (i : α) → E i
hf : Memℓp f p
hg : Memℓp g p
⊢ Memℓp (f - g) p

tactic: exact hf.add hg.neg
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
f g : (i : α) → E i
hf : Memℓp f p
hg : Memℓp g p
⊢ Memℓp (f + -g) p
Theorem: Finset.prod_le_one
File: Mathlib/Algebra/BigOperators/Order.lean

tactic: convert ← prod_le_prod h0 h1
state_before: ι : Type u_1
α : Type ?u.152557
β : Type ?u.152560
M : Type ?u.152563
N : Type ?u.152566
G : Type ?u.152569
k : Type ?u.152572
R : Type u_2
inst✝ : OrderedCommSemiring R
f g : ι → R
s t : Finset ι
h0 : ∀ (i : ι), i ∈ s → 0 ≤ f i
h1 : ∀ (i : ι), i ∈ s → f i ≤ 1
⊢ ∏ i in s, f i ≤ 1

tactic: exact Finset.prod_const_one
state_before: case h.e'_4
ι : Type u_1
α : Type ?u.152557
β : Type ?u.152560
M : Type ?u.152563
N : Type ?u.152566
G : Type ?u.152569
k : Type ?u.152572
R : Type u_2
inst✝ : OrderedCommSemiring R
f g : ι → R
s t : Finset ι
h0 : ∀ (i : ι), i ∈ s → 0 ≤ f i
h1 : ∀ (i : ι), i ∈ s → f i ≤ 1
⊢ ∏ i in s, 1 = 1
Theorem: Set.ite_empty_left
File: Mathlib/Data/Set/Basic.lean

tactic: simp [Set.ite]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t✝ t₁ t₂ u t s : Set α
⊢ Set.ite t ∅ s = s \ t
Theorem: Nat.mem_factors_mul_right
File: Mathlib/Data/Nat/Factors.lean

tactic: rw [mul_comm]
state_before: p a b : ℕ
hpb : p ∈ factors b
ha : a ≠ 0
⊢ p ∈ factors (a * b)

tactic: exact mem_factors_mul_left hpb ha
state_before: p a b : ℕ
hpb : p ∈ factors b
ha : a ≠ 0
⊢ p ∈ factors (b * a)
Theorem: Int.log_inv
File: Mathlib/Data/Int/Log.lean

tactic: rw [← inv_inv r, clog_inv, neg_neg, inv_inv]
state_before: R : Type u_1
inst✝¹ : LinearOrderedSemifield R
inst✝ : FloorSemiring R
b : ℕ
r : R
⊢ log b r⁻¹ = -clog b r
Theorem: List.mapIdx_cons
File: Mathlib/Data/List/Indexes.lean

tactic: simp [mapIdx_eq_enum_map, enum_eq_zip_range, map_uncurry_zip_eq_zipWith,
  range_succ_eq_map, zipWith_map_left]
state_before: α✝ : Type u
β✝ : Type v
α : Type u_1
β : Type u_2
l : List α
f : ℕ → α → β
a : α
⊢ mapIdx f (a :: l) = f 0 a :: mapIdx (fun i => f (i + 1)) l
Theorem: Int.add_right_neg
File: Std/Data/Int/Lemmas.lean

tactic: rw [Int.add_comm, Int.add_left_neg]
state_before: a : Int
⊢ a + -a = 0
Theorem: Mathlib.Tactic.Abel.unfold_sub
File: Mathlib/Tactic/Abel.lean

tactic: rw [sub_eq_add_neg, h]
state_before: α : Type u_1
inst✝ : SubtractionMonoid α
a b c : α
h : a + -b = c
⊢ a - b = c
Theorem: Int.lt_iff_le_and_ne
File: Std/Data/Int/Lemmas.lean

tactic: refine ⟨fun h => ⟨Int.le_of_lt h, Int.ne_of_lt h⟩, fun ⟨aleb, aneb⟩ => ?_⟩
state_before: a b : Int
⊢ a < b ↔ a ≤ b ∧ a ≠ b

tactic: let ⟨n, hn⟩ := le.dest aleb
state_before: a b : Int
x✝ : a ≤ b ∧ a ≠ b
aleb : a ≤ b
aneb : a ≠ b
⊢ a < b

tactic: have : n ≠ 0 := aneb.imp fun eq => by rw [← hn, eq, ofNat_zero, Int.add_zero]
state_before: a b : Int
x✝ : a ≤ b ∧ a ≠ b
aleb : a ≤ b
aneb : a ≠ b
n : Nat
hn : a + ↑n = b
⊢ a < b

tactic: apply lt.intro
state_before: a b : Int
x✝ : a ≤ b ∧ a ≠ b
aleb : a ≤ b
aneb : a ≠ b
n : Nat
hn : a + ↑n = b
this : n ≠ 0
⊢ a < b

tactic: rwa [← Nat.succ_pred_eq_of_pos (Nat.pos_of_ne_zero this)] at hn
state_before: case h
a b : Int
x✝ : a ≤ b ∧ a ≠ b
aleb : a ≤ b
aneb : a ≠ b
n : Nat
hn : a + ↑n = b
this : n ≠ 0
⊢ a + ↑(succ ?n) = b

case n
a b : Int
x✝ : a ≤ b ∧ a ≠ b
aleb : a ≤ b
aneb : a ≠ b
n : Nat
hn : a + ↑n = b
this : n ≠ 0
⊢ Nat

tactic: rw [← hn, eq, ofNat_zero, Int.add_zero]
state_before: a b : Int
x✝ : a ≤ b ∧ a ≠ b
aleb : a ≤ b
aneb : a ≠ b
n : Nat
hn : a + ↑n = b
eq : n = 0
⊢ a = b
Theorem: CategoryTheory.Limits.IsZero.of_mono_eq_zero
File: Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean

tactic: subst h
state_before: C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : Mono f
h : f = 0
⊢ IsZero X

tactic: apply of_mono_zero X Y
state_before: C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
X Y : C
inst✝ : Mono 0
⊢ IsZero X
Theorem: MvPolynomial.mkDerivationₗ_X
File: Mathlib/Data/MvPolynomial/Derivation.lean

tactic: simp
state_before: σ : Type u_2
R : Type u_3
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : AddCommMonoid A
inst✝¹ : Module R A
inst✝ : Module (MvPolynomial σ R) A
f : σ → A
i : σ
⊢ (1 •
      Finsupp.sum (Finsupp.single i 1) fun i_1 k =>
        ↑(monomial (Finsupp.single i 1 - Finsupp.single i_1 1)) ↑k • f i_1) =
    f i
Theorem: PNat.XgcdType.step_isSpecial
File: Mathlib/Data/PNat/Xgcd.lean

tactic: dsimp [IsSpecial, step] at hs⊢
state_before: u : XgcdType
hs : IsSpecial u
⊢ IsSpecial (step u)

tactic: rw [mul_add, mul_comm u.y u.x, ← hs]
state_before: u : XgcdType
hs : u.wp + u.zp + u.wp * u.zp = u.x * u.y
⊢ u.y * q u + u.zp + u.wp + (u.y * q u + u.zp) * u.wp = u.y * ((u.wp + 1) * q u + u.x)

tactic: ring
state_before: u : XgcdType
hs : u.wp + u.zp + u.wp * u.zp = u.x * u.y
⊢ u.y * q u + u.zp + u.wp + (u.y * q u + u.zp) * u.wp = u.y * ((u.wp + 1) * q u) + (u.wp + u.zp + u.wp * u.zp)
Theorem: CategoryTheory.Limits.biprod.isIso_inl_iff_id_eq_fst_comp_inl
File: Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean

tactic: constructor
state_before: J : Type w
C : Type u
inst✝² : Category C
inst✝¹ : HasZeroMorphisms C
P Q X Y : C
inst✝ : HasBinaryBiproduct X Y
⊢ IsIso inl ↔ 𝟙 (X ⊞ Y) = fst ≫ inl

tactic: intro h
state_before: case mp
J : Type w
C : Type u
inst✝² : Category C
inst✝¹ : HasZeroMorphisms C
P Q X Y : C
inst✝ : HasBinaryBiproduct X Y
⊢ IsIso inl → 𝟙 (X ⊞ Y) = fst ≫ inl

tactic: have := (cancel_epi (inv biprod.inl : X ⊞ Y ⟶ X)).2 <| @biprod.inl_fst _ _ _ X Y _
state_before: case mp
J : Type w
C : Type u
inst✝² : Category C
inst✝¹ : HasZeroMorphisms C
P Q X Y : C
inst✝ : HasBinaryBiproduct X Y
h : IsIso inl
⊢ 𝟙 (X ⊞ Y) = fst ≫ inl

tactic: rw [IsIso.inv_hom_id_assoc, Category.comp_id] at this
state_before: case mp
J : Type w
C : Type u
inst✝² : Category C
inst✝¹ : HasZeroMorphisms C
P Q X Y : C
inst✝ : HasBinaryBiproduct X Y
h : IsIso inl
this : inv inl ≫ inl ≫ fst = inv inl ≫ 𝟙 X
⊢ 𝟙 (X ⊞ Y) = fst ≫ inl

tactic: rw [this, IsIso.inv_hom_id]
state_before: case mp
J : Type w
C : Type u
inst✝² : Category C
inst✝¹ : HasZeroMorphisms C
P Q X Y : C
inst✝ : HasBinaryBiproduct X Y
h : IsIso inl
this : fst = inv inl
⊢ 𝟙 (X ⊞ Y) = fst ≫ inl

tactic: intro h
state_before: case mpr
J : Type w
C : Type u
inst✝² : Category C
inst✝¹ : HasZeroMorphisms C
P Q X Y : C
inst✝ : HasBinaryBiproduct X Y
⊢ 𝟙 (X ⊞ Y) = fst ≫ inl → IsIso inl

tactic: exact ⟨⟨biprod.fst, biprod.inl_fst, h.symm⟩⟩
state_before: case mpr
J : Type w
C : Type u
inst✝² : Category C
inst✝¹ : HasZeroMorphisms C
P Q X Y : C
inst✝ : HasBinaryBiproduct X Y
h : 𝟙 (X ⊞ Y) = fst ≫ inl
⊢ IsIso inl
Theorem: LieSubmodule.lie_bot
File: Mathlib/Algebra/Lie/IdealOperations.lean

tactic: rw [eq_bot_iff]
state_before: R : Type u
L : Type v
M : Type w
M₂ : 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 M₂
inst✝² : Module R M₂
inst✝¹ : LieRingModule L M₂
inst✝ : LieModule R L M₂
N N' : LieSubmodule R L M
I J : LieIdeal R L
N₂ : LieSubmodule R L M₂
⊢ ⁅I, ⊥⁆ = ⊥

tactic: apply lie_le_right
state_before: R : Type u
L : Type v
M : Type w
M₂ : 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 M₂
inst✝² : Module R M₂
inst✝¹ : LieRingModule L M₂
inst✝ : LieModule R L M₂
N N' : LieSubmodule R L M
I J : LieIdeal R L
N₂ : LieSubmodule R L M₂
⊢ ∀ (m : M), m ∈ ⁅I, ⊥⁆ → m = 0
Theorem: Finsupp.multiset_sum_sum_index
File: Mathlib/Algebra/BigOperators/Finsupp.lean

tactic: rw [Multiset.sum_cons, Multiset.map_cons, Multiset.sum_cons, sum_add_index' h₀ h₁, ih]
state_before: α : Type u_3
ι : Type ?u.559428
γ : Type ?u.559431
A : Type ?u.559434
B : Type ?u.559437
C : Type ?u.559440
inst✝⁴ : AddCommMonoid A
inst✝³ : AddCommMonoid B
inst✝² : AddCommMonoid C
t : ι → A → C
h0 : ∀ (i : ι), t i 0 = 0
h1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y
s✝ : Finset α
f✝ : α → ι →₀ A
i : ι
g : ι →₀ A
k : ι → A → γ → B
x : γ
β : Type ?u.562570
M : Type u_1
M' : Type ?u.562576
N : Type u_2
P : Type ?u.562582
G : Type ?u.562585
H : Type ?u.562588
R : Type ?u.562591
S : Type ?u.562594
inst✝¹ : AddCommMonoid M
inst✝ : AddCommMonoid N
f : Multiset (α →₀ M)
h : α → M → N
h₀ : ∀ (a : α), h a 0 = 0
h₁ : ∀ (a : α) (b₁ b₂ : M), h a (b₁ + b₂) = h a b₁ + h a b₂
a : α →₀ M
s : Multiset (α →₀ M)
ih : sum (Multiset.sum s) h = Multiset.sum (Multiset.map (fun g => sum g h) s)
⊢ sum (Multiset.sum (a ::ₘ s)) h = Multiset.sum (Multiset.map (fun g => sum g h) (a ::ₘ s))
Theorem: Multiset.toDfinsupp_replicate
File: Mathlib/Data/Dfinsupp/Multiset.lean

tactic: ext i
state_before: α : Type u_1
β : α → Type ?u.32641
inst✝ : DecidableEq α
a : α
n : ℕ
⊢ ↑toDfinsupp (replicate n a) = Dfinsupp.single a n

tactic: dsimp [toDfinsupp]
state_before: case h
α : Type u_1
β : α → Type ?u.32641
inst✝ : DecidableEq α
a : α
n : ℕ
i : α
⊢ ↑(↑toDfinsupp (replicate n a)) i = ↑(Dfinsupp.single a n) i

tactic: simp [count_replicate, eq_comm]
state_before: case h
α : Type u_1
β : α → Type ?u.32641
inst✝ : DecidableEq α
a : α
n : ℕ
i : α
⊢ count i (replicate n a) = ↑(Dfinsupp.single a n) i
Theorem: Array.getElem_map
File: Std/Data/Array/Init/Lemmas.lean

tactic: have := SatisfiesM_mapM' (m := Id) arr f (fun i b => b = f (arr[i]))
state_before: α : Type u_1
β : Type u_2
f : α → β
arr : Array α
i : Nat
h : i < size (map f arr)
⊢ (map f arr)[i] = f arr[i]

tactic: simp [SatisfiesM_Id_eq] at this
state_before: α : Type u_1
β : Type u_2
f : α → β
arr : Array α
i : Nat
h : i < size (map f arr)
this :
  (∀ (i : Fin (size arr)), SatisfiesM (fun b => b = f arr[i]) (f arr[i])) →
    SatisfiesM (fun arr_1 => ∃ eq, ∀ (i : Nat) (h : i < size arr), arr_1[i] = f arr[{ val := i, isLt := h }])
      (mapM f arr)
⊢ (map f arr)[i] = f arr[i]

tactic: exact this.2 i (size_map .. ▸ h)
state_before: α : Type u_1
β : Type u_2
f : α → β
arr : Array α
i : Nat
h : i < size (map f arr)
this : ∃ eq, ∀ (i : Nat) (h : i < size arr), (mapM f arr)[i] = f arr[{ val := i, isLt := h }]
⊢ (map f arr)[i] = f arr[i]
Theorem: List.cyclicPermutations_eq_singleton_iff
File: Mathlib/Data/List/Rotate.lean

tactic: refine' ⟨fun h => _, fun h => by simp [cyclicPermutations, h, dropLast_eq_take]⟩
state_before: α : Type u
l✝ l' l : List α
x : α
⊢ cyclicPermutations l = [[x]] ↔ l = [x]

tactic: rw [eq_comm, ← isRotated_singleton_iff', ← mem_cyclicPermutations_iff, h, mem_singleton]
state_before: α : Type u
l✝ l' l : List α
x : α
h : cyclicPermutations l = [[x]]
⊢ l = [x]

tactic: simp [cyclicPermutations, h, dropLast_eq_take]
state_before: α : Type u
l✝ l' l : List α
x : α
h : l = [x]
⊢ cyclicPermutations l = [[x]]
Theorem: IsPrimitiveRoot.isUnit
File: Mathlib/RingTheory/RootsOfUnity/Basic.lean

tactic: apply isUnit_of_mul_eq_one ζ (ζ ^ (k - 1))
state_before: M : Type u_1
N : Type ?u.1712947
G : Type ?u.1712950
R : Type ?u.1712953
S : Type ?u.1712956
F : Type ?u.1712959
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h✝ h : IsPrimitiveRoot ζ k
h0 : 0 < k
⊢ IsUnit ζ

tactic: rw [← pow_succ, tsub_add_cancel_of_le h0.nat_succ_le, h.pow_eq_one]
state_before: M : Type u_1
N : Type ?u.1712947
G : Type ?u.1712950
R : Type ?u.1712953
S : Type ?u.1712956
F : Type ?u.1712959
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h✝ h : IsPrimitiveRoot ζ k
h0 : 0 < k
⊢ ζ * ζ ^ (k - 1) = 1
Theorem: pow_le_one_iff_of_nonneg
File: Mathlib/Algebra/GroupPower/Order.lean

tactic: refine' ⟨_, pow_le_one n ha⟩
state_before: β : Type ?u.237030
A : Type ?u.237033
G : Type ?u.237036
M : Type ?u.237039
R : Type u_1
inst✝ : LinearOrderedSemiring R
a✝ b a : R
ha : 0 ≤ a
n : ℕ
hn : n ≠ 0
⊢ a ^ n ≤ 1 ↔ a ≤ 1

tactic: rw [← not_lt, ← not_lt]
state_before: β : Type ?u.237030
A : Type ?u.237033
G : Type ?u.237036
M : Type ?u.237039
R : Type u_1
inst✝ : LinearOrderedSemiring R
a✝ b a : R
ha : 0 ≤ a
n : ℕ
hn : n ≠ 0
⊢ a ^ n ≤ 1 → a ≤ 1

tactic: exact mt fun h => one_lt_pow h hn
state_before: β : Type ?u.237030
A : Type ?u.237033
G : Type ?u.237036
M : Type ?u.237039
R : Type u_1
inst✝ : LinearOrderedSemiring R
a✝ b a : R
ha : 0 ≤ a
n : ℕ
hn : n ≠ 0
⊢ ¬1 < a ^ n → ¬1 < a
Theorem: Ordinal.type_ne_zero_iff_nonempty
File: Mathlib/SetTheory/Ordinal/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.25081
γ : Type ?u.25084
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
inst✝ : IsWellOrder α r
⊢ type r ≠ 0 ↔ Nonempty α
Theorem: Multiset.map_congr
File: Mathlib/Data/Multiset/Basic.lean

tactic: rintro rfl h
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.111985
f g : α → β
s t : Multiset α
⊢ s = t → (∀ (x : α), x ∈ t → f x = g x) → map f s = map g t

tactic: induction s using Quot.inductionOn
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.111985
f g : α → β
s : Multiset α
h : ∀ (x : α), x ∈ s → f x = g x
⊢ map f s = map g s

tactic: exact congr_arg _ (List.map_congr h)
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.111985
f g : α → β
a✝ : List α
h : ∀ (x : α), x ∈ Quot.mk Setoid.r a✝ → f x = g x
⊢ map f (Quot.mk Setoid.r a✝) = map g (Quot.mk Setoid.r a✝)
Theorem: SimpleGraph.Walk.length_takeUntil_le
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: have := congr_arg Walk.length (p.take_spec h)
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v w : V
p : Walk G v w
h : u ∈ support p
⊢ length (takeUntil p u h) ≤ length p

tactic: rw [length_append] at this
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v w : V
p : Walk G v w
h : u ∈ support p
this : length (append (takeUntil p u h) (dropUntil p u h)) = length p
⊢ length (takeUntil p u h) ≤ length p

tactic: exact Nat.le.intro this
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v w : V
p : Walk G v w
h : u ∈ support p
this : length (takeUntil p u h) + length (dropUntil p u h) = length p
⊢ length (takeUntil p u h) ≤ length p
Theorem: CategoryTheory.finitaryExtensive_of_preserves_and_reflects_isomorphism
File: Mathlib/CategoryTheory/Extensive.lean

tactic: haveI : ReflectsLimitsOfShape WalkingCospan F := reflectsLimitsOfShapeOfReflectsIsomorphisms
state_before: J : Type v'
inst✝⁸ : Category J
C : Type u
inst✝⁷ : Category C
X Y : C
D : Type u''
inst✝⁶ : Category D
F : C ⥤ D
inst✝⁵ : FinitaryExtensive D
inst✝⁴ : HasFiniteCoproducts C
inst✝³ : HasPullbacks C
inst✝² : PreservesLimitsOfShape WalkingCospan F
inst✝¹ : PreservesColimitsOfShape (Discrete WalkingPair) F
inst✝ : ReflectsIsomorphisms F
⊢ FinitaryExtensive C

tactic: haveI : ReflectsColimitsOfShape (Discrete WalkingPair) F :=
  reflectsColimitsOfShapeOfReflectsIsomorphisms
state_before: J : Type v'
inst✝⁸ : Category J
C : Type u
inst✝⁷ : Category C
X Y : C
D : Type u''
inst✝⁶ : Category D
F : C ⥤ D
inst✝⁵ : FinitaryExtensive D
inst✝⁴ : HasFiniteCoproducts C
inst✝³ : HasPullbacks C
inst✝² : PreservesLimitsOfShape WalkingCospan F
inst✝¹ : PreservesColimitsOfShape (Discrete WalkingPair) F
inst✝ : ReflectsIsomorphisms F
this : ReflectsLimitsOfShape WalkingCospan F
⊢ FinitaryExtensive C

tactic: exact finitaryExtensive_of_preserves_and_reflects F
state_before: J : Type v'
inst✝⁸ : Category J
C : Type u
inst✝⁷ : Category C
X Y : C
D : Type u''
inst✝⁶ : Category D
F : C ⥤ D
inst✝⁵ : FinitaryExtensive D
inst✝⁴ : HasFiniteCoproducts C
inst✝³ : HasPullbacks C
inst✝² : PreservesLimitsOfShape WalkingCospan F
inst✝¹ : PreservesColimitsOfShape (Discrete WalkingPair) F
inst✝ : ReflectsIsomorphisms F
this✝ : ReflectsLimitsOfShape WalkingCospan F
this : ReflectsColimitsOfShape (Discrete WalkingPair) F
⊢ FinitaryExtensive C
Theorem: inf_sup_self
File: Mathlib/Order/Lattice.lean

tactic: simp
state_before: α : Type u
β : Type v
inst✝ : Lattice α
a b c d : α
⊢ a ⊓ (a ⊔ b) = a
Theorem: Finite.Set.subset
File: Mathlib/Data/Set/Finite.lean

tactic: rw [← sep_eq_of_subset h]
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s t : Set α
inst✝ : Finite ↑s
h : t ⊆ s
⊢ Finite ↑t

tactic: infer_instance
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s t : Set α
inst✝ : Finite ↑s
h : t ⊆ s
⊢ Finite ↑{x | x ∈ s ∧ x ∈ t}
Theorem: PGame.lf_zero
File: Mathlib/SetTheory/Game/PGame.lean

tactic: rw [lf_def]
state_before: x : PGame
⊢ x ⧏ 0 ↔ ∃ j, ∀ (i : LeftMoves (moveRight x j)), moveLeft (moveRight x j) i ⧏ 0

tactic: simp
state_before: x : PGame
⊢ ((∃ i,
        (∀ (i' : LeftMoves x), moveLeft x i' ⧏ moveLeft 0 i) ∧
          ∀ (j : RightMoves (moveLeft 0 i)), x ⧏ moveRight (moveLeft 0 i) j) ∨
      ∃ j,
        (∀ (i : LeftMoves (moveRight x j)), moveLeft (moveRight x j) i ⧏ 0) ∧
          ∀ (j' : RightMoves 0), moveRight x j ⧏ moveRight 0 j') ↔
    ∃ j, ∀ (i : LeftMoves (moveRight x j)), moveLeft (moveRight x j) i ⧏ 0
Theorem: Dfinsupp.neLocus_self_sub_right
File: Mathlib/Data/Dfinsupp/NeLocus.lean

tactic: rw [sub_eq_add_neg, neLocus_self_add_right, support_neg]
state_before: α : Type u_1
N : α → Type u_2
inst✝² : DecidableEq α
inst✝¹ : (a : α) → DecidableEq (N a)
inst✝ : (a : α) → AddGroup (N a)
f f₁ f₂ g g₁ g₂ : Π₀ (a : α), N a
⊢ neLocus f (f - g) = support g
Theorem: Substring.Valid.data_takeWhile
File: Std/Data/String/Lemmas.lean

tactic: simp [(h.takeWhile _).toString, h.toString]
state_before: p : Char → Bool
x✝ : Substring
h✝ : Valid x✝
w✝² w✝¹ w✝ : List Char
h : ValidFor w✝² w✝¹ w✝ x✝
⊢ (toString (Substring.takeWhile x✝ p)).data = List.takeWhile p (toString x✝).data
Theorem: sdiff_eq_self_iff_disjoint'
File: Mathlib/Order/BooleanAlgebra.lean

tactic: rw [sdiff_eq_self_iff_disjoint, disjoint_comm]
state_before: α : Type u
β : Type ?u.20985
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ x \ y = x ↔ Disjoint x y
Theorem: ENNReal.zero_rpow_of_neg
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: rw [← ENNReal.coe_zero, ← ENNReal.some_eq_coe]
state_before: y : ℝ
h : y < 0
⊢ 0 ^ y = ⊤

tactic: simp [h, ne_of_gt h]
state_before: y : ℝ
h : y < 0
⊢ (if 0 = 0 ∧ y < 0 then ⊤ else ↑(NNReal.rpow 0 y)) = ⊤
Theorem: IsROrC.normSq_to_real
File: Mathlib/Data/IsROrC/Basic.lean

tactic: simp [IsROrC.normSq]
state_before: K : Type ?u.7355735
E : Type ?u.7355738
inst✝ : IsROrC K
x : ℝ
⊢ ↑normSq x = x * x
Theorem: SimpleGraph.singletonFinsubgraph_le_adj_right
File: Mathlib/Combinatorics/SimpleGraph/Finsubgraph.lean

tactic: simp [singletonFinsubgraph, finsubgraphOfAdj]
state_before: V : Type u
W : Type v
G : SimpleGraph V
F : SimpleGraph W
u v : V
e : Adj G u v
⊢ singletonFinsubgraph v ≤ finsubgraphOfAdj e