tasksource/leandojo huggingface dataset:
Theorem: EuclideanGeometry.Sphere.secondInter_zero
File: Mathlib/Geometry/Euclidean/Sphere/SecondInter.lean

tactic: simp [Sphere.secondInter]
state_before: V : Type u_2
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
s : Sphere P
p : P
⊢ secondInter s p 0 = p
Theorem: Combinatorics.Line.exists_mono_in_high_dimension
File: Mathlib/Combinatorics/HalesJewett.lean

tactic: rw [← hc x, Function.comp_apply]
state_before: α : Type u
inst✝¹ : Finite α
κ : Type v
inst✝ : Finite κ
ι : Type
ιfin : Fintype ι
hι : ∀ (C : (ι → α) → ULift κ), ∃ l, IsMono C l
C : (ι → α) → κ
l : Line α ι
c : ULift κ
hc : ∀ (x : α), (ULift.up ∘ C) ((fun x i => Option.getD (idxFun l i) x) x) = c
x : α
⊢ C ((fun x i => Option.getD (idxFun l i) x) x) = c.down
Theorem: TopCat.fst_iso_of_right_embedding_range_subset
File: Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean

tactic: let esto : (pullback f g : TopCat) ≃ₜ X :=
  (Homeomorph.ofEmbedding _ (fst_embedding_of_right_embedding f hg)).trans
    { toFun := Subtype.val
      invFun := fun x =>
        ⟨x, by
          rw [pullback_fst_range]
          exact ⟨_, (H (Set.mem_range_self x)).choose_spec.symm⟩⟩
      left_inv := fun ⟨_, _⟩ => rfl
      right_inv := fun x => rfl }
state_before: J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
hg : Embedding ((forget TopCat).map g)
H : Set.range ((forget TopCat).map f) ⊆ Set.range ((forget TopCat).map g)
⊢ IsIso pullback.fst

tactic: convert IsIso.of_iso (isoOfHomeo esto)
state_before: J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
hg : Embedding ((forget TopCat).map g)
H : Set.range ((forget TopCat).map f) ⊆ Set.range ((forget TopCat).map g)
esto : ↑(pullback f g) ≃ₜ ↑X :=
  Homeomorph.trans
    (Homeomorph.ofEmbedding ((forget TopCat).map pullback.fst) (_ : Embedding ((forget TopCat).map pullback.fst)))
    (Homeomorph.mk
      { toFun := Subtype.val,
        invFun := fun x => { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map pullback.fst)) },
        left_inv :=
          (_ :
            ∀ (x : ↑(Set.range ((forget TopCat).map pullback.fst))),
              (fun x => { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map pullback.fst)) }) ↑x = x),
        right_inv :=
          (_ :
            ∀ (x : ↑X),
              ↑((fun x => { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map pullback.fst)) }) x) =
                ↑((fun x => { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map pullback.fst)) }) x)) })
⊢ IsIso pullback.fst

tactic: rw [pullback_fst_range]
state_before: J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
hg : Embedding ((forget TopCat).map g)
H : Set.range ((forget TopCat).map f) ⊆ Set.range ((forget TopCat).map g)
x : ↑X
⊢ x ∈ Set.range ((forget TopCat).map pullback.fst)

tactic: exact ⟨_, (H (Set.mem_range_self x)).choose_spec.symm⟩
state_before: J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
g : Y ⟶ S
hg : Embedding ((forget TopCat).map g)
H : Set.range ((forget TopCat).map f) ⊆ Set.range ((forget TopCat).map g)
x : ↑X
⊢ x ∈ {x | ∃ y, (forget TopCat).map f x = (forget TopCat).map g y}
Theorem: tendsto_ceil_left_pure
File: Mathlib/Topology/Algebra/Order/Floor.lean

tactic: simpa only [ceil_intCast] using tendsto_ceil_left_pure_ceil (n : α)
state_before: α : Type u_1
β : Type ?u.7567
γ : Type ?u.7570
inst✝³ : LinearOrderedRing α
inst✝² : FloorRing α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
n : ℤ
⊢ Tendsto ceil (𝓝[Iic ↑n] ↑n) (pure n)
Theorem: CategoryTheory.Functor.eval_section_injective_of_eventually_injective
File: Mathlib/CategoryTheory/CofilteredSystem.lean

tactic: refine' fun s₀ s₁ h => Subtype.ext <| funext fun k => _
state_before: J : Type u
inst✝¹ : Category J
F : J ⥤ Type v
i✝ j✝ k : J
s : Set (F.obj i✝)
inst✝ : IsCofilteredOrEmpty J
j : J
Finj : ∀ (i : J) (f : i ⟶ j), Function.Injective (F.map f)
i : J
f : i ⟶ j
⊢ Function.Injective fun s => ↑s j

tactic: obtain ⟨m, mi, mk, _⟩ := IsCofilteredOrEmpty.cone_objs i k
state_before: J : Type u
inst✝¹ : Category J
F : J ⥤ Type v
i✝ j✝ k✝ : J
s : Set (F.obj i✝)
inst✝ : IsCofilteredOrEmpty J
j : J
Finj : ∀ (i : J) (f : i ⟶ j), Function.Injective (F.map f)
i : J
f : i ⟶ j
s₀ s₁ : ↑(sections F)
h : (fun s => ↑s j) s₀ = (fun s => ↑s j) s₁
k : J
⊢ ↑s₀ k = ↑s₁ k

tactic: dsimp at h
state_before: case intro.intro.intro
J : Type u
inst✝¹ : Category J
F : J ⥤ Type v
i✝ j✝ k✝ : J
s : Set (F.obj i✝)
inst✝ : IsCofilteredOrEmpty J
j : J
Finj : ∀ (i : J) (f : i ⟶ j), Function.Injective (F.map f)
i : J
f : i ⟶ j
s₀ s₁ : ↑(sections F)
h : (fun s => ↑s j) s₀ = (fun s => ↑s j) s₁
k m : J
mi : m ⟶ i
mk : m ⟶ k
h✝ : True
⊢ ↑s₀ k = ↑s₁ k

tactic: rw [← s₀.prop (mi ≫ f), ← s₁.prop (mi ≫ f)] at h
state_before: case intro.intro.intro
J : Type u
inst✝¹ : Category J
F : J ⥤ Type v
i✝ j✝ k✝ : J
s : Set (F.obj i✝)
inst✝ : IsCofilteredOrEmpty J
j : J
Finj : ∀ (i : J) (f : i ⟶ j), Function.Injective (F.map f)
i : J
f : i ⟶ j
s₀ s₁ : ↑(sections F)
h : ↑s₀ j = ↑s₁ j
k m : J
mi : m ⟶ i
mk : m ⟶ k
h✝ : True
⊢ ↑s₀ k = ↑s₁ k

tactic: rw [← s₀.prop mk, ← s₁.prop mk]
state_before: case intro.intro.intro
J : Type u
inst✝¹ : Category J
F : J ⥤ Type v
i✝ j✝ k✝ : J
s : Set (F.obj i✝)
inst✝ : IsCofilteredOrEmpty J
j : J
Finj : ∀ (i : J) (f : i ⟶ j), Function.Injective (F.map f)
i : J
f : i ⟶ j
s₀ s₁ : ↑(sections F)
k m : J
mi : m ⟶ i
h : F.map (mi ≫ f) (↑s₀ m) = F.map (mi ≫ f) (↑s₁ m)
mk : m ⟶ k
h✝ : True
⊢ ↑s₀ k = ↑s₁ k

tactic: refine' congr_arg _ (Finj m (mi ≫ f) h)
state_before: case intro.intro.intro
J : Type u
inst✝¹ : Category J
F : J ⥤ Type v
i✝ j✝ k✝ : J
s : Set (F.obj i✝)
inst✝ : IsCofilteredOrEmpty J
j : J
Finj : ∀ (i : J) (f : i ⟶ j), Function.Injective (F.map f)
i : J
f : i ⟶ j
s₀ s₁ : ↑(sections F)
k m : J
mi : m ⟶ i
h : F.map (mi ≫ f) (↑s₀ m) = F.map (mi ≫ f) (↑s₁ m)
mk : m ⟶ k
h✝ : True
⊢ F.map mk (↑s₀ m) = F.map mk (↑s₁ m)
Theorem: aeSeq.aeSeq_eq_fun_of_mem_aeSeqSet
File: Mathlib/MeasureTheory/Function/AEMeasurableSequence.lean

tactic: simp only [aeSeq_eq_mk_of_mem_aeSeqSet hf hx i, mk_eq_fun_of_mem_aeSeqSet hf hx i]
state_before: ι : Sort u_3
α : Type u_1
β : Type u_2
γ : Type ?u.259052
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : ι → α → β
μ : MeasureTheory.Measure α
p : α → (ι → β) → Prop
hf : ∀ (i : ι), AEMeasurable (f i)
x : α
hx : x ∈ aeSeqSet hf p
i : ι
⊢ aeSeq hf p i x = f i x
Theorem: PadicInt.norm_int_lt_one_iff_dvd
File: Mathlib/NumberTheory/Padics/PadicIntegers.lean

tactic: rwa [norm_int_cast_eq_padic_norm]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
k : ℤ
this : ‖↑k‖ < 1 ↔ ↑p ∣ k
⊢ ‖↑k‖ < 1 ↔ ↑p ∣ k
Theorem: CharP.quotient'
File: Mathlib/Algebra/CharP/Quotient.lean

tactic: rw [← cast_eq_zero_iff R p x, ← map_natCast (Ideal.Quotient.mk I)]
state_before: R : Type u_1
inst✝¹ : CommRing R
p : ℕ
inst✝ : CharP R p
I : Ideal R
h : ∀ (x : ℕ), ↑x ∈ I → ↑x = 0
x : ℕ
⊢ ↑x = 0 ↔ p ∣ x

tactic: refine' Ideal.Quotient.eq.trans (_ : ↑x - 0 ∈ I ↔ _)
state_before: R : Type u_1
inst✝¹ : CommRing R
p : ℕ
inst✝ : CharP R p
I : Ideal R
h : ∀ (x : ℕ), ↑x ∈ I → ↑x = 0
x : ℕ
⊢ ↑(Ideal.Quotient.mk I) ↑x = 0 ↔ ↑x = 0

tactic: rw [sub_zero]
state_before: R : Type u_1
inst✝¹ : CommRing R
p : ℕ
inst✝ : CharP R p
I : Ideal R
h : ∀ (x : ℕ), ↑x ∈ I → ↑x = 0
x : ℕ
⊢ ↑x - 0 ∈ I ↔ ↑x = 0

tactic: exact ⟨h x, fun h' => h'.symm ▸ I.zero_mem⟩
state_before: R : Type u_1
inst✝¹ : CommRing R
p : ℕ
inst✝ : CharP R p
I : Ideal R
h : ∀ (x : ℕ), ↑x ∈ I → ↑x = 0
x : ℕ
⊢ ↑x ∈ I ↔ ↑x = 0
Theorem: QuaternionGroup.a_one_pow
File: Mathlib/GroupTheory/SpecificGroups/Quaternion.lean

tactic: induction' k with k IH
state_before: n k : ℕ
⊢ a 1 ^ k = a ↑k

tactic: rw [Nat.cast_zero]
state_before: case zero
n : ℕ
⊢ a 1 ^ Nat.zero = a ↑Nat.zero

tactic: rfl
state_before: case zero
n : ℕ
⊢ a 1 ^ Nat.zero = a 0

tactic: rw [pow_succ, IH, a_mul_a]
state_before: case succ
n k : ℕ
IH : a 1 ^ k = a ↑k
⊢ a 1 ^ Nat.succ k = a ↑(Nat.succ k)

tactic: congr 1
state_before: case succ
n k : ℕ
IH : a 1 ^ k = a ↑k
⊢ a (1 + ↑k) = a ↑(Nat.succ k)

tactic: norm_cast
state_before: case succ.e_a
n k : ℕ
IH : a 1 ^ k = a ↑k
⊢ 1 + ↑k = ↑(Nat.succ k)

tactic: rw [Nat.one_add]
state_before: case succ.e_a
n k : ℕ
IH : a 1 ^ k = a ↑k
⊢ ↑(1 + k) = ↑(Nat.succ k)
Theorem: Hindman.FP.mul_two
File: Mathlib/Combinatorics/Hindman.lean

tactic: refine' FP_drop_subset_FP _ i _
state_before: M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
⊢ Stream'.nth a i * Stream'.nth a j ∈ FP a

tactic: rw [← Stream'.head_drop]
state_before: M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
⊢ Stream'.nth a i * Stream'.nth a j ∈ FP (Stream'.drop i a)

tactic: apply FP.cons
state_before: M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
⊢ Stream'.head (Stream'.drop i a) * Stream'.nth a j ∈ FP (Stream'.drop i a)

tactic: rcases le_iff_exists_add.mp (Nat.succ_le_of_lt ij) with ⟨d, hd⟩
state_before: case h
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
⊢ FP (Stream'.tail (Stream'.drop i a)) (Stream'.nth a j)

tactic: change _ ∈ FP _
state_before: case h.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = Nat.succ i + d
⊢ FP (Stream'.tail (Stream'.drop i a)) (Stream'.nth a j)

tactic: have := FP.singleton (a.drop i).tail d
state_before: case h.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = Nat.succ i + d
⊢ Stream'.nth a j ∈ FP (Stream'.tail (Stream'.drop i a))

tactic: rw [Stream'.tail_eq_drop, Stream'.nth_drop, Stream'.nth_drop] at this
state_before: case h.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = Nat.succ i + d
this : Stream'.nth (Stream'.tail (Stream'.drop i a)) d ∈ FP (Stream'.tail (Stream'.drop i a))
⊢ Stream'.nth a j ∈ FP (Stream'.tail (Stream'.drop i a))

tactic: convert this
state_before: case h.intro
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = Nat.succ i + d
this : Stream'.nth a (d + 1 + i) ∈ FP (Stream'.drop 1 (Stream'.drop i a))
⊢ Stream'.nth a j ∈ FP (Stream'.tail (Stream'.drop i a))

tactic: rw [hd, add_comm, Nat.succ_add, Nat.add_succ]
state_before: case h.e'_4.h.e'_3
M : Type u_1
inst✝ : Semigroup M
a : Stream' M
i j : ℕ
ij : i < j
d : ℕ
hd : j = Nat.succ i + d
this : Stream'.nth a (d + 1 + i) ∈ FP (Stream'.drop 1 (Stream'.drop i a))
⊢ j = d + 1 + i
Theorem: Nat.even_mul
File: Mathlib/Data/Nat/Parity.lean

tactic: cases' mod_two_eq_zero_or_one m with h₁ h₁ <;> cases' mod_two_eq_zero_or_one n with h₂ h₂ <;>
  simp [even_iff, h₁, h₂, Nat.mul_mod]
state_before: m n : ℕ
⊢ Even (m * n) ↔ Even m ∨ Even n
Theorem: pochhammer_pos
File: Mathlib/RingTheory/Polynomial/Pochhammer.lean

tactic: induction' n with n ih
state_before: S : Type u_1
inst✝ : StrictOrderedSemiring S
n : ℕ
s : S
h : 0 < s
⊢ 0 < eval s (pochhammer S n)

tactic: simp only [Nat.zero_eq, pochhammer_zero, eval_one]
state_before: case zero
S : Type u_1
inst✝ : StrictOrderedSemiring S
s : S
h : 0 < s
⊢ 0 < eval s (pochhammer S Nat.zero)

tactic: exact zero_lt_one
state_before: case zero
S : Type u_1
inst✝ : StrictOrderedSemiring S
s : S
h : 0 < s
⊢ 0 < 1

tactic: rw [pochhammer_succ_right, mul_add, eval_add, ← Nat.cast_comm, eval_nat_cast_mul, eval_mul_X,
  Nat.cast_comm, ← mul_add]
state_before: case succ
S : Type u_1
inst✝ : StrictOrderedSemiring S
s : S
h : 0 < s
n : ℕ
ih : 0 < eval s (pochhammer S n)
⊢ 0 < eval s (pochhammer S (Nat.succ n))

tactic: exact mul_pos ih (lt_of_lt_of_le h ((le_add_iff_nonneg_right _).mpr (Nat.cast_nonneg n)))
state_before: case succ
S : Type u_1
inst✝ : StrictOrderedSemiring S
s : S
h : 0 < s
n : ℕ
ih : 0 < eval s (pochhammer S n)
⊢ 0 < eval s (pochhammer S n) * (s + ↑n)
Theorem: Function.apply_update
File: Mathlib/Logic/Function/Basic.lean

tactic: by_cases h:j = i
state_before: α✝ : Sort u
β✝ : α✝ → Sort v
α' : Sort w
inst✝² : DecidableEq α✝
inst✝¹ : DecidableEq α'
f✝ g✝ : (a : α✝) → β✝ a
a : α✝
b : β✝ a
ι : Sort u_1
inst✝ : DecidableEq ι
α : ι → Sort u_2
β : ι → Sort u_3
f : (i : ι) → α i → β i
g : (i : ι) → α i
i : ι
v : α i
j : ι
⊢ f j (update g i v j) = update (fun k => f k (g k)) i (f i v) j

tactic: subst j
state_before: case pos
α✝ : Sort u
β✝ : α✝ → Sort v
α' : Sort w
inst✝² : DecidableEq α✝
inst✝¹ : DecidableEq α'
f✝ g✝ : (a : α✝) → β✝ a
a : α✝
b : β✝ a
ι : Sort u_1
inst✝ : DecidableEq ι
α : ι → Sort u_2
β : ι → Sort u_3
f : (i : ι) → α i → β i
g : (i : ι) → α i
i : ι
v : α i
j : ι
h : j = i
⊢ f j (update g i v j) = update (fun k => f k (g k)) i (f i v) j

tactic: simp
state_before: case pos
α✝ : Sort u
β✝ : α✝ → Sort v
α' : Sort w
inst✝² : DecidableEq α✝
inst✝¹ : DecidableEq α'
f✝ g✝ : (a : α✝) → β✝ a
a : α✝
b : β✝ a
ι : Sort u_1
inst✝ : DecidableEq ι
α : ι → Sort u_2
β : ι → Sort u_3
f : (i : ι) → α i → β i
g : (i : ι) → α i
i : ι
v : α i
⊢ f i (update g i v i) = update (fun k => f k (g k)) i (f i v) i

tactic: simp [h]
state_before: case neg
α✝ : Sort u
β✝ : α✝ → Sort v
α' : Sort w
inst✝² : DecidableEq α✝
inst✝¹ : DecidableEq α'
f✝ g✝ : (a : α✝) → β✝ a
a : α✝
b : β✝ a
ι : Sort u_1
inst✝ : DecidableEq ι
α : ι → Sort u_2
β : ι → Sort u_3
f : (i : ι) → α i → β i
g : (i : ι) → α i
i : ι
v : α i
j : ι
h : ¬j = i
⊢ f j (update g i v j) = update (fun k => f k (g k)) i (f i v) j
Theorem: contDiffAt_one_iff
File: Mathlib/Analysis/Calculus/ContDiffDef.lean

tactic: simp_rw [show (1 : ℕ∞) = (0 + 1 : ℕ) from (zero_add 1).symm, contDiffAt_succ_iff_hasFDerivAt,
  show ((0 : ℕ) : ℕ∞) = 0 from rfl, contDiffAt_zero,
  exists_mem_and_iff antitone_bforall antitone_continuousOn, and_comm]
state_before: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type uX
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
⊢ ContDiffAt 𝕜 1 f x ↔ ∃ f' u, u ∈ 𝓝 x ∧ ContinuousOn f' u ∧ ∀ (x : E), x ∈ u → HasFDerivAt f (f' x) x
Theorem: Dfinsupp.filter_single
File: Mathlib/Data/Dfinsupp/Basic.lean

tactic: ext j
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
s : Finset ι
x✝ : (i : ↑↑s) → β ↑i
i✝ : ι
p : ι → Prop
inst✝ : DecidablePred p
i : ι
x : β i
⊢ filter p (single i x) = if p i then single i x else 0

tactic: have := apply_ite (fun x : Π₀ i, β i => x j) (p i) (single i x) 0
state_before: case h
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
s : Finset ι
x✝ : (i : ↑↑s) → β ↑i
i✝ : ι
p : ι → Prop
inst✝ : DecidablePred p
i : ι
x : β i
j : ι
⊢ ↑(filter p (single i x)) j = ↑(if p i then single i x else 0) j

tactic: dsimp at this
state_before: case h
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
s : Finset ι
x✝ : (i : ↑↑s) → β ↑i
i✝ : ι
p : ι → Prop
inst✝ : DecidablePred p
i : ι
x : β i
j : ι
this : ↑(if p i then single i x else 0) j = if p i then ↑(single i x) j else ↑0 j
⊢ ↑(filter p (single i x)) j = ↑(if p i then single i x else 0) j

tactic: rw [filter_apply, this]
state_before: case h
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
s : Finset ι
x✝ : (i : ↑↑s) → β ↑i
i✝ : ι
p : ι → Prop
inst✝ : DecidablePred p
i : ι
x : β i
j : ι
this : ↑(if p i then single i x else 0) j = if p i then ↑(single i x) j else 0
⊢ ↑(filter p (single i x)) j = ↑(if p i then single i x else 0) j

tactic: obtain rfl | hij := Decidable.eq_or_ne i j
state_before: case h
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
s : Finset ι
x✝ : (i : ↑↑s) → β ↑i
i✝ : ι
p : ι → Prop
inst✝ : DecidablePred p
i : ι
x : β i
j : ι
this : ↑(if p i then single i x else 0) j = if p i then ↑(single i x) j else 0
⊢ (if p j then ↑(single i x) j else 0) = if p i then ↑(single i x) j else 0

tactic: rfl
state_before: case h.inl
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
s : Finset ι
x✝ : (i : ↑↑s) → β ↑i
i✝ : ι
p : ι → Prop
inst✝ : DecidablePred p
i : ι
x : β i
this : ↑(if p i then single i x else 0) i = if p i then ↑(single i x) i else 0
⊢ (if p i then ↑(single i x) i else 0) = if p i then ↑(single i x) i else 0

tactic: rw [single_eq_of_ne hij, ite_self, ite_self]
state_before: case h.inr
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
s : Finset ι
x✝ : (i : ↑↑s) → β ↑i
i✝ : ι
p : ι → Prop
inst✝ : DecidablePred p
i : ι
x : β i
j : ι
this : ↑(if p i then single i x else 0) j = if p i then ↑(single i x) j else 0
hij : i ≠ j
⊢ (if p j then ↑(single i x) j else 0) = if p i then ↑(single i x) j else 0
Theorem: Filter.eventuallyLE_antisymm_iff
File: Mathlib/Order/Filter/Basic.lean

tactic: simp only [EventuallyEq, EventuallyLE, le_antisymm_iff, eventually_and]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.206109
ι : Sort x
inst✝ : PartialOrder β
l : Filter α
f g : α → β
⊢ f =ᶠ[l] g ↔ f ≤ᶠ[l] g ∧ g ≤ᶠ[l] f
Theorem: FiberPrebundle.mem_pretrivializationAt_source
File: Mathlib/Topology/FiberBundle/Basic.lean

tactic: simp only [(a.pretrivializationAt b).source_eq, mem_preimage, TotalSpace.proj]
state_before: ι : Type ?u.61867
B : Type u_2
F : Type u_3
X : Type ?u.61876
inst✝³ : TopologicalSpace X
E : B → Type u_1
inst✝² : TopologicalSpace B
inst✝¹ : TopologicalSpace F
inst✝ : (x : B) → TopologicalSpace (E x)
a : FiberPrebundle F E
e : Pretrivialization F TotalSpace.proj
b : B
x : E b
⊢ totalSpaceMk b x ∈ (pretrivializationAt a b).source

tactic: exact a.mem_base_pretrivializationAt b
state_before: ι : Type ?u.61867
B : Type u_2
F : Type u_3
X : Type ?u.61876
inst✝³ : TopologicalSpace X
E : B → Type u_1
inst✝² : TopologicalSpace B
inst✝¹ : TopologicalSpace F
inst✝ : (x : B) → TopologicalSpace (E x)
a : FiberPrebundle F E
e : Pretrivialization F TotalSpace.proj
b : B
x : E b
⊢ b ∈ (pretrivializationAt a b).baseSet
Theorem: Set.image_preimage_inl_union_image_preimage_inr
File: Mathlib/Data/Set/Image.lean

tactic: rw [image_preimage_eq_inter_range, image_preimage_eq_inter_range, ← inter_distrib_left,
  range_inl_union_range_inr, inter_univ]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.86447
ι : Sort ?u.86450
ι' : Sort ?u.86453
f : ι → α
s✝ t : Set α
s : Set (α ⊕ β)
⊢ Sum.inl '' (Sum.inl ⁻¹' s) ∪ Sum.inr '' (Sum.inr ⁻¹' s) = s
Theorem: QuaternionAlgebra.star_add_self
File: Mathlib/Algebra/Quaternion.lean

tactic: rw [add_comm, self_add_star]
state_before: S : Type ?u.312006
T : Type ?u.312009
R : Type u_1
inst✝ : CommRing R
c₁ c₂ r x y z : R
a b c : ℍ[R,c₁,c₂]
⊢ star a + a = 2 * ↑a.re
Theorem: FirstOrder.Language.Theory.Model.union
File: Mathlib/ModelTheory/Semantics.lean

tactic: simp only [model_iff, Set.mem_union] at *
state_before: L : Language
L' : Language
M : Type w
N : Type ?u.419567
P : Type ?u.419570
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
n : ℕ
T T' : Theory L
h : M ⊨ T
h' : M ⊨ T'
⊢ M ⊨ T ∪ T'

tactic: exact fun φ hφ => hφ.elim (h _) (h' _)
state_before: L : Language
L' : Language
M : Type w
N : Type ?u.419567
P : Type ?u.419570
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
n : ℕ
T T' : Theory L
h : ∀ (φ : Sentence L), φ ∈ T → M ⊨ φ
h' : ∀ (φ : Sentence L), φ ∈ T' → M ⊨ φ
⊢ ∀ (φ : Sentence L), φ ∈ T ∨ φ ∈ T' → M ⊨ φ
Theorem: EuclideanGeometry.angle_eq_arccos_of_angle_eq_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean

tactic: rw [angle, ← inner_eq_zero_iff_angle_eq_pi_div_two, real_inner_comm, ← neg_eq_zero, ←
  inner_neg_left, neg_vsub_eq_vsub_rev] at h
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p₁ p₂ p₃ : P
h : ∠ p₁ p₂ p₃ = π / 2
⊢ ∠ p₂ p₃ p₁ = Real.arccos (dist p₃ p₂ / dist p₁ p₃)

tactic: rw [angle, dist_eq_norm_vsub' V p₃ p₂, dist_eq_norm_vsub V p₁ p₃, ← vsub_add_vsub_cancel p₁ p₂ p₃,
  add_comm, angle_add_eq_arccos_of_inner_eq_zero h]
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p₁ p₂ p₃ : P
h : inner (p₂ -ᵥ p₃) (p₁ -ᵥ p₂) = 0
⊢ ∠ p₂ p₃ p₁ = Real.arccos (dist p₃ p₂ / dist p₁ p₃)
Theorem: Nat.gcd_gcd_self_right_right
File: Std/Data/Nat/Gcd.lean

tactic: rw [gcd_comm n m, gcd_gcd_self_right_left]
state_before: m n : Nat
⊢ gcd m (gcd n m) = gcd n m
Theorem: Nat.descFactorial_le_pow
File: Mathlib/Data/Nat/Factorial/Basic.lean

tactic: rw [descFactorial_zero, pow_zero]
state_before: n : ℕ
⊢ descFactorial n 0 ≤ n ^ 0

tactic: rw [descFactorial_succ, pow_succ, mul_comm _ n]
state_before: n k : ℕ
⊢ descFactorial n (k + 1) ≤ n ^ (k + 1)

tactic: exact Nat.mul_le_mul (Nat.sub_le _ _) (descFactorial_le_pow _ k)
state_before: n k : ℕ
⊢ (n - k) * descFactorial n k ≤ n * n ^ k