1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: MeasureTheory.stoppedValue_hitting_mem
File: Mathlib/Probability/Process/HittingTime.lean

tactic: simp only [stoppedValue, hitting, if_pos h]
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝¹ : ConditionallyCompleteLinearOrder ι
inst✝ : IsWellOrder ι fun x x_1 => x < x_1
u : ι → Ω → β
s : Set β
n m : ι
ω : Ω
h : ∃ j ∈ Set.Icc n m, u j ω ∈ s
⊢ stoppedValue u (hitting u s n m) ω ∈ s
state_after: Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝¹ : ConditionallyCompleteLinearOrder ι
inst✝ : IsWellOrder ι fun x x_1 => x < x_1
u : ι → Ω → β
s : Set β
n m : ι
ω : Ω
h : ∃ j ∈ Set.Icc n m, u j ω ∈ s
⊢ u (sInf (Set.Icc n m ∩ {i | u i ω ∈ s})) ω ∈ s

tactic: obtain ⟨j, hj₁, hj₂⟩ := h
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝¹ : ConditionallyCompleteLinearOrder ι
inst✝ : IsWellOrder ι fun x x_1 => x < x_1
u : ι → Ω → β
s : Set β
n m : ι
ω : Ω
h : ∃ j ∈ Set.Icc n m, u j ω ∈ s
⊢ u (sInf (Set.Icc n m ∩ {i | u i ω ∈ s})) ω ∈ s
state_after: case intro.intro
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝¹ : ConditionallyCompleteLinearOrder ι
inst✝ : IsWellOrder ι fun x x_1 => x < x_1
u : ι → Ω → β
s : Set β
n m : ι
ω : Ω
j : ι
hj₁ : j ∈ Set.Icc n m
hj₂ : u j ω ∈ s
⊢ u (sInf (Set.Icc n m ∩ {i | u i ω ∈ s})) ω ∈ s

tactic: have : sInf (Set.Icc n m ∩ {i | u i ω ∈ s}) ∈ Set.Icc n m ∩ {i | u i ω ∈ s} :=
  csInf_mem (Set.nonempty_of_mem ⟨hj₁, hj₂⟩)
state_before: case intro.intro
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝¹ : ConditionallyCompleteLinearOrder ι
inst✝ : IsWellOrder ι fun x x_1 => x < x_1
u : ι → Ω → β
s : Set β
n m : ι
ω : Ω
j : ι
hj₁ : j ∈ Set.Icc n m
hj₂ : u j ω ∈ s
⊢ u (sInf (Set.Icc n m ∩ {i | u i ω ∈ s})) ω ∈ s
state_after: case intro.intro
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝¹ : ConditionallyCompleteLinearOrder ι
inst✝ : IsWellOrder ι fun x x_1 => x < x_1
u : ι → Ω → β
s : Set β
n m : ι
ω : Ω
j : ι
hj₁ : j ∈ Set.Icc n m
hj₂ : u j ω ∈ s
this : sInf (Set.Icc n m ∩ {i | u i ω ∈ s}) ∈ Set.Icc n m ∩ {i | u i ω ∈ s}
⊢ u (sInf (Set.Icc n m ∩ {i | u i ω ∈ s})) ω ∈ s

tactic: exact this.2
state_before: case intro.intro
Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝¹ : ConditionallyCompleteLinearOrder ι
inst✝ : IsWellOrder ι fun x x_1 => x < x_1
u : ι → Ω → β
s : Set β
n m : ι
ω : Ω
j : ι
hj₁ : j ∈ Set.Icc n m
hj₂ : u j ω ∈ s
this : sInf (Set.Icc n m ∩ {i | u i ω ∈ s}) ∈ Set.Icc n m ∩ {i | u i ω ∈ s}
⊢ u (sInf (Set.Icc n m ∩ {i | u i ω ∈ s})) ω ∈ s
state_after: no goals
Theorem: List.IsRotated.reverse
File: Mathlib/Data/List/Rotate.lean

tactic: obtain ⟨n, rfl⟩ := h
state_before: α : Type u
l l' : List α
h : l ~r l'
⊢ l.reverse ~r l'.reverse
state_after: case intro
α : Type u
l : List α
n : ℕ
⊢ l.reverse ~r (l.rotate n).reverse

tactic: exact ⟨_, (reverse_rotate _ _).symm⟩
state_before: case intro
α : Type u
l : List α
n : ℕ
⊢ l.reverse ~r (l.rotate n).reverse
state_after: no goals
Theorem: CochainComplex.mappingCone.id_X
File: Mathlib/Algebra/Homology/HomotopyCategory/MappingCone.lean

tactic: omega
state_before: C : Type u_1
inst✝² : Category.{?u.80033, u_1} C
inst✝¹ : Preadditive C
F G : CochainComplex C ℤ
φ : F ⟶ G
inst✝ : HasHomotopyCofiber φ
p q : ℤ
hpq : p + 1 = q
⊢ q + -1 = p
state_after: no goals

tactic: simpa only [Cochain.add_v, Cochain.comp_zero_cochain_v, Cochain.ofHom_v, id_f,
  Cochain.comp_v _ _ (add_neg_self 1) p q p hpq (by omega)]
  using Cochain.congr_v (id φ) p p (add_zero p)
state_before: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
F G : CochainComplex C ℤ
φ : F ⟶ G
inst✝ : HasHomotopyCofiber φ
p q : ℤ
hpq : p + 1 = q
⊢ (↑(fst φ)).v p q hpq ≫ (inl φ).v q p ⋯ + (snd φ).v p p ⋯ ≫ (inr φ).f p = 𝟙 ((mappingCone φ).X p)
state_after: no goals

tactic: omega
state_before: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
F G : CochainComplex C ℤ
φ : F ⟶ G
inst✝ : HasHomotopyCofiber φ
p q : ℤ
hpq : p + 1 = q
⊢ q + -1 = p
state_after: no goals
Theorem: CategoryTheory.MonoidalCategory.inv_whiskerRight
File: Mathlib/CategoryTheory/Monoidal/Category.lean

tactic: aesop_cat
state_before: C : Type u
𝒞 : Category.{v, u} C
inst✝¹ : MonoidalCategory C
X Y : C
f : X ⟶ Y
Z : C
inst✝ : IsIso f
⊢ inv (f ▷ Z) = inv f ▷ Z
state_after: no goals
Theorem: Subgroup.IsComplement.coe_equiv_snd_eq_one_iff_mem
File: Mathlib/GroupTheory/Complement.lean

tactic: rw [equiv_snd_eq_inv_mul, inv_mul_eq_one, equiv_fst_eq_self_iff_mem _ h1]
state_before: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hST : IsComplement S T
hHT : IsComplement (↑H) T
hSK : IsComplement S ↑K
g : G
h1 : 1 ∈ T
⊢ ↑(hST.equiv g).2 = 1 ↔ g ∈ S
state_after: no goals
Theorem: Set.image_image_val_eq_restrict_image
File: Mathlib/Data/Set/Functor.lean

tactic: ext
state_before: α β✝ : Type u
s : Set α
f✝ : α → Set β✝
g : Set (α → β✝)
β : Set α
γ : Set ↑β
a : α
δ : Type u_1
f : α → δ
⊢ f '' ↑γ = β.restrict f '' γ
state_after: case h
α β✝ : Type u
s : Set α
f✝ : α → Set β✝
g : Set (α → β✝)
β : Set α
γ : Set ↑β
a : α
δ : Type u_1
f : α → δ
x✝ : δ
⊢ x✝ ∈ f '' ↑γ ↔ x✝ ∈ β.restrict f '' γ

tactic: simp
state_before: case h
α β✝ : Type u
s : Set α
f✝ : α → Set β✝
g : Set (α → β✝)
β : Set α
γ : Set ↑β
a : α
δ : Type u_1
f : α → δ
x✝ : δ
⊢ x✝ ∈ f '' ↑γ ↔ x✝ ∈ β.restrict f '' γ
state_after: no goals
Theorem: Filter.comap_coLindelof_le
File: Mathlib/Topology/Compactness/Lindelof.lean

tactic: rw [(hasBasis_coLindelof.comap f).le_basis_iff hasBasis_coLindelof]
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
f : X → Y
hf : Continuous f
⊢ comap f (coLindelof Y) ≤ coLindelof X
state_after: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
f : X → Y
hf : Continuous f
⊢ ∀ (i' : Set X), IsLindelof i' → ∃ i, IsLindelof i ∧ f ⁻¹' iᶜ ⊆ i'ᶜ

tactic: intro t ht
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
f : X → Y
hf : Continuous f
⊢ ∀ (i' : Set X), IsLindelof i' → ∃ i, IsLindelof i ∧ f ⁻¹' iᶜ ⊆ i'ᶜ
state_after: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t✝ : Set X
f : X → Y
hf : Continuous f
t : Set X
ht : IsLindelof t
⊢ ∃ i, IsLindelof i ∧ f ⁻¹' iᶜ ⊆ tᶜ

tactic: refine ⟨f '' t, ht.image hf, ?_⟩
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t✝ : Set X
f : X → Y
hf : Continuous f
t : Set X
ht : IsLindelof t
⊢ ∃ i, IsLindelof i ∧ f ⁻¹' iᶜ ⊆ tᶜ
state_after: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t✝ : Set X
f : X → Y
hf : Continuous f
t : Set X
ht : IsLindelof t
⊢ f ⁻¹' (f '' t)ᶜ ⊆ tᶜ

tactic: simpa using t.subset_preimage_image f
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t✝ : Set X
f : X → Y
hf : Continuous f
t : Set X
ht : IsLindelof t
⊢ f ⁻¹' (f '' t)ᶜ ⊆ tᶜ
state_after: no goals
Theorem: CategoryTheory.SingleFunctors.hom_inv_id_hom
File: Mathlib/CategoryTheory/Shift/SingleFunctors.lean

tactic: rw [← comp_hom, e.hom_inv_id, id_hom]
state_before: C : Type u_1
D : Type u_2
E : Type u_3
E' : Type u_4
inst✝⁵ : Category.{u_7, u_1} C
inst✝⁴ : Category.{u_6, u_2} D
inst✝³ : Category.{?u.50113, u_3} E
A : Type u_5
inst✝² : AddMonoid A
inst✝¹ : HasShift D A
inst✝ : HasShift E A
F G H : SingleFunctors C D A
e : F ≅ G
n : A
⊢ e.hom.hom n ≫ e.inv.hom n = 𝟙 (F.functor n)
state_after: no goals
Theorem: mul_eq_mul_prime_pow
File: Mathlib/RingTheory/Prime.lean

tactic: rcases mul_eq_mul_prime_prod (fun _ _ ↦ hp)
  (show x * y = a * (range n).prod fun _ ↦ p by simpa) with
    ⟨t, u, b, c, htus, htu, rfl, rfl, rfl⟩
state_before: R : Type u_1
inst✝ : CancelCommMonoidWithZero R
x y a p : R
n : ℕ
hp : Prime p
hx : x * y = a * p ^ n
⊢ ∃ i j b c, i + j = n ∧ a = b * c ∧ x = b * p ^ i ∧ y = c * p ^ j
state_after: case intro.intro.intro.intro.intro.intro.intro.intro
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
p : R
n : ℕ
hp : Prime p
t u : Finset ℕ
b c : R
htus : t ∪ u = range n
htu : Disjoint t u
hx : (b * ∏ i ∈ t, p) * (c * ∏ i ∈ u, p) = b * c * p ^ n
⊢ ∃ i j b_1 c_1, i + j = n ∧ b * c = b_1 * c_1 ∧ b * ∏ i ∈ t, p = b_1 * p ^ i ∧ c * ∏ i ∈ u, p = c_1 * p ^ j

tactic: exact ⟨t.card, u.card, b, c, by rw [← card_union_of_disjoint htu, htus, card_range], by simp⟩
state_before: case intro.intro.intro.intro.intro.intro.intro.intro
R : Type u_1
inst✝ : CancelCommMonoidWithZero R
p : R
n : ℕ
hp : Prime p
t u : Finset ℕ
b c : R
htus : t ∪ u = range n
htu : Disjoint t u
hx : (b * ∏ i ∈ t, p) * (c * ∏ i ∈ u, p) = b * c * p ^ n
⊢ ∃ i j b_1 c_1, i + j = n ∧ b * c = b_1 * c_1 ∧ b * ∏ i ∈ t, p = b_1 * p ^ i ∧ c * ∏ i ∈ u, p = c_1 * p ^ j
state_after: no goals

tactic: simpa
state_before: R : Type u_1
inst✝ : CancelCommMonoidWithZero R
x y a p : R
n : ℕ
hp : Prime p
hx : x * y = a * p ^ n
⊢ x * y = a * ∏ x ∈ range n, p
state_after: no goals

tactic: rw [← card_union_of_disjoint htu, htus, card_range]
state_before: R : Type u_1
inst✝ : CancelCommMonoidWithZero R
p : R
n : ℕ
hp : Prime p
t u : Finset ℕ
b c : R
htus : t ∪ u = range n
htu : Disjoint t u
hx : (b * ∏ i ∈ t, p) * (c * ∏ i ∈ u, p) = b * c * p ^ n
⊢ t.card + u.card = n
state_after: no goals

tactic: simp
state_before: R : Type u_1
inst✝ : CancelCommMonoidWithZero R
p : R
n : ℕ
hp : Prime p
t u : Finset ℕ
b c : R
htus : t ∪ u = range n
htu : Disjoint t u
hx : (b * ∏ i ∈ t, p) * (c * ∏ i ∈ u, p) = b * c * p ^ n
⊢ b * c = b * c ∧ b * ∏ i ∈ t, p = b * p ^ t.card ∧ c * ∏ i ∈ u, p = c * p ^ u.card
state_after: no goals
Theorem: Field.finInsepDegree_self
File: Mathlib/FieldTheory/SeparableClosure.lean

tactic: rw [finInsepDegree_def', insepDegree_self, Cardinal.one_toNat]
state_before: F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
⊢ finInsepDegree F F = 1
state_after: no goals
Theorem: Multiset.Ioo_cons_left
File: Mathlib/Order/Interval/Multiset.lean

tactic: classical
  rw [Ioo, ← Finset.insert_val_of_not_mem left_not_mem_Ioo, Finset.Ioo_insert_left h]
  rfl
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a b : α
h : a < b
⊢ a ::ₘ Ioo a b = Ico a b
state_after: no goals

tactic: rw [Ioo, ← Finset.insert_val_of_not_mem left_not_mem_Ioo, Finset.Ioo_insert_left h]
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a b : α
h : a < b
⊢ a ::ₘ Ioo a b = Ico a b
state_after: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a b : α
h : a < b
⊢ (Finset.Ico a b).val = Ico a b

tactic: rfl
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a b : α
h : a < b
⊢ (Finset.Ico a b).val = Ico a b
state_after: no goals
Theorem: AddMonoidAlgebra.of'_mul_divOf
File: Mathlib/Algebra/MonoidAlgebra/Division.lean

tactic: refine Finsupp.ext fun _ => ?_
state_before: k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
a : G
x : k[G]
⊢ of' k G a * x /ᵒᶠ a = x
state_after: k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
a : G
x : k[G]
x✝ : G
⊢ (of' k G a * x /ᵒᶠ a) x✝ = x x✝

tactic: rw [AddMonoidAlgebra.divOf_apply, of'_apply, single_mul_apply_aux, one_mul]
state_before: k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
a : G
x : k[G]
x✝ : G
⊢ (of' k G a * x /ᵒᶠ a) x✝ = x x✝
state_after: case H
k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
a : G
x : k[G]
x✝ : G
⊢ ∀ (a_1 : G), a + a_1 = a + x✝ ↔ a_1 = x✝

tactic: intro c
state_before: case H
k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
a : G
x : k[G]
x✝ : G
⊢ ∀ (a_1 : G), a + a_1 = a + x✝ ↔ a_1 = x✝
state_after: case H
k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
a : G
x : k[G]
x✝ c : G
⊢ a + c = a + x✝ ↔ c = x✝

tactic: exact add_right_inj _
state_before: case H
k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
a : G
x : k[G]
x✝ c : G
⊢ a + c = a + x✝ ↔ c = x✝
state_after: no goals
Theorem: CochainComplex.HomComplex.Cochain.leftShift_v
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplexShift.lean

tactic: rw [← add_left_inj n, hp', add_assoc, add_comm a, hn', hpq]
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n + a = n'
p q : ℤ
hpq : p + n' = q
p' : ℤ
hp' : p' + n = q
⊢ p' = p + a
state_after: no goals

tactic: obtain rfl : p' = p + a := by omega
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n + a = n'
p q : ℤ
hpq : p + n' = q
p' : ℤ
hp' : p' + n = q
⊢ (γ.leftShift a n' hn').v p q hpq =
    (a * n' + a * (a - 1) / 2).negOnePow • (K.shiftFunctorObjXIso a p p' ⋯).hom ≫ γ.v p' q hp'
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n + a = n'
p q : ℤ
hpq : p + n' = q
hp' : p + a + n = q
⊢ (γ.leftShift a n' hn').v p q hpq =
    (a * n' + a * (a - 1) / 2).negOnePow • (K.shiftFunctorObjXIso a p (p + a) ⋯).hom ≫ γ.v (p + a) q hp'

tactic: dsimp only [leftShift]
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n + a = n'
p q : ℤ
hpq : p + n' = q
hp' : p + a + n = q
⊢ (γ.leftShift a n' hn').v p q hpq =
    (a * n' + a * (a - 1) / 2).negOnePow • (K.shiftFunctorObjXIso a p (p + a) ⋯).hom ≫ γ.v (p + a) q hp'
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n + a = n'
p q : ℤ
hpq : p + n' = q
hp' : p + a + n = q
⊢ (mk fun p q hpq =>
          (a * n' + a * (a - 1) / 2).negOnePow • (K.shiftFunctorObjXIso a p (p + a) ⋯).hom ≫ γ.v (p + a) q ⋯).v
      p q hpq =
    (a * n' + a * (a - 1) / 2).negOnePow • (K.shiftFunctorObjXIso a p (p + a) ⋯).hom ≫ γ.v (p + a) q hp'

tactic: simp only [mk_v]
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n + a = n'
p q : ℤ
hpq : p + n' = q
hp' : p + a + n = q
⊢ (mk fun p q hpq =>
          (a * n' + a * (a - 1) / 2).negOnePow • (K.shiftFunctorObjXIso a p (p + a) ⋯).hom ≫ γ.v (p + a) q ⋯).v
      p q hpq =
    (a * n' + a * (a - 1) / 2).negOnePow • (K.shiftFunctorObjXIso a p (p + a) ⋯).hom ≫ γ.v (p + a) q hp'
state_after: no goals

tactic: omega
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n + a = n'
p q : ℤ
hpq : p + n' = q
p' : ℤ
hp' : p' + n = q
⊢ p' = p + a
state_after: no goals
Theorem: List.perm_replicate
File: .lake/packages/batteries/Batteries/Data/List/Perm.lean

tactic: refine ⟨fun p => eq_replicate.2 ?_, fun h => h ▸ .rfl⟩
state_before: α : Type u_1
n : Nat
a : α
l : List α
⊢ l ~ replicate n a ↔ l = replicate n a
state_after: α : Type u_1
n : Nat
a : α
l : List α
p : l ~ replicate n a
⊢ l.length = n ∧ ∀ (b : α), b ∈ l → b = a

tactic: exact ⟨p.length_eq.trans <| length_replicate .., fun _b m => eq_of_mem_replicate <| p.subset m⟩
state_before: α : Type u_1
n : Nat
a : α
l : List α
p : l ~ replicate n a
⊢ l.length = n ∧ ∀ (b : α), b ∈ l → b = a
state_after: no goals
Theorem: range_toPullbackDiag
File: Mathlib/Data/Set/Prod.lean

tactic: rw [← image_univ, image_toPullbackDiag, univ_prod_univ, preimage_univ, inter_univ]
state_before: X : Type u_1
Y : Sort u_2
Z : ?m.78823
f : X → Y
⊢ range (toPullbackDiag f) = pullbackDiagonal f
state_after: no goals
Theorem: Pell.isPell_norm
File: Mathlib/NumberTheory/PellMatiyasevic.lean

tactic: simp [Zsqrtd.ext_iff, IsPell, mul_comm]
state_before: d x y : ℤ
⊢ IsPell { re := x, im := y } ↔ { re := x, im := y } * star { re := x, im := y } = 1
state_after: d x y : ℤ
⊢ x * x - y * (d * y) = 1 ↔ x * x + -(y * (d * y)) = 1

tactic: ring_nf
state_before: d x y : ℤ
⊢ x * x - y * (d * y) = 1 ↔ x * x + -(y * (d * y)) = 1
state_after: no goals
Theorem: BoxIntegral.TaggedPrepartition.distortion_unionComplToSubordinate
File: Mathlib/Analysis/BoxIntegral/Partition/SubboxInduction.lean

tactic: simp [unionComplToSubordinate]
state_before: ι : Type u_1
inst✝ : Fintype ι
I J : Box ι
π₁ : TaggedPrepartition I
π₂ : Prepartition I
hU : π₂.iUnion = ↑I \ π₁.iUnion
r : (ι → ℝ) → ↑(Ioi 0)
⊢ (π₁.unionComplToSubordinate π₂ hU r).distortion = max π₁.distortion π₂.distortion
state_after: no goals
Theorem: SimpleGraph.Partition.mem_partOfVertex
File: Mathlib/Combinatorics/SimpleGraph/Partition.lean

tactic: obtain ⟨⟨_, h⟩, _⟩ := (P.isPartition.2 v).choose_spec
state_before: V : Type u
G : SimpleGraph V
P : G.Partition
v : V
⊢ v ∈ P.partOfVertex v
state_after: case intro.intro
V : Type u
G : SimpleGraph V
P : G.Partition
v : V
right✝ : ∀ (y : Set V), (fun b => b ∈ P.parts ∧ v ∈ b) y → y = Exists.choose ⋯
left✝ : Exists.choose ⋯ ∈ P.parts
h : v ∈ Exists.choose ⋯
⊢ v ∈ P.partOfVertex v

tactic: exact h
state_before: case intro.intro
V : Type u
G : SimpleGraph V
P : G.Partition
v : V
right✝ : ∀ (y : Set V), (fun b => b ∈ P.parts ∧ v ∈ b) y → y = Exists.choose ⋯
left✝ : Exists.choose ⋯ ∈ P.parts
h : v ∈ Exists.choose ⋯
⊢ v ∈ P.partOfVertex v
state_after: no goals
Theorem: CategoryTheory.indecomposable_of_simple
File: Mathlib/CategoryTheory/Simple.lean

tactic: refine or_iff_not_imp_left.mpr fun h => ?_
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasBinaryBiproducts C
X : C
inst✝ : Simple X
Y Z : C
i : X ≅ Y ⊞ Z
⊢ IsZero Y ∨ IsZero Z
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasBinaryBiproducts C
X : C
inst✝ : Simple X
Y Z : C
i : X ≅ Y ⊞ Z
h : ¬IsZero Y
⊢ IsZero Z

tactic: rw [IsZero.iff_isSplitMono_eq_zero (biprod.inl : Y ⟶ Y ⊞ Z)] at h
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasBinaryBiproducts C
X : C
inst✝ : Simple X
Y Z : C
i : X ≅ Y ⊞ Z
h : ¬IsZero Y
⊢ IsZero Z
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasBinaryBiproducts C
X : C
inst✝ : Simple X
Y Z : C
i : X ≅ Y ⊞ Z
h : ¬biprod.inl = 0
⊢ IsZero Z

tactic: change biprod.inl ≠ 0 at h
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasBinaryBiproducts C
X : C
inst✝ : Simple X
Y Z : C
i : X ≅ Y ⊞ Z
h : ¬biprod.inl = 0
⊢ IsZero Z
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasBinaryBiproducts C
X : C
inst✝ : Simple X
Y Z : C
i : X ≅ Y ⊞ Z
h : biprod.inl ≠ 0
⊢ IsZero Z

tactic: have : Simple (Y ⊞ Z) := Simple.of_iso i.symm
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasBinaryBiproducts C
X : C
inst✝ : Simple X
Y Z : C
i : X ≅ Y ⊞ Z
h : biprod.inl ≠ 0
⊢ IsZero Z
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasBinaryBiproducts C
X : C
inst✝ : Simple X
Y Z : C
i : X ≅ Y ⊞ Z
h : biprod.inl ≠ 0
this : Simple (Y ⊞ Z)
⊢ IsZero Z

tactic: rw [← Simple.mono_isIso_iff_nonzero biprod.inl] at h
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasBinaryBiproducts C
X : C
inst✝ : Simple X
Y Z : C
i : X ≅ Y ⊞ Z
h : biprod.inl ≠ 0
this : Simple (Y ⊞ Z)
⊢ IsZero Z
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasBinaryBiproducts C
X : C
inst✝ : Simple X
Y Z : C
i : X ≅ Y ⊞ Z
h : IsIso biprod.inl
this : Simple (Y ⊞ Z)
⊢ IsZero Z

tactic: rwa [Biprod.isIso_inl_iff_isZero] at h
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasBinaryBiproducts C
X : C
inst✝ : Simple X
Y Z : C
i : X ≅ Y ⊞ Z
h : IsIso biprod.inl
this : Simple (Y ⊞ Z)
⊢ IsZero Z
state_after: no goals
Theorem: UpperHalfPlane.ModularGroup.SL_neg_smul
File: Mathlib/Analysis/Complex/UpperHalfPlane/Basic.lean

tactic: simp only [coe_GLPos_neg, sl_moeb, coe_int_neg, neg_smul, coe']
state_before: g✝ : SL(2, ℤ)
z✝ : ℍ
Γ : Subgroup SL(2, ℤ)
g : SL(2, ℤ)
z : ℍ
⊢ -g • z = g • z
state_after: no goals
Theorem: Seminorm.ball_add_ball_subset
File: Mathlib/Analysis/Seminorm.lean

tactic: rintro x ⟨y₁, hy₁, y₂, hy₂, rfl⟩
state_before: R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝² : SeminormedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : SMul 𝕜 E
p✝ : Seminorm 𝕜 E
x y : E
r : ℝ
p : Seminorm 𝕜 E
r₁ r₂ : ℝ
x₁ x₂ : E
⊢ p.ball x₁ r₁ + p.ball x₂ r₂ ⊆ p.ball (x₁ + x₂) (r₁ + r₂)
state_after: case intro.intro.intro.intro
R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝² : SeminormedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : SMul 𝕜 E
p✝ : Seminorm 𝕜 E
x y : E
r : ℝ
p : Seminorm 𝕜 E
r₁ r₂ : ℝ
x₁ x₂ y₁ : E
hy₁ : y₁ ∈ p.ball x₁ r₁
y₂ : E
hy₂ : y₂ ∈ p.ball x₂ r₂
⊢ (fun x x_1 => x + x_1) y₁ y₂ ∈ p.ball (x₁ + x₂) (r₁ + r₂)

tactic: rw [mem_ball, add_sub_add_comm]
state_before: case intro.intro.intro.intro
R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝² : SeminormedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : SMul 𝕜 E
p✝ : Seminorm 𝕜 E
x y : E
r : ℝ
p : Seminorm 𝕜 E
r₁ r₂ : ℝ
x₁ x₂ y₁ : E
hy₁ : y₁ ∈ p.ball x₁ r₁
y₂ : E
hy₂ : y₂ ∈ p.ball x₂ r₂
⊢ (fun x x_1 => x + x_1) y₁ y₂ ∈ p.ball (x₁ + x₂) (r₁ + r₂)
state_after: case intro.intro.intro.intro
R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝² : SeminormedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : SMul 𝕜 E
p✝ : Seminorm 𝕜 E
x y : E
r : ℝ
p : Seminorm 𝕜 E
r₁ r₂ : ℝ
x₁ x₂ y₁ : E
hy₁ : y₁ ∈ p.ball x₁ r₁
y₂ : E
hy₂ : y₂ ∈ p.ball x₂ r₂
⊢ p (y₁ - x₁ + (y₂ - x₂)) < r₁ + r₂

tactic: exact (map_add_le_add p _ _).trans_lt (add_lt_add hy₁ hy₂)
state_before: case intro.intro.intro.intro
R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝² : SeminormedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : SMul 𝕜 E
p✝ : Seminorm 𝕜 E
x y : E
r : ℝ
p : Seminorm 𝕜 E
r₁ r₂ : ℝ
x₁ x₂ y₁ : E
hy₁ : y₁ ∈ p.ball x₁ r₁
y₂ : E
hy₂ : y₂ ∈ p.ball x₂ r₂
⊢ p (y₁ - x₁ + (y₂ - x₂)) < r₁ + r₂
state_after: no goals
Theorem: Polynomial.reflect_support
File: Mathlib/Algebra/Polynomial/Reverse.lean

tactic: rcases f with ⟨⟩
state_before: R : Type u_1
inst✝ : Semiring R
f✝ : R[X]
N : ℕ
f : R[X]
⊢ (reflect N f).support = image (⇑(revAt N)) f.support
state_after: case ofFinsupp
R : Type u_1
inst✝ : Semiring R
f : R[X]
N : ℕ
toFinsupp✝ : AddMonoidAlgebra R ℕ
⊢ (reflect N { toFinsupp := toFinsupp✝ }).support = image ⇑(revAt N) { toFinsupp := toFinsupp✝ }.support

tactic: ext1
state_before: case ofFinsupp
R : Type u_1
inst✝ : Semiring R
f : R[X]
N : ℕ
toFinsupp✝ : AddMonoidAlgebra R ℕ
⊢ (reflect N { toFinsupp := toFinsupp✝ }).support = image ⇑(revAt N) { toFinsupp := toFinsupp✝ }.support
state_after: case ofFinsupp.a
R : Type u_1
inst✝ : Semiring R
f : R[X]
N : ℕ
toFinsupp✝ : AddMonoidAlgebra R ℕ
a✝ : ℕ
⊢ a✝ ∈ (reflect N { toFinsupp := toFinsupp✝ }).support ↔ a✝ ∈ image ⇑(revAt N) { toFinsupp := toFinsupp✝ }.support

tactic: simp only [reflect, support_ofFinsupp, support_embDomain, Finset.mem_map, Finset.mem_image]
state_before: case ofFinsupp.a
R : Type u_1
inst✝ : Semiring R
f : R[X]
N : ℕ
toFinsupp✝ : AddMonoidAlgebra R ℕ
a✝ : ℕ
⊢ a✝ ∈ (reflect N { toFinsupp := toFinsupp✝ }).support ↔ a✝ ∈ image ⇑(revAt N) { toFinsupp := toFinsupp✝ }.support
state_after: no goals