tasksource/leandojo huggingface dataset:
Theorem: Stream'.tail_inits
File: Mathlib/Data/Stream/Init.lean

tactic: unfold inits
state_before: α : Type u
β : Type v
δ : Type w
s : Stream' α
⊢ tail (inits s) = initsCore [head s, head (tail s)] (tail (tail s))

tactic: rw [inits_core_eq]
state_before: α : Type u
β : Type v
δ : Type w
s : Stream' α
⊢ tail (initsCore [head s] (tail s)) = initsCore [head s, head (tail s)] (tail (tail s))

tactic: rfl
state_before: α : Type u
β : Type v
δ : Type w
s : Stream' α
⊢ tail ([head s] :: initsCore ([head s] ++ [head (tail s)]) (tail (tail s))) =
    initsCore [head s, head (tail s)] (tail (tail s))
Theorem: Nat.cast_tsub
File: Mathlib/Data/Nat/Cast/Basic.lean

tactic: cases' le_total m n with h h
state_before: α : Type u_1
β : Type ?u.21410
inst✝³ : CanonicallyOrderedCommSemiring α
inst✝² : Sub α
inst✝¹ : OrderedSub α
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
m n : ℕ
⊢ ↑(m - n) = ↑m - ↑n

tactic: rw [tsub_eq_zero_of_le h, cast_zero, tsub_eq_zero_of_le]
state_before: case inl
α : Type u_1
β : Type ?u.21410
inst✝³ : CanonicallyOrderedCommSemiring α
inst✝² : Sub α
inst✝¹ : OrderedSub α
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
m n : ℕ
h : m ≤ n
⊢ ↑(m - n) = ↑m - ↑n

tactic: exact mono_cast h
state_before: case inl
α : Type u_1
β : Type ?u.21410
inst✝³ : CanonicallyOrderedCommSemiring α
inst✝² : Sub α
inst✝¹ : OrderedSub α
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
m n : ℕ
h : m ≤ n
⊢ ↑m ≤ ↑n

tactic: rcases le_iff_exists_add'.mp h with ⟨m, rfl⟩
state_before: case inr
α : Type u_1
β : Type ?u.21410
inst✝³ : CanonicallyOrderedCommSemiring α
inst✝² : Sub α
inst✝¹ : OrderedSub α
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
m n : ℕ
h : n ≤ m
⊢ ↑(m - n) = ↑m - ↑n

tactic: rw [add_tsub_cancel_right, cast_add, add_tsub_cancel_right]
state_before: case inr.intro
α : Type u_1
β : Type ?u.21410
inst✝³ : CanonicallyOrderedCommSemiring α
inst✝² : Sub α
inst✝¹ : OrderedSub α
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
n m : ℕ
h : n ≤ m + n
⊢ ↑(m + n - n) = ↑(m + n) - ↑n
Theorem: inf_sdiff_distrib_left
File: Mathlib/Order/BooleanAlgebra.lean

tactic: rw [sdiff_inf, sdiff_eq_bot_iff.2 inf_le_left, bot_sup_eq, inf_sdiff_assoc]
state_before: α : Type u
β : Type ?u.39786
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
a b c : α
⊢ a ⊓ b \ c = (a ⊓ b) \ (a ⊓ c)
Theorem: WittVector.ghostFun_int_cast
File: Mathlib/RingTheory/WittVector/Basic.lean

tactic: cases i <;> simp [*, Int.castDef, ghostFun_nat_cast, ghostFun_neg, -Pi.coe_nat, -Pi.coe_int]
state_before: p : ℕ
R : Type u_1
S : Type ?u.755378
T : Type ?u.755381
hp : Fact (Nat.Prime p)
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : CommRing T
α : Type ?u.755396
β : Type ?u.755399
x y : 𝕎 R
i : ℤ
⊢ WittVector.ghostFun (Int.castDef i) = ↑i
Theorem: SubMulAction.neg_mem
File: Mathlib/GroupTheory/GroupAction/SubMulAction.lean

tactic: rw [← neg_one_smul R]
state_before: S : Type u'
T : Type u''
R : Type u
M : Type v
inst✝² : Ring R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
p p' : SubMulAction R M
r : R
x y : M
hx : x ∈ p
⊢ -x ∈ p

tactic: exact p.smul_mem _ hx
state_before: S : Type u'
T : Type u''
R : Type u
M : Type v
inst✝² : Ring R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
p p' : SubMulAction R M
r : R
x y : M
hx : x ∈ p
⊢ -1 • x ∈ p
Theorem: FractionalIdeal.spanSingleton_eq_spanSingleton
File: Mathlib/RingTheory/FractionalIdeal.lean

tactic: rw [← Submodule.span_singleton_eq_span_singleton, spanSingleton, spanSingleton]
state_before: R : Type u_1
inst✝⁷ : CommRing R
S : Submonoid R
P : Type u_2
inst✝⁶ : CommRing P
inst✝⁵ : Algebra R P
loc : IsLocalization S P
R₁ : Type ?u.1308502
inst✝⁴ : CommRing R₁
K : Type ?u.1308508
inst✝³ : Field K
inst✝² : Algebra R₁ K
inst✝¹ : IsFractionRing R₁ K
inst✝ : NoZeroSMulDivisors R P
x y : P
⊢ spanSingleton S x = spanSingleton S y ↔ ∃ z, z • x = y

tactic: exact Subtype.mk_eq_mk
state_before: R : Type u_1
inst✝⁷ : CommRing R
S : Submonoid R
P : Type u_2
inst✝⁶ : CommRing P
inst✝⁵ : Algebra R P
loc : IsLocalization S P
R₁ : Type ?u.1308502
inst✝⁴ : CommRing R₁
K : Type ?u.1308508
inst✝³ : Field K
inst✝² : Algebra R₁ K
inst✝¹ : IsFractionRing R₁ K
inst✝ : NoZeroSMulDivisors R P
x y : P
⊢ { val := span R {x}, property := (_ : IsFractional S (span R {x})) } =
      { val := span R {y}, property := (_ : IsFractional S (span R {y})) } ↔
    span R {x} = span R {y}
Theorem: Polynomial.natDegree_iterate_comp
File: Mathlib/Data/Polynomial/Degree/Lemmas.lean

tactic: induction' k with k IH
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
k : ℕ
⊢ natDegree ((comp p^[k]) q) = natDegree p ^ k * natDegree q

tactic: simp
state_before: case zero
R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
⊢ natDegree ((comp p^[Nat.zero]) q) = natDegree p ^ Nat.zero * natDegree q

tactic: rw [Function.iterate_succ_apply', natDegree_comp, IH, pow_succ, mul_assoc]
state_before: case succ
R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
k : ℕ
IH : natDegree ((comp p^[k]) q) = natDegree p ^ k * natDegree q
⊢ natDegree ((comp p^[Nat.succ k]) q) = natDegree p ^ Nat.succ k * natDegree q
Theorem: RingHom.isIntegralElem_of_isIntegralElem_comp
File: Mathlib/RingTheory/IntegralClosure.lean

tactic: rwa [← eval₂_map] at hp'
state_before: R : Type u_1
A : Type ?u.1572223
B : Type ?u.1572226
S : Type u_3
T : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : CommRing S
inst✝⁴ : CommRing T
inst✝³ : Algebra A B
inst✝² : Algebra R B
f : R →+* S
g : S →+* T
inst✝¹ : Algebra R A
inst✝ : IsScalarTower R A B
x : T
h : IsIntegralElem (comp g f) x
p : R[X]
hp : Monic p
hp' : eval₂ (comp g f) x p = 0
⊢ eval₂ g x (Polynomial.map f p) = 0
Theorem: MeasureTheory.setToFun_finset_sum
File: Mathlib/MeasureTheory/Integral/SetToL1.lean

tactic: convert setToFun_finset_sum' hT s hf with a
state_before: α : Type u_1
E : Type u_2
F : Type u_3
F' : Type ?u.1436330
G : Type ?u.1436333
𝕜 : Type ?u.1436336
p : ℝ≥0∞
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace ℝ F'
inst✝¹ : NormedAddCommGroup G
m : MeasurableSpace α
μ : Measure α
inst✝ : CompleteSpace F
T T' T'' : Set α → E →L[ℝ] F
C C' C'' : ℝ
f✝ g : α → E
hT : DominatedFinMeasAdditive μ T C
ι : Type u_4
s : Finset ι
f : ι → α → E
hf : ∀ (i : ι), i ∈ s → Integrable (f i)
⊢ (setToFun μ T hT fun a => ∑ i in s, f i a) = ∑ i in s, setToFun μ T hT (f i)

tactic: simp
state_before: case h.e'_2.h.e'_14.h
α : Type u_1
E : Type u_2
F : Type u_3
F' : Type ?u.1436330
G : Type ?u.1436333
𝕜 : Type ?u.1436336
p : ℝ≥0∞
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace ℝ F'
inst✝¹ : NormedAddCommGroup G
m : MeasurableSpace α
μ : Measure α
inst✝ : CompleteSpace F
T T' T'' : Set α → E →L[ℝ] F
C C' C'' : ℝ
f✝ g : α → E
hT : DominatedFinMeasAdditive μ T C
ι : Type u_4
s : Finset ι
f : ι → α → E
hf : ∀ (i : ι), i ∈ s → Integrable (f i)
a : α
⊢ ∑ i in s, f i a = Finset.sum s (fun i => f i) a
Theorem: Real.hasSum_cos
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Series.lean

tactic: exact_mod_cast Complex.hasSum_cos r
state_before: r : ℝ
⊢ HasSum (fun n => (-1) ^ n * r ^ (2 * n) / ↑(2 * n)!) (cos r)
Theorem: Nat.prod_factors
File: Mathlib/Data/Nat/Factors.lean

tactic: simp
state_before: ⊢ 0 ≠ 0 → List.prod (factors 0) = 0

tactic: simp
state_before: ⊢ 1 ≠ 0 → List.prod (factors 1) = 1

tactic: have h₁ : (k + 2) / m ≠ 0 := fun h => by
  have : (k + 2) = 0 * m := (Nat.div_eq_iff_eq_mul_left (minFac_pos _) (minFac_dvd _)).1 h
  rw [zero_mul] at this; exact (show k + 2 ≠ 0 by simp) this
state_before: k : ℕ
x✝ : k + 2 ≠ 0
m : ℕ := minFac (k + 2)
this : (k + 2) / m < k + 2
⊢ List.prod (factors (k + 2)) = k + 2

tactic: rw [factors, List.prod_cons, prod_factors h₁, Nat.mul_div_cancel' (minFac_dvd _)]
state_before: k : ℕ
x✝ : k + 2 ≠ 0
m : ℕ := minFac (k + 2)
this : (k + 2) / m < k + 2
h₁ : (k + 2) / m ≠ 0
⊢ List.prod (factors (k + 2)) = k + 2

tactic: have : (k + 2) = 0 * m := (Nat.div_eq_iff_eq_mul_left (minFac_pos _) (minFac_dvd _)).1 h
state_before: k : ℕ
x✝ : k + 2 ≠ 0
m : ℕ := minFac (k + 2)
this : (k + 2) / m < k + 2
h : (k + 2) / m = 0
⊢ False

tactic: rw [zero_mul] at this
state_before: k : ℕ
x✝ : k + 2 ≠ 0
m : ℕ := minFac (k + 2)
this✝ : (k + 2) / m < k + 2
h : (k + 2) / m = 0
this : k + 2 = 0 * m
⊢ False

tactic: exact (show k + 2 ≠ 0 by simp) this
state_before: k : ℕ
x✝ : k + 2 ≠ 0
m : ℕ := minFac (k + 2)
this✝ : (k + 2) / m < k + 2
h : (k + 2) / m = 0
this : k + 2 = 0
⊢ False

tactic: simp
state_before: k : ℕ
x✝ : k + 2 ≠ 0
m : ℕ := minFac (k + 2)
this✝ : (k + 2) / m < k + 2
h : (k + 2) / m = 0
this : k + 2 = 0
⊢ k + 2 ≠ 0
Theorem: List.rtakeWhile_suffix
File: Mathlib/Data/List/Rdrop.lean

tactic: rw [← reverse_prefix, rtakeWhile, reverse_reverse]
state_before: α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rtakeWhile p l <:+ l

tactic: exact takeWhile_prefix _
state_before: α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ takeWhile p (reverse l) <+: reverse l
Theorem: Trivialization.coordChange_apply_snd
File: Mathlib/Topology/FiberBundle/Trivialization.lean

tactic: rw [coordChange, e₁.symm_apply_mk_proj (e₁.mem_source.2 h)]
state_before: ι : Type ?u.54393
B : Type u_1
F : Type u_2
E : B → Type ?u.54404
Z : Type u_3
inst✝³ : TopologicalSpace B
inst✝² : TopologicalSpace F
proj : Z → B
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace (TotalSpace E)
e : Trivialization F proj
x : Z
e' : Trivialization F TotalSpace.proj
x' : TotalSpace E
b : B
y : E b
e₁ e₂ : Trivialization F proj
p : Z
h : proj p ∈ e₁.baseSet
⊢ coordChange e₁ e₂ (proj p) (↑e₁ p).snd = (↑e₂ p).snd
Theorem: Submodule.IsPrincipal.prime_generator_of_isPrime
File: Mathlib/RingTheory/PrincipalIdealDomain.lean

tactic: simpa only [← mem_iff_generator_dvd S] using is_prime.2
state_before: R : Type u
M : Type v
inst✝³ : AddCommGroup M
inst✝² : CommRing R
inst✝¹ : Module R M
S : Ideal R
inst✝ : IsPrincipal S
is_prime : Ideal.IsPrime S
ne_bot : S ≠ ⊥
x✝¹ x✝ : R
⊢ generator S ∣ x✝¹ * x✝ → generator S ∣ x✝¹ ∨ generator S ∣ x✝
Theorem: Metric.Bounded.subset_ball_lt
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: rcases h.subset_ball c with ⟨r, hr⟩
state_before: α : Type u
β : Type v
X : Type ?u.489346
ι : Type ?u.489349
inst✝ : PseudoMetricSpace α
x : α
s t : Set α
r : ℝ
h : Bounded s
a : ℝ
c : α
⊢ ∃ r, a < r ∧ s ⊆ closedBall c r

tactic: refine' ⟨max r (a + 1), lt_of_lt_of_le (by linarith) (le_max_right _ _), _⟩
state_before: case intro
α : Type u
β : Type v
X : Type ?u.489346
ι : Type ?u.489349
inst✝ : PseudoMetricSpace α
x : α
s t : Set α
r✝ : ℝ
h : Bounded s
a : ℝ
c : α
r : ℝ
hr : s ⊆ closedBall c r
⊢ ∃ r, a < r ∧ s ⊆ closedBall c r

tactic: exact hr.trans (closedBall_subset_closedBall (le_max_left _ _))
state_before: case intro
α : Type u
β : Type v
X : Type ?u.489346
ι : Type ?u.489349
inst✝ : PseudoMetricSpace α
x : α
s t : Set α
r✝ : ℝ
h : Bounded s
a : ℝ
c : α
r : ℝ
hr : s ⊆ closedBall c r
⊢ s ⊆ closedBall c (max r (a + 1))

tactic: linarith
state_before: α : Type u
β : Type v
X : Type ?u.489346
ι : Type ?u.489349
inst✝ : PseudoMetricSpace α
x : α
s t : Set α
r✝ : ℝ
h : Bounded s
a : ℝ
c : α
r : ℝ
hr : s ⊆ closedBall c r
⊢ a < a + 1
Theorem: Qpf.Fix.rec_unique
File: Mathlib/Data/QPF/Univariate/Basic.lean

tactic: ext x
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
h : Fix F → α
hyp : ∀ (x : F (Fix F)), h (mk x) = g (h <$> x)
⊢ rec g = h

tactic: apply Fix.ind_rec
state_before: case h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
h : Fix F → α
hyp : ∀ (x : F (Fix F)), h (mk x) = g (h <$> x)
x : Fix F
⊢ rec g x = h x

tactic: intro x hyp'
state_before: case h.h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
h : Fix F → α
hyp : ∀ (x : F (Fix F)), h (mk x) = g (h <$> x)
x : Fix F
⊢ ∀ (x : F (Fix F)), rec g <$> x = (fun x => h x) <$> x → rec g (mk x) = h (mk x)

tactic: rw [hyp, ← hyp', Fix.rec_eq]
state_before: case h.h
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α : Type u
g : F α → α
h : Fix F → α
hyp : ∀ (x : F (Fix F)), h (mk x) = g (h <$> x)
x✝ : Fix F
x : F (Fix F)
hyp' : rec g <$> x = (fun x => h x) <$> x
⊢ rec g (mk x) = h (mk x)
Theorem: List.mem_zip
File: Mathlib/Data/List/Zip.lean

tactic: cases' h with _ _ _ h
state_before: α : Type u
β : Type u_1
γ : Type ?u.74738
δ : Type ?u.74741
ε : Type ?u.74744
a : α
b : β
head✝¹ : α
l₁ : List α
head✝ : β
l₂ : List β
h : (a, b) ∈ zip (head✝¹ :: l₁) (head✝ :: l₂)
⊢ a ∈ head✝¹ :: l₁ ∧ b ∈ head✝ :: l₂

tactic: simp
state_before: case head
α : Type u
β : Type u_1
γ : Type ?u.74738
δ : Type ?u.74741
ε : Type ?u.74744
a : α
b : β
l₁ : List α
l₂ : List β
⊢ a ∈ a :: l₁ ∧ b ∈ b :: l₂

tactic: have := mem_zip h
state_before: case tail
α : Type u
β : Type u_1
γ : Type ?u.74738
δ : Type ?u.74741
ε : Type ?u.74744
a : α
b : β
head✝¹ : α
l₁ : List α
head✝ : β
l₂ : List β
h : Mem (a, b) (zipWith Prod.mk l₁ l₂)
⊢ a ∈ head✝¹ :: l₁ ∧ b ∈ head✝ :: l₂

tactic: exact ⟨Mem.tail _ this.1, Mem.tail _ this.2⟩
state_before: case tail
α : Type u
β : Type u_1
γ : Type ?u.74738
δ : Type ?u.74741
ε : Type ?u.74744
a : α
b : β
head✝¹ : α
l₁ : List α
head✝ : β
l₂ : List β
h : Mem (a, b) (zipWith Prod.mk l₁ l₂)
this : a ∈ l₁ ∧ b ∈ l₂
⊢ a ∈ head✝¹ :: l₁ ∧ b ∈ head✝ :: l₂
Theorem: Matrix.row_mulVec
File: Mathlib/Data/Matrix/Basic.lean

tactic: ext
state_before: l : Type ?u.1216877
m : Type u_2
n : Type u_1
o : Type ?u.1216886
m' : o → Type ?u.1216891
n' : o → Type ?u.1216896
R : Type ?u.1216899
S : Type ?u.1216902
α : Type v
β : Type w
γ : Type ?u.1216909
inst✝¹ : Fintype n
inst✝ : NonUnitalNonAssocSemiring α
M : Matrix m n α
v : n → α
⊢ row (mulVec M v) = (M ⬝ col v)ᵀ

tactic: rfl
state_before: case a.h
l : Type ?u.1216877
m : Type u_2
n : Type u_1
o : Type ?u.1216886
m' : o → Type ?u.1216891
n' : o → Type ?u.1216896
R : Type ?u.1216899
S : Type ?u.1216902
α : Type v
β : Type w
γ : Type ?u.1216909
inst✝¹ : Fintype n
inst✝ : NonUnitalNonAssocSemiring α
M : Matrix m n α
v : n → α
i✝ : Unit
x✝ : m
⊢ row (mulVec M v) i✝ x✝ = (M ⬝ col v)ᵀ i✝ x✝
Theorem: Ideal.comap_isPrime
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: rwa [mem_comap, map_mul] at h
state_before: R : Type u
S : Type v
F : Type u_1
inst✝¹ : Semiring R
inst✝ : Semiring S
rc : RingHomClass F R S
f : F
I J : Ideal R
K L : Ideal S
G : Type ?u.792741
rcg : RingHomClass G S R
ι : Sort ?u.792775
H : IsPrime K
x y : R
h : x * y ∈ comap f K
⊢ ↑f x * ↑f y ∈ K
Theorem: convex_iff_pairwise_pos
File: Mathlib/Analysis/Convex/Basic.lean

tactic: refine' convex_iff_forall_pos.trans ⟨fun h x hx y hy _ => h hx hy, _⟩
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.14989
β : Type ?u.14992
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
x : E
⊢ Convex 𝕜 s ↔ Set.Pairwise s fun x y => ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 → a • x + b • y ∈ s

tactic: intro h x hx y hy a b ha hb hab
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.14989
β : Type ?u.14992
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
x : E
⊢ (Set.Pairwise s fun x y => ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 → a • x + b • y ∈ s) →
    ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃y : E⦄, y ∈ s → ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 → a • x + b • y ∈ s

tactic: obtain rfl | hxy := eq_or_ne x y
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.14989
β : Type ?u.14992
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
x✝ : E
h : Set.Pairwise s fun x y => ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 → a • x + b • y ∈ s
x : E
hx : x ∈ s
y : E
hy : y ∈ s
a b : 𝕜
ha : 0 < a
hb : 0 < b
hab : a + b = 1
⊢ a • x + b • y ∈ s

tactic: rwa [Convex.combo_self hab]
state_before: case inl
𝕜 : Type u_1
E : Type u_2
F : Type ?u.14989
β : Type ?u.14992
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
x✝ : E
h : Set.Pairwise s fun x y => ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 → a • x + b • y ∈ s
x : E
hx : x ∈ s
a b : 𝕜
ha : 0 < a
hb : 0 < b
hab : a + b = 1
hy : x ∈ s
⊢ a • x + b • x ∈ s

tactic: exact h hx hy hxy ha hb hab
state_before: case inr
𝕜 : Type u_1
E : Type u_2
F : Type ?u.14989
β : Type ?u.14992
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
x✝ : E
h : Set.Pairwise s fun x y => ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 → a • x + b • y ∈ s
x : E
hx : x ∈ s
y : E
hy : y ∈ s
a b : 𝕜
ha : 0 < a
hb : 0 < b
hab : a + b = 1
hxy : x ≠ y
⊢ a • x + b • y ∈ s
Theorem: IsConnected.iUnion_of_chain
File: Mathlib/Topology/Connected.lean

tactic: rw [inter_comm]
state_before: α : Type u
β : Type v
ι : Type ?u.12147
π : ι → Type ?u.12152
inst✝⁴ : TopologicalSpace α
s✝ t u v : Set α
inst✝³ : LinearOrder β
inst✝² : SuccOrder β
inst✝¹ : IsSuccArchimedean β
inst✝ : Nonempty β
s : β → Set α
H : ∀ (n : β), IsConnected (s n)
K : ∀ (n : β), Set.Nonempty (s n ∩ s (succ n))
i✝ j i : β
x✝ : i ∈ Ico j i✝
⊢ Set.Nonempty (s (succ i) ∩ s i)

tactic: exact K i
state_before: α : Type u
β : Type v
ι : Type ?u.12147
π : ι → Type ?u.12152
inst✝⁴ : TopologicalSpace α
s✝ t u v : Set α
inst✝³ : LinearOrder β
inst✝² : SuccOrder β
inst✝¹ : IsSuccArchimedean β
inst✝ : Nonempty β
s : β → Set α
H : ∀ (n : β), IsConnected (s n)
K : ∀ (n : β), Set.Nonempty (s n ∩ s (succ n))
i✝ j i : β
x✝ : i ∈ Ico j i✝
⊢ Set.Nonempty (s i ∩ s (succ i))
Theorem: RatFunc.map_apply_ofFractionRing_mk
File: Mathlib/FieldTheory/RatFunc.lean

tactic: refine (liftOn_ofFractionRing_mk n _ _ _).trans ?_
state_before: K : Type u
inst✝⁵ : CommRing K
G₀ : Type ?u.616578
L : Type ?u.616581
R : Type u_2
S : Type u_3
F : Type u_1
inst✝⁴ : CommGroupWithZero G₀
inst✝³ : Field L
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : MonoidHomClass F R[X] S[X]
φ : F
hφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰
n : R[X]
d : { x // x ∈ R[X]⁰ }
⊢ ↑(map φ hφ) { toFractionRing := Localization.mk n d } =
    { toFractionRing := Localization.mk (↑φ n) { val := ↑φ ↑d, property := (_ : ↑d ∈ Submonoid.comap φ S[X]⁰) } }

tactic: rw [dif_pos]
state_before: K : Type u
inst✝⁵ : CommRing K
G₀ : Type ?u.616578
L : Type ?u.616581
R : Type u_2
S : Type u_3
F : Type u_1
inst✝⁴ : CommGroupWithZero G₀
inst✝³ : Field L
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : MonoidHomClass F R[X] S[X]
φ : F
hφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰
n : R[X]
d : { x // x ∈ R[X]⁰ }
⊢ (if h : ↑φ ↑d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ ↑d, property := h } } else 0) =
    { toFractionRing := Localization.mk (↑φ n) { val := ↑φ ↑d, property := (_ : ↑d ∈ Submonoid.comap φ S[X]⁰) } }
Theorem: unop_map_list_prod
File: Mathlib/Data/List/BigOperators/Lemmas.lean

tactic: rw [map_list_prod f l, MulOpposite.unop_list_prod, List.map_map]
state_before: ι : Type ?u.30337
α : Type ?u.30340
M : Type u_2
N : Type u_3
P : Type ?u.30349
M₀ : Type ?u.30352
G : Type ?u.30355
R : Type ?u.30358
inst✝² : Monoid M
inst✝¹ : Monoid N
F : Type u_1
inst✝ : MonoidHomClass F M Nᵐᵒᵖ
f : F
l : List M
⊢ unop (↑f (prod l)) = prod (reverse (map (unop ∘ ↑f) l))
Theorem: Ico_eq_locus_Ioc_eq_iUnion_Ioo
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: ext1
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a b c : α
n : ℤ
⊢ {b | toIcoMod hp a b = toIocMod hp a b} = ⋃ (z : ℤ), Set.Ioo (a + z • p) (a + p + z • p)

tactic: simp_rw [Set.mem_setOf, Set.mem_iUnion, ← Set.sub_mem_Ioo_iff_left, ←
  not_modEq_iff_toIcoMod_eq_toIocMod, modEq_iff_not_forall_mem_Ioo_mod hp, not_forall,
  Classical.not_not]
state_before: case h
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a b c : α
n : ℤ
x✝ : α
⊢ x✝ ∈ {b | toIcoMod hp a b = toIocMod hp a b} ↔ x✝ ∈ ⋃ (z : ℤ), Set.Ioo (a + z • p) (a + p + z • p)
Theorem: toIcoDiv_add_zsmul'
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: refine' toIcoDiv_eq_of_sub_zsmul_mem_Ico _ _
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
m : ℤ
⊢ toIcoDiv hp (a + m • p) b = toIcoDiv hp a b - m

tactic: rw [sub_smul, ← sub_add, add_right_comm]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
m : ℤ
⊢ b - (toIcoDiv hp a b - m) • p ∈ Set.Ico (a + m • p) (a + m • p + p)

tactic: simpa using sub_toIcoDiv_zsmul_mem_Ico hp a b
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
m : ℤ
⊢ b - toIcoDiv hp a b • p + m • p ∈ Set.Ico (a + m • p) (a + p + m • p)
Theorem: MeasureTheory.Measure.measurable_lintegral
File: Mathlib/MeasureTheory/Measure/GiryMonad.lean

tactic: simp only [lintegral_eq_iSup_eapprox_lintegral, hf, SimpleFunc.lintegral]
state_before: α : Type u_1
β : Type ?u.4410
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : α → ℝ≥0∞
hf : Measurable f
⊢ Measurable fun μ => ∫⁻ (x : α), f x ∂μ

tactic: refine' measurable_iSup fun n => Finset.measurable_sum _ fun i _ => _
state_before: α : Type u_1
β : Type ?u.4410
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : α → ℝ≥0∞
hf : Measurable f
⊢ Measurable fun μ =>
    ⨆ (n : ℕ),
      ∑ x in SimpleFunc.range (SimpleFunc.eapprox (fun x => f x) n),
        x * ↑↑μ (↑(SimpleFunc.eapprox (fun x => f x) n) ⁻¹' {x})

tactic: refine' Measurable.const_mul _ _
state_before: α : Type u_1
β : Type ?u.4410
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : α → ℝ≥0∞
hf : Measurable f
n : ℕ
i : ℝ≥0∞
x✝ : i ∈ SimpleFunc.range (SimpleFunc.eapprox (fun x => f x) n)
⊢ Measurable fun μ => i * ↑↑μ (↑(SimpleFunc.eapprox (fun x => f x) n) ⁻¹' {i})

tactic: exact measurable_coe ((SimpleFunc.eapprox f n).measurableSet_preimage _)
state_before: α : Type u_1
β : Type ?u.4410
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : α → ℝ≥0∞
hf : Measurable f
n : ℕ
i : ℝ≥0∞
x✝ : i ∈ SimpleFunc.range (SimpleFunc.eapprox (fun x => f x) n)
⊢ Measurable fun μ => ↑↑μ (↑(SimpleFunc.eapprox (fun x => f x) n) ⁻¹' {i})
Theorem: Int.zero_sub
File: Std/Data/Int/Lemmas.lean

tactic: simp [Int.sub_eq_add_neg]
state_before: a : Int
⊢ 0 - a = -a
Theorem: IsUnit.dvd
File: Mathlib/Algebra/Divisibility/Units.lean

tactic: rcases hu with ⟨u, rfl⟩
state_before: α : Type u_1
inst✝ : Monoid α
a b u : α
hu : IsUnit u
⊢ u ∣ a

tactic: apply Units.coe_dvd
state_before: case intro
α : Type u_1
inst✝ : Monoid α
a b : α
u : αˣ
⊢ ↑u ∣ a
Theorem: WithTop.pred_untop
File: Mathlib/Order/SuccPred/Basic.lean

tactic: induction a using WithTop.recTopCoe <;> simp
state_before: α : Type ?u.55953
inst✝² : Preorder α
inst✝¹ : OrderTop α
inst✝ : PredOrder α
a : WithTop α
ha : a ≠ ⊤
⊢ pred a ≠ ⊤
Theorem: tendsto_ceil_right_pure_add_one
File: Mathlib/Topology/Algebra/Order/Floor.lean

tactic: simpa only [floor_intCast] using tendsto_ceil_right_pure_floor_add_one (n : α)
state_before: α : Type u_1
β : Type ?u.12341
γ : Type ?u.12344
inst✝³ : LinearOrderedRing α
inst✝² : FloorRing α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
n : ℤ
⊢ Tendsto ceil (𝓝[Ioi ↑n] ↑n) (pure (n + 1))
Theorem: Denumerable.lower_raise'
File: Mathlib/Logic/Equiv/List.lean

tactic: simp [raise', lower', add_tsub_cancel_right, lower_raise']
state_before: α : Type ?u.56215
β : Type ?u.56218
inst✝¹ : Denumerable α
inst✝ : Denumerable β
m : ℕ
l : List ℕ
n : ℕ
⊢ lower' (raise' (m :: l) n) n = m :: l
Theorem: CategoryTheory.Limits.biprod.braiding'_eq_braiding
File: Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean

tactic: aesop_cat
state_before: J : Type w
C : Type u
inst✝² : Category C
inst✝¹ : HasZeroMorphisms C
P✝ Q✝ : C
inst✝ : HasBinaryBiproducts C
P Q : C
⊢ braiding' P Q = braiding P Q