1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Filter.IsBoundedUnder.mono_le
File: Mathlib/Order/LiminfLimsup.lean

tactic: apply hu.imp
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f g : Filter α
inst✝ : Preorder β
l : Filter α
u v : α → β
hu : IsBoundedUnder (fun x x_1 => x ≤ x_1) l u
hv : v ≤ᶠ[l] u
⊢ IsBoundedUnder (fun x x_1 => x ≤ x_1) l v
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f g : Filter α
inst✝ : Preorder β
l : Filter α
u v : α → β
hu : IsBoundedUnder (fun x x_1 => x ≤ x_1) l u
hv : v ≤ᶠ[l] u
⊢ ∀ (a : β), (∀ᶠ (x : β) in map u l, (fun x x_1 => x ≤ x_1) x a) → ∀ᶠ (x : β) in map v l, (fun x x_1 => x ≤ x_1) x a

tactic: exact fun b hb => (eventually_map.1 hb).mp <| hv.mono fun x => le_trans
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f g : Filter α
inst✝ : Preorder β
l : Filter α
u v : α → β
hu : IsBoundedUnder (fun x x_1 => x ≤ x_1) l u
hv : v ≤ᶠ[l] u
⊢ ∀ (a : β), (∀ᶠ (x : β) in map u l, (fun x x_1 => x ≤ x_1) x a) → ∀ᶠ (x : β) in map v l, (fun x x_1 => x ≤ x_1) x a
state_after: no goals
Theorem: Function.Embedding.equiv_of_fintype_self_embedding_to_embedding
File: Mathlib/Data/Fintype/Card.lean

tactic: ext
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Finite α
e : α ↪ α
⊢ e.equivOfFintypeSelfEmbedding.toEmbedding = e
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Finite α
e : α ↪ α
x✝ : α
⊢ e.equivOfFintypeSelfEmbedding.toEmbedding x✝ = e x✝

tactic: rfl
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Finite α
e : α ↪ α
x✝ : α
⊢ e.equivOfFintypeSelfEmbedding.toEmbedding x✝ = e x✝
state_after: no goals
Theorem: Nat.pred_eq_self_iff
File: Mathlib/Data/Nat/Defs.lean

tactic: cases n <;> simp [(Nat.succ_ne_self _).symm]
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
⊢ n.pred = n ↔ n = 0
state_after: no goals
Theorem: NormedCommGroup.uniformity_basis_dist
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: convert Metric.uniformity_basis_dist (α := E) using 1
state_before: 𝓕 : Type u_1
𝕜 : Type u_2
α : Type u_3
ι : Type u_4
κ : Type u_5
E : Type u_6
F : Type u_7
G : Type u_8
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
⊢ (𝓤 E).HasBasis (fun ε => 0 < ε) fun ε => {p | ‖p.1 / p.2‖ < ε}
state_after: case h.e'_5
𝓕 : Type u_1
𝕜 : Type u_2
α : Type u_3
ι : Type u_4
κ : Type u_5
E : Type u_6
F : Type u_7
G : Type u_8
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
⊢ (fun ε => {p | ‖p.1 / p.2‖ < ε}) = fun ε => {p | dist p.1 p.2 < ε}

tactic: simp [dist_eq_norm_div]
state_before: case h.e'_5
𝓕 : Type u_1
𝕜 : Type u_2
α : Type u_3
ι : Type u_4
κ : Type u_5
E : Type u_6
F : Type u_7
G : Type u_8
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
⊢ (fun ε => {p | ‖p.1 / p.2‖ < ε}) = fun ε => {p | dist p.1 p.2 < ε}
state_after: no goals
Theorem: Primrec.dom_denumerable
File: Mathlib/Computability/Primrec.lean

tactic: simp
state_before: α✝ : Type u_1
β✝ : Type u_2
σ : Type u_3
inst✝⁴ : Primcodable α✝
inst✝³ : Primcodable β✝
inst✝² : Primcodable σ
α : Type u_4
β : Type u_5
inst✝¹ : Denumerable α
inst✝ : Primcodable β
f : α → β
h : Primrec f
n : ℕ
⊢ (encode (Option.map f (decode n))).pred = encode (f (ofNat α n))
state_after: no goals

tactic: simp
state_before: α✝ : Type u_1
β✝ : Type u_2
σ : Type u_3
inst✝⁴ : Primcodable α✝
inst✝³ : Primcodable β✝
inst✝² : Primcodable σ
α : Type u_4
β : Type u_5
inst✝¹ : Denumerable α
inst✝ : Primcodable β
f : α → β
h : Nat.Primrec fun n => encode (f (ofNat α n))
n : ℕ
⊢ (encode (f (ofNat α n))).succ = encode (Option.map f (decode n))
state_after: no goals
Theorem: MeasurableSet.map_coe_volume
File: Mathlib/MeasureTheory/Measure/Restrict.lean

tactic: rw [volume_set_coe_def, (MeasurableEmbedding.subtype_coe hs).map_comap volume, Subtype.range_coe]
state_before: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
inst✝ : MeasureSpace α
s✝ t s : Set α
hs : MeasurableSet s
⊢ Measure.map Subtype.val volume = volume.restrict s
state_after: no goals
Theorem: Associates.count_some
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: simp only [count, dif_pos hp, bcount]
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : DecidableEq (Associates α)
inst✝ : (p : Associates α) → Decidable (Irreducible p)
p : Associates α
hp : Irreducible p
s : Multiset { a // Irreducible a }
⊢ p.count ↑s = Multiset.count ⟨p, hp⟩ s
state_after: no goals
Theorem: Nat.odd_mul
File: Mathlib/Algebra/Ring/Parity.lean

tactic: simp [not_or, even_mul]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
m n : ℕ
⊢ Odd (m * n) ↔ Odd m ∧ Odd n
state_after: no goals
Theorem: LinearMap.lift_rank_comp_le_right
File: Mathlib/LinearAlgebra/Dimension/LinearMap.lean

tactic: rw [rank, rank, LinearMap.range_comp]
state_before: K : Type u
V V₁ : Type v
V' V'₁ : Type v'
V'' : Type v''
inst✝⁸ : Ring K
inst✝⁷ : AddCommGroup V
inst✝⁶ : Module K V
inst✝⁵ : AddCommGroup V₁
inst✝⁴ : Module K V₁
inst✝³ : AddCommGroup V'
inst✝² : Module K V'
inst✝¹ : AddCommGroup V''
inst✝ : Module K V''
g : V →ₗ[K] V'
f : V' →ₗ[K] V''
⊢ lift.{v', v''} (f ∘ₗ g).rank ≤ lift.{v'', v'} g.rank
state_after: K : Type u
V V₁ : Type v
V' V'₁ : Type v'
V'' : Type v''
inst✝⁸ : Ring K
inst✝⁷ : AddCommGroup V
inst✝⁶ : Module K V
inst✝⁵ : AddCommGroup V₁
inst✝⁴ : Module K V₁
inst✝³ : AddCommGroup V'
inst✝² : Module K V'
inst✝¹ : AddCommGroup V''
inst✝ : Module K V''
g : V →ₗ[K] V'
f : V' →ₗ[K] V''
⊢ lift.{v', v''} (Module.rank K ↥(Submodule.map f (range g))) ≤ lift.{v'', v'} (Module.rank K ↥(range g))

tactic: exact lift_rank_map_le _ _
state_before: K : Type u
V V₁ : Type v
V' V'₁ : Type v'
V'' : Type v''
inst✝⁸ : Ring K
inst✝⁷ : AddCommGroup V
inst✝⁶ : Module K V
inst✝⁵ : AddCommGroup V₁
inst✝⁴ : Module K V₁
inst✝³ : AddCommGroup V'
inst✝² : Module K V'
inst✝¹ : AddCommGroup V''
inst✝ : Module K V''
g : V →ₗ[K] V'
f : V' →ₗ[K] V''
⊢ lift.{v', v''} (Module.rank K ↥(Submodule.map f (range g))) ≤ lift.{v'', v'} (Module.rank K ↥(range g))
state_after: no goals
Theorem: Finset.Nat.antidiagonal_filter_snd_le_of_le
File: Mathlib/Data/Finset/NatAntidiagonal.lean

tactic: ext ⟨i, j⟩
state_before: n k : ℕ
h : k ≤ n
⊢ filter (fun a => a.2 ≤ k) (antidiagonal n) =
    map ({ toFun := fun x => x + (n - k), inj' := ⋯ }.prodMap (Embedding.refl ℕ)) (antidiagonal k)
state_after: case a.mk
n k : ℕ
h : k ≤ n
i j : ℕ
⊢ (i, j) ∈ filter (fun a => a.2 ≤ k) (antidiagonal n) ↔
    (i, j) ∈ map ({ toFun := fun x => x + (n - k), inj' := ⋯ }.prodMap (Embedding.refl ℕ)) (antidiagonal k)

tactic: suffices i + j = n ∧ j ≤ k ↔ ∃ a, a + j = k ∧ a + (n - k) = i by simpa
state_before: case a.mk
n k : ℕ
h : k ≤ n
i j : ℕ
⊢ (i, j) ∈ filter (fun a => a.2 ≤ k) (antidiagonal n) ↔
    (i, j) ∈ map ({ toFun := fun x => x + (n - k), inj' := ⋯ }.prodMap (Embedding.refl ℕ)) (antidiagonal k)
state_after: case a.mk
n k : ℕ
h : k ≤ n
i j : ℕ
⊢ i + j = n ∧ j ≤ k ↔ ∃ a, a + j = k ∧ a + (n - k) = i

tactic: refine ⟨fun hi ↦ ⟨k - j, tsub_add_cancel_of_le hi.2, ?_⟩, ?_⟩
state_before: case a.mk
n k : ℕ
h : k ≤ n
i j : ℕ
⊢ i + j = n ∧ j ≤ k ↔ ∃ a, a + j = k ∧ a + (n - k) = i
state_after: case a.mk.refine_1
n k : ℕ
h : k ≤ n
i j : ℕ
hi : i + j = n ∧ j ≤ k
⊢ k - j + (n - k) = i

case a.mk.refine_2
n k : ℕ
h : k ≤ n
i j : ℕ
⊢ (∃ a, a + j = k ∧ a + (n - k) = i) → i + j = n ∧ j ≤ k

tactic: simpa
state_before: n k : ℕ
h : k ≤ n
i j : ℕ
this : i + j = n ∧ j ≤ k ↔ ∃ a, a + j = k ∧ a + (n - k) = i
⊢ (i, j) ∈ filter (fun a => a.2 ≤ k) (antidiagonal n) ↔
    (i, j) ∈ map ({ toFun := fun x => x + (n - k), inj' := ⋯ }.prodMap (Embedding.refl ℕ)) (antidiagonal k)
state_after: no goals

tactic: rw [add_comm, tsub_add_eq_add_tsub h, ← hi.1, add_assoc, Nat.add_sub_of_le hi.2,
  add_tsub_cancel_right]
state_before: case a.mk.refine_1
n k : ℕ
h : k ≤ n
i j : ℕ
hi : i + j = n ∧ j ≤ k
⊢ k - j + (n - k) = i
state_after: no goals

tactic: rintro ⟨l, hl, rfl⟩
state_before: case a.mk.refine_2
n k : ℕ
h : k ≤ n
i j : ℕ
⊢ (∃ a, a + j = k ∧ a + (n - k) = i) → i + j = n ∧ j ≤ k
state_after: case a.mk.refine_2.intro.intro
n k : ℕ
h : k ≤ n
j l : ℕ
hl : l + j = k
⊢ l + (n - k) + j = n ∧ j ≤ k

tactic: refine ⟨?_, hl ▸ Nat.le_add_left j l⟩
state_before: case a.mk.refine_2.intro.intro
n k : ℕ
h : k ≤ n
j l : ℕ
hl : l + j = k
⊢ l + (n - k) + j = n ∧ j ≤ k
state_after: case a.mk.refine_2.intro.intro
n k : ℕ
h : k ≤ n
j l : ℕ
hl : l + j = k
⊢ l + (n - k) + j = n

tactic: rw [add_assoc, add_comm, add_assoc, add_comm j l, hl]
state_before: case a.mk.refine_2.intro.intro
n k : ℕ
h : k ≤ n
j l : ℕ
hl : l + j = k
⊢ l + (n - k) + j = n
state_after: case a.mk.refine_2.intro.intro
n k : ℕ
h : k ≤ n
j l : ℕ
hl : l + j = k
⊢ n - k + k = n

tactic: exact Nat.sub_add_cancel h
state_before: case a.mk.refine_2.intro.intro
n k : ℕ
h : k ≤ n
j l : ℕ
hl : l + j = k
⊢ n - k + k = n
state_after: no goals
Theorem: Doset.mem_doset
File: Mathlib/GroupTheory/DoubleCoset.lean

tactic: simp only [doset_eq_image2, Set.mem_image2, eq_comm]
state_before: G : Type u_1
inst✝¹ : Group G
α : Type u_2
inst✝ : Mul α
J : Subgroup G
g : G
s t : Set α
a b : α
⊢ b ∈ doset a s t ↔ ∃ x ∈ s, ∃ y ∈ t, b = x * a * y
state_after: no goals
Theorem: Basis.eval_ker
File: Mathlib/LinearAlgebra/Dual.lean

tactic: rw [ker_eq_bot']
state_before: R : Type uR
M : Type uM
K : Type uK
V : Type uV
ι✝ : Type uι
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : DecidableEq ι✝
b✝ : Basis ι✝ R M
ι : Type u_1
b : Basis ι R M
⊢ ker (Dual.eval R M) = ⊥
state_after: R : Type uR
M : Type uM
K : Type uK
V : Type uV
ι✝ : Type uι
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : DecidableEq ι✝
b✝ : Basis ι✝ R M
ι : Type u_1
b : Basis ι R M
⊢ ∀ (m : M), (Dual.eval R M) m = 0 → m = 0

tactic: intro m hm
state_before: R : Type uR
M : Type uM
K : Type uK
V : Type uV
ι✝ : Type uι
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : DecidableEq ι✝
b✝ : Basis ι✝ R M
ι : Type u_1
b : Basis ι R M
⊢ ∀ (m : M), (Dual.eval R M) m = 0 → m = 0
state_after: R : Type uR
M : Type uM
K : Type uK
V : Type uV
ι✝ : Type uι
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : DecidableEq ι✝
b✝ : Basis ι✝ R M
ι : Type u_1
b : Basis ι R M
m : M
hm : (Dual.eval R M) m = 0
⊢ m = 0

tactic: simp_rw [LinearMap.ext_iff, Dual.eval_apply, zero_apply] at hm
state_before: R : Type uR
M : Type uM
K : Type uK
V : Type uV
ι✝ : Type uι
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : DecidableEq ι✝
b✝ : Basis ι✝ R M
ι : Type u_1
b : Basis ι R M
m : M
hm : (Dual.eval R M) m = 0
⊢ m = 0
state_after: R : Type uR
M : Type uM
K : Type uK
V : Type uV
ι✝ : Type uι
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : DecidableEq ι✝
b✝ : Basis ι✝ R M
ι : Type u_1
b : Basis ι R M
m : M
hm : ∀ (x : Dual R M), x m = 0
⊢ m = 0

tactic: exact (Basis.forall_coord_eq_zero_iff _).mp fun i => hm (b.coord i)
state_before: R : Type uR
M : Type uM
K : Type uK
V : Type uV
ι✝ : Type uι
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : DecidableEq ι✝
b✝ : Basis ι✝ R M
ι : Type u_1
b : Basis ι R M
m : M
hm : ∀ (x : Dual R M), x m = 0
⊢ m = 0
state_after: no goals
Theorem: Filter.tendsto_mul_const_atBot_iff_pos
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: simp only [mul_comm _ r, tendsto_const_mul_atBot_iff_pos h]
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : LinearOrderedField α
l : Filter β
f : β → α
r : α
inst✝ : l.NeBot
h : Tendsto f l atBot
⊢ Tendsto (fun x => f x * r) l atBot ↔ 0 < r
state_after: no goals
Theorem: AddCommGroup.add_modEq_left
File: Mathlib/Algebra/ModEq.lean

tactic: simp [← modEq_sub_iff_add_modEq']
state_before: α : Type u_1
inst✝ : AddCommGroup α
p a a₁ a₂ b b₁ b₂ c : α
n : ℕ
z : ℤ
⊢ a + b ≡ a [PMOD p] ↔ b ≡ 0 [PMOD p]
state_after: no goals
Theorem: EuclideanGeometry.left_ne_right_of_oangle_sign_eq_neg_one
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean

tactic: decide
state_before: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ : P
h : (∡ p₁ p₂ p₃).sign = -1
⊢ -1 ≠ 0
state_after: no goals
Theorem: Functor.mapEquiv_refl
File: Mathlib/Logic/Equiv/Functor.lean

tactic: ext x
state_before: α β : Type u
f : Type u → Type v
inst✝¹ : Functor f
inst✝ : LawfulFunctor f
⊢ mapEquiv f (Equiv.refl α) = Equiv.refl (f α)
state_after: case H
α β : Type u
f : Type u → Type v
inst✝¹ : Functor f
inst✝ : LawfulFunctor f
x : f α
⊢ (mapEquiv f (Equiv.refl α)) x = (Equiv.refl (f α)) x

tactic: simp only [mapEquiv_apply, refl_apply]
state_before: case H
α β : Type u
f : Type u → Type v
inst✝¹ : Functor f
inst✝ : LawfulFunctor f
x : f α
⊢ (mapEquiv f (Equiv.refl α)) x = (Equiv.refl (f α)) x
state_after: case H
α β : Type u
f : Type u → Type v
inst✝¹ : Functor f
inst✝ : LawfulFunctor f
x : f α
⊢ ⇑(Equiv.refl α) <$> x = x

tactic: exact LawfulFunctor.id_map x
state_before: case H
α β : Type u
f : Type u → Type v
inst✝¹ : Functor f
inst✝ : LawfulFunctor f
x : f α
⊢ ⇑(Equiv.refl α) <$> x = x
state_after: no goals
Theorem: Polynomial.two_mul_C_half_eq_one
File: Mathlib/RingTheory/Polynomial/Dickson.lean

tactic: rw [two_mul, ← C_add, invOf_two_add_invOf_two, C_1]
state_before: R : Type u_1
S : Type u_2
inst✝² : CommRing R
inst✝¹ : CommRing S
k : ℕ
a : R
inst✝ : Invertible 2
⊢ 2 * C ⅟2 = 1
state_after: no goals
Theorem: List.getD_eq_get
File: Mathlib/Data/List/GetD.lean

tactic: simp at hn
state_before: case nil
α : Type u
β : Type v
l : List α
x : α
xs : List α
n✝ : ℕ
d : α
n : ℕ
hn : n < [].length
⊢ [].getD n d = [].get ⟨n, hn⟩
state_after: no goals

tactic: cases n
state_before: case cons
α : Type u
β : Type v
l : List α
x : α
xs : List α
n✝ : ℕ
d head : α
tail : List α
ih : ∀ {n : ℕ} (hn : n < tail.length), tail.getD n d = tail.get ⟨n, hn⟩
n : ℕ
hn : n < (head :: tail).length
⊢ (head :: tail).getD n d = (head :: tail).get ⟨n, hn⟩
state_after: case cons.zero
α : Type u
β : Type v
l : List α
x : α
xs : List α
n : ℕ
d head : α
tail : List α
ih : ∀ {n : ℕ} (hn : n < tail.length), tail.getD n d = tail.get ⟨n, hn⟩
hn : 0 < (head :: tail).length
⊢ (head :: tail).getD 0 d = (head :: tail).get ⟨0, hn⟩

case cons.succ
α : Type u
β : Type v
l : List α
x : α
xs : List α
n : ℕ
d head : α
tail : List α
ih : ∀ {n : ℕ} (hn : n < tail.length), tail.getD n d = tail.get ⟨n, hn⟩
n✝ : ℕ
hn : n✝ + 1 < (head :: tail).length
⊢ (head :: tail).getD (n✝ + 1) d = (head :: tail).get ⟨n✝ + 1, hn⟩

tactic: exact getD_cons_zero
state_before: case cons.zero
α : Type u
β : Type v
l : List α
x : α
xs : List α
n : ℕ
d head : α
tail : List α
ih : ∀ {n : ℕ} (hn : n < tail.length), tail.getD n d = tail.get ⟨n, hn⟩
hn : 0 < (head :: tail).length
⊢ (head :: tail).getD 0 d = (head :: tail).get ⟨0, hn⟩
state_after: no goals

tactic: exact ih _
state_before: case cons.succ
α : Type u
β : Type v
l : List α
x : α
xs : List α
n : ℕ
d head : α
tail : List α
ih : ∀ {n : ℕ} (hn : n < tail.length), tail.getD n d = tail.get ⟨n, hn⟩
n✝ : ℕ
hn : n✝ + 1 < (head :: tail).length
⊢ (head :: tail).getD (n✝ + 1) d = (head :: tail).get ⟨n✝ + 1, hn⟩
state_after: no goals
Theorem: symmDiff_self
File: Mathlib/Order/SymmDiff.lean

tactic: rw [symmDiff, sup_idem, sdiff_self]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ a ∆ a = ⊥
state_after: no goals
Theorem: List.mem_eraseIdx_iff_getElem?
File: .lake/packages/batteries/Batteries/Data/List/EraseIdx.lean

tactic: simp only [mem_eraseIdx_iff_getElem, getElem_eq_iff, Fin.exists_iff, exists_and_left]
state_before: α : Type u
β : Type v
x : α
l : List α
k : Nat
⊢ x ∈ l.eraseIdx k ↔ ∃ i, i ≠ k ∧ l[i]? = some x
state_after: α : Type u
β : Type v
x : α
l : List α
k : Nat
⊢ (∃ i, i ≠ k ∧ ∃ x_1, l[i]? = some x) ↔ ∃ i, i ≠ k ∧ l[i]? = some x

tactic: refine exists_congr fun i => and_congr_right' ?_
state_before: α : Type u
β : Type v
x : α
l : List α
k : Nat
⊢ (∃ i, i ≠ k ∧ ∃ x_1, l[i]? = some x) ↔ ∃ i, i ≠ k ∧ l[i]? = some x
state_after: α : Type u
β : Type v
x : α
l : List α
k i : Nat
⊢ (∃ x_1, l[i]? = some x) ↔ l[i]? = some x

tactic: constructor
state_before: α : Type u
β : Type v
x : α
l : List α
k i : Nat
⊢ (∃ x_1, l[i]? = some x) ↔ l[i]? = some x
state_after: case mp
α : Type u
β : Type v
x : α
l : List α
k i : Nat
⊢ (∃ x_1, l[i]? = some x) → l[i]? = some x

case mpr
α : Type u
β : Type v
x : α
l : List α
k i : Nat
⊢ l[i]? = some x → ∃ x_1, l[i]? = some x

tactic: rintro ⟨_, h⟩
state_before: case mp
α : Type u
β : Type v
x : α
l : List α
k i : Nat
⊢ (∃ x_1, l[i]? = some x) → l[i]? = some x
state_after: case mp.intro
α : Type u
β : Type v
x : α
l : List α
k i : Nat
w✝ : i < l.length
h : l[i]? = some x
⊢ l[i]? = some x

tactic: exact h
state_before: case mp.intro
α : Type u
β : Type v
x : α
l : List α
k i : Nat
w✝ : i < l.length
h : l[i]? = some x
⊢ l[i]? = some x
state_after: no goals

tactic: rintro h
state_before: case mpr
α : Type u
β : Type v
x : α
l : List α
k i : Nat
⊢ l[i]? = some x → ∃ x_1, l[i]? = some x
state_after: case mpr
α : Type u
β : Type v
x : α
l : List α
k i : Nat
h : l[i]? = some x
⊢ ∃ x_1, l[i]? = some x

tactic: obtain ⟨h', -⟩ := getElem?_eq_some.1 h
state_before: case mpr
α : Type u
β : Type v
x : α
l : List α
k i : Nat
h : l[i]? = some x
⊢ ∃ x_1, l[i]? = some x
state_after: case mpr.intro
α : Type u
β : Type v
x : α
l : List α
k i : Nat
h : l[i]? = some x
h' : i < l.length
⊢ ∃ x_1, l[i]? = some x

tactic: exact ⟨h', h⟩
state_before: case mpr.intro
α : Type u
β : Type v
x : α
l : List α
k i : Nat
h : l[i]? = some x
h' : i < l.length
⊢ ∃ x_1, l[i]? = some x
state_after: no goals
Theorem: Finsupp.update_eq_erase_add_single
File: Mathlib/Data/Finsupp/Defs.lean

tactic: ext j
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddZeroClass M
f : α →₀ M
a : α
b : M
⊢ f.update a b = erase a f + single a b
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddZeroClass M
f : α →₀ M
a : α
b : M
j : α
⊢ (f.update a b) j = (erase a f + single a b) j

tactic: rcases eq_or_ne a j with (rfl | h)
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddZeroClass M
f : α →₀ M
a : α
b : M
j : α
⊢ (f.update a b) j = (erase a f + single a b) j
state_after: case h.inl
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddZeroClass M
f : α →₀ M
a : α
b : M
⊢ (f.update a b) a = (erase a f + single a b) a

case h.inr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddZeroClass M
f : α →₀ M
a : α
b : M
j : α
h : a ≠ j
⊢ (f.update a b) j = (erase a f + single a b) j

tactic: simp
state_before: case h.inl
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddZeroClass M
f : α →₀ M
a : α
b : M
⊢ (f.update a b) a = (erase a f + single a b) a
state_after: no goals

tactic: simp [Function.update_noteq h.symm, single_apply, h, erase_ne, h.symm]
state_before: case h.inr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddZeroClass M
f : α →₀ M
a : α
b : M
j : α
h : a ≠ j
⊢ (f.update a b) j = (erase a f + single a b) j
state_after: no goals
Theorem: CstarRing.norm_coe_unitary
File: Mathlib/Analysis/NormedSpace/Star/Basic.lean

tactic: rw [← sq_eq_sq (norm_nonneg _) zero_le_one, one_pow 2, sq, ← CstarRing.norm_star_mul_self,
  unitary.coe_star_mul_self, CstarRing.norm_one]
state_before: 𝕜 : Type u_1
E : Type u_2
α : Type u_3
inst✝³ : NormedRing E
inst✝² : StarRing E
inst✝¹ : CstarRing E
inst✝ : Nontrivial E
U : ↥(unitary E)
⊢ ‖↑U‖ = 1
state_after: no goals
Theorem: MeasureTheory.stoppedProcess_eq_of_ge
File: Mathlib/Probability/Process/Stopping.lean

tactic: simp [stoppedProcess, min_eq_right h]
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : LinearOrder ι
u : ι → Ω → β
τ : Ω → ι
i : ι
ω : Ω
h : τ ω ≤ i
⊢ stoppedProcess u τ i ω = u (τ ω) ω
state_after: no goals
Theorem: Set.image_val_sUnion
File: Mathlib/Data/Set/Subset.lean

tactic: rw [image_sUnion, image]
state_before: ι : Sort u_1
α : Type u_2
A B C : Set α
D E : Set ↑A
S : Set (Set α)
T : Set (Set ↑A)
s : ι → Set α
t : ι → Set ↑A
⊢ ↑(⋃₀ T) = ⋃₀ {x | ∃ B ∈ T, ↑B = x}
state_after: no goals
Theorem: Matrix.op_smul_one_eq_diagonal
File: Mathlib/Data/Matrix/Basic.lean

tactic: simp_rw [← diagonal_one, ← diagonal_smul, Pi.smul_def, op_smul_eq_mul, one_mul]
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝¹ : NonAssocSemiring α
inst✝ : DecidableEq m
a : α
⊢ MulOpposite.op a • 1 = diagonal fun x => a
state_after: no goals
Theorem: IsCompactlyGenerated.BooleanGenerators.eq_atoms_of_sSup_eq_top
File: Mathlib/Order/BooleanGenerators.lean

tactic: apply le_antisymm
state_before: α : Type u_1
inst✝¹ : CompleteLattice α
inst✝ : IsCompactlyGenerated α
S : Set α
hS : BooleanGenerators S
h : sSup S = ⊤
⊢ S = {a | IsAtom a}
state_after: case a
α : Type u_1
inst✝¹ : CompleteLattice α
inst✝ : IsCompactlyGenerated α
S : Set α
hS : BooleanGenerators S
h : sSup S = ⊤
⊢ S ≤ {a | IsAtom a}

case a
α : Type u_1
inst✝¹ : CompleteLattice α
inst✝ : IsCompactlyGenerated α
S : Set α
hS : BooleanGenerators S
h : sSup S = ⊤
⊢ {a | IsAtom a} ≤ S

tactic: intro a ha
state_before: case a
α : Type u_1
inst✝¹ : CompleteLattice α
inst✝ : IsCompactlyGenerated α
S : Set α
hS : BooleanGenerators S
h : sSup S = ⊤
⊢ {a | IsAtom a} ≤ S
state_after: case a
α : Type u_1
inst✝¹ : CompleteLattice α
inst✝ : IsCompactlyGenerated α
S : Set α
hS : BooleanGenerators S
h : sSup S = ⊤
a : α
ha : a ∈ {a | IsAtom a}
⊢ a ∈ S

tactic: obtain ⟨T, hT, rfl⟩ := hS.atomistic a (le_top.trans h.ge)
state_before: case a
α : Type u_1
inst✝¹ : CompleteLattice α
inst✝ : IsCompactlyGenerated α
S : Set α
hS : BooleanGenerators S
h : sSup S = ⊤
a : α
ha : a ∈ {a | IsAtom a}
⊢ a ∈ S
state_after: case a.intro.intro
α : Type u_1
inst✝¹ : CompleteLattice α
inst✝ : IsCompactlyGenerated α
S : Set α
hS : BooleanGenerators S
h : sSup S = ⊤
T : Set α
hT : T ⊆ S
ha : sSup T ∈ {a | IsAtom a}
⊢ sSup T ∈ S

tactic: exact hS.mem_of_isAtom_of_le_sSup_atoms _ ha (sSup_le_sSup hT)
state_before: case a.intro.intro
α : Type u_1
inst✝¹ : CompleteLattice α
inst✝ : IsCompactlyGenerated α
S : Set α
hS : BooleanGenerators S
h : sSup S = ⊤
T : Set α
hT : T ⊆ S
ha : sSup T ∈ {a | IsAtom a}
⊢ sSup T ∈ S
state_after: no goals

tactic: exact hS.isAtom
state_before: case a
α : Type u_1
inst✝¹ : CompleteLattice α
inst✝ : IsCompactlyGenerated α
S : Set α
hS : BooleanGenerators S
h : sSup S = ⊤
⊢ S ≤ {a | IsAtom a}
state_after: no goals