tasksource/leandojo huggingface dataset:
Theorem: List.lookmap_map_eq
File: Mathlib/Data/List/Basic.lean

tactic: cases' h' : f a with b
state_before: ι : Type ?u.345717
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → Option α
g : α → β
h : ∀ (a b : α), b ∈ f a → g a = g b
a : α
l : List α
⊢ map g (lookmap f (a :: l)) = map g (a :: l)

tactic: simp [h']
state_before: case none
ι : Type ?u.345717
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → Option α
g : α → β
h : ∀ (a b : α), b ∈ f a → g a = g b
a : α
l : List α
h' : f a = none
⊢ map g (lookmap f (a :: l)) = map g (a :: l)

tactic: exact lookmap_map_eq _ h l
state_before: case none
ι : Type ?u.345717
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → Option α
g : α → β
h : ∀ (a b : α), b ∈ f a → g a = g b
a : α
l : List α
h' : f a = none
⊢ map g (lookmap f l) = map g l

tactic: simp [lookmap_cons_some _ _ h', h _ _ h']
state_before: case some
ι : Type ?u.345717
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → Option α
g : α → β
h : ∀ (a b : α), b ∈ f a → g a = g b
a : α
l : List α
b : α
h' : f a = some b
⊢ map g (lookmap f (a :: l)) = map g (a :: l)
Theorem: Associated.of_pow_associated_of_prime
File: Mathlib/Algebra/Associated.lean

tactic: have : p₁ ∣ p₂ ^ k₂ := by
  rw [← h.dvd_iff_dvd_right]
  apply dvd_pow_self _ hk₁.ne'
state_before: α : Type u_1
β : Type ?u.233071
γ : Type ?u.233074
δ : Type ?u.233077
inst✝ : CancelCommMonoidWithZero α
p₁ p₂ : α
k₁ k₂ : ℕ
hp₁ : Prime p₁
hp₂ : Prime p₂
hk₁ : 0 < k₁
h : p₁ ^ k₁ ~ᵤ p₂ ^ k₂
⊢ p₁ ~ᵤ p₂

tactic: rw [← hp₁.dvd_prime_iff_associated hp₂]
state_before: α : Type u_1
β : Type ?u.233071
γ : Type ?u.233074
δ : Type ?u.233077
inst✝ : CancelCommMonoidWithZero α
p₁ p₂ : α
k₁ k₂ : ℕ
hp₁ : Prime p₁
hp₂ : Prime p₂
hk₁ : 0 < k₁
h : p₁ ^ k₁ ~ᵤ p₂ ^ k₂
this : p₁ ∣ p₂ ^ k₂
⊢ p₁ ~ᵤ p₂

tactic: exact hp₁.dvd_of_dvd_pow this
state_before: α : Type u_1
β : Type ?u.233071
γ : Type ?u.233074
δ : Type ?u.233077
inst✝ : CancelCommMonoidWithZero α
p₁ p₂ : α
k₁ k₂ : ℕ
hp₁ : Prime p₁
hp₂ : Prime p₂
hk₁ : 0 < k₁
h : p₁ ^ k₁ ~ᵤ p₂ ^ k₂
this : p₁ ∣ p₂ ^ k₂
⊢ p₁ ∣ p₂

tactic: rw [← h.dvd_iff_dvd_right]
state_before: α : Type u_1
β : Type ?u.233071
γ : Type ?u.233074
δ : Type ?u.233077
inst✝ : CancelCommMonoidWithZero α
p₁ p₂ : α
k₁ k₂ : ℕ
hp₁ : Prime p₁
hp₂ : Prime p₂
hk₁ : 0 < k₁
h : p₁ ^ k₁ ~ᵤ p₂ ^ k₂
⊢ p₁ ∣ p₂ ^ k₂

tactic: apply dvd_pow_self _ hk₁.ne'
state_before: α : Type u_1
β : Type ?u.233071
γ : Type ?u.233074
δ : Type ?u.233077
inst✝ : CancelCommMonoidWithZero α
p₁ p₂ : α
k₁ k₂ : ℕ
hp₁ : Prime p₁
hp₂ : Prime p₂
hk₁ : 0 < k₁
h : p₁ ^ k₁ ~ᵤ p₂ ^ k₂
⊢ p₁ ∣ p₁ ^ k₁
Theorem: Polynomial.support_scaleRoots_le
File: Mathlib/RingTheory/Polynomial/ScaleRoots.lean

tactic: intro
state_before: A : Type ?u.27089
K : Type ?u.27092
R : Type u_1
S : Type ?u.27098
inst✝⁴ : CommRing A
inst✝³ : IsDomain A
inst✝² : Field K
inst✝¹ : CommRing R
inst✝ : CommRing S
M : Submonoid A
p : R[X]
s : R
⊢ support (scaleRoots p s) ≤ support p

tactic: simpa using left_ne_zero_of_mul
state_before: A : Type ?u.27089
K : Type ?u.27092
R : Type u_1
S : Type ?u.27098
inst✝⁴ : CommRing A
inst✝³ : IsDomain A
inst✝² : Field K
inst✝¹ : CommRing R
inst✝ : CommRing S
M : Submonoid A
p : R[X]
s : R
a✝ : ℕ
⊢ a✝ ∈ support (scaleRoots p s) → a✝ ∈ support p
Theorem: Real.pow_nat_rpow_nat_inv
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: have hn0 : (n : ℝ) ≠ 0 := Nat.cast_ne_zero.2 hn
state_before: x✝ y z x : ℝ
hx : 0 ≤ x
n : ℕ
hn : n ≠ 0
⊢ (x ^ n) ^ (↑n)⁻¹ = x

tactic: rw [← rpow_nat_cast, ← rpow_mul hx, mul_inv_cancel hn0, rpow_one]
state_before: x✝ y z x : ℝ
hx : 0 ≤ x
n : ℕ
hn : n ≠ 0
hn0 : ↑n ≠ 0
⊢ (x ^ n) ^ (↑n)⁻¹ = x
Theorem: uniqueDiffOn_Ioc
File: Mathlib/Analysis/Calculus/TangentCone.lean

tactic: simp only [interior_Ioc, nonempty_Ioo, hab]
state_before: 𝕜 : Type ?u.182740
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type ?u.182746
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type ?u.182841
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
G : Type ?u.182931
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
x y : E
s t : Set E
a b : ℝ
hab : a < b
⊢ Set.Nonempty (interior (Ioc a b))

tactic: simp only [Ioc_eq_empty hab, uniqueDiffOn_empty]
state_before: 𝕜 : Type ?u.182740
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type ?u.182746
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type ?u.182841
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
G : Type ?u.182931
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
x y : E
s t : Set E
a b : ℝ
hab : ¬a < b
⊢ UniqueDiffOn ℝ (Ioc a b)
Theorem: List.lookmap_congr
File: Mathlib/Data/List/Basic.lean

tactic: cases' forall_mem_cons.1 H with H₁ H₂
state_before: ι : Type ?u.344295
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f✝ f g : α → Option α
a : α
l : List α
H : ∀ (a_1 : α), a_1 ∈ a :: l → f a_1 = g a_1
⊢ lookmap f (a :: l) = lookmap g (a :: l)

tactic: cases' h : g a with b
state_before: case intro
ι : Type ?u.344295
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f✝ f g : α → Option α
a : α
l : List α
H : ∀ (a_1 : α), a_1 ∈ a :: l → f a_1 = g a_1
H₁ : f a = g a
H₂ : ∀ (x : α), x ∈ l → f x = g x
⊢ lookmap f (a :: l) = lookmap g (a :: l)

tactic: simp [h, H₁.trans h, lookmap_congr H₂]
state_before: case intro.none
ι : Type ?u.344295
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f✝ f g : α → Option α
a : α
l : List α
H : ∀ (a_1 : α), a_1 ∈ a :: l → f a_1 = g a_1
H₁ : f a = g a
H₂ : ∀ (x : α), x ∈ l → f x = g x
h : g a = none
⊢ lookmap f (a :: l) = lookmap g (a :: l)

tactic: simp [lookmap_cons_some _ _ h, lookmap_cons_some _ _ (H₁.trans h)]
state_before: case intro.some
ι : Type ?u.344295
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f✝ f g : α → Option α
a : α
l : List α
H : ∀ (a_1 : α), a_1 ∈ a :: l → f a_1 = g a_1
H₁ : f a = g a
H₂ : ∀ (x : α), x ∈ l → f x = g x
b : α
h : g a = some b
⊢ lookmap f (a :: l) = lookmap g (a :: l)
Theorem: Set.singleton_prod
File: Mathlib/Data/Set/Prod.lean

tactic: ext ⟨x, y⟩
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.8218
δ : Type ?u.8221
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
⊢ {a} ×ˢ t = Prod.mk a '' t

tactic: simp [and_left_comm, eq_comm]
state_before: case h.mk
α : Type u_1
β : Type u_2
γ : Type ?u.8218
δ : Type ?u.8221
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
x : α
y : β
⊢ (x, y) ∈ {a} ×ˢ t ↔ (x, y) ∈ Prod.mk a '' t
Theorem: MeasurableEmbedding.comap_apply
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [hf.injective.preimage_image]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.1014989
δ : Type ?u.1014992
ι : Type ?u.1014995
R : Type ?u.1014998
R' : Type ?u.1015001
m0 : MeasurableSpace α
m1 : MeasurableSpace β
f : α → β
hf : MeasurableEmbedding f
μ : MeasureTheory.Measure β
s : Set α
⊢ ↑↑(Measure.comap f μ) s = ↑↑(Measure.comap f μ) (f ⁻¹' (f '' s))

tactic: rw [hf.map_comap, restrict_apply' hf.measurableSet_range,
  inter_eq_self_of_subset_left (image_subset_range _ _)]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.1014989
δ : Type ?u.1014992
ι : Type ?u.1014995
R : Type ?u.1014998
R' : Type ?u.1015001
m0 : MeasurableSpace α
m1 : MeasurableSpace β
f : α → β
hf : MeasurableEmbedding f
μ : MeasureTheory.Measure β
s : Set α
⊢ ↑↑(Measure.map f (Measure.comap f μ)) (f '' s) = ↑↑μ (f '' s)
Theorem: Subgroup.characteristic_iff_map_eq
File: Mathlib/GroupTheory/Subgroup/Basic.lean

tactic: simp_rw [map_equiv_eq_comap_symm]
state_before: G : Type u_1
G' : Type ?u.351493
inst✝² : Group G
inst✝¹ : Group G'
A : Type ?u.351502
inst✝ : AddGroup A
H K : Subgroup G
⊢ Characteristic H ↔ ∀ (ϕ : G ≃* G), map (MulEquiv.toMonoidHom ϕ) H = H

tactic: exact characteristic_iff_comap_eq.trans ⟨fun h ϕ => h ϕ.symm, fun h ϕ => h ϕ.symm⟩
state_before: G : Type u_1
G' : Type ?u.351493
inst✝² : Group G
inst✝¹ : Group G'
A : Type ?u.351502
inst✝ : AddGroup A
H K : Subgroup G
⊢ Characteristic H ↔ ∀ (ϕ : G ≃* G), comap (MulEquiv.toMonoidHom (MulEquiv.symm ϕ)) H = H
Theorem: WithTop.coe_le_coe
File: Mathlib/Order/WithBot.lean

tactic: simp only [← toDual_le_toDual_iff, toDual_apply_coe, WithBot.coe_le_coe, toDual_le_toDual]
state_before: α : Type u_1
β : Type ?u.72707
γ : Type ?u.72710
δ : Type ?u.72713
a b : α
inst✝ : LE α
⊢ ↑a ≤ ↑b ↔ a ≤ b
Theorem: Set.ordConnected_of_Ioo
File: Mathlib/Data/Set/Intervals/OrdConnected.lean

tactic: rw [ordConnected_iff]
state_before: α✝ : Type ?u.935
β : Type ?u.938
inst✝² : Preorder α✝
inst✝¹ : Preorder β
s✝ t : Set α✝
α : Type u_1
inst✝ : PartialOrder α
s : Set α
hs : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x < y → Ioo x y ⊆ s
⊢ OrdConnected s

tactic: intro x hx y hy hxy
state_before: α✝ : Type ?u.935
β : Type ?u.938
inst✝² : Preorder α✝
inst✝¹ : Preorder β
s✝ t : Set α✝
α : Type u_1
inst✝ : PartialOrder α
s : Set α
hs : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x < y → Ioo x y ⊆ s
⊢ ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x ≤ y → Icc x y ⊆ s

tactic: rcases eq_or_lt_of_le hxy with (rfl | hxy')
state_before: α✝ : Type ?u.935
β : Type ?u.938
inst✝² : Preorder α✝
inst✝¹ : Preorder β
s✝ t : Set α✝
α : Type u_1
inst✝ : PartialOrder α
s : Set α
hs : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x < y → Ioo x y ⊆ s
x : α
hx : x ∈ s
y : α
hy : y ∈ s
hxy : x ≤ y
⊢ Icc x y ⊆ s

tactic: rw [← Ioc_insert_left hxy, ← Ioo_insert_right hxy']
state_before: case inr
α✝ : Type ?u.935
β : Type ?u.938
inst✝² : Preorder α✝
inst✝¹ : Preorder β
s✝ t : Set α✝
α : Type u_1
inst✝ : PartialOrder α
s : Set α
hs : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x < y → Ioo x y ⊆ s
x : α
hx : x ∈ s
y : α
hy : y ∈ s
hxy : x ≤ y
hxy' : x < y
⊢ Icc x y ⊆ s

tactic: exact insert_subset.2 ⟨hx, insert_subset.2 ⟨hy, hs x hx y hy hxy'⟩⟩
state_before: case inr
α✝ : Type ?u.935
β : Type ?u.938
inst✝² : Preorder α✝
inst✝¹ : Preorder β
s✝ t : Set α✝
α : Type u_1
inst✝ : PartialOrder α
s : Set α
hs : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x < y → Ioo x y ⊆ s
x : α
hx : x ∈ s
y : α
hy : y ∈ s
hxy : x ≤ y
hxy' : x < y
⊢ insert x (insert y (Ioo x y)) ⊆ s

tactic: simpa
state_before: case inl
α✝ : Type ?u.935
β : Type ?u.938
inst✝² : Preorder α✝
inst✝¹ : Preorder β
s✝ t : Set α✝
α : Type u_1
inst✝ : PartialOrder α
s : Set α
hs : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → x < y → Ioo x y ⊆ s
x : α
hx hy : x ∈ s
hxy : x ≤ x
⊢ Icc x x ⊆ s
Theorem: Nat.ne_one_iff_exists_prime_dvd
File: Mathlib/Data/Nat/Prime.lean

tactic: simpa using Exists.intro 2 Nat.prime_two
state_before: ⊢ 0 ≠ 1 ↔ ∃ p, Prime p ∧ p ∣ 0

tactic: simp [Nat.not_prime_one]
state_before: ⊢ 1 ≠ 1 ↔ ∃ p, Prime p ∧ p ∣ 1

tactic: let a := n + 2
state_before: n : ℕ
⊢ n + 2 ≠ 1 ↔ ∃ p, Prime p ∧ p ∣ n + 2

tactic: let ha : a ≠ 1 := Nat.succ_succ_ne_one n
state_before: n : ℕ
a : ℕ := n + 2
⊢ n + 2 ≠ 1 ↔ ∃ p, Prime p ∧ p ∣ n + 2

tactic: simp only [true_iff_iff, Ne.def, not_false_iff, ha]
state_before: n : ℕ
a : ℕ := n + 2
ha : a ≠ 1 := succ_succ_ne_one n
⊢ n + 2 ≠ 1 ↔ ∃ p, Prime p ∧ p ∣ n + 2

tactic: exact ⟨a.minFac, Nat.minFac_prime ha, a.minFac_dvd⟩
state_before: n : ℕ
a : ℕ := n + 2
ha : a ≠ 1 := succ_succ_ne_one n
⊢ ∃ p, Prime p ∧ p ∣ n + 2
Theorem: Compactum.isClosed_iff
File: Mathlib/Topology/Category/Compactum.lean

tactic: rw [← isOpen_compl_iff]
state_before: X : Compactum
S : Set X.A
⊢ IsClosed S ↔ ∀ (F : Ultrafilter X.A), S ∈ F → str X F ∈ S

tactic: constructor
state_before: X : Compactum
S : Set X.A
⊢ IsOpen (Sᶜ) ↔ ∀ (F : Ultrafilter X.A), S ∈ F → str X F ∈ S

tactic: intro cond F h
state_before: case mp
X : Compactum
S : Set X.A
⊢ IsOpen (Sᶜ) → ∀ (F : Ultrafilter X.A), S ∈ F → str X F ∈ S

tactic: by_contra c
state_before: case mp
X : Compactum
S : Set X.A
cond : IsOpen (Sᶜ)
F : Ultrafilter X.A
h : S ∈ F
⊢ str X F ∈ S

tactic: specialize cond F c
state_before: case mp
X : Compactum
S : Set X.A
cond : IsOpen (Sᶜ)
F : Ultrafilter X.A
h : S ∈ F
c : ¬str X F ∈ S
⊢ False

tactic: rw [compl_mem_iff_not_mem] at cond
state_before: case mp
X : Compactum
S : Set X.A
F : Ultrafilter X.A
h : S ∈ F
c : ¬str X F ∈ S
cond : Sᶜ ∈ F
⊢ False

tactic: contradiction
state_before: case mp
X : Compactum
S : Set X.A
F : Ultrafilter X.A
h : S ∈ F
c : ¬str X F ∈ S
cond : ¬S ∈ F
⊢ False

tactic: intro h1 F h2
state_before: case mpr
X : Compactum
S : Set X.A
⊢ (∀ (F : Ultrafilter X.A), S ∈ F → str X F ∈ S) → IsOpen (Sᶜ)

tactic: specialize h1 F
state_before: case mpr
X : Compactum
S : Set X.A
h1 : ∀ (F : Ultrafilter X.A), S ∈ F → str X F ∈ S
F : Ultrafilter X.A
h2 : str X F ∈ Sᶜ
⊢ Sᶜ ∈ F

tactic: cases' F.mem_or_compl_mem S with h h
state_before: case mpr
X : Compactum
S : Set X.A
F : Ultrafilter X.A
h2 : str X F ∈ Sᶜ
h1 : S ∈ F → str X F ∈ S
⊢ Sᶜ ∈ F

tactic: exacts [absurd (h1 h) h2, h]
state_before: case mpr.inl
X : Compactum
S : Set X.A
F : Ultrafilter X.A
h2 : str X F ∈ Sᶜ
h1 : S ∈ F → str X F ∈ S
h : S ∈ F
⊢ Sᶜ ∈ F

case mpr.inr
X : Compactum
S : Set X.A
F : Ultrafilter X.A
h2 : str X F ∈ Sᶜ
h1 : S ∈ F → str X F ∈ S
h : Sᶜ ∈ F
⊢ Sᶜ ∈ F
Theorem: sup_left_idem
File: Mathlib/Order/Lattice.lean

tactic: simp
state_before: α : Type u
β : Type v
inst✝ : SemilatticeSup α
a b c d : α
⊢ a ⊔ (a ⊔ b) = a ⊔ b
Theorem: Finset.Ioo_subset_Ico_self
File: Mathlib/Data/Finset/LocallyFinite.lean

tactic: rw [← coe_subset, coe_Ioo, coe_Ico]
state_before: ι : Type ?u.23589
α : Type u_1
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ Ioo a b ⊆ Ico a b

tactic: exact Set.Ioo_subset_Ico_self
state_before: ι : Type ?u.23589
α : Type u_1
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ Set.Ioo a b ⊆ Set.Ico a b
Theorem: Multiset.fold_distrib
File: Mathlib/Data/Multiset/Fold.lean

tactic: simp
state_before: α : Type u_2
β : Type u_1
op : α → α → α
hc : IsCommutative α op
ha : IsAssociative α op
f g : β → α
u₁ u₂ : α
s : Multiset β
⊢ fold op (op u₁ u₂) (map (fun x => op (f x) (g x)) 0) = op (fold op u₁ (map f 0)) (fold op u₂ (map g 0))

tactic: rw [map_cons, fold_cons_left, h, map_cons, fold_cons_left, map_cons,
  fold_cons_right, ha.assoc, ← ha.assoc (g a), hc.comm (g a),
  ha.assoc, hc.comm (g a), ha.assoc]
state_before: α : Type u_2
β : Type u_1
op : α → α → α
hc : IsCommutative α op
ha : IsAssociative α op
f g : β → α
u₁ u₂ : α
s : Multiset β
a : β
b : Multiset β
h : fold op (op u₁ u₂) (map (fun x => op (f x) (g x)) b) = op (fold op u₁ (map f b)) (fold op u₂ (map g b))
⊢ fold op (op u₁ u₂) (map (fun x => op (f x) (g x)) (a ::ₘ b)) =
    op (fold op u₁ (map f (a ::ₘ b))) (fold op u₂ (map g (a ::ₘ b)))
Theorem: Cycle.formPerm_subsingleton
File: Mathlib/GroupTheory/Perm/Cycle/Concrete.lean

tactic: induction' s using Quot.inductionOn with s
state_before: α : Type u_1
inst✝ : DecidableEq α
s✝ s' s : Cycle α
h : Subsingleton s
⊢ formPerm s (_ : Nodup s) = 1

tactic: simp only [formPerm_coe, mk_eq_coe]
state_before: case h
α : Type u_1
inst✝ : DecidableEq α
s✝¹ s' s✝ : Cycle α
h✝ : Subsingleton s✝
s : List α
h : Subsingleton (Quot.mk Setoid.r s)
⊢ formPerm (Quot.mk Setoid.r s) (_ : Nodup (Quot.mk Setoid.r s)) = 1

tactic: simp only [length_subsingleton_iff, length_coe, mk_eq_coe] at h
state_before: case h
α : Type u_1
inst✝ : DecidableEq α
s✝¹ s' s✝ : Cycle α
h✝ : Subsingleton s✝
s : List α
h : Subsingleton (Quot.mk Setoid.r s)
⊢ List.formPerm s = 1

tactic: cases' s with hd tl
state_before: case h
α : Type u_1
inst✝ : DecidableEq α
s✝¹ s' s✝ : Cycle α
h✝ : Subsingleton s✝
s : List α
h : List.length s ≤ 1
⊢ List.formPerm s = 1

tactic: simp
state_before: case h.nil
α : Type u_1
inst✝ : DecidableEq α
s✝ s' s : Cycle α
h✝ : Subsingleton s
h : List.length [] ≤ 1
⊢ List.formPerm [] = 1

tactic: simp only [length_eq_zero, add_le_iff_nonpos_left, List.length, nonpos_iff_eq_zero] at h
state_before: case h.cons
α : Type u_1
inst✝ : DecidableEq α
s✝ s' s : Cycle α
h✝ : Subsingleton s
hd : α
tl : List α
h : List.length (hd :: tl) ≤ 1
⊢ List.formPerm (hd :: tl) = 1

tactic: simp [h]
state_before: case h.cons
α : Type u_1
inst✝ : DecidableEq α
s✝ s' s : Cycle α
h✝ : Subsingleton s
hd : α
tl : List α
h : tl = []
⊢ List.formPerm (hd :: tl) = 1
Theorem: le_nhdsAdjoint_iff
File: Mathlib/Topology/Order.lean

tactic: change _ ↔ _ ∧ ∀ b : α, b ≠ a → IsOpen {b}
state_before: α✝ : Type u
β : Type v
α : Type u_1
a : α
f : Filter α
t : TopologicalSpace α
⊢ t ≤ nhdsAdjoint a f ↔ 𝓝 a ≤ pure a ⊔ f ∧ ∀ (b : α), b ≠ a → IsOpen {b}

tactic: rw [le_nhdsAdjoint_iff', and_congr_right_iff]
state_before: α✝ : Type u
β : Type v
α : Type u_1
a : α
f : Filter α
t : TopologicalSpace α
⊢ t ≤ nhdsAdjoint a f ↔ 𝓝 a ≤ pure a ⊔ f ∧ ∀ (b : α), b ≠ a → IsOpen {b}

tactic: refine fun _ => forall_congr' fun b => ?_
state_before: α✝ : Type u
β : Type v
α : Type u_1
a : α
f : Filter α
t : TopologicalSpace α
⊢ 𝓝 a ≤ pure a ⊔ f → ((∀ (b : α), b ≠ a → 𝓝 b = pure b) ↔ ∀ (b : α), b ≠ a → IsOpen {b})

tactic: rw [@isOpen_singleton_iff_nhds_eq_pure α t b]
state_before: α✝ : Type u
β : Type v
α : Type u_1
a : α
f : Filter α
t : TopologicalSpace α
x✝ : 𝓝 a ≤ pure a ⊔ f
b : α
⊢ b ≠ a → 𝓝 b = pure b ↔ b ≠ a → IsOpen {b}
Theorem: AlgEquiv.isAlgebraic
File: Mathlib/RingTheory/Algebraic.lean

tactic: convert← isAlgebraic_algHom_of_isAlgebraic e.toAlgHom (h _)
state_before: R : Type u
S : Type ?u.153899
A : Type v
inst✝⁸ : CommRing R
inst✝⁷ : CommRing S
inst✝⁶ : Ring A
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra R S
inst✝³ : Algebra S A
inst✝² : IsScalarTower R S A
B : Type u_1
inst✝¹ : Ring B
inst✝ : Algebra R B
e : A ≃ₐ[R] B
h : Algebra.IsAlgebraic R A
b : B
⊢ IsAlgebraic R b

tactic: refine e.apply_symm_apply ?_
state_before: case h.e'_6
R : Type u
S : Type ?u.153899
A : Type v
inst✝⁸ : CommRing R
inst✝⁷ : CommRing S
inst✝⁶ : Ring A
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra R S
inst✝³ : Algebra S A
inst✝² : IsScalarTower R S A
B : Type u_1
inst✝¹ : Ring B
inst✝ : Algebra R B
e : A ≃ₐ[R] B
h : Algebra.IsAlgebraic R A
b : B
⊢ ↑↑e ?m.156705 = b

R : Type u
S : Type ?u.153899
A : Type v
inst✝⁸ : CommRing R
inst✝⁷ : CommRing S
inst✝⁶ : Ring A
inst✝⁵ : Algebra R A
inst✝⁴ : Algebra R S
inst✝³ : Algebra S A
inst✝² : IsScalarTower R S A
B : Type u_1
inst✝¹ : Ring B
inst✝ : Algebra R B
e : A ≃ₐ[R] B
h : Algebra.IsAlgebraic R A
b : B
⊢ A
Theorem: Vector.toList_singleton
File: Mathlib/Data/Vector/Basic.lean

tactic: rw [← v.cons_head_tail]
state_before: n : ℕ
α : Type u_1
v : Vector α 1
⊢ toList v = [head v]

tactic: simp only [toList_cons, toList_nil, head_cons, eq_self_iff_true, and_self_iff, singleton_tail]
state_before: n : ℕ
α : Type u_1
v : Vector α 1
⊢ toList (head v ::ᵥ tail v) = [head (head v ::ᵥ tail v)]
Theorem: Ideal.constr_basisSpanSingleton
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: erw [Basis.constr_basis, Function.comp_apply, basisSpanSingleton_apply, LinearMap.mul_apply']
state_before: ι : Type u_4
R : Type u_3
S : Type u_2
inst✝⁶ : CommSemiring R
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Algebra R S
N : Type u_1
inst✝² : Semiring N
inst✝¹ : Module N S
inst✝ : SMulCommClass R N S
b : Basis ι R S
x : S
hx : x ≠ 0
i : ι
⊢ ↑(AddHom.toFun (↑(Basis.constr b N)).toAddHom (Subtype.val ∘ ↑(basisSpanSingleton b hx))) (↑b i) =
    ↑(↑(Algebra.lmul R S) x) (↑b i)
Theorem: Real.ciInf_empty
File: Mathlib/Data/Real/Basic.lean

tactic: rw [iInf_of_empty', sInf_empty]
state_before: x y : ℝ
α : Sort u_1
inst✝ : IsEmpty α
f : α → ℝ
⊢ (⨅ (i : α), f i) = 0
Theorem: List.nnnorm_prod_le
File: Mathlib/Analysis/Normed/Field/Basic.lean

tactic: simp [NNReal.coe_list_prod, List.map_map]
state_before: α : Type u_1
β : Type ?u.115517
γ : Type ?u.115520
ι : Type ?u.115523
inst✝¹ : SeminormedRing α
inst✝ : NormOneClass α
l : List α
⊢ prod (map norm l) = (fun a => ↑a) (prod (map nnnorm l))
Theorem: EckmannHilton.one
File: Mathlib/GroupTheory/EckmannHilton.lean

tactic: simpa only [h₁.left_id, h₁.right_id, h₂.left_id, h₂.right_id] using distrib e₂ e₁ e₁ e₂
state_before: X : Type u
m₁ m₂ : X → X → X
e₁ e₂ : X
h₁ : IsUnital m₁ e₁
h₂ : IsUnital m₂ e₂
distrib : ∀ (a b c d : X), m₁ (m₂ a b) (m₂ c d) = m₂ (m₁ a c) (m₁ b d)
⊢ e₁ = e₂
Theorem: List.rotate_replicate
File: Mathlib/Data/List/Rotate.lean

tactic: rw [length_rotate, length_replicate]
state_before: α : Type u
a : α
n k : ℕ
⊢ length (rotate (replicate n a) k) = n
Theorem: IsBoundedLinearMap.snd
File: Mathlib/Analysis/NormedSpace/BoundedLinearMaps.lean

tactic: refine' (LinearMap.snd 𝕜 E F).isLinear.with_bound 1 fun x => _
state_before: 𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
G : Type ?u.30683
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
⊢ IsBoundedLinearMap 𝕜 fun x => x.snd

tactic: rw [one_mul]
state_before: 𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
G : Type ?u.30683
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
x : E × F
⊢ ‖↑(LinearMap.snd 𝕜 E F) x‖ ≤ 1 * ‖x‖

tactic: exact le_max_right _ _
state_before: 𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
G : Type ?u.30683
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
x : E × F
⊢ ‖↑(LinearMap.snd 𝕜 E F) x‖ ≤ ‖x‖
Theorem: iSup_dite
File: Mathlib/Order/CompleteLattice.lean

tactic: rw [← iSup_sup_eq]
state_before: α : Type u_1
β : Type ?u.108111
β₂ : Type ?u.108114
γ : Type ?u.108117
ι : Sort u_2
ι' : Sort ?u.108123
κ : ι → Sort ?u.108128
κ' : ι' → Sort ?u.108133
inst✝¹ : CompleteLattice α
f✝ g✝ s t : ι → α
a b : α
p : ι → Prop
inst✝ : DecidablePred p
f : (i : ι) → p i → α
g : (i : ι) → ¬p i → α
⊢ (⨆ (i : ι), if h : p i then f i h else g i h) = (⨆ (i : ι) (h : p i), f i h) ⊔ ⨆ (i : ι) (h : ¬p i), g i h

tactic: congr 1 with i
state_before: α : Type u_1
β : Type ?u.108111
β₂ : Type ?u.108114
γ : Type ?u.108117
ι : Sort u_2
ι' : Sort ?u.108123
κ : ι → Sort ?u.108128
κ' : ι' → Sort ?u.108133
inst✝¹ : CompleteLattice α
f✝ g✝ s t : ι → α
a b : α
p : ι → Prop
inst✝ : DecidablePred p
f : (i : ι) → p i → α
g : (i : ι) → ¬p i → α
⊢ (⨆ (i : ι), if h : p i then f i h else g i h) = ⨆ (x : ι), (⨆ (h : p x), f x h) ⊔ ⨆ (h : ¬p x), g x h

tactic: split_ifs with h <;> simp [h]
state_before: case e_s.h
α : Type u_1
β : Type ?u.108111
β₂ : Type ?u.108114
γ : Type ?u.108117
ι : Sort u_2
ι' : Sort ?u.108123
κ : ι → Sort ?u.108128
κ' : ι' → Sort ?u.108133
inst✝¹ : CompleteLattice α
f✝ g✝ s t : ι → α
a b : α
p : ι → Prop
inst✝ : DecidablePred p
f : (i : ι) → p i → α
g : (i : ι) → ¬p i → α
i : ι
⊢ (if h : p i then f i h else g i h) = (⨆ (h : p i), f i h) ⊔ ⨆ (h : ¬p i), g i h
Theorem: Matrix.diagonal_conjTranspose
File: Mathlib/Data/Matrix/Basic.lean

tactic: rw [conjTranspose, diagonal_transpose, diagonal_map (star_zero _)]
state_before: l : Type ?u.71609
m : Type ?u.71612
n : Type u_1
o : Type ?u.71618
m' : o → Type ?u.71623
n' : o → Type ?u.71628
R : Type ?u.71631
S : Type ?u.71634
α : Type v
β : Type w
γ : Type ?u.71641
inst✝² : DecidableEq n
inst✝¹ : AddMonoid α
inst✝ : StarAddMonoid α
v : n → α
⊢ (diagonal v)ᴴ = diagonal (star v)

tactic: rfl
state_before: l : Type ?u.71609
m : Type ?u.71612
n : Type u_1
o : Type ?u.71618
m' : o → Type ?u.71623
n' : o → Type ?u.71628
R : Type ?u.71631
S : Type ?u.71634
α : Type v
β : Type w
γ : Type ?u.71641
inst✝² : DecidableEq n
inst✝¹ : AddMonoid α
inst✝ : StarAddMonoid α
v : n → α
⊢ (diagonal fun m => star (v m)) = diagonal (star v)
Theorem: GeneralizedContinuedFraction.part_num_none_iff_s_none
File: Mathlib/Algebra/ContinuedFractions/Translations.lean

tactic: cases s_nth_eq : g.s.get? n <;> simp [partialNumerators, s_nth_eq]
state_before: α : Type u_1
g : GeneralizedContinuedFraction α
n : ℕ
⊢ Stream'.Seq.get? (partialNumerators g) n = none ↔ Stream'.Seq.get? g.s n = none
Theorem: Complex.deriv_tan
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/ComplexDeriv.lean

tactic: have : ¬DifferentiableAt ℂ tan x := mt differentiableAt_tan.1 (Classical.not_not.2 h)
state_before: x : ℂ
h : cos x = 0
⊢ deriv tan x = ↑1 / cos x ^ 2

tactic: simp [deriv_zero_of_not_differentiableAt this, h, sq]
state_before: x : ℂ
h : cos x = 0
this : ¬DifferentiableAt ℂ tan x
⊢ deriv tan x = ↑1 / cos x ^ 2