tasksource/leandojo huggingface dataset:
Theorem: eq_midpoint_of_dist_eq_half
File: Mathlib/Analysis/Convex/StrictConvexSpace.lean

tactic: apply eq_lineMap_of_dist_eq_mul_of_dist_eq_mul
state_before: 𝕜 : Type ?u.100748
E : Type u_2
inst✝¹⁰ : NormedLinearOrderedField 𝕜
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : StrictConvexSpace ℝ E
x✝ y✝ z✝ : E
a b r : ℝ
F : Type ?u.101025
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
PF : Type u
PE : Type u_1
inst✝³ : MetricSpace PF
inst✝² : MetricSpace PE
inst✝¹ : NormedAddTorsor F PF
inst✝ : NormedAddTorsor E PE
x y z : PE
hx : dist x y = dist x z / 2
hy : dist y z = dist x z / 2
⊢ y = midpoint ℝ x z

tactic: rwa [invOf_eq_inv, ← div_eq_inv_mul]
state_before: case hxy
𝕜 : Type ?u.100748
E : Type u_2
inst✝¹⁰ : NormedLinearOrderedField 𝕜
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : StrictConvexSpace ℝ E
x✝ y✝ z✝ : E
a b r : ℝ
F : Type ?u.101025
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
PF : Type u
PE : Type u_1
inst✝³ : MetricSpace PF
inst✝² : MetricSpace PE
inst✝¹ : NormedAddTorsor F PF
inst✝ : NormedAddTorsor E PE
x y z : PE
hx : dist x y = dist x z / 2
hy : dist y z = dist x z / 2
⊢ dist x y = ⅟2 * dist x z

tactic: rwa [invOf_eq_inv, ← one_div, sub_half, one_div, ← div_eq_inv_mul]
state_before: case hyz
𝕜 : Type ?u.100748
E : Type u_2
inst✝¹⁰ : NormedLinearOrderedField 𝕜
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : StrictConvexSpace ℝ E
x✝ y✝ z✝ : E
a b r : ℝ
F : Type ?u.101025
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
PF : Type u
PE : Type u_1
inst✝³ : MetricSpace PF
inst✝² : MetricSpace PE
inst✝¹ : NormedAddTorsor F PF
inst✝ : NormedAddTorsor E PE
x y z : PE
hx : dist x y = dist x z / 2
hy : dist y z = dist x z / 2
⊢ dist y z = (1 - ⅟2) * dist x z
Theorem: Computation.mem_parallel
File: Mathlib/Data/Seq/Parallel.lean

tactic: haveI := terminates_of_mem ac
state_before: α : Type u
β : Type v
S : WSeq (Computation α)
a : α
H : ∀ (s : Computation α), s ∈ S → s ~> a
c : Computation α
cs : c ∈ S
ac : a ∈ c
⊢ a ∈ parallel S

tactic: haveI := terminates_parallel cs
state_before: α : Type u
β : Type v
S : WSeq (Computation α)
a : α
H : ∀ (s : Computation α), s ∈ S → s ~> a
c : Computation α
cs : c ∈ S
ac : a ∈ c
this : Terminates c
⊢ a ∈ parallel S

tactic: exact mem_of_promises _ (parallel_promises H)
state_before: α : Type u
β : Type v
S : WSeq (Computation α)
a : α
H : ∀ (s : Computation α), s ∈ S → s ~> a
c : Computation α
cs : c ∈ S
ac : a ∈ c
this✝ : Terminates c
this : Terminates (parallel S)
⊢ a ∈ parallel S
Theorem: List.filter_filterMap
File: Std/Data/List/Lemmas.lean

tactic: rw [← filterMap_eq_filter, filterMap_filterMap]
state_before: α : Type u_1
β : Type u_2
f : α → Option β
p : β → Bool
l : List α
⊢ filter p (filterMap f l) = filterMap (fun x => Option.filter p (f x)) l

tactic: congr
state_before: α : Type u_1
β : Type u_2
f : α → Option β
p : β → Bool
l : List α
⊢ filterMap (fun x => Option.bind (f x) (Option.guard fun x => p x = true)) l =
    filterMap (fun x => Option.filter p (f x)) l

tactic: funext x
state_before: case e_f
α : Type u_1
β : Type u_2
f : α → Option β
p : β → Bool
l : List α
⊢ (fun x => Option.bind (f x) (Option.guard fun x => p x = true)) = fun x => Option.filter p (f x)

tactic: cases f x <;> simp [Option.filter, Option.guard]
state_before: case e_f.h
α : Type u_1
β : Type u_2
f : α → Option β
p : β → Bool
l : List α
x : α
⊢ Option.bind (f x) (Option.guard fun x => p x = true) = Option.filter p (f x)
Theorem: Int.neg_eq_comm
File: Std/Data/Int/Lemmas.lean

tactic: rw [eq_comm, Int.eq_neg_comm, eq_comm]
state_before: a b : Int
⊢ -a = b ↔ -b = a
Theorem: Polynomial.int_cast_coeff_zero
File: Mathlib/Data/Polynomial/Coeff.lean

tactic: cases i <;> simp
state_before: R✝ : Type u
S : Type v
a b : R✝
n m : ℕ
inst✝¹ : Semiring R✝
p q r : R✝[X]
i : ℤ
R : Type u_1
inst✝ : Ring R
⊢ coeff (↑i) 0 = ↑i
Theorem: Nat.half_le_of_sub_le_half
File: Mathlib/Data/Nat/Order/Basic.lean

tactic: rw [Nat.le_div_iff_mul_le two_pos, Nat.mul_sub_right_distrib, tsub_le_iff_right, mul_two,
  add_le_add_iff_left] at h
state_before: m n k l a b : ℕ
h : a - b ≤ a / 2
⊢ a / 2 ≤ b

tactic: rw [← Nat.mul_div_left b two_pos]
state_before: m n k l a b : ℕ
h✝ : a * 2 - b * 2 ≤ a
h : a ≤ b * 2
⊢ a / 2 ≤ b

tactic: exact Nat.div_le_div_right h
state_before: m n k l a b : ℕ
h✝ : a * 2 - b * 2 ≤ a
h : a ≤ b * 2
⊢ a / 2 ≤ b * 2 / 2
Theorem: MeasureTheory.integral_eq_integral_pos_part_sub_integral_neg_part
File: Mathlib/MeasureTheory/Integral/Bochner.lean

tactic: rw [← integral_sub hf.real_toNNReal]
state_before: α : Type u_1
E : Type ?u.1057071
F : Type ?u.1057074
𝕜 : Type ?u.1057077
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace ℝ E
inst✝⁸ : CompleteSpace E
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1059768
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf : Integrable f
⊢ (∫ (a : α), f a ∂μ) = (∫ (a : α), ↑(Real.toNNReal (f a)) ∂μ) - ∫ (a : α), ↑(Real.toNNReal (-f a)) ∂μ

tactic: simp
state_before: α : Type u_1
E : Type ?u.1057071
F : Type ?u.1057074
𝕜 : Type ?u.1057077
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace ℝ E
inst✝⁸ : CompleteSpace E
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1059768
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf : Integrable f
⊢ (∫ (a : α), f a ∂μ) = ∫ (a : α), ↑(Real.toNNReal (f a)) - ↑(Real.toNNReal (-f a)) ∂μ

tactic: exact hf.neg.real_toNNReal
state_before: α : Type u_1
E : Type ?u.1057071
F : Type ?u.1057074
𝕜 : Type ?u.1057077
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace ℝ E
inst✝⁸ : CompleteSpace E
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1059768
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf : Integrable f
⊢ Integrable fun a => ↑(Real.toNNReal (-f a))
Theorem: finRotate_succ_apply
File: Mathlib/Logic/Equiv/Fin.lean

tactic: cases n
state_before: m n : ℕ
i : Fin (n + 1)
⊢ ↑(finRotate (n + 1)) i = i + 1

tactic: rcases i.le_last.eq_or_lt with (rfl | h)
state_before: case succ
m n✝ : ℕ
i : Fin (Nat.succ n✝ + 1)
⊢ ↑(finRotate (Nat.succ n✝ + 1)) i = i + 1

tactic: exact @Subsingleton.elim (Fin 1) _ _ _
state_before: case zero
m : ℕ
i : Fin (Nat.zero + 1)
⊢ ↑(finRotate (Nat.zero + 1)) i = i + 1

tactic: simp [finRotate_last]
state_before: case succ.inl
m n✝ : ℕ
⊢ ↑(finRotate (Nat.succ n✝ + 1)) (Fin.last (n✝ + 1)) = Fin.last (n✝ + 1) + 1

tactic: cases i
state_before: case succ.inr
m n✝ : ℕ
i : Fin (Nat.succ n✝ + 1)
h : i < Fin.last (n✝ + 1)
⊢ ↑(finRotate (Nat.succ n✝ + 1)) i = i + 1

tactic: simp only [Fin.lt_iff_val_lt_val, Fin.val_last, Fin.val_mk] at h
state_before: case succ.inr.mk
m n✝ val✝ : ℕ
isLt✝ : val✝ < Nat.succ n✝ + 1
h : { val := val✝, isLt := isLt✝ } < Fin.last (n✝ + 1)
⊢ ↑(finRotate (Nat.succ n✝ + 1)) { val := val✝, isLt := isLt✝ } = { val := val✝, isLt := isLt✝ } + 1

tactic: simp [finRotate_of_lt h, Fin.eq_iff_veq, Fin.add_def, Nat.mod_eq_of_lt (Nat.succ_lt_succ h)]
state_before: case succ.inr.mk
m n✝ val✝ : ℕ
isLt✝ : val✝ < Nat.succ n✝ + 1
h : val✝ < n✝ + 1
⊢ ↑(finRotate (Nat.succ n✝ + 1)) { val := val✝, isLt := isLt✝ } = { val := val✝, isLt := isLt✝ } + 1
Theorem: slope_vadd_const
File: Mathlib/LinearAlgebra/AffineSpace/Slope.lean

tactic: ext (a b)
state_before: k : Type u_1
E : Type u_2
PE : Type u_3
inst✝³ : Field k
inst✝² : AddCommGroup E
inst✝¹ : Module k E
inst✝ : AddTorsor E PE
f : k → E
c : PE
⊢ (slope fun x => f x +ᵥ c) = slope f

tactic: simp only [slope, vadd_vsub_vadd_cancel_right, vsub_eq_sub]
state_before: case h.h
k : Type u_1
E : Type u_2
PE : Type u_3
inst✝³ : Field k
inst✝² : AddCommGroup E
inst✝¹ : Module k E
inst✝ : AddTorsor E PE
f : k → E
c : PE
a b : k
⊢ slope (fun x => f x +ᵥ c) a b = slope f a b
Theorem: discreteTopology_iff_singleton_mem_nhds
File: Mathlib/Topology/Order.lean

tactic: simp only [← singletons_open_iff_discrete, isOpen_iff_mem_nhds, mem_singleton_iff, forall_eq]
state_before: α : Type u_1
t t₁ t₂ : TopologicalSpace α
s : Set α
inst✝ : TopologicalSpace α
⊢ DiscreteTopology α ↔ ∀ (x : α), {x} ∈ 𝓝 x
Theorem: SatisfiesM.of_true
File: Std/Classes/LawfulMonad.lean

tactic: simp [← comp_map, Function.comp]
state_before: m : Type u_1 → Type u_2
α : Type u_1
p : α → Prop
inst✝¹ : Applicative m
inst✝ : LawfulApplicative m
x : m α
h : ∀ (a : α), p a
⊢ Subtype.val <$> (fun a => { val := a, property := (_ : p a) }) <$> x = x
Theorem: Subgroup.mem_rightTransversals_iff_existsUnique_mul_inv_mem
File: Mathlib/GroupTheory/Complement.lean

tactic: rw [rightTransversals, Set.mem_setOf_eq, isComplement_iff_existsUnique]
state_before: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
⊢ S ∈ rightTransversals T ↔ ∀ (g : G), ∃! s, g * (↑s)⁻¹ ∈ T

tactic: refine' ⟨fun h g => _, fun h g => _⟩
state_before: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
⊢ (∀ (g : G), ∃! x, ↑x.fst * ↑x.snd = g) ↔ ∀ (g : G), ∃! s, g * (↑s)⁻¹ ∈ T

tactic: obtain ⟨x, h1, h2⟩ := h g
state_before: case refine'_1
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : ∀ (g : G), ∃! x, ↑x.fst * ↑x.snd = g
g : G
⊢ ∃! s, g * (↑s)⁻¹ ∈ T

tactic: obtain ⟨x, h1, h2⟩ := h g
state_before: case refine'_2
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : ∀ (g : G), ∃! s, g * (↑s)⁻¹ ∈ T
g : G
⊢ ∃! x, ↑x.fst * ↑x.snd = g

tactic: refine' ⟨⟨⟨g * (↑x)⁻¹, h1⟩, x⟩, inv_mul_cancel_right g x, fun y hy => _⟩
state_before: case refine'_2.intro.intro
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : ∀ (g : G), ∃! s, g * (↑s)⁻¹ ∈ T
g : G
x : ↑S
h1 : g * (↑x)⁻¹ ∈ T
h2 : ∀ (y : ↑S), (fun s => g * (↑s)⁻¹ ∈ T) y → y = x
⊢ ∃! x, ↑x.fst * ↑x.snd = g

tactic: exact Prod.ext (Subtype.ext (eq_mul_inv_of_mul_eq (hf ▸ hy))) hf
state_before: case refine'_2.intro.intro
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : ∀ (g : G), ∃! s, g * (↑s)⁻¹ ∈ T
g : G
x : ↑S
h1 : g * (↑x)⁻¹ ∈ T
h2 : ∀ (y : ↑S), (fun s => g * (↑s)⁻¹ ∈ T) y → y = x
y : ↑T × ↑S
hy : (fun x => ↑x.fst * ↑x.snd = g) y
hf : y.snd = x
⊢ y = ({ val := g * (↑x)⁻¹, property := h1 }, x)
Theorem: MeasureTheory.memℒp_map_measure_iff
File: Mathlib/MeasureTheory/Function/LpSeminorm.lean

tactic: simp [Memℒp, snorm_map_measure hg hf, hg.comp_aemeasurable hf, hg]
state_before: α : Type u_3
E : Type u_2
F : Type ?u.3098262
G : Type ?u.3098265
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
β : Type u_1
mβ : MeasurableSpace β
f : α → β
g : β → E
hg : AEStronglyMeasurable g (Measure.map f μ)
hf : AEMeasurable f
⊢ Memℒp g p ↔ Memℒp (g ∘ f) p
Theorem: Ideal.span_singleton_eq_top
File: Mathlib/RingTheory/Ideal/Basic.lean

tactic: rw [isUnit_iff_dvd_one, ← span_singleton_le_span_singleton, span_singleton_one, eq_top_iff]
state_before: α : Type u
β : Type v
a b : α
inst✝ : CommSemiring α
I : Ideal α
x : α
⊢ span {x} = ⊤ ↔ IsUnit x
Theorem: CategoryTheory.Subobject.ofMkLE_comp_ofLE
File: Mathlib/CategoryTheory/Subobject/Basic.lean

tactic: simp only [ofMkLE, ofLEMk, ofLE, ofMkLEMk, ← Functor.map_comp underlying,
  assoc]
state_before: C : Type u₁
inst✝² : Category C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category D
B A₁ : C
f : A₁ ⟶ B
inst✝ : Mono f
X Y : Subobject B
h₁ : mk f ≤ X
h₂ : X ≤ Y
⊢ ofMkLE f X h₁ ≫ ofLE X Y h₂ = ofMkLE f Y (_ : mk f ≤ Y)

tactic: congr 1
state_before: C : Type u₁
inst✝² : Category C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category D
B A₁ : C
f : A₁ ⟶ B
inst✝ : Mono f
X Y : Subobject B
h₁ : mk f ≤ X
h₂ : X ≤ Y
⊢ (underlyingIso f).inv ≫ underlying.map (LE.le.hom h₁ ≫ LE.le.hom h₂) =
    (underlyingIso f).inv ≫ underlying.map (LE.le.hom (_ : mk f ≤ Y))
Theorem: Matrix.det_vandermonde_eq_zero_iff
File: Mathlib/LinearAlgebra/Vandermonde.lean

tactic: constructor
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
v : Fin n → R
⊢ det (vandermonde v) = 0 ↔ ∃ i j, v i = v j ∧ i ≠ j

tactic: simp only [det_vandermonde v, Finset.prod_eq_zero_iff, sub_eq_zero, forall_exists_index]
state_before: case mp
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
v : Fin n → R
⊢ det (vandermonde v) = 0 → ∃ i j, v i = v j ∧ i ≠ j

tactic: rintro i ⟨_, j, h₁, h₂⟩
state_before: case mp
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
v : Fin n → R
⊢ ∀ (x : Fin n), (x ∈ univ ∧ ∃ a, a ∈ Ioi x ∧ v a = v x) → ∃ i j, v i = v j ∧ i ≠ j

tactic: exact ⟨j, i, h₂, (mem_Ioi.mp h₁).ne'⟩
state_before: case mp.intro.intro.intro
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
v : Fin n → R
i : Fin n
left✝ : i ∈ univ
j : Fin n
h₁ : j ∈ Ioi i
h₂ : v j = v i
⊢ ∃ i j, v i = v j ∧ i ≠ j

tactic: simp only [Ne.def, forall_exists_index, and_imp]
state_before: case mpr
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
v : Fin n → R
⊢ (∃ i j, v i = v j ∧ i ≠ j) → det (vandermonde v) = 0

tactic: refine' fun i j h₁ h₂ => Matrix.det_zero_of_row_eq h₂ (funext fun k => _)
state_before: case mpr
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
v : Fin n → R
⊢ ∀ (x x_1 : Fin n), v x = v x_1 → ¬x = x_1 → det (vandermonde v) = 0

tactic: rw [vandermonde_apply, vandermonde_apply, h₁]
state_before: case mpr
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
v : Fin n → R
i j : Fin n
h₁ : v i = v j
h₂ : ¬i = j
k : Fin n
⊢ vandermonde v i k = vandermonde v j k
Theorem: covariant_flip_mul_iff
File: Mathlib/Algebra/CovariantAndContravariant.lean

tactic: rw [flip_mul]
state_before: M : Type ?u.6553
N : Type u_1
μ : M → N → N
r : N → N → Prop
inst✝ : CommSemigroup N
⊢ Covariant N N (flip fun x x_1 => x * x_1) r ↔ Covariant N N (fun x x_1 => x * x_1) r
Theorem: Metric.diam_union
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: simp only [diam, dist_edist]
state_before: α : Type u
β : Type v
X : Type ?u.535752
ι : Type ?u.535755
inst✝ : PseudoMetricSpace α
s : Set α
x y z : α
t : Set α
xs : x ∈ s
yt : y ∈ t
⊢ diam (s ∪ t) ≤ diam s + dist x y + diam t

tactic: refine (ENNReal.toReal_le_add' (EMetric.diam_union xs yt) ?_ ?_).trans
  (add_le_add_right ENNReal.toReal_add_le _)
state_before: α : Type u
β : Type v
X : Type ?u.535752
ι : Type ?u.535755
inst✝ : PseudoMetricSpace α
s : Set α
x y z : α
t : Set α
xs : x ∈ s
yt : y ∈ t
⊢ ENNReal.toReal (EMetric.diam (s ∪ t)) ≤
    ENNReal.toReal (EMetric.diam s) + ENNReal.toReal (edist x y) + ENNReal.toReal (EMetric.diam t)

tactic: simp only [ENNReal.add_eq_top, edist_ne_top, or_false]
state_before: case refine_1
α : Type u
β : Type v
X : Type ?u.535752
ι : Type ?u.535755
inst✝ : PseudoMetricSpace α
s : Set α
x y z : α
t : Set α
xs : x ∈ s
yt : y ∈ t
⊢ EMetric.diam s + edist x y = ⊤ → EMetric.diam (s ∪ t) = ⊤

tactic: exact fun h ↦ top_unique <| h ▸ EMetric.diam_mono (subset_union_left _ _)
state_before: case refine_1
α : Type u
β : Type v
X : Type ?u.535752
ι : Type ?u.535755
inst✝ : PseudoMetricSpace α
s : Set α
x y z : α
t : Set α
xs : x ∈ s
yt : y ∈ t
⊢ EMetric.diam s = ⊤ → EMetric.diam (s ∪ t) = ⊤

tactic: exact fun h ↦ top_unique <| h ▸ EMetric.diam_mono (subset_union_right _ _)
state_before: case refine_2
α : Type u
β : Type v
X : Type ?u.535752
ι : Type ?u.535755
inst✝ : PseudoMetricSpace α
s : Set α
x y z : α
t : Set α
xs : x ∈ s
yt : y ∈ t
⊢ EMetric.diam t = ⊤ → EMetric.diam (s ∪ t) = ⊤
Theorem: Basis.ext'
File: Mathlib/LinearAlgebra/Basis.lean

tactic: ext x
state_before: ι : Type u_5
ι' : Type ?u.184951
R : Type u_1
R₂ : Type ?u.184957
K : Type ?u.184960
M : Type u_3
M' : Type ?u.184966
M'' : Type ?u.184969
V : Type u
V' : Type ?u.184974
inst✝⁹ : Semiring R
inst✝⁸ : AddCommMonoid M
inst✝⁷ : Module R M
inst✝⁶ : AddCommMonoid M'
inst✝⁵ : Module R M'
b b₁ : Basis ι R M
i : ι
c : R
x : M
R₁ : Type u_2
inst✝⁴ : Semiring R₁
σ : R →+* R₁
σ' : R₁ →+* R
inst✝³ : RingHomInvPair σ σ'
inst✝² : RingHomInvPair σ' σ
M₁ : Type u_4
inst✝¹ : AddCommMonoid M₁
inst✝ : Module R₁ M₁
f₁ f₂ : M ≃ₛₗ[σ] M₁
h : ∀ (i : ι), ↑f₁ (↑b i) = ↑f₂ (↑b i)
⊢ f₁ = f₂

tactic: rw [← b.total_repr x, Finsupp.total_apply, Finsupp.sum]
state_before: case h
ι : Type u_5
ι' : Type ?u.184951
R : Type u_1
R₂ : Type ?u.184957
K : Type ?u.184960
M : Type u_3
M' : Type ?u.184966
M'' : Type ?u.184969
V : Type u
V' : Type ?u.184974
inst✝⁹ : Semiring R
inst✝⁸ : AddCommMonoid M
inst✝⁷ : Module R M
inst✝⁶ : AddCommMonoid M'
inst✝⁵ : Module R M'
b b₁ : Basis ι R M
i : ι
c : R
x✝ : M
R₁ : Type u_2
inst✝⁴ : Semiring R₁
σ : R →+* R₁
σ' : R₁ →+* R
inst✝³ : RingHomInvPair σ σ'
inst✝² : RingHomInvPair σ' σ
M₁ : Type u_4
inst✝¹ : AddCommMonoid M₁
inst✝ : Module R₁ M₁
f₁ f₂ : M ≃ₛₗ[σ] M₁
h : ∀ (i : ι), ↑f₁ (↑b i) = ↑f₂ (↑b i)
x : M
⊢ ↑f₁ x = ↑f₂ x

tactic: simp only [LinearEquiv.map_sum, LinearEquiv.map_smulₛₗ, h]
state_before: case h
ι : Type u_5
ι' : Type ?u.184951
R : Type u_1
R₂ : Type ?u.184957
K : Type ?u.184960
M : Type u_3
M' : Type ?u.184966
M'' : Type ?u.184969
V : Type u
V' : Type ?u.184974
inst✝⁹ : Semiring R
inst✝⁸ : AddCommMonoid M
inst✝⁷ : Module R M
inst✝⁶ : AddCommMonoid M'
inst✝⁵ : Module R M'
b b₁ : Basis ι R M
i : ι
c : R
x✝ : M
R₁ : Type u_2
inst✝⁴ : Semiring R₁
σ : R →+* R₁
σ' : R₁ →+* R
inst✝³ : RingHomInvPair σ σ'
inst✝² : RingHomInvPair σ' σ
M₁ : Type u_4
inst✝¹ : AddCommMonoid M₁
inst✝ : Module R₁ M₁
f₁ f₂ : M ≃ₛₗ[σ] M₁
h : ∀ (i : ι), ↑f₁ (↑b i) = ↑f₂ (↑b i)
x : M
⊢ ↑f₁ (∑ a in (↑b.repr x).support, ↑(↑b.repr x) a • ↑b a) = ↑f₂ (∑ a in (↑b.repr x).support, ↑(↑b.repr x) a • ↑b a)
Theorem: Metric.diam_eq_zero_of_unbounded
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: rw [diam, ediam_of_unbounded h, ENNReal.top_toReal]
state_before: α : Type u
β : Type v
X : Type ?u.535436
ι : Type ?u.535439
inst✝ : PseudoMetricSpace α
s : Set α
x y z : α
h : ¬Bounded s
⊢ diam s = 0
Theorem: IsOpen.ite'
File: Mathlib/Topology/ContinuousOn.lean

tactic: classical
  simp only [isOpen_iff_continuous_mem, Set.ite] at *
  convert continuous_piecewise (fun x hx => propext (ht x hx)) hs.continuousOn hs'.continuousOn
  rename_i x
  by_cases hx : x ∈ t <;> simp [hx]
state_before: α : Type u_1
β : Type ?u.385864
γ : Type ?u.385867
δ : Type ?u.385870
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
s s' t : Set α
hs : IsOpen s
hs' : IsOpen s'
ht : ∀ (x : α), x ∈ frontier t → (x ∈ s ↔ x ∈ s')
⊢ IsOpen (Set.ite t s s')

tactic: simp only [isOpen_iff_continuous_mem, Set.ite] at *
state_before: α : Type u_1
β : Type ?u.385864
γ : Type ?u.385867
δ : Type ?u.385870
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
s s' t : Set α
hs : IsOpen s
hs' : IsOpen s'
ht : ∀ (x : α), x ∈ frontier t → (x ∈ s ↔ x ∈ s')
⊢ IsOpen (Set.ite t s s')

tactic: convert continuous_piecewise (fun x hx => propext (ht x hx)) hs.continuousOn hs'.continuousOn
state_before: α : Type u_1
β : Type ?u.385864
γ : Type ?u.385867
δ : Type ?u.385870
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
s s' t : Set α
ht : ∀ (x : α), x ∈ frontier t → (x ∈ s ↔ x ∈ s')
hs : Continuous fun x => x ∈ s
hs' : Continuous fun x => x ∈ s'
⊢ Continuous fun x => x ∈ s ∩ t ∪ s' \ t

tactic: rename_i x
state_before: case h.e'_5.h.a
α : Type u_1
β : Type ?u.385864
γ : Type ?u.385867
δ : Type ?u.385870
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
s s' t : Set α
ht : ∀ (x : α), x ∈ frontier t → (x ∈ s ↔ x ∈ s')
hs : Continuous fun x => x ∈ s
hs' : Continuous fun x => x ∈ s'
x✝ : α
⊢ x✝ ∈ s ∩ t ∪ s' \ t ↔ piecewise t (fun x => x ∈ s) (fun x => x ∈ s') x✝

tactic: by_cases hx : x ∈ t <;> simp [hx]
state_before: case h.e'_5.h.a
α : Type u_1
β : Type ?u.385864
γ : Type ?u.385867
δ : Type ?u.385870
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
s s' t : Set α
ht : ∀ (x : α), x ∈ frontier t → (x ∈ s ↔ x ∈ s')
hs : Continuous fun x => x ∈ s
hs' : Continuous fun x => x ∈ s'
x : α
⊢ x ∈ s ∩ t ∪ s' \ t ↔ piecewise t (fun x => x ∈ s) (fun x => x ∈ s') x
Theorem: StrictConvex.smul_mem_of_zero_mem
File: Mathlib/Analysis/Convex/Strict.lean

tactic: simpa using hs.add_smul_mem zero_mem (by simpa using hx) hx₀ ht₀ ht₁
state_before: 𝕜 : Type u_1
𝕝 : Type ?u.190924
E : Type u_2
F : Type ?u.190930
β : Type ?u.190933
inst✝⁶ : OrderedRing 𝕜
inst✝⁵ : TopologicalSpace E
inst✝⁴ : TopologicalSpace F
inst✝³ : AddCommGroup E
inst✝² : AddCommGroup F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s t✝ : Set E
x y : E
hs : StrictConvex 𝕜 s
zero_mem : 0 ∈ s
hx : x ∈ s
hx₀ : x ≠ 0
t : 𝕜
ht₀ : 0 < t
ht₁ : t < 1
⊢ t • x ∈ interior s

tactic: simpa using hx
state_before: 𝕜 : Type u_1
𝕝 : Type ?u.190924
E : Type u_2
F : Type ?u.190930
β : Type ?u.190933
inst✝⁶ : OrderedRing 𝕜
inst✝⁵ : TopologicalSpace E
inst✝⁴ : TopologicalSpace F
inst✝³ : AddCommGroup E
inst✝² : AddCommGroup F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s t✝ : Set E
x y : E
hs : StrictConvex 𝕜 s
zero_mem : 0 ∈ s
hx : x ∈ s
hx₀ : x ≠ 0
t : 𝕜
ht₀ : 0 < t
ht₁ : t < 1
⊢ 0 + x ∈ s
Theorem: LinearMap.trace_eq_matrix_trace
File: Mathlib/LinearAlgebra/Trace.lean

tactic: rw [trace_eq_matrix_trace_of_finset R b.reindexFinsetRange, ← traceAux_def, ← traceAux_def,
  traceAux_eq R b b.reindexFinsetRange]
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type ?u.237802
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b : Basis ι R M
c : Basis κ R M
f : M →ₗ[R] M
⊢ ↑(trace R M) f = Matrix.trace (↑(toMatrix b b) f)
Theorem: Ideal.prod.ext_iff
File: Mathlib/RingTheory/Ideal/Prod.lean

tactic: simp only [← idealProdEquiv_symm_apply, idealProdEquiv.symm.injective.eq_iff, Prod.mk.inj_iff]
state_before: R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I'✝ : Ideal R
J✝ J'✝ : Ideal S
I I' : Ideal R
J J' : Ideal S
⊢ prod I J = prod I' J' ↔ I = I' ∧ J = J'
Theorem: not_xor
File: Mathlib/Logic/Basic.lean

tactic: simp only [not_and, Xor', not_or, not_not, ← iff_iff_implies_and_implies]
state_before: P Q : Prop
⊢ ¬Xor' P Q ↔ (P ↔ Q)
Theorem: AffineMap.lineMap_apply_one
File: Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean

tactic: simp [(lineMap_apply), (vsub_vadd)]
state_before: k : Type u_2
V1 : Type u_3
P1 : Type u_1
V2 : Type ?u.456425
P2 : Type ?u.456428
V3 : Type ?u.456431
P3 : Type ?u.456434
V4 : Type ?u.456437
P4 : Type ?u.456440
inst✝¹² : Ring k
inst✝¹¹ : AddCommGroup V1
inst✝¹⁰ : Module k V1
inst✝⁹ : AffineSpace V1 P1
inst✝⁸ : AddCommGroup V2
inst✝⁷ : Module k V2
inst✝⁶ : AffineSpace V2 P2
inst✝⁵ : AddCommGroup V3
inst✝⁴ : Module k V3
inst✝³ : AffineSpace V3 P3
inst✝² : AddCommGroup V4
inst✝¹ : Module k V4
inst✝ : AffineSpace V4 P4
p₀ p₁ : P1
⊢ ↑(lineMap p₀ p₁) 1 = p₁
Theorem: MeasureTheory.integral_pos_iff_support_of_nonneg_ae
File: Mathlib/MeasureTheory/Integral/Bochner.lean

tactic: simp_rw [(integral_nonneg_of_ae hf).lt_iff_ne, pos_iff_ne_zero, Ne.def, @eq_comm ℝ 0,
  integral_eq_zero_iff_of_nonneg_ae hf hfi, Filter.EventuallyEq, ae_iff, Pi.zero_apply,
  Function.support]
state_before: α : Type u_1
E : Type ?u.1114206
F : Type ?u.1114209
𝕜 : Type ?u.1114212
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace ℝ E
inst✝⁸ : CompleteSpace E
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1116903
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf : 0 ≤ᵐ[μ] f
hfi : Integrable f
⊢ (0 < ∫ (x : α), f x ∂μ) ↔ 0 < ↑↑μ (Function.support f)
Theorem: Irrational.div_rat
File: Mathlib/Data/Real/Irrational.lean

tactic: rw [div_eq_mul_inv, ← cast_inv]
state_before: q✝ : ℚ
x y : ℝ
h : Irrational x
q : ℚ
hq : q ≠ 0
⊢ Irrational (x / ↑q)

tactic: exact h.mul_rat (inv_ne_zero hq)
state_before: q✝ : ℚ
x y : ℝ
h : Irrational x
q : ℚ
hq : q ≠ 0
⊢ Irrational (x * ↑q⁻¹)